pax_global_header00006660000000000000000000000064112672457360014527gustar00rootroot0000000000000052 comment=c33778febbac3c762f0fe2b864a29f25a8cbbc26 g2ipmsg-0.9.6+dfsg/000077500000000000000000000000001126724573600140325ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/AUTHORS000066400000000000000000000004351126724573600151040ustar00rootroot00000000000000Author: Takeharu KATO takeharu1219@ybb.ne.jp Special Thanks: Toshinori SUGITA Significant feature requests and testing. Yuhei MATSUNAGA Gconf relevant improvements. ZC Miao Simplified Chinese language translation. Yasushi KATO Answer-list relevant bug fixes. g2ipmsg-0.9.6+dfsg/COPYING000077500000000000000000000024021126724573600150660ustar00rootroot00000000000000Copyright (C) 2006,2007,2008 Takeharu KATO Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. g2ipmsg-0.9.6+dfsg/ChangeLog000066400000000000000000000152731126724573600156140ustar00rootroot00000000000000Version 0.9.6 Following fixes and improvements are performed: 1) Add locked seal handling. 2) Add encrypted private key file handling facility. 3) Add iconizing read notification dialog. 4) Add Doxygen support(It generate the document of internal structure guide which is written in Japanese (in progress)). 5) Fix encrypted message handling relevant bug. 6) Add AES encryption support. 7) Fix IPMSG_BR_EXIT mis-handling. 8) Add codeset selector at the config window (Requested by Miao. Thanks) 9) Add security configuration window. 10) Fix nickname display on user list view. 11) Fix png file installation path (Reported by Mr. Miao. Thanks). Version 0.9.5d Following fixes and improvements are performed: 1) Large file support on Linux. (Reported and tested by Mr. Wang. Thanks). Version 0.9.5 Following fixes and improvements are performed: 1) Fix gnome_program_init relevant configuration (Reported by Mr. Yoshimura, Thanks) 2) Remove minor warnings. 3) Fix systray relevant NULL handling. 4) Support autoconf 2.60 or later. Version 0.9.4 Following fixes and improvements are performed: 1) Fix absent message handling.in encryption mode. 2) Fix a bug in hostlist recieving with ipmsg exchanger (Reported by Mr. Kato, Thanks). 3) Add workaround for encrypted messages from Chat & Messenger clients (Reported by Mr. Yoshimura, Thanks). 4) Fix compilation bug in the system whcih has not openssl library (Reported by Mr. Kato. Thanks). 5) Change IPMSG_ANSLIST message handing to accept anonymous ANSLIST packet, it is needed to communicate with ipmsg exchange servers (Requested by Mr. Kato. Thanks). 6) Simplified Chinese .po file is added. (Supported by ZC Miao. Thanks). 7) Add configuration option of ipmsg external character code set. 8) Fix memory leak in read confirmation dialog. 9) License is changed from GPL to BSD. 10) Use asctime_r, localtime_r if they are available. Version 0.9.3 Following fixes and improvements are performed: 1) Fix memory leak in host list exchange. 2) Fix memory leak in entry packet handling in userdb. 3) Fix memory leak in tcp connection handling. 4) Fix some problems occur when it is installed as new installation by Mr. Matsunaga. Thanks. 5) Fix symmetric encryption handing reported from Mr. Sugita. Thanks. 6) Change window wrapping mode on ViewWindow and Message Window. requested from Mr. Sugita. Thanks. Version 0.9.2 Following fixes and improvements are performed: 1) Fix default entry flags 2) Encrypted packet handling has been added. Version 0.9.1 Following fixes and improvements are performed: 1) Change config menu item name(from edit to config). 2) adds user list view config invocation item and sorting menu on config menu item. 3) Reduce stack usage for FreeBSD 5.X. 4) Clean up create_response(directory sending message creator) function to avoid glibc snprintf bug on PowerPC. 5) Behaviors of directory download window is fixed. 6) The macros to replace glib's g_slice relevant functions are implemented for old environments(Reported by Mr. Aditya. Thanks). 7) Minor code clean-ups are performed to reduce warnings. Version 0.9 Following fixes and improvements are performed: 1) Fix download file id handling. 2) Add all at once downloading. 3) Change logfile writing policy(Requested from Mr. Sugita. Thanks). 4) Systray support, now we can use this both gnome2 and KDE (Requested from Mr. Sugita. Thanks). 5) Fix lock starvation with update button. 6) Directory sending facility is added. 7) Automatic download monitor updating. 8) Absent message format fixed. 9) Read confirmation handling fixed. 10) Add src/menu.h(This was missing in former versions.) (Reported by Mr. Aditya. Thanks). 11) Sorting facility and user view configuration function are added. 12) Support get version info and get absence info. 13) Use sigaction in stead of send system call's MSG_NOSIGNAL flag to mask SIGPIPE(For FreeBSD 5.X). Version 0.8.6 Following fixes and improvements are performed: 1) Add getting hostlist. 2) Fix message window design. Version 0.8.5 Following fixes and improvements are performed: 1) Add update button on the message window. 2) Fix multiple file download and update GUI timing. 3) Change message window scroll bar as like as windows edition. 4) Handle EINTR signal when the client downloads a file. 5) Add attachment file editor size recording facility. 6) Send operation relevant memory leak fixed. 7) Multicast handling fixed. 8) Fix config window entry behavior fixed. 9) Fix absence message editor like windows edition. 10) Support no gst environment(Sound relevant functions are automatically disabled in such environments.) 11) Support GTk-2.8 or GTK-2.9 for FedoraCOre5 (Clickable URL functions are automatically disabled in such environments.). 12) Show full contents of license. 13) Fix view window behavior like windows edition. 14) Handle EINTR when tcp receive thread obtains file info. 15) Support dial up modes. 16) Fix no auto reply condition. 17) Fix codeset of version info etc... 18) Fix codeset of getlist. 19) Fix URL/Key timeout handling. Version 0.8.4 Following fixes and improvements are performed: 1) download file name bug fixed. 2) snprintf mem-leak fixed. Version 0.8.3 Following fixes and improvements are performed: 1) Download fail handling 2) Tooltips support. 3) Fix revoked down load file handling. 4) Download monitor fixed. 5) Fix message window design(add VPane). 6) Improve absence editor. 7) Support user list sorting Version 0.8.2 Following fixes and improvements are performed: 1) Fix userdb slice allocation 2) Add dialog to execute/open attach file(or directory) like windows edition does. 3) Change userdb update method. 4) Add response function to host list request(Note: g2ipmsg does not send host list requests.). 5) Add Dial-up host handling(Note: g2ipmsg does not become to dial-up host on purpose.). 6) Using F5 Key to update user list. Version 0.8.1 Fix applet exit handling. Version 0.8 Following fixes are performed: 1) IP V6 initial support 2) Fix handling of file attachment which have UTF-8 coded name. 3) Fix file attachment relevant stack destroy. 4) Use CodePage932 instead of strict Shift-JIS as external representation. 5) Reply absence message with IPMSG_AUTORETOPT to avoid absence message flood. 6) Refrain multiple applet instance creation. 7) Add show log file menu item. 8) Change applet icon size. 9) Fix Sound handling 10) configure.in fix for FreeBSD. Version 0.7 Not released internal use version. Version 0.6 First public release. g2ipmsg-0.9.6+dfsg/INSTALL000077500000000000000000000224321126724573600150710ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. g2ipmsg-0.9.6+dfsg/Makefile.am000066400000000000000000000051621126724573600160720ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = src po include aminclude.am serverdir = $(libdir)/bonobo/servers server_in_files = g2ipmsg.server.in server_DATA = $(server_in_files:.server.in=.server) $(server_in_files): $(server_in_files:.server.in=.server.in.in) sed -e "s|\@BINDIR\@|$(bindir)|" $< > $@ @INTLTOOL_SERVER_RULE@ Applicationdir = $(datadir)/applications Application_in_files = g2ipmsg.desktop.in Application_DATA = $(Application_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ schemadir = $(GCONF_SCHEMA_FILE_DIR) schema_in_files = g2ipmsg.schemas.in schema_DATA = $(schema_in_files:.schemas.in=.schemas) @INTLTOOL_SCHEMAS_RULE@ uidir = $(datadir)/gnome-2.0/ui ui_DATA = g2ipmsg.xml MOSTLYCLEANFILES = $(DX_CLEANFILES) EXTRA_DIST = \ $(DX_CONFIG) \ macros/*.m4 \ aminclude.am \ autogen.sh \ g2ipmsg.glade \ g2ipmsg.gladep \ g2ipmsg.server.in.in \ g2ipmsg.desktop.in \ g2ipmsg.schemas.in \ g2ipmsg.xml \ g2ipmsg.spec \ README.jp \ intltool-extract.in \ intltool-update.in \ intltool-merge.in install-data-local: install-schemas @$(NORMAL_INSTALL) if test -d $(srcdir)/pixmaps; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \ for pixmap in $(srcdir)/pixmaps/*.xpm; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \ fi \ done \ fi if test -d $(srcdir)/sounds; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/sounds/$(PACKAGE); \ for sound in $(srcdir)/sounds/*; do \ if test -f $$sound; then \ $(INSTALL_DATA) $$sound $(DESTDIR)$(datadir)/sounds/$(PACKAGE); \ fi \ done \ fi for pngfile in $(srcdir)/pixmaps/*.png; do \ if test -f $$pngfile; then \ $(INSTALL_DATA) $$pngfile $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \ fi \ done #for GNOME menu icons $(INSTALL_DATA) $(srcdir)/pixmaps/ipmsg.png $(DESTDIR)$(datadir)/pixmaps # if test -f $(srcdir)/$(server_DATA); then \ # $(INSTALL_DATA) $(srcdir)/$(server_DATA) $(serverdir); \ # fi dist-hook: if test -d pixmaps; then \ mkdir $(distdir)/pixmaps; \ for pixmap in pixmaps/*; do \ if test -f $$pixmap; then \ cp -p $$pixmap $(distdir)/pixmaps; \ fi \ done \ fi if test -d sounds; then \ mkdir $(distdir)/sounds; \ for sound in sounds/*; do \ if test -f $$sound; then \ cp -p $$sound $(distdir)/sounds; \ fi \ done \ fi install-schemas: g2ipmsg.schemas if GCONF_SCHEMAS_INSTALL GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ gconftool-2 --makefile-install-rule g2ipmsg.schemas endif GCONF_SCHEMAS_INSTALL g2ipmsg-0.9.6+dfsg/Makefile.in000066400000000000000000001014611126724573600161020ustar00rootroot00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2004 Oren Ben-Kiki # This file is distributed under the same terms as the Automake macro files. # Generate automatic documentation using Doxygen. Goals and variables values # are controlled by the various DX_COND_??? conditionals set by autoconf. # # The provided goals are: # doxygen-doc: Generate all doxygen documentation. # doxygen-run: Run doxygen, which will generate some of the documentation # (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post # processing required for the rest of it (PS, PDF, and some MAN). # doxygen-man: Rename some doxygen generated man pages. # doxygen-ps: Generate doxygen PostScript documentation. # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake goals. If # doxygen is used to generate man pages, you can achieve this integration by # setting man3_MANS to the list of man pages generated and then adding the # dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # This is usually added to MOSTLYCLEANFILES. VPATH = @srcdir@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/aminclude.am \ $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS config.guess config.sub depcomp \ install-sh ltmain.sh missing mkinstalldirs subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/ax_prog_doxygen.m4 \ $(top_srcdir)/macros/g2ipmsg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(Applicationdir)" \ "$(DESTDIR)$(schemadir)" "$(DESTDIR)$(serverdir)" \ "$(DESTDIR)$(uidir)" ApplicationDATA_INSTALL = $(INSTALL_DATA) schemaDATA_INSTALL = $(INSTALL_DATA) serverDATA_INSTALL = $(INSTALL_DATA) uiDATA_INSTALL = $(INSTALL_DATA) DATA = $(Application_DATA) $(schema_DATA) $(server_DATA) $(ui_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print pkgdatadir = @pkgdatadir@ ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ APPLET_CFLAGS = @APPLET_CFLAGS@ APPLET_LIBS = @APPLET_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DATADIRNAME = @DATADIRNAME@ DBUSGLIB_CFLAGS = @DBUSGLIB_CFLAGS@ DBUSGLIB_ENABLED = @DBUSGLIB_ENABLED@ DBUSGLIB_LIBS = @DBUSGLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ G2IPMSG_CFLAGS = @G2IPMSG_CFLAGS@ G2IPMSG_LIBS = @G2IPMSG_LIBS@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOME_GLADEDIR = @GNOME_GLADEDIR@ GNOME_ICONDIR = @GNOME_ICONDIR@ GNOME_PIXMAPSDIR = @GNOME_PIXMAPSDIR@ GNOME_SCREENSAVER_ENABLED = @GNOME_SCREENSAVER_ENABLED@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ ICONV = @ICONV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ IPMSG_EXTERNAL_CHARCODE = @IPMSG_EXTERNAL_CHARCODE@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PREFIX = @PREFIX@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSCONFDIR = @SYSCONFDIR@ SYSTRAY_CFLAGS = @SYSTRAY_CFLAGS@ SYSTRAY_LIBS = @SYSTRAY_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gladedir = @gladedir@ host_alias = @host_alias@ htmldir = @htmldir@ iconsdir = @iconsdir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pixmapsdir = @pixmapsdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src po @DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html @DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHM = @DX_DOCDIR@/chm @DX_COND_chi_TRUE@@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi @DX_COND_doc_TRUE@@DX_COND_man_TRUE@DX_CLEAN_MAN = @DX_DOCDIR@/man @DX_COND_doc_TRUE@@DX_COND_rtf_TRUE@DX_CLEAN_RTF = @DX_DOCDIR@/rtf @DX_COND_doc_TRUE@@DX_COND_xml_TRUE@DX_CLEAN_XML = @DX_DOCDIR@/xml @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_PS_GOAL = doxygen-ps @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_PDF_GOAL = doxygen-pdf @DX_COND_doc_TRUE@@DX_COND_latex_TRUE@DX_CLEAN_LATEX = @DX_DOCDIR@/latex @DX_COND_doc_TRUE@DX_CLEANFILES = \ @DX_COND_doc_TRUE@ @DX_DOCDIR@/@PACKAGE@.tag \ @DX_COND_doc_TRUE@ -r \ @DX_COND_doc_TRUE@ $(DX_CLEAN_HTML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHM) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHI) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_MAN) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_RTF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_XML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PS) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PDF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_LATEX) serverdir = $(libdir)/bonobo/servers server_in_files = g2ipmsg.server.in server_DATA = $(server_in_files:.server.in=.server) Applicationdir = $(datadir)/applications Application_in_files = g2ipmsg.desktop.in Application_DATA = $(Application_in_files:.desktop.in=.desktop) schemadir = $(GCONF_SCHEMA_FILE_DIR) schema_in_files = g2ipmsg.schemas.in schema_DATA = $(schema_in_files:.schemas.in=.schemas) uidir = $(datadir)/gnome-2.0/ui ui_DATA = g2ipmsg.xml MOSTLYCLEANFILES = $(DX_CLEANFILES) EXTRA_DIST = \ $(DX_CONFIG) \ macros/*.m4 \ aminclude.am \ autogen.sh \ g2ipmsg.glade \ g2ipmsg.gladep \ g2ipmsg.server.in.in \ g2ipmsg.desktop.in \ g2ipmsg.schemas.in \ g2ipmsg.xml \ g2ipmsg.spec \ README.jp \ intltool-extract.in \ intltool-update.in \ intltool-merge.in all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/aminclude.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-ApplicationDATA: $(Application_DATA) @$(NORMAL_INSTALL) test -z "$(Applicationdir)" || $(MKDIR_P) "$(DESTDIR)$(Applicationdir)" @list='$(Application_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(ApplicationDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(Applicationdir)/$$f'"; \ $(ApplicationDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(Applicationdir)/$$f"; \ done uninstall-ApplicationDATA: @$(NORMAL_UNINSTALL) @list='$(Application_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(Applicationdir)/$$f'"; \ rm -f "$(DESTDIR)$(Applicationdir)/$$f"; \ done install-schemaDATA: $(schema_DATA) @$(NORMAL_INSTALL) test -z "$(schemadir)" || $(MKDIR_P) "$(DESTDIR)$(schemadir)" @list='$(schema_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(schemaDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(schemadir)/$$f'"; \ $(schemaDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(schemadir)/$$f"; \ done uninstall-schemaDATA: @$(NORMAL_UNINSTALL) @list='$(schema_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(schemadir)/$$f'"; \ rm -f "$(DESTDIR)$(schemadir)/$$f"; \ done install-serverDATA: $(server_DATA) @$(NORMAL_INSTALL) test -z "$(serverdir)" || $(MKDIR_P) "$(DESTDIR)$(serverdir)" @list='$(server_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(serverDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(serverdir)/$$f'"; \ $(serverDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(serverdir)/$$f"; \ done uninstall-serverDATA: @$(NORMAL_UNINSTALL) @list='$(server_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(serverdir)/$$f'"; \ rm -f "$(DESTDIR)$(serverdir)/$$f"; \ done install-uiDATA: $(ui_DATA) @$(NORMAL_INSTALL) test -z "$(uidir)" || $(MKDIR_P) "$(DESTDIR)$(uidir)" @list='$(ui_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(uiDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(uidir)/$$f'"; \ $(uiDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(uidir)/$$f"; \ done uninstall-uiDATA: @$(NORMAL_UNINSTALL) @list='$(ui_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(uidir)/$$f'"; \ rm -f "$(DESTDIR)$(uidir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ am__remove_distdir=: \ am__skip_length_check=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(Applicationdir)" "$(DESTDIR)$(schemadir)" "$(DESTDIR)$(serverdir)" "$(DESTDIR)$(uidir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-ApplicationDATA install-data-local \ install-schemaDATA install-serverDATA install-uiDATA install-dvi: install-dvi-recursive install-exec-am: install-html: install-html-recursive install-info: install-info-recursive install-man: install-pdf: install-pdf-recursive install-ps: install-ps-recursive installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-ApplicationDATA uninstall-schemaDATA \ uninstall-serverDATA uninstall-uiDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ install-strip .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \ distclean distclean-generic distclean-hdr distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-ApplicationDATA \ install-am install-data install-data-am install-data-local \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-schemaDATA install-serverDATA \ install-strip install-uiDATA installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-recursive uninstall \ uninstall-ApplicationDATA uninstall-am uninstall-schemaDATA \ uninstall-serverDATA uninstall-uiDATA @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(MAKEINDEX_PATH) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_MAKEINDEX) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ mv refman.pdf ../@PACKAGE@.pdf @DX_COND_doc_TRUE@.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) @DX_COND_doc_TRUE@ rm -rf @DX_DOCDIR@ @DX_COND_doc_TRUE@ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) $(server_in_files): $(server_in_files:.server.in=.server.in.in) sed -e "s|\@BINDIR\@|$(bindir)|" $< > $@ @INTLTOOL_SERVER_RULE@ @INTLTOOL_DESKTOP_RULE@ @INTLTOOL_SCHEMAS_RULE@ install-data-local: install-schemas @$(NORMAL_INSTALL) if test -d $(srcdir)/pixmaps; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \ for pixmap in $(srcdir)/pixmaps/*.xpm; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \ fi \ done \ fi if test -d $(srcdir)/sounds; then \ $(mkinstalldirs) $(DESTDIR)$(datadir)/sounds/$(PACKAGE); \ for sound in $(srcdir)/sounds/*; do \ if test -f $$sound; then \ $(INSTALL_DATA) $$sound $(DESTDIR)$(datadir)/sounds/$(PACKAGE); \ fi \ done \ fi for pngfile in $(srcdir)/pixmaps/*.png; do \ if test -f $$pngfile; then \ $(INSTALL_DATA) $$pngfile $(DESTDIR)$(datadir)/pixmaps/$(PACKAGE); \ fi \ done #for GNOME menu icons $(INSTALL_DATA) $(srcdir)/pixmaps/ipmsg.png $(DESTDIR)$(datadir)/pixmaps # if test -f $(srcdir)/$(server_DATA); then \ # $(INSTALL_DATA) $(srcdir)/$(server_DATA) $(serverdir); \ # fi dist-hook: if test -d pixmaps; then \ mkdir $(distdir)/pixmaps; \ for pixmap in pixmaps/*; do \ if test -f $$pixmap; then \ cp -p $$pixmap $(distdir)/pixmaps; \ fi \ done \ fi if test -d sounds; then \ mkdir $(distdir)/sounds; \ for sound in sounds/*; do \ if test -f $$sound; then \ cp -p $$sound $(distdir)/sounds; \ fi \ done \ fi install-schemas: g2ipmsg.schemas @GCONF_SCHEMAS_INSTALL_TRUE@ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ @GCONF_SCHEMAS_INSTALL_TRUE@ gconftool-2 --makefile-install-rule g2ipmsg.schemas # 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: g2ipmsg-0.9.6+dfsg/NEWS000066400000000000000000000000001126724573600145170ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/README000066400000000000000000000055311126724573600147160ustar00rootroot00000000000000 GNOME2 IPMSG 1. About this software IP messsenger is one of popular win-popup style message exchanger in Japan. G2ipmsg is a kind of IP messenger clone for GNOME2 environments. This edition support following features: 1) Basic message send/receive features. 2) File attachment(Regular file only) 3) Encrypt message handling. 2. Compile / Install 1) At first, extract source archive. 2) Configure g2ipmsg source tree to adopt to your environment with following commnand. ./configure --prefix=/usr --sysconfdir=/etc --enable-systray \ --with-ext-charcode=CP932 You can specify ipmsg character code set on the network with --with-ext-charcode option(Default:CP932). e.g.: If you want to use simplified chainese character code set: ./configure --prefix=/usr --sysconfdir=/etc --enable-systray \ --with-ext-charcode=CP936 3) Compile g2ipmsg with make(GNU Make may be needed.). make 4) Install To install g2ipmsg into your system with following command. make install Following commands are installed into your file system on install success. /usr/bin/g2ipmsg ... application edition of g2ipmsg. /usr/bin/g2ipmsg_applet ... GNOME2 applet edition of g2ipmsg. 3. Execution To invoke g2ipmsg application, please type following command. /usr/bin/g2ipmsg To use applet edition of g2ipmsg, you need register the g2ipmsg_applet to your gnome2 panel with standard gnome2 panel operation. Please refer following URL to know how to register gnome2 applet. http://www.gnome.org/ 4. file attachment function To attach some file on the message, you can drag-and-drop attachment files into the message window from nautilus. When the message window receives attachment files, it open the attachment file editor to composite attachment file information. If the attachment file editor is destroyed before the message is sent, g2ipmsg get rid of attachment files(treat as file attachment operation was canceled). If you want to destroy attachment file editor, please destoroy button on the window decoration. 5. Unsupported features 5.1. Directory Transfer Function g2ipmsg's directory transfer function is still buggy. 6. Thanks This software uses free sound file which obtained from following address. http://www.human-park.net/ 7. Contact Takeharu KATO takeharu1219@ybb.ne.jp Appendix.A. Ciphers used by g2ipmsg This software uses following cryptographic algorithms and hash functions. These are called via OpenSSL library. If you want to disable them, please invoke configure script with --without-ssl to build g2ipmsg. Cryptographic algorithms: 1) Blowfish 128bit/256bit 2) RC2 40bit/128bit/256bit 3) Triple DES 4) RSA 512bit/1024bit/2048bit Hash functions: 1) HMAC 2) MD5 3) SHA1 g2ipmsg-0.9.6+dfsg/README.jp000066400000000000000000000057671126724573600153410ustar00rootroot00000000000000 GNOME2 版IPメッセンジャー 1. はじめに 本ソフトウエアは, GNOME2 版IPメッセンジャーです. ファイル添付と暗号化通信に対応しています. 本ソフトウエアは, 無保証です. 本ソフトウエアを使用して発生したいかなる問題についても 責任を負いかねますので御了承くださいますようお願いいたします. 2. コンパイルおよびインストール方法 アーカイブ展開後以下のコマンドを発行することでコンパイルできます. ./configure --prefix=/usr --sysconfdir=/etc --enable-systray --with-ext-charcode=CP932 --with-ext-charcodeを使用することで, ネットワーク上で送受信する メッセージの文字コート種別を設定することができます. デフォルトは, CP932(Windows 31J 拡張シフトJIS)になります. 例: CP936(簡体中国語)に設定する場合は, 以下のようにします. ./configure --prefix=/usr --sysconfdir=/etc --enable-systray \ --with-ext-charcode=CP936 make コンパイル完了後, root権限で以下のコマンドを発行することで インストールできます. make install 成功すると, /usr/bin配下に, g2ipmsgというコマンドと g2ipmsg_applet(GNOME2アプレット版)とがインストールされます. 3. 起動方法 以下のコマンドで起動します. /usr/bin/g2ipmsg 4. ファイル添付について nautilusなどから, メッセージ編集ウィンドウに ファイルをドラッグ&ドロップするかメッセージ編集ウィンドウの メニューから"添付"を選択することで添付ファイルエディタが起動 します. メッセージ編集中に添付ファイルエディタを閉じる (右上のXボタンを押下)と添付の送信を中止します. 添付ファイルエディタを開いたまま, 送信ボタンを押すと ファイル添付付きのメッセージが送付されます. 5. 制限事項 5.1. ディレクトリ転送機能 ディレクトリ転送機能が動作しないことがある問題が判明しています. 6. 謝辞 本ソフトウエアでは, 以下のアドレスから取得したフリーの音楽素材を 使用しています. 音楽フリー素材 HumanPark http://www.human-park.net/ 7. 連絡先 加藤 丈治 takeharu1219@ybb.ne.jp 付録.A. 使用している暗号化アルゴリズム 本ソフトウエアは, OpenSSLを利用して以下の暗号化アルゴリズムやハッシュ関数を 使用しています. これらを無効にしたい場合は, configureに--without-sslオプションを つけて, 構築するようにしてください. 暗号アルゴリズム 1) Blowfish 128bit/256bit 2) RC2 40bit/128bit/256bit 3) トリプル DES 4) RSA 512bit/1024bit/2048bit ハッシュ関数 1) HMAC 2) MD5 3) SHA1 g2ipmsg-0.9.6+dfsg/aclocal.m4000066400000000000000000001763741126724573600157140ustar00rootroot00000000000000# generated automatically by aclocal 1.10.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(AC_AUTOCONF_VERSION, [2.61],, [m4_warning([this file was generated for autoconf 2.61. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) dnl AM_GCONF_SOURCE_2 dnl Defines GCONF_SCHEMA_CONFIG_SOURCE which is where you should install schemas dnl (i.e. pass to gconftool-2 dnl Defines GCONF_SCHEMA_FILE_DIR which is a filesystem directory where dnl you should install foo.schemas files dnl AC_DEFUN([AM_GCONF_SOURCE_2], [ if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` else GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE fi AC_ARG_WITH(gconf-source, [ --with-gconf-source=sourceaddress Config database for installing schema files.],GCONF_SCHEMA_CONFIG_SOURCE="$withval",) AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE) AC_MSG_RESULT([Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation]) if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' fi AC_ARG_WITH(gconf-schema-file-dir, [ --with-gconf-schema-file-dir=dir Directory for installing schema files.],GCONF_SCHEMA_FILE_DIR="$withval",) AC_SUBST(GCONF_SCHEMA_FILE_DIR) AC_MSG_RESULT([Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files]) AC_ARG_ENABLE(schemas-install, [ --disable-schemas-install Disable the schemas installation], [case ${enableval} in yes|no) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;; esac]) AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no]) ]) # 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 [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]) dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) # serial 36 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [AC_PREREQ([2.50])dnl case "$am__api_version" in 1.[01234]) AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) ;; *) ;; esac if test -n "$1"; then AC_MSG_CHECKING([for intltool >= $1]) INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in` ] AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' AC_SUBST(INTLTOOL_DESKTOP_RULE) AC_SUBST(INTLTOOL_DIRECTORY_RULE) AC_SUBST(INTLTOOL_KEYS_RULE) AC_SUBST(INTLTOOL_PROP_RULE) AC_SUBST(INTLTOOL_OAF_RULE) AC_SUBST(INTLTOOL_PONG_RULE) AC_SUBST(INTLTOOL_SERVER_RULE) AC_SUBST(INTLTOOL_SHEET_RULE) AC_SUBST(INTLTOOL_SOUNDLIST_RULE) AC_SUBST(INTLTOOL_UI_RULE) AC_SUBST(INTLTOOL_XAM_RULE) AC_SUBST(INTLTOOL_KBD_RULE) AC_SUBST(INTLTOOL_XML_RULE) AC_SUBST(INTLTOOL_XML_NOMERGE_RULE) AC_SUBST(INTLTOOL_CAVES_RULE) AC_SUBST(INTLTOOL_SCHEMAS_RULE) AC_SUBST(INTLTOOL_THEME_RULE) AC_SUBST(INTLTOOL_SERVICE_RULE) AC_SUBST(INTLTOOL_POLICY_RULE) # Check the gettext tools to make sure they are GNU AC_PATH_PROG(XGETTEXT, xgettext) AC_PATH_PROG(MSGMERGE, msgmerge) AC_PATH_PROG(MSGFMT, msgfmt) if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) fi # Use the tools built into the package, not the ones that are installed. AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract') AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge') AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update') AC_PATH_PROG(INTLTOOL_PERL, perl) if test -z "$INTLTOOL_PERL"; then AC_MSG_ERROR([perl not found; required for intltool]) fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then AC_MSG_ERROR([perl 5.x required for intltool]) fi if test "x$2" != "xno-xml"; then AC_MSG_CHECKING([for XML::Parser]) if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then AC_MSG_RESULT([ok]) else AC_MSG_ERROR([XML::Parser perl module is required for intltool]) fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile AC_SUBST(ALL_LINGUAS) # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then AC_LINK_IFELSE( [AC_LANG_PROGRAM([[]], [[extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr]])], [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 dnl in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [DATADIRNAME=share], [DATADIRNAME=lib]) ;; *) [DATADIRNAME=lib] ;; esac]) fi AC_SUBST(DATADIRNAME) IT_PO_SUBDIR([po]) dnl The following is very similar to dnl dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update]) dnl dnl with the following slight differences: dnl - the *.in files are in ac_aux_dir, dnl - if the file haven't changed upon reconfigure, it's not touched, dnl - the evaluation of the third parameter enables a hack which computes dnl the actual value of $libdir, dnl - the user sees "executing intltool commands", instead of dnl "creating intltool-extract" and such. dnl dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were dnl a reason for it. AC_CONFIG_COMMANDS([intltool], [ for file in intltool-extract intltool-merge intltool-update; do sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ < ${ac_aux_dir}/${file}.in > ${file}.out if cmp -s ${file} ${file}.out 2>/dev/null; then rm -f ${file}.out else mv -f ${file}.out ${file} fi chmod ugo+x ${file} chmod u+w ${file} done ], [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}']) ]) # IT_PO_SUBDIR(DIRNAME) # --------------------- # All po subdirs have to be declared with this macro; the subdir "po" is # declared by IT_PROG_INTLTOOL. # AC_DEFUN([IT_PO_SUBDIR], [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. dnl dnl The following CONFIG_COMMANDS should be exetuted at the very end dnl of config.status. AC_CONFIG_COMMANDS_PRE([ AC_CONFIG_COMMANDS([$1/stamp-it], [ rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" >"$1/stamp-it.tmp" [sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" ] if test ! -f "$1/Makefile"; then AC_MSG_ERROR([$1/Makefile is not ready.]) fi mv "$1/Makefile" "$1/Makefile.tmp" [sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r $1/POTFILES } ' "$1/Makefile.tmp" >"$1/Makefile"] rm -f "$1/Makefile.tmp" mv "$1/stamp-it.tmp" "$1/stamp-it" ]) ])dnl ]) # deprecated macros AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) # A hint is needed for aclocal from Automake <= 1.9.4: # AC_DEFUN([AC_PROG_INTLTOOL], ...) # 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 "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) 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 --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 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 # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # This was merged into AC_PROG_CC in Autoconf. AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 13 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 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 ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([macros/ax_prog_doxygen.m4]) m4_include([macros/g2ipmsg.m4]) g2ipmsg-0.9.6+dfsg/aminclude.am000066400000000000000000000111761126724573600163200ustar00rootroot00000000000000# Copyright (C) 2004 Oren Ben-Kiki # This file is distributed under the same terms as the Automake macro files. # Generate automatic documentation using Doxygen. Goals and variables values # are controlled by the various DX_COND_??? conditionals set by autoconf. # # The provided goals are: # doxygen-doc: Generate all doxygen documentation. # doxygen-run: Run doxygen, which will generate some of the documentation # (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post # processing required for the rest of it (PS, PDF, and some MAN). # doxygen-man: Rename some doxygen generated man pages. # doxygen-ps: Generate doxygen PostScript documentation. # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake goals. If # doxygen is used to generate man pages, you can achieve this integration by # setting man3_MANS to the list of man pages generated and then adding the # dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # This is usually added to MOSTLYCLEANFILES. ## --------------------------------- ## ## Format-independent Doxygen rules. ## ## --------------------------------- ## if DX_COND_doc ## ------------------------------- ## ## Rules specific for HTML output. ## ## ------------------------------- ## if DX_COND_html DX_CLEAN_HTML = @DX_DOCDIR@/html endif DX_COND_html ## ------------------------------ ## ## Rules specific for CHM output. ## ## ------------------------------ ## if DX_COND_chm DX_CLEAN_CHM = @DX_DOCDIR@/chm if DX_COND_chi DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi endif DX_COND_chi endif DX_COND_chm ## ------------------------------ ## ## Rules specific for MAN output. ## ## ------------------------------ ## if DX_COND_man DX_CLEAN_MAN = @DX_DOCDIR@/man endif DX_COND_man ## ------------------------------ ## ## Rules specific for RTF output. ## ## ------------------------------ ## if DX_COND_rtf DX_CLEAN_RTF = @DX_DOCDIR@/rtf endif DX_COND_rtf ## ------------------------------ ## ## Rules specific for XML output. ## ## ------------------------------ ## if DX_COND_xml DX_CLEAN_XML = @DX_DOCDIR@/xml endif DX_COND_xml ## ----------------------------- ## ## Rules specific for PS output. ## ## ----------------------------- ## if DX_COND_ps DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps DX_PS_GOAL = doxygen-ps doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag cd @DX_DOCDIR@/latex; \ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ $(DX_LATEX) refman.tex; \ $(MAKEINDEX_PATH) refman.idx; \ $(DX_LATEX) refman.tex; \ countdown=5; \ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ refman.log > /dev/null 2>&1 \ && test $$countdown -gt 0; do \ $(DX_LATEX) refman.tex; \ countdown=`expr $$countdown - 1`; \ done; \ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi endif DX_COND_ps ## ------------------------------ ## ## Rules specific for PDF output. ## ## ------------------------------ ## if DX_COND_pdf DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf DX_PDF_GOAL = doxygen-pdf doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag cd @DX_DOCDIR@/latex; \ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ $(DX_PDFLATEX) refman.tex; \ $(DX_MAKEINDEX) refman.idx; \ $(DX_PDFLATEX) refman.tex; \ countdown=5; \ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ refman.log > /dev/null 2>&1 \ && test $$countdown -gt 0; do \ $(DX_PDFLATEX) refman.tex; \ countdown=`expr $$countdown - 1`; \ done; \ mv refman.pdf ../@PACKAGE@.pdf endif DX_COND_pdf ## ------------------------------------------------- ## ## Rules specific for LaTeX (shared for PS and PDF). ## ## ------------------------------------------------- ## if DX_COND_latex DX_CLEAN_LATEX = @DX_DOCDIR@/latex endif DX_COND_latex .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) rm -rf @DX_DOCDIR@ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) DX_CLEANFILES = \ @DX_DOCDIR@/@PACKAGE@.tag \ -r \ $(DX_CLEAN_HTML) \ $(DX_CLEAN_CHM) \ $(DX_CLEAN_CHI) \ $(DX_CLEAN_MAN) \ $(DX_CLEAN_RTF) \ $(DX_CLEAN_XML) \ $(DX_CLEAN_PS) \ $(DX_CLEAN_PDF) \ $(DX_CLEAN_LATEX) endif DX_COND_doc g2ipmsg-0.9.6+dfsg/autogen.sh000077500000000000000000000111461126724573600160360ustar00rootroot00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. if [ ! -n "$AUTOMAKE" ]; then AUTOMAKE=automake fi if [ ! -n "$AUTOCONF" ]; then AUTOCONF=autoconf fi if [ ! -n "$ACLOCAL" ]; then ACLOCAL=aclocal fi if [ ! -n "$AUTOHEADER" ]; then AUTOHEADER=autoheader fi srcdir=`dirname $0` test -z "$srcdir" && srcdir=. DIE=0 ACLOCAL_FLAGS="-I ./macros" if [ -n "$GNOME2_DIR" ]; then ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" PATH="$GNOME2_DIR/bin:$PATH" export PATH export LD_LIBRARY_PATH fi (test -f $srcdir/configure.in) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level package directory" exit 1 } (${AUTOCONF} --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 } (grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && { (intltoolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`intltool' installed." echo "You can get it from:" echo " ftp://ftp.gnome.org/pub/GNOME/" DIE=1 } } (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && { (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`xml-i18n-toolize' installed." echo "You can get it from:" echo " ftp://ftp.gnome.org/pub/GNOME/" DIE=1 } } (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 } } (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && { (grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \ (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`glib' installed." echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" DIE=1 } } (${AUTOMAKE} --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`${AUTOMAKE}' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 NO_AUTOMAKE=yes } # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (${ACLOCAL} --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: Missing \`aclocal'. The version of \`${AUTOMAKE}'" echo "installed doesn't appear recent enough." echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" DIE=1 } if test "$DIE" -eq 1; then exit 1 fi if test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo \`$0\'" command line." echo fi case $CC in xlc ) am_opt=--include-deps;; esac for coin in `find $srcdir -name configure.in -print` do dr=`dirname $coin` if test -f $dr/NO-AUTO-GEN; then echo skipping $dr -- flagged as no auto-gen else echo processing $dr ( cd $dr aclocalinclude="$ACLOCAL_FLAGS" if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 echo "Running glib-gettextize... Ignore non-fatal messages." echo "no" | glib-gettextize --force --copy echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then echo "Running intltoolize..." intltoolize --copy --force --automake fi if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then echo "Running xml-i18n-toolize..." xml-i18n-toolize --copy --force --automake fi if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then if test -z "$NO_LIBTOOLIZE" ; then echo "Running libtoolize..." libtoolize --force --copy fi fi ${ACLOCAL} $aclocalinclude if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then echo "Running autoheader..." ${AUTOHEADER} fi echo "Running automake --gnu $am_opt ..." ${AUTOMAKE} --add-missing --gnu $am_opt echo "Running autoconf ..." ${AUTOCONF} ) fi done conf_flags="--enable-maintainer-mode" if test x$NOCONFIGURE = x; then echo Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ && echo Now type \`make\' to compile. || exit 1 else echo Skipping configure process. fi g2ipmsg-0.9.6+dfsg/config.guess000077500000000000000000001220651126724573600163600ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-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., 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. # 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 -q "$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 ;' # 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 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # 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 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/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; 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 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; 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 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; 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 0 ;; 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 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; 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 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # 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 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; 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 \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; 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 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????: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 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; 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 0 ;; *: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 $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 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 0 ;; *: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 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 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 # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 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 && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; 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 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` # GNU/FreeBSD systems have a "k" prefix to indicate we are using # FreeBSD's kernel, but not the complete OS. case ${LIBC} in gnu) kernel_only='k' ;; esac echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; 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 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; 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 | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; 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 | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; 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 0 ;; 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 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; 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 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # 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 0 ;; 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 #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; 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 0 ;; 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 0 ;; 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 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; 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 0 ;; i*86:*:5:[78]*) 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 0 ;; 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 0 ;; 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 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; 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 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*: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) 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 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *: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 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; 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 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *: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 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; 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"); 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 && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # 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 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; 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: g2ipmsg-0.9.6+dfsg/config.h.in000066400000000000000000000154411126724573600160620ustar00rootroot00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* datadir */ #undef DATADIR /* enable applet version of g2ipmsg */ #undef ENABLE_APPLET /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Systray enable */ #undef G2IPMSG_SYSTRAY /* Gettext package. */ #undef GETTEXT_PACKAGE /* Glade Resources Directory */ #undef GNOME_GLADEDIR /* Gnome Icon Directory */ #undef GNOME_ICONDIR /* Gnome Pixmaps Directory */ #undef GNOME_PIXMAPSDIR /* Define to 1 if you have the `asctime_r' function. */ #undef HAVE_ASCTIME_R /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `BN_bn2bin' function. */ #undef HAVE_BN_BN2BIN /* Define to 1 if you have the `BN_bn2hex' function. */ #undef HAVE_BN_BN2HEX /* Define to 1 if you have the `BN_free' function. */ #undef HAVE_BN_FREE /* Define to 1 if you have the `BN_hex2bn' function. */ #undef HAVE_BN_HEX2BN /* Define to 1 if you have the `BN_new' function. */ #undef HAVE_BN_NEW /* Define to 1 if you have the `BN_rand' function. */ #undef HAVE_BN_RAND /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the `dirfd' function. */ #undef HAVE_DIRFD /* Define to 1 if you have the `EVP_aes_128_cbc' function. */ #undef HAVE_EVP_AES_128_CBC /* Define to 1 if you have the `EVP_aes_192_cbc' function. */ #undef HAVE_EVP_AES_192_CBC /* Define to 1 if you have the `EVP_aes_256_cbc' function. */ #undef HAVE_EVP_AES_256_CBC /* Define to 1 if you have the `EVP_bf_cbc' function. */ #undef HAVE_EVP_BF_CBC /* Define to 1 if you have the `EVP_CIPHER_CTX_block_size' function. */ #undef HAVE_EVP_CIPHER_CTX_BLOCK_SIZE /* Define to 1 if you have the `EVP_CIPHER_CTX_cleanup' function. */ #undef HAVE_EVP_CIPHER_CTX_CLEANUP /* Define to 1 if you have the `EVP_DecryptInit' function. */ #undef HAVE_EVP_DECRYPTINIT /* Define to 1 if you have the `EVP_des_ede_cbc' function. */ #undef HAVE_EVP_DES_EDE_CBC /* Define to 1 if you have the `EVP_EncryptFinal' function. */ #undef HAVE_EVP_ENCRYPTFINAL /* Define to 1 if you have the `EVP_EncryptInit' function. */ #undef HAVE_EVP_ENCRYPTINIT /* Define to 1 if you have the `EVP_EncryptUpdate' function. */ #undef HAVE_EVP_ENCRYPTUPDATE /* Define to 1 if you have the `EVP_rc2_cbc' function. */ #undef HAVE_EVP_RC2_CBC /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Gstreamer */ #undef HAVE_GST /* Define to 1 if you have the `HMAC_CTX_cleanup' function. */ #undef HAVE_HMAC_CTX_CLEANUP /* Define to 1 if you have the `HMAC_CTX_init' function. */ #undef HAVE_HMAC_CTX_INIT /* Define to 1 if you have the `HMAC_Final' function. */ #undef HAVE_HMAC_FINAL /* Define to 1 if you have the `HMAC_Init' function. */ #undef HAVE_HMAC_INIT /* Define to 1 if you have the `HMAC_Update' function. */ #undef HAVE_HMAC_UPDATE /* 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_LIBINTL_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_BN_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_CRYPTO_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_EVP_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_RAND_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_RSA_H /* Define to 1 if you have the `PEM_read_RSAPrivateKey' function. */ #undef HAVE_PEM_READ_RSAPRIVATEKEY /* Define to 1 if you have the `PEM_read_RSAPublicKey' function. */ #undef HAVE_PEM_READ_RSAPUBLICKEY /* Define to 1 if you have the `PEM_write_RSAPrivateKey' function. */ #undef HAVE_PEM_WRITE_RSAPRIVATEKEY /* Define to 1 if you have the `PEM_write_RSAPublicKey' function. */ #undef HAVE_PEM_WRITE_RSAPUBLICKEY /* Define to 1 if you have the `RAND_bytes' function. */ #undef HAVE_RAND_BYTES /* Define to 1 if you have the `RAND_poll' function. */ #undef HAVE_RAND_POLL /* Define to 1 if you have the `RAND_seed' function. */ #undef HAVE_RAND_SEED /* Define to 1 if you have the `RAND_status' function. */ #undef HAVE_RAND_STATUS /* Define to 1 if you have the `RSA_check_key' function. */ #undef HAVE_RSA_CHECK_KEY /* Define to 1 if you have the `RSA_free' function. */ #undef HAVE_RSA_FREE /* Define to 1 if you have the `RSA_new' function. */ #undef HAVE_RSA_NEW /* Define to 1 if you have the `RSA_private_decrypt' function. */ #undef HAVE_RSA_PRIVATE_DECRYPT /* Define to 1 if you have the `RSA_public_encrypt' function. */ #undef HAVE_RSA_PUBLIC_ENCRYPT /* Define to 1 if you have the `RSA_sign' function. */ #undef HAVE_RSA_SIGN /* Define to 1 if you have the `RSA_size' function. */ #undef HAVE_RSA_SIZE /* 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 header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* External code set. */ #undef IPMSG_EXTERNAL_CHARCODE /* IPMSG UTF-8 extension support enable */ #undef IPMSG_UTF8_SUPPORT /* libdir */ #undef LIBDIR /* 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 /* install prefix */ #undef PREFIX /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* sysconfdir */ #undef SYSCONFDIR /* if DBUS and glib bindings is in use */ #undef USE_DBUS /* if gnomescreensaver interaction is in use */ #undef USE_GNOME_SCREENSAVER /* if OpenSSL is in use */ #undef USE_OPENSSL /* Version number of package */ #undef VERSION /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES g2ipmsg-0.9.6+dfsg/config.sub000077500000000000000000000731531126724573600160260ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-07-04' # 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., 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. # 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 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 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # 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 0;; * ) 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* | kfreebsd*-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) 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 ;; -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/'` ;; -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] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | 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) ;; # 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]-* | amd64-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | 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-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | 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 ;; 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 ;; 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 ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; 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 ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; 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 ;; 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 ;; 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 ;; 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 ;; 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 ;; 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 ;; 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 ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) 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* | -netbsd* | -openbsd* | -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* | -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*) # 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* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -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 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -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 ;; -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 ;; -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 *-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 ;; *-ibm) os=-aix ;; *-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 ;; -ptx*) vendor=sequent ;; -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 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: g2ipmsg-0.9.6+dfsg/configure000077500000000000000000014652171126724573600157610ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for g2ipmsg 0.9.6. # # Report bugs to . # # 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'" 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='g2ipmsg' PACKAGE_TARNAME='g2ipmsg' PACKAGE_VERSION='0.9.6' PACKAGE_STRING='g2ipmsg 0.9.6' PACKAGE_BUGREPORT='http://www.ipmsg.org/index.html.en' ac_unique_file="src/main.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 DX_PROJECT DX_CONFIG DX_DOCDIR DX_ENV DX_FLAG_doc DX_DOXYGEN DX_FLAG_[]DX_CURRENT_FEATURE DX_PERL DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_doc_TRUE DX_COND_doc_FALSE DX_FLAG_dot DX_FLAG_[]DX_CURRENT_FEATURE DX_DOT DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_dot_TRUE DX_COND_dot_FALSE DX_FLAG_man DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_man_TRUE DX_COND_man_FALSE DX_FLAG_rtf DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_rtf_TRUE DX_COND_rtf_FALSE DX_FLAG_xml DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_xml_TRUE DX_COND_xml_FALSE DX_FLAG_chm DX_FLAG_[]DX_CURRENT_FEATURE DX_HHC DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_chm_TRUE DX_COND_chm_FALSE DX_FLAG_chi DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_chi_TRUE DX_COND_chi_FALSE DX_FLAG_html DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_html_TRUE DX_COND_html_FALSE DX_FLAG_ps DX_FLAG_[]DX_CURRENT_FEATURE DX_LATEX DX_FLAG_[]DX_CURRENT_FEATURE DX_MAKEINDEX DX_FLAG_[]DX_CURRENT_FEATURE DX_DVIPS DX_FLAG_[]DX_CURRENT_FEATURE DX_EGREP DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_ps_TRUE DX_COND_ps_FALSE DX_FLAG_pdf DX_FLAG_[]DX_CURRENT_FEATURE DX_PDFLATEX DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_FLAG_[]DX_CURRENT_FEATURE DX_COND_pdf_TRUE DX_COND_pdf_FALSE DX_COND_latex_TRUE DX_COND_latex_FALSE DOXYGEN_PAPER_SIZE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_PROP_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XAM_RULE INTLTOOL_KBD_RULE INTLTOOL_XML_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_CAVES_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_THEME_RULE INTLTOOL_SERVICE_RULE INTLTOOL_POLICY_RULE XGETTEXT MSGMERGE MSGFMT INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL ALL_LINGUAS DATADIRNAME CPP GREP EGREP GETTEXT_PACKAGE PKGCONFIG OPENSSL_ENABLED_TRUE OPENSSL_ENABLED_FALSE PKG_CONFIG G2IPMSG_CFLAGS G2IPMSG_LIBS DBUSGLIB_CFLAGS DBUSGLIB_LIBS DBUSGLIB_ENABLED DBUSGLIB_ENABLED_TRUE DBUSGLIB_ENABLED_FALSE GNOME_SCREENSAVER_ENABLED GNOME_SCREENSAVER_ENABLED_TRUE GNOME_SCREENSAVER_ENABLED_FALSE SYSTRAY_CFLAGS SYSTRAY_LIBS GCONF_SCHEMAS_INSTALL_TRUE GCONF_SCHEMAS_INSTALL_FALSE APPLET_CFLAGS APPLET_LIBS ENABLE_APPLET_TRUE ENABLE_APPLET_FALSE ICONV IPMSG_EXTERNAL_CHARCODE iconsdir pixmapsdir pkgdatadir gladedir PREFIX LIBDIR DATADIR SYSCONFDIR GNOME_ICONDIR GNOME_PIXMAPSDIR GNOME_GLADEDIR USE_NLS MSGFMT_OPTS GMSGFMT CATALOGS CATOBJEXT GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS GCONF_SCHEMA_CONFIG_SOURCE GCONF_SCHEMA_FILE_DIR GST_CFLAGS GST_LIBS PACKAGE_CFLAGS PACKAGE_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias DOXYGEN_PAPER_SIZE CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG G2IPMSG_CFLAGS G2IPMSG_LIBS DBUSGLIB_CFLAGS DBUSGLIB_LIBS SYSTRAY_CFLAGS SYSTRAY_LIBS APPLET_CFLAGS APPLET_LIBS GST_CFLAGS GST_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_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_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 g2ipmsg 0.9.6 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/g2ipmsg] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of g2ipmsg 0.9.6:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-doxygen-doc don't generate any doxygen documentation --disable-doxygen-dot don't generate graphics for doxygen documentation --enable-doxygen-man generate doxygen manual pages --enable-doxygen-rtf generate doxygen RTF documentation --enable-doxygen-xml generate doxygen XML documentation --enable-doxygen-chm generate doxygen compressed HTML help documentation --enable-doxygen-chi generate doxygen seperate compressed HTML help index file --disable-doxygen-html don't generate doxygen plain HTML documentation --enable-doxygen-ps generate doxygen PostScript documentation --enable-doxygen-pdf generate doxygen PDF documentation --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files --enable-dbus-glib D-BUS GLib interface (required for GNOME screensaver support) --enable-gnome-screensaver GNOME screensaver interaction support [default yes] --enable-systray build g2ipmsg application as systray support [default yes] --enable-utf-8 IPMSG UTF-8 extension support(experimental) --disable-schemas-install Disable the schemas installation --enable-applet trun on building applet version [default yes] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-ssl=PATH where to look for OpenSSL, PATH points to the OpenSSL installation (default: /usr/local/ssl) --without-ssl disable OpenSSL --with-ext-charcode External character code setting(CP936(Simplified Chinese), CP932(Japanese Windows ShiftJIS)) [default=CP932] --with-gconf-source=sourceaddress Config database for installing schema files. --with-gconf-schema-file-dir=dir Directory for installing schema files. Some influential environment variables: DOXYGEN_PAPER_SIZE a4wide (default), a4, letter, legal or executive 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 PKG_CONFIG path to pkg-config utility G2IPMSG_CFLAGS C compiler flags for G2IPMSG, overriding pkg-config G2IPMSG_LIBS linker flags for G2IPMSG, overriding pkg-config DBUSGLIB_CFLAGS C compiler flags for DBUSGLIB, overriding pkg-config DBUSGLIB_LIBS linker flags for DBUSGLIB, overriding pkg-config SYSTRAY_CFLAGS C compiler flags for SYSTRAY, overriding pkg-config SYSTRAY_LIBS linker flags for SYSTRAY, overriding pkg-config APPLET_CFLAGS C compiler flags for APPLET, overriding pkg-config APPLET_LIBS linker flags for APPLET, overriding pkg-config GST_CFLAGS C compiler flags for GST, overriding pkg-config GST_LIBS linker flags for GST, 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. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || 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 g2ipmsg configure 0.9.6 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 g2ipmsg $as_me 0.9.6, 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 # Files: DX_PROJECT=g2ipmsg DX_CONFIG=doc/Doxyfile DX_DOCDIR=doc/internal # Environment variables used inside doxygen.cfg: DX_ENV="$DX_ENV SRCDIR='$srcdir'" DX_ENV="$DX_ENV PROJECT='$DX_PROJECT'" DX_ENV="$DX_ENV DOCDIR='$DX_DOCDIR'" DX_ENV="$DX_ENV VERSION='$PACKAGE_VERSION'" # Doxygen itself: # Check whether --enable-doxygen-doc was given. if test "${enable_doxygen_doc+set}" = set; then enableval=$enable_doxygen_doc; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_doc=1 ;; #( n|N|no|No|NO) DX_FLAG_doc=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-doc" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-doc" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_doc=1 fi if test "$DX_FLAG_doc" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}doxygen", so it can be a program name with args. set dummy ${ac_tool_prefix}doxygen; 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_DX_DOXYGEN+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOXYGEN="$DX_DOXYGEN" # 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_DX_DOXYGEN="$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 DX_DOXYGEN=$ac_cv_path_DX_DOXYGEN if test -n "$DX_DOXYGEN"; then { echo "$as_me:$LINENO: result: $DX_DOXYGEN" >&5 echo "${ECHO_T}$DX_DOXYGEN" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_DOXYGEN"; then ac_pt_DX_DOXYGEN=$DX_DOXYGEN # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; 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_DX_DOXYGEN+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOXYGEN="$ac_pt_DX_DOXYGEN" # 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_DX_DOXYGEN="$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_DX_DOXYGEN=$ac_cv_path_ac_pt_DX_DOXYGEN if test -n "$ac_pt_DX_DOXYGEN"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_DOXYGEN" >&5 echo "${ECHO_T}$ac_pt_DX_DOXYGEN" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_DOXYGEN" = x; then DX_DOXYGEN="" 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 DX_DOXYGEN=$ac_pt_DX_DOXYGEN fi else DX_DOXYGEN="$ac_cv_path_DX_DOXYGEN" fi if test "$DX_FLAG_doc$DX_DOXYGEN" = 1; then { echo "$as_me:$LINENO: WARNING: doxygen not found - will not generate any doxygen documentation" >&5 echo "$as_me: WARNING: doxygen not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}perl", so it can be a program name with args. set dummy ${ac_tool_prefix}perl; 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_DX_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PERL="$DX_PERL" # 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_DX_PERL="$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 DX_PERL=$ac_cv_path_DX_PERL if test -n "$DX_PERL"; then { echo "$as_me:$LINENO: result: $DX_PERL" >&5 echo "${ECHO_T}$DX_PERL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_PERL"; then ac_pt_DX_PERL=$DX_PERL # Extract the first word of "perl", so it can be a program name with args. set dummy perl; 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_DX_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PERL="$ac_pt_DX_PERL" # 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_DX_PERL="$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_DX_PERL=$ac_cv_path_ac_pt_DX_PERL if test -n "$ac_pt_DX_PERL"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_PERL" >&5 echo "${ECHO_T}$ac_pt_DX_PERL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_PERL" = x; then DX_PERL="" 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 DX_PERL=$ac_pt_DX_PERL fi else DX_PERL="$ac_cv_path_DX_PERL" fi if test "$DX_FLAG_doc$DX_PERL" = 1; then { echo "$as_me:$LINENO: WARNING: perl not found - will not generate any doxygen documentation" >&5 echo "$as_me: WARNING: perl not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi : fi if test "$DX_FLAG_doc" = 1; then if :; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi DX_ENV="$DX_ENV PERL_PATH='$DX_PERL'" : else if false; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi : fi # Dot for graphics: # Check whether --enable-doxygen-dot was given. if test "${enable_doxygen_dot+set}" = set; then enableval=$enable_doxygen_dot; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_dot=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-dot requires doxygen-dot" >&5 echo "$as_me: error: doxygen-dot requires doxygen-dot" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_dot=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-dot" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-dot" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_dot=1 test "$DX_FLAG_doc" = "1" || DX_FLAG_dot=0 fi if test "$DX_FLAG_dot" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dot", so it can be a program name with args. set dummy ${ac_tool_prefix}dot; 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_DX_DOT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOT="$DX_DOT" # 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_DX_DOT="$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 DX_DOT=$ac_cv_path_DX_DOT if test -n "$DX_DOT"; then { echo "$as_me:$LINENO: result: $DX_DOT" >&5 echo "${ECHO_T}$DX_DOT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_DOT"; then ac_pt_DX_DOT=$DX_DOT # Extract the first word of "dot", so it can be a program name with args. set dummy dot; 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_DX_DOT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOT="$ac_pt_DX_DOT" # 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_DX_DOT="$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_DX_DOT=$ac_cv_path_ac_pt_DX_DOT if test -n "$ac_pt_DX_DOT"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_DOT" >&5 echo "${ECHO_T}$ac_pt_DX_DOT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_DOT" = x; then DX_DOT="" 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 DX_DOT=$ac_pt_DX_DOT fi else DX_DOT="$ac_cv_path_DX_DOT" fi if test "$DX_FLAG_dot$DX_DOT" = 1; then { echo "$as_me:$LINENO: WARNING: dot not found - will not generate graphics for doxygen documentation" >&5 echo "$as_me: WARNING: dot not found - will not generate graphics for doxygen documentation" >&2;} DX_FLAG_dot=0 fi : fi if test "$DX_FLAG_dot" = 1; then if :; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi DX_ENV="$DX_ENV HAVE_DOT='YES'" DX_ENV="$DX_ENV DOT_PATH='`expr ".$DX_DOT" : '\(\.\)[^/]*$' \| "x$DX_DOT" : 'x\(.*\)/[^/]*$'`'" : else if false; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi DX_ENV="$DX_ENV HAVE_DOT='NO'" : fi # Man pages generation: # Check whether --enable-doxygen-man was given. if test "${enable_doxygen_man+set}" = set; then enableval=$enable_doxygen_man; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_man=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-man requires doxygen-man" >&5 echo "$as_me: error: doxygen-man requires doxygen-man" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_man=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-man" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-man" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_man=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_man=0 fi if test "$DX_FLAG_man" = 1; then : fi if test "$DX_FLAG_man" = 1; then if :; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi DX_ENV="$DX_ENV GENERATE_MAN='YES'" : else if false; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi DX_ENV="$DX_ENV GENERATE_MAN='NO'" : fi # RTF file generation: # Check whether --enable-doxygen-rtf was given. if test "${enable_doxygen_rtf+set}" = set; then enableval=$enable_doxygen_rtf; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_rtf=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-rtf requires doxygen-rtf" >&5 echo "$as_me: error: doxygen-rtf requires doxygen-rtf" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_rtf=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-rtf" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-rtf" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_rtf=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_rtf=0 fi if test "$DX_FLAG_rtf" = 1; then : fi if test "$DX_FLAG_rtf" = 1; then if :; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi DX_ENV="$DX_ENV GENERATE_RTF='YES'" : else if false; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi DX_ENV="$DX_ENV GENERATE_RTF='NO'" : fi # XML file generation: # Check whether --enable-doxygen-xml was given. if test "${enable_doxygen_xml+set}" = set; then enableval=$enable_doxygen_xml; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_xml=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-xml requires doxygen-xml" >&5 echo "$as_me: error: doxygen-xml requires doxygen-xml" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_xml=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-xml" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-xml" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_xml=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_xml=0 fi if test "$DX_FLAG_xml" = 1; then : fi if test "$DX_FLAG_xml" = 1; then if :; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi DX_ENV="$DX_ENV GENERATE_XML='YES'" : else if false; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi DX_ENV="$DX_ENV GENERATE_XML='NO'" : fi # (Compressed) HTML help generation: # Check whether --enable-doxygen-chm was given. if test "${enable_doxygen_chm+set}" = set; then enableval=$enable_doxygen_chm; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chm=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-chm requires doxygen-chm" >&5 echo "$as_me: error: doxygen-chm requires doxygen-chm" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_chm=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-chm" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-chm" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_chm=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_chm=0 fi if test "$DX_FLAG_chm" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}hhc", so it can be a program name with args. set dummy ${ac_tool_prefix}hhc; 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_DX_HHC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_DX_HHC="$DX_HHC" # 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_DX_HHC="$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 DX_HHC=$ac_cv_path_DX_HHC if test -n "$DX_HHC"; then { echo "$as_me:$LINENO: result: $DX_HHC" >&5 echo "${ECHO_T}$DX_HHC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_HHC"; then ac_pt_DX_HHC=$DX_HHC # Extract the first word of "hhc", so it can be a program name with args. set dummy hhc; 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_DX_HHC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_HHC="$ac_pt_DX_HHC" # 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_DX_HHC="$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_DX_HHC=$ac_cv_path_ac_pt_DX_HHC if test -n "$ac_pt_DX_HHC"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_HHC" >&5 echo "${ECHO_T}$ac_pt_DX_HHC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_HHC" = x; then DX_HHC="" 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 DX_HHC=$ac_pt_DX_HHC fi else DX_HHC="$ac_cv_path_DX_HHC" fi if test "$DX_FLAG_chm$DX_HHC" = 1; then { echo "$as_me:$LINENO: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&5 echo "$as_me: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&2;} DX_FLAG_chm=0 fi : fi if test "$DX_FLAG_chm" = 1; then if :; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi DX_ENV="$DX_ENV HHC_PATH='$DX_HHC'" DX_ENV="$DX_ENV GENERATE_HTML='YES'" DX_ENV="$DX_ENV GENERATE_HTMLHELP='YES'" : else if false; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi DX_ENV="$DX_ENV GENERATE_HTMLHELP='NO'" : fi # Seperate CHI file generation. # Check whether --enable-doxygen-chi was given. if test "${enable_doxygen_chi+set}" = set; then enableval=$enable_doxygen_chi; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chi=1 test "$DX_FLAG_chm" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-chi requires doxygen-chi" >&5 echo "$as_me: error: doxygen-chi requires doxygen-chi" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_chi=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-chi" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-chi" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_chi=0 test "$DX_FLAG_chm" = "1" || DX_FLAG_chi=0 fi if test "$DX_FLAG_chi" = 1; then : fi if test "$DX_FLAG_chi" = 1; then if :; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi DX_ENV="$DX_ENV GENERATE_CHI='YES'" : else if false; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi DX_ENV="$DX_ENV GENERATE_CHI='NO'" : fi # Plain HTML pages generation: # Check whether --enable-doxygen-html was given. if test "${enable_doxygen_html+set}" = set; then enableval=$enable_doxygen_html; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-html requires doxygen-html" >&5 echo "$as_me: error: doxygen-html requires doxygen-html" >&2;} { (exit 1); exit 1; }; } test "$DX_FLAG_chm" = "0" \ || { { echo "$as_me:$LINENO: error: doxygen-html contradicts doxygen-html" >&5 echo "$as_me: error: doxygen-html contradicts doxygen-html" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_html=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-html" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-html" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" || DX_FLAG_html=0 test "$DX_FLAG_chm" = "0" || DX_FLAG_html=0 fi if test "$DX_FLAG_html" = 1; then : fi if test "$DX_FLAG_html" = 1; then if :; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi DX_ENV="$DX_ENV GENERATE_HTML='YES'" : else if false; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi test "$DX_FLAG_chm" = 1 || DX_ENV="$DX_ENV GENERATE_HTML='NO'" : fi # PostScript file generation: # Check whether --enable-doxygen-ps was given. if test "${enable_doxygen_ps+set}" = set; then enableval=$enable_doxygen_ps; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_ps=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-ps requires doxygen-ps" >&5 echo "$as_me: error: doxygen-ps requires doxygen-ps" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_ps=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-ps" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-ps" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_ps=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_ps=0 fi if test "$DX_FLAG_ps" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}platex", so it can be a program name with args. set dummy ${ac_tool_prefix}platex; 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_DX_LATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_LATEX="$DX_LATEX" # 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_DX_LATEX="$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 DX_LATEX=$ac_cv_path_DX_LATEX if test -n "$DX_LATEX"; then { echo "$as_me:$LINENO: result: $DX_LATEX" >&5 echo "${ECHO_T}$DX_LATEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_LATEX"; then ac_pt_DX_LATEX=$DX_LATEX # Extract the first word of "platex", so it can be a program name with args. set dummy platex; 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_DX_LATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_LATEX="$ac_pt_DX_LATEX" # 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_DX_LATEX="$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_DX_LATEX=$ac_cv_path_ac_pt_DX_LATEX if test -n "$ac_pt_DX_LATEX"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_LATEX" >&5 echo "${ECHO_T}$ac_pt_DX_LATEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_LATEX" = x; then DX_LATEX="" 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 DX_LATEX=$ac_pt_DX_LATEX fi else DX_LATEX="$ac_cv_path_DX_LATEX" fi if test "$DX_FLAG_ps$DX_LATEX" = 1; then { echo "$as_me:$LINENO: WARNING: platex not found - will not generate doxygen PostScript documentation" >&5 echo "$as_me: WARNING: platex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; 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_DX_MAKEINDEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # 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_DX_MAKEINDEX="$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 DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then { echo "$as_me:$LINENO: result: $DX_MAKEINDEX" >&5 echo "${ECHO_T}$DX_MAKEINDEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; 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_DX_MAKEINDEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # 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_DX_MAKEINDEX="$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_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_MAKEINDEX" >&5 echo "${ECHO_T}$ac_pt_DX_MAKEINDEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then DX_MAKEINDEX="" 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 DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX fi else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_ps$DX_MAKEINDEX" = 1; then { echo "$as_me:$LINENO: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&5 echo "$as_me: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dvips", so it can be a program name with args. set dummy ${ac_tool_prefix}dvips; 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_DX_DVIPS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DVIPS="$DX_DVIPS" # 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_DX_DVIPS="$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 DX_DVIPS=$ac_cv_path_DX_DVIPS if test -n "$DX_DVIPS"; then { echo "$as_me:$LINENO: result: $DX_DVIPS" >&5 echo "${ECHO_T}$DX_DVIPS" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_DVIPS"; then ac_pt_DX_DVIPS=$DX_DVIPS # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; 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_DX_DVIPS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DVIPS="$ac_pt_DX_DVIPS" # 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_DX_DVIPS="$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_DX_DVIPS=$ac_cv_path_ac_pt_DX_DVIPS if test -n "$ac_pt_DX_DVIPS"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_DVIPS" >&5 echo "${ECHO_T}$ac_pt_DX_DVIPS" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_DVIPS" = x; then DX_DVIPS="" 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 DX_DVIPS=$ac_pt_DX_DVIPS fi else DX_DVIPS="$ac_cv_path_DX_DVIPS" fi if test "$DX_FLAG_ps$DX_DVIPS" = 1; then { echo "$as_me:$LINENO: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&5 echo "$as_me: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; 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_DX_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # 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_DX_EGREP="$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 DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then { echo "$as_me:$LINENO: result: $DX_EGREP" >&5 echo "${ECHO_T}$DX_EGREP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; 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_DX_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # 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_DX_EGREP="$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_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_EGREP" >&5 echo "${ECHO_T}$ac_pt_DX_EGREP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then DX_EGREP="" 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 DX_EGREP=$ac_pt_DX_EGREP fi else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_ps$DX_EGREP" = 1; then { echo "$as_me:$LINENO: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&5 echo "$as_me: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi : fi if test "$DX_FLAG_ps" = 1; then if :; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi : else if false; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi : fi # PDF file generation: # Check whether --enable-doxygen-pdf was given. if test "${enable_doxygen_pdf+set}" = set; then enableval=$enable_doxygen_pdf; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_pdf=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-pdf requires doxygen-pdf" >&5 echo "$as_me: error: doxygen-pdf requires doxygen-pdf" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_pdf=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-pdf" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-pdf" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_pdf=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_pdf=0 fi if test "$DX_FLAG_pdf" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pdflatex", so it can be a program name with args. set dummy ${ac_tool_prefix}pdflatex; 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_DX_PDFLATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PDFLATEX="$DX_PDFLATEX" # 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_DX_PDFLATEX="$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 DX_PDFLATEX=$ac_cv_path_DX_PDFLATEX if test -n "$DX_PDFLATEX"; then { echo "$as_me:$LINENO: result: $DX_PDFLATEX" >&5 echo "${ECHO_T}$DX_PDFLATEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_PDFLATEX"; then ac_pt_DX_PDFLATEX=$DX_PDFLATEX # Extract the first word of "pdflatex", so it can be a program name with args. set dummy pdflatex; 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_DX_PDFLATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PDFLATEX="$ac_pt_DX_PDFLATEX" # 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_DX_PDFLATEX="$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_DX_PDFLATEX=$ac_cv_path_ac_pt_DX_PDFLATEX if test -n "$ac_pt_DX_PDFLATEX"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_PDFLATEX" >&5 echo "${ECHO_T}$ac_pt_DX_PDFLATEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_PDFLATEX" = x; then DX_PDFLATEX="" 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 DX_PDFLATEX=$ac_pt_DX_PDFLATEX fi else DX_PDFLATEX="$ac_cv_path_DX_PDFLATEX" fi if test "$DX_FLAG_pdf$DX_PDFLATEX" = 1; then { echo "$as_me:$LINENO: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&5 echo "$as_me: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; 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_DX_MAKEINDEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # 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_DX_MAKEINDEX="$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 DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then { echo "$as_me:$LINENO: result: $DX_MAKEINDEX" >&5 echo "${ECHO_T}$DX_MAKEINDEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; 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_DX_MAKEINDEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # 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_DX_MAKEINDEX="$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_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_MAKEINDEX" >&5 echo "${ECHO_T}$ac_pt_DX_MAKEINDEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then DX_MAKEINDEX="" 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 DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX fi else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_pdf$DX_MAKEINDEX" = 1; then { echo "$as_me:$LINENO: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&5 echo "$as_me: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; 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_DX_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # 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_DX_EGREP="$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 DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then { echo "$as_me:$LINENO: result: $DX_EGREP" >&5 echo "${ECHO_T}$DX_EGREP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; 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_DX_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # 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_DX_EGREP="$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_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then { echo "$as_me:$LINENO: result: $ac_pt_DX_EGREP" >&5 echo "${ECHO_T}$ac_pt_DX_EGREP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then DX_EGREP="" 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 DX_EGREP=$ac_pt_DX_EGREP fi else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_pdf$DX_EGREP" = 1; then { echo "$as_me:$LINENO: WARNING: egrep not found - will not generate doxygen PDF documentation" >&5 echo "$as_me: WARNING: egrep not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi : fi if test "$DX_FLAG_pdf" = 1; then if :; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi : else if false; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi : fi # LaTeX generation for PS and/or PDF: if test "$DX_FLAG_ps" = 1 || test "$DX_FLAG_pdf" = 1; then if :; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi DX_ENV="$DX_ENV GENERATE_LATEX='YES'" else if false; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi DX_ENV="$DX_ENV GENERATE_LATEX='NO'" fi # Paper size for PS and/or PDF: case "$DOXYGEN_PAPER_SIZE" in #( "") DOXYGEN_PAPER_SIZE="" ;; #( a4wide|a4|letter|legal|executive) DX_ENV="$DX_ENV PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" ;; #( *) { { echo "$as_me:$LINENO: error: unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" >&5 echo "$as_me: error: unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" >&2;} { (exit 1); exit 1; }; } ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV am__api_version='1.10' 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. # 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 > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { 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" = conftest.file ) 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 { 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 # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { 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 rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { 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 fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=g2ipmsg VERSION=0.9.6 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { 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 fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' { 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_config_headers="$ac_config_headers config.h" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi 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 depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { 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 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); } { 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 depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=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); } { 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 depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc case "$am__api_version" in 1.01234) { { echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5 echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;} { (exit 1); exit 1; }; } ;; *) ;; esac if test -n "0.31"; then { echo "$as_me:$LINENO: checking for intltool >= 0.31" >&5 echo $ECHO_N "checking for intltool >= 0.31... $ECHO_C" >&6; } INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.31 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in` INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in` { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5 echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; } test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.31 or later." >&5 echo "$as_me: error: Your intltool is too old. You need intltool 0.31 or later." >&2;} { (exit 1); exit 1; }; } fi INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@' INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@' INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@' # Check the gettext tools to make sure they are GNU # 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. ;; *) 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_XGETTEXT="$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 XGETTEXT=$ac_cv_path_XGETTEXT if test -n "$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 # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; 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_MSGMERGE+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MSGMERGE in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # 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_MSGMERGE="$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 MSGMERGE=$ac_cv_path_MSGMERGE if test -n "$MSGMERGE"; then { echo "$as_me:$LINENO: result: $MSGMERGE" >&5 echo "${ECHO_T}$MSGMERGE" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # 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. ;; *) 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_MSGFMT="$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 MSGFMT=$ac_cv_path_MSGFMT if test -n "$MSGFMT"; 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 -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi # Use the tools built into the package, not the ones that are installed. INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract' INTLTOOL_MERGE='$(top_builddir)/intltool-merge' INTLTOOL_UPDATE='$(top_builddir)/intltool-update' # Extract the first word of "perl", so it can be a program name with args. set dummy perl; 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_INTLTOOL_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $INTLTOOL_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # 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_INTLTOOL_PERL="$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 INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL if test -n "$INTLTOOL_PERL"; then { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5 echo "${ECHO_T}$INTLTOOL_PERL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$INTLTOOL_PERL"; then { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5 echo "$as_me: error: perl not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5 echo "$as_me: error: perl 5.x required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test "x" != "xno-xml"; then { echo "$as_me:$LINENO: checking for XML::Parser" >&5 echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; } if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } else { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5 echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;} { (exit 1); exit 1; }; } fi fi # Substitute ALL_LINGUAS so we can use it in po/Makefile # Set DATADIRNAME correctly if it is not set yet # (copied from glib-gettext.m4) if test -z "$DATADIRNAME"; then 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 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 DATADIRNAME=share else DATADIRNAME=lib fi ;; *) DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_config_commands="$ac_config_commands intltool" 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 { 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" { 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 # 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 GETTEXT_PACKAGE=g2ipmsg cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXTPACKAGE" _ACEOF # 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 libintl.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;} ( cat <<\_ASBOX ## ------------------------------------------------- ## ## Report this to http://www.ipmsg.org/index.html.en ## ## ------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 for ac_func in dirfd 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 for ac_func in asctime_r localtime_r 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 OPT_SSL=off ca="no" OPENSSL_ENABLED="no" # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then withval=$with_ssl; OPT_SSL=$withval fi if test X"$OPT_SSL" != Xno; then CLEANLDFLAGS="$LDFLAGS" CLEANCPPFLAGS="$CPPFLAGS" CLEANLIBS="$LIBS" SSL_LDFLAGS="" SSL_CPPFLAGS="" SSL_LIBS="" case "$OPT_SSL" in yes) if test x$cross_compiling != xyes; then PKGTEST="yes" fi PREFIX_OPENSSL=/usr/local/ssl LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" ;; off) if test x$cross_compiling != xyes; then PKGTEST="yes" fi PREFIX_OPENSSL= ;; *) PKGTEST="no" PREFIX_OPENSSL=$OPT_SSL LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" SSL_LDFLAGS="-L$LIB_OPENSSL" SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" ;; esac if test "$PKGTEST" = "yes"; then # 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_PKGCONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKGCONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/usr/bin:/usr/local/bin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKGCONFIG="$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_PKGCONFIG" && ac_cv_path_PKGCONFIG="no" ;; esac fi PKGCONFIG=$ac_cv_path_PKGCONFIG if test -n "$PKGCONFIG"; then { echo "$as_me:$LINENO: result: $PKGCONFIG" >&5 echo "${ECHO_T}$PKGCONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$PKGCONFIG" != "no" ; then { echo "$as_me:$LINENO: checking OpenSSL options with pkg-config" >&5 echo $ECHO_N "checking OpenSSL options with pkg-config... $ECHO_C" >&6; } $PKGCONFIG --exists openssl SSL_EXISTS=$? if test "$SSL_EXISTS" -eq "0"; then SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null` SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null` SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null` LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'` LIBS="$LIBS $SSL_LIBS" { echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi { echo "$as_me:$LINENO: checking for gdi32" >&5 echo $ECHO_N "checking for gdi32... $ECHO_C" >&6; } my_ac_save_LIBS=$LIBS LIBS="-lgdi32 $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 () { GdiFlush(); ; 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; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$my_ac_save_LIBS { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext { echo "$as_me:$LINENO: checking for CRYPTO_lock in -lcrypto" >&5 echo $ECHO_N "checking for CRYPTO_lock in -lcrypto... $ECHO_C" >&6; } if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $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 CRYPTO_lock (); int main () { return CRYPTO_lock (); ; 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_crypto_CRYPTO_lock=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_crypto_CRYPTO_lock=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_crypto_CRYPTO_lock" >&5 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_lock" >&6; } if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then HAVECRYPTO="yes" LIBS="-lcrypto $LIBS" else LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL" CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" { echo "$as_me:$LINENO: checking for CRYPTO_add_lock in -lcrypto" >&5 echo $ECHO_N "checking for CRYPTO_add_lock in -lcrypto... $ECHO_C" >&6; } if test "${ac_cv_lib_crypto_CRYPTO_add_lock+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $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 CRYPTO_add_lock (); int main () { return CRYPTO_add_lock (); ; 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_crypto_CRYPTO_add_lock=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_crypto_CRYPTO_add_lock=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_crypto_CRYPTO_add_lock" >&5 echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_add_lock" >&6; } if test $ac_cv_lib_crypto_CRYPTO_add_lock = yes; then HAVECRYPTO="yes" LIBS="-lcrypto $LIBS" else LDFLAGS="$CLEANLDFLAGS" CPPFLAGS="$CLEANCPPFLAGS" LIBS="$CLEANLIBS" fi fi if test X"$HAVECRYPTO" = X"yes"; then for ac_header in openssl/rsa.h openssl/crypto.h \ openssl/rand.h openssl/evp.h openssl/bn.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;} ( cat <<\_ASBOX ## ------------------------------------------------- ## ## Report this to http://www.ipmsg.org/index.html.en ## ## ------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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 OPENSSL_ENABLED=y cat >>confdefs.h <<\_ACEOF #define USE_OPENSSL _ACEOF fi done if test X"$OPT_SSL" != Xoff && test "$OPENSSL_ENABLED" != "y"; then { { echo "$as_me:$LINENO: error: OpenSSL libs and/or directories were not found where specified!" >&5 echo "$as_me: error: OpenSSL libs and/or directories were not found where specified!" >&2;} { (exit 1); exit 1; }; } fi fi if test X"$OPENSSL_ENABLED" = X"y"; then for ac_func in RAND_bytes \ RAND_status \ RAND_seed \ RAND_poll \ 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 for ac_func in HMAC_CTX_init \ HMAC_Init \ HMAC_Update \ HMAC_Final \ HMAC_CTX_cleanup 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 for ac_func in EVP_EncryptInit \ EVP_DecryptInit \ EVP_EncryptUpdate \ EVP_EncryptFinal \ EVP_CIPHER_CTX_block_size \ EVP_CIPHER_CTX_cleanup \ 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 for ac_func in EVP_bf_cbc \ EVP_rc2_cbc \ EVP_des_ede_cbc \ EVP_aes_128_cbc \ EVP_aes_192_cbc \ EVP_aes_256_cbc \ 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 for ac_func in BN_new \ BN_bn2hex \ BN_hex2bn \ BN_bn2bin \ BN_rand \ BN_free \ 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 for ac_func in RSA_new \ RSA_size \ RSA_check_key \ RSA_public_encrypt \ RSA_private_decrypt \ RSA_sign \ RSA_free \ 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 for ac_func in PEM_write_RSAPrivateKey \ PEM_read_RSAPrivateKey \ PEM_write_RSAPublicKey \ PEM_read_RSAPublicKey \ 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 test "$OPENSSL_ENABLED" = "y"; then if test -n "$LIB_OPENSSL"; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL" export LD_LIBRARY_PATH { echo "$as_me:$LINENO: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&5 echo "$as_me: Added $LIB_OPENSSL to LD_LIBRARY_PATH" >&6;} fi fi fi if test "x$OPENSSL_ENABLED" != "xno"; then OPENSSL_ENABLED_TRUE= OPENSSL_ENABLED_FALSE='#' else OPENSSL_ENABLED_TRUE='#' OPENSSL_ENABLED_FALSE= fi GTK_REQUIRED=2.4 GLIB_REQUIRED=2.8 LIBGNOMEUI_REQUIRED=2.14 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.9.0 { 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 pkg_failed=no { echo "$as_me:$LINENO: checking for G2IPMSG" >&5 echo $ECHO_N "checking for G2IPMSG... $ECHO_C" >&6; } if test -n "$G2IPMSG_CFLAGS"; then pkg_cv_G2IPMSG_CFLAGS="$G2IPMSG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libgnomeui-2.0 >= \$LIBGNOMEUI_REQUIRED gtk+-2.0 >= \$GTK_REQUIRED glib-2.0 >= \$GLIB_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_G2IPMSG_CFLAGS=`$PKG_CONFIG --cflags "libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$G2IPMSG_LIBS"; then pkg_cv_G2IPMSG_LIBS="$G2IPMSG_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libgnomeui-2.0 >= \$LIBGNOMEUI_REQUIRED gtk+-2.0 >= \$GTK_REQUIRED glib-2.0 >= \$GLIB_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_G2IPMSG_LIBS=`$PKG_CONFIG --libs "libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2>/dev/null` else pkg_failed=yes 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 G2IPMSG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2>&1` else G2IPMSG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$G2IPMSG_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements (libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED) were not met: $G2IPMSG_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables G2IPMSG_CFLAGS and G2IPMSG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements (libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED) were not met: $G2IPMSG_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables G2IPMSG_CFLAGS and G2IPMSG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: 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. Alternatively, you may set the environment variables G2IPMSG_CFLAGS and G2IPMSG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: error: 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. Alternatively, you may set the environment variables G2IPMSG_CFLAGS and G2IPMSG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else G2IPMSG_CFLAGS=$pkg_cv_G2IPMSG_CFLAGS G2IPMSG_LIBS=$pkg_cv_G2IPMSG_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi # #Check DBUS glib binding before hand for pretty printing. # DBUS_REQUIRED=1.0.0 DBUS_GLIB_REQUIRED=0.30 pkg_failed=no { echo "$as_me:$LINENO: checking for DBUSGLIB" >&5 echo $ECHO_N "checking for DBUSGLIB... $ECHO_C" >&6; } if test -n "$DBUSGLIB_CFLAGS"; then pkg_cv_DBUSGLIB_CFLAGS="$DBUSGLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= \$DBUS_REQUIRED dbus-glib-1 >= \$DBUS_GLIB_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_DBUSGLIB_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DBUSGLIB_LIBS"; then pkg_cv_DBUSGLIB_LIBS="$DBUSGLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1 >= \$DBUS_REQUIRED dbus-glib-1 >= \$DBUS_GLIB_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_DBUSGLIB_LIBS=`$PKG_CONFIG --libs "dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED" 2>/dev/null` else pkg_failed=yes 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 DBUSGLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED" 2>&1` else DBUSGLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DBUSGLIB_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } dbus_ok="no" elif test $pkg_failed = untried; then dbus_ok="no" else DBUSGLIB_CFLAGS=$pkg_cv_DBUSGLIB_CFLAGS DBUSGLIB_LIBS=$pkg_cv_DBUSGLIB_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } dbus_ok="yes" fi DBUSGLIB_ENABLED="no" { echo "$as_me:$LINENO: checking whether to be enable dbus-glib" >&5 echo $ECHO_N "checking whether to be enable dbus-glib... $ECHO_C" >&6; } # Check whether --enable-dbus-glib was given. if test "${enable_dbus_glib+set}" = set; then enableval=$enable_dbus_glib; fi if test "x$enable_dbus_glib" != "xno"; then if test "x$dbus_ok" != "xno"; then cat >>confdefs.h <<\_ACEOF #define USE_DBUS _ACEOF { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } DBUSGLIB_ENABLED="yes" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$DBUSGLIB_ENABLED" != "xno"; then DBUSGLIB_ENABLED_TRUE= DBUSGLIB_ENABLED_FALSE='#' else DBUSGLIB_ENABLED_TRUE='#' DBUSGLIB_ENABLED_FALSE= fi GNOME_SCREENSAVER_ENABLED="no" { echo "$as_me:$LINENO: checking whether to be enable gnome-screensaver-interaction" >&5 echo $ECHO_N "checking whether to be enable gnome-screensaver-interaction... $ECHO_C" >&6; } if test "x$DBUSGLIB_ENABLED" != "xno"; then # Check whether --enable-gnome-screensaver was given. if test "${enable_gnome_screensaver+set}" = set; then enableval=$enable_gnome_screensaver; fi if test "x$enable_gnome_screensaver" != "xno"; then GNOME_SCREENSAVER_ENABLED="yes" cat >>confdefs.h <<\_ACEOF #define USE_GNOME_SCREENSAVER _ACEOF { 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; } GNOME_SCREENSAVER_ENABLED="no" fi else GNOME_SCREENSAVER_ENABLED="no" { echo "$as_me:$LINENO: result: nodbus-glib not available" >&5 echo "${ECHO_T}nodbus-glib not available" >&6; } fi if test "x$GNOME_SCREENSAVER_ENABLED" != "xno"; then GNOME_SCREENSAVER_ENABLED_TRUE= GNOME_SCREENSAVER_ENABLED_FALSE='#' else GNOME_SCREENSAVER_ENABLED_TRUE='#' GNOME_SCREENSAVER_ENABLED_FALSE= fi GTK_FULL_REQUIRED=2.10 pkg_failed=no { echo "$as_me:$LINENO: checking for SYSTRAY" >&5 echo $ECHO_N "checking for SYSTRAY... $ECHO_C" >&6; } if test -n "$SYSTRAY_CFLAGS"; then pkg_cv_SYSTRAY_CFLAGS="$SYSTRAY_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_FULL_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_FULL_REQUIRED") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_SYSTRAY_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= $GTK_FULL_REQUIRED" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SYSTRAY_LIBS"; then pkg_cv_SYSTRAY_LIBS="$SYSTRAY_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= \$GTK_FULL_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= $GTK_FULL_REQUIRED") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_SYSTRAY_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= $GTK_FULL_REQUIRED" 2>/dev/null` else pkg_failed=yes 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 SYSTRAY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gtk+-2.0 >= $GTK_FULL_REQUIRED" 2>&1` else SYSTRAY_PKG_ERRORS=`$PKG_CONFIG --print-errors "gtk+-2.0 >= $GTK_FULL_REQUIRED" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SYSTRAY_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } systray_ok="no" elif test $pkg_failed = untried; then systray_ok="no" else SYSTRAY_CFLAGS=$pkg_cv_SYSTRAY_CFLAGS SYSTRAY_LIBS=$pkg_cv_SYSTRAY_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } systray_ok="yes" fi # Check whether --enable-systray was given. if test "${enable_systray+set}" = set; then enableval=$enable_systray; fi { echo "$as_me:$LINENO: checking whether to be enable systray" >&5 echo $ECHO_N "checking whether to be enable systray... $ECHO_C" >&6; } if test "x$enable_systray" != "xno"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } if test "x$systray_ok" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define G2IPMSG_SYSTRAY _ACEOF else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { echo "$as_me:$LINENO: WARNING: You need Gtk+-2.10 or later installed if you need systray relevant functions." >&5 echo "$as_me: WARNING: You need Gtk+-2.10 or later installed if you need systray relevant functions." >&2;} fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Check whether --enable-utf-8 was given. if test "${enable_utf_8+set}" = set; then enableval=$enable_utf_8; fi { echo "$as_me:$LINENO: checking whether to be enable IPMSG UTF-8 extension support" >&5 echo $ECHO_N "checking whether to be enable IPMSG UTF-8 extension support... $ECHO_C" >&6; } if test "x$enable_utf_8" != "xyes"; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } else { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define IPMSG_UTF8_SUPPORT _ACEOF fi # Check whether --enable-schemas-install was given. if test "${enable_schemas_install+set}" = set; then enableval=$enable_schemas_install; case ${enableval} in yes|no) ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-schemas-install" >&5 echo "$as_me: error: bad value ${enableval} for --enable-schemas-install" >&2;} { (exit 1); exit 1; }; } ;; esac fi if test "$enable_schemas_install" != no; then GCONF_SCHEMAS_INSTALL_TRUE= GCONF_SCHEMAS_INSTALL_FALSE='#' else GCONF_SCHEMAS_INSTALL_TRUE='#' GCONF_SCHEMAS_INSTALL_FALSE= fi # Check whether --enable-applet was given. if test "${enable_applet+set}" = set; then enableval=$enable_applet; else enable_applet=yes fi { echo "$as_me:$LINENO: checking whether to be enable applet" >&5 echo $ECHO_N "checking whether to be enable applet... $ECHO_C" >&6; } if test x"$enable_applet" != "xno"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define ENABLE_APPLET _ACEOF pkg_failed=no { echo "$as_me:$LINENO: checking for APPLET" >&5 echo $ECHO_N "checking for APPLET... $ECHO_C" >&6; } if test -n "$APPLET_CFLAGS"; then pkg_cv_APPLET_CFLAGS="$APPLET_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpanelapplet-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libpanelapplet-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_APPLET_CFLAGS=`$PKG_CONFIG --cflags "libpanelapplet-2.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$APPLET_LIBS"; then pkg_cv_APPLET_LIBS="$APPLET_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libpanelapplet-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "libpanelapplet-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_APPLET_LIBS=`$PKG_CONFIG --libs "libpanelapplet-2.0" 2>/dev/null` else pkg_failed=yes 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 APPLET_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpanelapplet-2.0" 2>&1` else APPLET_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpanelapplet-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$APPLET_PKG_ERRORS" >&5 { { echo "$as_me:$LINENO: error: Package requirements (libpanelapplet-2.0) were not met: $APPLET_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables APPLET_CFLAGS and APPLET_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 echo "$as_me: error: Package requirements (libpanelapplet-2.0) were not met: $APPLET_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables APPLET_CFLAGS and APPLET_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then { { echo "$as_me:$LINENO: error: 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. Alternatively, you may set the environment variables APPLET_CFLAGS and APPLET_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&5 echo "$as_me: error: 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. Alternatively, you may set the environment variables APPLET_CFLAGS and APPLET_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else APPLET_CFLAGS=$pkg_cv_APPLET_CFLAGS APPLET_LIBS=$pkg_cv_APPLET_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$enable_applet" != "no"; then ENABLE_APPLET_TRUE= ENABLE_APPLET_FALSE='#' else ENABLE_APPLET_TRUE='#' ENABLE_APPLET_FALSE= fi # Extract the first word of "iconv", so it can be a program name with args. set dummy iconv; 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_ICONV+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ICONV in [\\/]* | ?:[\\/]*) ac_cv_path_ICONV="$ICONV" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/local/bin:/usr/bin:/bin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ICONV="$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_ICONV" && ac_cv_path_ICONV="""" ;; esac fi ICONV=$ac_cv_path_ICONV if test -n "$ICONV"; then { echo "$as_me:$LINENO: result: $ICONV" >&5 echo "${ECHO_T}$ICONV" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi { echo "$as_me:$LINENO: checking external representation character code of ipmsg" >&5 echo $ECHO_N "checking external representation character code of ipmsg... $ECHO_C" >&6; } with_ext_charcode="" # Check whether --with-ext-charcode was given. if test "${with_ext_charcode+set}" = set; then withval=$with_ext_charcode; else with_ext_charcode=CP932 fi if test -n "$with_ext_charcode"; then if test x$cross_compiling != xyes; then if test -n "$ICONV"; then $ICONV --list|grep $with_ext_charcode > /dev/null if test $? -ne 0; then echo -n "Character set $with_ext_charcode not found, using default(CP932):" with_ext_charcode=CP932 #Assume CP932 fi else #ICONV check is not available. echo -n "iconv is not available, using $with_ext_charcode:" fi else #ICONV check is not available in cross compile phase. echo -n "In cross compilation, using $with_ext_charcode:" fi else with_ext_charcode=CP932 #Using CP932 for fi { echo "$as_me:$LINENO: result: $with_ext_charcode" >&5 echo "${ECHO_T}$with_ext_charcode" >&6; } IPMSG_EXTERNAL_CHARCODE=$with_ext_charcode cat >>confdefs.h <<_ACEOF #define IPMSG_EXTERNAL_CHARCODE "$IPMSG_EXTERNAL_CHARCODE" _ACEOF iconsdir="${datadir}/icons" pixmapsdir="${datadir}/pixmaps" pkgdatadir="${datadir}/gnome-applets" gladedir="${pkgdatadir}/glade" test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" ac_define_dir=`eval echo ${prefix}` ac_define_dir=`eval echo $ac_define_dir` { echo "$as_me:$LINENO: checking directory configuration for PREFIX" >&5 echo $ECHO_N "checking directory configuration for PREFIX... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $ac_define_dir" >&5 echo "${ECHO_T}$ac_define_dir" >&6; } PREFIX="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define PREFIX "$ac_define_dir" _ACEOF test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" ac_define_dir=`eval echo ${libdir}` ac_define_dir=`eval echo $ac_define_dir` { echo "$as_me:$LINENO: checking directory configuration for LIBDIR" >&5 echo $ECHO_N "checking directory configuration for LIBDIR... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $ac_define_dir" >&5 echo "${ECHO_T}$ac_define_dir" >&6; } LIBDIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define LIBDIR "$ac_define_dir" _ACEOF test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" ac_define_dir=`eval echo ${datadir}` ac_define_dir=`eval echo $ac_define_dir` { echo "$as_me:$LINENO: checking directory configuration for DATADIR" >&5 echo $ECHO_N "checking directory configuration for DATADIR... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $ac_define_dir" >&5 echo "${ECHO_T}$ac_define_dir" >&6; } DATADIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define DATADIR "$ac_define_dir" _ACEOF test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" ac_define_dir=`eval echo ${sysconfdir}` ac_define_dir=`eval echo $ac_define_dir` { echo "$as_me:$LINENO: checking directory configuration for SYSCONFDIR" >&5 echo $ECHO_N "checking directory configuration for SYSCONFDIR... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $ac_define_dir" >&5 echo "${ECHO_T}$ac_define_dir" >&6; } SYSCONFDIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define SYSCONFDIR "$ac_define_dir" _ACEOF test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" ac_define_dir=`eval echo ${iconsdir}` ac_define_dir=`eval echo $ac_define_dir` { echo "$as_me:$LINENO: checking directory configuration for GNOME_ICONDIR" >&5 echo $ECHO_N "checking directory configuration for GNOME_ICONDIR... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $ac_define_dir" >&5 echo "${ECHO_T}$ac_define_dir" >&6; } GNOME_ICONDIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define GNOME_ICONDIR "$ac_define_dir" _ACEOF test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" ac_define_dir=`eval echo ${pixmapsdir}` ac_define_dir=`eval echo $ac_define_dir` { echo "$as_me:$LINENO: checking directory configuration for GNOME_PIXMAPSDIR" >&5 echo $ECHO_N "checking directory configuration for GNOME_PIXMAPSDIR... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $ac_define_dir" >&5 echo "${ECHO_T}$ac_define_dir" >&6; } GNOME_PIXMAPSDIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define GNOME_PIXMAPSDIR "$ac_define_dir" _ACEOF test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" ac_define_dir=`eval echo ${gladedir}` ac_define_dir=`eval echo $ac_define_dir` { echo "$as_me:$LINENO: checking directory configuration for GNOME_GLADEDIR" >&5 echo $ECHO_N "checking directory configuration for GNOME_GLADEDIR... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $ac_define_dir" >&5 echo "${ECHO_T}$ac_define_dir" >&6; } GNOME_GLADEDIR="$ac_define_dir" cat >>confdefs.h <<_ACEOF #define GNOME_GLADEDIR "$ac_define_dir" _ACEOF ALL_LINGUAS="ja zh_CN" 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;} ( cat <<\_ASBOX ## ------------------------------------------------- ## ## Report this to http://www.ipmsg.org/index.html.en ## ## ------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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;} ( cat <<\_ASBOX ## ------------------------------------------------- ## ## Report this to http://www.ipmsg.org/index.html.en ## ## ------------------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&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-1" 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$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then GCONF_SCHEMA_CONFIG_SOURCE=`gconftool-2 --get-default-source` else GCONF_SCHEMA_CONFIG_SOURCE=$GCONF_SCHEMA_INSTALL_SOURCE fi # Check whether --with-gconf-source was given. if test "${with_gconf_source+set}" = set; then withval=$with_gconf_source; GCONF_SCHEMA_CONFIG_SOURCE="$withval" fi { echo "$as_me:$LINENO: result: Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&5 echo "${ECHO_T}Using config source $GCONF_SCHEMA_CONFIG_SOURCE for schema installation" >&6; } if test "x$GCONF_SCHEMA_FILE_DIR" = "x"; then GCONF_SCHEMA_FILE_DIR='$(sysconfdir)/gconf/schemas' fi # Check whether --with-gconf-schema-file-dir was given. if test "${with_gconf_schema_file_dir+set}" = set; then withval=$with_gconf_schema_file_dir; GCONF_SCHEMA_FILE_DIR="$withval" fi { echo "$as_me:$LINENO: result: Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&5 echo "${ECHO_T}Using $GCONF_SCHEMA_FILE_DIR as install directory for schema files" >&6; } # Check whether --enable-schemas-install was given. if test "${enable_schemas_install+set}" = set; then enableval=$enable_schemas_install; case ${enableval} in yes|no) ;; *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-schemas-install" >&5 echo "$as_me: error: bad value ${enableval} for --enable-schemas-install" >&2;} { (exit 1); exit 1; }; } ;; esac fi if test "$enable_schemas_install" != no; then GCONF_SCHEMAS_INSTALL_TRUE= GCONF_SCHEMAS_INSTALL_FALSE='#' else GCONF_SCHEMAS_INSTALL_TRUE='#' GCONF_SCHEMAS_INSTALL_FALSE= fi GST_MAJORMINOR=0.10 pkg_failed=no { echo "$as_me:$LINENO: checking for GST" >&5 echo $ECHO_N "checking for GST... $ECHO_C" >&6; } if test -n "$GST_CFLAGS"; then pkg_cv_GST_CFLAGS="$GST_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-\$GST_MAJORMINOR\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-$GST_MAJORMINOR") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_CFLAGS=`$PKG_CONFIG --cflags "gstreamer-$GST_MAJORMINOR" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GST_LIBS"; then pkg_cv_GST_LIBS="$GST_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gstreamer-\$GST_MAJORMINOR\"") >&5 ($PKG_CONFIG --exists --print-errors "gstreamer-$GST_MAJORMINOR") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GST_LIBS=`$PKG_CONFIG --libs "gstreamer-$GST_MAJORMINOR" 2>/dev/null` else pkg_failed=yes 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 GST_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gstreamer-$GST_MAJORMINOR" 2>&1` else GST_PKG_ERRORS=`$PKG_CONFIG --print-errors "gstreamer-$GST_MAJORMINOR" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GST_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } HAVE_GST="no" elif test $pkg_failed = untried; then HAVE_GST="no" else GST_CFLAGS=$pkg_cv_GST_CFLAGS GST_LIBS=$pkg_cv_GST_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } HAVE_GST="yes" fi if test "x$HAVE_GST" = "xyes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_GST 1 _ACEOF else { echo "$as_me:$LINENO: WARNING: You need GStreamer-0.10 or later installed if you need sound relevant functions" >&5 echo "$as_me: WARNING: You need GStreamer-0.10 or later installed if you need sound relevant functions" >&2;} fi PACKAGE_CFLAGS="$G2IPMSG_CFLAGS $DBUSGLIB_CFLAGS $APPLET_CFLAGS $GST_CFLAGS $SSL_CPPFLAGS " PACKAGE_LIBS="$G2IPMSG_LIBS $DBUSGLIB_LIBS $APPLET_LIBS $GST_LIBS $SSL_LDFLAGS" ac_config_files="$ac_config_files Makefile src/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 if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi ac_config_commands="$ac_config_commands po/stamp-it" if test -z "${OPENSSL_ENABLED_TRUE}" && test -z "${OPENSSL_ENABLED_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"OPENSSL_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"OPENSSL_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DBUSGLIB_ENABLED_TRUE}" && test -z "${DBUSGLIB_ENABLED_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DBUSGLIB_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DBUSGLIB_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GNOME_SCREENSAVER_ENABLED_TRUE}" && test -z "${GNOME_SCREENSAVER_ENABLED_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GNOME_SCREENSAVER_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"GNOME_SCREENSAVER_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${ENABLE_APPLET_TRUE}" && test -z "${ENABLE_APPLET_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"ENABLE_APPLET\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"ENABLE_APPLET\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${GCONF_SCHEMAS_INSTALL_TRUE}" && test -z "${GCONF_SCHEMAS_INSTALL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"GCONF_SCHEMAS_INSTALL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${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 g2ipmsg $as_me 0.9.6, 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="\\ g2ipmsg config.status 0.9.6 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' MKDIR_P='$MKDIR_P' _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 # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}' prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir" INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' _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" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "intltool") CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; *) { { 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 DX_PROJECT!$DX_PROJECT$ac_delim DX_CONFIG!$DX_CONFIG$ac_delim DX_DOCDIR!$DX_DOCDIR$ac_delim DX_ENV!$DX_ENV$ac_delim DX_FLAG_doc!$DX_FLAG_doc$ac_delim DX_DOXYGEN!$DX_DOXYGEN$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_PERL!$DX_PERL$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_doc_TRUE!$DX_COND_doc_TRUE$ac_delim DX_COND_doc_FALSE!$DX_COND_doc_FALSE$ac_delim DX_FLAG_dot!$DX_FLAG_dot$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_DOT!$DX_DOT$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_dot_TRUE!$DX_COND_dot_TRUE$ac_delim DX_COND_dot_FALSE!$DX_COND_dot_FALSE$ac_delim DX_FLAG_man!$DX_FLAG_man$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_man_TRUE!$DX_COND_man_TRUE$ac_delim DX_COND_man_FALSE!$DX_COND_man_FALSE$ac_delim DX_FLAG_rtf!$DX_FLAG_rtf$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_rtf_TRUE!$DX_COND_rtf_TRUE$ac_delim DX_COND_rtf_FALSE!$DX_COND_rtf_FALSE$ac_delim DX_FLAG_xml!$DX_FLAG_xml$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_xml_TRUE!$DX_COND_xml_TRUE$ac_delim DX_COND_xml_FALSE!$DX_COND_xml_FALSE$ac_delim DX_FLAG_chm!$DX_FLAG_chm$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_HHC!$DX_HHC$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_chm_TRUE!$DX_COND_chm_TRUE$ac_delim DX_COND_chm_FALSE!$DX_COND_chm_FALSE$ac_delim DX_FLAG_chi!$DX_FLAG_chi$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_chi_TRUE!$DX_COND_chi_TRUE$ac_delim DX_COND_chi_FALSE!$DX_COND_chi_FALSE$ac_delim DX_FLAG_html!$DX_FLAG_html$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_html_TRUE!$DX_COND_html_TRUE$ac_delim DX_COND_html_FALSE!$DX_COND_html_FALSE$ac_delim DX_FLAG_ps!$DX_FLAG_ps$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_LATEX!$DX_LATEX$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_MAKEINDEX!$DX_MAKEINDEX$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_DVIPS!$DX_DVIPS$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_EGREP!$DX_EGREP$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_ps_TRUE!$DX_COND_ps_TRUE$ac_delim DX_COND_ps_FALSE!$DX_COND_ps_FALSE$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_PDFLATEX!$DX_PDFLATEX$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$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 DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_FLAG_pdf!$DX_FLAG_pdf$ac_delim DX_COND_pdf_TRUE!$DX_COND_pdf_TRUE$ac_delim DX_COND_pdf_FALSE!$DX_COND_pdf_FALSE$ac_delim DX_COND_latex_TRUE!$DX_COND_latex_TRUE$ac_delim DX_COND_latex_FALSE!$DX_COND_latex_FALSE$ac_delim DOXYGEN_PAPER_SIZE!$DOXYGEN_PAPER_SIZE$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$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 install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$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 DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim INTLTOOL_PROP_RULE!$INTLTOOL_PROP_RULE$ac_delim INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim INTLTOOL_XAM_RULE!$INTLTOOL_XAM_RULE$ac_delim INTLTOOL_KBD_RULE!$INTLTOOL_KBD_RULE$ac_delim INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim INTLTOOL_XML_NOMERGE_RULE!$INTLTOOL_XML_NOMERGE_RULE$ac_delim INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim XGETTEXT!$XGETTEXT$ac_delim MSGMERGE!$MSGMERGE$ac_delim MSGFMT!$MSGFMT$ac_delim INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim ALL_LINGUAS!$ALL_LINGUAS$ac_delim DATADIRNAME!$DATADIRNAME$ac_delim CPP!$CPP$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim PKGCONFIG!$PKGCONFIG$ac_delim OPENSSL_ENABLED_TRUE!$OPENSSL_ENABLED_TRUE$ac_delim OPENSSL_ENABLED_FALSE!$OPENSSL_ENABLED_FALSE$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim G2IPMSG_CFLAGS!$G2IPMSG_CFLAGS$ac_delim G2IPMSG_LIBS!$G2IPMSG_LIBS$ac_delim DBUSGLIB_CFLAGS!$DBUSGLIB_CFLAGS$ac_delim DBUSGLIB_LIBS!$DBUSGLIB_LIBS$ac_delim DBUSGLIB_ENABLED!$DBUSGLIB_ENABLED$ac_delim DBUSGLIB_ENABLED_TRUE!$DBUSGLIB_ENABLED_TRUE$ac_delim DBUSGLIB_ENABLED_FALSE!$DBUSGLIB_ENABLED_FALSE$ac_delim GNOME_SCREENSAVER_ENABLED!$GNOME_SCREENSAVER_ENABLED$ac_delim GNOME_SCREENSAVER_ENABLED_TRUE!$GNOME_SCREENSAVER_ENABLED_TRUE$ac_delim GNOME_SCREENSAVER_ENABLED_FALSE!$GNOME_SCREENSAVER_ENABLED_FALSE$ac_delim SYSTRAY_CFLAGS!$SYSTRAY_CFLAGS$ac_delim SYSTRAY_LIBS!$SYSTRAY_LIBS$ac_delim GCONF_SCHEMAS_INSTALL_TRUE!$GCONF_SCHEMAS_INSTALL_TRUE$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-2.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 GCONF_SCHEMAS_INSTALL_FALSE!$GCONF_SCHEMAS_INSTALL_FALSE$ac_delim APPLET_CFLAGS!$APPLET_CFLAGS$ac_delim APPLET_LIBS!$APPLET_LIBS$ac_delim ENABLE_APPLET_TRUE!$ENABLE_APPLET_TRUE$ac_delim ENABLE_APPLET_FALSE!$ENABLE_APPLET_FALSE$ac_delim ICONV!$ICONV$ac_delim IPMSG_EXTERNAL_CHARCODE!$IPMSG_EXTERNAL_CHARCODE$ac_delim iconsdir!$iconsdir$ac_delim pixmapsdir!$pixmapsdir$ac_delim pkgdatadir!$pkgdatadir$ac_delim gladedir!$gladedir$ac_delim PREFIX!$PREFIX$ac_delim LIBDIR!$LIBDIR$ac_delim DATADIR!$DATADIR$ac_delim SYSCONFDIR!$SYSCONFDIR$ac_delim GNOME_ICONDIR!$GNOME_ICONDIR$ac_delim GNOME_PIXMAPSDIR!$GNOME_PIXMAPSDIR$ac_delim GNOME_GLADEDIR!$GNOME_GLADEDIR$ac_delim USE_NLS!$USE_NLS$ac_delim MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim GMSGFMT!$GMSGFMT$ac_delim CATALOGS!$CATALOGS$ac_delim CATOBJEXT!$CATOBJEXT$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 GCONF_SCHEMA_CONFIG_SOURCE!$GCONF_SCHEMA_CONFIG_SOURCE$ac_delim GCONF_SCHEMA_FILE_DIR!$GCONF_SCHEMA_FILE_DIR$ac_delim GST_CFLAGS!$GST_CFLAGS$ac_delim GST_LIBS!$GST_LIBS$ac_delim PACKAGE_CFLAGS!$PACKAGE_CFLAGS$ac_delim PACKAGE_LIBS!$PACKAGE_LIBS$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` = 39; 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-3.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 ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; 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 s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.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" # Compute $ac_file's index in $config_headers. _am_arg=$ac_file _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir 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; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; "intltool":C) for file in intltool-extract intltool-merge intltool-update; do sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \ < ${ac_aux_dir}/${file}.in > ${file}.out if cmp -s ${file} ${file}.out 2>/dev/null; then rm -f ${file}.out else mv -f ${file}.out ${file} fi chmod ugo+x ${file} chmod u+w ${file} done ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; "po/stamp-it":C) rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp" >"po/stamp-it.tmp" sed '/^#/d s/^[[].*] *// /^[ ]*$/d '"s|^| $ac_top_srcdir/|" \ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES" if test ! -f "po/Makefile"; then { { echo "$as_me:$LINENO: error: po/Makefile is not ready." >&5 echo "$as_me: error: po/Makefile is not ready." >&2;} { (exit 1); exit 1; }; } fi mv "po/Makefile" "po/Makefile.tmp" sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r po/POTFILES } ' "po/Makefile.tmp" >"po/Makefile" rm -f "po/Makefile.tmp" mv "po/stamp-it.tmp" "po/stamp-it" ;; 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 g2ipmsg-0.9.6+dfsg/configure.in000066400000000000000000000323571126724573600163550ustar00rootroot00000000000000dnl dnl Main dnl AC_INIT(g2ipmsg, 0.9.6, http://www.ipmsg.org/index.html.en) AC_CONFIG_SRCDIR(src/main.c) dnl dnl Doxygen dnl DX_HTML_FEATURE(ON) DX_CHM_FEATURE(OFF) DX_CHI_FEATURE(OFF) DX_MAN_FEATURE(OFF) DX_RTF_FEATURE(OFF) DX_XML_FEATURE(OFF) DX_PDF_FEATURE(OFF) DX_PS_FEATURE(OFF) DX_INIT_DOXYGEN(g2ipmsg, doc/Doxyfile, doc/internal) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AC_SUBST(PACKAGE) AM_MAINTAINER_MODE AM_CONFIG_HEADER(config.h) AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_PROG_INTLTOOL([0.31]) AC_HEADER_STDC AC_SYS_LARGEFILE GETTEXT_PACKAGE=g2ipmsg AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXTPACKAGE", [Gettext package.]) AC_CHECK_HEADERS(libintl.h) dnl ********************************************************************** dnl Check standard C library dnl ********************************************************************** AC_CHECK_FUNCS(dirfd) AC_CHECK_FUNCS(asctime_r localtime_r) dnl ********************************************************************** dnl Check for the presence of SSL libraries and headers (From curl) dnl ********************************************************************** dnl Default to compiler & linker defaults for SSL files & libraries. OPT_SSL=off dnl Default to no CA bundle ca="no" OPENSSL_ENABLED="no" AC_ARG_WITH(ssl,dnl AC_HELP_STRING([--with-ssl=PATH],[where to look for OpenSSL, PATH points to the OpenSSL installation (default: /usr/local/ssl)]) AC_HELP_STRING([--without-ssl], [disable OpenSSL]), OPT_SSL=$withval) if test X"$OPT_SSL" != Xno; then dnl backup the pre-ssl variables CLEANLDFLAGS="$LDFLAGS" CLEANCPPFLAGS="$CPPFLAGS" CLEANLIBS="$LIBS" SSL_LDFLAGS="" SSL_CPPFLAGS="" SSL_LIBS="" case "$OPT_SSL" in yes) dnl --with-ssl (without path) used if test x$cross_compiling != xyes; then dnl only do pkg-config magic when not cross-compiling PKGTEST="yes" fi PREFIX_OPENSSL=/usr/local/ssl LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" ;; off) dnl no --with-ssl option given, just check default places if test x$cross_compiling != xyes; then dnl only do pkg-config magic when not cross-compiling PKGTEST="yes" fi PREFIX_OPENSSL= ;; *) dnl check the given --with-ssl spot PKGTEST="no" PREFIX_OPENSSL=$OPT_SSL LIB_OPENSSL="$PREFIX_OPENSSL/lib$libsuff" SSL_LDFLAGS="-L$LIB_OPENSSL" SSL_CPPFLAGS="-I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" ;; esac if test "$PKGTEST" = "yes"; then dnl Detect the pkg-config tool, as it may have extra info about the dnl openssl installation we can use. I *believe* this is what we are dnl expected to do on really recent Redhat Linux hosts. AC_PATH_PROG(PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin) if test "$PKGCONFIG" != "no" ; then AC_MSG_CHECKING([OpenSSL options with pkg-config]) $PKGCONFIG --exists openssl SSL_EXISTS=$? if test "$SSL_EXISTS" -eq "0"; then SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null` SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null` SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null` LIB_OPENSSL=`echo $SSL_LDFLAGS | sed -e 's/-L//g'` dnl use the values pkg-config reported LIBS="$LIBS $SSL_LIBS" AC_MSG_RESULT([found]) else AC_MSG_RESULT([no]) fi fi fi dnl This is for Msys/Mingw AC_MSG_CHECKING([for gdi32]) my_ac_save_LIBS=$LIBS LIBS="-lgdi32 $LIBS" AC_TRY_LINK([#include #include ], [GdiFlush();], [ dnl worked! AC_MSG_RESULT([yes])], [ dnl failed, restore LIBS LIBS=$my_ac_save_LIBS AC_MSG_RESULT(no)] ) AC_CHECK_LIB(crypto, CRYPTO_lock,[ HAVECRYPTO="yes" LIBS="-lcrypto $LIBS" ],[ LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL" CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include" AC_CHECK_LIB(crypto, CRYPTO_add_lock,[ HAVECRYPTO="yes" LIBS="-lcrypto $LIBS"], [ LDFLAGS="$CLEANLDFLAGS" CPPFLAGS="$CLEANCPPFLAGS" LIBS="$CLEANLIBS" ]) ]) if test X"$HAVECRYPTO" = X"yes"; then dnl This is only reasonable to do if crypto actually is there: check for dnl SSL libs NOTE: it is important to do this AFTER the crypto lib dnl Have the libraries--check for SSLeay/OpenSSL headers AC_CHECK_HEADERS(openssl/rsa.h openssl/crypto.h \ openssl/rand.h openssl/evp.h openssl/bn.h, OPENSSL_ENABLED=y AC_DEFINE(USE_OPENSSL, [], [if OpenSSL is in use])) dnl OPENSSL_ENABLED; the names should really be unified if test X"$OPT_SSL" != Xoff && test "$OPENSSL_ENABLED" != "y"; then AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!]) fi fi if test X"$OPENSSL_ENABLED" = X"y"; then dnl If the ENGINE library seems to be around, check for the OpenSSL engine dnl stuff, it is kind of "separated" from the main SSL check dnl AC_CHECK_FUNC(ENGINE_init, dnl [ dnl AC_CHECK_HEADERS(openssl/engine.h) dnl AC_CHECK_FUNCS( ENGINE_load_builtin_engines ) dnl ]) dnl these can only exist if openssl exists AC_CHECK_FUNCS( RAND_bytes \ RAND_status \ RAND_seed \ RAND_poll \ ) AC_CHECK_FUNCS(HMAC_CTX_init \ HMAC_Init \ HMAC_Update \ HMAC_Final \ HMAC_CTX_cleanup) AC_CHECK_FUNCS(EVP_EncryptInit \ EVP_DecryptInit \ EVP_EncryptUpdate \ EVP_EncryptFinal \ EVP_CIPHER_CTX_block_size \ EVP_CIPHER_CTX_cleanup \ ) AC_CHECK_FUNCS(EVP_bf_cbc \ EVP_rc2_cbc \ EVP_des_ede_cbc \ EVP_aes_128_cbc \ EVP_aes_192_cbc \ EVP_aes_256_cbc \ ) AC_CHECK_FUNCS( BN_new \ BN_bn2hex \ BN_hex2bn \ BN_bn2bin \ BN_rand \ BN_free \ ) AC_CHECK_FUNCS( RSA_new \ RSA_size \ RSA_check_key \ RSA_public_encrypt \ RSA_private_decrypt \ RSA_sign \ RSA_free \ ) AC_CHECK_FUNCS(PEM_write_RSAPrivateKey \ PEM_read_RSAPrivateKey \ PEM_write_RSAPublicKey \ PEM_read_RSAPublicKey \ ) fi if test "$OPENSSL_ENABLED" = "y"; then if test -n "$LIB_OPENSSL"; then dnl when the ssl shared libs were found in a path that the run-time dnl linker doesn't search through, we need to add it to LD_LIBRARY_PATH dnl to prevent further configure tests to fail due to this LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIB_OPENSSL" export LD_LIBRARY_PATH AC_MSG_NOTICE([Added $LIB_OPENSSL to LD_LIBRARY_PATH]) fi fi fi AM_CONDITIONAL([OPENSSL_ENABLED], [test "x$OPENSSL_ENABLED" != "xno"]) GTK_REQUIRED=2.4 GLIB_REQUIRED=2.8 LIBGNOMEUI_REQUIRED=2.14 PKG_CHECK_MODULES(G2IPMSG, libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED) dnl dnl DBUS glib bindings checking for screensaver interaction. dnl # #Check DBUS glib binding before hand for pretty printing. # DBUS_REQUIRED=1.0.0 DBUS_GLIB_REQUIRED=0.30 PKG_CHECK_MODULES(DBUSGLIB, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED, dbus_ok="yes", dbus_ok="no") DBUSGLIB_ENABLED="no" AC_MSG_CHECKING(whether to be enable dbus-glib) AC_ARG_ENABLE(dbus-glib, [ --enable-dbus-glib D-BUS GLib interface (required for GNOME screensaver support)]) if test "x$enable_dbus_glib" != "xno"; then if test "x$dbus_ok" != "xno"; then AC_DEFINE(USE_DBUS, [], [if DBUS and glib bindings is in use]) AC_MSG_RESULT(yes) DBUSGLIB_ENABLED="yes" else AC_MSG_RESULT(no) fi else AC_MSG_RESULT(no) fi AC_SUBST(DBUSGLIB_ENABLED) AM_CONDITIONAL([DBUSGLIB_ENABLED], [test "x$DBUSGLIB_ENABLED" != "xno"]) dnl dnl gnomescreensaver interaction dnl GNOME_SCREENSAVER_ENABLED="no" AC_MSG_CHECKING(whether to be enable gnome-screensaver-interaction) if test "x$DBUSGLIB_ENABLED" != "xno"; then AC_ARG_ENABLE(gnome-screensaver, [ --enable-gnome-screensaver GNOME screensaver interaction support [[default yes]]]) if test "x$enable_gnome_screensaver" != "xno"; then GNOME_SCREENSAVER_ENABLED="yes" AC_DEFINE(USE_GNOME_SCREENSAVER, [], [if gnomescreensaver interaction is in use]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) GNOME_SCREENSAVER_ENABLED="no" fi else GNOME_SCREENSAVER_ENABLED="no" AC_MSG_RESULT(no[dbus-glib not available]) fi AC_SUBST(GNOME_SCREENSAVER_ENABLED) AM_CONDITIONAL([GNOME_SCREENSAVER_ENABLED], [test "x$GNOME_SCREENSAVER_ENABLED" != "xno"]) dnl dnl Systray dnl GTK_FULL_REQUIRED=2.10 PKG_CHECK_MODULES(SYSTRAY, gtk+-2.0 >= $GTK_FULL_REQUIRED, systray_ok="yes",systray_ok="no") AC_ARG_ENABLE(systray,[ --enable-systray build g2ipmsg application as systray support [[default yes]]]) AC_MSG_CHECKING(whether to be enable systray) if test "x$enable_systray" != "xno"; then AC_MSG_RESULT(yes) if test "x$systray_ok" = "xyes"; then AC_DEFINE(G2IPMSG_SYSTRAY,[],[Systray enable]) else AC_MSG_RESULT(no) AC_MSG_WARN(You need Gtk+-2.10 or later installed if you need systray relevant functions.) fi else AC_MSG_RESULT(no) fi dnl dnl UTF-8 dnl AC_ARG_ENABLE(utf-8, [ --enable-utf-8 IPMSG UTF-8 extension support(experimental) ]) AC_MSG_CHECKING(whether to be enable IPMSG UTF-8 extension support) if test "x$enable_utf_8" != "xyes"; then AC_MSG_RESULT(no) else AC_MSG_RESULT(yes) AC_DEFINE(IPMSG_UTF8_SUPPORT, [], [IPMSG UTF-8 extension support enable]) fi dnl dnl schemas-install dnl AC_ARG_ENABLE(schemas-install, [ --disable-schemas-install Disable the schemas installation], [case ${enableval} in yes|no) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-schemas-install) ;; esac]) AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [test "$enable_schemas_install" != no]) AC_ARG_ENABLE(applet, [ --enable-applet trun on building applet version [[default yes]]],,enable_applet=yes) AC_MSG_CHECKING(whether to be enable applet) if test x"$enable_applet" != "xno"; then AC_MSG_RESULT(yes) AC_DEFINE([ENABLE_APPLET], [], [enable applet version of g2ipmsg]) PKG_CHECK_MODULES(APPLET, libpanelapplet-2.0) else AC_MSG_RESULT(no) fi AM_CONDITIONAL([ENABLE_APPLET],[test "$enable_applet" != "no"]) dnl dnl external codeset setting dnl AC_PATH_PROG(ICONV, iconv, "", /usr/local/bin:/usr/bin:/bin) AC_MSG_CHECKING(external representation character code of ipmsg) with_ext_charcode="" AC_ARG_WITH(ext-charcode, AC_HELP_STRING([--with-ext-charcode], [External character code setting(CP936(Simplified Chinese), CP932(Japanese Windows ShiftJIS)) [[default=CP932]]]),, with_ext_charcode=CP932) if test -n "$with_ext_charcode"; then if test x$cross_compiling != xyes; then if test -n "$ICONV"; then $ICONV --list|grep $with_ext_charcode > /dev/null if test $? -ne 0; then echo -n "Character set $with_ext_charcode not found, using default(CP932):" with_ext_charcode=CP932 #Assume CP932 fi else #ICONV check is not available. echo -n "iconv is not available, using $with_ext_charcode:" fi else #ICONV check is not available in cross compile phase. echo -n "In cross compilation, using $with_ext_charcode:" fi else with_ext_charcode=CP932 #Using CP932 for fi AC_MSG_RESULT($with_ext_charcode) IPMSG_EXTERNAL_CHARCODE=$with_ext_charcode AC_SUBST(IPMSG_EXTERNAL_CHARCODE) AC_DEFINE_UNQUOTED(IPMSG_EXTERNAL_CHARCODE,"$IPMSG_EXTERNAL_CHARCODE", [External code set.]) dnl *************************************************************************** dnl *** Set install directories *** dnl *************************************************************************** iconsdir="${datadir}/icons" AC_SUBST(iconsdir) pixmapsdir="${datadir}/pixmaps" AC_SUBST(pixmapsdir) pkgdatadir="${datadir}/gnome-applets" AC_SUBST(pkgdatadir) gladedir="${pkgdatadir}/glade" AC_SUBST(gladedir) AC_DEFINE_DIR(PREFIX, ${prefix}, [install prefix]) AC_DEFINE_DIR(LIBDIR, ${libdir}, [libdir]) AC_DEFINE_DIR(DATADIR, ${datadir}, [datadir]) AC_DEFINE_DIR(SYSCONFDIR, ${sysconfdir}, [sysconfdir]) AC_DEFINE_DIR(GNOME_ICONDIR, ${iconsdir}, [Gnome Icon Directory]) AC_DEFINE_DIR(GNOME_PIXMAPSDIR, ${pixmapsdir}, [Gnome Pixmaps Directory]) AC_DEFINE_DIR(GNOME_GLADEDIR, ${gladedir}, [Glade Resources Directory]) dnl Add the languages which your application supports here. ALL_LINGUAS="ja zh_CN" AM_GLIB_GNU_GETTEXT AM_GCONF_SOURCE_2 GST_MAJORMINOR=0.10 PKG_CHECK_MODULES(GST,gstreamer-$GST_MAJORMINOR,HAVE_GST="yes",HAVE_GST="no") if test "x$HAVE_GST" = "xyes"; then AC_DEFINE(HAVE_GST,1,[Gstreamer]) else AC_MSG_WARN(You need GStreamer-0.10 or later installed if you need sound relevant functions) fi AC_SUBST(GST_CFLAGS) AC_SUBST(GST_LIBS) PACKAGE_CFLAGS="$G2IPMSG_CFLAGS $DBUSGLIB_CFLAGS $APPLET_CFLAGS $GST_CFLAGS $SSL_CPPFLAGS " PACKAGE_LIBS="$G2IPMSG_LIBS $DBUSGLIB_LIBS $APPLET_LIBS $GST_LIBS $SSL_LDFLAGS" AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) AC_OUTPUT([ Makefile src/Makefile po/Makefile.in ]) g2ipmsg-0.9.6+dfsg/depcomp000077500000000000000000000371001126724573600154100ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 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., 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 Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: g2ipmsg-0.9.6+dfsg/doc/000077500000000000000000000000001126724573600145775ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/doc/Doxyfile000066400000000000000000001531211126724573600163100ustar00rootroot00000000000000# Doxyfile 1.5.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file that # follow. The default is UTF-8 which is also the encoding used for all text before # the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into # libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of # possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = g2ipmsg # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc/internal # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = Japanese # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct (or union) is # documented as struct with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code where the coding convention is that all structs are # typedef'ed and only the typedef is referenced never the struct's name. TYPEDEF_HIDES_STRUCT = NO #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = TES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be extracted # and appear in the documentation as a namespace called 'anonymous_namespace{file}', # where file will be replaced with the base name of the file that contains the anonymous # namespace. By default anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = src # This tag can be used to specify the character encoding of the source files that # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default # input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. # See http://www.gnu.org/software/libiconv for the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.c *.h # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the output. # The symbol name can be a fully qualified name, a word, or if the wildcard * is used, # a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH # then you must also enable this option. If you don't then doxygen will produce # a warning and turn it on anyway SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = jlatex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = jlatex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = *.h # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to # produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to # specify the directory where the mscgen tool resides. If left empty the tool is assumed to # be found in the default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = YES # If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = YES # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = /usr/local/bin/dot # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the number # of direct children of the root node in a graph is already larger than # MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = YES # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = YES g2ipmsg-0.9.6+dfsg/g2ipmsg.desktop.in000066400000000000000000000003161126724573600174020ustar00rootroot00000000000000[Desktop Entry] Encoding=UTF-8 Terminal=false _Name=GNOME2 IP Messenger _Comment=IP Messenger for the GNOME2 Exec=g2ipmsg TryExec=g2ipmsg Icon=ipmsg.png Type=Application Categories=GTK;Application;Utility; g2ipmsg-0.9.6+dfsg/g2ipmsg.glade000066400000000000000000011033561126724573600164110ustar00rootroot00000000000000 True GDK_EXTENSION_EVENTS_ALL g2ipmsg GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True True True True GTK_SHADOW_NONE True GTK_PACK_DIRECTION_LTR GTK_PACK_DIRECTION_LTR True GNOMEUIINFO_MENU_FILE_TREE True Attachment True True gtk-file 1 0.5 0.5 0 0 True True GNOMEUIINFO_MENU_CLOSE_ITEM True True GNOMEUIINFO_MENU_SETTINGS_TREE True True GNOMEUIINFO_MENU_PREFERENCES_ITEM True True Set priority of entries Sort filter True True gtk-sort-ascending 1 0.5 0.5 0 0 True Set priority as 1 True True Set priority as 2 True True Set priority as 3 True True Set priority as 4 True True Set them as default True True Set them invisible item True True True Show invisible items True True Set all as default True True Set user list configurations. User list view config True True gtk-preferences 1 0.5 0.5 0 0 True Save current setting about user list. Save list headers state True True gtk-apply 1 0.5 0.5 0 0 True True Set security relevant configuration security configuration True True gtk-preferences 1 0.5 0.5 0 0 True GNOMEUIINFO_MENU_VIEW_TREE True Update True True gtk-refresh 1 0.5 0.5 0 0 True get version True True gtk-dialog-question 1 0.5 0.5 0 0 True get absence info True True gtk-dialog-question 1 0.5 0.5 0 0 True GNOMEUIINFO_MENU_HELP_TREE True GNOMEUIINFO_MENU_ABOUT_ITEM BONOBO_DOCK_TOP 0 0 0 BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL|BONOBO_DOCK_ITEM_BEH_LOCKED True False 0 True True 134 True False 0 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT 2 True Please select receivers or drop attachment files. True True False True True False False False 0 True True True False 0 1 40 78 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True current users True False True 0 True False True <b>Users</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 False False True Please push this button to update the user list. True gtk-refresh True GTK_RELIEF_NORMAL True 0 False False 4 False False True True True True GTK_POLICY_AUTOMATIC GTK_POLICY_ALWAYS GTK_SHADOW_IN GTK_CORNER_TOP_LEFT 120 True Please edit your message or drop attachment files. True True False True GTK_JUSTIFY_LEFT GTK_WRAP_CHAR True 0 0 0 0 0 0 True True 0 True True 40 True True 0 True Please push this button to close this window. True gtk-close True GTK_RELIEF_NORMAL True 0 False False 80 True Please push this button to send the message. True SEND True GTK_RELIEF_NORMAL True 0 False False True False 0 True Check here to make this message sealed. True enclose message True GTK_RELIEF_NORMAL True False False True 0 False False True Check here to lock this message(need to enclose the message). True lock True GTK_RELIEF_NORMAL True False False True 0 False False 0 True True 0 False False 0 True True True configuration GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True False 0 True False 0 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True Enter your nick name. True True True 0 True False True <b>User Name</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True False True True 0 True True True Please push here to add your group name. True Add True GTK_RELIEF_NORMAL True 0 False False True <b>Group Name</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True 1 True True True False 0 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True Please check here to receive read notification from receiver. True enable open check True GTK_RELIEF_NORMAL True False False True 0 False False True Refrain automatic popuped receive window creation. True Non-popup receive True GTK_RELIEF_NORMAL True False False True 0 False False True Please check here to refrain from playing sounds. True No sound True GTK_RELIEF_NORMAL True False False True 0 False False True Please check here if you want to send sealed messages as default. True check enclose message as default True GTK_RELIEF_NORMAL True False False True 0 False False True Please check here if you want to edit reply message with citation of original message. True check citation as default True GTK_RELIEF_NORMAL True False False True 0 False False True Please check here to use this software on the IP V6 environment. True enable IP V6 only mode (Need restart) True GTK_RELIEF_NORMAL True False False True 0 False False True Please check here to use this software on the dial up environment. True enable dial up connection mode True GTK_RELIEF_NORMAL True False False True 0 False False True Please check here to iconify read confirmation dialog window. True iconfy read confirmation dialog True GTK_RELIEF_NORMAL True False False True 0 False False True False 0 True External representation of IPMSG character code False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True False True 0 True True 0 True True True <b>Options</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True 2 2 False 0 0 True Please push this button to choose the log-file. True GTK_RELIEF_NORMAL True True 0.5 0.5 0 0 0 0 0 0 True False 2 True gtk-floppy 4 0.5 0.5 0 0 0 False False True log file True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 0 1 1 2 fill True This entry show log-file path, please edit here to specify your log-file path. True True True 0 True False 1 2 1 2 True Please check here to enable logging facility. True enable logging True GTK_RELIEF_NORMAL True False False True 0 1 0 1 fill True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 2 True Please check here to log user's logon name into the log-file. True logging logon name True GTK_RELIEF_NORMAL True False False True 0 False False 2 True Please check here to log user's IP addresses into the log-file. True logging IP Addresses True GTK_RELIEF_NORMAL True False False True 0 False False True Please check here if you want to log the content of the message after the message is opened when the message is locked. True logging locked messages after opening the message. True GTK_RELIEF_NORMAL True False False True 0 False False True <b>Logging Option</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 1 2 0 1 fill fill True <b>Logfile</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True 0 True True True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True Please input broad cast address. True True True 0 True False 0 True False True GTK_BUTTONBOX_SPREAD 0 True Please push this button to add the broad cast address to broad cast address list. True True >> True GTK_RELIEF_NORMAL True True Please push this button to remove the broad cast address from broad cast address list. True True << True GTK_RELIEF_NORMAL True 0 True False 1 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT 200 168 True This list shows broad cast addresses for entry/absence status notification. True True False False True False False False 0 True False True <b>Broadcast address setting</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 1 True True True False 0 True Please push this button to apply this configuration. True gtk-yes True GTK_RELIEF_NORMAL True 0 True True True Please push this button to discard this configuration True gtk-cancel True GTK_RELIEF_NORMAL True 0 True True 0 True True True g2ipmsg GTK_WINDOW_TOPLEVEL GTK_WIN_POS_CENTER False True False ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True True True 34 34 True True GTK_RELIEF_NORMAL True True ipmsg.xpm 0.5 0.5 0 0 0 True True True True True 0 True True 733 395 True DownLoad GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True 0 0.5 GTK_SHADOW_NONE True 0.5 0.5 1 1 0 0 12 0 True GTK_SHADOW_IN True 288 40 True This entry show where files are stored. True True True 0 True False 136 320 232 32 True Down load directory False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 8 288 96 40 True Please push this button to choose download directory. True gtk-open True GTK_RELIEF_NORMAL True 32 320 104 40 True Please push this button to start downloads. True gtk-ok True GTK_RELIEF_NORMAL True 448 320 144 40 True Please push this button to discard download files. True gtk-cancel True GTK_RELIEF_NORMAL True 560 320 712 248 True True GTK_POLICY_ALWAYS GTK_POLICY_ALWAYS GTK_SHADOW_NONE GTK_CORNER_TOP_LEFT 680 256 True Please select files to be saved. True True False False True False False False 0 0 216 24 True Please check here if you want to download all of selected files at once. True down load all at once True GTK_RELIEF_NORMAL True True False True 8 264 True <b>DownLoad files</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item True download dialog GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE True True False ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True True True gtk-save True GTK_RELIEF_NORMAL True 0 True True True gtk-close True GTK_RELIEF_NORMAL True -7 0 False True GTK_PACK_END True True GTK_POLICY_ALWAYS GTK_POLICY_ALWAYS GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True True True False False True False False False 0 True True 5 True GTK_FILE_CHOOSER_ACTION_SAVE True False False False save down loaded file GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE True True False ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True False 24 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True True gtk-open True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END 5 True GTK_FILE_CHOOSER_ACTION_SAVE True False False False LogFile GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True False 24 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True True gtk-open True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END 1 True False G2ipmsg Takeharu KATO Copyright (c) 2008, Takeharu KATO All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. True Takeharu KATO ZC Miao ipmsg.xpm True Read Message GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True False 0 True Read Message False False GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True False False GTK_JUSTIFY_CENTER True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True False False GTK_JUSTIFY_CENTER True False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True 0 True True True Receive message GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True False 2 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 35 True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True 25 True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True <b>Message from ...</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 False False 340 200 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True True False False False GTK_JUSTIFY_LEFT GTK_WRAP_CHAR False 0 0 0 0 0 0 0 True True 50 True True 0 True Please push this button to close this window. True gtk-close True GTK_RELIEF_NORMAL True 0 True True True Please push this button to reply. True GTK_RELIEF_NORMAL True True 0.5 0.5 0 0 0 0 0 0 True False 2 True gnome-stock-book-open 4 0.5 0.5 0 0 0 False False True Reply True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 0 True True True True 0 True Please check here to cite original message to reply. True Cite True GTK_RELIEF_NORMAL True False False True 0 True False 0 False True 0 False False True SendFail GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True False 0 True Can not send message False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True Retry? False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True 0 True True True Edit Attachments GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True 3 2 False 0 2 True Please push here to choose an attachment file. True gtk-open True GTK_RELIEF_NORMAL True 0 1 1 2 28 fill True False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 1 2 0 1 True False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 1 0 1 True False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 1 2 3 True False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 1 2 2 3 True This entry show the attachment file path. True True True 0 True False 1 2 1 2 True <b>FileChooser</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 False False 4 True GTK_BUTTONBOX_SPREAD 0 True Please push this button to add the file into attachment file list. True True >> True GTK_RELIEF_NORMAL True True Please push this button to remove the file from attachment file list. True True << True GTK_RELIEF_NORMAL True 0 True False True 0 0.5 GTK_SHADOW_IN True 0.5 0.5 1 1 0 0 12 0 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT 1 200 100 True This list shows attachment files of the message. True True False True True False False False True <b>Attached files</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True <b>Attachment Editor</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item True Overwrite comfirmation GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True 0 0.5 GTK_SHADOW_IN True 0.5 0.5 1 1 0 0 12 0 True True 0 True Following file already exist: False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True FilePath False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True Over Write? False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True <b>Over write confirmation</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True Down load monitor GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False False ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True 440 36 True GTK_BUTTONBOX_SPREAD 0 True Please push this button to revoke permission to down load the file. True True gtk-remove True GTK_RELIEF_NORMAL True True Please push this button to update the download file list. True True gtk-refresh True GTK_RELIEF_NORMAL True True Please push this button to close this window. True True gtk-close True GTK_RELIEF_NORMAL True 8 256 536 240 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True True GTK_POLICY_ALWAYS GTK_POLICY_ALWAYS GTK_SHADOW_NONE GTK_CORNER_TOP_LEFT True This list shows download files which you sent. True True False False True False False False True <b>download files</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 16 8 True password GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True False 0 True True 0 True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True True 0 True current password False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True True True False 0 True False 0 True True 0 True True True True 0 130 True password False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True True True False 0 True False 0 True True 0 True True True True 0 130 True confirm password False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True True True False 0 True False 0 True True 0 True True 0 True True True GTK_BUTTONBOX_SPREAD 0 True True True gtk-ok True GTK_RELIEF_NORMAL True True True True gtk-cancel True GTK_RELIEF_NORMAL True 0 True True 268 True Absence Notification GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True False 0 True 0 0.5 GTK_SHADOW_IN True 0.5 0.5 1 1 0 0 12 0 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True This list shows absence message titiles. True False False True True False False False True <b>Titles</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 False False True False 0 True False 0 True 0 0.5 GTK_SHADOW_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True False 0 True Title False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 3 False True True This entry show absence message title, please edit this entry as you like. True True True 0 True False 0 True True 0 True True True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True Please edit this entry as you like to modify the absence message. True True False True GTK_JUSTIFY_LEFT GTK_WRAP_NONE True 0 0 0 0 0 0 0 True True True <b>Absence message</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True 0 True True 1 True GTK_BUTTONBOX_SPREAD 5 True Please push this button to apply changes and to enter the absent mode. True True Set absent mode True GTK_RELIEF_NORMAL True True Push this button to apply changes on this absence message. True True Apply Only True GTK_RELIEF_NORMAL True True Please push this button to close this window. True True gtk-close True GTK_RELIEF_NORMAL True 0 False False 0 True True True Down load complete GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True Please push this button to close this window. True True gtk-close True GTK_RELIEF_NORMAL True -7 True Please push this button to open the directory which the downloaded file is stored. True True gtk-open True GTK_RELIEF_NORMAL True -5 True Please push this button to handle the downloaded file. True True gtk-execute True GTK_RELIEF_NORMAL True -3 0 False True GTK_PACK_END True 0 0.5 GTK_SHADOW_NONE True 0.5 0.5 1 1 0 0 12 0 True False 0 True FileName False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True FileSize False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True appName False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True <b>Down Load Complete</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True Down load failed GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True False 0 True Can not receive the file properly. False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True Retry this file? False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 0 True True True down load complete GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True False 0 True Down load complete False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True Do you want to open the directory? False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True Directory False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 0 True True True View Config GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False False ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True False 0 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True False 0 True 2 3 False 0 0 True True Group True GTK_RELIEF_NORMAL True False False True 0 1 0 1 fill True True Host Name True GTK_RELIEF_NORMAL True False False True 1 2 0 1 fill True True IP Address True GTK_RELIEF_NORMAL True False False True 2 3 0 1 fill True True Logon Name True GTK_RELIEF_NORMAL True False False True 0 1 1 2 fill True True Priority True GTK_RELIEF_NORMAL True False False True 1 2 1 2 fill True True Show Grid True GTK_RELIEF_NORMAL True False False True 2 3 1 2 fill 0 True True 10 True True False False False GTK_JUSTIFY_LEFT GTK_WRAP_WORD False 0 0 0 0 0 0 You can reorder list header by drag-and-drop the list header. 0 False False 0 True True True <b>user list view relevant options</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True True 0 True True Sort with group True GTK_RELIEF_NORMAL True False False True 0 True False True True Descending Sort True GTK_RELIEF_NORMAL True False False 0 True False True <b>Sort with group</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True False True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True 2 2 True 2 2 True True User Name True GTK_RELIEF_NORMAL True True False True 0 1 0 1 expand True True Machine Name True GTK_RELIEF_NORMAL True False False True secondKeyUserRBtn 0 1 1 2 expand True True IP Address True GTK_RELIEF_NORMAL True False False True secondKeyUserRBtn 1 2 0 1 expand True True Descending Sort True GTK_RELIEF_NORMAL True False False 1 2 1 2 fill True <b>Sort with following key</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True False True <b>Sotring Configuration</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True True 0 True True gtk-close True GTK_RELIEF_NORMAL True 0 False False True True gtk-apply True GTK_RELIEF_NORMAL True 0 False False 0 False False True Sort filter True True Set priority as 1 True True Set priority as 2 True True Set priority as 3 True True Set priority as 4 True True Set them as default True True Set them invisible item True True True Show invisible items True True Set all as default True True Group selection True True AttachmentFile True True True Save list headers state True True User list view config True True client information GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True ipmsg.xpm True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True False 0 True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False 0 False False True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_IN GTK_CORNER_TOP_LEFT True True False False True GTK_JUSTIFY_LEFT GTK_WRAP_NONE True 0 0 0 0 0 0 0 True True True True gtk-ok True GTK_RELIEF_NORMAL True 0 False False True <b>Client Information</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item True Host List Control/Security GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False False ipmsg.png True False False GDK_WINDOW_TYPE_HINT_NORMAL GDK_GRAVITY_NORTH_WEST True False True False 0 True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True Please check here if you want to send your host list to other hosts. True Allow host list sending True GTK_RELIEF_NORMAL True False False True 0 False False True Please check here if you want to obtain host lists from other hosts. True Enable getting host list facility True GTK_RELIEF_NORMAL True False False True 0 False False True <b>Host list</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True 5 3 False 0 0 True Please check here if you want to use RC2 40 bits key for encryption. True RC2 40 bits True GTK_RELIEF_NORMAL True False False True 0 1 0 1 fill True Please check here if you want to use RC2 128 bits key for encryption. True RC2 128 bits True GTK_RELIEF_NORMAL True False False True 1 2 0 1 fill True Please check here if you want to use RC2 256 bits key for encryption. True RC2 256 bits True GTK_RELIEF_NORMAL True False False True 2 3 0 1 fill True Please check here if you want to use blowfish 128 bits key for encryption. True Blowfish 128 bits True GTK_RELIEF_NORMAL True False False True 0 1 1 2 fill True Please check here if you want to use blowfish 256 bits key for encryption. True Blowfish 256 bits True GTK_RELIEF_NORMAL True False False True 1 2 1 2 fill True Please check here if you want to use MD5 hash function to sign your messages. True MD5 sign True GTK_RELIEF_NORMAL True False False True 0 1 4 5 fill True Please check here if you want to use SHA1 hash function to sign your messages. True SHA1 sign True GTK_RELIEF_NORMAL True False False True 1 2 4 5 fill True Please check here if you want to use RSA 512 bits key to encrypt the common key. True RSA 512 bits True GTK_RELIEF_NORMAL True False False True 0 1 3 4 fill True Please check here if you want to use RSA 1024 bits key to encrypt the common key. True RSA 1024 bits True GTK_RELIEF_NORMAL True False False True 1 2 3 4 fill True Please check here if you want to use RSA 2048 bits key to encrypt the common key. True RSA 2048 bits True GTK_RELIEF_NORMAL True False False True 2 3 3 4 fill True Please check here if you want to use AES 128 bits key for encryption. True AES 128 bits True GTK_RELIEF_NORMAL True False False True 0 1 2 3 fill True Please check here if you want to use AES 192 bits key for encryption. True AES 192 bits True GTK_RELIEF_NORMAL True False False True 1 2 2 3 fill True Please check here if you want to use AES 256 bits key for encryption. True AES 256 bits True GTK_RELIEF_NORMAL True False False True 2 3 2 3 fill True <b>Cipher selection</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True 0 0.5 GTK_SHADOW_ETCHED_IN True 0.5 0.5 1 1 0 0 12 0 True False 0 True Please check here if you want to select the common key according to its coding speed.Please note that some clients can not handle arbitary combinations of keys(i.e. Windows client can handle RSA 1024 bits with Blowfish 128 bits or RSA 512 bits with RC2 40 bits). True Select the encrypt key according to its speed True GTK_RELIEF_NORMAL True False False True 0 True True True True 0 True Please check here if you want to store public/private keys with encryption . True Store encrypted public/private key pairs True GTK_RELIEF_NORMAL True False False True 0 False False True Please push this button to set password for private/public key encryption. True set password True GTK_RELIEF_NORMAL True 0 True False 0 True True True True 0 True Please check here if you want to use the lock feature(Sent messages can be opened by receiver's password.) True Enable lock for enclosed messages True GTK_RELIEF_NORMAL True False False True 0 True True True Please push this button to set password for unlock messages. True set password True GTK_RELIEF_NORMAL True 0 False False 0 True True True <b>Security Relevant Options</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True GTK_BUTTONBOX_SPREAD 0 True Please push this button to apply the configuration. True True gtk-ok True GTK_RELIEF_NORMAL True True Please push this button to discard the configuration. True True gtk-cancel True GTK_RELIEF_NORMAL True 0 True True True Password GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False False True ipmsg.png True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True Please push this button to discard your input. True True gtk-cancel True GTK_RELIEF_NORMAL True -6 True Please push this button to finish inputing password. True True gtk-ok True GTK_RELIEF_NORMAL True -5 0 False True GTK_PACK_END True False 0 True password False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 True True True Please input password here(push OK button to finish.). True True False 0 True False 0 True True 0 True True True error GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True True gtk-dialog-error True False False GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True False True True False 0 True GTK_BUTTONBOX_END True Please push this button to close this dialog. True True gtk-close True GTK_RELIEF_NORMAL True -7 0 False True GTK_PACK_END True False 0 True g2ipmsg detects an error False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 0 False False True 0 0.5 GTK_SHADOW_ETCHED_OUT True 0.5 0.5 1 1 0 0 12 0 True 3 2 False 0 0 True FileName False False GTK_JUSTIFY_LEFT False False 0 0.5 4 4 PANGO_ELLIPSIZE_NONE -1 False 0 0 1 0 1 fill True Function False False GTK_JUSTIFY_LEFT False False 0 0.5 4 4 PANGO_ELLIPSIZE_NONE -1 False 0 0 1 1 2 fill True Line False False GTK_JUSTIFY_LEFT False False 0 0.5 4 4 PANGO_ELLIPSIZE_NONE -1 False 0 0 1 2 3 fill True False False GTK_JUSTIFY_RIGHT False False 0 0.5 4 4 PANGO_ELLIPSIZE_NONE -1 False 0 1 2 0 1 expand True False False GTK_JUSTIFY_RIGHT False False 0 0.5 4 4 PANGO_ELLIPSIZE_NONE -1 False 0 1 2 1 2 expand True False False GTK_JUSTIFY_RIGHT False False 0 0.5 4 4 PANGO_ELLIPSIZE_NONE -1 False 0 1 2 2 3 fill True <b>Error Information</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True True 0 0.5 GTK_SHADOW_NONE True 0.5 0.5 1 1 0 0 12 0 True True GTK_POLICY_AUTOMATIC GTK_POLICY_AUTOMATIC GTK_SHADOW_ETCHED_OUT GTK_CORNER_TOP_LEFT True Descriptions of the error. True False False True GTK_JUSTIFY_LEFT GTK_WRAP_CHAR True 0 0 0 0 0 0 True <b>Error Message</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 PANGO_ELLIPSIZE_NONE -1 False 0 label_item 0 True True 0 True True g2ipmsg-0.9.6+dfsg/g2ipmsg.gladep000066400000000000000000000003541126724573600165620ustar00rootroot00000000000000 G2ipmsg g2ipmsg g2ipmsg-0.9.6+dfsg/g2ipmsg.schemas.in000066400000000000000000000435501126724573600173630ustar00rootroot00000000000000 /schemas/apps/g2ipmsg/portno /apps/g2ipmsg/portno g2ipmsg int 2425 Port number The port number which g2ipmsg uses. /schemas/apps/g2ipmsg/group /apps/g2ipmsg/group g2ipmsg string Default Group Group Name Group name which you belong to. /schemas/apps/g2ipmsg/nickname /apps/g2ipmsg/nickname g2ipmsg string Default Nick Name Nick name Nick name which is displayed on ipmsg window. /schemas/apps/g2ipmsg/secret /apps/g2ipmsg/secret g2ipmsg bool true Secret message Set on this if you want send messages with seal as a default. /schemas/apps/g2ipmsg/confirm /apps/g2ipmsg/confirm g2ipmsg bool true read message confirmation Check read message confirmation as default. /schemas/apps/g2ipmsg/broadcasts /apps/g2ipmsg/broadcasts g2ipmsg list string [255.255.255.255] Broadcast addresses Set Broadcast addresses. /schemas/apps/g2ipmsg/popup /apps/g2ipmsg/popup g2ipmsg bool false popup messages Popup message windows. /schemas/apps/g2ipmsg/sound /apps/g2ipmsg/sound g2ipmsg bool false Sound setting Avoid playing sound on message arrive. /schemas/apps/g2ipmsg/enclose /apps/g2ipmsg/enclose g2ipmsg bool true enclose Enclose messages as default. /schemas/apps/g2ipmsg/cite /apps/g2ipmsg/cite g2ipmsg bool false Citation Control Check citation as default. /schemas/apps/g2ipmsg/ipv6 /apps/g2ipmsg/ipv6 g2ipmsg bool false Enable IP V6 mode Set this option if use g2ipmsg on IP V6 network /schemas/apps/g2ipmsg/logfilepath /apps/g2ipmsg/logfilepath g2ipmsg string ipmsg.log log file Set log file name. /schemas/apps/g2ipmsg/enablelog /apps/g2ipmsg/enablelog g2ipmsg bool false Enable logging Enable logging on log-file. /schemas/apps/g2ipmsg/enablelogname /apps/g2ipmsg/enablelogname g2ipmsg bool false logon-name logging Logging user's logon name. /schemas/apps/g2ipmsg/enablelogaddr /apps/g2ipmsg/enablelogaddr g2ipmsg bool false IP address logging Enable IP address logging. /schemas/apps/g2ipmsg/loglockedmessage /apps/g2ipmsg/loglockedmessage g2ipmsg bool false logging locked message after openning it Please check here if you want to log the content of the message after the message is opened when the message is locked. /schemas/apps/g2ipmsg/citestring /apps/g2ipmsg/citestring g2ipmsg string > Citation prefix String which indicate citation. /schemas/apps/g2ipmsg/absence_titles /apps/g2ipmsg/absence_titles g2ipmsg list string [ABSENT,EATING,OUT,MEETING,VISITOR,HOME,EDO,SHUKKE] Absence titile set Absense titles /schemas/apps/g2ipmsg/absence_messages /apps/g2ipmsg/absence_messages g2ipmsg list string [I am absent now.,I have been gone somewhere to eat.,I am out now.,I attend meeting now.,A visitor comes here.,I have come home.,Edo,Shukke.] Absence messages Absence messages /schemas/apps/g2ipmsg/enable_debug /apps/g2ipmsg/enable_debug g2ipmsg bool false enable debug output enable debug output /schemas/apps/g2ipmsg/msg_win_width /apps/g2ipmsg/msg_win_width g2ipmsg int 325 message window width Change default message window width /schemas/apps/g2ipmsg/msg_win_height /apps/g2ipmsg/msg_win_height g2ipmsg int 370 message window height Change default message window height /schemas/apps/g2ipmsg/recv_win_width /apps/g2ipmsg/recv_win_width g2ipmsg int 340 receive window width Change default receive window width /schemas/apps/g2ipmsg/recv_win_height /apps/g2ipmsg/recv_win_height g2ipmsg int 333 receive window height Change default receive window height /schemas/apps/g2ipmsg/attach_win_width /apps/g2ipmsg/attach_win_width g2ipmsg int 600 Attachment editor width Change default attachment editor width /schemas/apps/g2ipmsg/attach_win_height /apps/g2ipmsg/attach_win_height g2ipmsg int 170 Attachment editor height Change default attachment editor height /schemas/apps/g2ipmsg/absence_win_width /apps/g2ipmsg/absence_win_width g2ipmsg int 600 Absence message editor width Change default absence message editor width /schemas/apps/g2ipmsg/absence_win_height /apps/g2ipmsg/absence_win_height g2ipmsg int 290 Absence message editor height Change default absence message editor height /schemas/apps/g2ipmsg/dialup /apps/g2ipmsg/dialup g2ipmsg bool false Enable dialup mode Set this option to enable dialup mode. /schemas/apps/g2ipmsg/get_host_list /apps/g2ipmsg/get_host_list g2ipmsg bool false Enable getting host list facility Set this option to enable getting host list facility /schemas/apps/g2ipmsg/allow_host_list /apps/g2ipmsg/allow_host_list g2ipmsg bool false Allow host list sending Set this option to allow host list sending /schemas/apps/g2ipmsg/default_prio /apps/g2ipmsg/default_prio g2ipmsg list string Default priority Default priority(Separated by '@') /schemas/apps/g2ipmsg/use_systray /apps/g2ipmsg/use_systray g2ipmsg bool true Use SysTray Please set here if you want to use g2ipmsg in the System Tray, This need the system tray which perform with freedesktop.org compliant System Tray Protocol(see:http://www.freedesktop.org/wiki/Standards/systemtray-spec. This require gtk-2.10 or later). /schemas/apps/g2ipmsg/header_visible /apps/g2ipmsg/header_visible g2ipmsg int 5 Header visual Header visual state /schemas/apps/g2ipmsg/header_order /apps/g2ipmsg/header_order g2ipmsg list int [0,1,2,3,4,5] Header order Internal header order representation. /schemas/apps/g2ipmsg/sort_with_group /apps/g2ipmsg/sort_with_group g2ipmsg bool false Sort user list with group Set here if you want to sort user list with group. /schemas/apps/g2ipmsg/sub_sort_id /apps/g2ipmsg/sub_sort_id g2ipmsg int 0 Sub sorting id Internal representation of sub sorting id. /schemas/apps/g2ipmsg/group_sort_descending /apps/g2ipmsg/group_sort_descending g2ipmsg bool false Group sort with descending order. Set here to sort user list with descending ordered group name. /schemas/apps/g2ipmsg/sub_sort_descending /apps/g2ipmsg/sub_sort_descending g2ipmsg bool false Sub sort with descending order Set here to sort user list with descending ordered sub sort key. /schemas/apps/g2ipmsg/crypt_policy_speed /apps/g2ipmsg/crypt_policy_speed g2ipmsg bool false Select cipher according to speed. Set this option to select ciphers according to encoding/decoding speed. If you use low speed machine, please set this option. /schemas/apps/g2ipmsg/ciphers /apps/g2ipmsg/ciphers g2ipmsg int 268881927 Select ciphers. Select ciphers to encrypt messages. /schemas/apps/g2ipmsg/encrypt_publickey /apps/g2ipmsg/encrypt_publickey g2ipmsg bool FALSE Store encrypted public/private key pairs Please check here if you want to store public/private keys with encryption . /schemas/apps/g2ipmsg/lock /apps/g2ipmsg/lock g2ipmsg bool FALSE Enable lock for enclosed messages Please check here if you want to use the lock feature(Sent messages can be opened by receiver's password.) /schemas/apps/g2ipmsg/enc_pass /apps/g2ipmsg/enc_pass g2ipmsg string encryption password for public/private key storage Encryption password for public/private key storage. This is encoded with pbkdf2. /schemas/apps/g2ipmsg/lock_pass /apps/g2ipmsg/lock_pass g2ipmsg string encryption password for lock Encryption password for lock. This is encoded with pbkdf2. /schemas/apps/g2ipmsg/iconify_dialogs /apps/g2ipmsg/iconify_dialogs g2ipmsg bool false Inconify dialogs Iconify normal dialogs when they are shown at first time. /schemas/apps/g2ipmsg/external_encoding /apps/g2ipmsg/external_encoding g2ipmsg string CP932 External encoding for message External message encoding to exchange messages via the network. g2ipmsg-0.9.6+dfsg/g2ipmsg.server.in.in000066400000000000000000000023131126724573600176430ustar00rootroot00000000000000 g2ipmsg-0.9.6+dfsg/g2ipmsg.spec000066400000000000000000000033511126724573600162600ustar00rootroot00000000000000Summary: IP Messenger for GNOME 2. Name: g2ipmsg Version: 0.9.6 Release: 1 License: BSD Group: Applications/Internet URL: http://www.ipmsg.org/ Source0: %{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description This package contains IP Messenger for the GNOME2 desktop environment. IP Messenger is a pop up style message communication software for multi platforms. It is based on TCP/IP(UDP). Win, Win16, Mac/MacOSX, X11R6/GTK/GNOME, Java, Div version and all source is open to public. You can get in the following URL. http://www.ipmsg.org/index.html.en %prep %setup -q %build %configure --disable-schemas-install make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install /usr/bin/install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas/ /usr/bin/install -c -m 644 g2ipmsg.schemas $RPM_BUILD_ROOT%{_sysconfdir}/gconf/schemas/%{name}.schemas %find_lang g2ipmsg %clean rm -rf $RPM_BUILD_ROOT %post GCONF_CONFIG_SOURCE=xml::/etc/gconf/gconf.xml.defaults \ /usr/bin/gconftool-2 \ --makefile-install-rule %{_sysconfdir}/gconf/schemas/%{name}.schemas %files -f g2ipmsg.lang %defattr(-,root,root) %attr(0755,root,root) %{_bindir}/g2ipmsg %attr(0755,root,root) %{_bindir}/g2ipmsg_applet %config %{_sysconfdir}/gconf/schemas/%{name}.schemas %dir %{_datadir}/pixmaps/g2ipmsg %{_libdir}/bonobo/servers/g2ipmsg.server %{_datadir}/gnome-2.0/ui/g2ipmsg.xml %{_datadir}/pixmaps/g2ipmsg/ipmsg.xpm %{_datadir}/pixmaps/g2ipmsg/ipmsgrev.xpm %{_datadir}/pixmaps/ipmsg.png %dir %{_datadir}/sounds/g2ipmsg %{_datadir}/sounds/g2ipmsg/g2ipmsg.ogg %{_datadir}/applications/g2ipmsg.desktop %doc COPYING README README.jp %changelog * Sun Dec 17 2006 Takeharu KATO - - Initial build. g2ipmsg-0.9.6+dfsg/g2ipmsg.xml000066400000000000000000000026261126724573600161320ustar00rootroot00000000000000 g2ipmsg-0.9.6+dfsg/install-sh000077500000000000000000000220211126724573600160330ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. 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}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: g2ipmsg-0.9.6+dfsg/intltool-extract.in000066400000000000000000000556501126724573600177110ustar00rootroot00000000000000#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Extractor # # Copyright (C) 2000-2001, 2003 Free Software Foundation. # # Intltool 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. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, 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. # # Authors: Kenneth Christiansen # Darin Adler # ## Release information my $PROGRAM = "intltool-extract"; my $PACKAGE = "intltool"; my $VERSION = "0.37.1"; ## Loaded modules use strict; use File::Basename; use Getopt::Long; ## Scalars used by the option stuff my $TYPE_ARG = "0"; my $LOCAL_ARG = "0"; my $HELP_ARG = "0"; my $VERSION_ARG = "0"; my $UPDATE_ARG = "0"; my $QUIET_ARG = "0"; my $SRCDIR_ARG = "."; my $FILE; my $OUTFILE; my $gettext_type = ""; my $input; my %messages = (); my %loc = (); my %count = (); my %comments = (); my $strcount = 0; my $XMLCOMMENT = ""; ## Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; ## Always print first $| = 1; ## Handle options GetOptions ( "type=s" => \$TYPE_ARG, "local|l" => \$LOCAL_ARG, "help|h" => \$HELP_ARG, "version|v" => \$VERSION_ARG, "update" => \$UPDATE_ARG, "quiet|q" => \$QUIET_ARG, "srcdir=s" => \$SRCDIR_ARG, ) or &error; &split_on_argument; ## Check for options. ## This section will check for the different options. sub split_on_argument { if ($VERSION_ARG) { &version; } elsif ($HELP_ARG) { &help; } elsif ($LOCAL_ARG) { &place_local; &extract; } elsif ($UPDATE_ARG) { &place_normal; &extract; } elsif (@ARGV > 0) { &place_normal; &message; &extract; } else { &help; } } sub place_normal { $FILE = $ARGV[0]; $OUTFILE = "$FILE.h"; my $dirname = dirname ($OUTFILE); if (! -d "$dirname" && $dirname ne "") { system ("mkdir -p $dirname"); } } sub place_local { $FILE = $ARGV[0]; $OUTFILE = fileparse($FILE, ()); if (!-e "tmp/") { system("mkdir tmp/"); } $OUTFILE = "./tmp/$OUTFILE.h" } sub determine_type { if ($TYPE_ARG =~ /^gettext\/(.*)/) { $gettext_type=$1 } } ## Sub for printing release information sub version{ print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Copyright (C) 2000, 2003 Free Software Foundation, Inc. Written by Kenneth Christiansen, 2000. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. _EOF_ exit; } ## Sub for printing usage information sub help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... [FILENAME] Generates a header file from an XML source file. It grabs all strings between <_translatable_node> and its end tag in XML files. Read manpage (man ${PROGRAM}) for more info. --type=TYPE Specify the file type of FILENAME. Currently supports: "gettext/glade", "gettext/ini", "gettext/keys" "gettext/rfc822deb", "gettext/schemas", "gettext/scheme", "gettext/xml", "gettext/quoted", "gettext/quotedxml" -l, --local Writes output into current working directory (conflicts with --update) --update Writes output into the same directory the source file reside (conflicts with --local) --srcdir Root of the source tree -v, --version Output version information and exit -h, --help Display this help and exit -q, --quiet Quiet mode Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub error{ print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub message { print "Generating C format header file for translation.\n" unless $QUIET_ARG; } sub extract { &determine_type; &convert; open OUT, ">$OUTFILE"; binmode (OUT) if $^O eq 'MSWin32'; &msg_write; close OUT; print "Wrote $OUTFILE\n" unless $QUIET_ARG; } sub convert { ## Reading the file { local (*IN); local $/; #slurp mode open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!"; $input = ; } &type_ini if $gettext_type eq "ini"; &type_keys if $gettext_type eq "keys"; &type_xml if $gettext_type eq "xml"; &type_glade if $gettext_type eq "glade"; &type_scheme if $gettext_type eq "scheme"; &type_schemas if $gettext_type eq "schemas"; &type_rfc822deb if $gettext_type eq "rfc822deb"; &type_quoted if $gettext_type eq "quoted"; &type_quotedxml if $gettext_type eq "quotedxml"; } sub entity_decode_minimal { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; return $_; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/<//g; s/&/&/g; return $_; } sub escape_char { return '\"' if $_ eq '"'; return '\n' if $_ eq "\n"; return '\\\\' if $_ eq '\\'; return $_; } sub escape { my ($string) = @_; return join "", map &escape_char, split //, $string; } sub type_ini { ### For generic translatable desktop files ### while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) { if (defined($2)) { $comments{$3} = $2; } $messages{$3} = []; } } sub type_keys { ### For generic translatable mime/keys files ### while ($input =~ /^\s*_\w+=(.*)$/mg) { $messages{$1} = []; } } sub type_xml { ### For generic translatable XML files ### my $tree = readXml($input); parseTree(0, $tree); } sub print_var { my $var = shift; my $vartype = ref $var; if ($vartype =~ /ARRAY/) { my @arr = @{$var}; print "[ "; foreach my $el (@arr) { print_var($el); print ", "; } print "] "; } elsif ($vartype =~ /HASH/) { my %hash = %{$var}; print "{ "; foreach my $key (keys %hash) { print "$key => "; print_var($hash{$key}); print ", "; } print "} "; } else { print $var; } } # Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment) sub getAttributeString { my $sub = shift; my $do_translate = shift || 1; my $language = shift || ""; my $translate = shift; my $result = ""; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; ## differences from intltool-merge.in.in if ($key =~ /^_/) { $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT; $messages{entity_decode($string)} = []; $$translate = 2; } ## differences end here from intltool-merge.in.in $result .= " $key=$quote$string$quote"; } return $result; } # Verbatim copy from intltool-merge.in.in sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } # Based on traverse() in intltool-merge.in.in sub traverse { my $fh = shift; # unused, to allow us to sync code between -merge and -extract my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if ($nodename && "$nodename" eq "1") { $XMLCOMMENT = $content; } elsif ($nodename) { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup && $translate != 2) { $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT; $messages{$lookup} = []; } elsif ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } } else { $XMLCOMMENT = ""; my $count = scalar(@all); if ($count > 0) { my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } } } $XMLCOMMENT = ""; } } # Verbatim copy from intltool-merge.in.in, $fh for compatibility sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_comment { my $expat = shift; my $data = $expat->original_string(); my $clist = $expat->{Curlist}; my $pos = $#$clist; $data =~ s/^$//s; push @$clist, 1 => $data; } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } # Verbatim copy from intltool-merge.in.in sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } # Verbatim copy from intltool-merge.in.in sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } # Copied from intltool-merge.in.in and added comment handler. sub readXml { my $xmldoc = shift || return; my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); ## differences from intltool-merge.in.in $xp->setHandlers(Comment => \&intltool_tree_comment); ## differences end here from intltool-merge.in.in my $tree = $xp->parse($xmldoc); #print_var($tree); # Hello thereHowdydo # would be: # [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, # [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub type_schemas { ### For schemas XML files ### # FIXME: We should handle escaped < (less than) while ($input =~ / \s* (\s*(?:\s*)?(.*?)\s*<\/default>\s*)? (\s*(?:\s*)?(.*?)\s*<\/short>\s*)? (\s*(?:\s*)?(.*?)\s*<\/long>\s*)? <\/locale> /sgx) { my @totranslate = ($3,$6,$9); my @eachcomment = ($2,$5,$8); foreach (@totranslate) { my $currentcomment = shift @eachcomment; next if !$_; s/\s+/ /g; $messages{entity_decode_minimal($_)} = []; $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment)); } } } sub type_rfc822deb { ### For rfc822-style Debian configuration files ### my $lineno = 1; my $type = ''; while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg) { my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5); while ($pre =~ m/\n/g) { $lineno ++; } $lineno += length($newline); my @str_list = rfc822deb_split(length($underscore), $text); for my $str (@str_list) { $strcount++; $messages{$str} = []; $loc{$str} = $lineno; $count{$str} = $strcount; my $usercomment = ''; while($pre =~ s/(^|\n)#([^\n]*)$//s) { $usercomment = "\n" . $2 . $usercomment; } $comments{$str} = $tag . $usercomment; } $lineno += ($text =~ s/\n//g); } } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub type_quoted { while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { my $message = $1; my $before = $`; $message =~ s/\\\"/\"/g; $before =~ s/[^\n]//g; $messages{$message} = []; $loc{$message} = length ($before) + 2; } } sub type_quotedxml { while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { my $message = $1; my $before = $`; $message =~ s/\\\"/\"/g; $message = entity_decode($message); $before =~ s/[^\n]//g; $messages{$message} = []; $loc{$message} = length ($before) + 2; } } sub type_glade { ### For translatable Glade XML files ### my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message"; while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) { # Glade sometimes uses tags that normally mark translatable things for # little bits of non-translatable content. We work around this by not # translating strings that only includes something like label4 or window1. $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/; } while ($input =~ /(..[^<]*)<\/items>/sg) { for my $item (split (/\n/, $1)) { $messages{entity_decode($item)} = []; } } ## handle new glade files while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) { $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/; if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) { $comments{entity_decode($3)} = entity_decode($2) ; } } while ($input =~ /]*)"\s+description="([^>]+)"\/>/sg) { $messages{entity_decode_minimal($2)} = []; } } sub type_scheme { my ($line, $i, $state, $str, $trcomment, $char); for $line (split(/\n/, $input)) { $i = 0; $state = 0; # 0 - nothing, 1 - string, 2 - translatable string while ($i < length($line)) { if (substr($line,$i,1) eq "\"") { if ($state == 2) { $comments{$str} = $trcomment if ($trcomment); $messages{$str} = []; $str = ''; $state = 0; $trcomment = ""; } elsif ($state == 1) { $str = ''; $state = 0; $trcomment = ""; } else { $state = 1; $str = ''; if ($i>0 && substr($line,$i-1,1) eq '_') { $state = 2; } } } elsif (!$state) { if (substr($line,$i,1) eq ";") { $trcomment = substr($line,$i+1); $trcomment =~ s/^;*\s*//; $i = length($line); } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) { $trcomment = ""; } } else { if (substr($line,$i,1) eq "\\") { $char = substr($line,$i+1,1); if ($char ne "\"" && $char ne "\\") { $str = $str . "\\"; } $i++; } $str = $str . substr($line,$i,1); } $i++; } } } sub msg_write { my @msgids; if (%count) { @msgids = sort { $count{$a} <=> $count{$b} } keys %count; } else { @msgids = sort keys %messages; } for my $message (@msgids) { my $offsetlines = 1; $offsetlines++ if $message =~ /%/; if (defined ($comments{$message})) { while ($comments{$message} =~ m/\n/g) { $offsetlines++; } } print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n" if defined $loc{$message}; print OUT "/* ".$comments{$message}." */\n" if defined $comments{$message}; print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/; my @lines = split (/\n/, $message, -1); for (my $n = 0; $n < @lines; $n++) { if ($n == 0) { print OUT "char *s = N_(\""; } else { print OUT " \""; } print OUT escape($lines[$n]); if ($n < @lines - 1) { print OUT "\\n\"\n"; } else { print OUT "\");\n"; } } } } g2ipmsg-0.9.6+dfsg/intltool-merge.in000066400000000000000000001147461126724573600173400ustar00rootroot00000000000000#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Merger # # Copyright (C) 2000, 2003 Free Software Foundation. # Copyright (C) 2000, 2001 Eazel, Inc # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, 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. # # Authors: Maciej Stachowiak # Kenneth Christiansen # Darin Adler # # Proper XML UTF-8'ification written by Cyrille Chepelov # ## Release information my $PROGRAM = "intltool-merge"; my $PACKAGE = "intltool"; my $VERSION = "0.37.1"; ## Loaded modules use strict; use Getopt::Long; use Text::Wrap; use File::Basename; my $must_end_tag = -1; my $last_depth = -1; my $translation_depth = -1; my @tag_stack = (); my @entered_tag = (); my @translation_strings = (); my $leading_space = ""; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $BA_STYLE_ARG = 0; my $XML_STYLE_ARG = 0; my $KEYS_STYLE_ARG = 0; my $DESKTOP_STYLE_ARG = 0; my $SCHEMAS_STYLE_ARG = 0; my $RFC822DEB_STYLE_ARG = 0; my $QUOTED_STYLE_ARG = 0; my $QUOTEDXML_STYLE_ARG = 0; my $QUIET_ARG = 0; my $PASS_THROUGH_ARG = 0; my $UTF8_ARG = 0; my $MULTIPLE_OUTPUT = 0; my $cache_file; ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "quiet|q" => \$QUIET_ARG, "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility "ba-style|b" => \$BA_STYLE_ARG, "xml-style|x" => \$XML_STYLE_ARG, "keys-style|k" => \$KEYS_STYLE_ARG, "desktop-style|d" => \$DESKTOP_STYLE_ARG, "schemas-style|s" => \$SCHEMAS_STYLE_ARG, "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG, "quoted-style" => \$QUOTED_STYLE_ARG, "quotedxml-style" => \$QUOTEDXML_STYLE_ARG, "pass-through|p" => \$PASS_THROUGH_ARG, "utf8|u" => \$UTF8_ARG, "multiple-output|m" => \$MULTIPLE_OUTPUT, "cache|c=s" => \$cache_file ) or &error; my $PO_DIR; my $FILE; my $OUTFILE; my %po_files_by_lang = (); my %translations = (); my $iconv = $ENV{"ICONV"} || "iconv"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); sub isProgramInPath { my ($file) = @_; # If either a file exists, or when run it returns 0 exit status return 1 if ((-x $file) or (system("$file -l >$devnull") == 0)); return 0; } if (! isProgramInPath ("$iconv")) { print STDERR " *** iconv is not found on this system!\n". " *** Without it, intltool-merge can not convert encodings.\n"; exit; } # Use this instead of \w for XML files to handle more possible characters. my $w = "[-A-Za-z0-9._:]"; # XML quoted string contents my $q = "[^\\\"]*"; ## Check for options. if ($VERSION_ARG) { &print_version; } elsif ($HELP_ARG) { &print_help; } elsif ($BA_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &ba_merge_translations; &finalize; } elsif ($XML_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &xml_merge_output; &finalize; } elsif ($KEYS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &keys_merge_translations; &finalize; } elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &desktop_merge_translations; &finalize; } elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; &schemas_merge_translations; &finalize; } elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) { &preparation; &print_message; &rfc822deb_merge_translations; &finalize; } elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; "ed_merge_translations($QUOTEDXML_STYLE_ARG); &finalize; } else { &print_help; } exit; ## Sub for printing release information sub print_version { print <<_EOF_; ${PROGRAM} (${PACKAGE}) ${VERSION} Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen. Copyright (C) 2000-2003 Free Software Foundation, Inc. Copyright (C) 2000-2001 Eazel, 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. _EOF_ exit; } ## Sub for printing usage information sub print_help { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE Generates an output file that includes some localized attributes from an untranslated source file. Mandatory options: (exactly one must be specified) -b, --ba-style includes translations in the bonobo-activation style -d, --desktop-style includes translations in the desktop style -k, --keys-style includes translations in the keys style -s, --schemas-style includes translations in the schemas style -r, --rfc822deb-style includes translations in the RFC822 style --quoted-style includes translations in the quoted string style --quotedxml-style includes translations in the quoted xml string style -x, --xml-style includes translations in the standard xml style Other options: -u, --utf8 convert all strings to UTF-8 before merging (default for everything except RFC822 style) -p, --pass-through deprecated, does nothing and issues a warning -m, --multiple-output output one localized file per locale, instead of a single file containing all localized elements -c, --cache=FILE specify cache file name (usually \$top_builddir/po/.intltool-merge-cache) -q, --quiet suppress most messages --help display this help and exit --version output version information and exit Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } ## Sub for printing error messages sub print_error { print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit; } sub print_message { print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG; } sub preparation { $PO_DIR = $ARGV[0]; $FILE = $ARGV[1]; $OUTFILE = $ARGV[2]; &gather_po_files; &get_translation_database; } # General-purpose code for looking up translations in .po files sub po_file2lang { my ($tmp) = @_; $tmp =~ s/^.*\/(.*)\.po$/$1/; return $tmp; } sub gather_po_files { if (my $linguas = $ENV{"LINGUAS"}) { for my $lang (split / /, $linguas) { my $po_file = $PO_DIR . "/" . $lang . ".po"; if (-e $po_file) { $po_files_by_lang{$lang} = $po_file; } } } else { if (open LINGUAS_FILE, "$PO_DIR/LINGUAS") { while () { next if /^#/; for my $lang (split) { chomp ($lang); my $po_file = $PO_DIR . "/" . $lang . ".po"; if (-e $po_file) { $po_files_by_lang{$lang} = $po_file; } } } close LINGUAS_FILE; } else { for my $po_file (glob "$PO_DIR/*.po") { $po_files_by_lang{po_file2lang($po_file)} = $po_file; } } } } sub get_local_charset { my ($encoding) = @_; my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias"; # seek character encoding aliases in charset.alias (glib) if (open CHARSET_ALIAS, $alias_file) { while () { next if /^\#/; return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i) } close CHARSET_ALIAS; } # if not found, return input string return $encoding; } sub get_po_encoding { my ($in_po_file) = @_; my $encoding = ""; open IN_PO_FILE, $in_po_file or die; while () { ## example: "Content-Type: text/plain; charset=ISO-8859-1\n" if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) { $encoding = $1; last; } } close IN_PO_FILE; if (!$encoding) { print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG; $encoding = "ISO-8859-1"; } system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull"); if ($?) { $encoding = get_local_charset($encoding); } return $encoding } sub utf8_sanity_check { print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG; $UTF8_ARG = 1; } sub get_translation_database { if ($cache_file) { &get_cached_translation_database; } else { &create_translation_database; } } sub get_newest_po_age { my $newest_age; foreach my $file (values %po_files_by_lang) { my $file_age = -M $file; $newest_age = $file_age if !$newest_age || $file_age < $newest_age; } $newest_age = 0 if !$newest_age; return $newest_age; } sub create_cache { print "Generating and caching the translation database\n" unless $QUIET_ARG; &create_translation_database; open CACHE, ">$cache_file" || die; print CACHE join "\x01", %translations; close CACHE; } sub load_cache { print "Found cached translation database\n" unless $QUIET_ARG; my $contents; open CACHE, "<$cache_file" || die; { local $/; $contents = ; } close CACHE; %translations = split "\x01", $contents; } sub get_cached_translation_database { my $cache_file_age = -M $cache_file; if (defined $cache_file_age) { if ($cache_file_age <= &get_newest_po_age) { &load_cache; return; } print "Found too-old cached translation database\n" unless $QUIET_ARG; } &create_cache; } sub create_translation_database { for my $lang (keys %po_files_by_lang) { my $po_file = $po_files_by_lang{$lang}; if ($UTF8_ARG) { my $encoding = get_po_encoding ($po_file); if (lc $encoding eq "utf-8") { open PO_FILE, "<$po_file"; } else { print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;; open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|"; } } else { open PO_FILE, "<$po_file"; } my $nextfuzzy = 0; my $inmsgid = 0; my $inmsgstr = 0; my $msgid = ""; my $msgstr = ""; while () { $nextfuzzy = 1 if /^#, fuzzy/; if (/^msgid "((\\.|[^\\]+)*)"/ ) { $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; $msgid = ""; $msgstr = ""; if ($nextfuzzy) { $inmsgid = 0; } else { $msgid = unescape_po_string($1); $inmsgid = 1; } $inmsgstr = 0; $nextfuzzy = 0; } if (/^msgstr "((\\.|[^\\]+)*)"/) { $msgstr = unescape_po_string($1); $inmsgstr = 1; $inmsgid = 0; } if (/^"((\\.|[^\\]+)*)"/) { $msgid .= unescape_po_string($1) if $inmsgid; $msgstr .= unescape_po_string($1) if $inmsgstr; } } $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr; } } sub finalize { } sub unescape_one_sequence { my ($sequence) = @_; return "\\" if $sequence eq "\\\\"; return "\"" if $sequence eq "\\\""; return "\n" if $sequence eq "\\n"; return "\r" if $sequence eq "\\r"; return "\t" if $sequence eq "\\t"; return "\b" if $sequence eq "\\b"; return "\f" if $sequence eq "\\f"; return "\a" if $sequence eq "\\a"; return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7) return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/); return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/); # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489 return $sequence; } sub unescape_po_string { my ($string) = @_; $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg; return $string; } sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/<//g; s/&/&/g; return $_; } # entity_encode: (string) # # Encode the given string to XML format (encode '<' etc). sub entity_encode { my ($pre_encoded) = @_; my @list_of_chars = unpack ('C*', $pre_encoded); # with UTF-8 we only encode minimalistic return join ('', map (&entity_encode_int_minimalist, @list_of_chars)); } sub entity_encode_int_minimalist { return """ if $_ == 34; return "&" if $_ == 38; return "'" if $_ == 39; return "<" if $_ == 60; return ">" if $_ == 62; return chr $_; } sub entity_encoded_translation { my ($lang, $string) = @_; my $translation = $translations{$lang, $string}; return $string if !$translation; return entity_encode ($translation); } ## XML (bonobo-activation specific) merge code sub ba_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!"; # Binmode so that selftest works ok if using a native Win32 Perl... binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) { print OUTPUT $1; my $node = $2 . "\n"; my @strings = (); $_ = $node; while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) { push @strings, entity_decode($3); } print OUTPUT; my %langs; for my $string (@strings) { for my $lang (keys %po_files_by_lang) { $langs{$lang} = 1 if $translations{$lang, $string}; } } for my $lang (sort keys %langs) { $_ = $node; s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s; s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg; print OUTPUT; } } print OUTPUT $source; close OUTPUT; } ## XML (non-bonobo-activation) merge code # Process tag attributes # Only parameter is a HASH containing attributes -> values mapping sub getAttributeString { my $sub = shift; my $do_translate = shift || 0; my $language = shift || ""; my $result = ""; my $translate = shift; foreach my $e (reverse(sort(keys %{ $sub }))) { my $key = $e; my $string = $sub->{$e}; my $quote = '"'; $string =~ s/^[\s]+//; $string =~ s/[\s]+$//; if ($string =~ /^'.*'$/) { $quote = "'"; } $string =~ s/^['"]//g; $string =~ s/['"]$//g; if ($do_translate && $key =~ /^_/) { $key =~ s|^_||g; if ($language) { # Handle translation my $decode_string = entity_decode($string); my $translation = $translations{$language, $decode_string}; if ($translation) { $translation = entity_encode($translation); $string = $translation; } $$translate = 2; } else { $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate } } $result .= " $key=$quote$string$quote"; } return $result; } # Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree sub getXMLstring { my $ref = shift; my $spacepreserve = shift || 0; my @list = @{ $ref }; my $result = ""; my $count = scalar(@list); my $attrs = $list[0]; my $index = 1; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); while ($index < $count) { my $type = $list[$index]; my $content = $list[$index+1]; if (! $type ) { # We've got CDATA if ($content) { # lets strip the whitespace here, and *ONLY* here $content =~ s/\s+/ /gs if (!$spacepreserve); $result .= $content; } } elsif ( "$type" ne "1" ) { # We've got another element $result .= "<$type"; $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements if ($content) { my $subresult = getXMLstring($content, $spacepreserve); if ($subresult) { $result .= ">".$subresult . ""; } else { $result .= "/>"; } } else { $result .= "/>"; } } $index += 2; } return $result; } # Translate list of nodes if necessary sub translate_subnodes { my $fh = shift; my $content = shift; my $language = shift || ""; my $singlelang = shift || 0; my $spacepreserve = shift || 0; my @nodes = @{ $content }; my $count = scalar(@nodes); my $index = 0; while ($index < $count) { my $type = $nodes[$index]; my $rest = $nodes[$index+1]; if ($singlelang) { my $oldMO = $MULTIPLE_OUTPUT; $MULTIPLE_OUTPUT = 1; traverse($fh, $type, $rest, $language, $spacepreserve); $MULTIPLE_OUTPUT = $oldMO; } else { traverse($fh, $type, $rest, $language, $spacepreserve); } $index += 2; } } sub isWellFormedXmlFragment { my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $fragment = shift; return 0 if (!$fragment); $fragment = "$fragment"; my $xp = new XML::Parser(Style => 'Tree'); my $tree = 0; eval { $tree = $xp->parse($fragment); }; return $tree; } sub traverse { my $fh = shift; my $nodename = shift; my $content = shift; my $language = shift || ""; my $spacepreserve = shift || 0; if (!$nodename) { if ($content =~ /^[\s]*$/) { $leading_space .= $content; } print $fh $content; } else { # element my @all = @{ $content }; my $attrs = shift @all; my $translate = 0; my $outattr = getAttributeString($attrs, 1, $language, \$translate); if ($nodename =~ /^_/) { $translate = 1; $nodename =~ s/^_//; } my $lookup = ''; $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); print $fh "<$nodename", $outattr; if ($translate) { $lookup = getXMLstring($content, $spacepreserve); if (!$spacepreserve) { $lookup =~ s/^\s+//s; $lookup =~ s/\s+$//s; } if ($lookup || $translate == 2) { my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup}); if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) { $translation = $lookup if (!$translation); print $fh " xml:lang=\"", $language, "\"" if $language; print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; return; # this means there will be no same translation with xml:lang="$language"... # if we want them both, just remove this "return" } else { print $fh ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $language, 1, $spacepreserve); } else { print $fh $lookup; } print $fh ""; } } else { print $fh "/>"; } for my $lang (sort keys %po_files_by_lang) { if ($MULTIPLE_OUTPUT && $lang ne "$language") { next; } if ($lang) { # Handle translation # my $translate = 0; my $localattrs = getAttributeString($attrs, 1, $lang, \$translate); my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup}); if ($translate && !$translation) { $translation = $lookup; } if ($translation || $translate) { print $fh "\n"; $leading_space =~ s/.*\n//g; print $fh $leading_space; print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">"; if ($translate == 2) { translate_subnodes($fh, \@all, $lang, 1, $spacepreserve); } else { print $fh $translation; } print $fh ""; } } } } else { my $count = scalar(@all); if ($count > 0) { print $fh ">"; my $index = 0; while ($index < $count) { my $type = $all[$index]; my $rest = $all[$index+1]; traverse($fh, $type, $rest, $language, $spacepreserve); $index += 2; } print $fh ""; } else { print $fh "/>"; } } } } sub intltool_tree_comment { my $expat = shift; my $data = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 1 => $data; } sub intltool_tree_cdatastart { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; push @$clist, 0 => $expat->original_string(); } sub intltool_tree_cdataend { my $expat = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; $clist->[$pos] .= $expat->original_string(); } sub intltool_tree_char { my $expat = shift; my $text = shift; my $clist = $expat->{Curlist}; my $pos = $#$clist; # Use original_string so that we retain escaped entities # in CDATA sections. # if ($pos > 0 and $clist->[$pos - 1] eq '0') { $clist->[$pos] .= $expat->original_string(); } else { push @$clist, 0 => $expat->original_string(); } } sub intltool_tree_start { my $expat = shift; my $tag = shift; my @origlist = (); # Use original_string so that we retain escaped entities # in attribute values. We must convert the string to an # @origlist array to conform to the structure of the Tree # Style. # my @original_array = split /\x/, $expat->original_string(); my $source = $expat->original_string(); # Remove leading tag. # $source =~ s|^\s*<\s*(\S+)||s; # Grab attribute key/value pairs and push onto @origlist array. # while ($source) { if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; push @origlist, $1; push @origlist, '"' . $2 . '"'; } elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) { $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; push @origlist, $1; push @origlist, "'" . $2 . "'"; } else { last; } } my $ol = [ { @origlist } ]; push @{ $expat->{Lists} }, $expat->{Curlist}; push @{ $expat->{Curlist} }, $tag => $ol; $expat->{Curlist} = $ol; } sub readXml { my $filename = shift || return; if(!-f $filename) { die "ERROR Cannot find filename: $filename\n"; } my $ret = eval 'require XML::Parser'; if(!$ret) { die "You must have XML::Parser installed to run $0\n\n"; } my $xp = new XML::Parser(Style => 'Tree'); $xp->setHandlers(Char => \&intltool_tree_char); $xp->setHandlers(Start => \&intltool_tree_start); $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); my $tree = $xp->parsefile($filename); # Hello thereHowdydo # would be: # [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{}, # 0, "Howdy", ref, [{}]], 0, "do" ] ] return $tree; } sub print_header { my $infile = shift; my $fh = shift; my $source; if(!-f $infile) { die "ERROR Cannot find filename: $infile\n"; } print $fh qq{\n}; { local $/; open DOCINPUT, "<${FILE}" or die; $source = ; close DOCINPUT; } if ($source =~ /()/s) { print $fh "$1\n"; } elsif ($source =~ /(]*>)/s) { print $fh "$1\n"; } } sub parseTree { my $fh = shift; my $ref = shift; my $language = shift || ""; my $name = shift @{ $ref }; my $cont = shift @{ $ref }; while (!$name || "$name" eq "1") { $name = shift @{ $ref }; $cont = shift @{ $ref }; } my $spacepreserve = 0; my $attrs = @{$cont}[0]; $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); traverse($fh, $name, $cont, $language, $spacepreserve); } sub xml_merge_output { my $source; if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { if ( ! -d $lang ) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree, $lang); close OUTPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } if ( ! -d "C" ) { mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n"; } open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED C/$OUTFILE\n" unless $QUIET_ARG; } else { open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; my $tree = readXml($FILE); print_header($FILE, \*OUTPUT); parseTree(\*OUTPUT, $tree); close OUTPUT; print "CREATED $OUTFILE\n" unless $QUIET_ARG; } } sub keys_merge_translation { my ($lang) = @_; if ( ! -d $lang && $MULTIPLE_OUTPUT) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n"; open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; if (!$MULTIPLE_OUTPUT) { print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/[$lang]$1=$translation/; print OUTPUT; } } else { my $non_translated_line = $_; my $translation = $translations{$lang, $string}; $translation = $string if !$translation; $_ = $non_translated_line; s/(\w+)=.*/$1=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; } sub keys_merge_translations { if ($MULTIPLE_OUTPUT) { for my $lang (sort keys %po_files_by_lang) { keys_merge_translation ($lang); } keys_merge_translation ("C"); } else { keys_merge_translation ("."); } } sub desktop_merge_translations { open INPUT, "<${FILE}" or die; open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { if (s/^(\s*)_(\w+=(.*))/$1$2/) { my $string = $3; print OUTPUT; my $non_translated_line = $_; for my $lang (sort keys %po_files_by_lang) { my $translation = $translations{$lang, $string}; next if !$translation; $_ = $non_translated_line; s/(\w+)=.*/${1}[$lang]=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } sub schemas_merge_translations { my $source; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">$OUTFILE" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; # FIXME: support attribute translations # Empty nodes never need translation, so unmark all of them. # For example, <_foo/> is just replaced by . $source =~ s|<\s*_($w+)\s*/>|<$1/>|g; while ($source =~ s/ (.*?) (\s+)((\s*) (\s*(?:\s*)?(.*?)\s*<\/default>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/short>)?(\s*) (\s*(?:\s*)?(.*?)\s*<\/long>)?(\s*) <\/locale>) //sx) { print OUTPUT $1; my $locale_start_spaces = $2 ? $2 : ''; my $default_spaces = $4 ? $4 : ''; my $short_spaces = $7 ? $7 : ''; my $long_spaces = $10 ? $10 : ''; my $locale_end_spaces = $13 ? $13 : ''; my $c_default_block = $3 ? $3 : ''; my $default_string = $6 ? $6 : ''; my $short_string = $9 ? $9 : ''; my $long_string = $12 ? $12 : ''; print OUTPUT "$locale_start_spaces$c_default_block"; $default_string =~ s/\s+/ /g; $default_string = entity_decode($default_string); $short_string =~ s/\s+/ /g; $short_string = entity_decode($short_string); $long_string =~ s/\s+/ /g; $long_string = entity_decode($long_string); for my $lang (sort keys %po_files_by_lang) { my $default_translation = $translations{$lang, $default_string}; my $short_translation = $translations{$lang, $short_string}; my $long_translation = $translations{$lang, $long_string}; next if (!$default_translation && !$short_translation && !$long_translation); print OUTPUT "\n$locale_start_spaces"; print OUTPUT "$default_spaces"; if ($default_translation) { $default_translation = entity_encode($default_translation); print OUTPUT "$default_translation"; } print OUTPUT "$short_spaces"; if ($short_translation) { $short_translation = entity_encode($short_translation); print OUTPUT "$short_translation"; } print OUTPUT "$long_spaces"; if ($long_translation) { $long_translation = entity_encode($long_translation); print OUTPUT "$long_translation"; } print OUTPUT "$locale_end_spaces"; } } print OUTPUT $source; close OUTPUT; } sub rfc822deb_merge_translations { my %encodings = (); for my $lang (keys %po_files_by_lang) { $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang})); } my $source; $Text::Wrap::huge = 'overflow'; $Text::Wrap::break = qr/\n|\s(?=\S)/; { local $/; # slurp mode open INPUT, "<$FILE" or die "can't open $FILE: $!"; $source = ; close INPUT; } open OUTPUT, ">${OUTFILE}" or die; binmode (OUTPUT) if $^O eq 'MSWin32'; while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg) { my $sep = $1; my $non_translated_line = $3.$4; my $string = $5; my $underscore = length($2); next if $underscore eq 0 && $non_translated_line =~ /^#/; # Remove [] dummy strings my $stripped = $string; $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2; $stripped =~ s/\[\s[^\[\]]*\]$//; $non_translated_line .= $stripped; print OUTPUT $sep.$non_translated_line; if ($underscore) { my @str_list = rfc822deb_split($underscore, $string); for my $lang (sort keys %po_files_by_lang) { my $is_translated = 1; my $str_translated = ''; my $first = 1; for my $str (@str_list) { my $translation = $translations{$lang, $str}; if (!$translation) { $is_translated = 0; last; } # $translation may also contain [] dummy # strings, mostly to indicate an empty string $translation =~ s/\[\s[^\[\]]*\]$//; if ($first) { if ($underscore eq 2) { $str_translated .= $translation; } else { $str_translated .= Text::Tabs::expand($translation) . "\n"; } } else { if ($underscore eq 2) { $str_translated .= ', ' . $translation; } else { $str_translated .= Text::Tabs::expand( Text::Wrap::wrap(' ', ' ', $translation)) . "\n .\n"; } } $first = 0; # To fix some problems with Text::Wrap::wrap $str_translated =~ s/(\n )+\n/\n .\n/g; } next unless $is_translated; $str_translated =~ s/\n \.\n$//; $str_translated =~ s/\s+$//; $_ = $non_translated_line; s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s; print OUTPUT; } } } print OUTPUT "\n"; close OUTPUT; close INPUT; } sub rfc822deb_split { # Debian defines a special way to deal with rfc822-style files: # when a value contain newlines, it consists of # 1. a short form (first line) # 2. a long description, all lines begin with a space, # and paragraphs are separated by a single dot on a line # This routine returns an array of all paragraphs, and reformat # them. # When first argument is 2, the string is a comma separated list of # values. my $type = shift; my $text = shift; $text =~ s/^[ \t]//mg; return (split(/, */, $text, 0)) if $type ne 1; return ($text) if $text !~ /\n/; $text =~ s/([^\n]*)\n//; my @list = ($1); my $str = ''; for my $line (split (/\n/, $text)) { chomp $line; if ($line =~ /^\.\s*$/) { # New paragraph $str =~ s/\s*$//; push(@list, $str); $str = ''; } elsif ($line =~ /^\s/) { # Line which must not be reformatted $str .= "\n" if length ($str) && $str !~ /\n$/; $line =~ s/\s+$//; $str .= $line."\n"; } else { # Continuation line, remove newline $str .= " " if length ($str) && $str !~ /\n$/; $str .= $line; } } $str =~ s/\s*$//; push(@list, $str) if length ($str); return @list; } sub quoted_translation { my ($xml_mode, $lang, $string) = @_; $string = entity_decode($string) if $xml_mode; $string =~ s/\\\"/\"/g; my $translation = $translations{$lang, $string}; $translation = $string if !$translation; $translation = entity_encode($translation) if $xml_mode; $translation =~ s/\"/\\\"/g; return $translation } sub quoted_merge_translations { my ($xml_mode) = @_; if (!$MULTIPLE_OUTPUT) { print "Quoted only supports Multiple Output.\n"; exit(1); } for my $lang (sort keys %po_files_by_lang) { if ( ! -d $lang ) { mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; } open INPUT, "<${FILE}" or die; open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; binmode (OUTPUT) if $^O eq 'MSWin32'; while () { s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . "ed_translation($xml_mode, $lang, $1) . "\""/ge; print OUTPUT; } close OUTPUT; close INPUT; } } g2ipmsg-0.9.6+dfsg/intltool-update.in000066400000000000000000000744261126724573600175230ustar00rootroot00000000000000#!@INTLTOOL_PERL@ -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # The Intltool Message Updater # # Copyright (C) 2000-2003 Free Software Foundation. # # Intltool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # version 2 published by the Free Software Foundation. # # Intltool 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., 675 Mass Ave, Cambridge, MA 02139, 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. # # Authors: Kenneth Christiansen # Maciej Stachowiak # Darin Adler ## Release information my $PROGRAM = "intltool-update"; my $VERSION = "0.37.1"; my $PACKAGE = "intltool"; ## Loaded modules use strict; use Getopt::Long; use Cwd; use File::Copy; use File::Find; ## Scalars used by the option stuff my $HELP_ARG = 0; my $VERSION_ARG = 0; my $DIST_ARG = 0; my $POT_ARG = 0; my $HEADERS_ARG = 0; my $MAINTAIN_ARG = 0; my $REPORT_ARG = 0; my $VERBOSE = 0; my $GETTEXT_PACKAGE = ""; my $OUTPUT_FILE = ""; my @languages; my %varhash = (); my %po_files_by_lang = (); # Regular expressions to categorize file types. # FIXME: Please check if the following is correct my $xml_support = "xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) "ui|". # Bonobo specific - User Interface desc. files "lang|". # ? "glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) "scm(?:\\.in)*|". # ? (Note: .in is not required) "oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files "etspec|". # ? "server(?:\\.in)+|". # Bonobo specific "sheet(?:\\.in)+|". # ? "schemas(?:\\.in)+|". # GConf specific "pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. "kbd(?:\\.in)+|". # GOK specific. "policy(?:\\.in)+"; # PolicyKit files my $ini_support = "icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "caves(?:\\.in)+|". # GNOME Games specific "directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec "soundlist(?:\\.in)+|". # GNOME specific "keys(?:\\.in)+|". # GNOME Mime database specific "theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec "service(?:\\.in)+"; # DBus specific my $buildin_gettext_support = "c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py"; ## Always flush buffer when printing $| = 1; ## Sometimes the source tree will be rooted somewhere else. my $SRCDIR = $ENV{"srcdir"} || "."; my $POTFILES_in; $POTFILES_in = "<$SRCDIR/POTFILES.in"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); ## Handle options GetOptions ( "help" => \$HELP_ARG, "version" => \$VERSION_ARG, "dist|d" => \$DIST_ARG, "pot|p" => \$POT_ARG, "headers|s" => \$HEADERS_ARG, "maintain|m" => \$MAINTAIN_ARG, "report|r" => \$REPORT_ARG, "verbose|x" => \$VERBOSE, "gettext-package|g=s" => \$GETTEXT_PACKAGE, "output-file|o=s" => \$OUTPUT_FILE, ) or &Console_WriteError_InvalidOption; &Console_Write_IntltoolHelp if $HELP_ARG; &Console_Write_IntltoolVersion if $VERSION_ARG; my $arg_count = ($DIST_ARG > 0) + ($POT_ARG > 0) + ($HEADERS_ARG > 0) + ($MAINTAIN_ARG > 0) + ($REPORT_ARG > 0); &Console_Write_IntltoolHelp if $arg_count > 1; my $PKGNAME = FindPackageName (); # --version and --help don't require a module name my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown"; if ($POT_ARG) { &GenerateHeaders; &GeneratePOTemplate; } elsif ($HEADERS_ARG) { &GenerateHeaders; } elsif ($MAINTAIN_ARG) { &FindLeftoutFiles; } elsif ($REPORT_ARG) { &GenerateHeaders; &GeneratePOTemplate; &Console_Write_CoverageReport; } elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) { my $lang = $ARGV[0]; ## Report error if the language file supplied ## to the command line is non-existent &Console_WriteError_NotExisting("$SRCDIR/$lang.po") if ! -s "$SRCDIR/$lang.po"; if (!$DIST_ARG) { print "Working, please wait..." if $VERBOSE; &GenerateHeaders; &GeneratePOTemplate; } &POFile_Update ($lang, $OUTPUT_FILE); &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); } else { &Console_Write_IntltoolHelp; } exit; ######### sub Console_Write_IntltoolVersion { print <<_EOF_; ${PROGRAM} (${PACKAGE}) $VERSION Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. Copyright (C) 2000-2003 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. _EOF_ exit; } sub Console_Write_IntltoolHelp { print <<_EOF_; Usage: ${PROGRAM} [OPTION]... LANGCODE Updates PO template files and merge them with the translations. Mode of operation (only one is allowed): -p, --pot generate the PO template only -s, --headers generate the header files in POTFILES.in -m, --maintain search for left out files from POTFILES.in -r, --report display a status report for the module -d, --dist merge LANGCODE.po with existing PO template Extra options: -g, --gettext-package=NAME override PO template name, useful with --pot -o, --output-file=FILE write merged translation to FILE -x, --verbose display lots of feedback --help display this help and exit --version output version information and exit Examples of use: ${PROGRAM} --pot just create a new PO template ${PROGRAM} xy create new PO template and merge xy.po with it Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE") or send email to . _EOF_ exit; } sub echo_n { my $str = shift; my $ret = `echo "$str"`; $ret =~ s/\n$//; # do we need the "s" flag? return $ret; } sub POFile_DetermineType ($) { my $type = $_; my $gettext_type; my $xml_regex = "(?:" . $xml_support . ")"; my $ini_regex = "(?:" . $ini_support . ")"; my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; if ($type =~ /\[type: gettext\/([^\]].*)]/) { $gettext_type=$1; } elsif ($type =~ /schemas(\.in)+$/) { $gettext_type="schemas"; } elsif ($type =~ /glade2?(\.in)*$/) { $gettext_type="glade"; } elsif ($type =~ /scm(\.in)*$/) { $gettext_type="scheme"; } elsif ($type =~ /keys(\.in)+$/) { $gettext_type="keys"; } # bucket types elsif ($type =~ /$xml_regex$/) { $gettext_type="xml"; } elsif ($type =~ /$ini_regex$/) { $gettext_type="ini"; } elsif ($type =~ /$buildin_regex$/) { $gettext_type="buildin"; } else { $gettext_type="unknown"; } return "gettext\/$gettext_type"; } sub TextFile_DetermineEncoding ($) { my $gettext_code="ASCII"; # All files are ASCII by default my $filetype=`file $_ | cut -d ' ' -f 2`; if ($? eq "0") { if ($filetype =~ /^(ISO|UTF)/) { chomp ($gettext_code = $filetype); } elsif ($filetype =~ /^XML/) { $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 } } return $gettext_code; } sub isNotValidMissing { my ($file) = @_; return if $file =~ /^\{arch\}\/.*$/; return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/; } sub FindLeftoutFiles { my (@buf_i18n_plain, @buf_i18n_xml, @buf_i18n_xml_unmarked, @buf_i18n_ini, @buf_potfiles, @buf_potfiles_ignore, @buf_allfiles, @buf_allfiles_sorted, @buf_potfiles_sorted, @buf_potfiles_ignore_sorted ); ## Search and find all translatable files find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, ".."; find sub { push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; }, "$SRCDIR/.." if "$SRCDIR" ne "."; open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; @buf_potfiles = grep !/^(#|\s*$)/, ; close POTFILES; foreach (@buf_potfiles) { s/^\[.*]\s*//; } print "Searching for missing translatable files...\n" if $VERBOSE; ## Check if we should ignore some found files, when ## comparing with POTFILES.in foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") { (-s "$SRCDIR/$ignore") or next; if ("$ignore" eq "POTFILES.ignore") { print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". "content of this file to POTFILES.skip.\n"; } print "Found $ignore: Ignoring files...\n" if $VERBOSE; open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n"; while () { push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/; } close FILE; @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore); } foreach my $file (@buf_i18n_plain) { my $in_comment = 0; my $in_macro = 0; open FILE, "<$file"; while () { # Handle continued multi-line comment. if ($in_comment) { next unless s-.*\*/--; $in_comment = 0; } # Handle continued macro. if ($in_macro) { $in_macro = 0 unless /\\$/; next; } # Handle start of macro (or any preprocessor directive). if (/^\s*\#/) { $in_macro = 1 if /^([^\\]|\\.)*\\$/; next; } # Handle comments and quoted text. while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy { my $match = $1; if ($match eq "/*") { if (!s-/\*.*?\*/--) { s-/\*.*--; $in_comment = 1; } } elsif ($match eq "//") { s-//.*--; } else # ' or " { if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-) { warn "mismatched quotes at line $. in $file\n"; s-$match.*--; } } } if (/\w\.GetString *\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } ## C_ N_ Q_ and _ are the macros defined in gi8n.h if (/[CNQ]?_ *\(QUOTEDTEXT/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { ## Remove the first 3 chars and add newline push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml) { open FILE, "<$file"; while () { # FIXME: share the pattern matching code with intltool-extract if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_ini) { open FILE, "<$file"; while () { if (/_(.*)=/) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } last; } } close FILE; } foreach my $file (@buf_i18n_xml_unmarked) { if (defined isNotValidMissing (unpack("x3 A*", $file))) { push @buf_allfiles, unpack("x3 A*", $file) . "\n"; } } @buf_allfiles_sorted = sort (@buf_allfiles); @buf_potfiles_sorted = sort (@buf_potfiles); my %in2; foreach (@buf_potfiles_sorted) { s#^$SRCDIR/../##; s#^$SRCDIR/##; $in2{$_} = 1; } foreach (@buf_potfiles_ignore_sorted) { s#^$SRCDIR/../##; s#^$SRCDIR/##; $in2{$_} = 1; } my @result; foreach (@buf_allfiles_sorted) { my $dummy = $_; my $srcdir = $SRCDIR; $srcdir =~ s#^../##; $dummy =~ s#^$srcdir/../##; $dummy =~ s#^$srcdir/##; $dummy =~ s#_build/##; if (!exists($in2{$dummy})) { push @result, $dummy } } my @buf_potfiles_notexist; foreach (@buf_potfiles_sorted) { chomp (my $dummy = $_); if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy")) { push @buf_potfiles_notexist, $_; } } ## Save file with information about the files missing ## if any, and give information about this procedure. if (@result + @buf_potfiles_notexist > 0) { if (@result) { print "\n" if $VERBOSE; unlink "missing"; open OUT, ">missing"; print OUT @result; close OUT; warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n". "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n"; print STDERR @result, "\n"; warn "If some of these files are left out on purpose then please add them to\n". "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n". "of left out files has been written in the current directory.\n"; } if (@buf_potfiles_notexist) { unlink "notexist"; open OUT, ">notexist"; print OUT @buf_potfiles_notexist; close OUT; warn "\n" if ($VERBOSE or @result); warn "\e[1mThe following files do not exist anymore:\e[0m\n\n"; warn @buf_potfiles_notexist, "\n"; warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n". "containing this list of absent files has been written in the current directory.\n"; } } ## If there is nothing to complain about, notify the user else { print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; } } sub Console_WriteError_InvalidOption { ## Handle invalid arguments print STDERR "Try `${PROGRAM} --help' for more information.\n"; exit 1; } sub isProgramInPath { my ($file) = @_; # If either a file exists, or when run it returns 0 exit status return 1 if ((-x $file) or (system("$file --version >$devnull") == 0)); return 0; } sub isGNUGettextTool { my ($file) = @_; # Check that we are using GNU gettext tools if (isProgramInPath ($file)) { my $version = `$file --version`; return 1 if ($version =~ m/.*\(GNU .*\).*/); } return 0; } sub GenerateHeaders { my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract"; ## Generate the .h header files, so we can allow glade and ## xml translation support if (! isProgramInPath ("$EXTRACT")) { print STDERR "\n *** The intltool-extract script wasn't found!" ."\n *** Without it, intltool-update can not generate files.\n"; exit; } else { open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; while () { chomp; next if /^\[\s*encoding/; ## Find xml files in POTFILES.in and generate the ## files with help from the extract script my $gettext_type= &POFile_DetermineType ($1); if (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[[^\[].*]\s*//; my $filename = "../$_"; if ($VERBOSE) { system ($EXTRACT, "--update", "--srcdir=$SRCDIR", "--type=$gettext_type", $filename); } else { system ($EXTRACT, "--update", "--type=$gettext_type", "--srcdir=$SRCDIR", "--quiet", $filename); } } } close FILE; } } # # Generate .pot file from POTFILES.in # sub GeneratePOTemplate { my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext"; my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; chomp $XGETTEXT; if (! isGNUGettextTool ("$XGETTEXT")) { print STDERR " *** GNU xgettext is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Building $MODULE.pot...\n" if $VERBOSE; open INFILE, $POTFILES_in; unlink "POTFILES.in.temp"; open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); my $gettext_support_nonascii = 0; # checks for GNU gettext >= 0.12 my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; if ($? == 0) { $gettext_support_nonascii = 1; } else { # urge everybody to upgrade gettext print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n". " strings. That means you should install a version of gettext\n". " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n". " or have to let non-ASCII strings untranslated. (If there is any)\n"; } my $encoding = "ASCII"; my $forced_gettext_code; my @temp_headers; my $encoding_problem_is_reported = 0; while () { next if (/^#/ or /^\s*$/); chomp; my $gettext_code; if (/^\[\s*encoding:\s*(.*)\s*\]/) { $forced_gettext_code=$1; } elsif (/\.($xml_support|$ini_support)$/ || /^\[/) { s/^\[.*]\s*//; print OUTFILE "../$_.h\n"; push @temp_headers, "../$_.h"; $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); } else { print OUTFILE "$SRCDIR/../$_\n"; $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); } next if (! $gettext_support_nonascii); if (defined $forced_gettext_code) { $encoding=$forced_gettext_code; } elsif (defined $gettext_code and "$encoding" ne "$gettext_code") { if ($encoding eq "ASCII") { $encoding=$gettext_code; } elsif ($gettext_code ne "ASCII") { # Only report once because the message is quite long if (! $encoding_problem_is_reported) { print STDERR "WARNING: You should use the same file encoding for all your project files,\n". " but $PROGRAM thinks that most of the source files are in\n". " $encoding encoding, while \"$_\" is (likely) in\n". " $gettext_code encoding. If you are sure that all translatable strings\n". " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n". " line to POTFILES.in:\n\n". " [encoding: UTF-8]\n\n". " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". "(such warning message will only be reported once.)\n"; $encoding_problem_is_reported = 1; } } } } close OUTFILE; close INFILE; unlink "$MODULE.pot"; my @xgettext_argument=("$XGETTEXT", "--add-comments", "--directory\=.", "--default-domain\=$MODULE", "--flag\=g_strdup_printf:1:c-format", "--flag\=g_string_printf:2:c-format", "--flag\=g_string_append_printf:2:c-format", "--flag\=g_error_new:3:c-format", "--flag\=g_set_error:4:c-format", "--flag\=g_markup_printf_escaped:1:c-format", "--flag\=g_log:3:c-format", "--flag\=g_print:1:c-format", "--flag\=g_printerr:1:c-format", "--flag\=g_printf:1:c-format", "--flag\=g_fprintf:2:c-format", "--flag\=g_sprintf:2:c-format", "--flag\=g_snprintf:3:c-format", "--flag\=g_scanner_error:2:c-format", "--flag\=g_scanner_warn:2:c-format", "--output\=$MODULE\.pot", "--files-from\=\.\/POTFILES\.in\.temp"); my $XGETTEXT_KEYWORDS = &FindPOTKeywords; push @xgettext_argument, $XGETTEXT_KEYWORDS; my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress; push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS; push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; my $xgettext_command = join ' ', @xgettext_argument; # intercept xgettext error message print "Running $xgettext_command\n" if $VERBOSE; my $xgettext_error_msg = `$xgettext_command 2>\&1`; my $command_failed = $?; unlink "POTFILES.in.temp"; print "Removing generated header (.h) files..." if $VERBOSE; unlink foreach (@temp_headers); print "done.\n" if $VERBOSE; if (! $command_failed) { if (! -e "$MODULE.pot") { print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; } else { print "Wrote $MODULE.pot\n" if $VERBOSE; } } else { if ($xgettext_error_msg =~ /--from-code/) { # replace non-ASCII error message with a more useful one. print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n". " string marked for translation. Please make sure that all strings marked\n". " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n". " following line to POTFILES.in and rerun $PROGRAM:\n\n". " [encoding: UTF-8]\n\n"; } else { print STDERR "$xgettext_error_msg"; if (-e "$MODULE.pot") { # is this possible? print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". " Please consult error message above if there is any.\n"; } else { print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". " error message above if there is any.\n"; } } exit (1); } } sub POFile_Update { -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge"; my ($lang, $outfile) = @_; if (! isGNUGettextTool ("$MSGMERGE")) { print STDERR " *** GNU msgmerge is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; my $infile = "$SRCDIR/$lang.po"; $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); # I think msgmerge won't overwrite old file if merge is not successful system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); } sub Console_WriteError_NotExisting { my ($file) = @_; ## Report error if supplied language file is non-existing print STDERR "$PROGRAM: $file does not exist!\n"; print STDERR "Try '$PROGRAM --help' for more information.\n"; exit; } sub GatherPOFiles { my @po_files = glob ("./*.po"); @languages = map (&POFile_GetLanguage, @po_files); foreach my $lang (@languages) { $po_files_by_lang{$lang} = shift (@po_files); } } sub POFile_GetLanguage ($) { s/^(.*\/)?(.+)\.po$/$2/; return $_; } sub Console_Write_TranslationStatus { my ($lang, $output_file) = @_; my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; if (! isGNUGettextTool ("$MSGFMT")) { print STDERR " *** GNU msgfmt is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); } sub Console_Write_CoverageReport { my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; if (! isGNUGettextTool ("$MSGFMT")) { print STDERR " *** GNU msgfmt is not found on this system!\n". " *** Without it, intltool-update can not extract strings.\n"; exit; } &GatherPOFiles; foreach my $lang (@languages) { print STDERR "$lang: "; &POFile_Update ($lang, ""); } print STDERR "\n\n * Current translation support in $MODULE \n\n"; foreach my $lang (@languages) { print STDERR "$lang: "; system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); } } sub SubstituteVariable { my ($str) = @_; # always need to rewind file whenever it has been accessed seek (CONF, 0, 0); # cache each variable. varhash is global to we can add # variables elsewhere. while () { if (/^(\w+)=(.*)$/) { ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; } } if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) { my $rest = $3; my $untouched = $1; my $sub = ""; # Ignore recursive definitions of variables $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; return SubstituteVariable ("$untouched$sub$rest"); } # We're using Perl backticks ` and "echo -n" here in order to # expand any shell escapes (such as backticks themselves) in every variable return echo_n ($str); } sub CONF_Handle_Open { my $base_dirname = getcwd(); $base_dirname =~ s@.*/@@; my ($conf_in, $src_dir); if ($base_dirname =~ /^po(-.+)?$/) { if (-f "Makevars") { my $makefile_source; local (*IN); open (IN, ") { if (/^top_builddir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; if (-f "$src_dir" . "/configure.ac") { $conf_in = "$src_dir" . "/configure.ac" . "\n"; } else { $conf_in = "$src_dir" . "/configure.in" . "\n"; } last; } } close IN; $conf_in || die "Cannot find top_builddir in Makevars."; } elsif (-f "$SRCDIR/../configure.ac") { $conf_in = "$SRCDIR/../configure.ac"; } elsif (-f "$SRCDIR/../configure.in") { $conf_in = "$SRCDIR/../configure.in"; } else { my $makefile_source; local (*IN); open (IN, ") { if (/^top_srcdir[ \t]*=/) { $src_dir = $_; $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; chomp $src_dir; $conf_in = "$src_dir" . "/configure.in" . "\n"; last; } } close IN; $conf_in || die "Cannot find top_srcdir in Makefile."; } open (CONF, "<$conf_in"); } else { print STDERR "$PROGRAM: Unable to proceed.\n" . "Make sure to run this script inside the po directory.\n"; exit; } } sub FindPackageName { my $version; my $domain = &FindMakevarsDomain; my $name = $domain || "untitled"; &CONF_Handle_Open; my $conf_source; { local (*IN); open (IN, "<&CONF") || return $name; seek (IN, 0, 0); local $/; # slurp mode $conf_source = ; close IN; } # priority for getting package name: # 1. GETTEXT_PACKAGE # 2. first argument of AC_INIT (with >= 2 arguments) # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m # the \s makes this not work, why? if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); } if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m) { ($name, $version) = ($1, $2); $name =~ s/[\[\]\s]//g; $version =~ s/[\[\]\s]//g; $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); } # \s makes this not work, why? $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables. $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g; $name = $domain if $domain; $name = SubstituteVariable ($name); $name =~ s/^["'](.*)["']$/$1/; return $name if $name; } sub FindPOTKeywords { my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_"; my $varname = "XGETTEXT_OPTIONS"; my $make_source; { local (*IN); open (IN, "; close IN; } # unwrap lines split with a trailing \ $make_source =~ s/\\ $ \n/ /mxg; $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; return $keywords; } sub FindMakevarsDomain { my $domain = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; $domain =~ s/^\s+//; $domain =~ s/\s+$//; return $domain; } sub FindMakevarsBugAddress { my $address = ""; my $makevars_source; { local (*IN); open (IN, "; close IN; } $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m; $address =~ s/^\s+//; $address =~ s/\s+$//; return $address; } g2ipmsg-0.9.6+dfsg/ltmain.sh000066400000000000000000006022721126724573600156630ustar00rootroot00000000000000# 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 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 () { # FreeBSD-specific: where we install compilers with non-standard names tag_compilers_CC="*cc cc* *gcc gcc*" tag_compilers_CXX="*c++ c++* *g++ g++*" base_compiler=`set -- "$@"; echo $1` # If $tagname isn't set, then try to infer if the default "CC" tag applies if test -z "$tagname"; then for zp in $tag_compilers_CC; do case $base_compiler in $zp) tagname="CC"; break;; esac done fi 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 # FreeBSD-specific: try compilers based on inferred tag if test -z "$tagname"; then eval "tag_compilers=\$tag_compilers_${z}" if test -n "$tag_compilers"; then for zp in $tag_compilers; do case $base_compiler in $zp) tagname=$z; break;; esac done if test -n "$tagname"; then break fi fi fi 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" deplibs="$deplibs $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% $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 case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" ;; 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 ;; *) ;; esac # linkmode 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" ;; 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 ;; *-*-freebsd*) # FreeBSD doesn't need this... ;; *) $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: g2ipmsg-0.9.6+dfsg/macros/000077500000000000000000000000001126724573600153165ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/macros/ax_prog_doxygen.m4000066400000000000000000000261271126724573600207640ustar00rootroot00000000000000# Generate automatic documentation using Doxygen. Works in concert with the # aminclude.m4 file and a compatible doxygen configuration file. Defines the # following public macros: # # DX_???_FEATURE(ON|OFF) - control the default setting fo a Doxygen feature. # Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics, # 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI' # for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF', # 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment # variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide' # paper size. # # By default, HTML, PDF and PS documentation is generated as this seems to be # the most popular and portable combination. MAN pages created by Doxygen are # usually problematic, though by picking an appropriate subset and doing some # massaging they might be better than nothing. CHM and RTF are specific for MS # (note that you can't generate both HTML and CHM at the same time). The XML is # rather useless unless you apply specialized post-processing to it. # # The macro mainly controls the default state of the feature. The use can # override the default by specifying --enable or --disable. The macros ensure # that contradictory flags are not given (e.g., --enable-doxygen-html and # --enable-doxygen-chm, --enable-doxygen-anything with --disable-doxygen, etc.) # Finally, each feature will be automatically disabled (with a warning) if the # required programs are missing. # # Once all the feature defaults have been specified, call DX_INIT_DOXYGEN with # the following parameters: a one-word name for the project for use as a # filename base etc., an optional configuration file name (the default is # 'Doxyfile', the same as Doxygen's default), and an optional output directory # name (the default is 'doxygen-doc'). ## ----------## ## Defaults. ## ## ----------## DX_ENV="" AC_DEFUN([DX_FEATURE_doc], ON) AC_DEFUN([DX_FEATURE_dot], ON) AC_DEFUN([DX_FEATURE_man], OFF) AC_DEFUN([DX_FEATURE_html], ON) AC_DEFUN([DX_FEATURE_chm], OFF) AC_DEFUN([DX_FEATURE_chi], OFF) AC_DEFUN([DX_FEATURE_rtf], OFF) AC_DEFUN([DX_FEATURE_xml], OFF) AC_DEFUN([DX_FEATURE_pdf], ON) AC_DEFUN([DX_FEATURE_ps], ON) ## --------------- ## ## Private macros. ## ## --------------- ## # DX_ENV_APPEND(VARIABLE, VALUE) # ------------------------------ # Append VARIABLE="VALUE" to DX_ENV for invoking doxygen. AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])]) # DX_DIRNAME_EXPR # --------------- # Expand into a shell expression prints the directory part of a path. AC_DEFUN([DX_DIRNAME_EXPR], [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']]) # DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF) # ------------------------------------- # Expands according to the M4 (static) status of the feature. AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])]) # DX_REQUIRE_PROG(VARIABLE, PROGRAM) # ---------------------------------- # Require the specified program to be found for the DX_CURRENT_FEATURE to work. AC_DEFUN([DX_REQUIRE_PROG], [ AC_PATH_TOOL([$1], [$2]) if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi ]) # DX_TEST_FEATURE(FEATURE) # ------------------------ # Expand to a shell expression testing whether the feature is active. AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1]) # DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE) # ------------------------------------------------- # Verify that a required features has the right state before trying to turn on # the DX_CURRENT_FEATURE. AC_DEFUN([DX_CHECK_DEPEND], [ test "$DX_FLAG_$1" = "$2" \ || AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1, requires, contradicts) doxygen-DX_CURRENT_FEATURE]) ]) # DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE) # ---------------------------------------------------------- # Turn off the DX_CURRENT_FEATURE if the required feature is off. AC_DEFUN([DX_CLEAR_DEPEND], [ test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) ]) # DX_FEATURE_ARG(FEATURE, DESCRIPTION, # CHECK_DEPEND, CLEAR_DEPEND, # REQUIRE, DO-IF-ON, DO-IF-OFF) # -------------------------------------------- # Parse the command-line option controlling a feature. CHECK_DEPEND is called # if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND), # otherwise CLEAR_DEPEND is called to turn off the default state if a required # feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional # requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and # DO-IF-ON or DO-IF-OFF are called according to the final state of the feature. AC_DEFUN([DX_ARG_ABLE], [ AC_DEFUN([DX_CURRENT_FEATURE], [$1]) AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2]) AC_ARG_ENABLE(doxygen-$1, [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1], [--enable-doxygen-$1]), DX_IF_FEATURE([$1], [don't $2], [$2]))], [ case "$enableval" in #( y|Y|yes|Yes|YES) AC_SUBST([DX_FLAG_$1], 1) $3 ;; #( n|N|no|No|NO) AC_SUBST([DX_FLAG_$1], 0) ;; #( *) AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1]) ;; esac ], [ AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)]) $4 ]) if DX_TEST_FEATURE([$1]); then $5 : fi if DX_TEST_FEATURE([$1]); then AM_CONDITIONAL(DX_COND_$1, :) $6 : else AM_CONDITIONAL(DX_COND_$1, false) $7 : fi ]) ## -------------- ## ## Public macros. ## ## -------------- ## # DX_XXX_FEATURE(DEFAULT_STATE) # ----------------------------- AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])]) AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])]) AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])]) AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])]) AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])]) AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])]) AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])]) # DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR]) # --------------------------------------------------------- # PROJECT also serves as the base name for the documentation files. # The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc". AC_DEFUN([DX_INIT_DOXYGEN], [ # Files: AC_SUBST([DX_PROJECT], [$1]) AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])]) AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])]) # Environment variables used inside doxygen.cfg: DX_ENV_APPEND(SRCDIR, $srcdir) DX_ENV_APPEND(PROJECT, $DX_PROJECT) DX_ENV_APPEND(DOCDIR, $DX_DOCDIR) DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) # Doxygen itself: DX_ARG_ABLE(doc, [generate any doxygen documentation], [], [], [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen) DX_REQUIRE_PROG([DX_PERL], perl)], [DX_ENV_APPEND(PERL_PATH, $DX_PERL)]) # Dot for graphics: DX_ARG_ABLE(dot, [generate graphics for doxygen documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_DOT], dot)], [DX_ENV_APPEND(HAVE_DOT, YES) DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])], [DX_ENV_APPEND(HAVE_DOT, NO)]) # Man pages generation: DX_ARG_ABLE(man, [generate doxygen manual pages], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_MAN, YES)], [DX_ENV_APPEND(GENERATE_MAN, NO)]) # RTF file generation: DX_ARG_ABLE(rtf, [generate doxygen RTF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_RTF, YES)], [DX_ENV_APPEND(GENERATE_RTF, NO)]) # XML file generation: DX_ARG_ABLE(xml, [generate doxygen XML documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_XML, YES)], [DX_ENV_APPEND(GENERATE_XML, NO)]) # (Compressed) HTML help generation: DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_HHC], hhc)], [DX_ENV_APPEND(HHC_PATH, $DX_HHC) DX_ENV_APPEND(GENERATE_HTML, YES) DX_ENV_APPEND(GENERATE_HTMLHELP, YES)], [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)]) # Seperate CHI file generation. DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file], [DX_CHECK_DEPEND(chm, 1)], [DX_CLEAR_DEPEND(chm, 1)], [], [DX_ENV_APPEND(GENERATE_CHI, YES)], [DX_ENV_APPEND(GENERATE_CHI, NO)]) # Plain HTML pages generation: DX_ARG_ABLE(html, [generate doxygen plain HTML documentation], [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)], [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)], [], [DX_ENV_APPEND(GENERATE_HTML, YES)], [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)]) # PostScript file generation: DX_ARG_ABLE(ps, [generate doxygen PostScript documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_LATEX], platex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_DVIPS], dvips) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # PDF file generation: DX_ARG_ABLE(pdf, [generate doxygen PDF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # LaTeX generation for PS and/or PDF: if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then AM_CONDITIONAL(DX_COND_latex, :) DX_ENV_APPEND(GENERATE_LATEX, YES) else AM_CONDITIONAL(DX_COND_latex, false) DX_ENV_APPEND(GENERATE_LATEX, NO) fi # Paper size for PS and/or PDF: AC_ARG_VAR(DOXYGEN_PAPER_SIZE, [a4wide (default), a4, letter, legal or executive]) case "$DOXYGEN_PAPER_SIZE" in #( "") AC_SUBST(DOXYGEN_PAPER_SIZE, "") ;; #( a4wide|a4|letter|legal|executive) DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE) ;; #( *) AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE']) ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV ]) g2ipmsg-0.9.6+dfsg/macros/codeset.m4000066400000000000000000000013661126724573600172140ustar00rootroot00000000000000# codeset.m4 serial 2 (gettext-0.16) dnl Copyright (C) 2000-2002, 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_DEFUN([AM_LANGINFO_CODESET], [ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, [AC_TRY_LINK([#include ], [char* cs = nl_langinfo(CODESET); return !cs;], am_cv_langinfo_codeset=yes, am_cv_langinfo_codeset=no) ]) if test $am_cv_langinfo_codeset = yes; then AC_DEFINE(HAVE_LANGINFO_CODESET, 1, [Define if you have and nl_langinfo(CODESET).]) fi ]) g2ipmsg-0.9.6+dfsg/macros/g2ipmsg.m4000066400000000000000000000012471126724573600171340ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. dnl from ac-archives dnl dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn dnl refers to ${prefix}. Thus we have to use `eval' twice. dnl AC_DEFUN([AC_DEFINE_DIR], [ test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" ac_define_dir=`eval echo $2` ac_define_dir=`eval echo $ac_define_dir` AC_MSG_CHECKING(directory configuration for $1) AC_MSG_RESULT($ac_define_dir) $1="$ac_define_dir" AC_SUBST($1) ifelse($3, , AC_DEFINE_UNQUOTED($1, "$ac_define_dir"), AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3)) ]) g2ipmsg-0.9.6+dfsg/macros/gettext.m4000066400000000000000000000377321126724573600172600ustar00rootroot00000000000000# gettext.m4 serial 59 (gettext-0.16.1) dnl Copyright (C) 1995-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 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-2006. 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], ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), [yes])) define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) 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 { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "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 Sometimes, on MacOS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl Add a version number to the cache macros. case " $gt_needs " in *" need-formatstring-macros "*) gt_api_version=3 ;; *" need-ngettext "*) gt_api_version=2 ;; *) gt_api_version=1 ;; esac gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" 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. if test $gt_api_version -ge 3; then gt_revision_test_code=' #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 ' else gt_revision_test_code= fi if test $gt_api_version -ge 2; then gt_expression_test_code=' + * ngettext ("", "", 0)' else gt_expression_test_code= fi AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], [AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])]) if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "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_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 $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias (const char *);], [bindtextdomain ("", ""); return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_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 { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "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 $LIBTHREAD" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi CATOBJEXT= 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 -n "$INTL_MACOSX_LIBS"; then if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Some extra flags are needed during linking. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" fi 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 { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "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 { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "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. INTLOBJS= 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 special options needed on MacOS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ dnl Check for API introduced in MacOS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], gt_cv_func_CFPreferencesCopyAppValue, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFPreferencesCopyAppValue(NULL, NULL)], [gt_cv_func_CFPreferencesCopyAppValue=yes], [gt_cv_func_CFPreferencesCopyAppValue=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi dnl Check for API introduced in MacOS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" AC_TRY_LINK([#include ], [CFLocaleCopyCurrent();], [gt_cv_func_CFLocaleCopyCurrent=yes], [gt_cv_func_CFLocaleCopyCurrent=no]) LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi AC_SUBST([INTL_MACOSX_LIBS]) ]) dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized. m4_define([gt_NEEDS_INIT], [ m4_divert_text([DEFAULTS], [gt_needs=]) m4_define([gt_NEEDS_INIT], []) ]) dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL]) AC_DEFUN([AM_GNU_GETTEXT_NEED], [ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) g2ipmsg-0.9.6+dfsg/macros/glibc21.m4000066400000000000000000000014451126724573600170070ustar00rootroot00000000000000# glibc21.m4 serial 3 dnl Copyright (C) 2000-2002, 2004 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. # Test for the GNU C Library, version 2.1 or newer. # From Bruno Haible. AC_DEFUN([gl_GLIBC21], [ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, ac_cv_gnu_library_2_1, [AC_EGREP_CPP([Lucky GNU user], [ #include #ifdef __GNU_LIBRARY__ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) Lucky GNU user #endif #endif ], ac_cv_gnu_library_2_1=yes, ac_cv_gnu_library_2_1=no) ] ) AC_SUBST(GLIBC21) GLIBC21="$ac_cv_gnu_library_2_1" ] ) g2ipmsg-0.9.6+dfsg/macros/iconv.m4000066400000000000000000000064261126724573600167060ustar00rootroot00000000000000# 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 ]) g2ipmsg-0.9.6+dfsg/macros/lcmessage.m4000066400000000000000000000024041126724573600175230ustar00rootroot00000000000000# lcmessage.m4 serial 4 (gettext-0.14.2) dnl Copyright (C) 1995-2002, 2004-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 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. # Check whether LC_MESSAGES is available in . AC_DEFUN([gt_LC_MESSAGES], [ AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)]) if test $gt_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi ]) g2ipmsg-0.9.6+dfsg/missing000077500000000000000000000254061126724573600154400ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, 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. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -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 --run try to run the given command, and emulate it if it fails 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 help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. 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 $msg. 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 $msg. 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 $msg. 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 ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. 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 $msg. 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 ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. 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." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. 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 prerequisites 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 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: g2ipmsg-0.9.6+dfsg/mkinstalldirs000077500000000000000000000037041126724573600166440ustar00rootroot00000000000000#! /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 g2ipmsg-0.9.6+dfsg/pixmaps/000077500000000000000000000000001126724573600155135ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/pixmaps/ipmsg.png000066400000000000000000000007321126724573600173420ustar00rootroot00000000000000PNG  IHDR #ꦷbKGD X pHYsHHFk> vpAg eIDAThY $@#dA3-&Ch)看'b9~*\g1KO918^vs M!1Ԛ HXHVRw4gv:#%`ELp 0fz#y{* tQ=][А Nָ?/ a0xwPE.@oGуUi(+`0!> X3A*dkffq=3sεYx?B5\.3Li"DIVH)e־4ܙe~\HmW֭G@(b(ajD &"4*] ]IENDB`g2ipmsg-0.9.6+dfsg/pixmaps/ipmsg.xpm000066400000000000000000000070121126724573600173600ustar00rootroot00000000000000/* XPM */ static char *ipmsg[] = { /* columns rows colors chars-per-pixel */ "22 22 152 2", " c #010000", ". c #0E0E0E", "X c #0B1E1E", "o c #1A1818", "O c #213636", "+ c #2E3C3C", "@ c #3B5454", "# c #581414", "$ c #610000", "% c #444242", "& c #484545", "* c #665252", "= c #615D5D", "- c #646463", "; c #6C6868", ": c #787677", "> c #7D7D7D", ", c #0E03ED", "< c #0502F6", "1 c #0000FC", "2 c #0608F7", "3 c #0903F3", "4 c #0909F2", "5 c #1600E5", "6 c #1200EA", "7 c #1A03E1", "8 c #1918E4", "9 c #0531F8", "0 c #2500D7", "q c #2008DB", "w c #2800D5", "e c #2727D6", "r c #2533D6", "t c #273DD6", "y c #3F43BD", "u c #3148CB", "i c #4700B5", "p c #63009A", "a c #6B0F92", "s c #770C84", "d c #7B0080", "f c #683C95", "g c #4C59B1", "h c #72708A", "j c #777B86", "k c #767A88", "l c #787385", "z c #7C7C81", "x c #7C807E", "c c #6E8181", "v c #738485", "b c #72848A", "n c #748888", "m c #788480", "M c #798886", "N c #7F8F8F", "B c #7F9797", "V c #8E0000", "C c #970606", "Z c #953334", "A c #AE0000", "S c #B10202", "D c #9E005D", "F c #8E006D", "G c #850076", "H c #890072", "J c #950065", "K c #91006A", "L c #AD004D", "P c #A50056", "I c #A30059", "U c #B40046", "Y c #B0024B", "T c #BA0041", "R c #8B6D71", "E c #8F726C", "W c #817D7C", "Q c #8C7F74", "! c #BB4C42", "~ c #B96044", "^ c #A66E6E", "/ c #C71011", "( c #DB0000", ") c #CE012E", "_ c #C0003B", "` c #D60026", "' c #D2072A", "] c #DC0120", "[ c #D41E24", "{ c #CC2B2B", "} c #C53435", "| c #C83635", " . c #C93838", ".. c #D42626", "X. c #D63825", "o. c #EF0C0C", "O. c #E50016", "+. c #E2011A", "@. c #E90212", "#. c #F50005", "$. c #F30008", "%. c #FC0000", "&. c #FD0A00", "*. c #FF0C0C", "=. c #FA1602", "-. c #FF2300", ";. c #FD2F00", ":. c #FA3401", ">. c #FD3E00", ",. c #E22B29", "<. c #EB3D3D", "1. c #C55337", "2. c #DF651D", "3. c #FE4500", "4. c #FC4C00", "5. c #FD5300", "6. c #FF5B00", "7. c #F56507", "8. c #FD6300", "9. c #FB6C00", "0. c #FE7500", "q. c #817B87", "w. c #9D915F", "e. c #81807B", "r. c #8C9B6F", "t. c #958467", "y. c #8BA171", "u. c #B98A42", "i. c #B79744", "p. c #C29F39", "a. c #C0AF3B", "s. c #C3B337", "d. c #CAB633", "f. c #D6AF27", "g. c #D2AC29", "h. c #D4B028", "j. c #F48F09", "k. c #FF9200", "l. c #E4B817", "z. c orange", "x. c #DDCB1E", "c. c #FFCC00", "v. c #FCD601", "b. c #E5E517", "n. c #E3EC19", "m. c #FCED00", "M. c #F4FF08", "N. c #FCF600", "B. c #FCFC00", "V. c #848484", "C. c #85888A", "Z. c #888383", /* pixels */ "%.;.9.8.9.3.L H K K K F K K K K F J J J F ) ", ">.m.B.B.B.B.1.2 1 1 1 1 1 1 1 1 1 1 1 1 1 G ", "5.B.N.N.N.B.B._ 1 3 < 1 1 1 1 < 1 g a 0 1 J ", "4.B.B.B.B.N.B.i.1 < 1 r ~ P 3 1 u j.&.] 1 F ", "4.B.B.B.B.B.N.u.1 < 1 g.&.%.J 1 t.>.$.%.1 H ", "5.B.N.N.N.M.M.U 1 < 1 g.%.%.J 9 z.%.&.#.1 H ", "X.b.B.B.B.N.3.7 1 1 1 l.%.&.d E =.#.%.d 1 J ", "J e 2.8.7.f p < 1 < 1 h 6.%.) ] %.#.` w 1 K ", "U 1 , 7 5 1 1 1 1 < < 1 s %.%.%.%.%.7 1 1 F ", "L 1 1 1 1 < < 1 1 1 1 b ! %.#.%.%.I < < 1 K ", "L 1 < 1 1 1 1 1 t p.f.c.-.%.%.#.F 1 1 < 1 F ", "L 1 1 1 1 1 g w.k.&.%.%.%.%.%.#.i 1 1 < 1 K ", "L 1 1 1 2 8 a.4.#.%.%.@.+.O.#.%.T 1 < < 1 K ", "L 1 1 1 1 B.6.#.&.%.) 6 1 5 %.%.D 1 1 < 1 F ", "U < 4 2 r.v.=.%.%.' 7 2 < q &.%.O.i , , 2 K ", "..z > h n.0.%.%.%.R b > l y.k.%.&.%...v b } ", "..x > j x.%.#.%.{ > > > W x d.:.%.%.,.M n | ", "..x > j s.&.%.*.^ N > > > : x Q / A * : B } ", "..> > > q.Z $ # + % V.> V.V.V.C.c X o @ .", "..> > > x n O . o ; - - - ; = C ", "..> > > > W Z.& & . V ", "o.............<.<.S A A S S S S S S A S A ( " }; g2ipmsg-0.9.6+dfsg/pixmaps/ipmsgrev.xpm000066400000000000000000000077761126724573600201160ustar00rootroot00000000000000/* XPM */ static char *ipmsgrev[] = { /* columns rows colors chars-per-pixel */ "22 22 183 2", " c #010000", ". c #0E0E0E", "X c #1E1E0B", "o c #1A1819", "O c #363621", "+ c #3C3C2E", "@ c #141458", "# c #000060", "$ c #3B5454", "% c #424244", "& c #454548", "* c #525266", "= c #5D5D61", "- c #646463", "; c #68686C", ": c #7C7772", "> c #7E7E7D", ", c #0000B2", "< c #333396", "1 c #3232B7", "2 c #1010C8", "3 c #1919DC", "4 c #0B0BEC", "5 c #0303F6", "6 c #0101FC", "7 c #0B0BF3", "8 c #0D0DFF", "9 c #1717E6", "0 c #1313F5", "q c #1915F0", "w c #1D1DF4", "e c #2B2BCC", "r c #2424D8", "t c #3333C4", "y c #2121EC", "u c #2929E1", "i c #2828ED", "p c #2222F4", "a c #3131EC", "s c #5555A5", "d c #747487", "f c #73738B", "g c #7B7B81", "h c #7B7B8D", "j c #6E6EA6", "k c #7A7AA2", "l c #4444E6", "z c #4242EE", "x c #4D4DE2", "c c #5555E4", "v c #645ED8", "b c #746FC8", "n c #7070D0", "m c #6C858A", "M c #718A8F", "N c #7E9798", "B c #8E0000", "V c #970606", "C c #AE0000", "Z c #B10202", "A c #DB0000", "S c #C63535", "D c #C93838", "F c #D42626", "G c #EF0C0C", "H c #FC0000", "J c #FD2F00", "K c #FF3700", "L c #FC3D00", "P c #EE292B", "I c #EA293B", "U c #E73939", "Y c #EB3135", "T c #EA3B35", "R c #E93B3B", "E c #F22222", "W c #E4314C", "Q c #FC4D00", "! c #F2451C", "~ c #FC5100", "^ c #FE5F00", "/ c #FD6700", "( c #FB6B02", ") c #F67B16", "_ c #EE7529", "` c #DF4D52", "' c #DF5A59", "] c #D66974", "[ c #E14F4F", "{ c #E14E50", "} c #E3524F", "| c #E8564F", " . c #E25050", ".. c #BFBF33", "X. c #9A9A5B", "o. c #81816E", "O. c #8A8A6E", "+. c #848474", "@. c #80807C", "#. c #8B8673", "$. c #888874", "%. c #8B8B7C", "&. c #93936A", "*. c #A4A45A", "=. c #B4B447", "-. c #ECBD31", ";. c #D8AC70", ":. c #CECE28", ">. c #CDCD30", ",. c #C9C93D", "<. c #DCDC3C", "1. c #EBCB33", "2. c #E5E512", "3. c #FFE400", "4. c #FDEB00", "5. c #FCF500", "6. c #FCFC00", "7. c #F7F610", "8. c #CBCB44", "9. c #CBCB4D", "0. c #D2D256", "q. c #D3D35D", "w. c #C5C56F", "e. c #D8D86A", "r. c #DCDC7E", "t. c #EEEE46", "y. c #F1F150", "u. c #848484", "i. c #838388", "p. c #8A8A8A", "a. c #A8A8BF", "s. c #B3B3BC", "d. c #BAB5B6", "f. c #BBBBB7", "g. c #BDBCBC", "h. c #8C8CCE", "j. c #8888D0", "k. c #A89DC1", "l. c #A7A7C5", "z. c #ACA6C0", "x. c #ABABC6", "c. c #A5BED7", "v. c #A1BAD8", "b. c #B6B6C1", "n. c #B5B5CB", "m. c #B9B4C7", "M. c #BBBBC4", "N. c #B8BBCC", "B. c #AFC8D3", "V. c #B3CCCD", "C. c #BCC5C2", "Z. c #B9C3CB", "A. c #BCC8C3", "S. c #B9CCCD", "D. c #B5CED1", "F. c #B2CBDC", "G. c #BBD2CD", "H. c #B7D1D1", "J. c #B8D1D0", "K. c #AEE4E6", "L. c #C496AB", "P. c #C29CB1", "I. c #C5A3AA", "U. c #C0B7B6", "Y. c #C1BBB6", "T. c #C0BABA", "R. c #D9D484", "E. c #DDDD8B", "W. c #D5D593", "Q. c #C6CFA8", "!. c #C0C0B6", "~. c #C4C4BB", "^. c #CCC6B6", "/. c #CEC8B5", "(. c #CBCBBB", "). c #D6D6B7", "_. c #E0E086", "`. c #F2F289", "'. c #C0C0C1", "]. c #CCCCCB", "[. c #C2D6C9", "{. c #C6DFCC", "}. c #C7E0CE", /* pixels */ "H K / / ( L I ' . .{ { { { . . .} ` { .E ", "L 4.6.6.6.5._ M.H.J.J.S.J.D.H.H.J.F.{.G.K.' ", "~ 6.5.5.5.6.4.P S.Y.f.M.~./.T.T.m.R.b k.[. .", "Q 6.6.6.6.6.5.1.N.T.M.W.p.a g.N._.O.6 q B. .", "Q 6.6.6.6.6.5.-.N.g.~.8.5 6 x ].q.t 6 5 v.| ", "~ 6.5.5.5.6.5.Y S.T.~.8.6 6 l `.X.6 5 5 c.| ", "! 7.6.6.6.3.K I.C.g.~.,.6 6 c w.9 6 6 v {.{ ", "W Q.) / ( ;.] g.M.g.M.e.s 6 i 8 6 6 w z.J.{ ", "T M.P.L.L.Z.S.g.g.g.b.].n 6 6 6 5 6 l.^.D.` ", "R g.C.A.A.g.T.g.N.~.M.y.k 6 5 6 6 l ~.g.J.{ ", "R g.g.g.g.g.N.'.E.9.8...3 5 6 6 c (.T.g.D.{ ", "R g.g.~.g.N.r.0.O.4 6 6 6 6 6 8 j.~.g.g.J. .", "R g.g.g.g.g.<.1 6 6 6 0 0 0 6 6 a (.f.T.D.{ ", "R '.g.'.b.6.s 6 7 6 p b.(.x.6 6 l ).b.T.J. .", "U g.f.n.t.:.9 7 5 w s.f.f.a.7 6 0 h.g.d.V.} ", "F > @.f 2.d 6 5 6 f %.g f *.&.6 5 6 r #.M S ", "F > > g >.6 5 5 e @.> > > > =.t 6 6 u #.M D ", "F > > g =.6 6 8 j %.> > > g +.> 2 , * : p.D ", "F > > > h < # @ + % u.@.u.u.i.u.+.X o $ D ", "F > > > > $.O . o - - - - ; = V ", "F > > > > g i.& % B ", "G F F F F F F R [ Z Z Z Z Z Z Z Z Z C C C A " }; g2ipmsg-0.9.6+dfsg/po/000077500000000000000000000000001126724573600144505ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/po/ChangeLog000066400000000000000000000000001126724573600162100ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/po/Makefile.in.in000066400000000000000000000153231126724573600171260ustar00rootroot00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # Copyright (C) 2004-2008 Rodney Dawes # # This file may be copied and used freely without restrictions. It may # be used in projects which are not available under a GNU Public License, # but which still want to provide support for the GNU gettext functionality. # # - 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 # # - Modified by Rodney Dawes for use with intltool # # We have the following line for use by intltoolize: # INTLTOOL_MAKEFILE GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ datarootdir = @datarootdir@ libdir = @libdir@ DATADIRNAME = @DATADIRNAME@ itlocaledir = $(prefix)/$(DATADIRNAME)/locale subdir = po install_sh = @install_sh@ # Automake >= 1.8 provides @mkdir_p@. # Until it can be supposed, use the safe fallback: mkdir_p = $(install_sh) -d INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi) USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES) EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS POTFILES = \ # This comment gets stripped out CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) .SUFFIXES: .SUFFIXES: .po .pox .gmo .mo .msg .cat .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && gencat $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-data install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all $(mkdir_p) $(DESTDIR)$(itlocaledir) linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ $(mkdir_p) $$dir; \ if test -r $$lang.gmo; then \ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ else \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ echo "installing $(srcdir)/$$lang.gmo as" \ "$$dir/$(GETTEXT_PACKAGE).mo"; \ fi; \ if test -r $$lang.gmo.m; then \ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ if test -r $(srcdir)/$$lang.gmo.m ; then \ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ $$dir/$(GETTEXT_PACKAGE).mo.m; \ echo "installing $(srcdir)/$$lang.gmo.m as" \ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ else \ true; \ fi; \ fi; \ done # Empty stubs to satisfy archaic automake needs dvi info tags TAGS ID: # Define this as empty until I found a useful application. install-exec installcheck: uninstall: linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ done check: all $(GETTEXT_PACKAGE).pot rm -f missing notexist srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m if [ -r missing -o -r notexist ]; then \ exit 1; \ fi mostlyclean: rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp rm -f .intltool-merge-cache clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES stamp-it rm -f *.mo *.msg *.cat *.cat.m *.gmo 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 Makefile.in.in distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ extra_dists="$(EXTRA_DISTFILES)"; \ for file in $$extra_dists; do \ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ done; \ for file in $$dists; do \ test -f $$file || file="$(srcdir)/$$file"; \ ln $$file $(distdir) 2> /dev/null \ || cp -p $$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ linguas="$(USE_LINGUAS)"; \ for lang in $$linguas; do \ echo "$$lang:"; \ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ if $$result; then \ if cmp $(srcdir)/$$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 $$lang.gmo failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done Makefile POTFILES: stamp-it @if test ! -f $@; then \ rm -f stamp-it; \ $(MAKE) stamp-it; \ fi stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ $(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: g2ipmsg-0.9.6+dfsg/po/POTFILES.in000066400000000000000000000007071126724573600162310ustar00rootroot00000000000000# List of source files containing translatable strings. [encoding: UTF-8] g2ipmsg.server.in g2ipmsg.schemas.in g2ipmsg.desktop.in g2ipmsg.xml src/copying.h src/ipmsg.c src/main.c src/netcommon.c src/interface.c src/callbacks.c src/support.c src/codeset.c src/fileattach.c src/hostinfo.c src/logfile.c src/menu.c src/message.c src/msginfo.c src/protocol.c src/recvmsg.c src/tcp.c src/udp.c src/userdb.c src/fuzai.c src/dialog.c src/cryptif.c src/base64.c g2ipmsg-0.9.6+dfsg/po/ja.po000066400000000000000000001553741126724573600154210ustar00rootroot00000000000000# 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-21 15:09+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=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../g2ipmsg.server.in.h:1 ../src/applet.c:180 ../src/applet.c:232 msgid "G2IPMSG Applet" msgstr "GNOME2版 IPメッセンジャー アプレット" #: ../g2ipmsg.server.in.h:2 msgid "G2IPMSG applet for the GNOME2 panel" msgstr "GNOME2 パネル用 IPメッセンジャー アプレット" #: ../g2ipmsg.server.in.h:3 msgid "Utility" msgstr "ユーティリティ" #: ../g2ipmsg.schemas.in.h:1 msgid "Absence message editor height" msgstr "不在通知文エディタの高さ" #: ../g2ipmsg.schemas.in.h:2 msgid "Absence message editor width" msgstr "不在通知文エディタの幅" #: ../g2ipmsg.schemas.in.h:3 msgid "Absence messages" msgstr "不在文" #: ../g2ipmsg.schemas.in.h:4 msgid "Absence titile" msgstr "不在メッセージ表題" #: ../g2ipmsg.schemas.in.h:5 ../src/interface.c:3347 msgid "Allow host list sending" msgstr "ホストリスト送信を許可" #: ../g2ipmsg.schemas.in.h:6 msgid "Attachment editor height" msgstr "添付ファイルエディタの高さ" #: ../g2ipmsg.schemas.in.h:7 msgid "Attachment editor width" msgstr "添付ファイルエディタの幅" #: ../g2ipmsg.schemas.in.h:8 msgid "Avoid playing sound on message arrive." msgstr "サウンドを鳴らさない" #: ../g2ipmsg.schemas.in.h:9 msgid "Broadcast addresses" msgstr "ブロードキャストアドレス" #: ../g2ipmsg.schemas.in.h:10 msgid "Change default absence message editor height" msgstr "不在通知文エディタの高さの既定値の変更" #: ../g2ipmsg.schemas.in.h:11 msgid "Change default absence message editor width" msgstr "不在通知文エディタの幅の既定値の変更" #: ../g2ipmsg.schemas.in.h:12 msgid "Change default attachment editor height" msgstr "添付ファイルエディタの高さの既定値の変更" #: ../g2ipmsg.schemas.in.h:13 msgid "Change default attachment editor width" msgstr "添付ファイルエディタの幅の既定値の変更" #: ../g2ipmsg.schemas.in.h:14 msgid "Change default message window height" msgstr "メッセージウィンドウの高さの既定値の変更" #: ../g2ipmsg.schemas.in.h:15 msgid "Change default message window width" msgstr "メッセージウィンドウ幅の既定値の変更" #: ../g2ipmsg.schemas.in.h:16 msgid "Change default receive window height" msgstr "受信ウィンドウの高さの既定値の変更" #: ../g2ipmsg.schemas.in.h:17 msgid "Change default receive window width" msgstr "受信ウィンドウ幅の既定値の変更" #: ../g2ipmsg.schemas.in.h:18 msgid "Check citation as default." msgstr "引用チェックをデフォルトにする" #: ../g2ipmsg.schemas.in.h:19 msgid "Check read message confirmation as default." msgstr "開封確認チェックをデフォルトにする" #: ../g2ipmsg.schemas.in.h:20 msgid "Citation Control" msgstr "引用制御" #: ../g2ipmsg.schemas.in.h:21 msgid "Citation prefix" msgstr "引用文字列" #: ../g2ipmsg.schemas.in.h:22 msgid "External encoding for message" msgstr "メッセージのデフォルトエンコーディング" #: ../g2ipmsg.schemas.in.h:23 msgid "External message encoding to exchange messages via the network." msgstr "ネットワーク上でメッセージを交換する際のデフォルトメッセージエンコーディング" #: ../g2ipmsg.schemas.in.h:22 msgid "Default priority" msgstr "デフォルトの優先度" #: ../g2ipmsg.schemas.in.h:23 msgid "Default priority(Separated by '@')" msgstr "デフォルトの優先度('@'で区切って指定)" #: ../g2ipmsg.schemas.in.h:24 msgid "Enable IP V6 mode" msgstr "IP V6モードの有効化" #: ../g2ipmsg.schemas.in.h:25 msgid "Enable IP address logging." msgstr "IPアドレスをログに記録する" #: ../g2ipmsg.schemas.in.h:26 msgid "Enable dialup mode" msgstr "ダイアルアップモードの有効化" #: ../g2ipmsg.schemas.in.h:27 ../src/interface.c:3352 msgid "Enable getting host list facility" msgstr "更新時にホストリストを取得する" #: ../g2ipmsg.schemas.in.h:28 ../src/interface.c:3507 msgid "Enable lock for enclosed messages" msgstr "封書に錠を設定する." #: ../g2ipmsg.schemas.in.h:29 msgid "Enable logging" msgstr "ログを記録する" #: ../g2ipmsg.schemas.in.h:30 msgid "Enable logging on log-file." msgstr "ログファイルにログを記録する" #: ../g2ipmsg.schemas.in.h:31 msgid "Enclose messages as default." msgstr "封書をデフォルトにする" #: ../g2ipmsg.schemas.in.h:32 msgid "Encryption password for lock. This is encoded with pbkdf2." msgstr "錠付き封書を開封するパスワード.これは, pbkdf2でエンコードされています." #: ../g2ipmsg.schemas.in.h:33 msgid "" "Encryption password for public/private key storage. This is encoded with " "pbkdf2." msgstr "公開鍵/秘密鍵を暗号化するパスワード.これは, pbkdf2でエンコードされています." #: ../g2ipmsg.schemas.in.h:34 msgid "Group Name" msgstr "グループ名" #: ../g2ipmsg.schemas.in.h:35 msgid "Group name which you belong to." msgstr "貴方が所属しているグループ" #: ../g2ipmsg.schemas.in.h:36 msgid "Group sort with descending order." msgstr "グループによる逆順ソート" #: ../g2ipmsg.schemas.in.h:37 msgid "Header order" msgstr "ヘッダ順序" #: ../g2ipmsg.schemas.in.h:38 msgid "Header visual" msgstr "ヘッダ表示" #: ../g2ipmsg.schemas.in.h:39 msgid "Header visual state" msgstr "ヘッダ表示の状態" #: ../g2ipmsg.schemas.in.h:40 msgid "IP address logging" msgstr "IPアドレスをログに記録する" #: ../g2ipmsg.schemas.in.h:41 msgid "Iconify normal dialogs when they are shown at first time." msgstr "送信/開封確認をアイコン表示" #: ../g2ipmsg.schemas.in.h:42 msgid "Inconify dialogs" msgstr "送信/開封確認をアイコン表示" #: ../g2ipmsg.schemas.in.h:43 msgid "Internal header order representation." msgstr "ヘッダ表示順序の内部表現." #: ../g2ipmsg.schemas.in.h:44 msgid "Internal representation of sub sorting id." msgstr "サブソートIDの内部表現" #: ../g2ipmsg.schemas.in.h:45 msgid "Logging user's logon name." msgstr "ログオン名をログに記録する" #: ../g2ipmsg.schemas.in.h:46 msgid "Nick name" msgstr "ニックネーム" #: ../g2ipmsg.schemas.in.h:47 msgid "Nick name which is displayed on ipmsg window." msgstr "ウィンドウに表示されるニックネーム" #: ../g2ipmsg.schemas.in.h:48 ../src/interface.c:705 msgid "" "Please check here if you want to log the content of the message after the " "message is opened when the message is locked." msgstr "施錠されたメッセージをログに記録するときは, 開封後に記録するようにしたい場合は, ここをチェックしてください." #: ../g2ipmsg.schemas.in.h:49 ../src/interface.c:3496 msgid "" "Please check here if you want to store public/private keys with encryption ." msgstr "公開鍵と秘密鍵を暗号化して保存する場合はここをチェックしてください." #: ../g2ipmsg.schemas.in.h:50 ../src/interface.c:3510 msgid "" "Please check here if you want to use the lock feature(Sent messages can be " "opened by receiver's password.)" msgstr "封書に錠を設定する(受信メッセージの開封時に受信者が設定したパスワードを問い合わせる)場合は, ここをチェックしてください." #: ../g2ipmsg.schemas.in.h:51 msgid "" "Please set here if you want to use g2ipmsg in the System Tray, This need the " "system tray which perform with freedesktop.org compliant System Tray Protocol" "(see:http://www.freedesktop.org/wiki/Standards/systemtray-spec. This require " "gtk-2.10 or later)." msgstr "g2ipmsgをシステムトレイに常駐させる場合は, ここをセットしてください. これには, freedesktop.orgのシステムトレイプロトコルに準拠したシステムトレイが必要です(http://www.freedesktop.org/wiki/Standards/systemtray-spec.参照.これには, gtk-2.10以上が必要です.)." #: ../g2ipmsg.schemas.in.h:52 msgid "Popup message windows." msgstr "受信ウィンドウをポップアップする" #: ../g2ipmsg.schemas.in.h:53 msgid "Port number" msgstr "ポート番号" #: ../g2ipmsg.schemas.in.h:54 msgid "Secret message" msgstr "封書" #: ../g2ipmsg.schemas.in.h:55 msgid "Select cipher according to speed." msgstr "速度優先で暗号化アルゴリズムを選択する." #: ../g2ipmsg.schemas.in.h:56 msgid "Select ciphers to encrypt messages." msgstr "暗号化に使用する暗号方式を選択してください." #: ../g2ipmsg.schemas.in.h:57 msgid "Select ciphers." msgstr "暗号化に使用する暗号方式を選択してください." #: ../g2ipmsg.schemas.in.h:58 msgid "Set Broadcast addresses." msgstr "ブロードキャストアドレスを設定" #: ../g2ipmsg.schemas.in.h:59 msgid "Set here if you want to sort user list with group." msgstr "グループ名によるソートを行う場合はここをセットしてください." #: ../g2ipmsg.schemas.in.h:60 msgid "Set here to sort user list with descending ordered group name." msgstr "グループ名によるソートを逆順で行う場合はここをセットしてください." #: ../g2ipmsg.schemas.in.h:61 msgid "Set here to sort user list with descending ordered sub sort key." msgstr "サブソートキーによるソートを逆順で行う場合はここをセットしてください." #: ../g2ipmsg.schemas.in.h:62 msgid "Set log file name." msgstr "ログを記録するファイル名" #: ../g2ipmsg.schemas.in.h:63 msgid "Set on this if you want send messages with seal as a default." msgstr "封書をデフォルトにする場合はここをセットしてください." #: ../g2ipmsg.schemas.in.h:64 msgid "Set this option if use g2ipmsg on IP V6 network" msgstr "g2ipmsgをIP V6 ネットワーク上で使用する場合はここを有効にしてください." #: ../g2ipmsg.schemas.in.h:65 msgid "Set this option to allow host list sending" msgstr "ホストリスト送信処理を有効にする場合はここを有効にしてください." #: ../g2ipmsg.schemas.in.h:66 msgid "Set this option to enable dialup mode." msgstr "ダイアルアップ環境で使用する場合は, このオプションを有効にしてください." #: ../g2ipmsg.schemas.in.h:67 msgid "Set this option to enable getting host list facility" msgstr "ホストリスト取得処理を有効にする場合はここを有効にしてください." #: ../g2ipmsg.schemas.in.h:68 msgid "" "Set this option to select ciphers according to encoding/decoding speed. If " "you use low speed machine, please set this option." msgstr "暗号化アルゴリズムを暗号化/復号化の速度に基づいて選択する場合は, このオプションを有効にします. 遅いマシンを使用している場合は, このオプションをセットしてください." #: ../g2ipmsg.schemas.in.h:69 msgid "Sort user list with group" msgstr "グループ名でソート" #: ../g2ipmsg.schemas.in.h:70 msgid "Sound setting" msgstr "音声の設定" #: ../g2ipmsg.schemas.in.h:71 ../src/interface.c:3493 msgid "Store encrypted public/private key pairs" msgstr "公開鍵/秘密鍵を暗号化して保存する." #: ../g2ipmsg.schemas.in.h:72 msgid "String which indicate citation." msgstr "引用を示す文字列" #: ../g2ipmsg.schemas.in.h:73 msgid "Sub sort with descending order" msgstr "サブソートキーによるソートを逆順で行う" #: ../g2ipmsg.schemas.in.h:74 msgid "Sub sorting id" msgstr "サブソートキー" #: ../g2ipmsg.schemas.in.h:75 msgid "The port number which g2ipmsg uses." msgstr "g2ipmsgで使用するポート番号" #: ../g2ipmsg.schemas.in.h:76 msgid "Use SysTray" msgstr "システムトレイに常駐する" #: ../g2ipmsg.schemas.in.h:77 msgid "[ABSENT,EATING,OUT,MEETING,VISITOR,HOME,EDO,SHUKKE]" msgstr "[不在,食事中,外出中,会議中,来客中,帰宅,江戸,出家]" #: ../g2ipmsg.schemas.in.h:78 msgid "" "[I am absent now.,I have been gone somewhere to eat.,I am out now.,I attend " "meeting now.,A visitor comes here.,I have come home.,Edo,Shukke.]" msgstr "[不在中です.,食事中です.,外出中です.,会議中です. " ",接客中です.,帰宅しました.,江戸所払いを申しつける,人生に疲れました.探さないでください]" #: ../g2ipmsg.schemas.in.h:79 msgid "enable debug output" msgstr "デバッグ出力を有効にする" #: ../g2ipmsg.schemas.in.h:80 msgid "enclose" msgstr "封書" #: ../g2ipmsg.schemas.in.h:81 msgid "encryption password for lock" msgstr "施錠に使用するパスワード" #: ../g2ipmsg.schemas.in.h:82 msgid "encryption password for public/private key storage" msgstr "公開鍵/秘密鍵を暗号化して保存するために使用するパスワード" #: ../g2ipmsg.schemas.in.h:83 ../src/interface.c:656 msgid "log file" msgstr "ログファイル" #: ../g2ipmsg.schemas.in.h:84 msgid "logging locked message after openning it" msgstr "錠付きのメッセージ" #: ../g2ipmsg.schemas.in.h:85 msgid "logon-name logging" msgstr "ログオン名の記録" #: ../g2ipmsg.schemas.in.h:86 msgid "message window height" msgstr "メッセージウィンドウ高" #: ../g2ipmsg.schemas.in.h:87 msgid "message window width" msgstr "メッセージウィンドウ幅" #: ../g2ipmsg.schemas.in.h:88 msgid "popup messages" msgstr "ポップアップ受信" #: ../g2ipmsg.schemas.in.h:89 msgid "read message confirmation" msgstr "開封確認" #: ../g2ipmsg.schemas.in.h:90 msgid "receive window height" msgstr "受信ウィンドウ高" #: ../g2ipmsg.schemas.in.h:91 msgid "receive window width" msgstr "受信ウィンドウ幅" #: ../g2ipmsg.schemas.in.h:92 msgid "set Absense titles" msgstr "不在文を設定してください" #: ../g2ipmsg.desktop.in.h:1 msgid "GNOME2 IP Messenger" msgstr "GNOME2 IPメッセンジャー" #: ../g2ipmsg.desktop.in.h:2 msgid "IP Messenger for the GNOME2" msgstr "GNOME2 版 IPメッセンジャー" #: ../g2ipmsg.xml.h:1 msgid "A_bsence mode" msgstr "不在モード" #: ../g2ipmsg.xml.h:2 msgid "A_ttend" msgstr "在席" #: ../g2ipmsg.xml.h:3 msgid "_About" msgstr "情報" #: ../g2ipmsg.xml.h:4 msgid "_Down Load Monitor" msgstr "ダウンロードモニタ" #: ../g2ipmsg.xml.h:5 msgid "_Foreground all message windows" msgstr "全受信ウィンドウを前面に" #: ../g2ipmsg.xml.h:6 ../src/menu.c:381 msgid "_New Message" msgstr "新規メッセージ作成" #: ../g2ipmsg.xml.h:7 msgid "_Preferences" msgstr "設定" #: ../g2ipmsg.xml.h:10 msgid "_security configuration" msgstr "セキュリティ設定" #: ../g2ipmsg.xml.h:8 msgid "_Remove opend windows" msgstr "開封済みウィンドウを全消去" #: ../g2ipmsg.xml.h:9 msgid "_Show Log" msgstr "ログ参照" #: ../src/applet.c:180 msgid "users:" msgstr "ユーザ数:" #: ../src/base64.c:156 msgid "Invalid char" msgstr "不正な文字を検出しました" #: ../src/callbacks.c:211 #, c-format msgid "Can not send message to %s pktno=%d" msgstr "%s にメッセージを送信できませんでした (パケット番号 = %d)" #: ../src/callbacks.c:375 msgid "Broad cast addresses" msgstr "ブロードキャストアドレス" #: ../src/callbacks.c:498 ../src/interface.c:1283 msgid "LogFile" msgstr "ログファイル" #: ../src/callbacks.c:941 ../src/interface.c:1996 msgid "FilePath" msgstr "ファイルパス" #: ../src/callbacks.c:961 ../src/downloads.c:662 ../src/interface.c:2549 msgid "FileSize" msgstr "ファイルサイズ" #: ../src/callbacks.c:981 ../src/downloads.c:602 msgid "FileType" msgstr "ファイル種別" #: ../src/callbacks.c:1929 ../src/callbacks.c:2103 ../src/callbacks.c:2129 #: ../src/callbacks.c:2244 #, c-format msgid "Can not handle drag data %s (%d)" msgstr "ドラッグデータを処理できませんでした %s (%d)" #: ../src/callbacks.c:2537 msgid "Can not open URL" msgstr "URLを開けませんでした" #: ../src/callbacks.c:2539 msgid "Please check your gnome configuration(url-handler setting)" msgstr "GNOMEの設定(url-handlerの設定)を確認してください" #: ../src/callbacks.c:2896 ../src/interface.c:3123 msgid "AttachmentFile" msgstr "添付ファイル" #: ../src/callbacks.c:3184 #, c-format msgid "Can not require %s to %s" msgstr "%s を %sに要求することができませんでした." #: ../src/copying.h:29 ../src/interface.c:1338 ../src/menu.c:479 msgid "Takeharu KATO" msgstr "加藤 丈治" #: ../src/copying.h:30 msgid "" "Takeharu KATO\n" "ZC Miao\n" msgstr "加藤 丈治\n" "ZC Miao\n" #: ../src/cryptif.c:686 msgid "Can not decode message" msgstr "" #: ../src/cryptif.c:686 msgid "peer" msgstr "送信元" #. #: ../src/dialog.c:112 ../src/dialog.c:115 ../src/dialog.c:122 #: ../src/dialog.c:408 ../src/dialog.c:448 ../src/dialog.c:467 #: ../src/dialog.c:480 ../src/downloads.c:966 ../src/g2ipmsg.h:129 #: ../src/hostinfo.c:772 ../src/hostinfo.c:859 ../src/recvmsg.c:311 #: ../src/uicommon.c:384 ../src/userdb.h:34 msgid "UnKnown" msgstr "不明" #: ../src/dialog.c:296 msgid "Version Information" msgstr "バージョン情報" #: ../src/dialog.c:299 msgid "Absence Information" msgstr "不在文情報" #: ../src/dialog.c:313 ../src/protocol.c:1855 ../src/recvmsg.c:301 #: ../src/userdb.c:254 ../src/userdb.c:259 ../src/userdb.c:265 #: ../src/userdb.c:271 ../src/userdb.c:277 ../src/userdb.c:690 #, c-format msgid "Can not convert message from %s into ineternal representation" msgstr "%s から受信したメッセージを内部形式に変換できませんでした." #. --- Column #4 --- #: ../src/dialog.c:343 ../src/interface.c:2844 ../src/interface.c:2954 #: ../src/uicommon.c:307 msgid "IP Address" msgstr "IP アドレス" #: ../src/dialog.c:345 ../src/dialog.c:385 msgid "Capability" msgstr "能力" #: ../src/dialog.c:353 ../src/dialog.c:356 msgid "Dial up" msgstr "ダイアルアップ" #: ../src/dialog.c:353 ../src/dialog.c:362 ../src/dialog.c:371 #: ../src/dialog.c:384 msgid "YES" msgstr "はい" #: ../src/dialog.c:356 ../src/dialog.c:365 ../src/dialog.c:374 #: ../src/dialog.c:474 msgid "NO" msgstr "いいえ" #: ../src/dialog.c:362 ../src/dialog.c:365 msgid "UTF-8" msgstr "UTF-8" #: ../src/dialog.c:371 ../src/dialog.c:374 msgid "File Attach" msgstr "ファイル添付" #: ../src/dialog.c:384 ../src/dialog.c:473 msgid "Encryption Capability" msgstr "暗号化能力" #: ../src/dialog.c:395 msgid "Public key encryption" msgstr "公開鍵暗号" #: ../src/dialog.c:399 ../src/interface.c:3424 msgid "RSA 512 bits" msgstr "RSA 512 ビット" #: ../src/dialog.c:402 ../src/interface.c:3431 msgid "RSA 1024 bits" msgstr "RSA 1024 ビット" #: ../src/dialog.c:405 ../src/interface.c:3438 msgid "RSA 2048 bits" msgstr "RSA 2048 ビット" #: ../src/dialog.c:417 msgid "Symmetric key encryption" msgstr "対称鍵暗号" #: ../src/dialog.c:422 ../src/interface.c:3375 msgid "RC2 40 bits" msgstr "RC2 40 ビット" #: ../src/dialog.c:425 ../src/interface.c:3382 msgid "RC2 128 bits" msgstr "RC2 128 ビット" #: ../src/dialog.c:428 ../src/interface.c:3389 msgid "RC2 256 bits" msgstr "RC2 256 ビット" #: ../src/dialog.c:431 ../src/interface.c:3396 msgid "Blowfish 128 bits" msgstr "Blowfish 128 ビット" #: ../src/dialog.c:434 ../src/interface.c:3403 msgid "Blowfish 256 bits" msgstr "Blowfish 256 ビット" #: ../src/dialog.c:437 ../src/interface.c:3445 msgid "AES 128 bits" msgstr "AES 128 ビット" #: ../src/dialog.c:440 ../src/interface.c:3452 msgid "AES 192 bits" msgstr "AES 192 ビット" #: ../src/dialog.c:443 ../src/interface.c:3459 msgid "AES 256 bits" msgstr "AES 256 ビット" #: ../src/dialog.c:456 msgid "Signature" msgstr "署名" #: ../src/dialog.c:461 msgid "MD5" msgstr "MD5 署名" #: ../src/dialog.c:464 msgid "SHA1" msgstr "SHA1 署名" #: ../src/dialog.c:657 msgid "Password for public/private keys" msgstr "公開鍵/秘密鍵を暗号化するパスワード." #: ../src/dialog.c:661 msgid "Password message for lock." msgstr "錠付き封書を開封するパスワード." #: ../src/downloads.c:582 msgid "FileID" msgstr "ファイルID" #: ../src/downloads.c:622 ../src/interface.c:2545 ../src/interface.c:3748 msgid "FileName" msgstr "ファイル名" #: ../src/downloads.c:642 msgid "Recv Size" msgstr "受信サイズ" #: ../src/downloads.c:682 msgid "Progress" msgstr "進捗" #: ../src/downloads.c:809 ../src/interface.c:2723 msgid "Directory" msgstr "ディレクトリ" #: ../src/downloads.c:874 msgid "Downloaded File" msgstr "ダウンロードファイル名" #: ../src/downloads.c:878 msgid "Downloaded Size" msgstr "ファイルサイズ" #: ../src/downloads.c:894 ../src/downloads.c:897 msgid "Helper Application" msgstr "関連付けられているアプリケーション" #: ../src/downloads.c:897 ../src/hostinfo.c:173 ../src/hostinfo.c:281 msgid "Undefined" msgstr "未定義" #: ../src/fuzai.c:98 msgid "title" msgstr "不在通知表題" #: ../src/hostinfo.c:438 msgid "I am here." msgstr "私はここにいる." #: ../src/hostinfo.c:788 msgid "Default Group" msgstr "デフォルトグループ" #: ../src/hostinfo.c:843 msgid "Default Nick Name" msgstr "デフォルトニックネーム" #: ../src/interface.c:36 msgid "Attachment" msgstr "添付" #: ../src/interface.c:50 ../src/interface.c:3047 msgid "Set priority as 1" msgstr "表示優先度1に設定" #: ../src/interface.c:57 ../src/interface.c:3054 msgid "Set priority as 2" msgstr "表示優先度2に設定" #: ../src/interface.c:64 ../src/interface.c:3061 msgid "Set priority as 3" msgstr "表示優先度3に設定" #: ../src/interface.c:71 ../src/interface.c:3068 msgid "Set priority as 4" msgstr "表示優先度4に設定" #: ../src/interface.c:78 ../src/interface.c:3075 msgid "Set them as default" msgstr "デフォルト表示に移動" #: ../src/interface.c:85 ../src/interface.c:3082 msgid "Set them invisible item" msgstr "非表示に移動" #: ../src/interface.c:93 ../src/interface.c:3090 msgid "Show invisible items" msgstr "非表示を表示" #: ../src/interface.c:100 ../src/interface.c:3097 msgid "Set all as default" msgstr "全員をデフォルト表示に戻す" #: ../src/interface.c:115 ../src/interface.c:3109 msgid "Sort filter" msgstr "ソートフィルタ" #: ../src/interface.c:116 msgid "Set priority of entries" msgstr "グループ選択" #: ../src/interface.c:122 ../src/interface.c:3138 msgid "User list view config" msgstr "詳細表示設定" #: ../src/interface.c:123 msgid "Set user list configurations." msgstr "詳細表示設定を行います" #: ../src/interface.c:129 ../src/interface.c:3131 msgid "Save list headers state" msgstr "リストヘッダ保存" #: ../src/interface.c:130 msgid "Save current setting about user list." msgstr "ユーザリストの現在の設定値を確定します." #: ../src/interface.c:137 msgid "security configuration" msgstr "セキュリティ設定" #: ../src/interface.c:138 msgid "Set security relevant configuration" msgstr "セキュリティ関連の設定を行います" #: ../src/interface.c:149 msgid "Update" msgstr "更新" #: ../src/interface.c:156 msgid "get version" msgstr "バージョン情報取得" #: ../src/interface.c:163 msgid "get absence info" msgstr "不在文取得" #: ../src/interface.c:217 ../src/interface.c:946 msgid "g2ipmsg" msgstr "GNOME2版IPメッセンジャー" #: ../src/interface.c:255 msgid "Please select receivers or drop attachment files." msgstr "受信者を選択, または添付ファイルをドロップしてください." #: ../src/interface.c:276 msgid "current users" msgstr "現在のユーザ数" #: ../src/interface.c:280 msgid "Users" msgstr "ユーザ数" #: ../src/interface.c:288 msgid "Please push this button to update the user list." msgstr "このボタンを押してユーザ一覧を更新してください." #: ../src/interface.c:300 msgid "Please edit your message or drop attachment files." msgstr "受信者を選択, または添付ファイルをドロップしてください." #: ../src/interface.c:311 ../src/interface.c:1545 ../src/interface.c:2095 #: ../src/interface.c:2447 ../src/interface.c:2570 msgid "Please push this button to close this window." msgstr "このボタンを押すと, ウィンドウが閉じられます." #: ../src/interface.c:313 msgid "SEND" msgstr "送信" #: ../src/interface.c:317 msgid "Please push this button to send the message." msgstr "このボタンを押してメッセージを送信してください." #: ../src/interface.c:323 msgid "enclose message" msgstr "封書" #: ../src/interface.c:326 msgid "Check here to make this message sealed." msgstr "封書で送信する場合は, ここをチェックしてください." #: ../src/interface.c:328 msgid "lock" msgstr "錠" #: ../src/interface.c:331 msgid "Check here to lock this message(need to enclose the message)." msgstr "ここをチェックすると本メッセージに施錠します(封書で送信する必要があります)." #: ../src/interface.c:498 msgid "configuration" msgstr "設定" #: ../src/interface.c:528 msgid "Enter your nick name." msgstr "ユーザ名(愛称)を入力してください." #: ../src/interface.c:531 msgid "User Name" msgstr "ユーザ名" #: ../src/interface.c:553 msgid "Add" msgstr "追加" #: ../src/interface.c:556 msgid "Please push here to add your group name." msgstr "ここを押すと, 入力したグループ名が追加されます." #: ../src/interface.c:558 msgid "Group Name" msgstr "グループ名" #: ../src/interface.c:580 msgid "enable open check" msgstr "開封確認を有効にする" #: ../src/interface.c:583 msgid "Please check here to receive read notification from receiver." msgstr "開封確認を受信する場合は, ここをチェックしてください." #: ../src/interface.c:585 msgid "Non-popup receive" msgstr "ポップアップ受信を抑制する" #: ../src/interface.c:588 msgid "Refrain automatic popuped receive window creation." msgstr "メッセージ受信時の受信ウィンドウのポップアップを行わないように設定する場合は, ここをチェックしてください." #: ../src/interface.c:590 msgid "No sound" msgstr "サウンドを鳴らさない" #: ../src/interface.c:593 msgid "Please check here to refrain from playing sounds." msgstr "起動・受信時にサウンドの再生を行わないように設定する場合は, ここをチェックしてください." #: ../src/interface.c:595 msgid "check enclose message as default" msgstr "封書チェックをデフォルトにする" #: ../src/interface.c:598 msgid "Please check here if you want to send sealed messages as default." msgstr "封書送信をデフォルトにする場合は, ここをチェックしてください." #: ../src/interface.c:600 msgid "check citation as default" msgstr "引用チェックをデフォルトにする" #: ../src/interface.c:603 msgid "" "Please check here if you want to edit reply message with citation of " "original message." msgstr "デフォルトで返信時に元のメッセージを引用するように設定する場合は, ここをチェックしてください." #: ../src/interface.c:605 msgid "enable IP V6 only mode (Need restart)" msgstr "IP V6 専用モードを有効にする(要再起動)" #: ../src/interface.c:608 msgid "Please check here to use this software on the IP V6 environment." msgstr "IP V6環境でこのソフトウエアを使用する場合は, ここをチェックしてください." #: ../src/interface.c:610 msgid "enable dial up connection mode" msgstr "ダイアルアップ接続モードを有効にする" #: ../src/interface.c:613 msgid "Please check here to use this software on the dial up environment." msgstr "ダイアルアップ環境でこのソフトウエアを使用する場合は, ここをチェックしてください." #: ../src/interface.c:615 msgid "iconfy read confirmation dialog" msgstr "送信/開封確認をアイコン表示" #: ../src/interface.c:617 msgid "Please check here to iconify read confirmation dialog window." msgstr "送信/開封確認ダイアログをアイコン化する場合は, ここをチェックしてください." #: ../src/interface.c:623 msgid "External representation of IPMSG character code" msgstr "IPMSGの外部文字コード形式" #: ../src/interface.c:619 msgid "Options" msgstr "オプション" #: ../src/interface.c:642 msgid "Please push this button to choose the log-file." msgstr "ログファイルを選択する場合は, このボタンを押してください." #: ../src/interface.c:665 msgid "" "This entry show log-file path, please edit here to specify your log-file " "path." msgstr "このエントリはログファイルのパスを表示しています.ログファイルを指定する場合は, ここを編集してください." #: ../src/interface.c:668 msgid "enable logging" msgstr "ログを有効にする" #: ../src/interface.c:673 msgid "Please check here to enable logging facility." msgstr "ログ機能を有効にする場合は, ここをチェックしてください." #: ../src/interface.c:690 msgid "logging logon name" msgstr "ログオン名を記録する" #: ../src/interface.c:694 msgid "Please check here to log user's logon name into the log-file." msgstr "ログオン名をログに記録する場合は, ここをチェックしてください." #: ../src/interface.c:696 msgid "logging IP Addresses" msgstr "IPアドレスを記録する" #: ../src/interface.c:700 msgid "Please check here to log user's IP addresses into the log-file." msgstr "IPアドレスをログに記録する場合は, ここをチェックしてください." #: ../src/interface.c:702 msgid "logging locked messages after opening the message." msgstr "錠前付き受信ログは解除後に記録." #: ../src/interface.c:707 msgid "Logging Option" msgstr "ロギングオプション" #: ../src/interface.c:712 msgid "Logfile" msgstr "ログファイル" #: ../src/interface.c:733 msgid "Please input broad cast address." msgstr "ブロードキャストアドレスを入力してください." #: ../src/interface.c:741 ../src/interface.c:1836 msgid ">>" msgstr ">>" #: ../src/interface.c:745 msgid "" "Please push this button to add the broad cast address to broad cast address " "list." msgstr "ブロードキャストアドレスをブロードキャストアドレスリストに追加する場合は, このボタンを押してください." #: ../src/interface.c:747 ../src/interface.c:1842 msgid "<<" msgstr "<<" #: ../src/interface.c:751 msgid "" "Please push this button to remove the broad cast address from broad cast " "address list." msgstr "ブロードキャストアドレスをブロードキャストアドレスリストから取り除く場合は, このボタンを押してください." #: ../src/interface.c:764 msgid "" "This list shows broad cast addresses for entry/absence status notification." msgstr "このリストは, 参加/不在通知時に使用するブロードキャストアドレスの一覧を表しています." #: ../src/interface.c:766 msgid "Broadcast address setting" msgstr "ブロードキャストアドレスの設定" #: ../src/interface.c:778 msgid "Please push this button to apply this configuration." msgstr "設定を適用する場合は, このボタンを押してください." #: ../src/interface.c:783 msgid "Please push this button to discard this configuration" msgstr "設定を破棄する場合は, このボタンを押してください." #: ../src/interface.c:1021 msgid "DownLoad" msgstr "ダウンロード" #: ../src/interface.c:1053 msgid "This entry show where files are stored." msgstr "本エントリは, ファイルを保存するディレクトリを示しています." #: ../src/interface.c:1056 msgid "Down load directory" msgstr "ダウンロード先ディレクトリ" #: ../src/interface.c:1065 msgid "Please push this button to choose download directory." msgstr "ダウンロード先ディレクトリを選択する場合は, このボタンを押してください." #: ../src/interface.c:1071 msgid "Please push this button to start downloads." msgstr "このボタンを押してダウンロードを開始します." #: ../src/interface.c:1077 msgid "Please push this button to discard download files." msgstr "このボタンを押すとダウンロードを中止します." #: ../src/interface.c:1088 msgid "Please select files to be saved." msgstr "保存するファイルを選択してください" #: ../src/interface.c:1090 msgid "down load all at once" msgstr "一括ダウンロード" #: ../src/interface.c:1094 msgid "" "Please check here if you want to download all of selected files at once." msgstr "選択した全てのファイルを一度にダウンロードする場合は, ここをチェックしてください." #: ../src/interface.c:1097 msgid "DownLoad files" msgstr "ダウンロードファイル" #: ../src/interface.c:1154 msgid "download dialog" msgstr "ダウンロード" #: ../src/interface.c:1212 msgid "save down loaded file" msgstr "ダウンロードファイルの記録" #: ../src/interface.c:1337 ../src/systray.c:122 msgid "G2ipmsg" msgstr "GNOME2版IPメッセンジャー" #: ../src/interface.c:1339 msgid "" "Copyright (c) 2008, Takeharu KATO\n" "All rights reserved.\n" "\n" " Redistribution and use in source and binary forms, with or without\n" " modification, are permitted provided that the following conditions\n" " are met:\n" " 1. Redistributions of source code must retain the above copyright\n" " notice, this list of conditions and the following disclaimer.\n" " 2. Redistributions in binary form must reproduce the above copyright\n" " notice, this list of conditions and the following disclaimer in the\n" " documentation and/or other materials provided with the distribution.\n" " \n" " THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " SUCH DAMAGE." msgstr "" "Copyright (c) 2008, Takeharu KATO\n" "All rights reserved.\n" "\n" "ソースコード形式かバイナリ形式か、変更するかしないかを問わず、以下の条件を満たす場合に限り、再頒布および使用が許可されます。\n" " * ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、および下記免責条項を含めること。\n" " * バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の資料に、上記の著作権表示、本条件一覧、および下記免責条項を含めること。\n" "本ソフトウェアは、著作権者およびコントリビューターによって「現状のまま」提供されており、明示黙示を問わず、商業的な使用可能性、および特定の目的に対する適合性に関する暗黙の保証も含め、またそれに限定されない、いかなる保証もありません。\n" "著作権者もコントリビューターも、事由のいかんを問わず、損害発生の原因いかんを問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その他の)不法行為であるかを問わず、仮にそのような損害が発生する可能性を知らされていたとしても、本ソフトウェアの使用によって発生した(代替品または代用サービスの調達、使用の喪失、データの喪失、利益の喪失、業務の中断も含め、またそれに限定されない)直接損害、間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害について、一切責任を負わないものとします。 " #: ../src/interface.c:1382 ../src/interface.c:1399 msgid "Read Message" msgstr "開封されました" #: ../src/interface.c:1482 msgid "Receive message" msgstr "受信通知" #: ../src/interface.c:1517 msgid "Message from ..." msgstr "次の方からメッセージが届きました ..." #: ../src/interface.c:1550 msgid "Please push this button to reply." msgstr "このボタンを押すと, ウィンドウが閉じられます." #: ../src/interface.c:1564 msgid "Reply" msgstr "返信" #: ../src/interface.c:1572 msgid "Cite" msgstr "引用" #: ../src/interface.c:1575 msgid "Please check here to cite original message to reply." msgstr "元のメッセージを引用する場合は, ここをチェックしてください." #: ../src/interface.c:1639 msgid "SendFail" msgstr "送信失敗" #: ../src/interface.c:1656 msgid "Can not send message" msgstr "メッセージの送信に失敗しました" #: ../src/interface.c:1664 msgid "Retry?" msgstr "再度送信しますか?" #: ../src/interface.c:1747 msgid "Edit Attachments" msgstr "添付ファイルの選択" #: ../src/interface.c:1787 msgid "Please push here to choose an attachment file." msgstr "ここを押すと, 添付ファイルを選択できます." #: ../src/interface.c:1822 msgid "This entry show the attachment file path." msgstr "このエントリは, 添付ファイルのパスを示しています." #: ../src/interface.c:1825 msgid "FileChooser" msgstr "ファイル選択" #: ../src/interface.c:1840 msgid "Please push this button to add the file into attachment file list." msgstr "このボタンを押すと, 添付ファイルリストにファイルを追加します." #: ../src/interface.c:1846 msgid "Please push this button to remove the file from attachment file list." msgstr "添付ファイルリストからファイルを取り除く場合は, このボタンを押してください." #: ../src/interface.c:1869 msgid "This list shows attachment files of the message." msgstr "このリストは, メッセージに添付される添付ファイルを表しています." #: ../src/interface.c:1872 msgid "Attached files" msgstr "添付ファイル" #: ../src/interface.c:1877 msgid "Attachment Editor" msgstr "添付ファイルエディタ" #: ../src/interface.c:1966 msgid "Overwrite comfirmation" msgstr "上書き確認" #: ../src/interface.c:1992 msgid "Following file already exist:" msgstr "下記のファイルは既に存在します:" #: ../src/interface.c:2000 msgid "Over Write?" msgstr "上書きしますか?" #: ../src/interface.c:2004 msgid "Over write confirmation" msgstr "上書き確認" #: ../src/interface.c:2060 msgid "Down load monitor" msgstr "ダウンロードモニタ" #: ../src/interface.c:2083 msgid "Please push this button to revoke permission to down load the file." msgstr "このボタンを押すと, 選択したファイルのダウンロード許可を取り消すことができます." #: ../src/interface.c:2089 msgid "Please push this button to update the download file list." msgstr "ダウンロードファイル一覧を更新します." #: ../src/interface.c:2114 msgid "This list shows download files which you sent." msgstr "このリストは, ダウンロード許可済みファイルの一覧を表しています." #: ../src/interface.c:2116 msgid "download files" msgstr "ダウンロードファイル" #: ../src/interface.c:2182 ../src/interface.c:2221 ../src/interface.c:3638 msgid "password" msgstr "パスワード" #: ../src/interface.c:2207 msgid "current password" msgstr "現在のパスワード" #: ../src/interface.c:2236 msgid "confirm password" msgstr "パスワード(確認)" #: ../src/interface.c:2331 msgid "Absence Notification" msgstr "不在通知" #: ../src/interface.c:2363 msgid "This list shows absence message titiles." msgstr "このリストは, 不在通知文の表題を表しています." #: ../src/interface.c:2367 msgid "Titles" msgstr "不在通知表題" #: ../src/interface.c:2398 msgid "Title" msgstr "表題" #: ../src/interface.c:2405 msgid "" "This entry show absence message title, please edit this entry as you like." msgstr "このエントリは, 不在文の表題を表しています. このエントリを編集することでお望みの表題に修正してください." #: ../src/interface.c:2417 msgid "Please edit this entry as you like to modify the absence message." msgstr "ここを編集することで, 不在通知文を作成してください." #: ../src/interface.c:2419 msgid "Absence message" msgstr "不在通知文" #: ../src/interface.c:2431 msgid "Set absent mode" msgstr "不在モードに移行" #: ../src/interface.c:2435 msgid "Please push this button to apply changes and to enter the absent mode." msgstr "このボタンを押すと, 変更を適用後, 不在モードに入ります." #: ../src/interface.c:2437 msgid "Apply Only" msgstr "適用のみ" #: ../src/interface.c:2441 msgid "Push this button to apply changes on this absence message." msgstr "このボタンを押すと変更が適用されます(不在モードに入りません)." #: ../src/interface.c:2518 ../src/interface.c:2715 msgid "Down load complete" msgstr "ダウンロード完了" #: ../src/interface.c:2553 msgid "appName" msgstr "アプリケーション名" #: ../src/interface.c:2557 msgid "Down Load Complete" msgstr "ダウンロードが完了しました ..." #: ../src/interface.c:2576 msgid "" "Please push this button to open the directory which the downloaded file is " "stored." msgstr "ダウンロードしたファイルを保存したディレクトリを開く場合は, このボタンを押してください." #: ../src/interface.c:2582 msgid "Please push this button to handle the downloaded file." msgstr "ダウンロードしたファイルをヘルパーアプリケーションを用いて, 処理する場合は, このボタンを押してください." #: ../src/interface.c:2634 msgid "Down load failed" msgstr "ダウンロード失敗" #: ../src/interface.c:2651 msgid "Can not receive the file properly." msgstr "ファイルを正常にダウンロードできませんでした." #: ../src/interface.c:2659 msgid "Retry this file?" msgstr "このファイルを再ダウンロードしますか?" #: ../src/interface.c:2705 msgid "down load complete" msgstr "ダウンロード完了" #: ../src/interface.c:2719 msgid "Do you want to open the directory?" msgstr "ダウンロード先ディレクトリを開きますか?" #: ../src/interface.c:2798 msgid "View Config" msgstr "表示設定" #. --- Column #2 --- #: ../src/interface.c:2832 ../src/uicommon.c:289 msgid "Group" msgstr "グループ名" #: ../src/interface.c:2838 msgid "Host Name" msgstr "ホスト名" #: ../src/interface.c:2850 msgid "Logon Name" msgstr "ログオン名" #. --- Column #6 --- #: ../src/interface.c:2856 ../src/uicommon.c:325 msgid "Priority" msgstr "表示優先度" #: ../src/interface.c:2862 msgid "Show Grid" msgstr "罫線表示" #: ../src/interface.c:2876 msgid "You can reorder list header by drag-and-drop the list header." msgstr "リストヘッダのドラッグ・アンド・ドロップで, リストヘッダの再配置が可能です." #: ../src/interface.c:2878 msgid "user list view relevant options" msgstr "ユーザリストビュー関連オプション" #: ../src/interface.c:2909 msgid "Sort with group" msgstr "グループ名でソート" #: ../src/interface.c:2913 ../src/interface.c:2962 msgid "Descending Sort" msgstr "降順でソート" #: ../src/interface.c:2917 msgid "Sort with group" msgstr "グループ名でソート" #: ../src/interface.c:2937 msgid "User Name" msgstr "ユーザ名" #: ../src/interface.c:2946 msgid "Machine Name" msgstr "マシン名" #: ../src/interface.c:2968 msgid "Sort with following key" msgstr "次のキーを使用してソート" #: ../src/interface.c:2973 msgid "Sotring Configuration" msgstr "ソート設定" #: ../src/interface.c:3116 msgid "Group selection" msgstr "グループ選択" #: ../src/interface.c:3199 msgid "client information" msgstr "クライアント情報" #: ../src/interface.c:3248 msgid "Client Information" msgstr "クライアント情報" #: ../src/interface.c:3321 msgid "Host List Control/Security" msgstr "ホストリスト制御/セキュリティ" #: ../src/interface.c:3350 msgid "Please check here if you want to send your host list to other hosts." msgstr "自身のホストリストを他のホストに送付することを許可する場合は, ここをチェックしてください." #: ../src/interface.c:3355 msgid "Please check here if you want to obtain host lists from other hosts." msgstr "他のホストからホストリストを取得する場合は, ここをチェックしてください." #: ../src/interface.c:3357 msgid "Host list" msgstr "ホストリスト" #: ../src/interface.c:3380 msgid "Please check here if you want to use RC2 40 bits key for encryption." msgstr "RC2 40ビットの暗号を使用してメッセージを暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3387 msgid "Please check here if you want to use RC2 128 bits key for encryption." msgstr "RC2 128ビットの暗号を使用してメッセージを暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3394 msgid "Please check here if you want to use RC2 256 bits key for encryption." msgstr "RC2 256ビットの暗号を使用してメッセージを暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3401 msgid "" "Please check here if you want to use blowfish 128 bits key for encryption." msgstr "Blowfish 128ビットの暗号を使用してメッセージを暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3408 msgid "" "Please check here if you want to use blowfish 256 bits key for encryption." msgstr "Blowfish 256ビットの暗号を使用してメッセージを暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3410 msgid "MD5 sign" msgstr "MD5 署名" #: ../src/interface.c:3415 msgid "" "Please check here if you want to use MD5 hash function to sign your messages." msgstr "MD5ハッシュ関数を使用してメッセージに署名を付す場合は, ここをチェックしてください." #: ../src/interface.c:3417 msgid "SHA1 sign" msgstr "SHA1 署名" #: ../src/interface.c:3422 msgid "" "Please check here if you want to use SHA1 hash function to sign your " "messages." msgstr "SHA1ハッシュ関数を使用してメッセージに署名を付す場合は, ここをチェックしてください." #: ../src/interface.c:3429 msgid "" "Please check here if you want to use RSA 512 bits key to encrypt the common " "key." msgstr "RSA 512ビットの鍵を使用して共通鍵を暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3436 msgid "" "Please check here if you want to use RSA 1024 bits key to encrypt the common " "key." msgstr "RSA 1024ビットの鍵を使用して共通鍵を暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3443 msgid "" "Please check here if you want to use RSA 2048 bits key to encrypt the common " "key." msgstr "RSA 2048ビットの鍵を使用して共通鍵を暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3450 msgid "Please check here if you want to use AES 128 bits key for encryption." msgstr "AES 128ビットの暗号を使用してメッセージを暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3457 msgid "Please check here if you want to use AES 192 bits key for encryption." msgstr "AES 192ビットの暗号を使用してメッセージを暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3464 msgid "Please check here if you want to use AES 256 bits key for encryption." msgstr "AES 256ビットの暗号を使用してメッセージを暗号化する場合は, ここをチェックしてください." #: ../src/interface.c:3466 msgid "Cipher selection" msgstr "暗号選択" #: ../src/interface.c:3484 msgid "Select the encrypt key according to its speed" msgstr "暗号化・復号化速度により暗号鍵を選択する." #: ../src/interface.c:3487 msgid "" "Please check here if you want to select the common key according to its " "coding speed.Please note that some clients can not handle arbitary " "combinations of keys(i.e. Windows client can handle RSA 1024 bits with " "Blowfish 128 bits or RSA 512 bits with RC2 40 bits)." msgstr "暗号化・復号化速度が早いものを優先して暗号化鍵を選択します.クライアントによっては任意の暗号鍵の組合せを扱えないこと(例:Windows版クライアント)に注意してください." #: ../src/interface.c:3498 ../src/interface.c:3512 msgid "set password" msgstr "パスワードを設定" #: ../src/interface.c:3501 msgid "" "Please push this button to set password for private/public key encryption." msgstr "このボタンを押して, 公開鍵/秘密鍵を暗号化するためのパスワードを設定してください." #: ../src/interface.c:3515 msgid "Please push this button to set password for unlock messages." msgstr "このボタンを押して開錠パスワードを設定してください." #: ../src/interface.c:3517 msgid "Security Relevant Options" msgstr "セキュリティ関係オプション" #: ../src/interface.c:3531 msgid "Please push this button to apply the configuration." msgstr "このボタンを押して設定を適用してください." #: ../src/interface.c:3537 msgid "Please push this button to discard the configuration." msgstr "設定を破棄する場合は, このボタンを押してください." #: ../src/interface.c:3620 msgid "Password" msgstr "パスワード" #: ../src/interface.c:3645 msgid "Please input password here(push OK button to finish.)." msgstr "ここにパスワードを入力してください(OKボタンを押下することで入力を終えます.)" #: ../src/interface.c:3657 msgid "Please push this button to discard your input." msgstr "このボタンを押すと入力を破棄します." #: ../src/interface.c:3663 msgid "Please push this button to finish inputing password." msgstr "このボタンを押すと入力を終了します." #: ../src/interface.c:3718 msgid "error" msgstr "エラー" #: ../src/interface.c:3730 msgid "g2ipmsg detects an error" msgstr "GNOME2 版 IPMSGがエラーを検出しました" #: ../src/interface.c:3756 msgid "Function" msgstr "関数" #: ../src/interface.c:3764 msgid "Line" msgstr "行番号" #: ../src/interface.c:3799 msgid "Error Information" msgstr "エラー情報" #: ../src/interface.c:3823 msgid "Descriptions of the error." msgstr "このエラーの詳細情報です." #: ../src/interface.c:3827 msgid "Error Message" msgstr "エラーメッセージ" #: ../src/interface.c:3840 msgid "Please push this button to close this dialog." msgstr "このダイアログを閉じる場合は, このボタンを押してください" #: ../src/ipmsg.c:149 msgid "Can not setup lock file" msgstr "ロックファイルの初期化に失敗しました" #: ../src/ipmsg.c:150 msgid "errno" msgstr "エラー番号" #: ../src/menu.c:156 msgid "FileNames" msgstr "ファイル名" #: ../src/menu.c:176 msgid "Remains" msgstr "残数" #: ../src/menu.c:196 msgid "Receivers" msgstr "受信者" #: ../src/menu.c:383 msgid "DownLoadMonitor" msgstr "ダウンロードモニタ" #: ../src/menu.c:385 msgid "Foreground all message windows" msgstr "全受信ウィンドウを前面に" #: ../src/menu.c:386 msgid "Remove opend windows" msgstr "開封済みウィンドウを全消去" #: ../src/menu.c:390 msgid "Show Log" msgstr "ログ参照" #: ../src/menu.c:392 msgid "Absence" msgstr "不在" #: ../src/menu.c:396 msgid "Attend" msgstr "在席(不在解除)" #: ../src/msginfo.c:229 msgid "Can not send" msgstr "送信できませんでした" #: ../src/netcommon.c:45 msgid "Can not set buffer size" msgstr "バッファサイズを設定できませんでした" #: ../src/netcommon.c:106 msgid "Can not set broad cast" msgstr "ブロードキャストの設定に失敗しました" #: ../src/netcommon.c:174 msgid "Can not get addr info" msgstr "アドレス情報の獲得に失敗しました" #: ../src/protocol.c:114 ../src/protocol.c:1452 msgid "Can not convert common into external representation" msgstr "パケットのコマンド間共通部分を外部形式に変換できませんでした" #: ../src/protocol.c:130 msgid "Can not convert message into external representation" msgstr "パケットのメッセージ部分を外部形式に変換できませんでした" #: ../src/protocol.c:146 msgid "Can not convert extension into external representation" msgstr "パケットの拡張部分を外部形式に変換できませんでした" #: ../src/protocol.c:265 #, c-format msgid "Can not register message for:%s reason: %s error code = %d" msgstr "%s へ再送するメッセージの記録に失敗しました. 理由: %s エラーコード = %d" #: ../src/protocol.c:1415 msgid "No extension in file attached message.Ignore attachments." msgstr "ファイル添付付きメッセージに拡張部がありませんでした.添付ファイルを無視します." #: ../src/protocol.c:1781 ../src/protocol.c:1800 msgid "Edition" msgstr "版" #: ../src/protocol.c:1783 ../src/protocol.c:1800 msgid "Version" msgstr "バージョン" #: ../src/pubcrypt.c:1265 msgid "Can not load RSA key due to invalid passphrase." msgstr "パスフレーズが不正のため, RSA鍵の読み込みに失敗しました" #: ../src/recvmsg.c:246 msgid "Can not create download window" msgstr "ダウンロードウィンドウの生成に失敗しました" #: ../src/recvmsg.c:384 msgid "Remove the seal" msgstr "開封" #: ../src/recvmsg.c:385 msgid "[Attachment]" msgstr "[添付]" #: ../src/recvmsg.c:386 msgid "(Locked)" msgstr "(施錠)" #: ../src/support.c:60 ../src/support.c:85 #, c-format msgid "Couldn't find pixmap file: %s" msgstr "ピックスマップが見付かりませんでした : %s" #. --- Column #1 --- #: ../src/uicommon.c:284 msgid "User" msgstr "ユーザ" #. --- Column #3 --- #: ../src/uicommon.c:298 msgid "Host" msgstr "ホスト" #. --- Column #5 --- #: ../src/uicommon.c:316 msgid "LogOn" msgstr "ログオン名" g2ipmsg-0.9.6+dfsg/po/zh_CN.po000066400000000000000000001343471126724573600160250ustar00rootroot00000000000000# 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. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-05-10 14:58+0100\n" "PO-Revision-Date: 2008-05-10 15:21+0100\n" "Last-Translator: Takeharu KATO\n" "Language-Team: No Team\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../g2ipmsg.server.in.h:1 msgid "G2IPMSG Applet" msgstr "飞鸽传书小程序" #: ../g2ipmsg.server.in.h:2 msgid "G2IPMSG applet for the GNOME2 panel" msgstr "飞鸽面板" #: ../g2ipmsg.server.in.h:3 msgid "Utility" msgstr "效用" #: ../g2ipmsg.schemas.in.h:1 msgid "Absence message editor height" msgstr "离开时框高" #: ../g2ipmsg.schemas.in.h:2 msgid "Absence message editor width" msgstr "离开时框宽" #: ../g2ipmsg.schemas.in.h:3 msgid "Absence messages" msgstr "离开时的消息" #: ../g2ipmsg.schemas.in.h:4 msgid "Absence titile" msgstr "离开时的标题" #: ../g2ipmsg.schemas.in.h:5 ../src/interface.c:3362 msgid "Allow host list sending" msgstr "允许主机列出正在发送" #: ../g2ipmsg.schemas.in.h:6 msgid "Attachment editor height" msgstr "附件框高" #: ../g2ipmsg.schemas.in.h:7 msgid "Attachment editor width" msgstr "附件框宽" #: ../g2ipmsg.schemas.in.h:8 msgid "Avoid playing sound on message arrive." msgstr "收到消息播放声音" #: ../g2ipmsg.schemas.in.h:9 msgid "Broadcast addresses" msgstr "广播地址" #: ../g2ipmsg.schemas.in.h:10 msgid "Change default absence message editor height" msgstr "改变离开时的框高" #: ../g2ipmsg.schemas.in.h:11 msgid "Change default absence message editor width" msgstr "改变离开时的框宽" #: ../g2ipmsg.schemas.in.h:12 msgid "Change default attachment editor height" msgstr "改变附件框高" #: ../g2ipmsg.schemas.in.h:13 msgid "Change default attachment editor width" msgstr "改变附件框宽" #: ../g2ipmsg.schemas.in.h:14 msgid "Change default message window height" msgstr "改变默认高" #: ../g2ipmsg.schemas.in.h:15 msgid "Change default message window width" msgstr "改变默认宽" #: ../g2ipmsg.schemas.in.h:16 msgid "Change default receive window height" msgstr "改变默认接收框高" #: ../g2ipmsg.schemas.in.h:17 msgid "Change default receive window width" msgstr "改变默认接收框宽" #: ../g2ipmsg.schemas.in.h:18 msgid "Check citation as default." msgstr "检查默认引用" #: ../g2ipmsg.schemas.in.h:19 msgid "Check read message confirmation as default." msgstr "检查默认读取消息的认证" #: ../g2ipmsg.schemas.in.h:20 msgid "Citation Control" msgstr "引用控制" #: ../g2ipmsg.schemas.in.h:21 msgid "Citation prefix" msgstr "引用文字列" #: ../g2ipmsg.schemas.in.h:22 msgid "Default priority" msgstr "默认优先级" #: ../g2ipmsg.schemas.in.h:23 msgid "Default priority(Separated by '@')" msgstr "默认优先级(以字符'@'分割)" #: ../g2ipmsg.schemas.in.h:24 msgid "Enable IP V6 mode" msgstr "IP V6有効" #: ../g2ipmsg.schemas.in.h:25 msgid "Enable IP address logging." msgstr "记录IP地址" #: ../g2ipmsg.schemas.in.h:26 msgid "Enable dialup mode" msgstr "拔号使能" #: ../g2ipmsg.schemas.in.h:27 ../src/interface.c:3367 msgid "Enable getting host list facility" msgstr "快速取主机列表使能" #: ../g2ipmsg.schemas.in.h:28 ../src/interface.c:3522 msgid "Enable lock for enclosed messages" msgstr "允许为信息加密" #: ../g2ipmsg.schemas.in.h:29 msgid "Enable logging" msgstr "使用记录" #: ../g2ipmsg.schemas.in.h:30 msgid "Enable logging on log-file." msgstr "记录到文件使能" #: ../g2ipmsg.schemas.in.h:31 msgid "Enclose messages as default." msgstr "封锁消息" #: ../g2ipmsg.schemas.in.h:32 msgid "Encryption password for lock. This is encoded with pbkdf2." msgstr "用pbkdf2算法加密锁密码" #: ../g2ipmsg.schemas.in.h:33 msgid "" "Encryption password for public/private key storage. This is encoded with " "pbkdf2." msgstr "用pbkdf2算法加密的公钥密钥" #: ../g2ipmsg.schemas.in.h:34 msgid "External encoding for message" msgstr "消息外部编码" #: ../g2ipmsg.schemas.in.h:35 msgid "External message encoding to exchange messages via the network." msgstr "用于在网络上交换消息的外部编码" #: ../g2ipmsg.schemas.in.h:36 msgid "Group Name" msgstr "组名" #: ../g2ipmsg.schemas.in.h:37 msgid "Group name which you belong to." msgstr "你所在组名" #: ../g2ipmsg.schemas.in.h:38 msgid "Group sort with descending order." msgstr "按组反序排列" #: ../g2ipmsg.schemas.in.h:39 msgid "Header order" msgstr "标题顺序" #: ../g2ipmsg.schemas.in.h:40 msgid "Header visual" msgstr "标题视觉" #: ../g2ipmsg.schemas.in.h:41 msgid "Header visual state" msgstr "标题视觉状态" #: ../g2ipmsg.schemas.in.h:42 msgid "IP address logging" msgstr "记录IP地址" #: ../g2ipmsg.schemas.in.h:43 msgid "Iconify normal dialogs when they are shown at first time." msgstr "将需要显示的对话框首先显示为图标" #: ../g2ipmsg.schemas.in.h:44 msgid "Inconify dialogs" msgstr "图标化对话框" #: ../g2ipmsg.schemas.in.h:45 msgid "Internal header order representation." msgstr "内部标题顺序." #: ../g2ipmsg.schemas.in.h:46 msgid "Internal representation of sub sorting id." msgstr "补充ID排序的内部显示" #: ../g2ipmsg.schemas.in.h:47 msgid "Logging user's logon name." msgstr "记录登录名" #: ../g2ipmsg.schemas.in.h:48 msgid "Nick name" msgstr "昵称" #: ../g2ipmsg.schemas.in.h:49 msgid "Nick name which is displayed on ipmsg window." msgstr "昵称" #: ../g2ipmsg.schemas.in.h:50 ../src/interface.c:717 msgid "" "Please check here if you want to log the content of the message after the " "message is opened when the message is locked." msgstr "如果你想保存你收到并打开的带锁的消息,请选择这里" #: ../g2ipmsg.schemas.in.h:51 ../src/interface.c:3511 msgid "" "Please check here if you want to store public/private keys with encryption ." msgstr "如果你想存储用于加密的公钥密钥,请选择这里" #: ../g2ipmsg.schemas.in.h:52 ../src/interface.c:3525 msgid "" "Please check here if you want to use the lock feature(Sent messages can be " "opened by receiver's password.)" msgstr "如果你想使用锁功能(收信人必须输入密码打开消息),请选择这里" #: ../g2ipmsg.schemas.in.h:53 msgid "" "Please set here if you want to use g2ipmsg in the System Tray, This need the " "system tray which perform with freedesktop.org compliant System Tray Protocol" "(see:http://www.freedesktop.org/wiki/Standards/systemtray-spec. This require " "gtk-2.10 or later)." msgstr "" "如果你想把它放入任务栏中,需要freedesktop.org系统任务栏条约,请参考http://" "www.freedesktop.org/wiki/Standards/systemtray-spec" #: ../g2ipmsg.schemas.in.h:54 msgid "Popup message windows." msgstr "弹出消息" #: ../g2ipmsg.schemas.in.h:55 msgid "Port number" msgstr "端口号" #: ../g2ipmsg.schemas.in.h:56 msgid "Secret message" msgstr "加密消息" #: ../g2ipmsg.schemas.in.h:57 msgid "Select cipher according to speed." msgstr "根据机器速度选择加密算法" #: ../g2ipmsg.schemas.in.h:58 msgid "Select ciphers to encrypt messages." msgstr "选择用于加密消息的加密算法" #: ../g2ipmsg.schemas.in.h:59 msgid "Select ciphers." msgstr "选择加密算法" #: ../g2ipmsg.schemas.in.h:60 msgid "Set Broadcast addresses." msgstr "设置广播地址" #: ../g2ipmsg.schemas.in.h:61 msgid "Set here if you want to sort user list with group." msgstr "设置按组排序." #: ../g2ipmsg.schemas.in.h:62 msgid "Set here to sort user list with descending ordered group name." msgstr "设置按组名逆排序." #: ../g2ipmsg.schemas.in.h:63 msgid "Set here to sort user list with descending ordered sub sort key." msgstr "设置二级排序方案." #: ../g2ipmsg.schemas.in.h:64 msgid "Set log file name." msgstr "设置记录文件名" #: ../g2ipmsg.schemas.in.h:65 msgid "Set on this if you want send messages with seal as a default." msgstr "设置加密方式发送消息." #: ../g2ipmsg.schemas.in.h:66 msgid "Set this option if use g2ipmsg on IP V6 network" msgstr "设置IP V6网络选项." #: ../g2ipmsg.schemas.in.h:67 msgid "Set this option to allow host list sending" msgstr "允许主机列表发送选项." #: ../g2ipmsg.schemas.in.h:68 msgid "Set this option to enable dialup mode." msgstr "允许拔号模式." #: ../g2ipmsg.schemas.in.h:69 msgid "Set this option to enable getting host list facility" msgstr "允许快速主机列表搜索." #: ../g2ipmsg.schemas.in.h:70 msgid "" "Set this option to select ciphers according to encoding/decoding speed. If " "you use low speed machine, please set this option." msgstr "" "选择此项,如果你需要根据机器速度选择加密算法。如果你使用的是低速机器,请选择" "此项。" #: ../g2ipmsg.schemas.in.h:71 msgid "Sort user list with group" msgstr "按组排序" #: ../g2ipmsg.schemas.in.h:72 msgid "Sound setting" msgstr "设置音效" #: ../g2ipmsg.schemas.in.h:73 ../src/interface.c:3508 msgid "Store encrypted public/private key pairs" msgstr "存储公钥密钥" #: ../g2ipmsg.schemas.in.h:74 msgid "String which indicate citation." msgstr "引用" #: ../g2ipmsg.schemas.in.h:75 msgid "Sub sort with descending order" msgstr "按组反序排列" #: ../g2ipmsg.schemas.in.h:76 msgid "Sub sorting id" msgstr "子排序ID" #: ../g2ipmsg.schemas.in.h:77 msgid "The port number which g2ipmsg uses." msgstr "g2ipmsg使用的端口" #: ../g2ipmsg.schemas.in.h:78 msgid "Use SysTray" msgstr "使用任务栏图标" #: ../g2ipmsg.schemas.in.h:79 msgid "[ABSENT,EATING,OUT,MEETING,VISITOR,HOME,EDO,SHUKKE]" msgstr "[离开,进食,外出,开会,会客,回家,干大事去了,出家]" #: ../g2ipmsg.schemas.in.h:80 msgid "" "[I am absent now.,I have been gone somewhere to eat.,I am out now.,I attend " "meeting now.,A visitor comes here.,I have come home.,Edo,Shukke.]" msgstr "[离开,进食,外出,开会,会客,回家,干大事去了,出家]" #: ../g2ipmsg.schemas.in.h:81 msgid "enable debug output" msgstr "开启调错" #: ../g2ipmsg.schemas.in.h:82 msgid "enclose" msgstr "加密" #: ../g2ipmsg.schemas.in.h:83 msgid "encryption password for lock" msgstr "解密密码" #: ../g2ipmsg.schemas.in.h:84 msgid "encryption password for public/private key storage" msgstr "访问公钥密钥的密码" #: ../g2ipmsg.schemas.in.h:85 ../src/interface.c:668 msgid "log file" msgstr "记录文件" #: ../g2ipmsg.schemas.in.h:86 msgid "logging locked message after openning it" msgstr "将打开的上锁消息加到日志文件中" #: ../g2ipmsg.schemas.in.h:87 msgid "logon-name logging" msgstr "登录名记录中" #: ../g2ipmsg.schemas.in.h:88 msgid "message window height" msgstr "消息窗口高" #: ../g2ipmsg.schemas.in.h:89 msgid "message window width" msgstr "消息窗口宽" #: ../g2ipmsg.schemas.in.h:90 msgid "popup messages" msgstr "弹出消息" #: ../g2ipmsg.schemas.in.h:91 msgid "read message confirmation" msgstr "读取消息确定" #: ../g2ipmsg.schemas.in.h:92 msgid "receive window height" msgstr "接收窗口高" #: ../g2ipmsg.schemas.in.h:93 msgid "receive window width" msgstr "接收消息宽" #: ../g2ipmsg.schemas.in.h:94 msgid "set Absense titles" msgstr "设置不在时的标题" #: ../g2ipmsg.desktop.in.h:1 msgid "GNOME2 IP Messenger" msgstr "GNOME2飞鸽" #: ../g2ipmsg.desktop.in.h:2 msgid "IP Messenger for the GNOME2" msgstr "GNOME2 版 飞鸽" #: ../g2ipmsg.xml.h:1 msgid "A_bsence mode" msgstr "离开" #: ../g2ipmsg.xml.h:2 msgid "A_ttend" msgstr "在席(不在解除)" #: ../g2ipmsg.xml.h:3 msgid "_About" msgstr "关于" #: ../g2ipmsg.xml.h:4 msgid "_Down Load Monitor" msgstr "下载窗" #: ../g2ipmsg.xml.h:5 msgid "_Foreground all message windows" msgstr "前置所有窗口" #: ../g2ipmsg.xml.h:6 ../src/menu.c:388 msgid "_New Message" msgstr "新消息" #: ../g2ipmsg.xml.h:7 msgid "_Preferences" msgstr "设置" #: ../g2ipmsg.xml.h:8 msgid "_Remove opend windows" msgstr "关闭已开的窗口" #: ../g2ipmsg.xml.h:9 msgid "_Show Log" msgstr "查看记录" #: ../g2ipmsg.xml.h:10 msgid "_security configuration" msgstr "安全设置" #: ../src/copying.h:29 ../src/interface.c:1353 ../src/menu.c:515 msgid "Takeharu KATO" msgstr "Takeharu KATO" #: ../src/copying.h:30 msgid "" "Takeharu KATO\n" "ZC Miao\n" msgstr "" "雷金波(Takeharu KATO)\n" "缪志澄\n" #: ../src/ipmsg.c:156 msgid "Can not setup lock file" msgstr "无法设置锁文件" #: ../src/ipmsg.c:157 msgid "errno" msgstr "错误号" #: ../src/netcommon.c:45 msgid "Can not set buffer size" msgstr "不能设置缓冲大小" #: ../src/netcommon.c:106 msgid "Can not set broad cast" msgstr "不能设置广播消息" #: ../src/netcommon.c:174 ../src/udp.c:407 msgid "Can not get addr info" msgstr "无法获得地址信息" #: ../src/interface.c:32 msgid "Attachment" msgstr "添加附件" #: ../src/interface.c:46 ../src/interface.c:3062 msgid "Set priority as 1" msgstr "设置为一级优先级" #: ../src/interface.c:53 ../src/interface.c:3069 msgid "Set priority as 2" msgstr "设置为二级优先级" #: ../src/interface.c:60 ../src/interface.c:3076 msgid "Set priority as 3" msgstr "设置为三级优先级" #: ../src/interface.c:67 ../src/interface.c:3083 msgid "Set priority as 4" msgstr "设置为四级优先级" #: ../src/interface.c:74 ../src/interface.c:3090 msgid "Set them as default" msgstr "设置为默认" #: ../src/interface.c:81 ../src/interface.c:3097 msgid "Set them invisible item" msgstr "设置隐形的" #: ../src/interface.c:89 ../src/interface.c:3105 msgid "Show invisible items" msgstr "显示隐形的" #: ../src/interface.c:96 ../src/interface.c:3112 msgid "Set all as default" msgstr "设置所有为默认" #: ../src/interface.c:111 ../src/interface.c:3124 msgid "Sort filter" msgstr "排序过滤" #: ../src/interface.c:112 msgid "Set priority of entries" msgstr "设置优先级" #: ../src/interface.c:118 ../src/interface.c:3153 msgid "User list view config" msgstr "用户列表设置" #: ../src/interface.c:119 msgid "Set user list configurations." msgstr "配置用户列表" #: ../src/interface.c:125 ../src/interface.c:3146 msgid "Save list headers state" msgstr "保存列表标题状态" #: ../src/interface.c:126 msgid "Save current setting about user list." msgstr "保存当前用户列表的设置" #: ../src/interface.c:133 ../src/menu.c:409 msgid "security configuration" msgstr "安全设置" #: ../src/interface.c:134 msgid "Set security relevant configuration" msgstr "安全相关配置" #: ../src/interface.c:145 msgid "Update" msgstr "更新" #: ../src/interface.c:152 msgid "get version" msgstr "取得版本信息" #: ../src/interface.c:159 msgid "get absence info" msgstr "取不在时的信息" #: ../src/interface.c:213 ../src/interface.c:961 msgid "g2ipmsg" msgstr "GNOME2版飞鸽" #: ../src/interface.c:251 msgid "Please select receivers or drop attachment files." msgstr "选择收件人或放下拖入的附件" #: ../src/interface.c:272 msgid "current users" msgstr "当前用户" #: ../src/interface.c:276 msgid "Users" msgstr "用户" #: ../src/interface.c:284 msgid "Please push this button to update the user list." msgstr "按下更新用户列表" #: ../src/interface.c:296 msgid "Please edit your message or drop attachment files." msgstr "编辑消息或拖进附件" #: ../src/interface.c:307 ../src/interface.c:1560 ../src/interface.c:2110 #: ../src/interface.c:2462 ../src/interface.c:2585 msgid "Please push this button to close this window." msgstr "按下关闭本窗口." #: ../src/interface.c:309 msgid "SEND" msgstr "发信" #: ../src/interface.c:313 msgid "Please push this button to send the message." msgstr "发送" #: ../src/interface.c:319 msgid "enclose message" msgstr "加密" #: ../src/interface.c:322 msgid "Check here to make this message sealed." msgstr "加密检查" #: ../src/interface.c:324 msgid "lock" msgstr "锁" #: ../src/interface.c:327 msgid "Check here to lock this message(need to enclose the message)." msgstr "锁住消息" #: ../src/interface.c:497 msgid "configuration" msgstr "设置" #: ../src/interface.c:527 msgid "Enter your nick name." msgstr "输入昵称" #: ../src/interface.c:530 msgid "User Name" msgstr "用户名" #: ../src/interface.c:552 msgid "Add" msgstr "追加" #: ../src/interface.c:555 msgid "Please push here to add your group name." msgstr "按下添加组名" #: ../src/interface.c:557 msgid "Group Name" msgstr "组名" #: ../src/interface.c:579 msgid "enable open check" msgstr "开启检查" #: ../src/interface.c:582 msgid "Please check here to receive read notification from receiver." msgstr "返回成功通知" #: ../src/interface.c:584 msgid "Non-popup receive" msgstr "不弹出收件" #: ../src/interface.c:587 msgid "Refrain automatic popuped receive window creation." msgstr "停止自动弹出收件窗口" #: ../src/interface.c:589 msgid "No sound" msgstr "不要声音" #: ../src/interface.c:592 msgid "Please check here to refrain from playing sounds." msgstr "播放声音检查" #: ../src/interface.c:594 msgid "check enclose message as default" msgstr "加密消息" #: ../src/interface.c:597 msgid "Please check here if you want to send sealed messages as default." msgstr "发送加密消息" #: ../src/interface.c:599 msgid "check citation as default" msgstr "引用原文" #: ../src/interface.c:602 msgid "" "Please check here if you want to edit reply message with citation of " "original message." msgstr "在消息中加入来信原文" #: ../src/interface.c:604 msgid "enable IP V6 only mode (Need restart)" msgstr "仅用IP V6(要重启)" #: ../src/interface.c:607 msgid "Please check here to use this software on the IP V6 environment." msgstr "IP V6环境" #: ../src/interface.c:609 msgid "enable dial up connection mode" msgstr "开启拔号连接模式" #: ../src/interface.c:612 msgid "Please check here to use this software on the dial up environment." msgstr "开启拔号环境" #: ../src/interface.c:614 msgid "iconfy read confirmation dialog" msgstr "将消息收到确认消息显示为图标" #: ../src/interface.c:617 msgid "Please check here to iconify read confirmation dialog window." msgstr "选择这里,如果你想将消息收到确认消息显示为图标" #: ../src/interface.c:623 msgid "External representation of IPMSG character code" msgstr "字符编码的外部代号" #: ../src/interface.c:631 msgid "Options" msgstr "选项" #: ../src/interface.c:654 msgid "Please push this button to choose the log-file." msgstr "选择记录文件" #: ../src/interface.c:677 msgid "" "This entry show log-file path, please edit here to specify your log-file " "path." msgstr "输入要记录消息的文件" #: ../src/interface.c:680 msgid "enable logging" msgstr "开启记录" #: ../src/interface.c:685 msgid "Please check here to enable logging facility." msgstr "开启记录" #: ../src/interface.c:702 msgid "logging logon name" msgstr "记录登录名" #: ../src/interface.c:706 msgid "Please check here to log user's logon name into the log-file." msgstr "记录登录名到记录文件" #: ../src/interface.c:708 msgid "logging IP Addresses" msgstr "记录IP地址" #: ../src/interface.c:712 msgid "Please check here to log user's IP addresses into the log-file." msgstr "记录IP地址到记录文件" #: ../src/interface.c:714 msgid "logging locked messages after opening the message." msgstr "将打开的上锁消息加到日志文件中" #: ../src/interface.c:719 msgid "Logging Option" msgstr "记录选项" #: ../src/interface.c:724 msgid "Logfile" msgstr "记录文件" #: ../src/interface.c:745 msgid "Please input broad cast address." msgstr "输入广播地址" #: ../src/interface.c:753 ../src/interface.c:1851 msgid ">>" msgstr ">>" #: ../src/interface.c:757 msgid "" "Please push this button to add the broad cast address to broad cast address " "list." msgstr "按下加入广播地址" #: ../src/interface.c:759 ../src/interface.c:1857 msgid "<<" msgstr "<<" #: ../src/interface.c:763 msgid "" "Please push this button to remove the broad cast address from broad cast " "address list." msgstr "按下删除广播地址" #: ../src/interface.c:776 msgid "" "This list shows broad cast addresses for entry/absence status notification." msgstr "该列表显示广播列表" #: ../src/interface.c:778 msgid "Broadcast address setting" msgstr "广播地址设置" #: ../src/interface.c:790 msgid "Please push this button to apply this configuration." msgstr "按下应用该选项" #: ../src/interface.c:795 msgid "Please push this button to discard this configuration" msgstr "按下取消该选项" #: ../src/interface.c:1036 msgid "DownLoad" msgstr "下载" #: ../src/interface.c:1068 msgid "This entry show where files are stored." msgstr "显示文件存储位置" #: ../src/interface.c:1071 msgid "Down load directory" msgstr "下载目录" #: ../src/interface.c:1080 msgid "Please push this button to choose download directory." msgstr "按下选择下载目录" #: ../src/interface.c:1086 msgid "Please push this button to start downloads." msgstr "按下开始下载" #: ../src/interface.c:1092 msgid "Please push this button to discard download files." msgstr "按下取消下载" #: ../src/interface.c:1103 msgid "Please select files to be saved." msgstr "选择文件保存" #: ../src/interface.c:1105 msgid "down load all at once" msgstr "立即全部下载" #: ../src/interface.c:1109 msgid "" "Please check here if you want to download all of selected files at once." msgstr "马上下载所有选择的文件" #: ../src/interface.c:1112 msgid "DownLoad files" msgstr "下载文件" #: ../src/interface.c:1169 msgid "download dialog" msgstr "下载对话框" #: ../src/interface.c:1227 msgid "save down loaded file" msgstr "保存下载文件" #: ../src/interface.c:1298 ../src/callbacks.c:594 msgid "LogFile" msgstr "记录文件" #: ../src/interface.c:1352 msgid "G2ipmsg" msgstr "GNOME2版飞鸽" #: ../src/interface.c:1354 msgid "" "Copyright (c) 2008, Takeharu KATO\n" "All rights reserved.\n" "\n" " Redistribution and use in source and binary forms, with or without\n" " modification, are permitted provided that the following conditions\n" " are met:\n" " 1. Redistributions of source code must retain the above copyright\n" " notice, this list of conditions and the following disclaimer.\n" " 2. Redistributions in binary form must reproduce the above copyright\n" " notice, this list of conditions and the following disclaimer in the\n" " documentation and/or other materials provided with the distribution.\n" " \n" " THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " SUCH DAMAGE." msgstr "" "Copyright (c) 2008, Takeharu KATO\n" "All rights reserved.\n" "\n" " Redistribution and use in source and binary forms, with or without\n" " modification, are permitted provided that the following conditions\n" " are met:\n" " 1. Redistributions of source code must retain the above copyright\n" " notice, this list of conditions and the following disclaimer.\n" " 2. Redistributions in binary form must reproduce the above copyright\n" " notice, this list of conditions and the following disclaimer in the\n" " documentation and/or other materials provided with the distribution.\n" " \n" " THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n" " ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" " ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n" " FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n" " DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n" " OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n" " HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n" " LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n" " OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n" " SUCH DAMAGE." #: ../src/interface.c:1397 ../src/interface.c:1414 msgid "Read Message" msgstr "读取消息" #: ../src/interface.c:1497 msgid "Receive message" msgstr "接收消息" #: ../src/interface.c:1532 msgid "Message from ..." msgstr "消息来自..." #: ../src/interface.c:1565 msgid "Please push this button to reply." msgstr "按下回复消息" #: ../src/interface.c:1579 msgid "Reply" msgstr "回信" #: ../src/interface.c:1587 msgid "Cite" msgstr "引用" #: ../src/interface.c:1590 msgid "Please check here to cite original message to reply." msgstr "引用原消息回信" #: ../src/interface.c:1654 msgid "SendFail" msgstr "发信失败" #: ../src/interface.c:1671 msgid "Can not send message" msgstr "不能发送消息" #: ../src/interface.c:1679 msgid "Retry?" msgstr "重试?" #: ../src/interface.c:1762 msgid "Edit Attachments" msgstr "添加附件" #: ../src/interface.c:1802 msgid "Please push here to choose an attachment file." msgstr "选择附件文件" #: ../src/interface.c:1837 msgid "This entry show the attachment file path." msgstr "附件路径" #: ../src/interface.c:1840 msgid "FileChooser" msgstr "文件选择" #: ../src/interface.c:1855 msgid "Please push this button to add the file into attachment file list." msgstr "按下添加文件到附件列表中" #: ../src/interface.c:1861 msgid "Please push this button to remove the file from attachment file list." msgstr "按下从附件列表中删除文件" #: ../src/interface.c:1884 msgid "This list shows attachment files of the message." msgstr "该列表显示附件中文件" #: ../src/interface.c:1887 msgid "Attached files" msgstr "附件" #: ../src/interface.c:1892 msgid "Attachment Editor" msgstr "附件编辑" #: ../src/interface.c:1981 msgid "Overwrite comfirmation" msgstr "改写确认" #: ../src/interface.c:2007 msgid "Following file already exist:" msgstr "下列文件已经存在:" #: ../src/interface.c:2011 ../src/callbacks.c:1046 msgid "FilePath" msgstr "文件路径" #: ../src/interface.c:2015 msgid "Over Write?" msgstr "改写?" #: ../src/interface.c:2019 msgid "Over write confirmation" msgstr "改写确认" #: ../src/interface.c:2075 msgid "Down load monitor" msgstr "下载窗口" #: ../src/interface.c:2098 msgid "Please push this button to revoke permission to down load the file." msgstr "按下取消文件下载权限" #: ../src/interface.c:2104 msgid "Please push this button to update the download file list." msgstr "按下更新下载文件列表" #: ../src/interface.c:2129 msgid "This list shows download files which you sent." msgstr "该列表显示你发送的文件" #: ../src/interface.c:2131 msgid "download files" msgstr "下载文件" #: ../src/interface.c:2197 ../src/interface.c:2236 ../src/interface.c:3653 msgid "password" msgstr "密码" #: ../src/interface.c:2222 msgid "current password" msgstr "当前密码" #: ../src/interface.c:2251 msgid "confirm password" msgstr "确认密码" #: ../src/interface.c:2346 msgid "Absence Notification" msgstr "不在通知" #: ../src/interface.c:2378 msgid "This list shows absence message titiles." msgstr "不在消息标题" #: ../src/interface.c:2382 msgid "Titles" msgstr "不在通知标题" #: ../src/interface.c:2413 msgid "Title" msgstr "标题" #: ../src/interface.c:2420 msgid "" "This entry show absence message title, please edit this entry as you like." msgstr "编辑你喜欢的不在消息标题" #: ../src/interface.c:2432 msgid "Please edit this entry as you like to modify the absence message." msgstr "编辑你喜欢的不在消息标题" #: ../src/interface.c:2434 msgid "Absence message" msgstr "不在通知" #: ../src/interface.c:2446 msgid "Set absent mode" msgstr "不在模式" #: ../src/interface.c:2450 msgid "Please push this button to apply changes and to enter the absent mode." msgstr "按下进离开模式" #: ../src/interface.c:2452 msgid "Apply Only" msgstr "选择单一" #: ../src/interface.c:2456 msgid "Push this button to apply changes on this absence message." msgstr "按下选择离开消息." #: ../src/interface.c:2533 ../src/interface.c:2730 msgid "Down load complete" msgstr "下载完成" #. #. * カット&ペースト用に位置情報と発生内容を表示 #. #: ../src/interface.c:2560 ../src/interface.c:3763 ../src/dialog.c:219 msgid "FileName" msgstr "文件名" #: ../src/interface.c:2564 ../src/callbacks.c:1066 msgid "FileSize" msgstr "文件大小" #: ../src/interface.c:2568 msgid "appName" msgstr "程序名" #: ../src/interface.c:2572 msgid "Down Load Complete" msgstr "下载完成" #: ../src/interface.c:2591 msgid "" "Please push this button to open the directory which the downloaded file is " "stored." msgstr "按下打开下载存放目录." #: ../src/interface.c:2597 msgid "Please push this button to handle the downloaded file." msgstr "按下下载文件." #: ../src/interface.c:2649 msgid "Down load failed" msgstr "下载失败" #: ../src/interface.c:2666 msgid "Can not receive the file properly." msgstr "不能下载文件." #: ../src/interface.c:2674 msgid "Retry this file?" msgstr "重试这个文件?" #: ../src/interface.c:2720 msgid "down load complete" msgstr "下载完了" #: ../src/interface.c:2734 msgid "Do you want to open the directory?" msgstr "你要打开目录吗?" #: ../src/interface.c:2738 msgid "Directory" msgstr "目录" #: ../src/interface.c:2813 msgid "View Config" msgstr "显示设置" #: ../src/interface.c:2847 msgid "Group" msgstr "组名" #: ../src/interface.c:2853 msgid "Host Name" msgstr "主机名" #: ../src/interface.c:2859 ../src/interface.c:2969 ../src/dialog.c:369 msgid "IP Address" msgstr "IP地址" #: ../src/interface.c:2865 msgid "Logon Name" msgstr "登录名" #: ../src/interface.c:2871 msgid "Priority" msgstr "优先级" #: ../src/interface.c:2877 msgid "Show Grid" msgstr "显示网格" #: ../src/interface.c:2891 msgid "You can reorder list header by drag-and-drop the list header." msgstr "拖 拉可以改变列表头顺序" #: ../src/interface.c:2893 msgid "user list view relevant options" msgstr "用户列表相关选项" #: ../src/interface.c:2924 msgid "Sort with group" msgstr "按组排序" #: ../src/interface.c:2928 ../src/interface.c:2977 msgid "Descending Sort" msgstr "反序" #: ../src/interface.c:2932 msgid "Sort with group" msgstr "按组排序" #: ../src/interface.c:2952 msgid "User Name" msgstr "用户名" #: ../src/interface.c:2961 msgid "Machine Name" msgstr "机器名" #: ../src/interface.c:2983 msgid "Sort with following key" msgstr "按下载键排序" #: ../src/interface.c:2988 msgid "Sotring Configuration" msgstr "排序设置" #: ../src/interface.c:3131 msgid "Group selection" msgstr "选择组" #: ../src/interface.c:3138 ../src/callbacks.c:3001 msgid "AttachmentFile" msgstr "添加附件" #: ../src/interface.c:3214 msgid "client information" msgstr "好友信息" #: ../src/interface.c:3263 msgid "Client Information" msgstr "好友信息" #: ../src/interface.c:3336 msgid "Host List Control/Security" msgstr "主机控制列表" #: ../src/interface.c:3365 msgid "Please check here if you want to send your host list to other hosts." msgstr "请选择这里,如果你想发送你的主机列表给其他主机" #: ../src/interface.c:3370 msgid "Please check here if you want to obtain host lists from other hosts." msgstr "请选择这里,如果你想从其他主机获得主机列表" #: ../src/interface.c:3372 msgid "Host list" msgstr "主机列表" #: ../src/interface.c:3390 ../src/dialog.c:451 msgid "RC2 40 bits" msgstr "RC2 40位" #: ../src/interface.c:3395 msgid "Please check here if you want to use RC2 40 bits key for encryption." msgstr "请选择这里,如果你想使用RC2 40位加密" #: ../src/interface.c:3397 ../src/dialog.c:454 msgid "RC2 128 bits" msgstr "RC2 128 位" #: ../src/interface.c:3402 msgid "Please check here if you want to use RC2 128 bits key for encryption." msgstr "请选择这里,如果你想使用RC2 128位加密" #: ../src/interface.c:3404 ../src/dialog.c:457 msgid "RC2 256 bits" msgstr "RC2 256 位" #: ../src/interface.c:3409 msgid "Please check here if you want to use RC2 256 bits key for encryption." msgstr "请选择这里,如果你想使用RC2 256位加密" #: ../src/interface.c:3411 ../src/dialog.c:460 msgid "Blowfish 128 bits" msgstr "Blowfish 128 位" #: ../src/interface.c:3416 msgid "" "Please check here if you want to use blowfish 128 bits key for encryption." msgstr "请选择这里,如果你想使用blowfish 128位加密" #: ../src/interface.c:3418 ../src/dialog.c:463 msgid "Blowfish 256 bits" msgstr "Blowfish 256 位" #: ../src/interface.c:3423 msgid "" "Please check here if you want to use blowfish 256 bits key for encryption." msgstr "请选择这里,如果你想使用blowfish 256位加密" #: ../src/interface.c:3425 msgid "MD5 sign" msgstr "MD5 签名" #: ../src/interface.c:3430 msgid "" "Please check here if you want to use MD5 hash function to sign your messages." msgstr "请选择这里,如果你想使用MD5签名你的消息" #: ../src/interface.c:3432 msgid "SHA1 sign" msgstr "SH1 签名" #: ../src/interface.c:3437 msgid "" "Please check here if you want to use SHA1 hash function to sign your " "messages." msgstr "请选择这里,如果你想使用SHA1签名你的消息" #: ../src/interface.c:3439 ../src/dialog.c:428 msgid "RSA 512 bits" msgstr "RSA 512 位" #: ../src/interface.c:3444 msgid "" "Please check here if you want to use RSA 512 bits key to encrypt the common " "key." msgstr "请选择这里,如果你想使用blowfish 512位加密密钥" #: ../src/interface.c:3446 ../src/dialog.c:431 msgid "RSA 1024 bits" msgstr "RSA 1024 位" #: ../src/interface.c:3451 msgid "" "Please check here if you want to use RSA 1024 bits key to encrypt the common " "key." msgstr "请选择这里,如果你想使用RSA 1024位加密密钥" #: ../src/interface.c:3453 ../src/dialog.c:434 msgid "RSA 2048 bits" msgstr "RSA 2048 位" #: ../src/interface.c:3458 msgid "" "Please check here if you want to use RSA 2048 bits key to encrypt the common " "key." msgstr "请选择这里,如果你想使用RSA 2048位加密密钥" #: ../src/interface.c:3460 ../src/dialog.c:466 msgid "AES 128 bits" msgstr "AES 128 位" #: ../src/interface.c:3465 msgid "Please check here if you want to use AES 128 bits key for encryption." msgstr "请选择这里,如果你想使用AES 128位加密" #: ../src/interface.c:3467 ../src/dialog.c:469 msgid "AES 192 bits" msgstr "AES 192 位" #: ../src/interface.c:3472 msgid "Please check here if you want to use AES 192 bits key for encryption." msgstr "请选择这里,如果你想使用AES 192位加密" #: ../src/interface.c:3474 ../src/dialog.c:472 msgid "AES 256 bits" msgstr "AES 256 位" #: ../src/interface.c:3479 msgid "Please check here if you want to use AES 256 bits key for encryption." msgstr "请选择这里,如果你想使用AES 256位加密" #: ../src/interface.c:3481 msgid "Cipher selection" msgstr "加密方法选择" #: ../src/interface.c:3499 msgid "Select the encrypt key according to its speed" msgstr "根据机器速度选择加密密钥类型" #: ../src/interface.c:3502 msgid "" "Please check here if you want to select the common key according to its " "coding speed.Please note that some clients can not handle arbitary " "combinations of keys(i.e. Windows client can handle RSA 1024 bits with " "Blowfish 128 bits or RSA 512 bits with RC2 40 bits)." msgstr "" "请选择这里,如果你想根据速度选择密钥。\n" "注意:有些客户端无法处理某些随意组合的密钥算法(比如,windows客户端无法处理" "RSA 1024bit混合Blowfish 128bits,以及RSA 512bits与RC2 40bits的混合)" #: ../src/interface.c:3513 ../src/interface.c:3527 msgid "set password" msgstr "设置密码" #: ../src/interface.c:3516 msgid "" "Please push this button to set password for private/public key encryption." msgstr "请按下本按钮为密钥对设置密码" #: ../src/interface.c:3530 msgid "Please push this button to set password for unlock messages." msgstr "请按下本按钮为信息消息密码" #: ../src/interface.c:3532 msgid "Security Relevant Options" msgstr "安全相关的选项" #: ../src/interface.c:3546 msgid "Please push this button to apply the configuration." msgstr "按下应用所有设置" #: ../src/interface.c:3552 msgid "Please push this button to discard the configuration." msgstr "按下取消所有设置" #: ../src/interface.c:3635 msgid "Password" msgstr "密码" #: ../src/interface.c:3660 msgid "Please input password here(push OK button to finish.)." msgstr "请输入密码(按确认键完成输入)" #: ../src/interface.c:3672 msgid "Please push this button to discard your input." msgstr "按下按钮,取消输入" #: ../src/interface.c:3678 msgid "Please push this button to finish inputing password." msgstr "按下按钮,完成密码的输入" #: ../src/interface.c:3733 msgid "error" msgstr "错误" #: ../src/interface.c:3745 msgid "g2ipmsg detects an error" msgstr "g2ipmsg 检测到一个错误" #: ../src/interface.c:3771 ../src/dialog.c:224 msgid "Function" msgstr "函数" #: ../src/interface.c:3779 ../src/dialog.c:229 msgid "Line" msgstr "行" #: ../src/interface.c:3814 msgid "Error Information" msgstr "错误信息" #: ../src/interface.c:3838 msgid "Descriptions of the error." msgstr "错误详细信息" #: ../src/interface.c:3842 msgid "Error Message" msgstr "错误通知" #: ../src/interface.c:3855 msgid "Please push this button to close this dialog." msgstr "按下关闭本窗口." #: ../src/callbacks.c:300 #, c-format msgid "Can not send message to %s pktno=%d" msgstr "不能给 %s pktno=%d 发送消息" #: ../src/callbacks.c:468 msgid "Broad cast addresses" msgstr "广播地址" #: ../src/callbacks.c:1086 msgid "FileType" msgstr "文件类型" #: ../src/callbacks.c:2034 ../src/callbacks.c:2208 ../src/callbacks.c:2234 #: ../src/callbacks.c:2349 #, c-format msgid "Can not handle drag data %s (%d)" msgstr "无法处理拖放的数据 %s (%d)" #: ../src/callbacks.c:2642 msgid "Can not open URL" msgstr "不能打开URL" #: ../src/callbacks.c:2644 msgid "Please check your gnome configuration(url-handler setting)" msgstr "请检查你的gnome设置(url-handler 设置)" #: ../src/callbacks.c:3289 #, c-format msgid "Can not require %s to %s" msgstr "无法要求 %s 于 %s" #: ../src/support.c:60 ../src/support.c:85 #, c-format msgid "Couldn't find pixmap file: %s" msgstr "不能找到图片文件:%s" #: ../src/hostinfo.c:177 ../src/hostinfo.c:285 msgid "Undefined" msgstr "未定认" #. #. * 不在中でなければ, 在席通知を返却する #. #: ../src/hostinfo.c:442 msgid "I am here." msgstr "我在" #: ../src/hostinfo.c:776 ../src/hostinfo.c:863 ../src/recvmsg.c:335 #: ../src/dialog.c:112 ../src/dialog.c:115 ../src/dialog.c:122 #: ../src/dialog.c:437 ../src/dialog.c:477 ../src/dialog.c:496 #: ../src/dialog.c:509 msgid "UnKnown" msgstr "不明" #: ../src/hostinfo.c:792 msgid "Default Group" msgstr "默认组" #: ../src/hostinfo.c:847 msgid "Default Nick Name" msgstr "默认昵称" #: ../src/menu.c:156 msgid "FileNames" msgstr "文件名" #: ../src/menu.c:176 msgid "Remains" msgstr "残余" #: ../src/menu.c:196 msgid "Receivers" msgstr "收信人" #: ../src/menu.c:391 msgid "DownLoadMonitor" msgstr "下载" #: ../src/menu.c:396 msgid "Foreground all message windows" msgstr "前顶所有消息窗口" #: ../src/menu.c:399 msgid "Remove opend windows" msgstr "关闭已开窗口" #: ../src/menu.c:416 msgid "Show Log" msgstr "查看记录" #: ../src/menu.c:421 msgid "Absence" msgstr "不在" #: ../src/menu.c:427 msgid "Attend" msgstr "出席(不在解除)" #: ../src/msginfo.c:226 msgid "Can not send" msgstr "不能发送消息" #: ../src/protocol.c:114 ../src/protocol.c:1549 msgid "Can not convert common into external representation" msgstr "无法转换common到外部编码" #: ../src/protocol.c:130 msgid "Can not convert message into external representation" msgstr "不能转换消息编码" #: ../src/protocol.c:146 msgid "Can not convert extension into external representation" msgstr "无法转换extension到外部编码" #: ../src/protocol.c:262 #, c-format msgid "Can not register message for:%s reason: %s error code = %d" msgstr "无法注册消息: %s 原因 : %s 错误代码 = %d" #: ../src/protocol.c:1512 msgid "No extension in file attached message.Ignore attachments." msgstr "附件没有扩展名,已经忽略" #: ../src/protocol.c:1883 ../src/protocol.c:1902 msgid "Edition" msgstr "版本" #: ../src/protocol.c:1885 ../src/protocol.c:1902 msgid "Version" msgstr "版本" #: ../src/protocol.c:1957 ../src/recvmsg.c:325 ../src/userdb.c:261 #: ../src/userdb.c:266 ../src/userdb.c:272 ../src/userdb.c:278 #: ../src/userdb.c:284 ../src/userdb.c:707 ../src/dialog.c:339 #, c-format msgid "Can not convert message from %s into ineternal representation" msgstr "无法转换消息到外部编码 : %s" #: ../src/recvmsg.c:270 msgid "Can not create download window" msgstr "无法创建下载窗口" #: ../src/recvmsg.c:408 msgid "Remove the seal" msgstr "接收" #: ../src/recvmsg.c:409 msgid "[Attachment]" msgstr "[附件]" #: ../src/recvmsg.c:410 msgid "(Locked)" msgstr "(锁住的)" #: ../src/tcp.c:329 msgid "Can not convert header into external representation" msgstr "不能转换标题编码" #: ../src/fuzai.c:98 msgid "title" msgstr "不在通知标题" #: ../src/dialog.c:322 msgid "Version Information" msgstr "版本" #: ../src/dialog.c:325 msgid "Absence Information" msgstr "离开信息" #: ../src/dialog.c:374 ../src/dialog.c:414 msgid "Capability" msgstr "能力" #: ../src/dialog.c:382 ../src/dialog.c:385 msgid "Dial up" msgstr "拨号" #: ../src/dialog.c:382 ../src/dialog.c:391 ../src/dialog.c:400 #: ../src/dialog.c:413 msgid "YES" msgstr "是" #: ../src/dialog.c:385 ../src/dialog.c:394 ../src/dialog.c:403 #: ../src/dialog.c:503 msgid "NO" msgstr "否" #: ../src/dialog.c:391 ../src/dialog.c:394 msgid "UTF-8" msgstr "UTF-8" #: ../src/dialog.c:400 ../src/dialog.c:403 msgid "File Attach" msgstr "添加附件" #: ../src/dialog.c:413 ../src/dialog.c:502 msgid "Encryption Capability" msgstr "加密功能" #: ../src/dialog.c:424 msgid "Public key encryption" msgstr "公钥加密" #: ../src/dialog.c:446 msgid "Symmetric key encryption" msgstr "对称加密" #: ../src/dialog.c:485 msgid "Signature" msgstr "签名" #: ../src/dialog.c:490 msgid "MD5" msgstr "MD5码" #: ../src/dialog.c:493 msgid "SHA1" msgstr "SHA1码" #: ../src/dialog.c:686 msgid "Password for public/private keys" msgstr "访问公钥密钥的密码" #: ../src/dialog.c:690 msgid "Password message for lock." msgstr "锁的密码" #: ../src/cryptif.c:703 msgid "Can not decode message" msgstr "不能解码消息编码" #: ../src/cryptif.c:703 msgid "peer" msgstr "对方" #: ../src/base64.c:156 msgid "Invalid char" msgstr "无效的字符" #~ msgid "Message decode failed" #~ msgstr "消息解码失败" #~ msgid "Remove the seal[Attachment]" #~ msgstr "接收[附件]" #~ msgid "Reason" #~ msgstr "原因" #~ msgid "translator-credits" #~ msgstr "翻译者" #~ msgid "users:" #~ msgstr "用户:" #~ msgid "0" #~ msgstr "0" #~ msgid "enable IP V6 mode (Need restart)" #~ msgstr "IP V6模式(要重启)" #~ msgid "g2ipmsg users:" #~ msgstr "飞鸽用户:" #~ msgid "User" #~ msgstr "用户名" #~ msgid "Host" #~ msgstr "主机名" #~ msgid "LogOn" #~ msgstr "登录名" #~ msgid "Regular" #~ msgstr "常规" #~ msgid "ReturnParent" #~ msgstr "返回" #~ msgid "SymLink" #~ msgstr "符号连接" #~ msgid "Character Device" #~ msgstr "文字型设备" #~ msgid "Block Device" #~ msgstr "块设备" #~ msgid "FIFO" #~ msgstr "FIFO" #~ msgid "ResFork" #~ msgstr "ResFork" #~ msgid "Helper Application" #~ msgstr "帮助" #~ msgid "Downloaded File" #~ msgstr "已下载文件" #~ msgid "Downloaded Size" #~ msgstr "已下载大小" #~ msgid "Unknown" #~ msgstr "不明" #~ msgid "FileID" #~ msgstr "文件ID" #~ msgid "Recv Size" #~ msgstr "收件大小" #~ msgid "Progress" #~ msgstr "進捗" g2ipmsg-0.9.6+dfsg/sounds/000077500000000000000000000000001126724573600153455ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/sounds/g2ipmsg.ogg000066400000000000000000002207011126724573600174150ustar00rootroot00000000000000OggSǫLBHvorbisDOggSǫLf-vorbisXiph.Org libVorbis I 20090709vorbis%BCV@$s*FsBPBkBL2L[%s!B[(АU@AxA!%=X'=!9xiA!B!B!E9h'A08 8E9X'A B9!$5HP9,(05(0ԃ BI5gAxiA!$AHAFAX9A*9 4d((  @Qqɑɱ  YHHH$Y%Y%Y扪,˲,˲,2 HPQ Eq Yd8Xh爎4CSR,1\wD3$ R1s9R9sBT1ƜsB!1sB!RJƜsB!RsB!J)sB!B)B!J(B!BB!RB(!R!B)%R !RBRJ)BRJ)J %R))J!RJJ)TJ J)%RJ!J)8A'Ua BCVdR)-E"KFsPZr RͩR $1T2B BuL)-BrKsA3stG DfDBpxP S@bB.TX\]\@.!!A,pox N)*u \adhlptx||$%@DD4s !"#$ OggSǫLס;ENLMLNGCA?BAO@LINDHHMOHHIHPHJ@>FFI8@97=OGNIMGDE9D:GDJ9?ABBFH%V #do_YtONNH$ymEkPEW~TPUBeO5UQniwmĴT) yJajDk`GduUUF@x+uZ5=WztBY&թ@VYV(abra.h`lЯ$Nd{;@g`+.wf tC7T K{N#|ݦjgjઇ`t.;i+zH¦ HYX_6[e,[T@ jlWg;+Ո$īc7YߜMfEe 8P[1!1w؆$VqEa9*AǛн:1:π'NYpϵN fm$\G{uI^) a$P@{@ýN=,km5J^inw @,tQE w{9,% FVG 4@aNYI`ⷩ!دYqOplέh|F5T_Sդ[NY ֆ*fyn++c[ fC5Sj?iE]OrC0R tdPbTMb @Ls{x5$icXR^A8JSpf|]} .+EжLRN.g',XVKa'UZŊS2T T^m@t`kmI N⁝OwuN1|ZQ[&c+>+ 5e)EƷ*+gRji-,]/'QNY-VZ* }pK͟& 8u~cԊ(u]s^j5i4z, RZ$ ۪ W.g0W\qF@C?`*s7\&"& 70FWk>5.pPYtmj;|Y'UB`[C`Df1D"O:DB{u-DR;2=RU %im8JOi wqSc4SOL4gzfT[_A$r>=#z]MP)o䏛*&Gx2Sg fB&Kc]*),?D=4۫4z5ynTo]-RE$}Bp[%!Z :'IR= EU@Pv-=_c#ȑ2CxRYDVH<4bաU/Z1~Uק{-%hQHMRZ5iiVV}ߴyR^qskn¹ok@9v۟xA{rhO;\sE~v~5%JDL1ģ5pnh2}Ju$jt v`P ǪB8?m`n 81[`]UmP99 j[_݀ӔJR*[Yn8m&@@Ҵjj,l믡Hs2:mSh NƠCVbVٮr&։P(07vR}le(F9SmR2%~; TYV7U6 d~qtfb-!`9G1`_cPQ XiXEq\._`dG ƟnՍm\v:9.@0p:^R cQTXv8 Kræņ a ˳SsF윴4Һ7ThX?^x߅yUVi!bqoSc0c禽BA]ZVo{GkuNmuSIM [ TD8[kN;5ud\ WF6 A4JdA]UI/D켗.>[R82tM@H|?ȓc ́B6";31"**(TXFebm$@/p5 <g`gw(U*@M VWXXroFQEX}jM&pE9H ~WP_VG*.(o+T$NYjDKZYBfpiQyJm@?.@qYwYP\zMն2/(BPXz? .-F@}1˚"=i[e̼ TXn?s*,~E h oD4AEq86F%xz_J=bZUVj Tb[eUpVWGvLnfQWEL:u"$9/U!T9.c5EJڒzRYD>TUX86 %4oԭW~Fe^{^EjWbck˶ ^wN5rD!&ƀ @w4(53{#8w/ַś=z,\8Uh*~w ݢ\NZ,o,kÎI : @XnjuVVM؋s>po;ZumIE":(Pe*{[6<ݽs srވUދѿ, ւ z۫sLCmNP8Kp=Bu$-]Ѓp0L"WӋ)R+!Pp9*\MS|S߷MsS5%u^%~RHPH 9UhXhusa qڙ t4 #@THcPͩj`M> b+۱e(N]) >TNPXY _s Μ?tU}.YjkKɜ5|("Y ~yc\3ԊFR)6 ;8a& wR anQ\"g yJZ(JuT@RWSq֓&;D@(FL+w+ؔ׍s1Fv'C)*Y Uy~(}ݥMPm%T4W AoaM sBIO@pc)4PBͭ-tm t}uCpq. aDxK+hP&[48?(} )(Y%i 7k=Vg :AQXI(@+P aRK U;;Oo;"fOH=Wjq߿k~mr䟜z.֕ry]P9xs=LK]nQP~DMY'QSO8"l #a OggS<ǫLI32EH?DGD8OFL?CABCGFFH=MFM=AIFC@B686<:GLN`FGHSRZQVm,=TXZ0zSCFPD͝/p*^\_|9͵ћGJVi]Fr]M%fM{2_+NZ-hц&3EkX9KRӱ\QV[T(R—ZL%ml]ۚ.&ve%*gOGkmi*4x>P(RXf+YRbW"l?]Az/AGj] \馻T^j% bG43R3K7fAp+uDwٕCQT,7g@NYUoN4 Q i[T ]NTq59q*_"v>@pui03^ף(7:VN1i5(n6V]2/Bm(EXW뺈"ɞUa?ZB %8uVS)V04;W1\V-P@$8^80g# EPQb5E~9ʢy;ǵtT MxCݦf'*!0V_-!찰S.1\0*SډN [47]VXnmuY]ɉIE vSw{eAļ5+ *4rʀVüR,-pmps&`?}a >C`´q}%UNi'@VXJ+(v*casĝ-2XVv6nr.2'lfȞ-z@4:a]U^b34 VPo+,]k$8bgejCuS CSe=R| %3~b&=VGPJ>:P]kʋzhWi|_ yK?;/֢-WIE;ClB߿VGmonzٲvJ/~Tw3F^HEF_UV1U7da ة) ߶A̳<I=RwRm\i?-$V=Z &lU|T JԲQ'ާn-/kv~$ê% 86d:kL SÙ,wz&YT%L2 Uތ<7Tzji.?kv ֋}92v`K9b !=('\Oa6.Ym[[[r^ͳ6xU~iJ0 CU{#ʹ\ \/N$GW›XzҵyZM`aCBBE޵ jzNiVUR幭G[ZXw΅%8M%@!|n A- BfӔJBx'@:g>>҂ִ5`Xfka 9F3@p@2LJ  >TdEX؆*ߵ\=~|X4`rEwqy.1VѬ9:hROѼZX?}<~ř<`=Ht˩+B%FN t*5kI9,jǓh!엙5[d:^H}bX{n>ٮs-L0H@ko0O҉:Bc GuvEwUtgBD`dG`GhjgDoPB3==ݑg s?^% #:=pg\S-G`Pùc:Z;{c`8]:|(S=VL.ˣ#_-`5A&L`v2,W gX*g,k;f2mUU~[Xr'`؂' [腶u*KI$^^>M1:I&iTW%#/>nrn'|lk =DR^k,+扩]l 0Zd(JU^Gd3Hc)ڭI[`pЕh4PތIV _\{3( ^r2, 7m) 74q 6!~E{*&0GvչI~ҬقCfaVN_Oc9|Npt97΀`;TL XR7r=gzylͤ-کa Zb>gcDDu~חPVuNg("0 ^DT _|I󼾜*i}OEʜQ˦ q#";pFQUT}fy ADd=rc^DEAd;ZE0-g.<2EIm6ᴩBZקj sN=ff,vjd5|D6РHXh)%U%*zlcHH##Pa`A93*RJZe8i G[ ph hvc[XؒbXtW2Qt{mBL mn&*"ہJNqcJ`)#/ler k(RY, R py Y2B!ȡ@gIf_8+Wf&\ḿeEAJ Eurb&(6!lteB3%ݕS̗> 9(P$AaN#* @sfɘK@poEH%)~SRGhGC6ۼJ =EiǬ6T 79w`x 8 ŏ%fX@P)ep9j;ϽX 1~/\D9|Enu2 8(Of!$ ]$Iu'  $IR٣ S63~9gl͖l(s;^ˆ..3Oac@3>2׿smw+e,2O;y焋`( SyS@LPy btZezlgM/|MCXjEf%QhD]qf )X н[?Ė! TV! 1@:Rw \>)R98x:$R!̊@ZOggS@nǫLT.N[;QS\SXJCFD7=3](ccā$( < 9#T!RD IP1V)⚀~ouGFKƼl}sP CƱ m,6awjwĚw3pKlzjXXU'{/j`BZEF}P((*Bm_E}(bVUUUQMb " ?޵[9ʯ94"LS0Cc To@* e`@!0 @ k@iڋ썐@ĘYҁ $)wSҫm@(:60I(UiO0T~R@ Z] z֗FTyh2}D|ҪΥU˩PdV(ԯY&ZXݽqh{6(sX€' cg{Jdb>V'e0\ ;X x;rcP? * VAPAO_P8cm>TjlR1-";,*RKqZ)*os-+9'ɰ*Myj+^sǁ [5L8=G$\y? k~f\ I˲<@Hl#Y5#WG@ުx *δXQQA`BEQTTk!ٲ 7IH$ EΧE;ߞNG6 02@f@cAi cr7ǜjI2 00p+hnmX\fӻt7BNGWAà5,p@VZnS` } T Zz_`MY[2Dk U&jdOvXB<>``#0\)/q `j V@vP^WXRեI ֫)h>~Y?0YTEwX { \p_i֍1ާ=[.ۤG9(1d"Y伸\/ @_*ocQh o/i`M/|̑2*: h*UT'0TY7c!CZ$e+=ciL1pN܀%,&VcpHB] j}6d* @[ǝ7 U@vG%]a-O^- 9+r~~Y>0:ٵ%ன@) Js5"@C>ݛT${V"[z"Ḫ ?Q +In@_3ǐ*q5@}'q+0<0&l&Q8`X)ie0@K* /5R, N 0ٟ3( {xnmq!.TC  gky9-#FKq\\Zy+{Y<칮o].4jԫ|j @%WcR]`n+B`ox" 4w T 3i h i&SX8],}0 ͧQC)Ed,;>9HD5]Dڢ|ZJ;2U [o&@ SAXӇ= 'VM cnB0-f'ZuMCnQ[jq@b{<{Ep&6+Fޭqؐ)fIGa0tt^7ƛ[ 9Z6c窿o[hOg ̞l%LXp+Beg<}R[Nԓ_kY%X OI^n>,Q'Qi34_nOqힽ,.l.|1$X4! ?aD*mIS C=z=!F]rUL{|[#3b?w>/Qf z2>yX12pe. PU Ej@v[>@آKwj=XMo>(xbёƒ Zy p3@EA_@vd 6`ټ1)K_(~KۇF )9kE7ۗam<@9#`DO%,_AMZ)/™@L[[-Щz)tf0@ 4ϕh>W Yr{\߸H-sb^Ҟԗg员?jqm9J n=2@VL=e\Aci' pK1b U@k7R7X T KxwD Ltk;G<̧cusL}g?1ô }@t5hzuX:nH h0n _e2#KyIIoe0OggS@ǫL.^386,1-:'-'-+죱P?9P |m`'Phdg>)ޯ%DLS*譻OW؞˘p [W.s@?HSXx NJy'1-LHw]584ϒ  ~S@2$$̀hbƝ 6mcɻ{8׳ hM(眼c-vg.n쟏)g{cQdgSc~`ܗ<P= ( dYkB'0[y+k TF-U8G~)^r60%cΛ(/;O3=ΛHyg> .<6$w,`E+aLaB2Twg'ͭEŦ`h5@McTxh, &zf5'dXڷ˟n7 *~g]0}KKt?qLyBChP@S T>N3\ oнZ OWٓc,+~)^" 0<=QGQF1l SZ4>k[ a@X(>YX)G@$!@9<PI묨{YN*Oq`8|G;7L/6r. r'A/'zqp?J]x.*iogGUJ *]K@# ϝpdw/M[]^Zx!R{:@7@m% [ `Z^^n> *Qneo"=vπNӰs)yc :2 %,A jJ{  c0FBP&;fϒI;.Lbv& Id '[ @s?W]9-RƫOߪXkG z>yٗbxxqt)wn tB}i  -6 $EoK#%1"tڔ4_ ~pj0^n>*1OMftݴU` ΉR72mvL0N%,ߴPPV`-LHg 71*x\I$\@2 b\FYQ / a}w^?]׫ۛG6"G͔ں{wTNcr\_`D hG4;fЎ{VtDzz?%,`߾<&>!l4> D=Io2&rӪq*qJkwիsXs`A%,=1+00!T{G0^H@f P-&*( ::@Au6O1tNY|qz{#^iK 7/^ΥbyosYZC*&iR^@i$\J)5Xۏ. u]NgV@D9}(~o_5;YPѶWz쌒9O[ '`h ` %,F'wV*@  c R4%RO* 7@K`g \ v]W垑D#w.y_v09kq%]:94 tUL.>9 DxEtĜ;^l&`Z%@  4]  .>y}F,_wuK|ۗeg(,(dU-GF|  `3B~YX)5C1ƃCN߿4~}v4( U%%o-x]OPPB0P?`>#T@,O >IҷS{޴3=V[U|+Wjh^T"ݰ]F   Om'"@o zҏ/¡,p붶Xn_V~ 08@Ng` BA_gR|_ cLp#%j/ <N aA^ 8Vr`ou~ۋk *h׶j?VW~QJEz/vn53qdP9aO.pCUzKG 127OH0` X-@ 8@ ><P #^Y}%ЂQ(+9O/rUHpc'z1Y"p{0 {]N; _+az0 pCo;{ };@Clc+̱#@ܯ V5ZY ƧxB?[Ə}85,_r!$[P lD {.uwoSH`Q \@ y# d ؍PhĀf\=SO,ˎ(%!p"ZӰw ׌&+!&H Q߮Y\A@[g h*9Ku4QT=T~KKx~;?dk88=`㎛$!Ӆv-k jZiV2 *1B5yzTWEk;@`XĀAxu%G|B@yB K?>N8̺nׁ/_}1^(4G*`$ P|["DԾǚ&p+~? ,|yQ㷓\ _T*APnn@Ý8k n+{>g=:~ױ_\my)VwzH3&ް`үX4sPUŀ \'AUoQ@@q^ȝ9}L!ɂq PPn*G;0; >%,I``"0Fؚp0N#6Vd?S%mhA5ovB/U|v@Ppk3:> 7Lxܿ}M%T[,[kj~%pv#Pgfsjr1'6ׯu ]sSOggS@ǫL/|O&0!.'+- '!)"$PԖ`г7Y (>~YBޞRm),=}AxP}HY`mgFo@bX4*(볺n^`>.tg@MS)X)w H80A1uzv5 [- mn'S Θpحi F__y+l/.Jmٲ6ysso_y_|>OouX)* Itvn  Wq j}8˞W(@UX\z~*֞04< >w[wQ~o__Ke,g(>; p; 05Xx(w@ !$Q2U l5]|: l>.0&@IS`eYbO'yϽܿ.Nx]͑G! Т7 BU,HWUPJ_SU8 VQN/>8@hI[i_*W@#]@ B^@_ Pʏ,g/dקSAqώ@U)`b"Xh}F֧w' & 11 POrVV(şA%yAr*o8#wߵIO>?=l}Fܯ=3Vv R2NU]+@LedZXʹ.(v9F?~[fE`6oP]^T@h >M[_-x{V1r7>|Tȉ>@V.}ЧpL%, ާB0XzاaAM#=y U Ez@GbjOFH rCsɛ~-[U_ <e|W*8Jg7Zc k\-rS ` e t n ) L!}@a\) jeq rA`6PS䩣Vw{_F ߣWhmèu0aS0tcU@jd -Vqp 5tJ@XXTxOEt"ጷg  oE"_p|3|QX- Y_ BG4@0V$[mS:?B  ;( Y Ӊ9* 6>@ [,6䎶rV` W kw?_sOooF}h.': H e @В{\pr \kR/<z={"м8`X7(B ٱ\SOK$(Zx-[E_"Q8Y X#=?}$ x<t5`"gm$]Jc@ 0Rn@QF` /0@== &lRh;T1 "aw>Nj,</1rwWzmqaz2G`UW|]@ *u``6TAV>F <4U@z *x-"*dW eЀn$户Ry[1 к ` FL`+ٝ}|Vwxtǝs9dPDxH|yir" tq%rhMD{L <$yw|ȷT|J]mi{Լ,5k3ђ ߠX^L~D!ObgP߀ <:k9 a@kjpu֙` &쎛~ { 6@&_DcP M^Ԇ: 5d H;2G"zeC~~=4صXqY3꺫{ԕp@ԆOHf$-SAd{  qMjl1l WWE<@Q|wTSTV>J;P| g -6LU`w? zM1L0![ؙOι //tn|ttdF/t=֒՚)ڢ/\ $82h[AQʕAz 4_K2lOggS@ǫLHW!,.-*..("&$./"(Gh(ȏ/@d)1 JW% P ~/>[۫/,I(.,%`@dRWSO;ALTT&[T~"6 Vg e'nz̗ƛnQ C) qN Pi]сw)ki8Oa<>#nZw!N .rRt|@46_l'(P/ PXB{ # T'7*J@1YSG5(_]ve<@ }v҄|vvs@2KXB֗5 jI%0Iғ9D^WK0M4@EiD6>p}/dzG[sA0r[NrL$߫5N&OdwRU ؎S$@puXj;;R }uX644e( &q% }  *@z lXGuQ~k?byU8@,{.@ő?nm > mQ8t,`jhBc!&|{ ΖG:E.3d [  z+Ϳoc㽕˲o_zw|;4]{={μ|S+8"Mm6@`btjr #KtRAr*C5!}ϫ (ԋA :oTe0`G @G[E? P^~|Vxsa4~ko-cN[s@"m`"aE0.`}q&`0"h= e *ĘVP 7;1x3|7w*h׶rWN?_ah k\O?sk=A^sG{Pa?<^75UU9Q!yuS6+F޾}Ý[$;@h ^[fz XI` aTvIJ^__~_hm@T]@<$ ` {U{9(-:~EV\]1Z? ':?_9Oߎf-V*kp U z";`Q˿ uJPt@`8!UW % `^'/?[eByuRQ T_U<"Pi 8"ݝ whCۧاЄ\I`L&huJ@$!zM~s2S )*ԏw QսڔT4.n|dю\w- ^; $Nw 75DwV@jP@IbY ;*䘃@X-;iFbVPB >'ϗa]C"!t3z*$5LtaϷZi~>BO vv@,=c@@~, W؎6M(0X(F֝g@e%/f*/XW PY9@P;#a&eUdM6g(K9WwT^~?n~Z{s`2 ׵_ٟnarAzj)3\,@_\צ -@ZT)z)Т. |[V n>5"B >Qa9H?٨~s6-0Qn[T+` gЄ$L$?p(U[@4sb^PKݺDyǸ!Q'=U;[״V ٱ4z9Ny=l~yfocLqլ"(O0UՇ  tۙpGrx, t+b ] Ӌ4t>3e̅20@5_e؉x>o #p`b%H1kSe,`XoЄ)D#힚#O2 @Qx dg. 9`_j B;z}i;[>'Yʿ?ߎ>qهqhjH'?y8[Hݟ A IgWTh䪔P7fp4?FXF 3A$_7E\XN*;&U>;uʓ LGּТpLM&N. g"QhUTN6}BI^!@qJ uTGX @z@no@Uֻmt;`hha]uYŕ_óy\֩mzrLYG9}ɪ : (+jb N܋T:pX2z { *@%( >5XT?,\7F˱&P:0}& -dn- RI8܀h@Ly_«(bCF j])`6B @ nV[=u@(ɭa ۻxt9'KA~6z+XVwZK>gԃ] | u0CϿ5 Li݂*!Q); `+ X 8@D_ + <>'qhٯy 溩LHWvّ9/%`_X 8@C%a P PQq=@4QJ}2~vz ݓD.F1Y2v>4X=0d4QJgޖ7 O@OggS@NǫLgӅ*#.%%2"*)(#''$LYFL nBSdda0 V*-P^'33k'JzDK#|}7Ņ,,, $ۀ581TUN7 l<bN{'"F)n'@Gǵ39V<ùq[}bF~6l<N7qxyo^&:̵uSkN)( ==12!H0( @p|@@بqrYD6k !P*Y ?1iJV { PW >7 7~|}:v[ioI .v75p 0RN1`0 } & .3s)tT$B>nBj/к)x5 `$)_3^wql[ :џNz/{xJK˃oӹ:>]0O2'g|9MV3Q/"d K\w/AD=- d$|<\ZIL);7j%EӁ) XnMb0 ~'5;PE> J;@(@ۇ~%vD bXp{ ۀ a `:`d0yl@"UIB/M ! !LHrzQЯSUYWwA;Oج+w7kߜO/_{>nxR$$,W@+ *OCõX Cnժ콒99QO]$-YQ`@R+p$4^'u A;ex@SB<' f-7߯g1pI@ 4jM̴<( AA* '@T@_2De'D  I%&kpD&ǤDS ɴj-+Oo7i*G'Ǘf?{<#*@_@} Pn re(|3B*ۿ%`48 ;W!@!L`lLen+UUP#Jo:!aLߞ.!O*`G 0 W& d}3}@Pb%I81L,M֪)q-#t7Yk1w/ o򱦢~*0/ūa{8gpzX<v`@v,DB+@ '1;1l7p ")?vo dU`)grlHF'&vW8*-[@Ύټ:^ Itvh>_?t+z9 ><·\\KgO_d,wO4!+ST?Ѹ{Fcy: .0[ U O1ʷ j LKpN]s@6\%@.m`sTU%[C+TsP3Ѐi>Jzv6:[c@&Z uπ LIо @_ @GE  5('NG - r伋'?^}ײϮ\m"=" vG<x#:DMk**Gk ON`?-)Ƶt-?~P7\^LwO󗹼H}Fu=|-A'oAÊ @ol9ѧ -/sBbs*q.ia~}! ]*$04@F P-P*>3߀VY⢦A T+>;6o %` & n^6%p*2C'hh@@ 9uB D@y <.ۋq[|V\&2җ|ޣcU?$LμcgɼEr3Jh2pҦ@o{P}s A )ԗvٰ1s$T,A^ЋEpTTPnor Xpl WX_i9.:߀*i 8Ao<DZw,@ Y5 8@((U᤬5!3(c D&}ÿ:.+U%?GG׾\͎ϖ[z`鼥~V˺hM6ʻÏJ"q '>h;i:?Y1<HހS%AಊzgU={wWpJe pZlbPV743M}9 *;P:”o@r5 P1݂ ؀ =A /mm-a_3 VWvT(| $ ?7= ũկ.(G3T6rpi{V^3odb\%v%L `di @(AC 0(E|w&Jc.OE:yB0d=[Y[ pT40~;:ԣHkGs;?b 0@XhO6p7A)VUI&F񝴴Pq_F@SQE xK; # 8 iyfPV|ZwO5Ϛ=of Bvy ` '6@Pmx`@sS* 2@ l640OggS@ǫL ^Z@"'#$&"% !7&d-tPj> U ڀJd#P4Aۜt W}ΟV| 06dEM >GW׭Zv.J~, FMh5"N #"bV( 6;DƟ_gv_ϟоj=#'">qP_Q5?[s嵯1f_=xpzR~xԏ-gu]c>YjijT SHլ @+ `%`z$Qnޘń :qsffMؿNSU)TlPКf(#%^sDg~tߝqv`z`> 13l ,xl@mphٜ]vy* jc*}6/)`.충@0ZPڿ*X@'k:9sVP~~]{ :z(mr Jd0(dDx᠛70<70h,C'dfL ;V@ ( }#+ǂmd=5=ug||9P_, @NX8{U$zksr9*@6wRjKT]KPZW k jջ1Wlu6{=? H 0oI{ۀ (TN\5'8Sh' 7n6 ͩ@Nr@8esd[V]rv`qam*fV/{b<`0Ӧ]#PUI:#&S3N~[ht4:g-145S)sk\ x)ߐ*'-Y}~gI'pp4}=toOy.;ֳ;3]ae-K} dnaJw[nCMuvrȄˎCۥ(cS:8ԡ@HV TV`htOit>ѳS綧fG}4;?F ֹpcX9MhMB pRߐ}(Vl$- 4.GKl@ da)MVwHkExa,r5狀c\_6e%8]Ta/0}[Ҙ<f= 6nVu})L$#rjztߒO.OKt g H@V/(O*t~w;;dn{WPWs"j [9 `I`y'`>6BgM*HjBc%li"$v@f{G ̓>1d?Oxk}i>ѻSa[UA kN r}<.uA5>` ȐeOĜs$jݧqҤNH^MbCp Ck 0HT.xlzR dЁW|;:;ns:Pbgxg@EW 3L3-TN`('/ ;QҠDr.ަa%K7;sMt_R+6EŷjGkEYU~Q䷧\Sy!^Nvx6jܓ54@^2qR¤ty7Ĩqʑz DMPu@ >~d_LF/ͩ83\@i6<؀UU0nSe PJ.8EM@e%( @ 5 GmP-'@j:XVKWn>jSb[jo[7:}dL{OBo@* LLx~xR{*,)vMmv)4h8oC3[HۂB2T(0~d_NqvrR]kB1`>3_gp7ŋxg>`HXȻ̜Y H*:īƕy94WO҆tТju@@^YOD=|]7PcN=(˲=dي)欄H}u3"r޽a,܋b3ITihq DGp(`+>Cdի0  2|)h%͎& @ ^pH4{ $3Ie4cp*N!E6IWU$ @hп1,QC @0R ayPu9@ J(%7ܮ6Mp|Z\9bRKfk_JqI\k]w=ٴ^+m Vo%pH0jxGfHa:@P 1Gj  "@ H@UtS%x0r`ǡW<5Em4~u|x3x1t"c†;0؀@UU%9NN9Iڞkp c%Uf5x>d @X4 r!&PWX> 館'?)?Z^vfߦc y0fa2pyZEV=,<~(\?N@14p{J r HȆTu@84K0ؑ !-E`Mx <& k >  a/@U!; F~ F_j=PAhդ4ayP@VQ7<) EpXlﺺgJ.kGov:oNi+?ڷusKv[>terqT S0Z"JwIWձ 0pQ[ @1x4$BkWL% b%iM]@[ϥуS@\0$+pdTU~.9awrcC _-Py(Nx(q/y*ǽܟGb* 48[=OJWuA.Fo2;$7K5@Z7DN5hTʹA ϜH{kQ()Uߤg;ẘ4Xq3}3OggS@ǫL I(# N:*1&F, #! $PKl,H*,? q̇xNcB V˓D> Lĵs@`mX'GUU4k˅t0b<CX|o :Yx%$Z{V_)S~p.>EnU-7}ylnRvQڭ۝KQ=@Z x FaT|cb| @߇>|Y4tآ"d  4 f pP)h @#`p^`=$YS+_oT @1m& ̰ 8*avW6 wJ*yv C`m@@f$UG^*f딲9ǩޥW.o˹_JhY/5<<Yx+VCiFS`qQ\HU|tsAqkG>3e7@^ wt l was6>4'2G~^Ϙ>yXCyf~ 6C`YH `0ӣ\*&mGU?KGccn/7{~@C @@㩫@0TL$ qL@$2JsNܑ/}?hYK,^h'3V68j0 1Նԁ.ǡoDfWŁU֨E)` Bc A\^S;>icr@g}N~XpkAV`>p hywTos'Ђ`@Ԓ# @6%rB.^֞y}UUL>ؔ[iոrkݩpw$UIlrm?SoL8ٻX (P NQe h;MO0][x% `Vr\F$9 jQ*I(Jz#@q L$xo08 ^K_Vt~|2%M? JP9,x`] c@6 `pUU k qI@+"A :*3+h4 >CQMmgxu-_~Ov-Oz~>Χ`3΋ 8{^{^WP){g<.]#HW5s%#Dn΅n1K:@GX%Fj@K T:%}>sU$ײ%~T>fp:'."L3mGUUL:`ؖ[''GD,6hq Hv3QaQl*~Qr{.zUŨV1t[iS%4 #@V" +~:@#FD H2V{x* wDQzZd1~}am$IEup-} kl1 ( +bZ6 ^P*@>c_(t-[BT= ;`sw2  k1 `e!yѻs."T ^2dƱ@3:>MBQElO.o|ML`/?~6/ۀ+s (xt3u6tÅt} bx$&H0DdɆM)*]n4=P3P SӨ?3V8ZǔW$XU=ώl ` fPRUH@Vn `5E$UPy.n s;gG(u]`)doݟ/n|۩GZʷ}{`t*rR@Վu0F3 4tdXf^:h]֖Drx{v*F 9>Cm?md( zӨ#~u|vQ :FXz8FA3\UB@Db WbΡ@j @ W4T6 Ad\qG4ѸkgJO ?i;/N .Fcߍݴ Q/KY3@@[9$1G{H6mZk % MK#Msmtp4AUvf`7(W@(@uӨDeM:m_aM}v~4cx ŷ' ,[DVXUb(ǨE+R`@QLtiL9aNQ~+ippx Ý\>_D5ny1miyΪkK5}S Г  @J"Px) ȹ ׯ= O  \9_{wcjS'lH0|[p&8 P`')o $duk*^E[m|,|j} +` +x ~ *i@05]J@ȑb)PW+j9Js̑E_(@P;"ncbTzrZc7d(~r7 6-?/!cwV!^k@1lK j)Wd@Ag1VULvi@wHViEiS߂dw~cI]@8‡ŹtM r L  1GtZ}cCAj5*2v `M'@n"N igqzm?Zjw珷-1*p0hihw@p> uA {~w ZV0 xFv!o>4wgp<`@@uc/J[>cHћ#vp; L&R8@e!@Uu"n"' dT7q߿j<)wo?̥]{Rj/nzҪ\j@aS䟛bj(%,$)z^L9VRj6&Ы#\f Fȡam6oD7$P ު@CTy%eoa#~yJo~5  6L3ɛVBU v.YkW@u#t\Z>;*'uビ?YWz}1}</V^4~s_?1˘sNG;@`aa?`0 EUp;9yOg5i%+֒-0d1FnS#a0dxwDu/3OT*0LM FS+Ap[on BI[thh,O=b3 Ok@آDPjE bEBlpI1i\9_:\•RK烒LXu9v+\ z).?5ϹJ`:0+ `lvFJe(yTJe{pvC_:gϬuJ`6WN<À^(b`ù*@uˤ~<ՎL!`OKǥ4@[C†I`fH%97TI,>2^mT-S/m1v|T'S%È@4T h@U9+ʑruj>yWǣa.q\% \e)*N# 㺺Pj%DDX%+c!Uo> d0;r'fSJLA`RBb }!P 8u󨿂>;j'ZÎ+hsწp4@i x0pL*e TBU,)\짢t Hx1P7exŷ.ޑp]'n*{6Ϣ;bJvRO7 gpaP&`s7`tAPщlZBNL|^_K$ER>rSf;ԫQax Uz9ߚ6L!"a9q GUPhu˨/BV9*:^Ðb2s ln-  @$0F URUUbݫf_Y\3*C%_ܽ9ݒߓRߥ;ԍer'J+92=aԑmcR*w,FH7*VlUlhC0A fioU|RK$T\__3>nCg)$&&AA&֪lv4s_(.g>,sQL]Z* p66EL0*ab@Z=]+Q zGE.Y Ц D= {{e~lt}sk׻'[˖d}<<ǥ*̽{fz@zkj+\ H2% W <kıE;., ya˩6 \G[OZkvlx @AANP gu4BVaFѻ@gCYyPs DNul(&0DJJBn\F\()|$dZ9H\w0K5<_)`\Oֱ/e oSfԦc,r4@LIEe 4^fX `IfA ؑ-dIU"y1YLK=0-9QߐA`ܜ!@µ(",gO^P% [] 4~e>/H@Tp>kT`zģf>yn L"JbUU9pyҊ!^@_ w<^ _}k0'`0&*ua~iJsl寽>?mdaN5TTT'{] ;ι[''w aALWqn#we6gcuLS_\ &`ZU*h70v 6@ 4%T xg q|i#f+('bcU˿|EZ'(‧z]fnmf1J)j}E1ļa6wZ Lp %-H- SS݈jْl,ω?u9ߋDaEBS7 *FĆڲ᷀UX1ysO f@+:_Hݺ@XA#I;>hYo(qk}0fVB*8d9M'-zml<@L`xbpr: @tRԇDoTx_|]nS o1ʻjiRئ7SM ly4(WLѕ@|H S$%"~v/Q3]-d%fa _2TkgGՀ[#]͗i4@butkZQvuogQ\\^?`=q-m rZ4?`QQ{`h|P DFl(N4 W"PA,L.e],=ѴcrU}5x]qqgz5A2 2- \m "~ڔ7}(_'7w)߲߳5=Zq,y(s>w9*} &R 0/l1 XRuGׂ1R'hb`g#-gGXp-`fIUUV0khs(N<T@ Vn߈E@ǎlQE U/X;xڰ9r<x9Y=߿=k9Yt$F@ Ph@PULXp-3L*!k߰Y֫6=*vJkNQA"@?b}ݵ ^,y^?|{L3MaX[ Qp6 b%=EB@I`ŢDyknp*t{Ph:<9 KOKe;,UmTS|;7G`K@[Du{ς1DJu Z9w='o<lf`*@px5Krd$:1fP.*p JvE|x͓Oު0:\Z2Xkhՙo=ESB O,@~;B~" !i ^")NK9ջ2&}];Cȗ ׈eߴkDF8 Fj޾3@ vǢ#H^(+簣FPC+h #p[ -@&? BUU ūrWJ) {Ȁq©9U}<Pw9 2W)DMY W:1K<"XQzne?X;q E/Շ` U n@8` i&-&vچկI "JW@B/"ӧ;)_CLLLW Rwb9chOggS@>ǫL અd\ P_iv4WV;4@*_W|v d%pb0a鳐XF 8@Q d?T3D3p镣9>{S=L.b´A=ƾ~7l1,UE,@<Bk4H kIaɿ͖C['qZԁlm㴹_;H݅nA6BVVhxiu4{π1T"O_G9m>*n` x`'1 3H`"U*ѽPο *69@P@Mp* _p[w{ӻbe;)+溣~wF|dr1_'ك iEջGUxXN H)acض@~`]X̹^<=0Ú{bzztF\]{]\oNb!Wm R \51lwfIw _9f4{ς _eu2e׀dFtv[ Bn jhUU1np DDl HA* YzAs'~k[*~\9vOW/s<$?cpOksrPz` I1b&\aUOr@=}:}~}|粧|;Yr<2榭  U$-Ъ1@Ѡ uU U|O%{vR&ӼV7A$nޥˑRu04|n3?7+ն # llk :(J1֢o;3 i^WxNx3N n7(fh(Au*۵S[zO,dܨ*'O "@\DhZ߽?SK+$mx/lh"3 G@b@* (Y'-n8}*``I#+_en3V6B83%> $_lͱNh@LZ}4L +5~}&&@eLKOVt~> }c~ᬐp<"x`/!03VU5 haY Gw۩yO'~ҩɎ0+*qG5$eXM'T@4`jDP}iT~ˋ>8ٲ`[H* |h=h@M~5 =nͧM<##ayb➔>~+)Y|S/2-&Pug'<8cѝ B(WvLۦeOR;X\oB|Tp["L3ˢ\*,TI7Bk2V$ H7@Qr?y뗫//?ztΓGju21v0{!z:&j6@ ,кvs Qw7ȡzoVut!gUüZn-=b_S/+q:`wQ>f,ۮ+.GŖ/c{)|?{8nhz03,*B /kAO ?3Eݛ`D@è(P B)t0R@0o<\k}n]s=?|^=<~yiЁ`6F@ 9h74S˶md[ZH߫C}->#ɿj0: Si}VbiF]8)|DX<Zz0L뤯3U_/[VJϣpvtcz8qm  `fTLJ@`QQOH+`jÏSŰO;[Akw'\|2޶s.Dy{:ս3F/}N 1"D Wuy?{Nz1YnWFe,~zYG$ƒ-h~ܬ,bUFu3 5y`;1vv稿e>u4먯mŊ/-7 .(s@ ض=ދJ@TFU'@@Q3%&*HH ѾWrspazzIU'5}tyŬ{ܿef4ˤoGvCY7;@dM up`f(fe&UU>_z>R d/`.`O{g)\Z6) YEZm}uf4stF`Đ'&\v*1a .` r9Gl v k61@;?$<=\HN!`g"$U>Oȇw'N: Hc3$~Hegp7>Fŕ0Fh5T+ifM$0@% UU95璥^/~lJ+t5J@%D :sKQ;zg}hm}\c}f1b4gwQ P=vJ"U1 VW:ϯf"1+Ig=v;<B 0G"b[ENjD[emNTE2{,ܴfv kmEhQ!ޅLk0eg);q2> yc`&UTUL N#E'xt3 Рo8R\f+^+D?)RUXo~Ŷ#5^pَU @f=jPd@VS$ u``@(`IW$ sy\1!A^\`zN *LoVݣ grIXGcHWܮ5IDiOggS@zǫL ?   |i]& צo*UU@uǨm@+`/>wJ0Z0dXUFrՀq}ٞZ2K[k 4z(^%FJ jvew ΠtϹn\ɝPR&DFTePpPl%]m+qUЯ^qKOmaa#BZ?L ;.8#3Ef!֛תOOT_c>ʹ/ZK{)S@s /`ذ cu"=w۝}#J |(0j;P9_>|?9bWF^cݪL&bV)l=Z`t HDbo@tI7<[+<ԋ;ABmwSv|^Cd_C&݅=0زi#;k;{^svv>2G%D@*qvt}Xqmm`&U(䵭W$hDQ Qč+ 'Sgwm͵0t_>|ÁvHf||73KQǷK֧s-ݑ.S;N'^۽ SgmLe#1,l"޽&,X:$J lOw#e^Ŗ/d_~@P: έ8aŪzs0Wljڴߊf*7 V=xQĨ OZuo4'9WN –zFIP%44b[6`wj5") +Qs@=jp&Nf=]|04yWIXpS$;ӅYpFY/@,Sm(Qo*pz|QMѯZ7cG3(@TUN靱!Eo@@R48A\]R٭ƥ貑`Wv$wٓ/ie5aȶv}+́vtA<P%+UUSe4 0é@sձx@U(⋈ȡ@գ_.η(;*cVkm~\{e[KOQJVK@* 5 `Q[2qg*dd8ʿ.^&Z_*%~!iv$)CQ(Ey Ѽ>\eXLzhnZ,[ Y "8vY_PBnhwtN\ p["(5PUUP@S̱bf?U|zH-z>z~8/{sq* j}HTdJIMb PSj @ ^(prU Esܮd!/.=`.J!/6X2xIjZ.?ǮGKݐ#h1 p\(}`,Q@V́W2=F}Dj|:b; E5XUUU(g7@p" ES;sպ=߭ȗN|zſ>>χlCY0!w7T@0Z )pCMPN$5@hU[jvǮ=YW9ucU*"Muo^Yo\-#e!W&.Dȹоme[dXVv\ 9bDs 'gu,Q_pQ_ *=Zx,BJJU1P X%!+Xj2q:^[83 L {UJu\kfXЕ=ٵi fO sRTF^zmW#Dt4$vuk+blWPHOAB`kX؄îd~0@7%b9>0 [ą=`oUo*й6HWƐ@&WCqyc;q RC69;Ç<u| q,*$tNtQ֟[;ʕ|vWj^7;7nUW'{әɇQ=h u$ܓP$(}.@B*S(WB` Q 1F*-T-,0wڭ\y 9?N!Dvbq;ng$o9@^ ޵qC4CB0? ]Tx% Y]o 2p6B8(c`ŷRPU,"\&SCm59R;^p0K=c+- Zno}r^m>M+R kVm`9 @fi2 @&U`o#AR/ʏĦ{WcV誶ˀqc^AARxj&X06.:NZu`qkK;|܂V];Q mhlw2A/W Kۨ T7$b)PU!;q;/?%+>~OC @8iVi8~r/nSڱ_1mMixL! , .Q&D/2@_U.Gm<^ 6${NC]m"['56:l 6k߈V Q{.M + \Uu8.\E_ &| vY(rUԾ*<Ðk=jj1e$,2, X\R+"!t& g7'Iv]"T(ռG\M &uq cVMޯsyfG( `,sPUz(fRQ}sȏ37c9S&Es'N~)9A¨RP`#Oa y Ռ$ծmt}\箭#:KcJ:mm@2_w䩍V%o>_#0`UUOggS@ǫL퉇Y"  -d\CC3PXIw<{=9zg R`Jlv T IUU@dE%I +d3;͓6D*Ej w$R0ʣ*xh2rB?d%ս83@)6.\n[s!j^uKzgn}X?:v^a[eĻJߩ IU|}ҷ5)t>-A'G&9*LlIw@כf,Ioܐ-P;nJ3ķk)Pdg6߳&wz9]``{zr$7Á}eI_z!+lI D [ovސx$ ,bj0rU w 0"@mKf;\w"!bYޟxݎGӂ9?Ƥ}uh~q5a)sq?uq-ep'tF]RLê.Æ%pfKNYz@o}a,]:Rb..-wa|_ 3 qCFB^Ҕ|oApcof?KbW_,F3:Ϩ  =zb,@J=W r夤8::lZ֏t!r>E"*J_#b>ķޯejzJB"'} PݛUbdM :0VUM[NR}`)2Rj>ZyՙvTM0>jA4qZͪR@TH 'p0_2@@m÷J*%Vh;G\R Kh~BRJTCB_BT0L8ͶxjDŽ76>ݵ4}3*ҍ([ 4Dsx Kηw3˳w=JV5R-pipCj@P&f050 k@HVAQkyGr.z."$ {-JHEdS<\ϦLYEt+9X9Rs@5 i@յDXr~ ?>t ,8}Ъ$YqjACyzq8NMy}Qk젧s_q~p{9E W/ (rX%ЎvB[WQe&>fI +1r]+0,dN@FFOsioCLmR)J}!Dz䪄4 "i;;K =+Zd6H8GwlYo$|1-O#`VD6E YP\ϸ}?_n:o?}8p:gҩOҗ1ͽV2p<U;r8P89 *a ? r 1'D^M"aىLgExܶn m$lU7u71mry>ӦSaeEI)ڮJʏ]U;n_ozd@oAqCޝHaKl9ֳKzmZޕ]w 4iǛ]Ko\_>%$́5PR xN=2,Ĕ|rzhX e5E3/W{M#G`'[h &\4y_nfC$<,#gcxW{3+16q#5~U$ܤk3TiM8E\~b[\ jǯ7Eaڑ6]o (7GϪ![;jy>(w4gkf+PUU@Q2j \_ʼntSr<ջ4F v+  S{jX^` `,0JK3msNK&Lp0[>כ-Di(P _!VٖP  ݩ;Υvg Ғ:LULc+*:LRX-o>kKפ_/<=b T\U4: `q|.{|LPy*Ƶ[v𠵯?|{Vsq5ff,L 9]?f ̫Ji@, Hr`&!\#c!Z[[%Mxع*' )' vK^TJVɐ;enn=mdLKZ#fyP0>\M_ rs(&`V\BUMhEɻvlbkʟ8xbѤJeS[Tn缜ݟeLW8#\,%p6C`{N(Sl aAq 4dQc^|,]w՝ RzE2ֹ[ ԕw=Dbdƌ\{'ЉLY~]/< \ǎUs&D[َCDwBb\Mxb҄)[KOـ[5 t*VUJx|. )vhs}gōcxO3Z/X{ 8䌤P t'4k' <]]Ӡi|C=fc M'(5:oDxO j@_ 1G;9Nr=rqEA Sar*䴀2v9@}Ri#OggS@ǫL@&   \]o <ᩱ\nMo돏2Vb1gm}C\UUJ^$:@ QHAN=(^mNgw>xto119WЀVʀ`@0PI֫R*@@z`j GG"0A|썻?UFB ZiL&)#J~KVv}=OR+h=p5m'@;Ex'ׅܙ4ɶ >1;4"tzC>\ Z>0roz,[p *g }TՐ$TUv؜.w0>mWŴNkΕyZf*AP7 T9MA& x;({k\A`CzV]v!NxQ]qIo#nl$0=+!~C0lbXA?_)_KZ"1 F7=nun*> 򅬏W6yCD**9tc4GW4@Y\8Gb0 dۼe֎oR2Q@_K/9FS: }FkQg4M Iד#zw&[gȒ%,!,^ .r#)[2X, ;yfOOȲDGEK}&ҮBd?{Po<ub5>\H`u}yJ@K?|^;ρhZPUux#񘷽OoOX9]ט*]p,GS̴ pr ~ZLD@#*@WU)g*h1yo*@\wAh@Gj0*D @SzT/Z[ a>o߼|Vtx{o}rAT;gQ P“@> *ܡ8(\W #gES$|xc].p¢F:M;UN>[Fl[~wԸFV^;c`-`VhUsXUUA+@pˏU{7(V8_1K5ڱV0dؙ0PAr_@1#u/=!{ӛb8:xuDtam_|yԉ WݱGc0zleBHYk.(HПPofN '?3noH (_~cωo W,VU+Q'`QN0/K;ۊqOvy͘]ykk0' &믜 O\e4@B d C(Mgr%4YQ)ř$FJtFGw:'x۟~fWꗞJI$U6 kKig>I*LPS9wܾw5w_1}ڱK[FgHߌՙ (4>Wˡs%,9=^ TFh`.QUZRmv̭~wV?.^XZs~607Ws.nRZ H}D 1UFJ-M  !pLWuq\SJ{bdk?9ӆ<..[#~9? UU0ȋ1_k6' 2q]zAvo!o3Rꦖ)KV3iYrXm-{IȽRvӹ:е{E(+$19L ۅp`{c.:\oH!_9!Ľ<#¶_O֮.IqA Ȓ~z #VIjB|Sk^ܤ?2њѐʵj8􆪷#4a8! ^xP7hx!oto>0vtN\ 0hUPUp9s}~/lo _s^7S2__x8u2ww~j;JW)$L J` %\^ ɩ.eAv52 ;z )+ My83+W Xl,GX߿^cuE/nub6QwP;NӪ] Τ \X.O>ko]o8|yjAs`3:BPIUUИ/8T|狘}E):kۚsffhV*w5pP@y %`df",J^|pJ\KZ @AXw1V.~6!ݽU*<o:|5-^KHg,q?z63b(lb<޺$?v&L6 VA }r:(7IBU`/ߝٌo߶?[m;SX;PsIk Uu *ƞ]DvFdr4r*bHj`ٍѸ6/!;tGᔘ^l{Žվݢ1**|*@bl'ok:%Y+y")lruf!ݫP0T޵(>F}Q_cۀ87\(w.-Hd%TZ@5R_MoߘA]>fWLPtrHn+rZᰈha+*m4Iqz|wYKt0dk]fbadʬ+;HV:*=ɊeJ;Ib 6̴ Hv }ԫua:/Z޺xYoc,y5}%.c$*!AU*am=ϷFO?x֔ڹLWXjjd OgvUdV-$`q  ]EVL9 *J`(H _q[]3t i2p+]#BXU?u>ΟlB? 5~8l٣v Wb\kŏVY.XNpMOfۻOggS@BǫL \<㻮9V -c `PV=9KUUUɣ폝IL]y6,7  iU`IS8K,ZHq` LHqB,89`( uUq`CzZ,:r)[K$0`IH7zsK5+٠b9 UU=&0sׯtzf,XtO+3`N* UU>@Sc}=ԃ^Omr͕<GL&\/Nxo8}-YelԢr3(rB(,`V؃IH @F$[`Qғeua/{wOWK"G[d&<c*y*($loŽB,rG H;T#[aTLGٱ0ܨL$]LG]İ^)8 Aom)BXfnݔ|EG=MSN?3j.PJBL0EOzau ^58\&rKl0wBW - Xqa\;y#Σ>׿Zr/P}v(ƞPW]`̈́!L9?ydq9,k7|`Y?S-Ģ2r ((] Q՛MXr{koXt s Z4hf]|{.K|tY߾)zc`uh brU/pmoq5 :.c#/oZw͇i5cӲe'|+cCUUdg̸Y9k0w]y.c, t|sAͅQc~F19>Fս&}Z85^;.g P’+#}XA P pX=cE{{!=; fDCO13pj@wȋ.ʫN@'@ 1L$&]ӝY՞ i ps2ᴆàFm|e{z/HReEɣh.qio׼Jώ}HYܦom~prAJXz)rTha#UU!X8\zuzѦʃ۟o4뷫Os7rM|spcܫ(RĆtf-*!]4T$K:w$b .#Ң:|2aRRJ )K˻TTRَ<<>G\ԘNպ&O$RWfm? Q'U;ZoYɸ]^ڻj(c۵~ұ7oB0Fd 1Lùeӯ9Q5us}]oPTK;݁r):JQ#]+!u%u>{=ٞ  X`8`7Pb@%:Pz& )@ ;\cAPo~d$^{#/r{Ʋc)JJEK_K$a^K˓#$3R<NfʣavsuOZRݝ7jy2ہ.•ĠF>|]ׯG0]7. e96eTUBnm~r{96F~=l zi`rΐ.grU6\ k܀P@.:gL<༡צ ‚'e/f՛2HgO>~.<<_UZ5fҭT=P|G "Y}Ք9"{GeΖ->ަo8V’K}5eB udV *xMc;^]:iZ0KWU ~m8?ٮ'{ YU+Cv#e\٣Mjb >|^_9zJK>[WK 1znrFGblm0ebf~Nʹz>pFَTYmkA ^r0=j7zP2@i /a[O00L=.Jwݩ&LR^Xki=QLgS2KZ1}vBKZ6#2wy>sц˔97)%BnI\Uw(ߵqJ@=YFiD@_5wڪVxcjRڢnRf&EO P@ 2} Z(MqK0hhX|^ڷm 7D%mb趗ѩJ e'[{>>'mS 򋤊zdP/2w8CQ$v7, ĵ*LP܀3 |'@`CT,>K떺LD> 6~-Nz}T~ߩ{{ Pmҫy?2BP7*SYB3V@6=&: NQ%dy-z>E0cwݡΉ( >|\7F a6kX,zG(P%UUYPM魗2^qg3XMBe:4]` 4ves@< MFVaƽ&,WI#QT"X"0<^y6ՏLmkǪ#{"%XOoSdFܤi|+A(}QB/LqX@OggS@ǫL2t   >oT#,Mv, CgfgDJpUUx(zLu2q4ILO{BWMΛNlfځa@Ӑ2֘mg*8tMןi3,]2^>׹dGOpQ|lcӓ'F| ccKG?2w1.EmvXR?T$;N!ia^iq %_e0c}`HF ={l AzB37Opikh$ T\SP05`ixM ,@78&|N'B>[ŠԻ7ALeij+712%ُ,DԾGë2}OTk*̓;T\wzx˼vOr4![3=2>|]ʷ b,o BЙ=F*b=s vwX PSzI.8v ;0i  B7W # 쪾7従sTTƕU[+Ʉ)dd&u7]ӽ^0?բiB!嘳K{[<$oz[/,5}ĝG}zMt [0l|oӻ2u@%}k P7+ FɈ2CŪ*S|^?-tn?|2cn_1َζzmc@PC&3Z_-=-%h <`r}Rpu.$S>_!m.xn#-@Ȗc 9>oa@Xm0v^zDUf5TUPp's3|6}]_{nQCR*:cg{yY4]hq EYDē1yDˊaQz՘(j`=DuEq=#wXu?e KWۻ8Vrq/JgolR?'LGE#BdޑȏW_i9L&/|z0W#ՆNdݢVCu>|^ሠ c~#K/*אPUPeLe{4_w 25QaWa"bf3ܛc` 1$ 4QlᓂI v(glø[}:&ۨj\TQYF~;dY^paG'™讋Tk}9] )]\!ŶZqzW+E耼K$P#p0J>9[C<%GXs[B=Ig l( ms9-t~kO؏c&r:[v>swc@P4@:M0*K4M8b&nax9aS;lI!6?S~=:> v->:H=1v?|X=ߛc[(,}z03{xώ.T[n /7UsèOv>ܖo׶|+!K23UUEʓLgj]\<n&RLSLAQgLsojKɉh0if7+pb5 jN33SM*e8Փ΋]M"íMs3.'p1mcC_XIRQ/IA'2L="ۅXyNr3}A p0` >o6} `,XCha &s۸}|<Ňyȸ1;gY§E_rՓd&I1gLڜzcc܇1Үt2T-]3LO͆ݟ%?sX9"Dr3t-etVMbx^n6^Eta?k{߇؀ La|>m7 dv.=tm>oaXg뿅ғAg&WUUUa1p_?~]F>>sֽ>'CkΨvyj Do$C;ɹ?s?מ{>&\Q\PIz$ߤ{ +7nȷR'ɽs̝\SwgeTJͣ?vg3hiHƓ7#mOGJ=Tή 뇋ZVǺ5#IᚱgئiW5io8 >oX`JfψBU*f&}Cuz_3iɿh*ue[50$TvΚI:{_mY[W\ ujOu,{% ,6uώ̮]&obO0Z8IFVẃ&]&{~~,$u^M&˴NNڴ ?m^;/GF)A2m4<Q5]uN >o@X=3#B g{è=ÿ\v*oǯ'fYgOԻsFc:d<)c~mwSNvg+6֞7's}lKgρK$]]AL {n`!J.FckVˌFoEci'WF- wd0Gy4r imMņ^]r-8kढ@ޘd } >ڦoXJffF*;g쵉Ys}sLOCoNzz'M;*9әyIzX+;!3d]{6]֫EEƴu{wvNGT3s&>NB*H &'iѿ1.mg9 ص˄W&ڜ_HWusabK;"Ek׭n\uZ, >ٺo@XRH=333RU fv]s\jyltsM=:p&e*9}90m]ݥ? MP3j{\@fuvEm,wOծ;]ézxPkr:P %V-:;L}XG>O. +ԝM\zjWKU';Y9ZQWa^oZ5:g70_a5(TUUU0L;Ts#C[Osknd'ڳf#s߹9c읓ʩs;~\WdO7'L<ɓL@6jߟs19yft|7zj*9TDW=KN{ ˾edl!b#ĝCM7r{;UeTx-@>;M*ie1Oj#mcH7wXφ G >80/QTB UUU(G_Ӫ t:gR==8t 鷒=#w+H]{zݻULs:E鼋χ9bJr/́j5)MNW~3?vMm~ܹϙL>@TYvK€ĩ3/z]H7?dF$VCgws<2{i>oXk[ `P233SUUUfl΅ҒyR|-y<*OS hP7W C"I CId9*SU5 w胧3hM9:xrrhߐy I-R2F@嫷Wq;-Xi?QK.͎ӿW1o'jw&v,ߥg=hYKw]HQ#:9<+Π2OggSǫL   >/(<ӻ0F=ʤSSUU``H;֡E殨ՙ.a_>3̔j8S}6>]9}= u>>Yv4|Mj39ݰ);rg6;A1{ 6t-zOa'ɃeM[u^%Xl@yIq_N:9)h:<6F͋9UgL'ֶm8h"Ŗ9~ͅsh>0o*FBP{:N UUU!iIYOusejA(h7ѐk}&Ŝ%wg߿>ΌG#B3 {\3]ozf7W_=uC6=Z*$TSmh(# €K5%>u']ǘ[rľ-W/_"_UTXםgc {a[51uZn&0;mA9:ݻ@Xc[߅#:YB*V0Gl,WL9ϕpv2~nf5pSYNiK/N΁ɚy#> vC 猦Ӥ9غ~.`?d| ~gUJJ8ł;CY=w\rJ?i-ź{]);N%g)xc5u(4XC:f>8<˻aJvg<4TUU4=<;l> v>ўJɾ]f _o^w{}?pٮyf,K2}9m&xv6RdYnn+4_dO0՚Hů_a8]9Y]5L?)Hqc'VB6ϋeImg^bOyi2 +bG!nQ-u_ Y;Yڞ41:P`,A1A,3GO*XUU`klqʯV){yPEʔQEF3b|' uWJwaɊkbs2h{q3!xm߿ssm =ߧ+|vDXAv{m̋ed _S~Ν[d!TR}i[Dy[d곲LͨP.Ż{d8փi=EեuwLi0d0>o@X`dҙ\B,Zj߄@ ?د? Y> aRٚTDgtq̄3gyNa-ڛh*J )fjj2M(JtNb6Hmp se,qx)"bٝIFޜI$+Qo z1oq+=!Yv\e=vj#R7qoz*ψi1@>o:KfDGHN {Q) zG;y07U}a}]Ys5y 5TrjeexڔQkfpd:[$Ԇv]CaϨ}>1d]L`wקҳ2H7<t//=1n]-DΥ7WhQ>JW,8y:s߿2i4yM5X 8>_AĸXrmttFTUUE A&}cWf,`z}}%kyg}_ϻXՏ_f *C%ȋU0ZuYUy<UL|}|H^...jTm|ay奾hK}rS/{"XimWnT͆E`<=g2ipmsg-0.9.6+dfsg/src/000077500000000000000000000000001126724573600146215ustar00rootroot00000000000000g2ipmsg-0.9.6+dfsg/src/Makefile.am000066400000000000000000000032441126724573600166600ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ bin_PROGRAMS = g2ipmsg common_sources= \ compat.h ipmsg_types.h \ ipmsg.c copying.h g2ipmsg.h \ support.c support.h \ interface.c interface.h \ callbacks.c callbacks.h \ hostinfo.c hostinfo.h \ msginfo.c msginfo.h \ udp.c udp.h \ ipmsg.h private.h \ common.h msgout.h \ message.c message.h \ userdb.c userdb.h \ protocol.h protocol.c \ codeset.h codeset.c \ recvmsg.c \ logfile.h logfile.c \ menu.c menu.h \ fileattach.h fileattach.c \ tcp.c tcp.h \ sound.c sound.h \ netcommon.c netcommon.h \ fuzai.c fuzai.h \ uicommon.h uicommon.c \ systray.h systray.c \ downloads.h downloads.c \ dialog.c \ cryptcommon.h \ util.h util.c if OPENSSL_ENABLED common_sources += \ base64.h base64.c \ pbkdf2.h pbkdf2.c \ symcrypt.h symcrypt.c \ rand.c cryptif.c \ pubcrypt.h pubcrypt.c endif if DBUSGLIB_ENABLED common_sources += \ dbusif.c dbusif.h endif if GNOME_SCREENSAVER_ENABLED common_sources += \ screensaver.c screensaver.h endif g2ipmsg_SOURCES = \ $(common_sources) \ main.c if ENABLE_APPLET bin_PROGRAMS += g2ipmsg_applet g2ipmsg_applet_SOURCES = \ $(common_sources) \ applet.c endif g2ipmsg_LDADD = @PACKAGE_LIBS@ $(INTLLIBS) g2ipmsg_applet_LDADD = @PACKAGE_LIBS@ $(INTLLIBS) g2ipmsg-0.9.6+dfsg/src/Makefile.in000066400000000000000000000540501126724573600166720ustar00rootroot00000000000000# Makefile.in generated by automake 1.10.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = g2ipmsg$(EXEEXT) $(am__EXEEXT_1) @OPENSSL_ENABLED_TRUE@am__append_1 = \ @OPENSSL_ENABLED_TRUE@ base64.h base64.c \ @OPENSSL_ENABLED_TRUE@ pbkdf2.h pbkdf2.c \ @OPENSSL_ENABLED_TRUE@ symcrypt.h symcrypt.c \ @OPENSSL_ENABLED_TRUE@ rand.c cryptif.c \ @OPENSSL_ENABLED_TRUE@ pubcrypt.h pubcrypt.c @DBUSGLIB_ENABLED_TRUE@am__append_2 = \ @DBUSGLIB_ENABLED_TRUE@ dbusif.c dbusif.h @GNOME_SCREENSAVER_ENABLED_TRUE@am__append_3 = \ @GNOME_SCREENSAVER_ENABLED_TRUE@ screensaver.c screensaver.h @ENABLE_APPLET_TRUE@am__append_4 = g2ipmsg_applet subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/macros/ax_prog_doxygen.m4 \ $(top_srcdir)/macros/g2ipmsg.m4 $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @ENABLE_APPLET_TRUE@am__EXEEXT_1 = g2ipmsg_applet$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__g2ipmsg_SOURCES_DIST = compat.h ipmsg_types.h ipmsg.c copying.h \ g2ipmsg.h support.c support.h interface.c interface.h \ callbacks.c callbacks.h hostinfo.c hostinfo.h msginfo.c \ msginfo.h udp.c udp.h ipmsg.h private.h common.h msgout.h \ message.c message.h userdb.c userdb.h protocol.h protocol.c \ codeset.h codeset.c recvmsg.c logfile.h logfile.c menu.c \ menu.h fileattach.h fileattach.c tcp.c tcp.h sound.c sound.h \ netcommon.c netcommon.h fuzai.c fuzai.h uicommon.h uicommon.c \ systray.h systray.c downloads.h downloads.c dialog.c \ cryptcommon.h util.h util.c base64.h base64.c pbkdf2.h \ pbkdf2.c symcrypt.h symcrypt.c rand.c cryptif.c pubcrypt.h \ pubcrypt.c dbusif.c dbusif.h screensaver.c screensaver.h \ main.c @OPENSSL_ENABLED_TRUE@am__objects_1 = base64.$(OBJEXT) \ @OPENSSL_ENABLED_TRUE@ pbkdf2.$(OBJEXT) symcrypt.$(OBJEXT) \ @OPENSSL_ENABLED_TRUE@ rand.$(OBJEXT) cryptif.$(OBJEXT) \ @OPENSSL_ENABLED_TRUE@ pubcrypt.$(OBJEXT) @DBUSGLIB_ENABLED_TRUE@am__objects_2 = dbusif.$(OBJEXT) @GNOME_SCREENSAVER_ENABLED_TRUE@am__objects_3 = screensaver.$(OBJEXT) am__objects_4 = ipmsg.$(OBJEXT) support.$(OBJEXT) interface.$(OBJEXT) \ callbacks.$(OBJEXT) hostinfo.$(OBJEXT) msginfo.$(OBJEXT) \ udp.$(OBJEXT) message.$(OBJEXT) userdb.$(OBJEXT) \ protocol.$(OBJEXT) codeset.$(OBJEXT) recvmsg.$(OBJEXT) \ logfile.$(OBJEXT) menu.$(OBJEXT) fileattach.$(OBJEXT) \ tcp.$(OBJEXT) sound.$(OBJEXT) netcommon.$(OBJEXT) \ fuzai.$(OBJEXT) uicommon.$(OBJEXT) systray.$(OBJEXT) \ downloads.$(OBJEXT) dialog.$(OBJEXT) util.$(OBJEXT) \ $(am__objects_1) $(am__objects_2) $(am__objects_3) am_g2ipmsg_OBJECTS = $(am__objects_4) main.$(OBJEXT) g2ipmsg_OBJECTS = $(am_g2ipmsg_OBJECTS) am__DEPENDENCIES_1 = g2ipmsg_DEPENDENCIES = $(am__DEPENDENCIES_1) am__g2ipmsg_applet_SOURCES_DIST = compat.h ipmsg_types.h ipmsg.c \ copying.h g2ipmsg.h support.c support.h interface.c \ interface.h callbacks.c callbacks.h hostinfo.c hostinfo.h \ msginfo.c msginfo.h udp.c udp.h ipmsg.h private.h common.h \ msgout.h message.c message.h userdb.c userdb.h protocol.h \ protocol.c codeset.h codeset.c recvmsg.c logfile.h logfile.c \ menu.c menu.h fileattach.h fileattach.c tcp.c tcp.h sound.c \ sound.h netcommon.c netcommon.h fuzai.c fuzai.h uicommon.h \ uicommon.c systray.h systray.c downloads.h downloads.c \ dialog.c cryptcommon.h util.h util.c base64.h base64.c \ pbkdf2.h pbkdf2.c symcrypt.h symcrypt.c rand.c cryptif.c \ pubcrypt.h pubcrypt.c dbusif.c dbusif.h screensaver.c \ screensaver.h applet.c @ENABLE_APPLET_TRUE@am_g2ipmsg_applet_OBJECTS = $(am__objects_4) \ @ENABLE_APPLET_TRUE@ applet.$(OBJEXT) g2ipmsg_applet_OBJECTS = $(am_g2ipmsg_applet_OBJECTS) g2ipmsg_applet_DEPENDENCIES = $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(g2ipmsg_SOURCES) $(g2ipmsg_applet_SOURCES) DIST_SOURCES = $(am__g2ipmsg_SOURCES_DIST) \ $(am__g2ipmsg_applet_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkgdatadir = @pkgdatadir@ ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ APPLET_CFLAGS = @APPLET_CFLAGS@ APPLET_LIBS = @APPLET_LIBS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIR = @DATADIR@ DATADIRNAME = @DATADIRNAME@ DBUSGLIB_CFLAGS = @DBUSGLIB_CFLAGS@ DBUSGLIB_ENABLED = @DBUSGLIB_ENABLED@ DBUSGLIB_LIBS = @DBUSGLIB_LIBS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ G2IPMSG_CFLAGS = @G2IPMSG_CFLAGS@ G2IPMSG_LIBS = @G2IPMSG_LIBS@ GCONF_SCHEMA_CONFIG_SOURCE = @GCONF_SCHEMA_CONFIG_SOURCE@ GCONF_SCHEMA_FILE_DIR = @GCONF_SCHEMA_FILE_DIR@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOME_GLADEDIR = @GNOME_GLADEDIR@ GNOME_ICONDIR = @GNOME_ICONDIR@ GNOME_PIXMAPSDIR = @GNOME_PIXMAPSDIR@ GNOME_SCREENSAVER_ENABLED = @GNOME_SCREENSAVER_ENABLED@ GREP = @GREP@ GST_CFLAGS = @GST_CFLAGS@ GST_LIBS = @GST_LIBS@ ICONV = @ICONV@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@ INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@ INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@ INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@ INTLTOOL_MERGE = @INTLTOOL_MERGE@ INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@ INTLTOOL_PERL = @INTLTOOL_PERL@ INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@ INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@ INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@ INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@ INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@ INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@ INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@ INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@ INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@ INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@ INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@ INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@ IPMSG_EXTERNAL_CHARCODE = @IPMSG_EXTERNAL_CHARCODE@ LDFLAGS = @LDFLAGS@ LIBDIR = @LIBDIR@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ MSGMERGE = @MSGMERGE@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKGCONFIG = @PKGCONFIG@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ PREFIX = @PREFIX@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SYSCONFDIR = @SYSCONFDIR@ SYSTRAY_CFLAGS = @SYSTRAY_CFLAGS@ SYSTRAY_LIBS = @SYSTRAY_LIBS@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ gladedir = @gladedir@ host_alias = @host_alias@ htmldir = @htmldir@ iconsdir = @iconsdir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pixmapsdir = @pixmapsdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ common_sources = compat.h ipmsg_types.h ipmsg.c copying.h g2ipmsg.h \ support.c support.h interface.c interface.h callbacks.c \ callbacks.h hostinfo.c hostinfo.h msginfo.c msginfo.h udp.c \ udp.h ipmsg.h private.h common.h msgout.h message.c message.h \ userdb.c userdb.h protocol.h protocol.c codeset.h codeset.c \ recvmsg.c logfile.h logfile.c menu.c menu.h fileattach.h \ fileattach.c tcp.c tcp.h sound.c sound.h netcommon.c \ netcommon.h fuzai.c fuzai.h uicommon.h uicommon.c systray.h \ systray.c downloads.h downloads.c dialog.c cryptcommon.h \ util.h util.c $(am__append_1) $(am__append_2) $(am__append_3) g2ipmsg_SOURCES = \ $(common_sources) \ main.c @ENABLE_APPLET_TRUE@g2ipmsg_applet_SOURCES = \ @ENABLE_APPLET_TRUE@ $(common_sources) \ @ENABLE_APPLET_TRUE@ applet.c g2ipmsg_LDADD = @PACKAGE_LIBS@ $(INTLLIBS) g2ipmsg_applet_LDADD = @PACKAGE_LIBS@ $(INTLLIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) g2ipmsg$(EXEEXT): $(g2ipmsg_OBJECTS) $(g2ipmsg_DEPENDENCIES) @rm -f g2ipmsg$(EXEEXT) $(LINK) $(g2ipmsg_OBJECTS) $(g2ipmsg_LDADD) $(LIBS) g2ipmsg_applet$(EXEEXT): $(g2ipmsg_applet_OBJECTS) $(g2ipmsg_applet_DEPENDENCIES) @rm -f g2ipmsg_applet$(EXEEXT) $(LINK) $(g2ipmsg_applet_OBJECTS) $(g2ipmsg_applet_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/applet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callbacks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/codeset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cryptif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbusif.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/downloads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileattach.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fuzai.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmsg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logfile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/menu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msginfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netcommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pbkdf2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pubcrypt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recvmsg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/screensaver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sound.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symcrypt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systray.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uicommon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: g2ipmsg-0.9.6+dfsg/src/applet.c000066400000000000000000000230151126724573600162530ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" GThread *ui_thread; GThread *tcp_thread; static GtkWidget *applet_p=NULL; #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) static void g2ipmsg_applet_preferences_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { dbg_out("here\n"); on_preferences1_activate(GTK_MENU_ITEM(applet),NULL); } static void g2ipmsg_applet_security_preferences_cb(BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { dbg_out("here\n"); on_menu_security_configuration_activate(GTK_MENU_ITEM(applet), NULL); } static void g2ipmsg_applet_new_message_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { dbg_out("here\n"); on_startBtn_clicked (GTK_BUTTON(applet),(gpointer)cname); } static void g2ipmsg_applet_download_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { on_create_download_monitor(); } static void g2ipmsg_applet_remove_window_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { dbg_out("here\n"); destroy_all_opened_windows(); } static void g2ipmsg_applet_foreground_window_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { dbg_out("here\n"); present_all_displayed_windows(); } static void g2ipmsg_applet_about_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { dbg_out("here\n"); ipmsg_show_about_dialog(); } static void g2ipmsg_applet_showlog_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname){ dbg_out("here\n"); show_ipmsg_log(); } static void g2ipmsg_applet_fuzai_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { GtkWidget *window; dbg_out("here\n"); window=internal_create_fuzai_editor(); gtk_widget_show(window); } static void g2ipmsg_applet_zaiseki_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { dbg_out("here\n"); hostinfo_set_ipmsg_absent(FALSE); ipmsg_send_br_absence(udp_con,0); } static void g2ipmsg_applet_destroy_cb (BonoboUIComponent *uic, GtkWidget *applet, const gchar *cname) { dbg_out("here\n"); cleanup_message_watcher(); cleanup_ipmsg(); release_lock_file(); } static gboolean applet_event_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { dbg_out("buttonWin: button press: %d\n", event->button); switch (event->button) { case 1: on_startBtn_clicked (GTK_BUTTON(widget),user_data); default: return FALSE; break; } return TRUE; } static const BonoboUIVerb g2ipmsg_applet_menu_verbs[] = { BONOBO_UI_UNSAFE_VERB ("G2ipmsgNewMessage", g2ipmsg_applet_new_message_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgDownLoadMonitor", g2ipmsg_applet_download_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgRemoveWindows", g2ipmsg_applet_remove_window_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgForegroundWindows", g2ipmsg_applet_foreground_window_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgPreferences", g2ipmsg_applet_preferences_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgSecurityPreferences", g2ipmsg_applet_security_preferences_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgAppletAbout", g2ipmsg_applet_about_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgAppletShowLog", g2ipmsg_applet_showlog_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgAppletFuzai", g2ipmsg_applet_fuzai_cb), BONOBO_UI_UNSAFE_VERB ("G2ipmsgAppletZaiseki", g2ipmsg_applet_zaiseki_cb), BONOBO_UI_VERB_END }; void g2ipmsg_start_btn_update_tooltips (int num) { char *tooltip_string; GtkTooltips *tooltips; if (!applet_p) return; tooltips=GTK_TOOLTIPS(lookup_widget(applet_p,"tooltip")); if (!tooltips) { err_out("Can not find tooltip\n"); return; } GLADE_HOOKUP_OBJECT_NO_REF (applet_p, tooltips, "tooltip"); tooltip_string = g_strdup_printf ("%s\n%s %d", _("G2IPMSG Applet"),_("users:"), num); if (!tooltip_string) goto tooltip_free_out; gtk_tooltips_set_tip (tooltips, applet_p,tooltip_string , NULL); g_free(tooltip_string); tooltip_free_out: g_free (tooltips); return; } static gboolean g2ipmsg_applet_fill (PanelApplet *applet, const gchar *iid, gpointer data) { GdkPixbuf *icon_pixbuf; GtkWidget *startBtn; GtkWidget *image; GtkWidget *hbox; GtkTooltips *tooltips; char *pixmap_path = NULL; int rc; if (create_lock_file()) { return FALSE; } hostinfo_init_hostinfo(); syslog(LOG_ERR|LOG_USER,"Here\n"); if (strcmp (iid, "OAFIID:G2ipmsgApplet") != 0) return FALSE; rc=init_ipmsg(); if (rc<0) { syslog(LOG_ERR|LOG_USER,"Can not init %s \n",PACKAGE); return FALSE; } tooltips = gtk_tooltips_new (); hbox=gtk_hbox_new(FALSE,1); image = create_pixmap(GTK_WIDGET(applet), "g2ipmsg/ipmsg.xpm"); gtk_widget_show (image); gtk_box_pack_start(GTK_BOX(hbox),image,TRUE,FALSE,0); gtk_container_add (GTK_CONTAINER (applet), hbox); gtk_widget_show (hbox); gtk_widget_show_all (GTK_WIDGET (applet)); gtk_tooltips_set_tip (tooltips, GTK_WIDGET(applet),_("G2IPMSG Applet") , NULL); gtk_widget_set_events (GTK_WIDGET(applet),GDK_BUTTON_PRESS_MASK); gtk_signal_connect (GTK_OBJECT (applet), "button_press_event", GTK_SIGNAL_FUNC (applet_event_button_press_event), NULL); g_signal_connect (GTK_WIDGET(applet), "destroy", G_CALLBACK (g2ipmsg_applet_destroy_cb), applet); panel_applet_setup_menu_from_file (PANEL_APPLET (applet), DATADIR, "g2ipmsg.xml", NULL, g2ipmsg_applet_menu_verbs, applet); /* Store pointers to all widgets, for use by lookup_widget(). */ /* Note:They should have same name of initial window. */ GLADE_HOOKUP_OBJECT_NO_REF (applet, applet, "GladeParentKey"); GLADE_HOOKUP_OBJECT (applet, hbox, "startBtn"); GLADE_HOOKUP_OBJECT (applet, image, "image3"); GLADE_HOOKUP_OBJECT_NO_REF (applet, tooltips, "tooltip"); tcp_thread=g_thread_create(ipmsg_tcp_server_thread, (gpointer )hostinfo_get_ipmsg_system_addr_family(), FALSE, NULL); start_message_watcher(GTK_WIDGET(applet)); applet_p=GTK_WIDGET(applet); dbg_out("applet init ok\n"); return TRUE; } int main (int argc, char *argv []) { GnomeProgram *program; GOptionContext *context; int retval; bindtextdomain (PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (PACKAGE, "UTF-8"); textdomain (PACKAGE); context = g_option_context_new (""); program = gnome_program_init ("GNOME2 IPMSG Applet", VERSION, LIBGNOMEUI_MODULE, argc, argv, GNOME_PARAM_GOPTION_CONTEXT, context, GNOME_PROGRAM_STANDARD_PROPERTIES, GNOME_CLIENT_PARAM_SM_CONNECT, FALSE, GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR, NULL); retval = panel_applet_factory_main ("OAFIID:G2ipmsgApplet_Factory", PANEL_TYPE_APPLET, g2ipmsg_applet_fill, NULL); g_object_unref (program); return retval; } g2ipmsg-0.9.6+dfsg/src/base64.c000066400000000000000000000136631126724573600160620ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" #if !GLIB_CHECK_VERSION(2,12,0) static char base64_encode_table[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static const unsigned char base64_decode_table[256] = { 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255, 62,255,255,255, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,255,255,255, 0,255,255, 255, 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,255,255,255,255,255, 255, 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,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, }; static gchar * compat_base64_encode(const guchar *data,gsize len){ unsigned char *output=NULL; unsigned char *out_ptr; size_t i,allocated_size; unsigned char buff[4]; unsigned char in_ch; unsigned int upper,lower; unsigned int mod,pad_len; unsigned int offset; unsigned int count; g_assert(data); mod=len % 3; pad_len=(3 - mod); allocated_size=(len / 3 + 1) * 4 + 1; /* NULL Terminate */ output = (unsigned char *)g_malloc(allocated_size); if (!output) return NULL; memset(output,0,allocated_size); count=0; for(i=0,out_ptr=output;i> 2); buff[1]=( (in_ch & 0x3) << 4); *out_ptr++ = base64_encode_table[buff[0]]; ++count; break; case 1: buff[1] |= ( (in_ch) >> 4); buff[2] = ( (in_ch) & 0xf)<<2; *out_ptr++ = base64_encode_table[buff[1]]; ++count; break; case 2: buff[2] |= ( (in_ch) >> 6); buff[3] = ( (in_ch) & 0x3f); *out_ptr++ =base64_encode_table[buff[2]]; *out_ptr++ =base64_encode_table[buff[3]]; count +=2; break; } } /* * 余り分の処理 */ switch(pad_len) { case 2: *out_ptr++ = base64_encode_table[buff[1]]; *out_ptr++ = '='; *out_ptr++ = '='; count +=3; break; case 1: *out_ptr++ = base64_encode_table[buff[2]]; *out_ptr++ = '='; count +=2; break; default: break; } *out_ptr='\0'; ++count; g_assert(output); return output; error_out: g_free(output); return NULL; } static guchar * compat_base64_decode(unsigned char *in, size_t *out_len){ char buff[2]; char *in_ptr,*out_ptr; char *output; size_t len; int i,offset; int in_ch,out_ch; u_int32_t val; if ( (!in) || (!out_len) ) return NULL; len=strlen(in); output=g_malloc(len*3/4); if (!output) return NULL; in_ptr=in; memset(buff,0,2); out_ptr=output; for(i=0,val=0,offset=0;i>16); ++out_ptr; if (buff[1] != '=') { *out_ptr=(val>>8); ++out_ptr; } if (buff[0] != '=') { *out_ptr=val; ++out_ptr; } } } *out_len=out_ptr - output; return output; free_out: g_free(output); return NULL; } #endif /* !GLIB_CHECK_VERSION(2,12,0) */ /* * Interfaces */ int base64_encode(const guchar *data,size_t len,gchar **output){ gchar *ret_str=NULL; if ( (!output) || (!data) ) return -EINVAL; #if GLIB_CHECK_VERSION(2,12,0) ret_str=g_base64_encode(data,len); #else ret_str=compat_base64_encode(data,len); #endif /* GLIB_CHECK_VERSION(2,12,0) */ if (!ret_str) return -ENOMEM; *output=ret_str; return 0; } int base64_decode(const guchar *data,size_t *len,gchar **output){ gchar *ret_str=NULL; if ( (!output) || (!data) || (!len) ) return -EINVAL; #if GLIB_CHECK_VERSION(2,12,0) ret_str=g_base64_decode(data,len); #else ret_str=compat_base64_decode(data,len); #endif /* GLIB_CHECK_VERSION(2,12,0) */ if (!ret_str) return -ENOMEM; *output=ret_str; return 0; } g2ipmsg-0.9.6+dfsg/src/base64.h000066400000000000000000000030431126724573600160560ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_BASE64_H) #define G2IPMSG_BASE64_H #include int base64_encode(const guchar *data,size_t len,gchar **output); int base64_decode(const guchar *data,size_t *len,gchar **output); #endif /* G2IPMSG_BASE64_H */ g2ipmsg-0.9.6+dfsg/src/callbacks.c000066400000000000000000003313401126724573600167100ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** @file * @brief コールバック関数群 * @author Takeharu KATO */ /** lookup_widget用オブジェクトリファレンスを設定する * @param[in] component トップレベルウィジェット * @param[in] widget オブジェクトリファレンス設定対照ウィジェット * @param[in] name 検索キー文字列 */ #define GLADE_HOOKUP_OBJECT(component, widget, name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref(widget), (GDestroyNotify) gtk_widget_unref) /** ドラッグ&ドロップ用ターゲットエントリ */ static GtkTargetEntry targetentries[] = { { "text/uri-list", 0, 0 }, }; /** 設定ウィンドウのグループ名エントリボックス内のインデクス値を獲得する * @param[in] combobox グループ名エントリボックス * @param[in] groupname グループ名 * @param[out] index インデクス値返却領域のアドレス * @retval 0 正常終了 * @retval -ESRCH 指定されたグループが見つからなかった. */ static int get_group_index(GtkComboBox *combobox, const gchar *groupname, int *index) { GtkTreeIter iter; GtkTreeModel *model = NULL; gchar *str_data = NULL; gboolean valid = FALSE; int count = 0; int rc = 0; if ( (combobox == NULL) || (groupname == NULL) || (index == NULL) ) return -EINVAL; model = gtk_combo_box_get_model(combobox); g_assert(model != NULL); /* * エントリボックスを探査し、指定されたグループのインデクスを獲得する. */ valid = gtk_tree_model_get_iter_first (model, &iter); while(valid) { gtk_tree_model_get (model, &iter, 0, &str_data, -1); dbg_out("group:%s\n", str_data); if (!strcmp(groupname, str_data)) { /* グループが見つかった */ *index = count; rc = 0; dbg_out("find:%s(%d)\n", str_data, *index); g_free(str_data); goto func_out; } /* 次のエントリを探査する */ if (str_data != NULL) g_free(str_data); valid = gtk_tree_model_iter_next (model, &iter); ++count; } rc = -ESRCH; /* 指定されたグループが見つからなかった */ func_out: return rc; } /** 設定ウィンドウのグループ名エントリボックスアクティブインデクスを取得する * @param[in] combobox グループ名エントリボックス * @return アクティブインデクス * @retval -ESRCH 指定されたグループが見つからなかった. */ static int get_current_group_index(GtkComboBox *combobox) { int rc = 0; int index = 0; gchar *current_group = NULL; g_assert(combobox != NULL); current_group = (gchar *)hostinfo_refer_group_name(); rc = get_group_index(combobox,current_group,&index); return index; } /** 設定ウィンドウのグループ名エントリボックスに設定値を追加する * @param[in] comboEntry グループ名エントリボックス * @retval 0 正常終了 * @retval -EINVAL 引数異常 */ static int updateConfigWindowGroups(GtkWidget *comboEntry) { GtkTreeModel *model = NULL; GtkTreePath *path = NULL; gchar *active_text = NULL; int rc = 0; int group_index = 0; GtkTreeIter iter; model = gtk_combo_box_get_model(GTK_COMBO_BOX(comboEntry)); if (model == NULL) return -EINVAL; path = gtk_tree_path_new_first(); g_assert(path != NULL); /* * 現在の格納値をクリアする */ if (gtk_tree_model_get_iter(model,&iter,path)) { while(gtk_list_store_remove(GTK_LIST_STORE(model), &iter)) dbg_out("Remove group\n"); } gtk_tree_path_free(path); /* データ領域を開放する */ /* * ホストリストの内容をエントリボックスに反映する */ userdb_update_group_list(GTK_COMBO_BOX(comboEntry)); /* * エントリへの入力値を獲得する */ active_text = gtk_combo_box_get_active_text( GTK_COMBO_BOX(comboEntry) ); /* * 設定されているグループ名を追加する */ if ( (active_text != NULL) && (strlen(active_text) > 0 ) ) { rc = get_group_index(GTK_COMBO_BOX(comboEntry), active_text, &group_index); /* * 新規エントリの場合は, 追加し, 既存の場合はそのエントリを * アクティブエントリに設定する. */ if (rc < 0) gtk_combo_box_append_text(GTK_COMBO_BOX(comboEntry), active_text); else gtk_combo_box_set_active(GTK_COMBO_BOX(comboEntry), group_index); } if (active_text != NULL) g_free(active_text); return 0; } /** 添付ファイルの拡張部文字列を生成する * @param[in] pktno パケット番号 * @param[in] editor 添付ファイルエディタのトップウィジェット * @param[out] ext_part 添付ファイルの拡張部文字列を指すポインタのアドレス */ static void sendmessage_get_attachment_part(pktno_t pktno, GtkWidget *editor, const char **ext_part){ attach_file_block_t *afcb = NULL; GtkWidget *view = NULL; GtkTreeModel *model = NULL; gchar *string = NULL; gchar *filepath = NULL; gboolean valid = FALSE; int count = 0; GtkTreeIter iter; dbg_out("here\n"); g_assert(ext_part != NULL); g_assert(*ext_part == NULL); if (create_attach_file_block(&afcb)) return; view = lookup_widget(editor,"attachedFilesView"); g_assert(view != NULL); model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); g_assert(model != NULL); count = 0; valid = gtk_tree_model_get_iter_first(model, &iter); while(valid) { gtk_tree_model_get (model, &iter, 0, &filepath, -1); dbg_out("filepath:%s\n", filepath); add_attach_file(afcb, filepath); g_free(filepath); ++count; valid = gtk_tree_model_iter_next (model, &iter); } if ( (count > 0) && (get_attach_file_extention(afcb,(const gchar **)&string) == 0) ) { add_upload_queue(pktno, afcb); dbg_out("Attach file string:%s\n", string); *ext_part = string; } } /** 電文を送信する * @param[in] model ホストリストのモデル * @param[in] path ホストリスト中の選択部分 * @param[in] iter 選択部分を探査するイテレータ * @param[in] info_p 送信者情報 */ static void do_send(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer info_p) { send_info_t *info = NULL; gchar *ipaddr = NULL; GtkWidget *attachment_editor = NULL; gchar *ext_part = NULL; int rc = 0 ; int pkt_no = 0; int lflags = 0; info = (send_info_t *)info_p; gtk_tree_model_get (model, iter, USER_VIEW_IPADDR_ID, &ipaddr, -1); pkt_no = ipmsg_get_pkt_no(); lflags = info->flags; dbg_out("Send to %s Flags[%x] from ui\n", ipaddr, lflags); if ( lflags & IPMSG_FILEATTACHOPT) { /* *アタッチメント */ attachment_editor = info->attachment_editor; if (attachment_editor != NULL) { dbg_out("This message has attachment\n"); ext_part = NULL; sendmessage_get_attachment_part(pkt_no, GTK_WIDGET(attachment_editor), (const char **)&ext_part); if (ext_part == NULL) { lflags &= ~IPMSG_FILEATTACHOPT; } } } /* FIXME:IPアドレスからアドレスファミリを取得して, udp * コネクションを獲得するように修正 * ipmsg_send_send_msgには, udp_conは本来不要 */ if ( lflags & IPMSG_FILEATTACHOPT) { rc = ipmsg_send_send_msg(udp_con, ipaddr, lflags, pkt_no, info->msg, ext_part); if (rc == 0) { ref_attach_file_block(pkt_no, ipaddr); } } else { rc = ipmsg_send_send_msg(udp_con, ipaddr, lflags, pkt_no, info->msg, NULL); } if (rc != 0) ipmsg_err_dialog(_("Can not send message to %s pktno=%d"), ipaddr, pkt_no); if (ext_part != NULL) g_free(ext_part); g_free(ipaddr); } static int has_dupulicated_string_in_cell(const char *string,GtkTreeView *treeview){ GtkTreeModel *model; GtkTreeIter iter; gboolean valid; int rc; g_assert(treeview); if (!string) return -EINVAL; rc=-ESRCH; model = gtk_tree_view_get_model(treeview); for(valid = gtk_tree_model_get_iter_first (model, &iter); valid; valid = gtk_tree_model_iter_next (model, &iter)) { gchar *str_data; gtk_tree_model_get (model, &iter, 0, &str_data, -1); if (!strcmp(string,str_data)) { dbg_out("Already exist:%s\n",str_data); g_free(str_data); rc=0; break; } g_free(str_data); } return rc; } static void onBroadcastSelectionChanged (GtkTreeSelection *sel, GtkListStore *liststore) { GtkTreeIter selected_row; GtkWidget *view; GtkWidget *remove_btn; view=GTK_WIDGET(gtk_tree_selection_get_tree_view(sel)); g_assert(view); remove_btn=lookup_widget(GTK_WIDGET(view),"configRemoveBcastBtn"); g_assert(remove_btn); g_assert(gtk_tree_selection_get_mode(sel) == GTK_SELECTION_SINGLE); if (gtk_tree_selection_get_selected(sel, NULL, &selected_row)) { gtk_widget_set_sensitive(remove_btn, TRUE); } else { gtk_widget_set_sensitive(remove_btn, FALSE); } } void on_app1_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { dbg_out("here\n"); } gboolean on_app1_drag_drop (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, guint time, gpointer user_data) { dbg_out("here\n"); return FALSE; } gboolean on_app1_destroy_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { dbg_out("here\n"); return FALSE; } void on_app1_destroy (GtkObject *object, gpointer user_data) { GtkWidget *window; GtkWidget *attachment_editor; dbg_out("here\n"); window=lookup_widget(GTK_WIDGET(object),"messageWindow"); g_assert(window); attachment_editor = (GtkWidget*) g_object_get_data (G_OBJECT (object), "attach_win"); if (attachment_editor) gtk_widget_destroy (attachment_editor); else dbg_out("No attachment editor\n"); userdb_remove_waiter_window(window); } void on_new1_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); } /* notice: This function may be called from applt, so we should not use * menuitem argument. */ void on_preferences1_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *configWindow; GtkTreeView *broadcasts; GtkCellRenderer *renderer; GtkTreeViewColumn *col; GtkTreeSelection *sel; GtkListStore *liststore; GtkComboBox *combobox; dbg_out("here\n"); configWindow=create_configWindow1 (); if (!configWindow) return; broadcasts=GTK_TREE_VIEW(lookup_widget(configWindow,"treeview4")); g_assert(broadcasts); renderer = gtk_cell_renderer_text_new(); if (!renderer) goto free_window; col = gtk_tree_view_column_new(); if (!col) goto free_renderer; liststore = gtk_list_store_new(1, G_TYPE_STRING); if (!liststore) goto free_col; gtk_tree_view_set_model(GTK_TREE_VIEW(broadcasts), GTK_TREE_MODEL(liststore)); g_object_unref(liststore); gtk_tree_view_column_pack_start(col, renderer, TRUE); gtk_tree_view_column_add_attribute(col, renderer, "text", 0); gtk_tree_view_column_set_title(col, _("Broad cast addresses")); gtk_tree_view_append_column(GTK_TREE_VIEW(broadcasts), col); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(broadcasts)); gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); g_signal_connect(sel, "changed", G_CALLBACK(onBroadcastSelectionChanged), liststore); combobox = GTK_COMBO_BOX(lookup_widget(configWindow, "configEncodingComboBox")); g_assert(combobox != NULL); setup_encoding_combobox(combobox); gtk_widget_show (configWindow); return; free_window: gtk_widget_destroy(GTK_WIDGET(configWindow)); free_col: gtk_object_destroy(GTK_OBJECT(col)); free_renderer: gtk_object_destroy(GTK_OBJECT(renderer)); return; } void on_update2_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); ipmsg_update_ui_user_list(); } void on_about1_activate (GtkMenuItem *menuitem, gpointer user_data) { ipmsg_show_about_dialog(); } void on_sendBtn_released (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_sendBtn_pressed (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_configOpenCheckChkBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { dbg_out("here\n"); } void on_configNonPopupCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { dbg_out("here\n"); } void on_configNoSoundCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { dbg_out("here\n"); } void on_configEncloseEnableCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { dbg_out("here\n"); } void on_configCitationCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { dbg_out("here\n"); } void on_configLoggingEnableCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { dbg_out("here\n"); } void on_configUserEnableCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { dbg_out("here\n"); } void on_logFileDialogBtn_pressed (GtkButton *button, gpointer user_data) { GtkWidget *parent_window; GtkWidget *dialog; GtkWidget *file_entry; dbg_out("here\n"); parent_window=lookup_widget(GTK_WIDGET(button),"configWindow1"); dialog = gtk_file_chooser_dialog_new (_("LogFile"), GTK_WINDOW(parent_window), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); file_entry=lookup_widget(GTK_WIDGET(button),"entry1"); gtk_entry_set_text(GTK_ENTRY(file_entry), filename); g_free (filename); } gtk_widget_destroy (dialog); } void on_logFileDialogBtn_released (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_logFileDialogBtn_clicked (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_entry1_editing_done (GtkCellEditable *celleditable, gpointer user_data) { dbg_out("here\n"); } void on_configAddBcastBtn_clicked (GtkButton *button, gpointer user_data) { GtkEntry *entry; GtkTreeView *treeview; const gchar *txt; dbg_out("here\n"); entry = GTK_ENTRY(lookup_widget(GTK_WIDGET(button),"entry3")); treeview = GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(button),"treeview4")); txt = gtk_entry_get_text(GTK_ENTRY(entry)); if (txt && *txt) { GtkTreeModel *model; GtkTreeIter newrow; if (has_dupulicated_string_in_cell(txt,treeview)){ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_list_store_append(GTK_LIST_STORE(model), &newrow); gtk_list_store_set(GTK_LIST_STORE(model), &newrow, 0, txt, -1); gtk_entry_set_text(GTK_ENTRY(entry), ""); /* clear entry */ } } } void on_configRemoveBcastBtn_pressed (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_configRemoveBcastBtn_released (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_configRemoveBcastBtn_clicked (GtkButton *button, gpointer user_data) { GtkEntry *entry; GtkTreeView *treeview; GtkTreeSelection *sel; GtkTreeModel *model; GtkTreeIter selected_row; dbg_out("here\n"); entry = GTK_ENTRY(lookup_widget(GTK_WIDGET(button),"entry3")); treeview = GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(button),"treeview4")); sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); g_assert(gtk_tree_selection_get_mode(sel) == GTK_SELECTION_SINGLE); if (gtk_tree_selection_get_selected(sel, &model, &selected_row)) { gchar *str_data; gtk_tree_model_get (model, &selected_row, 0, &str_data, -1); gtk_list_store_remove(GTK_LIST_STORE(model), &selected_row); dbg_out("Data:%s\n",str_data); gtk_entry_set_text(GTK_ENTRY(entry), str_data); g_free(str_data); } else { g_assert_not_reached(); } } void on_configApplySettingBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *top; GtkWidget *nickname_entry; GtkWidget *groupEntry; GtkWidget *logfile_entry; GtkWidget *configOpenCheckChkBtn; GtkWidget *configNonPopupCheckBtn; GtkWidget *configNoSoundCheckBtn; GtkWidget *configEncloseEnableCheckBtn; GtkWidget *configCitationCheckBtn; GtkWidget *configIPV6CheckBtn; GtkWidget *configDialUpCheckBtn; GtkWidget *configIconifyCheckBtn; GtkWidget *enableLogToggle; GtkWidget *loginNameLoggingToggle; GtkWidget *logIPAddrToggle; GtkWidget *logLockToggle; GtkComboBox *codeset_combobox; GtkTreeView *treeview; GtkTreeModel *model; GtkTreeIter iter; GSList *addr_top,*addr_list; gchar *string; gboolean valid; dbg_out("here\n"); top=lookup_widget(GTK_WIDGET(button),"configWindow1"); g_assert(top); groupEntry=lookup_widget(GTK_WIDGET(button),"comboboxentry1"); g_assert(groupEntry); nickname_entry=lookup_widget(GTK_WIDGET(button),"entry2"); g_assert(nickname_entry); logfile_entry=lookup_widget(GTK_WIDGET(button),"entry1"); g_assert(logfile_entry); treeview = GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(button),"treeview4")); g_assert(treeview); configOpenCheckChkBtn=lookup_widget(GTK_WIDGET(button),"configOpenCheckChkBtn"); g_assert(configOpenCheckChkBtn); configNonPopupCheckBtn=lookup_widget(GTK_WIDGET(button),"configNonPopupCheckBtn"); g_assert(configNonPopupCheckBtn); configNoSoundCheckBtn=lookup_widget(GTK_WIDGET(button),"configNoSoundCheckBtn"); g_assert(configNoSoundCheckBtn); configEncloseEnableCheckBtn=lookup_widget(GTK_WIDGET(button),"configEncloseEnableCheckBtn"); g_assert(configEncloseEnableCheckBtn); configCitationCheckBtn=lookup_widget(GTK_WIDGET(button),"configCitationCheckBtn"); g_assert(configCitationCheckBtn); configIPV6CheckBtn=lookup_widget(GTK_WIDGET(button),"configIPV6CheckBtn"); g_assert(configIPV6CheckBtn); configDialUpCheckBtn=lookup_widget(GTK_WIDGET(button),"configDialUpCheckBtn"); g_assert(configDialUpCheckBtn); configIconifyCheckBtn = lookup_widget(GTK_WIDGET(button), "configIconifyCheckBtn"); g_assert(configIconifyCheckBtn != NULL); codeset_combobox = GTK_COMBO_BOX(lookup_widget(GTK_WIDGET(button), "configEncodingComboBox")); g_assert(codeset_combobox != NULL); string = gtk_combo_box_get_active_text(GTK_COMBO_BOX(codeset_combobox)); g_assert(string != NULL); hostinfo_set_encoding(string); g_free(string); enableLogToggle = lookup_widget(GTK_WIDGET(button),"enableLogToggle"); g_assert(enableLogToggle); loginNameLoggingToggle = lookup_widget(GTK_WIDGET(button),"loginNameLoggingToggle"); g_assert(loginNameLoggingToggle); logIPAddrToggle = lookup_widget(GTK_WIDGET(button),"logIPAddrToggle"); g_assert(logIPAddrToggle); logLockToggle = lookup_widget(GTK_WIDGET(button), "logLockToggle"); g_assert(logLockToggle); hostinfo_set_nick_name(gtk_entry_get_text (GTK_ENTRY(nickname_entry))); string = gtk_combo_box_get_active_text(GTK_COMBO_BOX(groupEntry)); hostinfo_set_group_name(string); g_free(string); hostinfo_set_ipmsg_logfile(gtk_entry_get_text(GTK_ENTRY(logfile_entry))); hostinfo_set_ipmsg_default_confirm(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configOpenCheckChkBtn))); hostinfo_set_ipmsg_default_popup(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configNonPopupCheckBtn))); if (is_sound_system_available()) hostinfo_set_ipmsg_default_sound(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configNoSoundCheckBtn))); hostinfo_set_ipmsg_default_enclose(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configEncloseEnableCheckBtn))); hostinfo_set_ipmsg_default_citation(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configCitationCheckBtn))); hostinfo_set_ipmsg_ipv6_mode(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configIPV6CheckBtn))); hostinfo_set_ipmsg_dialup_mode(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configDialUpCheckBtn))); hostinfo_set_ipmsg_iconify_dialogs(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configIconifyCheckBtn))); hostinfo_set_ipmsg_enable_log(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enableLogToggle))); hostinfo_set_ipmsg_logname_logging(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(loginNameLoggingToggle))); hostinfo_set_ipmsg_ipaddr_logging(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(logIPAddrToggle))); hostinfo_set_log_locked_message_handling(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(logLockToggle))); addr_top = NULL; model = gtk_tree_view_get_model(treeview); valid = gtk_tree_model_get_iter_first (model, &iter); while(valid) { gchar *str_data; gtk_tree_model_get (model, &iter, 0, &str_data, -1); dbg_out("Addr:%s\n",str_data); addr_top=g_slist_append(addr_top,str_data); valid = gtk_tree_model_iter_next (model, &iter); } if (addr_top) { hostinfo_set_ipmsg_broadcast_list(addr_top); addr_list=addr_top; while(addr_list) { g_free(addr_list->data); addr_list=g_slist_next(addr_list); } g_slist_free(addr_top); g_assert(g_slist_length(addr_top)==1); } ipmsg_send_br_absence(udp_con,0); gtk_widget_destroy(top); } void on_configApplySettingBtn_pressed (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_configApplySettingBtn_released (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_configCancelBtn_pressed (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_configCancelBtn_released (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_configCancelBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *top; dbg_out("here\n"); top=lookup_widget(GTK_WIDGET(button),"configWindow1"); g_assert(top); gtk_widget_destroy(top); } GtkWidget * internal_create_messageWindow(void){ GtkWidget *messageWindow; GtkWidget *userview; GtkWidget *textview; GtkWidget *usersEntry; GtkWidget *usersVPane; gint width,height; messageWindow = create_messageWindow (); g_assert(messageWindow); userview = lookup_widget(messageWindow,"messageUserTree"); g_assert(userview); textview = lookup_widget(messageWindow,"textview1"); g_assert(textview); usersVPane = lookup_widget(messageWindow,"vpaned1"); g_assert(usersVPane); setup_message_tree_view(userview); gtk_drag_dest_set(userview, GTK_DEST_DEFAULT_ALL, targetentries, 1, GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_LINK); gtk_drag_dest_set(usersVPane, GTK_DEST_DEFAULT_ALL, targetentries, 1, GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_LINK); gtk_tree_view_set_column_drag_function(GTK_TREE_VIEW(userview),NULL,NULL,NULL); gtk_drag_dest_unset(textview); gtk_drag_dest_set(textview, GTK_DEST_DEFAULT_ALL, targetentries, 1, GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_LINK); if (!hostinfo_get_ipmsg_message_window_size(&width,&height)){ dbg_out("Resize:(%d,%d)\n",width,height); gtk_window_resize (GTK_WINDOW(messageWindow),width,height); } gtk_widget_set_events (GTK_WIDGET(messageWindow),GDK_KEY_RELEASE); gtk_signal_connect (GTK_OBJECT (messageWindow), "key_release_event", GTK_SIGNAL_FUNC (on_messageWindow_key_release_event), NULL); /* * 表示を中央寄せに設定 */ usersEntry=lookup_widget(GTK_WIDGET(messageWindow),"messageWinUsersEntry"); g_assert(usersEntry); gtk_entry_set_alignment(GTK_ENTRY(usersEntry),0.5); userdb_add_waiter_window(messageWindow); return messageWindow; } void on_startBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *messageWindow; /* We can not use button widget because this is called from applet/systray */ dbg_out("here\n"); if (recv_windows_are_stored()) { show_stored_windows(); } else { messageWindow = internal_create_messageWindow(); g_assert(messageWindow); gtk_widget_show (messageWindow); update_users_on_message_window(messageWindow,FALSE); } } static void onAttachFileSelectionChanged (GtkTreeSelection *sel, GtkListStore *liststore) { GtkTreeIter selected_row; GtkWidget *view; GtkWidget *remove_btn; view=GTK_WIDGET(gtk_tree_selection_get_tree_view(sel)); g_assert(view); remove_btn=lookup_widget(GTK_WIDGET(view),"AttachFileRemoveBtn"); g_assert(remove_btn); g_assert(gtk_tree_selection_get_mode(sel) == GTK_SELECTION_SINGLE); if (gtk_tree_selection_get_selected(sel, NULL, &selected_row)) { gtk_widget_set_sensitive(remove_btn, TRUE); } else { gtk_widget_set_sensitive(remove_btn, FALSE); } } static GtkWidget * setup_attachment_editor(GtkWidget *mainwindow){ GtkWidget *attachment_editor; GtkWidget *mainframe; GtkWidget *entry; GtkTreeView *view; GtkListStore *liststore; GtkTreeViewColumn *col; GtkCellRenderer *renderer; GtkTreeSelection *sel; gint width,height; dbg_out("here\n"); attachment_editor = (GtkWidget*) g_object_get_data (G_OBJECT (mainwindow), "attach_win"); if (attachment_editor) { gtk_widget_grab_focus (attachment_editor); gtk_window_present (GTK_WINDOW(attachment_editor)); /* 前面移動 */ return attachment_editor; } dbg_out("Create new editor\n"); attachment_editor=create_attachFileEditor (); g_assert(attachment_editor); view=GTK_TREE_VIEW(lookup_widget(attachment_editor,"attachedFilesView")); g_assert(view); liststore = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); g_assert(liststore); gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(liststore)); g_object_unref(liststore); /* * タイトル設定 */ /* --- Column #1 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("FilePath")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the first name */ gtk_tree_view_column_add_attribute(col, renderer, "text", 0); gtk_tree_view_column_set_resizable (col,TRUE); /* --- Column #2 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("FileSize")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the first name */ gtk_tree_view_column_add_attribute(col, renderer, "text", 1); gtk_tree_view_column_set_resizable (col,TRUE); /* --- Column #3 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("FileType")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the first name */ gtk_tree_view_column_add_attribute(col, renderer, "text", 2); gtk_tree_view_column_set_resizable (col,TRUE); GLADE_HOOKUP_OBJECT (mainwindow, attachment_editor, "attach_win"); GLADE_HOOKUP_OBJECT (attachment_editor,mainwindow, "main_win"); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); g_signal_connect(sel, "changed", G_CALLBACK(onAttachFileSelectionChanged), liststore); GTK_WIDGET_SET_FLAGS(attachment_editor,GTK_CAN_FOCUS); /* * Drop target setting */ gtk_drag_dest_set(GTK_WIDGET(view), GTK_DEST_DEFAULT_ALL, targetentries, 1, GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_LINK); /*mainframe*/ mainframe=lookup_widget(attachment_editor,"attachFileEditorMainFrame"); g_assert(mainframe); gtk_drag_dest_set(mainframe, GTK_DEST_DEFAULT_ALL, targetentries, 1, GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_LINK); /*entry*/ entry=lookup_widget(attachment_editor,"AttachFilePathEntry"); g_assert(entry); gtk_drag_dest_set(entry, GTK_DEST_DEFAULT_ALL, targetentries, 1, GDK_ACTION_COPY|GDK_ACTION_MOVE|GDK_ACTION_LINK); if (!hostinfo_get_ipmsg_attach_editor_size(&width,&height)){ dbg_out("Resize:(%d,%d)\n",width,height); gtk_window_resize (GTK_WINDOW(attachment_editor),width,height); } return attachment_editor; } static void on_add_new_file(const gchar *filename,GtkWidget *parent_window,gboolean is_clear) { int rc; GtkWidget *file_entry; GtkTreeView *treeview; GtkTreeModel *model; GtkTreeIter newrow; off_t num_size; time_t num_mtime; ipmsg_ftype_t num_ftype; gchar str_size[256]; dbg_out("here\n"); file_entry=lookup_widget(parent_window,"AttachFilePathEntry"); g_assert(file_entry); treeview = GTK_TREE_VIEW(lookup_widget(parent_window,"attachedFilesView")); g_assert(treeview); rc=has_dupulicated_string_in_cell(filename,treeview); if (!rc){ dbg_out("Ignore duplicated entry %s\n",filename); return; } rc = get_file_info(filename, &num_size, &num_mtime, &num_ftype); if (rc<0) { dbg_out("Can not obtain file info %s %d\n",filename,num_ftype); return; } snprintf(str_size, 256,"%lld",num_size); str_size[254]=0; if (is_supported_file_type(num_ftype)) { model = gtk_tree_view_get_model(treeview); gtk_list_store_append(GTK_LIST_STORE(model), &newrow); gtk_list_store_set(GTK_LIST_STORE(model), &newrow, 0, filename, 1, str_size, 2, get_file_type_name(num_ftype), -1); } if (is_clear) gtk_entry_set_text(GTK_ENTRY(file_entry),""); /* clear entry */ } void on_attachment1_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *window; GtkWidget *attachment_editor; window=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); g_assert(window); attachment_editor=setup_attachment_editor(window); g_assert(attachment_editor); gtk_widget_show(attachment_editor); } void on_quit1_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); cleanup_message_watcher(); gtk_main_quit(); } void on_entry2_activate (GtkEntry *entry, gpointer user_data) { dbg_out("here\n"); } gboolean on_downloadWindow_destroy_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { dbg_out("here\n"); return FALSE; } void on_clist4_click_column (GtkCList *clist, gint column, gpointer user_data) { dbg_out("here\n"); } void on_downloadSaveBtn_clicked (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_close_button1_clicked (GtkButton *button, gpointer user_data) { dbg_out("here\n"); } void on_configWindow_destroy (GtkObject *object, gpointer user_data) { } void on_initialWindow_destroy (GtkObject *object, gpointer user_data) { dbg_out("here\n"); on_quit1_activate((GtkMenuItem *)NULL,user_data); } void on_downloadWindow_destroy (GtkObject *object, gpointer user_data) { GtkWidget *window; ipmsg_recvmsg_private_t *sender_info; ipmsg_private_data_t *priv; dbg_out("here\n"); window=lookup_widget(GTK_WIDGET(object),"downloadWindow"); g_assert(window); priv=(ipmsg_private_data_t *)lookup_widget(GTK_WIDGET(window),"senderInfo"); g_assert(priv); sender_info=priv->data; g_assert(sender_info->ipaddr); /* FIX ME */ ipmsg_send_release_files(udp_con,sender_info->ipaddr,sender_info->pktno); remove_window_from_displaylist(window); /* privateは自動破棄される */ } void on_messageWindow_drag_data_get (GtkWidget *widget, GdkDragContext *drag_context, GtkSelectionData *data, guint info, guint time, gpointer user_data) { } void on_messageWindow_drag_end (GtkWidget *widget, GdkDragContext *drag_context, gpointer user_data) { } void on_downloadfilechooserdialog_destroy (GtkObject *object, gpointer user_data) { } GtkFileChooserConfirmation on_downloadfilechooserdialog_confirm_overwrite (GtkFileChooser *filechooser, gpointer user_data) { return TRUE; } void on_downloadfilechooserdialog_current_folder_changed (GtkFileChooser *filechooser, gpointer user_data) { } void on_downloadfilechooserdialog_file_activated (GtkFileChooser *filechooser, gpointer user_data) { } void on_downloadfilechooserdialog_update_preview (GtkFileChooser *filechooser, gpointer user_data) { } void on_downloadfilechooserdialog_close (GtkDialog *dialog, gpointer user_data) { } void on_downloadfilechooserdialog_response (GtkDialog *dialog, gint response_id, gpointer user_data) { } void on_logfileChooserdialog_destroy (GtkObject *object, gpointer user_data) { } void on_logfileChooserdialog_close (GtkDialog *dialog, gpointer user_data) { } void on_logfileChooserdialog_response (GtkDialog *dialog, gint response_id, gpointer user_data) { } void on_aboutdialog_destroy (GtkObject *object, gpointer user_data) { dbg_out("here\n"); } void on_aboutdialog_close (GtkDialog *dialog, gpointer user_data) { } void on_aboutdialog_response (GtkDialog *dialog, gint response_id, gpointer user_data) { gtk_widget_destroy(GTK_WIDGET(dialog)); } void on_readNotifyDialog_close (GtkDialog *dialog, gpointer user_data) { } void on_readNotifyDialog_response (GtkDialog *dialog, gint response_id, gpointer user_data) { } void on_readNotifyDialog_destroy (GtkObject *object, gpointer user_data) { } void on_readNotifyDialogOKBtn_pressed (GtkButton *button, gpointer user_data) { GtkWidget *top; top=lookup_widget(GTK_WIDGET(button),"readNotifyDialog"); g_assert(top); gtk_widget_destroy(top); } void on_messageWindow_show (GtkWidget *widget, gpointer user_data) { GtkWidget *view = NULL; GtkToggleButton *enclose_toggle = NULL; GtkToggleButton *lock_toggle = NULL; GtkWidget *window = NULL; GtkWidget *textview = NULL; dbg_out("here\n"); window = lookup_widget(widget,"messageWindow"); g_assert(window != NULL); enclose_toggle = GTK_TOGGLE_BUTTON(lookup_widget(widget,"encloseCheckBtn")); g_assert(enclose_toggle != NULL); lock_toggle = GTK_TOGGLE_BUTTON(lookup_widget(widget, "lockChkBtn")); g_assert(lock_toggle != NULL); view = lookup_widget(widget, "messageUserTree"); g_assert(view != NULL); textview = lookup_widget(widget, "textview1"); g_assert(textview != NULL); if (hostinfo_refer_ipmsg_default_enclose()) gtk_toggle_button_set_active(enclose_toggle, TRUE); else gtk_toggle_button_set_active(enclose_toggle, FALSE); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enclose_toggle))) gtk_widget_set_sensitive(GTK_WIDGET(lock_toggle), TRUE); else gtk_widget_set_sensitive(GTK_WIDGET(lock_toggle), FALSE); } void on_viewWindow_destroy (GtkObject *object, gpointer user_data) { GtkWidget *window; dbg_out("here\n"); window=lookup_widget(GTK_WIDGET(object),"viewWindow"); g_assert(window); remove_window_from_openlist(window); remove_window_from_displaylist(window); } void on_viewWindow_show (GtkWidget *widget, gpointer user_data) { } void on_initialWindow_show (GtkWidget *widget, gpointer user_data) { GtkWidget *startBtn; startBtn=lookup_widget(widget,"startBtn"); gtk_signal_connect (GTK_OBJECT (startBtn), "button_press_event", GTK_SIGNAL_FUNC (on_init_win_event_button_press_event), NULL); } void on_viewwindowCloseBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *top; top=lookup_widget(GTK_WIDGET(button),"viewWindow"); g_assert(top); gtk_widget_destroy(top); } void select_user_list_by_addr(GtkTreeView *treeview,const char *ipaddr) { GtkTreeSelection *sel; GtkTreeModel *model; GtkTreeIter iter; gboolean valid; g_assert((treeview) && (ipaddr)); sel=gtk_tree_view_get_selection(treeview); model = gtk_tree_view_get_model(treeview); valid = gtk_tree_model_get_iter_first (model, &iter); while(valid) { gchar *tree_ipaddr; gtk_tree_model_get (model, &iter, USER_VIEW_IPADDR_ID, &tree_ipaddr, -1); dbg_out("Addr:%s\n",tree_ipaddr); if (!strcmp(tree_ipaddr,ipaddr)) { dbg_out("Select : %s\n",tree_ipaddr); gtk_tree_selection_select_iter(sel,&iter); } g_free(tree_ipaddr); valid = gtk_tree_model_iter_next (model, &iter); } } void on_viewwindowReplyBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *view; GtkWidget *messageWindow; GtkTextView *text_view; GtkTextIter start_iter,end_iter; GtkTextBuffer *buffer; GtkTextView *new_view; GtkTextBuffer *new_buffer; GtkWidget *cite_toggle; gint text_line; gchar *string; ipmsg_private_data_t *priv=NULL; ipmsg_recvmsg_private_t *sender_info; GtkWidget *messageUserTree; int i; dbg_out("here\n"); messageWindow = internal_create_messageWindow(); g_assert(messageWindow); messageUserTree=lookup_widget(messageWindow,"messageUserTree"); g_assert(messageUserTree); view=lookup_widget(GTK_WIDGET(button),"viewWindow"); text_view=GTK_TEXT_VIEW(lookup_widget(GTK_WIDGET(button),"viewwindowTextView")); cite_toggle=lookup_widget(GTK_WIDGET(button),"viewwindowCitationCheck"); priv=(ipmsg_private_data_t *)lookup_widget(GTK_WIDGET(button),"senderInfo"); g_assert(cite_toggle); g_assert(text_view); g_assert(view); g_assert(priv); IPMSG_ASSERT_PRIVATE(priv,IPMSG_PRIVATE_RECVMSG); sender_info=priv->data; dbg_out("sender_info:%p\n",sender_info); if (sender_info->ipaddr) { update_users_on_message_window(messageWindow,FALSE); select_user_list_by_addr(GTK_TREE_VIEW(messageUserTree),sender_info->ipaddr); } if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cite_toggle))) { new_view=GTK_TEXT_VIEW(lookup_widget(messageWindow,"textview1")); new_buffer=gtk_text_view_get_buffer(new_view); g_assert(new_view); g_assert(new_buffer); /* following codes assume gtk_text_view_get_buffer(text_view) does not * allocate new reference * as gtk manual says. */ buffer=gtk_text_view_get_buffer(text_view); text_line=gtk_text_buffer_get_line_count(buffer); dbg_out("lines:%d\n",text_line); for(i=0;i=0); gtk_combo_box_set_active(GTK_COMBO_BOX(groupEntry),group_index); gtk_entry_set_text(GTK_ENTRY(logfile_entry), hostinfo_refer_ipmsg_logfile()); if (hostinfo_refer_ipmsg_default_confirm()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configOpenCheckChkBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configOpenCheckChkBtn),FALSE); if (hostinfo_refer_ipmsg_default_popup()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configNonPopupCheckBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configNonPopupCheckBtn),FALSE); if (is_sound_system_available()) { if (hostinfo_refer_ipmsg_default_sound()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configNoSoundCheckBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configNoSoundCheckBtn),FALSE); }else{ gtk_widget_set_sensitive(configNoSoundCheckBtn, FALSE); } if (hostinfo_refer_ipmsg_default_enclose()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configEncloseEnableCheckBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configEncloseEnableCheckBtn),FALSE); if (hostinfo_refer_ipmsg_default_citation()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configCitationCheckBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configCitationCheckBtn),FALSE); if (hostinfo_refer_ipmsg_ipv6_mode()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configIPV6CheckBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configIPV6CheckBtn),FALSE); if (hostinfo_refer_ipmsg_dialup_mode()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configDialUpCheckBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configDialUpCheckBtn),FALSE); if (hostinfo_refer_ipmsg_iconify_dialogs()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configIconifyCheckBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configIconifyCheckBtn),FALSE); if (hostinfo_refer_ipmsg_enable_log()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enableLogToggle),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enableLogToggle),FALSE); if ( (hostinfo_refer_ipmsg_logname_logging()) && (hostinfo_refer_ipmsg_enable_log()) ) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(loginNameLoggingToggle),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(loginNameLoggingToggle),FALSE); if ( (hostinfo_refer_ipmsg_ipaddr_logging()) && (hostinfo_refer_ipmsg_enable_log()) ) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(logIPAddrToggle),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(logIPAddrToggle),FALSE); if ( (hostinfo_refer_ipmsg_log_locked_message_handling()) && (hostinfo_refer_ipmsg_enable_log()) ) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(logLockToggle),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(logLockToggle),FALSE); addr_top=addr_list=hostinfo_get_ipmsg_broadcast_list(); while(addr_list != NULL) { GtkTreeModel *model; GtkTreeIter newrow; gchar *element = addr_list->data; model = gtk_tree_view_get_model(treeview); gtk_list_store_append(GTK_LIST_STORE(model), &newrow); gtk_list_store_set(GTK_LIST_STORE(model), &newrow, 0, element, -1); g_free(element); addr_list=g_slist_next(addr_list); } if (addr_top) g_slist_free(addr_top); /* * button state */ configAddBcastBtn=lookup_widget(widget,"configAddBcastBtn"); g_assert(configAddBcastBtn); addr_entry=lookup_widget(widget,"entry3"); g_assert(addr_entry); entry_string=(char *)gtk_entry_get_text(GTK_ENTRY(addr_entry)); if ( (entry_string) && (*entry_string) ) gtk_widget_set_sensitive(configAddBcastBtn,TRUE); else gtk_widget_set_sensitive(configAddBcastBtn,FALSE); sel=gtk_tree_view_get_selection(treeview); configRemoveBcastBtn=lookup_widget(widget,"configRemoveBcastBtn"); g_assert(configRemoveBcastBtn); g_assert(gtk_tree_selection_get_mode(sel) == GTK_SELECTION_SINGLE); if (gtk_tree_selection_get_selected(sel, NULL, &selected_row)) { gtk_widget_set_sensitive(configRemoveBcastBtn, TRUE); } else { gtk_widget_set_sensitive(configRemoveBcastBtn, FALSE); } } void on_configWindow_clicked (GtkButton *button, gpointer user_data) { } void update_one_group_entry(gpointer data,GtkComboBox *user_data) { userdb_t *current_user; GtkWidget *comboEntry=GTK_WIDGET(user_data); GtkTreeModel *model; GtkTreeIter iter; gboolean valid; if ( (!data) || (!user_data) ) return; current_user=(userdb_t *)data; dbg_out("NickName: %s\n",current_user->nickname); dbg_out("Group: %s\n",current_user->group); dbg_out("User: %s\n",current_user->user); dbg_out("Host: %s\n",current_user->host); dbg_out("IP Addr: %s\n",current_user->ipaddr); model=gtk_combo_box_get_model(GTK_COMBO_BOX(comboEntry)); if (!model) return; valid = gtk_tree_model_get_iter_first (model, &iter); while (valid) { gchar *str_data; /* Make sure you terminate calls to gtk_tree_model_get() * with a '-1' value */ gtk_tree_model_get (model, &iter, 0, &str_data, -1); dbg_out("check: %s\n",str_data); if (!strcmp(current_user->group,str_data)) { dbg_out("found: %s\n",current_user->group); g_free(str_data); return; /* Already appended */ } g_free(str_data); valid = gtk_tree_model_iter_next (model, &iter); } gtk_combo_box_append_text(GTK_COMBO_BOX(comboEntry),current_user->group); return; } void on_configWindowAddGroupBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *comboEntry; ipmsg_send_br_absence(udp_con,0); comboEntry=lookup_widget(GTK_WIDGET(button),"comboboxentry1"); g_assert(comboEntry); updateConfigWindowGroups(comboEntry); } void on_sendFailDialog_show (GtkWidget *widget, gpointer user_data) { } void on_sendFailDialog_destroy (GtkObject *object, gpointer user_data) { } void on_sendFailDialog_response (GtkDialog *dialog, gint response_id, gpointer user_data) { dbg_out("Response:%d\n",response_id); } void on_sendFailDialog_close (GtkDialog *dialog, gpointer user_data) { } void on_cancelbutton1_clicked (GtkButton *button, gpointer user_data) { } void on_okbutton1_clicked (GtkButton *button, gpointer user_data) { GtkWidget *dialog; dialog=lookup_widget(GTK_WIDGET(button),"sendFailDialog"); gtk_dialog_response(GTK_DIALOG(dialog),GTK_RESPONSE_OK); } static int handle_attachment_drag_data(GtkSelectionData *data,GtkWidget *attachment_editor){ GList *files,*list; gchar *path; if ( (!data) || (!(data->data)) || (!attachment_editor) ) return -EINVAL; files= gnome_vfs_uri_list_parse((gchar *)data->data); for(list = files; list != NULL; list = g_list_next(list) ) { path=gnome_vfs_unescape_string(gnome_vfs_uri_get_path(list->data),NULL); dbg_out("draged file: %s\n",path); on_add_new_file(path,attachment_editor,FALSE); g_free(path); } gnome_vfs_uri_list_free(files); return 0; } static int on_message_window_drag_data_received(GtkWidget *widget,GtkSelectionData *data){ GtkWidget *window; GtkWidget *attachment_editor; int rc; if (!data) return -EINVAL; dbg_out("here:data %s\n",(char *)data->data); window=lookup_widget(widget,"messageWindow"); g_assert(window); attachment_editor=setup_attachment_editor(window); g_assert(attachment_editor); gtk_widget_show(attachment_editor); rc=handle_attachment_drag_data(data,attachment_editor); if (rc<0) ipmsg_err_dialog(_("Can not handle drag data %s (%d)"),strerror(-rc),-rc); return rc; } void on_close1_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *top; dbg_out("here\n"); top=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); g_assert(top); gtk_widget_destroy(top); } void on_attachFileEditor_destroy (GtkObject *object, gpointer user_data) { GtkWidget *mainwindow; GtkWidget *attachment_editor; dbg_out("here\n"); mainwindow = (GtkWidget*) g_object_get_data (G_OBJECT (object), "main_win"); g_assert(mainwindow); dbg_out("Remove Assosiation\n"); attachment_editor = (GtkWidget*) g_object_get_data (G_OBJECT (mainwindow), "attach_win"); g_assert(attachment_editor); g_object_set_data (G_OBJECT (attachment_editor), "main_win", NULL); g_object_set_data (G_OBJECT (mainwindow), "attach_win", NULL); attachment_editor = (GtkWidget*) g_object_get_data (G_OBJECT (mainwindow), "attach_win"); g_assert(!attachment_editor); } void on_attachFileEditor_show (GtkWidget *widget, gpointer user_data) { GtkWidget *attachment_editor; GtkWidget *add_btn; GtkWidget *remove_btn; GtkWidget *view; GtkWidget *entry; GtkTreeSelection *sel; GtkTreeModel *model; GtkTreeIter selected_row; off_t size; time_t mtime; ipmsg_ftype_t type; int rc; gchar *filepath; dbg_out("here\n"); /* * setup button/entry */ attachment_editor=lookup_widget(widget,"attachFileEditor"); g_assert(attachment_editor); add_btn=lookup_widget(GTK_WIDGET(attachment_editor),"AttachFIleAddBtn"); g_assert(add_btn); remove_btn=lookup_widget(GTK_WIDGET(attachment_editor),"AttachFileRemoveBtn"); g_assert(remove_btn); entry=lookup_widget(GTK_WIDGET(attachment_editor),"AttachFilePathEntry"); g_assert(entry); filepath=(char *)gtk_entry_get_text(GTK_ENTRY(entry)); rc=get_file_info(filepath, &size, &mtime, &type); if ( (rc) || (!is_supported_file_type(type)) ) gtk_widget_set_sensitive(add_btn,FALSE); else gtk_widget_set_sensitive(add_btn,TRUE); view=lookup_widget(GTK_WIDGET(attachment_editor),"attachedFilesView"); g_assert(GTK_TREE_VIEW(view)); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); g_assert(gtk_tree_selection_get_mode(sel) == GTK_SELECTION_SINGLE); if (gtk_tree_selection_get_selected(sel, &model, &selected_row)) gtk_widget_set_sensitive(remove_btn,TRUE); else gtk_widget_set_sensitive(remove_btn,FALSE); } void on_AttachFIleAddBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *parent_window; GtkWidget *file_entry; char *filename; dbg_out("here\n"); parent_window=lookup_widget(GTK_WIDGET(button),"attachFileEditor"); file_entry=lookup_widget(GTK_WIDGET(button),"AttachFilePathEntry"); filename=(char *)gtk_entry_get_text(GTK_ENTRY(file_entry)); on_add_new_file(filename,parent_window,TRUE); } void on_AttachFileRemoveBtn_clicked (GtkButton *button, gpointer user_data) { GtkTreeIter selected_row; GtkWidget *view; GtkTreeSelection *sel; GtkTreeModel *model; GtkWidget *remove_btn; GtkWidget *file_entry; dbg_out("here\n"); view=lookup_widget(GTK_WIDGET(button),"attachedFilesView"); g_assert(view); remove_btn=lookup_widget(GTK_WIDGET(button),"AttachFileRemoveBtn"); g_assert(remove_btn); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); g_assert(sel); file_entry=lookup_widget(GTK_WIDGET(button),"AttachFilePathEntry"); g_assert(file_entry); g_assert(gtk_tree_selection_get_mode(sel) == GTK_SELECTION_SINGLE); if (gtk_tree_selection_get_selected(sel, &model, &selected_row)) { gchar *tree_path; gtk_tree_model_get (model, &selected_row, 0, &tree_path, -1); dbg_out("Selected: %s\n",tree_path); gtk_entry_set_text(GTK_ENTRY(file_entry), tree_path); g_free(tree_path); gtk_list_store_remove(GTK_LIST_STORE(model), &selected_row); gtk_widget_set_sensitive(remove_btn, FALSE); } } static int on_attach_window_drag_data_received(GtkWidget *widget,GtkSelectionData *data){ GtkWidget *attachment_editor; int rc; if (!data) return -EINVAL; dbg_out("here:data %s\n",(char *)data->data); attachment_editor=lookup_widget(widget,"attachFileEditor"); g_assert(attachment_editor); gtk_widget_show(attachment_editor); rc=handle_attachment_drag_data(data,attachment_editor); if (rc<0) ipmsg_err_dialog(_("Can not handle drag data %s (%d)"),strerror(-rc),-rc); return rc; } void on_attachedFilesView_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { int rc; dbg_out("here\n"); if (!data) return; rc=on_attach_window_drag_data_received(widget,data); if (rc<0) ipmsg_err_dialog(_("Can not handle drag data %s (%d)"),strerror(-rc),-rc); return; } static int elapsed_time(struct timeval *old,struct timeval *new,struct timeval *elaps){ time_t sec; suseconds_t usec; if ( (!old) || (!new) || (!elaps) ) return -EINVAL; if ( (!(old->tv_sec)) && (!(old->tv_usec)) ) return -ENOENT; sec=new->tv_sec; if (old->tv_usec > new->tv_usec) { --sec; usec=1000*1000 +(new->tv_usec - old->tv_usec); }else{ usec= new->tv_usec - old->tv_usec ; } sec -= old->tv_sec; elaps->tv_sec=sec; elaps->tv_usec=usec; return 0; } void on_DownLoadOKBtn_clicked (GtkButton *button, gpointer user_data) { dbg_out("Recv start"); recv_attachments(button); } void on_DownLoadCancelBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *window; dbg_out("here:\n"); window=lookup_widget(GTK_WIDGET(button),"downloadWindow"); g_assert(window); gtk_widget_destroy (window); } void on_DownLoadOpenBtn_clicked (GtkButton *button, gpointer user_data) { int rc; GtkWidget *parent_window; GtkWidget *dialog; GtkWidget *file_entry; struct stat stat_buf; dbg_out("here\n"); parent_window=lookup_widget(GTK_WIDGET(button),"downloadWindow"); file_entry=lookup_widget(GTK_WIDGET(button),"DownLoadDirectoryEntry"); /* * なんで, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDERが * アンドキュメンテッドなの? */ dialog = gtk_file_chooser_dialog_new ("Download Directory", GTK_WINDOW(parent_window), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog)); rc=stat(filename,&stat_buf); if (rc<0) goto free_file_out; if (!(S_ISDIR(stat_buf.st_mode))) goto free_file_out; gtk_entry_set_text(GTK_ENTRY(file_entry), filename); free_file_out: g_free (filename); } gtk_widget_destroy (dialog); } void on_attachFileEditorMainFrame_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { int rc; dbg_out("here\n"); if (!data) return; rc=on_attach_window_drag_data_received(widget,data); if (rc<0) ipmsg_err_dialog(_("Can not handle drag data %s (%d)"),strerror(-rc),-rc); return; } void on_entry3_activate (GtkEntry *entry, gpointer user_data) { GtkTreeView *treeview; const gchar *txt; dbg_out("here\n"); g_assert(entry); treeview = GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(entry),"treeview4")); txt = gtk_entry_get_text(GTK_ENTRY(entry)); if (txt && *txt) { GtkTreeModel *model; GtkTreeIter newrow; if (has_dupulicated_string_in_cell(txt,treeview)){ model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); gtk_list_store_append(GTK_LIST_STORE(model), &newrow); gtk_list_store_set(GTK_LIST_STORE(model), &newrow, 0, txt, -1); gtk_entry_set_text(GTK_ENTRY(entry), ""); /* clear entry */ } } } void on_entry3_changed (GtkEditable *editable, gpointer user_data) { GtkWidget *addr_entry; GtkWidget *configAddBcastBtn; gchar *addr; configAddBcastBtn=lookup_widget(GTK_WIDGET(editable),"configAddBcastBtn"); g_assert(configAddBcastBtn); addr_entry=lookup_widget(GTK_WIDGET(editable),"entry3"); g_assert(addr_entry); addr=(char *)gtk_entry_get_text(GTK_ENTRY(addr_entry)); if ( (addr) && (*addr) ) gtk_widget_set_sensitive(configAddBcastBtn,TRUE); else gtk_widget_set_sensitive(configAddBcastBtn,FALSE); } void on_downloadMonitor_destroy (GtkObject *object, gpointer user_data) { GtkWidget *window; dbg_out("here\n"); window=lookup_widget(GTK_WIDGET(object),"downloadMonitor"); download_monitor_remove_waiter_window(window); } void on_downloadMonitor_show (GtkWidget *widget, gpointer user_data) { GtkWidget *window; download_monitor_update_state(); } void on_deleteBtn_clicked (GtkButton *button, gpointer user_data) { download_monitor_delete_btn_action(button,user_data); } void on_updateBtn_clicked (GtkButton *button, gpointer user_data) { download_monitor_update_state(); } void on_closeBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *window; window=lookup_widget(GTK_WIDGET(button),"downloadMonitor"); g_assert(window); gtk_widget_destroy(GTK_WIDGET(window)); } void on_initialWindow_check_resize (GtkContainer *container, gpointer user_data) { dbg_out("here\n"); } void on_downloadWindow_check_resize (GtkContainer *container, gpointer user_data) { dbg_out("here\n"); } void on_aboutdialog_check_resize (GtkContainer *container, gpointer user_data) { dbg_out("here\n"); } void on_viewWindow_check_resize (GtkContainer *container, gpointer user_data) { dbg_out("here\n"); } void on_attachFileEditor_check_resize (GtkContainer *container, gpointer user_data) { dbg_out("here\n"); } void on_downloadMonitor_check_resize (GtkContainer *container, gpointer user_data) { dbg_out("here\n"); } void on_initialWindow_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { g_assert(allocation); dbg_out("here:(%d,%d)\n",allocation->width,allocation->height); } void on_downloadWindow_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { g_assert(allocation); dbg_out("here:(%d,%d)\n",allocation->width,allocation->height); } void on_aboutdialog_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { g_assert(allocation); dbg_out("here:(%d,%d)\n",allocation->width,allocation->height); } void on_viewWindow_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { g_assert(allocation); dbg_out("here:(%d,%d)\n",allocation->width,allocation->height); hostinfo_set_ipmsg_recv_window_size(allocation->width, allocation->height); } void on_attachFileEditor_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { g_assert(allocation); dbg_out("here:(%d,%d)\n",allocation->width,allocation->height); hostinfo_set_ipmsg_attach_editor_size(allocation->width, allocation->height); } void on_downloadMonitor_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { g_assert(allocation); dbg_out("here:(%d,%d)\n",allocation->width,allocation->height); } void on_messageWindow_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { g_assert(allocation); dbg_out("here:(%d,%d)\n",allocation->width,allocation->height); hostinfo_set_ipmsg_message_window_size(allocation->width, allocation->height); } gboolean on_viewwindowTextView_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { GtkTextView *text_view; GtkTextIter start_iter,end_iter; GtkTextBuffer *buffer; gchar *string; gchar *url; int rc; /* FixMe: Strictly speaking, this should set for each window */ static struct timeval old_tv; struct timeval new_tv; struct timeval elapsed_tv; GnomeVFSResult result; dbg_out("here\n"); switch (event->button) { case 1: #if GTK_CHECK_VERSION(2,10,0) gettimeofday(&new_tv, NULL); rc=elapsed_time(&old_tv,&new_tv, &elapsed_tv); if (rc == -EINVAL) goto update_out; if ( (rc != -ENOENT) && (!(elapsed_tv.tv_sec)) && (elapsed_tv.tv_usec < IPMSG_KEY_BTN_CHATTER_MS*1000) ) return FALSE; text_view=GTK_TEXT_VIEW(lookup_widget(widget,"viewwindowTextView")); g_assert(text_view); buffer=gtk_text_view_get_buffer(text_view); if (!(gtk_text_buffer_get_has_selection(buffer))) return FALSE; dbg_out("selected\n"); gtk_text_buffer_get_selection_bounds(buffer, &start_iter, &end_iter); string=gtk_text_buffer_get_text(buffer, &start_iter, &end_iter, FALSE); dbg_out("String:%s\n",string); result = gnome_vfs_url_show (string); /* * 操作ミスなどで無効パラメタは容易に発生するため, ダイアログの * 表示対称外とした. */ if ( (result != GNOME_VFS_OK) && (result != GNOME_VFS_ERROR_BAD_PARAMETERS) ) { ipmsg_err_dialog("%s URL=%s, reason: %s(%d)\n%s\n", _("Can not open URL"), string, gnome_vfs_result_to_string(result), result, _("Please check your gnome configuration(url-handler setting)")); } g_free(string); update_out: memcpy(&old_tv, &new_tv, sizeof(struct timeval)); break; #endif /* GTK_CHECK_VERSION(2,10,0) */ default: break; } return FALSE; } void on_absenceEditor_destroy (GtkObject *object, gpointer user_data) { } void on_absenceEditor_show (GtkWidget *widget, gpointer user_data) { } void on_applyAndAbsentBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *view; GtkWidget *window; window=GTK_WIDGET(lookup_widget(GTK_WIDGET(button),"absenceEditor")); g_assert(window); view=GTK_WIDGET(lookup_widget(GTK_WIDGET(button),"absenseTitles")); g_assert(view); update_fuzai_config(view,TRUE); gtk_widget_destroy(GTK_WIDGET(window)); } void on_applyOnlyBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *view; GtkWidget *window; window=GTK_WIDGET(lookup_widget(GTK_WIDGET(button),"absenceEditor")); g_assert(window); view=GTK_WIDGET(lookup_widget(GTK_WIDGET(button),"absenseTitles")); g_assert(view); update_fuzai_config(view,FALSE); } void on_configIPV6CheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { } void on_DownloadConfirmDialog_show (GtkWidget *widget, gpointer user_data) { } void on_DownloadConfirmDialog_destroy (GtkObject *object, gpointer user_data) { } void on_DownLoadConfirmClose_clicked (GtkButton *button, gpointer user_data) { } void on_DownLoadConfirmExec_clicked (GtkButton *button, gpointer user_data) { } gboolean on_messageWindow_key_release_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) { int rc; /* FixMe: Strictly speaking, this should set for each window */ static struct timeval old_tv; struct timeval new_tv; struct timeval elapsed_tv; GtkWidget *view; view=lookup_widget(widget,"messageUserTree"); if (!view) { dbg_out("No message window\n"); return FALSE; } gettimeofday(&new_tv, NULL); if (elapsed_time(&old_tv,&new_tv, &elapsed_tv)) goto update_out; if ( (!(elapsed_tv.tv_sec)) && (elapsed_tv.tv_usec < IPMSG_KEY_BTN_CHATTER_MS*1000) ) goto no_update_out; dbg_out("Here: key code: %d(%x) key: %s\n", event->keyval, event->keyval, event->string); if (event->keyval == GDK_F5) { userdb_invalidate_userdb(); ipmsg_send_br_entry(udp_con,0); } update_out: memcpy(&old_tv, &new_tv, sizeof(struct timeval)); return TRUE; no_update_out: return FALSE; } void on_textview1_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { g_assert(widget); g_assert(data); dbg_out("here:data %s\n",(char *)data->data); on_message_window_drag_data_received(widget,data); } gboolean on_textview1_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { return FALSE; } void on_absenceEditorCloseBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *window; window=GTK_WIDGET(lookup_widget(GTK_WIDGET(button),"absenceEditor")); g_assert(window); gtk_widget_destroy(GTK_WIDGET(window)); } void on_messageUserTree_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { g_assert(widget); g_assert(data); dbg_out("here:data %s\n",(char *)data->data); on_message_window_drag_data_received(widget,data); } void on_messageWinUpdateBtn_clicked (GtkButton *button, gpointer user_data) { ipmsg_update_ui_user_list(); } void on_sendBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *top = NULL; GtkTextView *text_view = NULL; GtkTextIter start_iter,end_iter; GtkTextBuffer *buffer = NULL; GtkToggleButton *enclose_toggle = NULL; GtkToggleButton *lock_toggle = NULL; GtkTreeView *view = NULL; GtkTreeSelection *sel = NULL; GtkWidget *attachment_editor = NULL; gint text_line = 0; gchar *string = NULL; gchar *to_string = NULL; int flags = 0; send_info_t info; GList *path_list = NULL; GtkTreeModel *model = NULL; gint sender_count = 0; dbg_out("here\n"); top = lookup_widget( GTK_WIDGET(button), "messageWindow"); g_assert(top != NULL); text_view = GTK_TEXT_VIEW( lookup_widget( GTK_WIDGET(button), "textview1")); g_assert(text_view != NULL); enclose_toggle = GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), "encloseCheckBtn")); g_assert(enclose_toggle != NULL); lock_toggle = GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), "lockChkBtn")); g_assert(lock_toggle != NULL); view = GTK_TREE_VIEW(lookup_widget( GTK_WIDGET(button), "messageUserTree") ); g_assert(view != NULL); attachment_editor = (GtkWidget*) g_object_get_data (G_OBJECT (top), "attach_win"); sel = gtk_tree_view_get_selection(view); sender_count=gtk_tree_selection_count_selected_rows(sel); if (!sender_count) { dbg_out("Not selected\n"); return; } /* following codes assume gtk_text_view_get_buffer(text_view) does not * allocate new reference * as gtk manual says. */ buffer=gtk_text_view_get_buffer(text_view); text_line=gtk_text_buffer_get_line_count(buffer); dbg_out("lines:%d\n",text_line); gtk_text_buffer_get_start_iter(buffer,&start_iter); gtk_text_buffer_get_end_iter(buffer,&end_iter); string=gtk_text_buffer_get_text(buffer, &start_iter, &end_iter, FALSE); g_assert(string); dbg_out("string:%s\n",string); /* * 送信属性取得 */ flags=hostinfo_get_normal_send_flags(); path_list=gtk_tree_selection_get_selected_rows(sel,&model); if (g_list_length(path_list)>1) flags |= IPMSG_MULTICASTOPT; g_list_foreach (path_list, (GFunc)gtk_tree_path_free, NULL); g_list_free (path_list); /* * 封書 */ if (gtk_toggle_button_get_active(enclose_toggle)) flags |= IPMSG_SECRETOPT; else flags &= ~IPMSG_SECRETOPT; /* * 錠前 */ if (gtk_toggle_button_get_active(lock_toggle)) flags |= IPMSG_PASSWORDOPT; else flags &= ~IPMSG_PASSWORDOPT; /* * 添付 */ info.flags=flags; info.msg=string; if (attachment_editor) { dbg_out("This message has attachment\n"); info.attachment_editor=attachment_editor; info.flags |= IPMSG_FILEATTACHOPT; } gtk_tree_selection_selected_foreach(sel,do_send,&info); if (hostinfo_is_ipmsg_absent()) { /* 不在モード強制解除 */ hostinfo_set_ipmsg_absent(FALSE); ipmsg_send_br_absence(udp_con,0); } free_out: g_free(string); gtk_widget_destroy(top); return; } void on_vpaned1_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { g_assert(widget); g_assert(data); dbg_out("here:data %s\n",(char *)data->data); on_message_window_drag_data_received(widget,data); } void on_AttachFileFileChooseBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *parent_window; GtkWidget *dialog; GtkWidget *file_entry; dbg_out("here\n"); parent_window=lookup_widget(GTK_WIDGET(button),"attachFileEditor"); dialog = gtk_file_chooser_dialog_new (_("AttachmentFile"), GTK_WINDOW(parent_window), GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); file_entry=lookup_widget(GTK_WIDGET(button),"AttachFilePathEntry"); gtk_entry_set_text(GTK_ENTRY(file_entry), filename); g_free (filename); } gtk_widget_destroy (dialog); } void on_AttachFilePathEntry_activate (GtkEntry *entry, gpointer user_data) { GtkWidget *parent_window; char *filename; dbg_out("here\n"); parent_window=lookup_widget(GTK_WIDGET(entry),"attachFileEditor"); filename=(char *)gtk_entry_get_text(entry); } void on_AttachFilePathEntry_changed (GtkEditable *editable, gpointer user_data) { GtkWidget *file_entry; GtkWidget *btn; gchar *filepath; off_t size; time_t mtime; ipmsg_ftype_t type; int rc; btn=lookup_widget(GTK_WIDGET(editable),"AttachFIleAddBtn"); file_entry=lookup_widget(GTK_WIDGET(editable),"AttachFilePathEntry"); filepath=(char *)gtk_entry_get_text(GTK_ENTRY(file_entry)); rc = get_file_info(filepath, &size, &mtime, &type); if ( (rc) || (!is_supported_file_type(type)) ) gtk_widget_set_sensitive(btn,FALSE); else gtk_widget_set_sensitive(btn,TRUE); } void on_AttachFilePathEntry_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { GList *files,*node; GtkWidget *entry; gchar *path; dbg_out("here\n"); if ( (!widget) || (!data) || (!(data->data)) ) return; entry=lookup_widget(widget,"AttachFilePathEntry"); g_assert(entry); files= gnome_vfs_uri_list_parse((gchar *)data->data); if (g_list_length(files) == 1) { /* 単一ファイルの場合は, ファイルパスをエントリに格納 */ node=g_list_first(files); g_assert(node); path=gnome_vfs_unescape_string(gnome_vfs_uri_get_path(files->data),NULL); dbg_out("draged file: %s\n",path); gtk_entry_set_text(GTK_ENTRY(entry),path); g_free(path); }else{ dbg_out("droped multiple files.\n"); } gnome_vfs_uri_list_free(files); } void on_absenceEditor_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data) { g_assert(allocation); dbg_out("here:(%d,%d)\n",allocation->width,allocation->height); hostinfo_set_ipmsg_absence_editor_size(allocation->width, allocation->height); } void on_messageWinCloseBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *window; dbg_out("here\n"); window=lookup_widget(GTK_WIDGET(button),"messageWindow"); g_assert(window); gtk_widget_destroy (window); } void on_configApplyBtn_clicked (GtkButton *button, gpointer user_data) { GtkRadioAction *action; GtkWidget *window=NULL; GtkWidget *viewConfigGroupChkBtn=NULL; GtkWidget *viewConfigHostChkBtn=NULL; GtkWidget *viewConfigIPAddrChkBtn=NULL; GtkWidget *viewConfigLogonChkBtn=NULL; GtkWidget *viewConfigPriorityChkBtn=NULL; GtkWidget *viewConfigGridChkBtn=NULL; GtkWidget *viewConfigGroupSortChkBtn=NULL; GtkWidget *viewConfigGroupInverseSortBtn=NULL; GtkWidget *viewConfigSecondKeyUserRBtn=NULL; GtkWidget *viewConfigSecondKeyMachineRBtn=NULL; GtkWidget *viewConfigSecondKeyIPAddrRBtn=NULL; GtkWidget *viewConfigOtherSortInverseBtn=NULL; uint state=0; int sub_sort_id=0; dbg_out("here\n"); window=lookup_widget(GTK_WIDGET(button),"viewConfigWindow"); viewConfigGroupChkBtn=lookup_widget(window,"viewConfigGroupChkBtn"); viewConfigHostChkBtn=lookup_widget(window, "viewConfigHostChkBtn"); viewConfigIPAddrChkBtn=lookup_widget(window,"viewConfigIPAddrChkBtn"); viewConfigLogonChkBtn=lookup_widget(window,"viewConfigLogonChkBtn"); viewConfigPriorityChkBtn=lookup_widget(window,"viewConfigPriorityChkBtn"); viewConfigGridChkBtn=lookup_widget(window,"viewConfigGridChkBtn"); viewConfigGroupSortChkBtn=lookup_widget(window,"groupSortCheckBtn"); viewConfigGroupInverseSortBtn=lookup_widget(window,"groupInverseBtn"); viewConfigSecondKeyUserRBtn=lookup_widget(window,"secondKeyUserRBtn"); viewConfigSecondKeyMachineRBtn=lookup_widget(window,"secondKeyMachineRBtn"); viewConfigSecondKeyIPAddrRBtn=lookup_widget(window,"secondKeyIPAddrRBtn"); viewConfigOtherSortInverseBtn=lookup_widget(window,"secondKeyInverseBtn"); g_assert(viewConfigGroupChkBtn); g_assert(viewConfigHostChkBtn); g_assert(viewConfigIPAddrChkBtn); g_assert(viewConfigLogonChkBtn); g_assert(viewConfigPriorityChkBtn); g_assert(viewConfigGridChkBtn); g_assert(viewConfigGroupSortChkBtn); g_assert(viewConfigGroupInverseSortBtn); g_assert(viewConfigSecondKeyUserRBtn); g_assert(viewConfigSecondKeyMachineRBtn); g_assert(viewConfigSecondKeyIPAddrRBtn); g_assert(viewConfigOtherSortInverseBtn); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigGroupChkBtn))) state |= HEADER_VISUAL_GROUP_ID; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigHostChkBtn))) state |= HEADER_VISUAL_HOST_ID; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigIPAddrChkBtn))) state |= HEADER_VISUAL_IPADDR_ID; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigLogonChkBtn))) state |= HEADER_VISUAL_LOGON_ID; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigPriorityChkBtn))) state |= HEADER_VISUAL_PRIO_ID; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigGridChkBtn))) state |= HEADER_VISUAL_GRID_ID; /* group */ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigGroupSortChkBtn))) hostinfo_set_ipmsg_sort_with_group(TRUE); else hostinfo_set_ipmsg_sort_with_group(FALSE); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigGroupInverseSortBtn))) hostinfo_set_ipmsg_group_sort_order(FALSE); else hostinfo_set_ipmsg_group_sort_order(TRUE); /* * sub sort */ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyIPAddrRBtn))) hostinfo_set_ipmsg_sub_sort_id(SORT_TYPE_IPADDR); else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyMachineRBtn))) hostinfo_set_ipmsg_sub_sort_id(SORT_TYPE_MACHINE); else hostinfo_set_ipmsg_sub_sort_id(SORT_TYPE_USER); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(viewConfigOtherSortInverseBtn))) hostinfo_set_ipmsg_sub_sort_order(FALSE); else hostinfo_set_ipmsg_sub_sort_order(TRUE); dbg_out("New state:%x (%d)\n",state,state); hostinfo_set_header_state(state); gtk_widget_destroy(GTK_WIDGET(window)); } static int update_prioriy_for_selection(GtkMenuItem *menuitem,int prio){ GtkWidget *window; GtkTreeView *view; GtkTreeSelection *sel; GtkTreeModel *model; GtkTreeIter iter; GList *pathes,*node; dbg_out("here:%x prio:%d\n",menuitem,prio); if ( (!menuitem) || (!( prio_is_valid(prio))) ) return -EINVAL; window=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); g_assert(window); view=GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(window),"messageUserTree")); g_assert(view); sel = gtk_tree_view_get_selection(view); pathes=gtk_tree_selection_get_selected_rows(sel,&model); for(node=g_list_first(pathes);node;node=g_list_next(node)) { g_assert( (node) && (node->data)); model=gtk_tree_view_get_model(view); gtk_tree_model_get_iter(model,&iter,node->data); userview_set_view_priority(model,node->data,&iter,prio); } g_list_foreach (pathes, (GFunc)gtk_tree_path_free, NULL); g_list_free (pathes); } static void do_get_client_info(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data){ gchar *ipaddr; int rc; int lflags; unsigned long cmd_no; cmd_no=(unsigned long)data; gtk_tree_model_get (model, iter, USER_VIEW_IPADDR_ID, &ipaddr, -1); lflags=hostinfo_get_normal_entry_flags(); dbg_out("Send %s request to %s from ui\n", (cmd_no == IPMSG_GETINFO)?("get version"):("get absence info"), ipaddr); rc=ipmsg_send_get_info_msg(udp_con,ipaddr,cmd_no); if (rc) ipmsg_err_dialog(_("Can not require %s to %s"), (cmd_no == IPMSG_GETINFO)?("get version"):("get absence info"), ipaddr); g_free(ipaddr); } void on_set_priority1_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); update_prioriy_for_selection(menuitem,1); } void on_set_priority_as_2_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); update_prioriy_for_selection(menuitem,2); } void on_set_priority_as_3_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); update_prioriy_for_selection(menuitem,3); } void on_set_priority_as_4_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); update_prioriy_for_selection(menuitem,4); } void on_set_as_default_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); update_prioriy_for_selection(menuitem,0); } void on_set_invisible_item_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); update_prioriy_for_selection(menuitem,-1); } void on_show_invisible_items1_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *window; if (!menuitem) return; window=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); g_assert(window); update_users_on_message_window(window, TRUE); } void on_set_all_as_default_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *window; GtkTreeView *view; GtkTreeSelection *sel; GtkTreeModel *model; GtkTreeIter iter; gboolean valid; if (!menuitem) return; window=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); g_assert(window); view=GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(window),"messageUserTree")); g_assert(view); model=gtk_tree_view_get_model(view); valid=gtk_tree_model_get_iter_first (model,&iter); while(valid){ userview_set_view_priority_without_update(model, NULL, &iter, USERLIST_DEFAULT_PRIO); valid = gtk_tree_model_iter_next (model, &iter); } update_all_user_list_view(); } void on_groupselection_activate (GtkMenuItem *menuitem, gpointer user_data) { } void on_attachmentfile_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *window; GtkWidget *attachment_editor; window=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); g_assert(window); attachment_editor=setup_attachment_editor(window); g_assert(attachment_editor); gtk_widget_show(attachment_editor); } void on_set_user_list_view_config_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *window; dbg_out("here\n"); window=internal_create_viewConfigWindow (); gtk_widget_show(window); } void on_groupInverseBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { } void on_secondKeyInverseBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { } void on_save_list_headers_state1_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *window; GtkWidget *view; GList *cols,*node; int count; dbg_out("here\n"); window=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); remind_headers_state(window); } void on_viewConfigCloseBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *window; dbg_out("here\n"); window=lookup_widget(GTK_WIDGET(button),"viewConfigWindow"); gtk_widget_destroy(GTK_WIDGET(window)); } void on_get_version1_activate (GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *top; GtkTreeView *view; GtkTreeSelection *sel; dbg_out("here\n"); top=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); view=GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(menuitem),"messageUserTree")); g_assert(view); g_assert(top); sel = gtk_tree_view_get_selection(view); gtk_tree_selection_selected_foreach(sel,do_get_client_info,(gpointer)IPMSG_GETINFO); } void on_absence_info1_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); GtkWidget *top; GtkTreeView *view; GtkTreeSelection *sel; dbg_out("here\n"); top=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); view=GTK_TREE_VIEW(lookup_widget(GTK_WIDGET(menuitem),"messageUserTree")); g_assert(view); g_assert(top); sel = gtk_tree_view_get_selection(view); gtk_tree_selection_selected_foreach(sel,do_get_client_info,(gpointer)IPMSG_GETABSENCEINFO); } void on_clientInfoOKBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *window; window=lookup_widget(GTK_WIDGET(button),"clientInfoWindow"); g_assert(window); gtk_widget_destroy(GTK_WIDGET(window)); } void on_sort_filter1_activate (GtkMenuItem *menuitem, gpointer user_data) { dbg_out("here\n"); } void on_menu_set_priority_as_1_activate (GtkMenuItem *menuitem, gpointer user_data) { on_set_priority1_activate(menuitem,user_data); } void on_menu_set_priority_as_2_activate (GtkMenuItem *menuitem, gpointer user_data) { on_set_priority_as_2_activate(menuitem,user_data); } void on_menu_set_priority_as_3_activate (GtkMenuItem *menuitem, gpointer user_data) { on_set_priority_as_3_activate(menuitem,user_data); } void on_menu_set_priority_as_4_activate (GtkMenuItem *menuitem, gpointer user_data) { on_set_priority_as_4_activate(menuitem,user_data); } void on_menu_set_them_as_default_activate (GtkMenuItem *menuitem, gpointer user_data) { on_set_as_default_activate(menuitem,user_data); } void on_menu_set_them_invisible_item_activate (GtkMenuItem *menuitem, gpointer user_data) { on_set_invisible_item_activate(menuitem,user_data); } void on_menu_show_invisible_items_activate (GtkMenuItem *menuitem, gpointer user_data) { on_show_invisible_items1_activate(menuitem,user_data); } void on_menu_set_all_as_default_activate (GtkMenuItem *menuitem, gpointer user_data) { on_set_all_as_default_activate(menuitem,user_data); } void on_menu_user_list_view_config_activate (GtkMenuItem *menuitem, gpointer user_data) { on_set_user_list_view_config_activate(menuitem,user_data); } void on_menu_save_list_headers_state_activate (GtkMenuItem *menuitem, gpointer user_data) { on_save_list_headers_state1_activate(menuitem,user_data); } void on_pubkeyPWDBtn_clicked (GtkButton *button, gpointer user_data) { password_setting_window(HOSTINFO_PASSWD_TYPE_ENCKEY); } void on_lockPWDBtn_clicked (GtkButton *button, gpointer user_data) { password_setting_window(HOSTINFO_PASSWD_TYPE_LOCK); } void on_configSecurityOKBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *window; window=lookup_widget(GTK_WIDGET(button),"securityConfig"); g_assert(window); apply_crypt_config_window(GTK_WINDOW(window)); gtk_widget_destroy(GTK_WIDGET(window)); } void on_configSecurityCancelBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *window; window=lookup_widget(GTK_WIDGET(button),"securityConfig"); g_assert(window); gtk_widget_destroy(GTK_WIDGET(window)); } void on_passwordEntry_activate (GtkEntry *entry, gpointer user_data) { } void on_passWordDialogCancelBtn_clicked (GtkButton *button, gpointer user_data) { } void on_passWordDialogCOKBtn_clicked (GtkButton *button, gpointer user_data) { } void on_decodeFailDialogOKButton_clicked (GtkButton *button, gpointer user_data) { GtkWidget *top; dbg_out("here\n"); top=lookup_widget(GTK_WIDGET(button),"decodeFaildialog"); g_assert(top); gtk_widget_destroy(top); } void on_errorDialogCloseBtn_pressed (GtkButton *button, gpointer user_data) { GtkWidget *top; dbg_out("here\n"); top=lookup_widget(GTK_WIDGET(button), "errorDialog"); g_assert(top); gtk_widget_destroy(top); } void on_menu_security_configuration_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *configWindow = NULL; configWindow = internal_create_crypt_config_window(); gtk_widget_show(configWindow); } void on_passWordOKBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *top = NULL; GtkEntry *new_passwd = NULL; const char *new_passwd_string = NULL; ipmsg_private_data_t *priv = NULL; char *enc_pass = NULL; int type = 0; int rc = 0; dbg_out("here\n"); top = lookup_widget(GTK_WIDGET(button), "passwdWindow"); g_assert(top); new_passwd = GTK_ENTRY(lookup_widget(top, "passwdEntry1")); g_assert(new_passwd != NULL); new_passwd_string = (char *)gtk_entry_get_text(GTK_ENTRY(new_passwd)); g_assert(new_passwd_string != NULL); priv = (ipmsg_private_data_t *)lookup_widget(top, "passWordType"); g_assert(priv != NULL); dbg_out("Private type=%d\n", (int)priv->data); IPMSG_ASSERT_PRIVATE(priv, IPMSG_PRIVATE_PASSWD); /* * パスワードをエンコードする */ if (new_passwd_string[0] != '\0') { rc = pbkdf2_encrypt(new_passwd_string, NULL, &enc_pass); if (rc != 0) goto error_out; /* Open SSLを使用しない場合等でありうる */ } else { /* 空文の場合は, 設定解除用に空文を設定する */ enc_pass = g_strdup(""); if (enc_pass == NULL) goto error_out; /* Open SSLを使用しない場合等でありうる */ } /* * エンコードしたパスワードを登録する */ type = (int)priv->data; switch(type) { case HOSTINFO_PASSWD_TYPE_ENCKEY: dbg_out("Register encrypt key password:%s\n", enc_pass); hostinfo_set_encryption_key_password((const char *)enc_pass); break; case HOSTINFO_PASSWD_TYPE_LOCK: dbg_out("Register lock password:%s\n", enc_pass); hostinfo_set_lock_password((const char *)enc_pass); break; default: g_assert_not_reached(); break; } error_out: if (enc_pass != NULL) g_free(enc_pass); gtk_widget_destroy(top); /* private情報は, 自動的に破棄される */ } void on_PassWordCancelBtn_clicked (GtkButton *button, gpointer user_data) { GtkWidget *top = NULL; dbg_out("here\n"); top = lookup_widget(GTK_WIDGET(button), "passwdWindow"); g_assert(top); gtk_widget_destroy(top); } static int password_window_passwd_changed(GtkEditable *editable) { GtkWindow *window = NULL; GtkButton *ok_button = NULL; GtkEntry *current_passwd = NULL; GtkEntry *new_passwd = NULL; GtkEntry *confirmed_passwd = NULL; char *current_passwd_string = NULL; char *new_passwd_string = NULL; char *confirm_passwd_string = NULL; const char *configured_encoded_passwd = NULL; ipmsg_private_data_t *priv = NULL; int type = 0; int rc = 0; dbg_out("here\n"); g_assert(editable != NULL); window = GTK_WINDOW(lookup_widget(GTK_WIDGET(editable), "passwdWindow")); g_assert(window != NULL); /* * ウィジェット獲得 */ current_passwd = GTK_ENTRY(lookup_widget(GTK_WIDGET(window), "currentPassWordEntry")); g_assert(current_passwd != NULL); new_passwd = GTK_ENTRY(lookup_widget(GTK_WIDGET(window), "passwdEntry1")); g_assert(new_passwd != NULL); confirmed_passwd = GTK_ENTRY(lookup_widget(GTK_WIDGET(window), "passwdEntry2")); g_assert(confirmed_passwd != NULL); ok_button = GTK_BUTTON(lookup_widget(GTK_WIDGET(window), "passWordOKBtn")); current_passwd_string = (char *)gtk_entry_get_text(GTK_ENTRY(current_passwd)); g_assert(current_passwd_string != NULL); new_passwd_string = (char *)gtk_entry_get_text(GTK_ENTRY(new_passwd)); g_assert(new_passwd_string != NULL); confirm_passwd_string = (char *)gtk_entry_get_text(GTK_ENTRY(confirmed_passwd)); g_assert(confirm_passwd_string != NULL); priv = (ipmsg_private_data_t *)lookup_widget(GTK_WIDGET(window),"passWordType"); g_assert(priv != NULL); dbg_out("Private type=%d\n", (int)priv->data); IPMSG_ASSERT_PRIVATE(priv, IPMSG_PRIVATE_PASSWD); /* * エンコードされたパスワードを取得する */ type = (int)priv->data; switch(type) { case HOSTINFO_PASSWD_TYPE_ENCKEY: configured_encoded_passwd = hostinfo_refer_encryption_key_password(); break; case HOSTINFO_PASSWD_TYPE_LOCK: configured_encoded_passwd = hostinfo_refer_lock_password(); break; default: g_assert_not_reached(); break; } rc = -EPERM; /* * 入力したパスワードが一致していて, かつ, 現在パスワードが未設定かまたは, * 現在のパスワードを正確に入力していた場合は, * OKボタンを有効にする. * セキュリティ上は, あまり好ましくない実装だが, * 初心者にはこのほうがよいと判断した. */ if ( (g_utf8_collate(new_passwd_string, confirm_passwd_string) == 0) && ( (pbkdf2_encoded_passwd_configured(configured_encoded_passwd)) || (pbkdf2_verify(current_passwd_string, configured_encoded_passwd) == 0) ) ) rc = 0; if (rc == 0) gtk_widget_set_sensitive(GTK_WIDGET(ok_button), TRUE); else gtk_widget_set_sensitive(GTK_WIDGET(ok_button), FALSE); return rc; } void on_passwdEntry1_changed (GtkEditable *editable, gpointer user_data) { dbg_out("here\n"); password_window_passwd_changed(editable); } void on_passwdEntry2_changed (GtkEditable *editable, gpointer user_data) { dbg_out("here\n"); password_window_passwd_changed(editable); } void on_currentPassWordEntry_changed (GtkEditable *editable, gpointer user_data) { dbg_out("here\n"); password_window_passwd_changed(editable); } void on_RSAKeyEncryptionCBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data){ update_rsa_encryption_button_state(togglebutton); } void on_useLockCBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data){ update_lockkey_button_state(togglebutton); } void on_lockChkBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { } void on_encloseCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data) { GtkToggleButton *enclose_toggle = NULL; GtkToggleButton *lock_toggle = NULL; dbg_out("here\n"); enclose_toggle = GTK_TOGGLE_BUTTON(lookup_widget(GTK_WIDGET(togglebutton),"encloseCheckBtn")); g_assert(enclose_toggle != NULL); lock_toggle = GTK_TOGGLE_BUTTON(lookup_widget(GTK_WIDGET(togglebutton), "lockChkBtn")); g_assert(lock_toggle != NULL); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(enclose_toggle))) { gtk_widget_set_sensitive(GTK_WIDGET(lock_toggle), TRUE); } else { gtk_widget_set_sensitive(GTK_WIDGET(lock_toggle), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lock_toggle), FALSE); } } gboolean on_readNotifyDialog_window_state_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { dbg_out("Here\n"); return FALSE; } void on_enableLogToggle_toggled (GtkToggleButton *togglebutton, gpointer user_data) { } g2ipmsg-0.9.6+dfsg/src/callbacks.h000066400000000000000000001200321126724573600167070ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include void on_app1_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); gboolean on_app1_drag_drop (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, guint time, gpointer user_data); gboolean on_app1_destroy_event (GtkWidget *widget, GdkEvent *event, gpointer user_data); void on_app1_destroy (GtkObject *object, gpointer user_data); void on_new1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_quit1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_preferences1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_update1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_update2_activate (GtkMenuItem *menuitem, gpointer user_data); void on_about1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_sendBtn_released (GtkButton *button, gpointer user_data); void on_sendBtn_pressed (GtkButton *button, gpointer user_data); void on_sendBtn_clicked (GtkButton *button, gpointer user_data); void on_encloseCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_comboboxentry1_editing_done (GtkCellEditable *celleditable, gpointer user_data); void on_configOpenCheckChkBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_configNonPopupCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_configNoSoundCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_configEncloseEnableCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_configCitationCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_configLoggingEnableCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_configUserEnableCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_logFileDialogBtn_pressed (GtkButton *button, gpointer user_data); void on_logFileDialogBtn_released (GtkButton *button, gpointer user_data); void on_logFileDialogBtn_clicked (GtkButton *button, gpointer user_data); void on_entry1_editing_done (GtkCellEditable *celleditable, gpointer user_data); void on_configAddBcastBtn_pressed (GtkButton *button, gpointer user_data); void on_configAddBcastBtn_released (GtkButton *button, gpointer user_data); void on_configAddBcastBtn_clicked (GtkButton *button, gpointer user_data); void on_configRemoveBcastBtn_pressed (GtkButton *button, gpointer user_data); void on_configRemoveBcastBtn_released (GtkButton *button, gpointer user_data); void on_configRemoveBcastBtn_clicked (GtkButton *button, gpointer user_data); void on_configApplySettingBtn_clicked (GtkButton *button, gpointer user_data); void on_configApplySettingBtn_pressed (GtkButton *button, gpointer user_data); void on_configApplySettingBtn_released (GtkButton *button, gpointer user_data); void on_configCancelBtn_pressed (GtkButton *button, gpointer user_data); void on_configCancelBtn_released (GtkButton *button, gpointer user_data); void on_configCancelBtn_clicked (GtkButton *button, gpointer user_data); void on_startBtn_clicked (GtkButton *button, gpointer user_data); void on_attachment1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_quit1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_entry2_activate (GtkEntry *entry, gpointer user_data); gboolean on_downloadWindow_destroy_event (GtkWidget *widget, GdkEvent *event, gpointer user_data); void on_clist4_click_column (GtkCList *clist, gint column, gpointer user_data); void on_downloadSaveBtn_clicked (GtkButton *button, gpointer user_data); void on_close_button1_clicked (GtkButton *button, gpointer user_data); void on_configWindow_destroy (GtkObject *object, gpointer user_data); void on_initialWindow_destroy (GtkObject *object, gpointer user_data); void on_downloadWindow_destroy (GtkObject *object, gpointer user_data); void on_downloadDialog_destroy (GtkObject *object, gpointer user_data); void on_messageWindow_drag_data_get (GtkWidget *widget, GdkDragContext *drag_context, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_messageWindow_drag_end (GtkWidget *widget, GdkDragContext *drag_context, gpointer user_data); void on_downloadfilechooserdialog_destroy (GtkObject *object, gpointer user_data); GtkFileChooserConfirmation on_downloadfilechooserdialog_confirm_overwrite (GtkFileChooser *filechooser, gpointer user_data); void on_downloadfilechooserdialog_current_folder_changed (GtkFileChooser *filechooser, gpointer user_data); void on_downloadfilechooserdialog_file_activated (GtkFileChooser *filechooser, gpointer user_data); void on_downloadfilechooserdialog_update_preview (GtkFileChooser *filechooser, gpointer user_data); void on_downloadfilechooserdialog_close (GtkDialog *dialog, gpointer user_data); void on_downloadfilechooserdialog_response (GtkDialog *dialog, gint response_id, gpointer user_data); void on_logfileChooserdialog_destroy (GtkObject *object, gpointer user_data); void on_logfileChooserdialog_close (GtkDialog *dialog, gpointer user_data); void on_logfileChooserdialog_response (GtkDialog *dialog, gint response_id, gpointer user_data); void on_aboutdialog_destroy (GtkObject *object, gpointer user_data); void on_aboutdialog_close (GtkDialog *dialog, gpointer user_data); void on_aboutdialog_response (GtkDialog *dialog, gint response_id, gpointer user_data); void on_readNotifyDialog_close (GtkDialog *dialog, gpointer user_data); void on_readNotifyDialog_response (GtkDialog *dialog, gint response_id, gpointer user_data); void on_readNotifyDialog_destroy (GtkObject *object, gpointer user_data); void on_readNotifyDialogOKBtn_pressed (GtkButton *button, gpointer user_data); gboolean on_messageUserTree_select_cursor_row (GtkTreeView *treeview, gboolean start_editing, gpointer user_data); gboolean on_messageUserTree_drag_drop (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, guint time, gpointer user_data); void on_messageWindow_show (GtkWidget *widget, gpointer user_data); void on_viewWindow_destroy (GtkObject *object, gpointer user_data); void on_viewWindow_show (GtkWidget *widget, gpointer user_data); void on_initialWindow_show (GtkWidget *widget, gpointer user_data); void on_viewwindowCloseBtn_clicked (GtkButton *button, gpointer user_data); void on_viewwindowReplyBtn_clicked (GtkButton *button, gpointer user_data); void on_viewwindowCitationCheck_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_comboboxentry1_editing_done (GtkCellEditable *celleditable, gpointer user_data); void on_comboboxentry1_set_focus_child (GtkContainer *container, GtkWidget *widget, gpointer user_data); void on_entry1_activate (GtkEntry *entry, gpointer user_data); void on_entry3_activate (GtkEntry *entry, gpointer user_data); void on_entry3_editing_done (GtkCellEditable *celleditable, gpointer user_data); void on_configWindow_show (GtkWidget *widget, gpointer user_data); void on_comboboxentry1_editing_done (GtkCellEditable *celleditable, gpointer user_data); void on_configWindow_clicked (GtkButton *button, gpointer user_data); void on_configWindowAddGroupBtn_clicked (GtkButton *button, gpointer user_data); void on_loginNameLoggingToggle_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_logIPAddrToggle_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_enableLogToggle_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_sendFailDialog_show (GtkWidget *widget, gpointer user_data); void on_sendFailDialog_destroy (GtkObject *object, gpointer user_data); void on_sendFailDialog_response (GtkDialog *dialog, gint response_id, gpointer user_data); void on_sendFailDialog_close (GtkDialog *dialog, gpointer user_data); void on_cancelbutton1_clicked (GtkButton *button, gpointer user_data); void on_okbutton1_clicked (GtkButton *button, gpointer user_data); void on_messageUserTree_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_close1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_attachFileEditor_destroy (GtkObject *object, gpointer user_data); void on_attachFileEditor_show (GtkWidget *widget, gpointer user_data); void on_AttachFilePathEntry_activate (GtkEntry *entry, gpointer user_data); void on_AttachFileFileChooseBtn_clicked (GtkButton *button, gpointer user_data); void on_AttachFIleAddBtn_clicked (GtkButton *button, gpointer user_data); void on_AttachFileRemoveBtn_clicked (GtkButton *button, gpointer user_data); void on_attachedFilesView_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_AttachFilePathEntry_changed (GtkEditable *editable, gpointer user_data); void on_DownLoadOKBtn_clicked (GtkButton *button, gpointer user_data); void on_DownLoadCancelBtn_clicked (GtkButton *button, gpointer user_data); void on_DownLoadOpenBtn_clicked (GtkButton *button, gpointer user_data); void on_messageSeparator_destroy (GtkObject *object, gpointer user_data); void on_messageSeparator_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_textview1_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_attachFileEditorMainFrame_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_AttachFilePathEntry_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_entry3_changed (GtkEditable *editable, gpointer user_data); void on_downloadMonitor_destroy (GtkObject *object, gpointer user_data); void on_downloadMonitor_show (GtkWidget *widget, gpointer user_data); void on_deleteBtn_clicked (GtkButton *button, gpointer user_data); void on_closeBtn_clicked (GtkButton *button, gpointer user_data); void on_updateBtn_clicked (GtkButton *button, gpointer user_data); void on_closeBtn_clicked (GtkButton *button, gpointer user_data); void on_messageWindow_check_resize (GtkContainer *container, gpointer user_data); void on_initialWindow_check_resize (GtkContainer *container, gpointer user_data); void on_downloadWindow_check_resize (GtkContainer *container, gpointer user_data); void on_aboutdialog_check_resize (GtkContainer *container, gpointer user_data); void on_viewWindow_check_resize (GtkContainer *container, gpointer user_data); void on_attachFileEditor_check_resize (GtkContainer *container, gpointer user_data); void on_downloadMonitor_check_resize (GtkContainer *container, gpointer user_data); void on_initialWindow_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data); void on_downloadWindow_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data); void on_aboutdialog_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data); void on_viewWindow_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data); void on_attachFileEditor_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data); void on_downloadMonitor_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data); void on_messageWindow_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data); void on_textview1_selection_received (GtkWidget *widget, GtkSelectionData *data, guint time, gpointer user_data); void on_textview1_set_anchor (GtkTextView *textview, gpointer user_data); gboolean on_textview1_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data); gboolean on_viewwindowTextView_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data); void on_absenceEditor_destroy (GtkObject *object, gpointer user_data); void on_absenceEditor_show (GtkWidget *widget, gpointer user_data); void on_button7_clicked (GtkButton *button, gpointer user_data); void on_button8_clicked (GtkButton *button, gpointer user_data); void on_applyAndAbsentBtn_clicked (GtkButton *button, gpointer user_data); void on_applyOnlyBtn_clicked (GtkButton *button, gpointer user_data); void on_applyOnlyBtn_clicked (GtkButton *button, gpointer user_data); void on_configIPV6CheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_DownloadConfirmDialog_show (GtkWidget *widget, gpointer user_data); void on_DownloadConfirmDialog_destroy (GtkObject *object, gpointer user_data); void on_DownLoadConfirmClose_clicked (GtkButton *button, gpointer user_data); void on_DownLoadConfirmExec_clicked (GtkButton *button, gpointer user_data); gboolean on_messageWindow_key_release_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data); void on_messageUserTree_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_textview1_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); gboolean on_textview1_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data); void on_absenceEditorCloseBtn_clicked (GtkButton *button, gpointer user_data); void on_messageUserTree_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_messageWinUpdateBtn_clicked (GtkButton *button, gpointer user_data); void on_sendBtn_clicked (GtkButton *button, gpointer user_data); void on_encloseCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_vpaned1_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_AttachFileFileChooseBtn_clicked (GtkButton *button, gpointer user_data); void on_AttachFilePathEntry_activate (GtkEntry *entry, gpointer user_data); void on_AttachFilePathEntry_changed (GtkEditable *editable, gpointer user_data); void on_AttachFilePathEntry_drag_data_received (GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data); void on_viewwindowCitationCheck_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_absenceEditor_size_allocate (GtkWidget *widget, GdkRectangle *allocation, gpointer user_data); void on_messageWinCloseBtn_clicked (GtkButton *button, gpointer user_data); void on_groupInverseBtn_clicked (GtkButton *button, gpointer user_data); void on_secondKeyInverseBtn_clicked (GtkButton *button, gpointer user_data); void on_configApplyBtn_clicked (GtkButton *button, gpointer user_data); void on_set_priority1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_set_priority_as_2_activate (GtkMenuItem *menuitem, gpointer user_data); void on_set_priority_as_3_activate (GtkMenuItem *menuitem, gpointer user_data); void on_set_priority_as_4_activate (GtkMenuItem *menuitem, gpointer user_data); void on_set_as_default_activate (GtkMenuItem *menuitem, gpointer user_data); void on_set_invisible_item_activate (GtkMenuItem *menuitem, gpointer user_data); void on_show_invisible_items1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_set_all_as_default_activate (GtkMenuItem *menuitem, gpointer user_data); void on_groupselection_activate (GtkMenuItem *menuitem, gpointer user_data); void on_attachmentfile_activate (GtkMenuItem *menuitem, gpointer user_data); void on_set_user_list_view_config_activate (GtkMenuItem *menuitem, gpointer user_data); void on_groupInverseBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_secondKeyInverseBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_save_list_headers_state1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_viewConfigCloseBtn_clicked (GtkButton *button, gpointer user_data); void on_secondKeyUserRBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_secondKeyMachineRBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_secondKeyIPAddrRBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_get_version1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_absence_info1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_clientInfoOKBtn_clicked (GtkButton *button, gpointer user_data); void on_sort_filter1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_set_priority_as_1_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_set_priority_as_2_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_set_priority_as_3_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_set_priority_as_4_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_set_them_as_default_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_set_them_invisible_item_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_show_invisible_items_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_set_all_as_default_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_user_list_view_config_activate (GtkMenuItem *menuitem, gpointer user_data); void on_menu_save_list_headers_state_activate (GtkMenuItem *menuitem, gpointer user_data); void on_pubkeyPWDBtn_clicked (GtkButton *button, gpointer user_data); void on_lockPWDBtn_clicked (GtkButton *button, gpointer user_data); void on_configSecurityOKBtn_clicked (GtkButton *button, gpointer user_data); void on_configSecurityCancelBtn_clicked (GtkButton *button, gpointer user_data); void on_passwordEntry_activate (GtkEntry *entry, gpointer user_data); void on_passWordDialogCancelBtn_clicked (GtkButton *button, gpointer user_data); void on_passWordDialogCOKBtn_clicked (GtkButton *button, gpointer user_data); void on_security_config_activate (GtkMenuItem *menuitem, gpointer user_data); void on_decodeFailDialogOKButton_clicked (GtkButton *button, gpointer user_data); void on_errorDialogCloseBtn_pressed (GtkButton *button, gpointer user_data); void on_menu_security_configuration_activate (GtkMenuItem *menuitem, gpointer user_data); void on_passWordOKBtn_clicked (GtkButton *button, gpointer user_data); void on_PassWordCancelBtn_clicked (GtkButton *button, gpointer user_data); void on_passwdEntry1_changed (GtkEditable *editable, gpointer user_data); void on_passwdEntry2_changed (GtkEditable *editable, gpointer user_data); void on_currentPassWordEntry_changed (GtkEditable *editable, gpointer user_data); void on_RSAKeyEncryptionCBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_useLockCBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_lockChkBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); void on_encloseCheckBtn_toggled (GtkToggleButton *togglebutton, gpointer user_data); gboolean on_readNotifyDialog_window_state_event (GtkWidget *widget, GdkEvent *event, gpointer user_data); void on_readNotifyWindowOkBtn_clicked (GtkButton *button, gpointer user_data); void on_enableLogToggle_toggled (GtkToggleButton *togglebutton, gpointer user_data); g2ipmsg-0.9.6+dfsg/src/codeset.c000066400000000000000000000264371126724573600164270ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** @file * @brief 文字コードセット操作 * @author Takeharu KATO */ /** 文字コード変換排他処理用ロック変数 */ GStaticMutex convert_mutex = G_STATIC_MUTEX_INIT; /** サポートしているコードセット */ static char *supported_codes[]={ "CP367", "UTF-8", "ISO-10646-UCS-2", "UCS-2BE", "UCS-2LE", "ISO-10646-UCS-4", "UCS-4BE", "UCS-4LE", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-32", "UTF-32BE", "UTF-32LE", "UTF-7", "UCS-2-INTERNAL", "UCS-2-SWAPPED", "UCS-4-INTERNAL", "UCS-4-SWAPPED", "C99", "JAVA", "CP819", "ISO-8859-2", "ISO-8859-3", "ISO-8859-4", "CYRILLIC", "ARABIC", "ECMA-118", "HEBREW", "ISO-8859-9", "ISO-8859-10", "ISO-8859-11", "ISO-8859-13", "ISO-8859-14", "ISO-8859-15", "ISO-8859-16", "KOI8-R", "KOI8-U", "KOI8-RU", "CP1250", "CP1251", "CP1252", "CP1253", "CP1254", "CP1255", "CP1256", "CP1257", "CP1258", "CP850", "CP862", "CP866", "MAC", "MACCENTRALEUROPE", "MACICELAND", "MACCROATIAN", "MACROMANIA", "MACCYRILLIC", "MACUKRAINE", "MACGREEK", "MACTURKISH", "MACHEBREW", "MACARABIC", "MACTHAI", "HP-ROMAN8", "NEXTSTEP", "ARMSCII-8", "GEORGIAN-ACADEMY", "GEORGIAN-PS", "KOI8-T", "CP154", "MULELAO-1", "CP1133", "ISO-IR-166", "CP874", "VISCII", "TCVN", "ISO-IR-14", "JISX0201-1976", "ISO-IR-87", "ISO-IR-159", "ISO646-CN", "ISO-IR-58", "CN-GB-ISOIR165", "EUC-JP", "EUC-JP-MS", "CP932", "ISO-2022-JP", "ISO-2022-JP-1", "ISO-2022-JP-2", "EUC-CN", "GBK", "CP936", "GB18030", "ISO-2022-CN", "ISO-2022-CN-EXT", "HZ-GB-2312", "EUC-TW", "BIG-5", "CP950", "BIG5-HKSCS:1999", "BIG5-HKSCS:2001", "BIG5-HKSCS", "EUC-KR", "CP949", "CP1361", "ISO-2022-KR", "CP856", "CP922", "CP943", "CP1046", "CP1124", "CP1129", "CP1161", "CP1162", "CP1163", "DEC-KANJI", "DEC-HANYU", "CP437", "CP737", "CP775", "CP852", "CP853", "CP855", "CP857", "CP858", "CP860", "CP861", "CP863", "CP864", "CP865", "CP869", "CP1125", "EUC-JISX0213", "SHIFT_JISX0213", "ISO-2022-JP-3", "BIG5-2003", "ISO-IR-230", "ATARI", "RISCOS-LATIN1", NULL /* 番兵 */ }; /** 指定されたエンコーディングが有効であることを確認する * @param[in] encoding エンコーディング指定文字列 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOSYS 未サポート */ static int check_valid_encoding(const char *encoding) { int rc = 0; GIConv converter; if (encoding == NULL) return -EINVAL; /* 内部コードへの変換可否 */ converter = g_iconv_open(IPMSG_INTERNAL_CODE, encoding); if (converter == (GIConv)-1) return -ENOSYS; /* 未サポート */ g_iconv_close(converter); /* 外部コードへの変換可否 */ converter = g_iconv_open(encoding, IPMSG_INTERNAL_CODE); if (converter == (GIConv)-1) return -ENOSYS; /* 未サポート */ g_iconv_close(converter); return 0; } /** 文字コード一覧をComboBoxに登録する * @param[out] combobox エンコーディング指定コンボボックス * @retval 0 正常終了 * @retval -EINVAL 引数異常(comboboxがNULL) * @retval -ENOMEM メモリ不足 */ int setup_encoding_combobox(GtkComboBox *combobox) { int i = 0; int rc = 0; int index = -1; int code_nr = 0; const char *current_encoding = NULL; if (combobox == NULL) { rc = -EINVAL; goto error_out; } /* デフォルトエンコードを先頭に持ってくる * 指定されたデフォルトエンコードが使用できなかった場合は, * Windows版のデフォルトであるCP932を使用する. */ rc = check_valid_encoding(IPMSG_EXTERNAL_CHARCODE); if (rc == 0) gtk_combo_box_append_text(combobox, IPMSG_EXTERNAL_CHARCODE); else gtk_combo_box_append_text(combobox, IPMSG_WINIPMSG_PROTO_CODE); /* * 現在の設定値を確認 */ current_encoding = hostinfo_refer_encoding(); if (!strcasecmp(IPMSG_EXTERNAL_CHARCODE, current_encoding)) index = 0; /* 現在の設定値を設定 */ for(i = 0, code_nr = 1; supported_codes[i] != NULL; ++i) { /* * エンコーディングの有効性を確認 */ rc = check_valid_encoding(supported_codes[i]); if (rc != 0) { err_out("Codeset:^s can not supported on this platform.\n", supported_codes[i]); continue; /* 使用不可能 */ } /* * デフォルト以外を登録 */ if (strcasecmp(IPMSG_EXTERNAL_CHARCODE, supported_codes[i])) { gtk_combo_box_append_text(combobox, supported_codes[i]); /* * エンコードの設定値をデフォルトにする */ if (!strcasecmp(supported_codes[i], current_encoding)) index = code_nr; /* インデクスを設定 */ ++code_nr; } } /* 現在のエンコードをアクティブにする */ if (index > 0) gtk_combo_box_set_active(combobox, index); else gtk_combo_box_set_active(combobox, 0); success_out: rc = 0; error_out: return rc; } /** 文字コードを内部形式に変換する * @param[in] string 変換対象の文字列 * @param[out] to_string 変換後の文字列を指すポインタ変数のアドレス * @retval 0 正常終了(string, to_stringのいずれかがNULL). * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int convert_string_internal(const char *string, const gchar **to_string) { int rc = 0; gsize read_len = 0; gsize write_len = 0; GError *error_info = NULL; gchar *converted_string = NULL; const char *external_encode = NULL; if ( (string == NULL) || (to_string == NULL) ) return -EINVAL; external_encode = hostinfo_refer_encoding(); /* 外部エンコード取得 */ g_static_mutex_lock(&convert_mutex); converted_string = g_convert((const gchar *)string, -1, /* ヌルターミネート */ IPMSG_INTERNAL_CODE, (external_encode != NULL) ? (external_encode) : (IPMSG_PROTO_CODE), &read_len, &write_len, &error_info); rc = -EINVAL; if (converted_string == NULL) { if (error_info != NULL) { dbg_out("%s\n",error_info->message); rc = error_info->code; g_error_free(error_info); } if (rc > 0) rc = -rc; g_static_mutex_unlock(&convert_mutex); goto error_out; } *to_string = converted_string; rc = 0; /* 正常終了 */ g_static_mutex_unlock(&convert_mutex); error_out: return rc; } /** 文字コードを外部形式に変換する * @param[in] ipaddr 変換後の文字列を送信する先を表すIPアドレス * - IPMSG_PROTOCOL_ENTRY_PKT_ADDR デフォルトコードセットへ変換 * - 上記以外 UTF-8ホストの場合UTF-8変換 * @param[in] string 変換対象の文字列 * @param[out] to_string 変換後の文字列を指すポインタ変数のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(string, to_stringのいずれかがNULL). * @retval -ENOMEM メモリ不足 */ int ipmsg_convert_string_external(const char *ipaddr, const char *string, const gchar **to_string) { int rc = 0; ipmsg_cap_t peer_cap = 0; gsize read_len = 0; gsize write_len = 0; ipmsg_cap_t peer_crypt_cap = 0; GError *error_info = NULL; gchar *converted_string = NULL; const char *external_encode = NULL; if ( (string == NULL) || (to_string == NULL) ) return -EINVAL; #if defined(IPMSG_UTF8_SUPPORT) /* * UTF-8ホスト対応 */ if (ipaddr != IPMSG_PROTOCOL_ENTRY_PKT_ADDR) { /* * ブロードキャスト系以外のパケットの場合, UTF-8送信を試みる */ rc = userdb_get_cap_by_addr(ipaddr, &peer_cap, &peer_crypt_cap); if (rc != 0) { goto start_default_encoding; /* 能力不明 */ } if ( !(peer_cap & IPMSG_UTF8OPT) ) goto start_default_encoding; /* 非UTF-8ホスト */ /* * UTF-8で送信 */ /* GNOME2の内部コードはUTF-8なので単にコピーする */ converted_string = g_strdup(string); if (converted_string == NULL) { rc = -ENOMEM; goto error_out; } goto convert_end; } #endif /* IPMSG_UTF8_SUPPORT */ start_default_encoding: /* * デフォルトエンコーディング */ external_encode = hostinfo_refer_encoding(); /* 外部エンコード取得 */ g_static_mutex_lock(&convert_mutex); converted_string = g_convert((const gchar *)string, -1, /* ヌルターミネート */ (external_encode != NULL) ? (external_encode) : (IPMSG_PROTO_CODE), IPMSG_INTERNAL_CODE, &read_len, &write_len, &error_info); g_static_mutex_unlock(&convert_mutex); rc = -EINVAL; if (converted_string == NULL) { if (error_info != NULL) { dbg_out("%s\n", error_info->message); rc = error_info->code; g_error_free(error_info); } if (rc > 0) rc = -rc; goto error_out; } convert_end: *to_string = converted_string; rc = 0; error_out: return rc; } /** 文字コードを内部形式に変換する * @param[in] ipaddr 変換後の文字列を送信する先を表すIPアドレス * - IPMSG_PROTOCOL_ENTRY_PKT_ADDR * デフォルトコードセットから変換 * - 上記以外 UTF-8ホストの場合UTF-8から変換 * @param[in] string 変換対象の文字列 * @param[out] to_string 変換後の文字列を指すポインタ変数のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(string, to_stringのいずれかがNULL). * @retval -ENOMEM メモリ不足 */ int ipmsg_convert_string_internal(const char *ipaddr, const char *string, const gchar **to_string) { return convert_string_internal(string,to_string); } g2ipmsg-0.9.6+dfsg/src/codeset.h000066400000000000000000000041001126724573600164130ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(CODESET_H) #define CODESET_H /** @file * @brief 文字コードセット操作関連定義 * @author Takeharu KATO */ #ifdef HAVE_CONFIG_H # include #endif #include /** 内部コードのコード種別 */ #define IPMSG_INTERNAL_CODE "UTF-8" /** 標準(Windows版)ipmsgの外部コード形式 */ #define IPMSG_WINIPMSG_PROTO_CODE "CP932" /** デフォルトの外部コード形式 */ #define IPMSG_PROTO_CODE IPMSG_EXTERNAL_CHARCODE int setup_encoding_combobox(GtkComboBox *); int ipmsg_convert_string_external(const char *, const char *, const gchar **); int ipmsg_convert_string_internal(const char *, const char *, const gchar **); int convert_string_internal(const char *, const gchar **); #endif /* CODESET_H */ g2ipmsg-0.9.6+dfsg/src/common.h000066400000000000000000000072361126724573600162720ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef COMMON_H #define COMMON_H /** @file * @brief G2IPMSG common definition * @author Takeharu KATO */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(HAVE_LIBINTL_H) #include #endif /* HAVE_LIBINTL_H */ #if defined(ENABLE_APPLET) #include #endif /* ENABLE_APPLET */ #if defined(USE_OPENSSL) #include #include #include #include #include #include #include #include #include #include #endif /* USE_OPENSSL */ #if defined(USE_DBUS) #if !defined(DBUS_API_SUBJECT_TO_CHANGE) #define DBUS_API_SUBJECT_TO_CHANGE #endif /* DBUS_API_SUBJECT_TO_CHANGE */ #include #include #endif /* USE_DBUS */ #include "callbacks.h" #include "interface.h" #include "support.h" #include "ipmsg_types.h" #include "ipmsg.h" #include "g2ipmsg.h" #include "udp.h" #include "message.h" #include "userdb.h" #include "hostinfo.h" #include "msginfo.h" #include "logfile.h" #include "menu.h" #include "fileattach.h" #include "tcp.h" #include "netcommon.h" #include "fuzai.h" #include "copying.h" #include "uicommon.h" #include "sound.h" #include "systray.h" #include "downloads.h" #include "codeset.h" #include "protocol.h" #include "msgout.h" #include "private.h" #include "compat.h" #include "util.h" #include "base64.h" #include "cryptcommon.h" #include "dbusif.h" #include "screensaver.h" #endif /* COMMON_H */ g2ipmsg-0.9.6+dfsg/src/compat.h000066400000000000000000000031641126724573600162610ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_COMPAT_H) #define G2IPMSG_COMPAT_H #ifdef HAVE_CONFIG_H # include #endif #include #include #if !GLIB_CHECK_VERSION(2,10,0) #define g_slice_new(type) g_malloc(sizeof(type)) #define g_slice_free(type,data_p) g_free((data_p)) #endif #endif /* G2IPMSG_COMPAT_H */ g2ipmsg-0.9.6+dfsg/src/copying.h000066400000000000000000000027661126724573600164550ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(COPYING_H) #define COPYING_H #include #define G2IPMSG_AUTHOR _("Takeharu KATO") #define G2IPMSG_TRANSLATOR _("Takeharu KATO\nZC Miao\n") #endif /* COPYING_H */ g2ipmsg-0.9.6+dfsg/src/cryptcommon.h000066400000000000000000000074251126724573600173540ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_CRYPTOCOMMON_H) #define G2IPMSG_CRYPTOCOMMON_H /** @file * @brief 暗号化処理インターフェース定義 * @author Takeharu KATO */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include "ipmsg.h" #include "base64.h" #include "pubcrypt.h" #include "symcrypt.h" #include "pbkdf2.h" /** 暗号化能力ビットマップ */ #define G2IPMSG_CRYPTO_CAP (RSA_CAPS|SIGN_CAPS|SYM_CAPS) /** 乱数発生試行回数の最大値 */ #define CRYPT_RND_MAX_RETRY (100) /** 公開鍵/秘密鍵保存ディレクトリ */ #define G2IPMSG_KEY_DIR ".g2ipmsg" /** 暗号化処理用エラーバッファサイズ */ #define G2IPMSG_CRYPT_EBUFSIZ (1024) /* Common part */ /** 対称鍵暗号能力を暗号化ケイパビリティから取り出す * @param[in] x 暗号化能力ケイパビリティ * @return 対称鍵暗号能力を表すビットマップ */ #define get_symkey_part(x) ( (x) & (SYM_CAPS) ) /** 公開鍵暗号(非対称鍵暗号)能力を暗号化ケイパビリティから取り出す * @param[in] x 暗号化能力ケイパビリティ * @return 公開鍵暗号(非称鍵暗号)能力を表すビットマップ */ #define get_asymkey_part(x) ( (x) & (RSA_CAPS) ) /** 署名能力を暗号化ケイパビリティから取り出す * @param[in] x 暗号化能力ケイパビリティ * @return 署名能力を表すビットマップ */ #define get_sign_part(x) ( (x) & (SIGN_CAPS) ) /** 公開鍵取得までの待ち時間(通信処理に割り当てる1回あたりの経過時間 * @note 現状では, 1秒間 */ #define PUBKEY_WAIT_MICRO_SEC (1000UL*1000UL) /** 公開鍵取得試行回数 * @note IPMSG_GETPUBKEY発行後, PUBKEY_WAIT_MICRO_SEC * PUBKEY_MAX_RETRY待つ * (通信処理にCPUを割り当てる). このため, 現状では, 5秒以内に鍵を * 獲得できなかった場合は, エラーとなる. */ #define PUBKEY_MAX_RETRY (5) #if defined(USE_OPENSSL) int add_timing_entropy(void); int generate_rand(unsigned char *, size_t ); int ipmsg_encrypt_message(const char *, const char *, unsigned char **, size_t *); int ipmsg_decrypt_message(const char *, const char *, unsigned char **, size_t *); GtkWidget *internal_create_crypt_config_window(void); int enter_password(void); #endif /* USE_OPENSSL */ #endif /* IPMSG_CRYPTOCOMMON_H */ g2ipmsg-0.9.6+dfsg/src/cryptif.c000066400000000000000000000452151126724573600164540ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** @file * @brief 暗号化処理インターフェース部 * @author Takeharu KATO */ /** 16進->10進変換用テーブル * @attention 内部リンケージ */ static char *hexstr = "0123456789abcdef"; /** 16進->10進変換を行う * @param[in] ch 16進数文字(0-9a-fA-F) * @param[out] index chの10進変換結果返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常(indexがNULL, chが16進数文字でない) * @retval -ESRCH 変換できなかった(変換テーブル内に当該の文字がなかった) * @attention 内部リンケージ */ static int get_hexstr_index(const char ch, char *index){ int rc = 0; char ind = 0; int search_ch = 0; char *found = NULL; if ( (index == NULL) || ( !isxdigit(ch) ) ) { rc = -EINVAL; goto error_out; } search_ch = tolower((int)ch); found = strchr(hexstr, (int)search_ch); if (found == NULL) { err_out("Character %c(%c in original message) can not be found.\n", search_ch, ch); rc = -ESRCH; goto error_out; } ind = (char)(found - hexstr); /* 16進->10進変換 */ *index = ind; /* 値返却 */ rc = 0; /* 正常終了 */ error_out: return rc; } /** 与えられたバッファ内の各バイトの内容を16進で表示する. * @param[in] buff 16進数文字(0-9a-fA-F) * @param[in] len バッファサイズ * @retval 0 正常終了 * @retval -EINVAL 引数異常(buffがNULL) * * @attention 内部リンケージ */ static int print_hex(const char *buff, const size_t len){ int i = 0; int rc = 0; if (buff == NULL) { rc = -EINVAL; goto error_out; } dbg_out("decode-in-hex:"); for (i=0;i>4); dbg_out("%x",buff[i]&0xf); } dbg_out("\n"); error_out: return rc; } /** 暗号化されたメッセージを解析し, 以下の情報を取り出す. * - 通信に使用した暗号種別を表す暗号ケイパビリティ * - 本文の暗号化に使用した鍵(hex形式) * - 暗号化された本文(hex形式) * - 署名(hex形式) * @param[in] message 暗号化されたメッセージ * @param[out] this_cap_p 通信に使用した暗号種別を表す暗号ケイパビリティ返却領域 * @param[out] hex_skey_p 本文の暗号化に使用した鍵を指すポインタ変数のアドレス * @param[out] enc_message_p 暗号化された本文を指すポインタ変数のアドレス * @param[out] hex_sign_p 署名を指すポインタ変数のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(buffがNULL) * * @attention 内部リンケージ */ static int parse_encrypted_message(const unsigned char *message, unsigned long *this_cap_p, unsigned char **hex_skey_p, unsigned char **enc_message_p, unsigned char **hex_sign_p){ int rc = 0; char *sp = 0; char *ep = 0; unsigned long this_cap = 0; unsigned char *hex_skey = NULL; unsigned char *enc_message = NULL; unsigned char *hex_sign = NULL; char *buff = NULL; if ( (message == NULL) || (this_cap_p == NULL) || (hex_skey_p == NULL) || (enc_message_p == NULL) ) { rc = -EINVAL; goto error_out; } rc = -ENOMEM; buff = g_strdup(message); if (buff == NULL) goto error_out; /* * 鍵情報 */ sp = buff; ep = strchr(sp, ':'); if (ep == NULL) { rc = -EINVAL; err_out("Error : No cap\n"); goto free_buff_out; } *ep = '\0'; ++ep; errno = 0; this_cap = strtoul(sp, (char **)NULL, 16); dbg_out("Cap:0x%x\n", this_cap); /* *暗号鍵 */ sp = ep; ep = strchr(sp, ':'); if (ep == NULL) { rc = -EINVAL; err_out("Error : crypt key\n"); goto free_buff_out; } *ep = '\0'; ++ep; rc = -ENOMEM; hex_skey = g_strdup(sp); if (hex_skey == NULL) goto free_buff_out; dbg_out("hex secret key:%s\n", hex_skey); /* * 暗号化本文 */ sp = ep; ep = strchr(sp, ':'); if (ep != NULL) { /* これで最後の可能性もある */ *ep = '\0'; ++ep; } rc = -ENOMEM; enc_message = g_strdup(sp); if (enc_message == NULL) goto free_hex_skey_out; dbg_out("hex secret body:%s\n", enc_message); /* * 署名 */ if (ep != NULL) { sp = ep; rc = -ENOMEM; hex_sign = g_strdup(sp); if (hex_sign == NULL) goto free_enc_message_out; dbg_out("hex sign:%s\n", hex_sign); } /* * 返却 */ *this_cap_p = this_cap; *hex_skey_p = hex_skey; *enc_message_p = enc_message; *hex_sign_p = hex_sign; if (buff != NULL) g_free(buff); return 0; free_enc_message_out: if (enc_message != NULL) g_free(enc_message); free_hex_skey_out: if (hex_skey != NULL) g_free(hex_skey); free_buff_out: if (buff != NULL) g_free(buff); error_out: return rc; } /** バイナリのバイトストリームをhex形式に変換する * @param[in] bindata バイナリのバイトストリーム * @param[in] len バイトストリーム長 * @param[in] ret_p hex形式に変換した結果を指すポインタ変数のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(bindataまたはret_pがNULL) * * @attention 内部リンケージ */ static int string_bin2hex(const u_int8_t *bindata, int len, unsigned char **ret_p) { int rc = 0; int i = 0; size_t buf_len = 0; unsigned char *buff = NULL; unsigned char *buff_p = NULL; if ( (bindata == NULL) || (ret_p == NULL) ) { rc = -EINVAL; goto error_out; } buf_len = len * 2 + 1; /* バッファ長算出 */ buff = g_malloc(buf_len); /* バッファ獲得 */ if (buff == NULL) { rc = -ENOMEM; goto error_out; } memset(buff, 0, buf_len); /* バッファを0クリアする */ /* * 変換 */ for (i = 0, buff_p = buff; i < len; ++i) { *buff_p++ = hexstr[bindata[i] >> 4]; *buff_p++ = hexstr[bindata[i] & 0x0f]; } *buff_p = '\0'; /* 文字列として扱うようにヌルターミネートする */ /* * 返却 */ rc = 0; *ret_p = buff; error_out: return rc; } /** hex形式の文字列をバイナリのバイトストリームに変換する * @param[in] hexdata hex形式(16進文字列)のバイトストリーム * @param[out] len バイナリバイトストリーム長返却領域 * @param[out] ret_p 変換したバイナリバイトストリームを指すポインタ * 変数のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(bindataまたはret_pがNULL) * @attention 内部リンケージ */ static int string_hex2bin(const char *hexdata, int *len,unsigned char **ret_p) { int rc = 0; int i = 0; size_t data_len = 0; size_t buf_len = 0; unsigned char *buff = NULL; unsigned char *buff_p = NULL; char low = 0, high = 0; data_len = strlen(hexdata); buf_len = data_len / 2; buff = g_malloc(buf_len); if (buff == NULL) { rc = -ENOMEM; goto error_out; } memset(buff, 0, buf_len); for (i=0, buff_p = buff; ( ( (i + 1) < data_len) && (hexdata[i] != '\0') && (hexdata[i+1])); ) { rc = get_hexstr_index(hexdata[i++], &high); if (rc != 0) goto error_out; rc = get_hexstr_index(hexdata[i++], &low); if (rc != 0) goto error_out; *buff_p++ = ( ( (high << 4) & 0xf0) | (low & 0xf) ); } *ret_p = buff; *len = buf_len; return 0; error_out: if (buff != NULL) g_free(buff); return rc; } /** メッセージを暗号化する * @param[in] peer_addr 送信先IPアドレス * @param[in] message 暗号化するメッセージ * @param[out] ret_str 暗号化したメッセージを指すポインタ変数のアドレス * @param[out] len 暗号化メッセージ長返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常 */ int ipmsg_encrypt_message(const char *peer_addr, const char *message, unsigned char **ret_str, size_t *len) { int rc = 0; int retry = 0; unsigned long peer_cap = 0; unsigned long skey_type = 0, akey_type = 0; char *session_key = NULL; char *enc_skey = NULL; size_t skey_len = 0; char *key_e = NULL, *key_n = NULL; char *raw_enc_body = NULL; unsigned char *enc_body = NULL; size_t enc_len = 0; unsigned char *encrypted_message = NULL; size_t total_len = 0; unsigned char *sign = NULL; unsigned long sign_type = 0; int i = 0; if ( (peer_addr == NULL) || (message == NULL) || (ret_str == NULL) || (len == NULL) ) { rc = -EINVAL; goto error_out; } /* 相手の暗号化能力を取得 */ retry = PUBKEY_MAX_RETRY; do{ rc = userdb_wait_public_key(peer_addr, &peer_cap, &key_e, &key_n); if ( (rc < 0) && (rc != -EINTR) ) { goto error_out; /* 明示的なエラー */ } if (rc == 0) { /* 見付けた */ dbg_out("Found: \n\taddr = %s\n" "\tcap = %x\n" "\tpubkey-e = %s\n" "\tpubkey-n = %s\n", peer_addr, peer_cap, key_e, key_n); break; } --retry; } while(retry > 0); if ( (rc != 0) && (retry == 0) ) goto free_peer_key_out; /* 取得失敗 */ /* *暗号化アルゴリズムを選択 */ rc = select_symmetric_key(peer_cap, &skey_type, hostinfo_refer_ipmsg_crypt_policy_is_speed()); if (rc != 0) goto free_peer_key_out; /* * セッションキー作成と本文の暗号化 */ rc = symcrypt_encrypt_message(skey_type, message, &session_key, &skey_len, &raw_enc_body, &enc_len); if (rc != 0) goto free_peer_key_out; rc = string_bin2hex((const u_int8_t *)raw_enc_body, enc_len, &enc_body); if (rc != 0) goto free_session_key_out; /* * セッションキーを暗号化 */ rc = pcrypt_encrypt_message(peer_cap, key_e, key_n, session_key, skey_len, &enc_skey, &akey_type); if (rc != 0) goto free_enc_body_out; /* * 暗号化文字列長取得 * longの長さは, 64ビット環境の場合は, 8バイトになるので, * 1バイトあたりの表示領域長(2)をlongのバイト長文だけ掛け合わせることで, * 領域長に対するアーキ依存性を排除する. * +3はデリミタ(':')2つとヌルターミネートの分 */ total_len = sizeof(unsigned long) * 2 + strlen(enc_skey) + strlen(enc_body) + 3; encrypted_message = g_malloc(total_len); if (encrypted_message == NULL) { rc = -ENOMEM; goto free_encoded_session_key; } /* *署名を選択する */ rc = select_signature(peer_cap, &sign_type, hostinfo_refer_ipmsg_crypt_policy_is_speed()); if (rc != 0) { sign_type = 0; /* 署名を使用しない */ } snprintf(encrypted_message, total_len, "%x:%s:%s", (skey_type|akey_type|sign_type), enc_skey, enc_body); dbg_out("Encrypted body:%s\n", encrypted_message); if (sign_type != 0) { /* * 小文字に変換 */ for(i = 0; i < total_len; ++i) { encrypted_message[i] = tolower((int)encrypted_message[i]); } rc = pcrypt_sign(akey_type, sign_type, encrypted_message, &sign); if (rc != 0) goto free_sign_out; g_free(encrypted_message); /* * 署名を付して本文を再作成 */ total_len += (strlen(sign) + 1); /* +1は, デリミタ分 */ encrypted_message = g_malloc(total_len); if (encrypted_message == NULL) goto free_sign_out; snprintf(encrypted_message, total_len, "%x:%s:%s:%s", (skey_type|akey_type|sign_type), enc_skey, enc_body, sign); dbg_out("Signed body:%s\n", encrypted_message); } /* * 小文字に変換 */ total_len = strlen(encrypted_message); for(i = 0; i < total_len; ++i) { encrypted_message[i] = tolower((int)encrypted_message[i]); } /* * 解析結果返却 */ *ret_str = encrypted_message; *len = total_len; rc = 0; free_sign_out: if (sign != NULL) g_free(sign); free_enc_body_out: if (enc_body != NULL) g_free(enc_body); free_encoded_session_key: if (enc_skey != NULL) g_free(enc_skey); free_session_key_out: if (session_key != NULL) g_free(session_key); if (raw_enc_body != NULL) g_free(raw_enc_body); free_peer_key_out: if (key_e != NULL) g_free(key_e); if (key_n != NULL) g_free(key_n); error_out: return rc; } /** 暗号化されたメッセージを複号する * @param[in] peer_addr 送信先IPアドレス * @param[in] message 暗号化するメッセージ * @param[out] ret_str 暗号化したメッセージを指すポインタ変数のアドレス * @param[out] len 暗号化メッセージ長返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -EAGAIN 署名異常 */ int ipmsg_decrypt_message(const char *peer_addr, const char *message, unsigned char **ret_str, size_t *len) { int rc = 0; unsigned long this_cap = 0; unsigned char *hex_skey = NULL; char *skey = NULL; unsigned char *signed_message = NULL; unsigned char *end_message_body_p = NULL; unsigned char *enc_message = NULL; unsigned char *hex_sign = NULL; unsigned long skey_type = 0, akey_type = 0; unsigned long sign_type = 0; unsigned char *enc_bin_body = NULL; unsigned char *peer_key_e = NULL; unsigned char *peer_key_n = NULL; unsigned long tmp_cap = 0; unsigned long new_flags = 0; char *plain = NULL; size_t plain_len = 0; size_t skey_len = 0; size_t enc_bin_len = 0; if ( (message == NULL) || (ret_str == NULL) || (len == NULL) ) { rc = -EINVAL; goto error_out; } /* * 暗号化されたメッセージから鍵情報を獲得する. */ rc = parse_encrypted_message(message, &this_cap, &hex_skey, &enc_message, &hex_sign); if (rc != 0) { err_out("Can not parse message\n"); goto error_out; } /* * 暗号化に使用した鍵種別をケイパビリティから算出する */ skey_type = get_symkey_part(this_cap); /* 共通鍵 */ akey_type = get_asymkey_part(this_cap); /* 公開鍵 */ sign_type = get_sign_part(this_cap); /* 署名 */ dbg_out("Cap:%x Skey:%x AKey:%x Sign:%x\n", this_cap, skey_type, akey_type, sign_type); /* * 署名がある場合は署名を検証 */ g_assert(peer_addr); /* udpからの呼出しの場合はかならずいれる */ if ( (hostinfo_get_ipmsg_crypt_capability() & sign_type) && (hex_sign != NULL) ) { dbg_out("This message is signed by peer.\n"); /* * 相手の公開鍵を取得 */ rc = userdb_get_public_key_by_addr(peer_addr, &tmp_cap, (char **)&peer_key_e, (char **)&peer_key_n); if (rc != 0) { goto free_parsed_datas; } /* 編集用にコピー */ signed_message = g_strdup(message); rc = -ENOMEM; if (signed_message == NULL) goto free_parsed_datas; end_message_body_p = strrchr(signed_message, ':'); if (end_message_body_p == NULL) /* 異常データ */ goto free_parsed_datas; *end_message_body_p = '\0'; /* 本文だけを参照 */ dbg_out("Verify:%s with %s\n", signed_message, hex_sign); rc = pcrypt_verify_sign(this_cap, sign_type, signed_message, hex_sign, peer_key_e, peer_key_n); /* 失敗した場合でも, 不要なデータを開放してからぬける */ if (rc != 0) { err_out("Verify failed: libcrypt rc=%d\n", rc); rc = -EAGAIN; goto free_parsed_datas; } dbg_out("Verify OK\n"); } /* * 共通鍵をデコード */ /* FIXME 鍵のバリデーション(RSAが2つ以上設定されていないか) */ rc = pcrypt_decrypt_message(akey_type, hex_skey, &skey, &skey_len); if (rc != 0) { goto free_parsed_datas; } dbg_out("Decrypt key len:%d\n", skey_len); /* * 暗号化された本文のバイナリ化 */ rc = string_hex2bin(enc_message, &enc_bin_len, &enc_bin_body); if (rc != 0) { goto free_skey; } #if 0 print_hex(skey, skey_len); #endif /* * 本文を復号化する */ rc = symcrypt_decrypt_message(skey_type, enc_bin_body, enc_bin_len, skey, &plain, &plain_len); if (rc != 0) { goto free_enc_bin_body; } dbg_out("Decoded:%s len=%d\n", plain, plain_len); *ret_str = plain; *len = plain_len; rc = 0; free_enc_bin_body: if (enc_bin_body != NULL) g_free(enc_bin_body); free_skey: if (skey != NULL) g_free(skey); free_parsed_datas: if (hex_skey != NULL) g_free(hex_skey); if (enc_message != NULL) g_free(enc_message); if (hex_sign != NULL) g_free(hex_sign); if (peer_key_e != NULL) g_free(peer_key_e); if (peer_key_n != NULL) g_free(peer_key_n); if (signed_message != NULL) g_free(signed_message); error_out: if ( (rc != 0) && (rc != -EAGAIN) ){ /* 署名検証に失敗した場合を除く */ ipmsg_err_dialog("%s: %s = %s, rc = %d", _("Can not decode message"), _("peer"), peer_addr, rc); } return rc; } /** パスワード入力を促す * @retval 0 正常終了 * @retval -ENOMEM メモリ不足 */ int enter_password(void) { int rc = 0; GtkWidget *window = NULL; gint result = 0; window = create_passwdWindow(); if (window == NULL) { rc = -ENOMEM; goto error_out; } error_out: return rc; } g2ipmsg-0.9.6+dfsg/src/dbusif.c000066400000000000000000000111511126724573600162400ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** @file * @brief DBUS通信インターフェース関連関数群 * @author Takeharu KATO */ /** 指定されたDBUS バスへのコネクションを取得する. * @param[in] type コネクション種別 * DBUS_BUS_SESSION ログインセッションバス * DBUS_BUS_SYSTEM システム全体で使用する共通バス * DBUS_BUS_STARTER 上記以外に独自に開設したバス * @param[in,out] con_p コネクション情報へのポインタ変数のアドレス * @retval 0 正常終了 * @retval -EINVAL 不正なtypeを指定したか, con_pがNULLである. * @retval -EEXIST コネクション(バス)の生成に失敗 * @attention 内部リンケージ */ static int ipmsg_dbus_create_bus(DBusBusType type, DBusGConnection **con_p){ DBusGConnection *connection = NULL; GError *error = NULL; int rc = 0; if ( (type != DBUS_BUS_SESSION) && (type != DBUS_BUS_SYSTEM) && (type != DBUS_BUS_STARTER) ) { rc = -EINVAL; goto error_out; } if (con_p == NULL) { rc = -EINVAL; goto error_out; } /* Get a connection to the session bus */ error = NULL; connection = dbus_g_bus_get(type, &error); if (connection == NULL) { dbg_out("Error:%s\n", error->message); g_error_free(error); rc = -EEXIST; goto error_out; } *con_p = connection; /* コネクションを返却 */ rc = 0; error_out: return rc; } /** 指定されたサービスに接続し, 通信に使用するハンドル(DBUSプロキシ)を返却する * @param[in] bus サービスが存在するバス * @param[in] name サービス名 * @param[in] path サービスパス * @param[in] interface インターフェース名 * @param[in, out] handle_p 通信に使用するハンドル(プロキシ)情報の返却先アドレス * @retval 0 正常終了 * @retval -EINVAL bus, name, path, interfaceのいずれかがNULLである. * @retval -ENOENT 接続に失敗した * @attention 内部リンケージ */ static int ipmsg_connect_dbus_service(DBusGConnection *bus, const char *name, const char *path, const char *interface, DBusGProxy **handle_p) { DBusGProxy *proxy = NULL; GError *error = NULL; int rc = 0; if ( (bus == NULL) || (name == NULL) || (path == NULL) || (interface == NULL) ) { rc = -EINVAL; goto error_out; } dbg_out("Create dbus proxy:(name. path, interface) = (%s, %s, %s)\n", name, path, interface); proxy = dbus_g_proxy_new_for_name(bus, name, path, interface); if (proxy == NULL) { rc = -ENOENT; goto error_out; } error_out: return rc; } /** 返り値のない電文をDBUS経由で送信する * @param[in] proxy 通信に使用するハンドル(プロキシ)情報の返却先アドレス * @param[in] msg 通信電文 * @param[in] start_arg 可変個引数開始位置 * @param[in] ... 可変個引数 * @retval 0 正常終了 * @retval -EINVAL proxy, msgのいずれかがNULLである. * @retval -ENOENT 接続に失敗した * @attention 内部リンケージ */ static int ipmsg_send_dbus_no_response(const DBusGProxy *proxy, const gchar *msg, GType start_arg, ...){ } g2ipmsg-0.9.6+dfsg/src/dbusif.h000066400000000000000000000044171126724573600162540ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_DBUSIF_H) #define G2IPMSG_DBUSIF_H /** @file * @brief DBUS通信インターフェース関連定義 * @author Takeharu KATO */ #ifdef HAVE_CONFIG_H # include #endif #if defined(USE_DBUS) #if !defined(DBUS_API_SUBJECT_TO_CHANGE) #define DBUS_API_SUBJECT_TO_CHANGE #endif #include #include #include #include #include #include "msgout.h" /** @brief DBUSコネクション管理用構造体 * @param[in] name サービス名 * @param[in] path サービスパス * @param[in] interface インタフェース名 * @param[in, out] bus バス名 * @param[in, out] proxy ハンドル(プロキシ) */ typedef struct _dbus_con_t{ gchar *name; gchar *path; gchar *interface; DBusGConnection *bus; DBusGProxy *proxy; }dbus_con_t; #endif /* USE_DBUS */ #endif /* G2IPMSG_DBUSIF_H */ g2ipmsg-0.9.6+dfsg/src/dialog.c000066400000000000000000000505671126724573600162410ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** @file * @brief ダイアログ関数群 * @author Takeharu KATO */ /** クライアント情報ダイアログ用のメッセージ出力共通処理 * @param[in] text_buffer 出力先テキストバッファ * @param[in] format 書式指定文字列 * @return なし */ static void client_info_add_text(GtkTextBuffer *text_buffer, const char *format,...){ char buffer[64]; /* 文字列整形用バッファ */ size_t len; /* 文字列長 */ va_list ap; /* 可変長引数管理 */ g_assert(text_buffer != NULL); memset(buffer, 0, 64); va_start(ap, format); vsnprintf(buffer, 63, format, ap); va_end(ap); buffer[63] = '\0'; len = strlen(buffer); gtk_text_buffer_insert_at_cursor(text_buffer, buffer, len); } /** 受信確認ダイアログ生成 * @param[in, out] user ユーザ名(この関数内で開放することを想定) * @param[in] ipaddr 受信者IPアドレス(IPMSG_READMSG送信者アドレス, 開放不要) * @param[in] sec IPMSG_READMSG受信時刻(Epoch 時刻) * @retval 0 * @retval -EINVAL * @retval -ENOMEM * @attention userが指し示す先は, 本関数内で開放するので, 呼び出し側で * 複製を引き渡すこと. */ void read_message_dialog(const gchar *user,const gchar *ipaddr, long sec){ GtkWidget *dialog = NULL; GtkLabel *userlabel = NULL; GtkLabel *timelabel = NULL; userdb_t *user_info = NULL; char buffer[64]; char time_string[26]; va_list ap; dbg_out("here\n"); if (!hostinfo_refer_ipmsg_default_confirm()) goto user_free_out; /* 受信確認をしない場合は, 即時復帰 */ dialog = GTK_WIDGET(create_readNotifyDialog()); userlabel = GTK_LABEL(lookup_widget(dialog, "readNotifyDialogUserGroupLabel") ); if (ipaddr != NULL) { if (!userdb_search_user_by_addr(ipaddr, (const userdb_t **)&user_info) ) { g_assert(userlabel != NULL); snprintf(buffer, 63, "%s@%s (%s)", user_info->nickname, user_info->group, user_info->host); buffer[63]='\0'; gtk_label_set_text(userlabel, buffer); g_assert(!destroy_user_info(user_info)); } else { /* ipaddrがユーザDBに登録されていない場合, * ユーザ名だけを表示する. */ if (user != NULL) gtk_label_set_text(userlabel, user); else gtk_label_set_text(userlabel, _("UnKnown")); } } else { gtk_label_set_text(userlabel, _("UnKnown")); } timelabel = GTK_LABEL(lookup_widget(dialog, "readNotifyLogonIPAddrLabel")); if (get_current_time_string(time_string, sec)) gtk_label_set_text(timelabel, _("UnKnown")); else gtk_label_set_text(timelabel, time_string); if (hostinfo_refer_ipmsg_iconify_dialogs()) gtk_window_iconify(GTK_WINDOW(dialog)); else gtk_window_deiconify(GTK_WINDOW(dialog)); gtk_widget_show(dialog); /* ダイアログ表示 */ user_free_out: if (user != NULL) g_free((gchar *)user); return; } /** エラー発生ダイアログを出力する * @param[in] is_mordal モーダルダイアログを生成する * @param[in] filename 発生元ファイル名 * @param[in] funcname 発生元関数名 * @param[in] line 発生元行番号 * @param[in] format 書式指定文字列(可変個引数) * @return なし */ void error_message_dialog(gboolean is_mordal, const char *filename, const char *funcname, const int line, const char* format, ...){ GtkWidget *dialog = NULL; GtkLabel *file_label = NULL; GtkLabel *func_label = NULL; GtkLabel *line_label = NULL; GtkTextView *error_text_view = NULL; GtkTextBuffer *error_buffer = NULL; char error_message[256]; char line_string[8]; va_list ap; dbg_out("here\n"); g_assert(filename != NULL); g_assert(funcname != NULL); /* * エラーメッセージを整形する. */ if (format != NULL) { va_start(ap, format); vsnprintf(error_message, 256, format, ap); va_end(ap); } else { error_message[0] = '\0'; } error_message[255] = '\0'; snprintf(line_string, 8, "%d", line); line_string[7] = '\0'; gdk_threads_enter(); /* * ウィジェットを取得 */ dialog = GTK_WIDGET(create_errorDialog()); g_assert(dialog); file_label = GTK_LABEL(lookup_widget(GTK_WIDGET(dialog), "errorDialogErrInfoFileNameContLabel")); g_assert(file_label); func_label = GTK_LABEL(lookup_widget(GTK_WIDGET(dialog), "errorDialogErrInfoFunctionContLabel")); g_assert(func_label); line_label = GTK_LABEL(lookup_widget(GTK_WIDGET(dialog), "errorDialogErrInfoFileLineContLabel")); g_assert(line_label); error_text_view = GTK_TEXT_VIEW(lookup_widget(GTK_WIDGET(dialog), "errorDialogErrorTextView")); g_assert(error_text_view); error_buffer = GTK_TEXT_BUFFER(gtk_text_view_get_buffer(error_text_view)); g_assert(error_buffer); /* * エラー発生位置情報を設定 */ gtk_label_set_text(file_label, filename); gtk_label_set_text(func_label, funcname); gtk_label_set_text(line_label, line_string); /* * カット&ペースト用に位置情報と発生内容を表示 */ gtk_text_buffer_insert_at_cursor(error_buffer, _("FileName"), -1); gtk_text_buffer_insert_at_cursor(error_buffer, UICOMMON_DIALOG_DELIM, -1); gtk_text_buffer_insert_at_cursor(error_buffer, filename, -1); gtk_text_buffer_insert_at_cursor(error_buffer, "\n", -1); gtk_text_buffer_insert_at_cursor(error_buffer, _("Function"), -1); gtk_text_buffer_insert_at_cursor(error_buffer, UICOMMON_DIALOG_DELIM, -1); gtk_text_buffer_insert_at_cursor(error_buffer, funcname, -1); gtk_text_buffer_insert_at_cursor(error_buffer, "\n", -1); gtk_text_buffer_insert_at_cursor(error_buffer, _("Line"), -1); gtk_text_buffer_insert_at_cursor(error_buffer, UICOMMON_DIALOG_DELIM, -1); gtk_text_buffer_insert_at_cursor(error_buffer, line_string, -1); gtk_text_buffer_insert_at_cursor(error_buffer, "\n", -1); gtk_text_buffer_insert_at_cursor(error_buffer, error_message, -1); gtk_text_buffer_insert_at_cursor(error_buffer, "\n", -1); /* * デバッグ可能なように, テキスト出力も表示 */ dbg_out("file:%s func:%s line %s error:%s\n", filename, funcname, line_string, error_message); gtk_window_set_modal(GTK_WINDOW(dialog), is_mordal); /* モーダル設定 */ /* * ダイアログ表示 */ if (is_mordal) { gtk_dialog_run(GTK_DIALOG(dialog)); } else { gtk_widget_show(dialog); ipmsg_update_ui(); /* ダイアログを表示 */ } gdk_threads_leave(); return; } /** クライアント情報ダイアログを表示する * @param[in] user ユーザ名 * @param[in] ipaddr IPアドレス * @param[in] command 情報種別 * - IPMSG_SENDINFO クライアント情報を表示 * - IPMSG_SENDABSENCEINFO 不在情報を表示 * @param[in] message 表示する文章 * @retval 0 正常終了 * @retval -EINVAL messageがNULLである. * @retval -EINVAL 不正なcommandを引き渡した. */ int info_message_window(const gchar *user,const gchar *ipaddr, unsigned long command,const char *message){ GtkWidget *window = NULL; /* ダイアログウィンドウ */ GtkLabel *userlabel = NULL; /* ユーザ名表示ラベル */ GtkLabel *typelabel = NULL; /* 情報種別表示ラベル */ userdb_t *user_info = NULL; /* ユーザ情報 */ char buffer[64]; /* 文字列整形用バッファ */ GtkTextView *text_view = NULL; /* 表示領域用テキストビュー */ GtkTextBuffer *text_buffer = NULL; /* 表示領域のテキストバッファ */ gchar *internal_message = NULL; /* 表示文字列の内部形式格納領域 */ size_t len = 0; /* 表示文字列長 */ unsigned long skey = 0; /* 対称鍵暗号処理能力 */ unsigned long akey = 0; /* 非対称(公開鍵)暗号処理能力 */ unsigned long sign = 0; /* 署名処理能力 */ int rc = 0; /* 返り値 */ dbg_out("here\n"); rc = -EINVAL; if (message == NULL) goto error_out; /* * ウィジェット獲得 */ window = GTK_WIDGET(create_clientInfoWindow()); g_assert(window); userlabel = GTK_LABEL(lookup_widget(window, "clientInfoUserLabel")); g_assert(userlabel); typelabel = GTK_LABEL(lookup_widget(window, "clientInfoTypeLabel")); g_assert(typelabel); text_view = GTK_TEXT_VIEW(lookup_widget(GTK_WIDGET(window), "clientInfoTextview")); g_assert(text_view); text_buffer = gtk_text_view_get_buffer(text_view); g_assert(text_buffer); /* * 種別判定 */ switch(command) { case IPMSG_SENDINFO: gtk_label_set_text(typelabel, _("Version Information")); break; case IPMSG_SENDABSENCEINFO: gtk_label_set_text(typelabel, _("Absence Information")); break; default: rc = -EINVAL; goto error_out; break; } /* * 出力メッセージ整形 */ rc = convert_string_internal(message, (const gchar **)&internal_message); if (internal_message == NULL) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), ipaddr); goto error_out; } len = strlen(internal_message); gtk_text_buffer_set_text(text_buffer, internal_message, len); g_free(internal_message); if (command == IPMSG_SENDABSENCEINFO) goto show_out; /* 不在文の場合は, クライアント情報は必要ない */ /* * クライアント情報出力 */ if ( (user != NULL) && (ipaddr != NULL) ) { if (!userdb_search_user_by_addr(ipaddr, (const userdb_t **)&user_info)) { g_assert(userlabel); snprintf(buffer, 63, "%s@%s (%s)", user_info->nickname, user_info->host, user_info->group); buffer[63] = '\0'; gtk_label_set_text(userlabel, buffer); /* * IPアドレス */ client_info_add_text(text_buffer, "\n"); client_info_add_text(text_buffer, "%s [%s] : %s\n", _("IP Address"), (user_info->pf == PF_INET) ? ("IPV4") : ("IPV6"), user_info->ipaddr); client_info_add_text(text_buffer, "%s : 0x%08x\n", _("Capability"), (unsigned int)user_info->cap); /* * Dial up */ if (user_info->cap & IPMSG_DIALUPOPT) client_info_add_text(text_buffer, "%s : %s\n", _("Dial up"), _("YES")); else client_info_add_text(text_buffer, "%s : %s\n", _("Dial up"), _("NO")); /* * UTF-8 */ if (user_info->cap & IPMSG_UTF8OPT) client_info_add_text(text_buffer, "%s : %s\n", _("UTF-8"), _("YES")); else client_info_add_text(text_buffer, "%s : %s\n", _("UTF-8"), _("NO")); /* * File Attach */ if (user_info->cap & IPMSG_FILEATTACHOPT) client_info_add_text(text_buffer, "%s : %s\n", _("File Attach"), _("YES")); else client_info_add_text(text_buffer, "%s : %s\n", _("File Attach"), _("NO")); /* * Encryption */ if (user_info->cap & IPMSG_ENCRYPTOPT) { client_info_add_text(text_buffer, "%s:%s (%s:0x%08x)\n", _("Encryption Capability"), _("YES"), _("Capability"), user_info->crypt_cap); akey = get_asymkey_part(user_info->crypt_cap); skey = get_symkey_part(user_info->crypt_cap); sign = get_sign_part(user_info->crypt_cap); /* * Public key */ client_info_add_text(text_buffer, "%s:", _("Public key encryption")); if (akey != 0) { if (akey & IPMSG_RSA_512) client_info_add_text(text_buffer, "[%s]", _("RSA 512 bits")); if (akey & IPMSG_RSA_1024) client_info_add_text(text_buffer, "[%s]", _("RSA 1024 bits")); if (akey & IPMSG_RSA_2048) client_info_add_text(text_buffer, "[%s]", _("RSA 2048 bits")); } else { client_info_add_text(text_buffer, "[%s]", _("UnKnown")); } client_info_add_text(text_buffer, "\n"); /* * Symmetric key */ client_info_add_text(text_buffer, "%s:", _("Symmetric key encryption")); if (skey != 0) { if (skey & IPMSG_RC2_40) client_info_add_text(text_buffer, "[%s]", _("RC2 40 bits")); if (skey & IPMSG_RC2_128) client_info_add_text(text_buffer, "[%s]", _("RC2 128 bits")); if (skey & IPMSG_RC2_256) client_info_add_text(text_buffer, "[%s]", _("RC2 256 bits")); if (skey & IPMSG_BLOWFISH_128) client_info_add_text(text_buffer, "[%s]", _("Blowfish 128 bits")); if (skey & IPMSG_BLOWFISH_256) client_info_add_text(text_buffer, "[%s]", _("Blowfish 256 bits")); if (skey & IPMSG_AES_128) client_info_add_text(text_buffer, "[%s]", _("AES 128 bits")); if (skey & IPMSG_AES_192) client_info_add_text(text_buffer, "[%s]", _("AES 192 bits")); if (skey & IPMSG_AES_256) client_info_add_text(text_buffer, "[%s]", _("AES 256 bits")); } else { client_info_add_text(text_buffer, "[%s]", _("UnKnown")); } client_info_add_text(text_buffer, "\n"); /* * Signature */ client_info_add_text(text_buffer, "%s:", _("Signature")); if (sign != 0) { if (sign & IPMSG_SIGN_MD5) client_info_add_text(text_buffer, "[%s]", _("MD5")); if (sign & IPMSG_SIGN_SHA1) client_info_add_text(text_buffer, "[%s]", _("SHA1")); } else { client_info_add_text(text_buffer, "[%s]", _("UnKnown")); } client_info_add_text(text_buffer, "\n"); } else { client_info_add_text(text_buffer, "%s:%s\n", _("Encryption Capability"), _("NO")); } } else { gtk_label_set_text(userlabel, user); } } else { gtk_label_set_text(userlabel, (_("UnKnown"))); } show_out: gtk_widget_show(window); rc=0; error_out: if (user_info != NULL) g_assert(!destroy_user_info(user_info)); if (user != NULL) g_free((gchar *)user); return rc; } /** パスワード入力確認ダイアログ生成 * @param[in] type パスワード種別 * - HOSTINFO_PASSWD_TYPE_ENCKEY 暗号鍵保存用 * - HOSTINFO_PASSWD_TYPE_LOCK 錠開封用 * @param[out] passphrase_p パスワード返却先 * (暗号化鍵操作に使用. 使用しない場合, NULLを設定). * @retval 0 パスワード一致確認 * @retval -EINVAL 不正なtypeをtypeに指定した. * @retval -EPERM パスワード不整合, 入力キャンセル * @retval -ENOENT パスワード未設定 * @retval -ENOMEM メモリ不足 */ int password_confirm_window(int type, gchar **passphrase_p) { int rc = 0; GtkDialog *dialog = NULL; GtkEntry *passwd_entry = NULL; const gchar *passwd_string = NULL; const char *configured_encoded_passwd = NULL; gchar *duplicated_passwd = NULL; gint result = 0; /* * 種別判定 */ switch(type) { case HOSTINFO_PASSWD_TYPE_ENCKEY: configured_encoded_passwd = hostinfo_refer_encryption_key_password(); break; case HOSTINFO_PASSWD_TYPE_LOCK: configured_encoded_passwd = hostinfo_refer_lock_password(); break; default: rc = -EINVAL; goto error_out; break; } /* * パスワードが設定されているか? */ if (pbkdf2_encoded_passwd_configured(configured_encoded_passwd) != 0) { rc = -ENOENT; goto error_out; } /* * ダイアログ生成, 入力エントリ獲得 */ dialog = GTK_DIALOG(create_passwdDialog()); g_assert(dialog != NULL); passwd_entry = GTK_ENTRY(lookup_widget(GTK_WIDGET(dialog), "passwordEntry")); g_assert(passwd_entry); /* * ダイアログ表示 */ result = gtk_dialog_run(GTK_DIALOG(dialog)); switch (result) { case GTK_RESPONSE_OK: /* * パスワード確認 */ dbg_out("Accept for password\n"); passwd_string = gtk_entry_get_text(passwd_entry); dbg_out("Entered:%s\n", passwd_string); rc = pbkdf2_verify(passwd_string, configured_encoded_passwd); if (rc != 0) { rc = -EPERM; /* 不正パスワード */ break; } /* * パスフレーズの複製を返却 */ if (passphrase_p != NULL) { duplicated_passwd = g_strdup(passwd_string); if (duplicated_passwd == NULL) { rc = -ENOMEM; /* メモリ不足 */ break; } /* パスフレーズ返却 */ *passphrase_p = duplicated_passwd; } break; case GTK_RESPONSE_CANCEL: default: dbg_out("response:%d cancel\n", result); rc = -EPERM; break; } gtk_widget_destroy(GTK_WIDGET(dialog)); /* ダイアログを破棄する */ error_out: return rc; } /** パスワード設定ダイアログ生成 * @param[in] type パスワード種別 * HOSTINFO_PASSWD_TYPE_ENCKEY 暗号鍵保存用 * HOSTINFO_PASSWD_TYPE_LOCK 錠開封用 * @param[in] togglebutton * @retval 0 設定完了 * @retval -ENOENT 設定キャンセル */ int password_setting_window(const int type){ GtkWindow *window = NULL; GtkButton *ok_button = NULL; GtkEntry *current_passwd = NULL; GtkEntry *new_passwd = NULL; GtkEntry *confirmed_passwd = NULL; GtkLabel *password_window_label = NULL; ipmsg_private_data_t *priv = NULL; const char *configured_encoded_passwd = NULL; int rc = 0; dbg_out("here\n"); window = GTK_WINDOW(create_passwdWindow()); /* パスワード設定画面生成 */ g_assert(window != NULL); /* * ウィジェット獲得 */ current_passwd = GTK_ENTRY(lookup_widget(GTK_WIDGET(window), "currentPassWordEntry")); new_passwd = GTK_ENTRY(lookup_widget(GTK_WIDGET(window), "passwdEntry1")); confirmed_passwd = GTK_ENTRY(lookup_widget(GTK_WIDGET(window), "passwdEntry2")); ok_button = GTK_BUTTON(lookup_widget(GTK_WIDGET(window), "passWordOKBtn")); password_window_label = GTK_LABEL(lookup_widget(GTK_WIDGET(window), "passWordWindowLabel")); /* * 初期値をクリアしておく */ gtk_entry_set_text(current_passwd, ""); gtk_entry_set_text(new_passwd, ""); gtk_entry_set_text(confirmed_passwd, ""); /* * 種別に基づく設定 */ switch(type) { case HOSTINFO_PASSWD_TYPE_ENCKEY: gtk_label_set_text(password_window_label, _("Password for public/private keys")); configured_encoded_passwd = hostinfo_refer_encryption_key_password(); break; case HOSTINFO_PASSWD_TYPE_LOCK: gtk_label_set_text(password_window_label, _("Password message for lock.")); configured_encoded_passwd = hostinfo_refer_lock_password(); break; default: g_assert_not_reached(); break; } /* パスワード未設定場合, エントリを無効にする */ if (pbkdf2_encoded_passwd_configured(configured_encoded_passwd) != 0) gtk_widget_set_sensitive(GTK_WIDGET(current_passwd), FALSE); else gtk_widget_set_sensitive(GTK_WIDGET(current_passwd), TRUE); /* OKボタンを無効にする */ gtk_widget_set_sensitive(GTK_WIDGET(ok_button), FALSE); /* * パスワード要求種別を設定する */ rc = init_ipmsg_private(&priv, IPMSG_PRIVATE_PASSWD); g_assert(rc == 0); priv->data = (void *)type; IPMSG_HOOKUP_DATA(window, priv, "passWordType"); gtk_widget_show(GTK_WIDGET(window)); /* パスワード設定ウィンドウを表示する */ return 0; } g2ipmsg-0.9.6+dfsg/src/downloads.c000066400000000000000000001233571126724573600167720ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /* static */ static int release_dir_info_contents(dir_request_t *info){ if (info->filename) g_free(info->filename); return 0; } static int parse_dir_request(const char *message,dir_request_t *ret,size_t max_len){ int rc; char *buff; char *token; long int_val; off_t size_val; char *sp=NULL; char *ep=NULL; char *basename; char *filename; ssize_t remains; if ( (!message) || (!ret) || (!max_len) ) return -EINVAL; buff=g_malloc(max_len+1); /* 最終パケットは\0終端されていないことに注意 */ if (!buff) return -ENOMEM; memset(ret,0,sizeof(dir_request_t)); /* 念のため */ memcpy(buff,message,max_len); buff[max_len]='\0'; dbg_out("buff(len:%d):%s\n",strlen(buff),buff); remains=max_len; /*書式: header-size:filename:file-size:fileattr:*/ /* * ヘッダサイズ */ sp=buff; ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =max_len - ((unsigned long)ep-(unsigned long)buff); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; int_val=strtol(sp, (char **)NULL, 16); ret->header_size=int_val; dbg_out("header size:%d(%x)\n",ret->header_size,ret->header_size); sp=ep; /* * ファイル名 */ ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =max_len - ((unsigned long)ep-(unsigned long)buff); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; rc=-ENOMEM; basename=g_path_get_basename(sp); if (!basename) goto error_out; rc=convert_string_internal(basename,(const gchar **)&filename); if (rc<0) { err_out("Can not convert this request:%s\n",sp); err_out("Can not convert file name:%s\n",basename); g_free(basename); goto error_out; } g_free(basename); ret->filename=filename; dbg_out("filename:%s\n",ret->filename); sp=ep; /* * ファイルサイズ */ ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =max_len - ((unsigned long)ep-(unsigned long)buff); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; size_val = strtoll(sp, (char **)NULL, 16); ret->file_size = size_val; dbg_out("file size:%lld(%llx)\n", ret->file_size, ret->file_size); sp=ep; /* * ファイル種別 */ ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =max_len - ((unsigned long)ep-(unsigned long)buff); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; int_val=strtol(sp, (char **)NULL, 16); ret->ipmsg_fattr=int_val; dbg_out("ipmsg file attr:%d(%x)\n",ret->ipmsg_fattr,ret->ipmsg_fattr); sp=ep; if (download_base_cmd(ret->ipmsg_fattr) != IPMSG_FILE_RETPARENT) { rc=-EPERM; if (!strcmp(G_DIR_SEPARATOR_S,basename)) { g_free(basename); goto error_out; } if (!strcmp(basename,"..")){ g_free(basename); /* 上位への移動は禁止 */ goto error_out; } if (!strcmp(basename,".")){ g_free(basename); /* コマンド以外でのカレントへの移動は禁止 */ goto error_out; } } rc=0; error_out: g_free(buff); return rc; } static int emulate_chdir(const char *current_dir,char *subdir,char **new_dir){ int rc; char *buff; gchar *dir_uri; GnomeVFSResult result; if ( (!current_dir) || (!subdir) || (!new_dir) ) return -EINVAL; if (!strcmp(subdir,"..")) return -EINVAL; /* コマンド以外で上位には移動しない */ if (!strcmp(subdir,".")) return -EINVAL; /* コマンド以外でカレントには移動しない */ if (!g_path_is_absolute(current_dir)) return -EINVAL; buff=g_build_filename(current_dir,subdir,NULL); if (!buff) return -ENOMEM; rc=-ENOMEM; dir_uri=gnome_vfs_get_uri_from_local_path(buff); if (!dir_uri) goto error_out; result=gnome_vfs_make_directory(dir_uri,GNOME_VFS_PERM_USER_ALL); if ( (result != GNOME_VFS_OK) && (result != GNOME_VFS_ERROR_FILE_EXISTS) ) { err_out("Can not create directory:%s\n",gnome_vfs_result_to_string(result)); rc=-result; goto error_out; } if ( (result == GNOME_VFS_ERROR_FILE_EXISTS) && (download_overwrite_confirm_generic(buff)) ) { rc=-result; goto error_out; } *new_dir=buff; return 0; error_out: g_free(buff); return rc; } static int create_parent_dir(const char *current_dir,char **parent){ int rc; char *buff; char *new_dir; gchar *ep; if ( (!current_dir) || (!parent) ) return -EINVAL; buff=g_strdup(current_dir); if (!buff) return -ENOMEM; rc=-ENOENT; ep=g_strrstr(buff,G_DIR_SEPARATOR_S); if ( (!ep) || (buff == ep) ) goto error_out; *ep='\0'; rc=-ENOMEM; new_dir=g_strdup(buff); if (!new_dir) goto error_out; *parent=new_dir; rc=0; error_out: g_free(buff); return rc; } static int check_end_condition(const char *top_dir, const char *current_dir, gboolean *is_cont){ size_t top_len = 0; size_t dir_len = 0; if ( (top_dir == NULL) || (current_dir == NULL) || (is_cont == NULL) ) return -EINVAL; *is_cont = TRUE; top_len = strlen(top_dir); dir_len = strlen(current_dir); if (top_len >= dir_len) *is_cont = FALSE; return 0; } static int update_file_display(unsigned long filetype,const char *filename, off_t size,GtkTreeModel *model,GtkTreeIter *iter){ if ( (filename == NULL) || (model == NULL) || (iter == NULL) ) return -EINVAL; if ( !GTK_IS_LIST_STORE (model) ) { war_out("Download window is destroyed.\n"); return -EFAULT; /* 仮にEFAULTを返す */ } gtk_list_store_set(GTK_LIST_STORE(model), iter, DOWNLOAD_FILENAME_NUM, filename, DOWNLOAD_RECVSIZE_NUM, (int64_t)0, DOWNLOAD_FILESIZE_NUM, (int64_t)size, DOWNLOAD_PROGRESS_NUM, 0, DOWNLOAD_FILEATTR_NUM, filetype, DOWNLOAD_FILETYPE_NUM, get_file_type_name(filetype), -1); ipmsg_update_ui(); return 0; } int do_download(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data){ tcp_con_t con; ipmsg_private_data_t *priv = NULL; GtkWidget *entry = NULL; GtkWidget *window = NULL; char *dirname = NULL; char *filename = NULL; char *basename = NULL; GtkWidget *all_check = NULL; ipmsg_recvmsg_private_t *sender_info = NULL; char *req_message = NULL; int rc = 0; ipmsg_ftype_t ftype = 0; long pkt_no = 0; int fileid = 0; off_t may_read = 0; int is_retry = 0; off_t total_write = 0; gboolean is_interactive = FALSE; char filepath[PATH_MAX]; window = GTK_WIDGET(data); if ( !GTK_IS_WINDOW(window) ) return -EFAULT; entry = lookup_widget(GTK_WIDGET(window), "DownLoadDirectoryEntry"); if ( !GTK_IS_ENTRY(entry) ) return -EFAULT; all_check = lookup_widget(GTK_WIDGET(window), "DownLoadAllCheckBtn"); if ( !GTK_IS_CHECK_BUTTON(all_check) ) return -EFAULT; priv = (ipmsg_private_data_t *)lookup_widget(GTK_WIDGET(window), "senderInfo"); g_assert(priv != NULL); sender_info = priv->data; g_assert(sender_info->ipaddr != NULL); pkt_no = sender_info->pktno; gtk_tree_model_get (model, iter, DOWNLOAD_FILEID_NUM, &fileid, DOWNLOAD_FILENAME_NUM, &filename, DOWNLOAD_FILESIZE_NUM, (int64_t *)&may_read, DOWNLOAD_FILEATTR_NUM, &ftype, -1); basename = g_path_get_basename(filename); g_free(filename); if (basename == NULL) { return -ENOMEM; } dirname = (char *)gtk_entry_get_text(GTK_ENTRY(entry)); snprintf(filepath, PATH_MAX - 1, "%s/%s", dirname, basename); filepath[PATH_MAX - 1] = '\0'; g_free(basename); dbg_out("download %d th element of %ld from %s into %s\n", fileid, pkt_no, sender_info->ipaddr, filepath); retry_this_file: memset(&con, 0, sizeof(tcp_con_t)); rc = tcp_setup_client(hostinfo_get_ipmsg_system_addr_family(), sender_info->ipaddr, hostinfo_refer_ipmsg_port(), &con); if (rc < 0) { rc = -errno; goto error_out; } /* * ロックアップ対策のためのタイムアウト設定 */ rc = sock_recv_time_out(con.soc, TCP_CLIENT_TMOUT_MS); if (rc < 0) { rc = -errno; goto error_out; } /* リクエスト送信 */ send_download_request(&con, sender_info->ipaddr, ftype, pkt_no, fileid); is_interactive= ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(all_check)))? (FALSE) : (TRUE) ); switch(download_base_cmd(ftype)) { case IPMSG_FILE_DIR: /* 階層ディレクトリ受信 */ ipmsg_update_ui(); dbg_out("This is directory ignored.\n"); rc = do_download_directory(&con, dirname, model, iter); if ( (rc == 0) && (is_interactive) ) rc = download_dir_open_operation(dirname); break; case IPMSG_FILE_REGULAR: /* 通常ファイル受信 */ rc = do_download_regular_file(&con, filepath, may_read, &total_write, model, iter); dbg_out("Retry:rc=%d file:%s write:%lld " "expected read :%lld dir:%s\n", rc, filepath, total_write, may_read, dirname); is_retry = post_download_operation(rc, filepath, total_write, may_read, dirname, is_interactive); if ( (rc != 0) && (is_retry == -EAGAIN) ) { /* 0リセット */ gtk_list_store_set(GTK_LIST_STORE(model), iter, DOWNLOAD_RECVSIZE_NUM, (int64_t)0, -1); ipmsg_update_ui(); close(con.soc); goto retry_this_file; } break; default: err_out("Unknown file type:%d\n", ftype); break; } close(con.soc); /* 端点のクローズは, 受信側で行うのがipmsgの仕様 */ error_out: return rc; } static void progress_cell_data_func(GtkTreeViewColumn *col, GtkCellRenderer *renderer, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { GtkTreeView *view = NULL; GtkEntry *entry = NULL; GtkWidget *window = NULL; int fd = 0; off_t sent = 0; off_t size = 0; gint persent = 0; int fattr_num = 0; gchar size_string[32]; gchar path_string[PATH_MAX]; gchar *filename = NULL; gboolean is_exist = FALSE; g_assert(user_data); view = (GtkTreeView *)user_data; window = lookup_widget(GTK_WIDGET(view), "downloadWindow"); g_assert(window != NULL); entry = GTK_ENTRY(lookup_widget(GTK_WIDGET(view), "DownLoadDirectoryEntry")); g_assert(entry != NULL); gtk_tree_model_get(model, iter, DOWNLOAD_FILENAME_NUM, &filename, DOWNLOAD_RECVSIZE_NUM, (int64_t *)&sent, DOWNLOAD_FILESIZE_NUM, (int64_t *)&size, DOWNLOAD_FILEATTR_NUM, &fattr_num, -1); snprintf(path_string, PATH_MAX, "%s/%s", gtk_entry_get_text(GTK_ENTRY(entry)), filename); path_string[PATH_MAX - 1] = '\0'; dbg_out("Check path:%s\n", path_string); /* * ファイル種別毎のファイルサイズ調整処理を実施 */ switch(fattr_num) { default: case IPMSG_FILE_REGULAR: break; case IPMSG_FILE_DIR: /* ディレクトリのダウンロードが完了したら * 親ディレクトリへの復帰になるはずなので * 0として扱う. */ persent = 0; goto output_out; /* 準備完了, 出力処理へ移行 */ break; case IPMSG_FILE_RETPARENT: /* ディレクトリの完了通知なので, 100%とみなす. * 厳密にいえば手抜きだが, * 中途のディレクトリも同様にあつかう */ persent = 100; goto output_out; /* 準備完了, 出力処理へ移行 */ break; } /* * 通常ファイルの処理 */ if (size > 0) persent = (gint)( (sent /(double)size) * 100); else { /* 0バイトファイル対策 */ persent = 0; fd = open(path_string, O_RDONLY); if (fd > 0) { is_exist = TRUE; close(fd); persent = 100; } } output_out: if (filename != NULL) g_free(filename); /* * パーセント値の補正 */ if (persent < 0) persent = 0; if (persent > 100) persent = 100; /* * 文字列表現の作成 */ snprintf(size_string, 31, "%d %%", persent); size_string[31] = '\0'; /* * パーセンテージ表示部分, 表示内容の数値とその文字列表現を設定 */ g_object_set(renderer, "value", persent, NULL); g_object_set(renderer, "text", size_string, NULL); } static int setup_download_view(GtkTreeView *view,GList *dlist) { GList *node; GtkTreeModel *model; GtkListStore *liststore; GtkTreeViewColumn *col; GtkCellRenderer *renderer; if ( (!view) || (!dlist) ) return -EINVAL; liststore = gtk_list_store_new(7, G_TYPE_INT, G_TYPE_STRING, G_TYPE_INT64, G_TYPE_INT64, G_TYPE_ULONG, G_TYPE_ULONG, G_TYPE_STRING); g_assert(liststore); gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(liststore)); g_object_unref(liststore); /* bind to view */ /* * タイトル設定 */ /* --- Column #1 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("FileID")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the id */ gtk_tree_view_column_add_attribute(col, renderer, "text", DOWNLOAD_FILEID_NUM); gtk_tree_view_column_set_resizable (col,TRUE); /* --- Column #2 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("FileType")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the file type */ gtk_tree_view_column_add_attribute(col, renderer, "text", DOWNLOAD_FILETYPE_NUM); gtk_tree_view_column_set_resizable (col,TRUE); /* --- Column #3 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("FileName")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the file name */ gtk_tree_view_column_add_attribute(col, renderer, "text", DOWNLOAD_FILENAME_NUM); gtk_tree_view_column_set_resizable (col,TRUE); /* --- Column #4 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("Recv Size")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the recv size */ gtk_tree_view_column_add_attribute(col, renderer, "text", DOWNLOAD_RECVSIZE_NUM); gtk_tree_view_column_set_resizable (col,TRUE); /* --- Column #5 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("FileSize")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the file size */ gtk_tree_view_column_add_attribute(col, renderer, "text", DOWNLOAD_FILESIZE_NUM); gtk_tree_view_column_set_resizable (col,TRUE); /* --- Column #6 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("Progress")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_progress_new (); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the progress */ gtk_tree_view_column_add_attribute(col, renderer, "text", DOWNLOAD_PROGRESS_NUM); gtk_tree_view_column_set_cell_data_func(col, renderer, progress_cell_data_func, GTK_TREE_VIEW(view), NULL); gtk_tree_view_column_set_resizable (col,TRUE); for(node=g_list_first (dlist);node;node=g_list_next(node)) { GtkTreeIter newrow; download_file_block_t *element = node->data; gchar *filename=NULL; const gchar *file_type_name = get_file_type_name(element->ipmsg_fattr); dbg_out("add view:%d,%s,%lld\n",element->fileid,element->filename,element->size); model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); gtk_list_store_append(GTK_LIST_STORE(model), &newrow); if (!convert_string_internal(element->filename,(const gchar **)&filename)) { gtk_list_store_set(GTK_LIST_STORE(model), &newrow, DOWNLOAD_FILEID_NUM, element->fileid, DOWNLOAD_FILENAME_NUM, filename, DOWNLOAD_RECVSIZE_NUM, (int64_t)0, DOWNLOAD_FILESIZE_NUM, (int64_t)element->size, DOWNLOAD_PROGRESS_NUM, 0, DOWNLOAD_FILEATTR_NUM, element->ipmsg_fattr, DOWNLOAD_FILETYPE_NUM, file_type_name, -1); g_free(filename); } } gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(view)), GTK_SELECTION_MULTIPLE ); return 0; } /* end static */ /* begin public */ int internal_create_download_window(GtkWindow *recvWin,GtkWindow **window){ GtkWidget *new_window = NULL; GtkWidget *view = NULL; ipmsg_recvmsg_private_t *new_sender = NULL; ipmsg_recvmsg_private_t *sender_info = NULL; ipmsg_private_data_t *recv_priv = NULL; ipmsg_private_data_t *new_priv = NULL; GtkWidget *entry = NULL; char cwd[PATH_MAX]; GList *downloads = NULL; if ( (!recvWin) && (!window) ) return -EINVAL; dbg_out("here\n"); if (getcwd(cwd,PATH_MAX)<0) cwd[0]='\0'; else cwd[PATH_MAX-1]='\0'; recv_priv=(ipmsg_private_data_t *)lookup_widget(GTK_WIDGET(recvWin),"senderInfo"); g_assert(recv_priv); sender_info=recv_priv->data; g_assert( (sender_info->ipaddr) && (sender_info->ext_part) ); g_assert(!init_recvmsg_private(sender_info->ipaddr,sender_info->flags,sender_info->pktno,&new_priv)); g_assert((new_priv) && (new_priv->data)); new_sender=(ipmsg_recvmsg_private_t *)new_priv->data; dbg_out("new_priv:%x new_priv->ext_part:%x\n", (unsigned int)new_priv, (unsigned int)new_sender->ext_part); g_assert((new_sender) && (!(new_sender->ext_part))); new_sender->ext_part=g_strdup(sender_info->ext_part); if (!(new_sender->ext_part)) { destroy_ipmsg_private(new_priv); return -ENOMEM; } g_assert(!parse_download_string(sender_info->ext_part, &downloads)); if (!downloads) return -ENOENT; new_window=GTK_WIDGET(create_downloadWindow ()); g_assert(new_window); dbg_out("Hook private:%x\n",(unsigned int)&new_priv); IPMSG_HOOKUP_DATA(new_window,new_priv,"senderInfo"); /* pktid用 */ view=lookup_widget(GTK_WIDGET(new_window),"DownLoadFileTree"); g_assert(view); setup_download_view(GTK_TREE_VIEW(view),downloads); entry=lookup_widget(new_window,"DownLoadDirectoryEntry"); gtk_entry_set_text(GTK_ENTRY(entry),cwd); *window=GTK_WINDOW(new_window); return 0; } int download_dir_open_operation(const char *dir){ GtkWidget *dialog=create_downloadOpenDirOnlydialog(); GtkWidget *dir_label; gint result; gchar *dir_url; gchar buffer[1024]; int rc; if (!dir) return -EINVAL; dir_url=gnome_vfs_get_uri_from_local_path(dir); if (!dir_url) return -EINVAL; dir_label=lookup_widget(dialog,"downloadOpenDirNameLabel"); g_assert(dir_label); snprintf(buffer,1023,"%s : %s",_("Directory"),dir); buffer[1023]='\0'; gtk_label_set_text(GTK_LABEL(dir_label),buffer); result=gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_OK: dbg_out("Accept for directory\n"); break; case GTK_RESPONSE_CANCEL: default: dbg_out("response:%d cancel\n",result); goto error_out; break; } rc=gnome_vfs_url_show(dir_url); if ( rc != GNOME_VFS_OK) rc=-rc; else rc=0; error_out: gtk_widget_destroy (dialog); g_free(dir_url); return rc; } int download_file_ok_operation(const char *file,const char *filepath, off_t size,const char *dir){ GtkWidget *dialog=create_DownloadConfirmDialog(); GtkWidget *file_label; GtkWidget *size_label; GtkWidget *app_label; GtkWidget *exec_btn; GtkWidget *dir_btn; char buff[1024]; gint result; gchar *url; gchar *file_url; gchar *dir_url; gchar *utf8_fname; char *mime_type; GnomeVFSMimeApplication *app; int rc=-EINVAL; int exec_ok; if ( (!file) || (!filepath) || (!dir) ) return -EINVAL; dbg_out("Post down load opetation filepath:%s dir:%s\n",filepath,dir); g_assert(dialog); file_label=GTK_WIDGET(lookup_widget(dialog,"DownLoadCompleteFileLabel")); size_label=GTK_WIDGET(lookup_widget(dialog,"DownLoadConfirmFileSizeLabel")); app_label=GTK_WIDGET(lookup_widget(dialog,"DownLoadConfirmAppLabel")); exec_btn=GTK_WIDGET(lookup_widget(dialog,"DownLoadConfirmExec")); dir_btn=GTK_WIDGET(lookup_widget(dialog,"DownLoadConfirmOpen")); g_assert(file_label); g_assert(size_label); g_assert(app_label); g_assert(exec_btn); g_assert(dir_btn); buff[1023]='\0'; snprintf(buff,1023,"%s : %s",_("Downloaded File"),file); gtk_label_set_text(GTK_LABEL(file_label),buff); snprintf(buff,1023,"%s : %lld (%lld KB)", _("Downloaded Size"), size, (size/1024LL)); gtk_label_set_text(GTK_LABEL(size_label),buff); file_url=gnome_vfs_get_uri_from_local_path(filepath); if (!file_url) return -EINVAL; dir_url=gnome_vfs_get_uri_from_local_path(dir); if (!dir_url) goto free_url_out; mime_type=gnome_vfs_get_mime_type(file_url); if (mime_type) { app=gnome_vfs_mime_get_default_application_for_uri(file_url,mime_type); if (app){ snprintf(buff,1023,"%s : %s",_("Helper Application"),gnome_vfs_mime_application_get_name(app)); gnome_vfs_mime_application_free(app); }else{ snprintf(buff,1023,"%s : %s",_("Helper Application"),_("Undefined")); exec_ok=0; gtk_widget_set_sensitive(exec_btn, FALSE); } g_free(mime_type); } gtk_label_set_text(GTK_LABEL(app_label),buff); mime_type=gnome_vfs_get_mime_type(dir_url); if (mime_type) { app=gnome_vfs_mime_get_default_application_for_uri(dir_url,mime_type); if (!app) gtk_widget_set_sensitive(dir_btn, FALSE); gnome_vfs_mime_application_free(app); g_free(mime_type); } result=gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_OK: dbg_out("Accept for directory\n"); url=dir_url; break; case GTK_RESPONSE_ACCEPT: dbg_out("Accept for exec\n"); url=file_url; break; case GTK_RESPONSE_CLOSE: default: dbg_out("response:%d close\n",result); gtk_widget_destroy (dialog); rc=-ENOENT; goto free_dir_url_out; break; } gtk_widget_destroy (dialog); rc=gnome_vfs_url_show(url); if ( rc != GNOME_VFS_OK) rc=-rc; else rc=0; free_dir_url_out: g_free(dir_url); free_url_out: g_free(file_url); no_free_out: return rc; } int download_file_failed_operation(const char *filepath, const char *basename){ GtkWidget *dialog=create_downLoadFailDialog (); GtkWidget *flabel; gint result; int rc; if (!dialog) { err_out("Can not create dialog\n"); return -ENOMEM; } flabel=lookup_widget(dialog,"downLoadFailFileLabel"); g_assert(flabel); if (basename) gtk_label_set_text(GTK_LABEL(flabel),basename); else gtk_label_set_text(GTK_LABEL(flabel),_("UnKnown")); rc=0; result=gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_OK: dbg_out("response:%d ok\n",result); rc=-EAGAIN; break; case GTK_RESPONSE_CANCEL: default: dbg_out("response:%d cancel\n",result); if (filepath) { dbg_out("remove:%s\n",filepath); unlink(filepath); } break; } gtk_widget_destroy (dialog); return rc; } int post_download_operation(int code, const char *filepath, off_t size, off_t all_size, const char *dir, gboolean exec){ int rc = 0; char *file = NULL; if ( (filepath == NULL) || (dir == NULL) ) return -EINVAL; file = g_path_get_basename(filepath); if (file == NULL) return -ENOMEM; if ( (exec) && (code == 0) && (size == all_size) ) { rc = download_file_ok_operation(file, filepath, size, dir); } else { if ( (code) && (code != -EFAULT) ) rc = download_file_failed_operation(filepath, file); } g_free(file); return rc; } int download_overwrite_confirm_generic(const char *filepath){ GtkWidget *dialog=create_ipmsgDownloadOverWrite (); GtkWidget *label; gint result; if (!filepath) return -EINVAL; g_assert(dialog); label=GTK_WIDGET(lookup_widget(dialog,"overwriteFileNameLabel")); gtk_label_set_text(GTK_LABEL(label),filepath); result=gtk_dialog_run (GTK_DIALOG (dialog)); switch (result) { case GTK_RESPONSE_OK: dbg_out("Accept for overwrite\n"); break; default: return -ENOENT; break; } err_out("Can not open file:%s (%d)\n",strerror(errno),errno); gtk_widget_destroy (dialog); return 0; } int do_download_regular_file(tcp_con_t *con, const char *filepath, off_t file_size, off_t *written, GtkTreeModel *model, GtkTreeIter *iter){ int rc = 0; int fd = 0; char *buff = NULL; int wait_max = TCP_DOWNLOAD_RETRY; ssize_t recv_len = 0; ssize_t write_len = 0; off_t total_write = 0; off_t file_remains = 0; if ( (con == NULL) || (filepath == NULL) || (written == NULL) || (model == NULL) || (iter == NULL) ) return -EINVAL; buff = g_malloc(_MSG_BUF_SIZE); if (buff == NULL) return -ENOMEM; fd = open(filepath, O_RDWR|O_EXCL|O_CREAT, S_IRWXU); if (fd < 0) { if (errno == EEXIST) { GtkWidget *dialog = create_ipmsgDownloadOverWrite(); GtkWidget *label = NULL; gint result = 0; g_assert(dialog != NULL); label = GTK_WIDGET(lookup_widget(dialog, "overwriteFileNameLabel")); gtk_label_set_text(GTK_LABEL(label), filepath); result = gtk_dialog_run (GTK_DIALOG(dialog)); switch (result) { case GTK_RESPONSE_OK: dbg_out("Accept for overwrite\n"); fd = open(filepath, O_RDWR|O_CREAT, S_IRWXU); if (fd < 0) { err_out("Can not open file:%s %s (%d)\n", filepath, strerror(errno), errno); gtk_widget_destroy (dialog); rc = -errno; goto no_close_out; } break; default: if (errno) err_out("response:%d Can not open file:%s (%d)\n", result, strerror(errno), errno); else err_out("Can not open file %s fd: %d :%s (%d)\n", filepath, fd, strerror(errno), errno); gtk_widget_destroy(dialog); rc = -ENOENT; goto no_close_out; break; } err_out("Can not open file:%s (%d)\n", strerror(errno), errno); gtk_widget_destroy (dialog); } else{ err_out("Can not open file:%s (%d)\n", strerror(errno), errno); rc = -errno; goto no_close_out; } } retry_this_file: lseek(fd, 0, SEEK_SET); total_write = 0; file_remains = file_size; dbg_out("Try to read %lld byte total\n", file_remains); /* * 同期のためのselect */ wait_max = TCP_DOWNLOAD_RETRY; wait_peer: ipmsg_update_ui(); rc = wait_socket(con->soc, WAIT_FOR_READ, TCP_SELECT_SEC); if (rc < 0) { --wait_max; if (wait_max) goto wait_peer; err_out("Can not wait for peer %s (%d)\n", strerror(-rc), -rc); goto file_close_out; } /* *読み取り */ wait_max = TCP_DOWNLOAD_RETRY; read_wait:/* 同期のためにウエイト付きで読む */ memset(buff, 0, _MSG_BUF_SIZE); recv_len = (file_remains > _MSG_BUF_SIZE) ? (_MSG_BUF_SIZE) : (file_remains); recv_len = recv(con->soc, buff, recv_len, (MSG_PEEK) ); /* 仮読み */ if ( (wait_max > 0) && ( (recv_len == 0) || (errno == EINTR) || (errno == EAGAIN) ) ) { ipmsg_update_ui(); --wait_max; goto read_wait; } if (recv_len < 0) { err_out("Can not peek message %s(errno:%d)\n", strerror(errno), errno); rc = -errno; goto file_close_out; /* err or end */ } recv_len = recv(con->soc, buff, recv_len, 0); /* 読み込み */ while(recv_len >= 0){ write_len=write(fd,buff,recv_len); if (write_len<0) { err_out("Can not write file %s(errno:%d)\n", strerror(errno), errno); rc = -errno; goto file_close_out; /* err or end */ } total_write += write_len; file_remains -= recv_len; if ( !GTK_IS_LIST_STORE (model) ) { war_out("Download window is destroyed.\n"); rc = -EFAULT; /* 仮にEFAULTを返す */ goto file_close_out; /* window destory */ } gtk_list_store_set(GTK_LIST_STORE(model), iter, DOWNLOAD_RECVSIZE_NUM, (int64_t)total_write, -1); ipmsg_update_ui(); dbg_out("tcp write file :%d\n", total_write); if (file_remains == 0){ dbg_out("OK :%d\n", total_write); rc = 0; break; } retry_recv: wait_max = TCP_DOWNLOAD_RETRY; memset(buff, 0, _MSG_BUF_SIZE); recv_len = (file_remains > _MSG_BUF_SIZE) ? (_MSG_BUF_SIZE) : (file_remains); recv_len = recv(con->soc, buff, recv_len, MSG_PEEK ); if (recv_len <= 0) { if ( (wait_max > 0) && ( (recv_len == 0) || (errno == EINTR) || (errno == EAGAIN) ) ) { ipmsg_update_ui(); --wait_max; goto retry_recv; } err_out("Can not recv message %s(errno:%d)\n", strerror(errno), errno); rc = -errno; goto file_close_out; /* err or end */ } recv_len = recv(con->soc, buff, recv_len, 0); /* 読み込み */ } /* 0バイトファイル対策のためもう一度書き込む */ gtk_list_store_set(GTK_LIST_STORE(model), iter, DOWNLOAD_RECVSIZE_NUM, (int64_t)total_write, -1); ipmsg_update_ui(); rc = 0; file_close_out: close(fd); no_close_out: *written = total_write; if (buff) g_free(buff); return rc; } int do_download_directory(tcp_con_t *con, const char *top_dir,GtkTreeModel *model,GtkTreeIter *iter){ int rc; int fd; char *buff=NULL; ssize_t recv_len; ssize_t drop_len; off_t total_write=0; int wait_max=TCP_DOWNLOAD_RETRY; dir_request_t dir_info; char *current_dir; char *new_dir=NULL; gchar *regular_file; off_t written; gboolean is_cont=TRUE; if ( (!con) || (!top_dir) || (!model) || (!iter) ) return -EINVAL; if (!g_path_is_absolute(top_dir)) return -EINVAL; buff=g_malloc(_MSG_BUF_SIZE); if (!buff) return -ENOMEM; current_dir=g_strdup(top_dir); if (!current_dir) { g_free(buff); return -ENOMEM; } do{ /* * 同期のためのselect */ wait_max=TCP_DOWNLOAD_RETRY; wait_peer: ipmsg_update_ui(); rc=wait_socket(con->soc,WAIT_FOR_READ,TCP_SELECT_SEC); if (rc<0) { --wait_max; if (wait_max) goto wait_peer; err_out("Can not wait for peer %s (%d)\n",strerror(-rc),-rc); goto error_out; } /* *読み取り */ wait_max=TCP_DOWNLOAD_RETRY; read_wait:/* 同期のためにウエイト付きで読む */ memset(buff,0,_MSG_BUF_SIZE); recv_len=recv(con->soc,buff,_MSG_BUF_SIZE,(MSG_PEEK)); /* 仮読み */ if ( (wait_max) && ( (!recv_len) || (errno == EINTR) || (errno == EAGAIN) ) ) { ipmsg_update_ui(); --wait_max; goto read_wait; } if (recv_len<0) { err_out("Can not peek message %s(errno:%d)\n",strerror(errno),errno); rc=-errno; goto error_out; /* err or end */ } /* *一度で読み取れなければ再トライ */ memset(&dir_info,0,sizeof(dir_request_t)); rc=parse_dir_request(buff,&dir_info,recv_len); if (rc) { release_dir_info_contents(&dir_info); --wait_max; goto read_wait; } if (!dir_info.header_size) { release_dir_info_contents(&dir_info); break; } drop_len=dir_info.header_size; drop_len=recv(con->soc,buff,drop_len,0); /* ヘッダ読み捨て */ if (drop_len<0) { err_out("Can not drop message %s(errno:%d)\n",strerror(errno),errno); rc=-errno; goto error_out; /* err or end */ } dbg_out("OK Drop:%d\n",drop_len); switch(download_base_cmd(dir_info.ipmsg_fattr)){ case IPMSG_FILE_DIR: rc=update_file_display(dir_info.ipmsg_fattr, dir_info.filename, dir_info.file_size, model, iter); if (rc<0) { release_dir_info_contents(&dir_info); goto error_out; } rc=emulate_chdir(current_dir,dir_info.filename,&new_dir); if (rc<0) { release_dir_info_contents(&dir_info); goto error_out; } g_free(current_dir); current_dir=new_dir; dbg_out("Chdir to:%s\n",current_dir); if (dir_info.file_size > 0) { drop_len=(dir_info.file_size<_MSG_BUF_SIZE)?(dir_info.file_size):(_MSG_BUF_SIZE); drop_len=recv(con->soc,buff,drop_len,0); /* 継続読み捨て */ if (drop_len<0) { err_out("Can not drop message %s(errno:%d)\n",strerror(errno),errno); rc=-errno; release_dir_info_contents(&dir_info); goto error_out; /* err or end */ } } break; case IPMSG_FILE_RETPARENT: dbg_out("Return to parent:cur=%s\n",current_dir); rc=update_file_display(dir_info.ipmsg_fattr,dir_info.filename,dir_info.file_size,model,iter); if (rc<0) { release_dir_info_contents(&dir_info); goto error_out; } create_parent_dir(current_dir,&new_dir); if (rc<0) { release_dir_info_contents(&dir_info); goto error_out; } g_free(current_dir); current_dir=new_dir; dbg_out("Chdir to:%s\n",current_dir); rc=check_end_condition(top_dir,current_dir,&is_cont); if (rc<0){ release_dir_info_contents(&dir_info); goto error_out; } break; case IPMSG_FILE_REGULAR: rc=update_file_display(dir_info.ipmsg_fattr,dir_info.filename,dir_info.file_size,model,iter); if (rc<0) { release_dir_info_contents(&dir_info); goto error_out; } dbg_out("Download : %s/%s but drop at this time\n",current_dir,dir_info.filename); regular_file=g_build_filename(current_dir,dir_info.filename,NULL); if (!regular_file) { release_dir_info_contents(&dir_info); goto error_out; } rc=do_download_regular_file(con, regular_file, dir_info.file_size, &written, model,iter); g_free(regular_file); if ( (rc<0) || (written != dir_info.file_size) ){ release_dir_info_contents(&dir_info); goto error_out; } break; default: break; } }while(is_cont); error_out: if (current_dir) g_free(current_dir); if (buff) g_free(buff); return rc; } int send_download_request(tcp_con_t *con, const char *ipaddr, ipmsg_ftype_t ftype,long pkt_no,int fileid){ int rc; char *buff=NULL; char *req_message=NULL; ssize_t len; ssize_t soc_remains; ssize_t write_len; int wait_max=TCP_DOWNLOAD_RETRY; struct sigaction saved_act; buff=g_malloc(_MSG_BUF_SIZE); if (!buff) return -ENOMEM; memset(buff,0,_MSG_BUF_SIZE); snprintf(buff,_MSG_BUF_SIZE-1, (ftype == IPMSG_FILE_DIR)?("%lx:%x"):("%lx:%x:0:"), (long)pkt_no,(unsigned int)fileid); buff[_MSG_BUF_SIZE-1]='\0'; dbg_out("request:%s\n",buff); rc = ipmsg_construct_getfile_message(con, ipaddr, ftype, buff, 0, (size_t *)&len, &req_message); if (rc<0) { goto free_buff_out; } dbg_out("request message:%s\n",req_message); wait_max=TCP_DOWNLOAD_RETRY; wrtite_wait_start: ipmsg_update_ui(); rc=wait_socket(con->soc,WAIT_FOR_WRITE,TCP_SELECT_SEC); if (rc<0) { --wait_max; if (wait_max) goto wrtite_wait_start; err_out("Can not write for socket %s (%d)\n",strerror(-rc),-rc); goto error_out; } soc_remains=len; while(soc_remains > 0) { disable_pipe_signal(&saved_act); write_len=send(con->soc, req_message,len, 0); enable_pipe_signal(&saved_act); if (write_len < 0) { err_out("Can not write socket :%s (%d)\n",strerror(errno),errno); rc=-errno; goto error_out; } soc_remains -= write_len; dbg_out("Write remains:%d\n",soc_remains); } rc=0; error_out: g_free(req_message); free_buff_out: if (buff) g_free(buff); return rc; } gboolean is_supported_file_type(unsigned long ipmsg_fattr){ switch(download_base_cmd(ipmsg_fattr)) { case IPMSG_FILE_REGULAR: case IPMSG_FILE_DIR: return TRUE; break; default: break; } return FALSE; } /* recv attachments */ void recv_attachments(gpointer data) { GtkTreeSelection *sel = NULL; ipmsg_private_data_t *priv = NULL; GtkWidget *view = NULL; GList *node = NULL; GtkWidget *okbtn = NULL; GtkTreeModel *model = NULL; GList *pathes = NULL; GtkButton *button = NULL; GtkWidget *window = NULL; GtkWidget *dirbtn = NULL; GtkWidget *all_check = NULL; GtkWidget *dir_entry = NULL; ipmsg_recvmsg_private_t *sender_info = NULL; int rc = 0; gboolean noneed_to_destory = FALSE; GtkTreeIter iter; dbg_out("here:\n"); if (data == NULL) return; /* * Widgets relevant initilization. */ button = GTK_BUTTON(data); window = lookup_widget(GTK_WIDGET(button), "downloadWindow"); g_assert(window != NULL); dirbtn = lookup_widget(GTK_WIDGET(window), "DownLoadOpenBtn"); g_assert(dirbtn != NULL); okbtn = lookup_widget(GTK_WIDGET(window),"DownLoadOKBtn"); g_assert(okbtn != NULL); all_check = lookup_widget(GTK_WIDGET(window), "DownLoadAllCheckBtn"); g_assert(all_check != NULL); dir_entry=lookup_widget(GTK_WIDGET(window), "DownLoadDirectoryEntry"); g_assert(dir_entry != NULL); priv = (ipmsg_private_data_t *)lookup_widget(GTK_WIDGET(window), "senderInfo"); g_assert(priv != NULL); sender_info = priv->data; g_assert(sender_info->ipaddr != NULL); gtk_widget_set_sensitive(dirbtn, FALSE); gtk_widget_set_sensitive(okbtn, FALSE); gtk_widget_set_sensitive(all_check, FALSE); gtk_widget_set_sensitive(dir_entry, FALSE); view = lookup_widget(GTK_WIDGET(window), "DownLoadFileTree"); g_assert(view != NULL); /* * Receive items */ sel = gtk_tree_view_get_selection( GTK_TREE_VIEW(view) ); pathes = gtk_tree_selection_get_selected_rows(sel, &model); for(node = g_list_first(pathes); node != NULL; node = g_list_next(node) ) { /* * Scroll window according to download progression. */ g_assert( (node != NULL) && (node->data != NULL) ); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(view), node->data, NULL, FALSE, 0.0, 0.0); /* * Get the position of current download item, and * download it */ gtk_tree_model_get_iter(model, &iter, node->data); rc = do_download(model, node->data, &iter, window); /* * Check whether the window alive. */ if ( (rc < 0) && ( !GTK_IS_WINDOW(window) ) ) { /* window destroyed, free the list & it's contents */ g_list_foreach (pathes, (GFunc)gtk_tree_path_free, NULL); g_list_free (pathes); return; } } /* free the list & it's contents */ g_list_foreach (pathes, (GFunc)gtk_tree_path_free, NULL); g_list_free(pathes); /* * remove items on the window */ for(sel = gtk_tree_view_get_selection( GTK_TREE_VIEW(view) ); gtk_tree_selection_count_selected_rows (sel) > 0; ) { pathes = gtk_tree_selection_get_selected_rows(sel, &model); node = g_list_first(pathes); g_assert( (node != NULL) && (node->data != NULL) ); gtk_tree_model_get_iter(model, &iter, node->data); gtk_list_store_remove( GTK_LIST_STORE(model), &iter); g_list_foreach (pathes, (GFunc)gtk_tree_path_free, NULL); g_list_free(pathes); } /* * Update button status */ if (gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(all_check) ) ) download_dir_open_operation( gtk_entry_get_text( GTK_ENTRY(dir_entry) ) ); gtk_widget_set_sensitive(dirbtn, TRUE); gtk_widget_set_sensitive(okbtn, TRUE); gtk_widget_set_sensitive(all_check, TRUE); gtk_widget_set_sensitive(dir_entry, TRUE); /* * Destroy the window if no items remain. */ noneed_to_destory = gtk_tree_model_get_iter_first (model, &iter); if (noneed_to_destory) dbg_out("some element remain\n"); else gtk_widget_destroy (window); } g2ipmsg-0.9.6+dfsg/src/downloads.h000066400000000000000000000053131126724573600167660ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(DOWNLOADS_H) #define DOWNLOADS_H #ifdef HAVE_CONFIG_H # include #endif #include #include typedef struct _dir_request{ long header_size; gchar *filename; off_t file_size; unsigned long ipmsg_fattr; }dir_request_t; #define download_base_cmd(attr) ((attr)&(0xff)) #define DOWNLOAD_FILEID_NUM 0 #define DOWNLOAD_FILENAME_NUM 1 #define DOWNLOAD_RECVSIZE_NUM 2 #define DOWNLOAD_FILESIZE_NUM 3 #define DOWNLOAD_PROGRESS_NUM 4 #define DOWNLOAD_FILEATTR_NUM 5 #define DOWNLOAD_FILETYPE_NUM 6 int internal_create_download_window(GtkWindow *recvWin,GtkWindow **window); int download_dir_open_operation(const char *dir); int download_file_ok_operation(const char *file,const char *filepath, off_t size,const char *dir); int download_file_failed_operation(const char *filepath,const char *basename); int post_download_operation(int code,const char *filepath, off_t size, off_t all_size,const char *dir,gboolean exec); int do_download_regular_file(tcp_con_t *con, const char *filepath, off_t file_size, off_t *written,GtkTreeModel *model,GtkTreeIter *iter); int send_download_request(tcp_con_t *con, const char *ipaddr, unsigned long ftype,long pkt_no,int fileid); int do_download_directory(tcp_con_t *con, const char *top_dir,GtkTreeModel *model,GtkTreeIter *iter); gboolean is_supported_file_type(unsigned long ipmsg_fattr); void recv_attachments(gpointer data); #endif g2ipmsg-0.9.6+dfsg/src/fileattach.c000066400000000000000000000746501126724573600171050ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** 不明なファイル種別 */ #define IPMSG_UNKNWON_FATTR (0) /** ファイル種別コード->ファイルしゅ別文字列変換テーブル * @attention 内部リンケージ */ static const gchar *str_ipmsg_fattr[]={ "UnKnown", "Regular", "Directory", "ReturnParent", "SymLink", "Character Device", "Block Device", "FIFO", "ResFork",}; /** アップロードリストのスレッド間排他ロック * @attention 内部リンケージ */ GList *uploads=NULL; /** ダウンロードリストスレッド間排他ロック * @attention 内部リンケージ */ GList *downloads=NULL; /** アップロードキュースレッド間排他ロック * @attention 内部リンケージ */ GStaticMutex upload_queue_mutex = G_STATIC_MUTEX_INIT; /** ダウンロードロードキュースレッド間排他ロック * @attention 内部リンケージ */ GStaticMutex download_queue_mutex = G_STATIC_MUTEX_INIT; /* utils */ /* basic operations */ static int create_file_info(file_info_t **file_info) { int rc = 0; file_info_t *new_info = NULL; if (file_info == NULL) { rc = -EINVAL; goto no_free_out; } new_info = g_slice_new(file_info_t); if (new_info == NULL) { rc = -ENOMEM; goto no_free_out; } memset(new_info, 0, sizeof(file_info_t)); new_info->mutex = g_mutex_new(); if (new_info->mutex == NULL) { rc = -ENOMEM; goto free_info_out; } *file_info = new_info; goto no_free_out; free_info_out: dbg_out("Free: %x\n", (unsigned int)new_info); g_slice_free(file_info_t, new_info); no_free_out: return rc; } static int destroy_file_info(file_info_t *file_info) { GList *entry,*xattr_list; if (!file_info) return -EINVAL; if (!g_mutex_trylock(file_info->mutex)) return -EBUSY; xattr_list=file_info->xattrs; for(entry=g_list_first(xattr_list);entry;entry=g_list_next(entry)) { if (entry->data) g_free(entry->data); } g_list_free(xattr_list); g_assert(file_info->xattrs==NULL); g_mutex_unlock(file_info->mutex); dbg_out("Destroy :%x\n",(unsigned int)file_info); g_mutex_free (file_info->mutex); if (file_info->filepath) g_free(file_info->filepath); if (file_info->filename) g_free(file_info->filename); dbg_out("Free: %x\n",(unsigned int)file_info); g_slice_free(file_info_t,file_info); memset(file_info,0,sizeof(file_info_t)); return 0; } static gint check_duplicate_attach(gconstpointer a,gconstpointer b){ file_info_t *info_a,*info_b; if ( (!a) || (!b) ) return -EINVAL; info_a=(file_info_t *)a; info_b=(file_info_t *)b; if ( (!(info_a->filepath)) || (!(info_b->filepath)) ) return -EINVAL; return strcmp(info_a->filepath,info_b->filepath); } static int setup_file_info(int newid,file_info_t *new_info,const gchar *path){ int rc; char *filename; char *fname_sp; char *new_path; off_t this_size; time_t this_mtime; ipmsg_ftype_t this_type; if ( (!path) || (!new_info) ) return -EINVAL; rc=get_file_info(path, &this_size, &this_mtime, &this_type); if (rc<0) return rc; rc=-ENOMEM; fname_sp=strrchr((const char *)path,'/'); if (fname_sp) { filename=g_strdup(fname_sp+1); if (!(filename)) return rc; }else{ filename=g_strdup(path); if (!(filename)) return rc; } new_path=g_strdup(path); if (!new_path) goto free_filename_out; rc=-EBUSY; if (!g_mutex_trylock(new_info->mutex)) { goto free_filepath_out; } new_info->fileid=newid; new_info->filename=filename; new_info->filepath=new_path; new_info->size=this_size; new_info->m_time=this_mtime; new_info->ipmsg_fattr=this_type; dbg_out("New attached file:id=%d,name=%s,path=%s,size=0x%llx,mtime=%x\n", new_info->fileid, new_info->filename, new_info->filepath, new_info->size, (unsigned int)new_info->m_time); g_mutex_unlock(new_info->mutex); rc=0; return rc; free_filepath_out: g_free(new_path); free_filename_out: g_free(filename); return rc; } /* public */ const gchar * get_file_type_name(unsigned long fattr) { const gchar *name = str_ipmsg_fattr[IPMSG_UNKNWON_FATTR]; if ( (fattrIPMSG_FILE_RESFORK) ) goto error_out; name = _(str_ipmsg_fattr[(int)fattr]); error_out: return name; } int get_file_info(const gchar *path, off_t *size, time_t *mtime, ipmsg_ftype_t *ipmsg_type) { int rc = 0; int fd = 0; ipmsg_ftype_t ftype = 0; off_t fsize = 0; time_t fmtime = 0; struct stat stat_buf; if ( (path == NULL) || (size == NULL) || (mtime == NULL) || (ipmsg_type == NULL) ) { rc = -EINVAL; goto error_out; } /* * ファイル属性を取得するためにopenする。 */ fd = open(path, O_RDONLY); if (fd < 0) { rc = -errno; goto error_out; } /* * ファイル属性を獲得する. */ rc = fstat(fd, &stat_buf); if (rc < 0) { rc = -errno; goto close_out; } /* * 最終更新時刻/サイズを獲得する */ fmtime = stat_buf.st_mtime; fsize = stat_buf.st_size; /* * ファイル種別からIPMSGのファイル属性を設定する */ if ( S_ISREG(stat_buf.st_mode) ) ftype = IPMSG_FILE_REGULAR; /* 通常ファイル */ else if ( S_ISDIR(stat_buf.st_mode) ) { ftype = IPMSG_FILE_DIR; /* ディレクトリ */ fsize = 0; /* IPMSGでは, ディレクトリサイズは0として扱う */ } else if ( S_ISCHR(stat_buf.st_mode) ) ftype = IPMSG_FILE_CDEV; /* キャラクタ型デバイス */ else if ( S_ISFIFO(stat_buf.st_mode) ) ftype = IPMSG_FILE_FIFO; /* FIFO(名前付きパイプ) */ else ftype = 0; /* * シンボリックリンクを検出するためにlstatを実行 */ rc = lstat(path, &stat_buf); if (rc < 0) { rc = -errno; goto close_out; } if ( S_ISLNK(stat_buf.st_mode) ) ftype = IPMSG_FILE_SYMLINK; /* * 返却 */ *size = fsize; *mtime = fmtime; *ipmsg_type = ftype; close_out: close(fd); error_out: return rc; } int create_attach_file_block(attach_file_block_t **afcb){ int rc; attach_file_block_t *new_block; if (!afcb) return -EINVAL; rc=-ENOMEM; new_block=g_slice_new(attach_file_block_t); if (!new_block) return rc; memset(new_block,0,sizeof(attach_file_block_t)); new_block->mutex=g_mutex_new(); if (!(new_block->mutex)) goto free_block_out; new_block->count=0; *afcb=new_block; return 0; free_block_out: dbg_out("Free: %x\n",(unsigned int)new_block); g_slice_free(attach_file_block_t,new_block); return rc; } int set_attch_file_block_pktno(attach_file_block_t *afcb,const pktno_t pktno){ if (!afcb) return -EINVAL; if (!g_mutex_trylock(afcb->mutex)) { return -EBUSY; } g_mutex_unlock(afcb->mutex); return 0; } int destroy_attach_file_block(attach_file_block_t **afcb){ int rc; attach_file_block_t *removed_block; GList *entry,*file_list; if ( (!afcb) || (!(*afcb)) ) return -EINVAL; removed_block=*afcb; if (!g_mutex_trylock(removed_block->mutex)) return -EBUSY; if (removed_block->ipaddr) { g_free(removed_block->ipaddr); removed_block->ipaddr=NULL; } /* files */ file_list=removed_block->files; for(entry=g_list_first(file_list);entry;entry=g_list_next(entry)) { if (entry->data) { file_info_t *file_info; file_info=entry->data; rc=destroy_file_info(file_info); g_assert(rc==0); entry->data=NULL; } } g_list_free(file_list); g_mutex_unlock(removed_block->mutex); /* mutex */ g_mutex_free (removed_block->mutex); dbg_out("Destroy :%x\n",(unsigned int)removed_block); dbg_out("Free: %x\n",(unsigned int)removed_block); g_slice_free(attach_file_block_t,removed_block); *afcb=NULL; return 0; } int add_attach_file(attach_file_block_t *afcb,const gchar *path){ int rc; int new_id; file_info_t *new_info; dbg_out("here\n"); if ( (!afcb) || (!path) ) return -EINVAL; rc=create_file_info(&new_info); if (rc<0) return rc; new_id=afcb->max_id; rc=setup_file_info(new_id,new_info,path); if (rc<0) goto destroy_new_item_out; rc=-EBUSY; if (!g_mutex_trylock(afcb->mutex)) { goto destroy_new_item_out; } rc=-EEXIST; if (g_list_find_custom(afcb->files,new_info,check_duplicate_attach)) { g_mutex_unlock(afcb->mutex); dbg_out("Already exist:%s\n",path); goto destroy_new_item_out; } afcb->files=g_list_append(afcb->files,new_info); ++afcb->max_id; new_info->main_info_ref=afcb; g_mutex_unlock(afcb->mutex); dbg_out("new state:\n"); show_file_list(afcb); return 0; destroy_new_item_out: destroy_file_info(new_info); return rc; } int remove_attach_file(attach_file_block_t *afcb,const gchar *path){ file_info_t check_info; GList *node; if ( (!afcb) || (!path) ) return -EINVAL; memset(&check_info,0,sizeof(file_info_t)); check_info.filepath=(gchar *)path; node=g_list_find_custom(afcb->files,&check_info,check_duplicate_attach); if (!node) { dbg_out("No such file:%s\n",path); return -ENOENT; } if (!g_mutex_trylock(afcb->mutex)) { return -EBUSY; } destroy_file_info(node->data); afcb->files=g_list_remove(afcb->files,node); g_mutex_unlock(afcb->mutex); return 0; } static int create_one_file_string(file_info_t *info,const gchar **string){ int rc; char buff[FILE_ATTCH_ONE_EXT_SIZE]; attach_file_block_t *afcb; char *new_string; gchar *ext_file_encoding; if ( (!info) || (!string) ) return -EINVAL; if (!g_mutex_trylock(info->mutex)) { return -EBUSY; } afcb=info->main_info_ref; rc=-EINVAL; if (!afcb) goto error_out; rc=-ENOMEM; ext_file_encoding=NULL; memset(buff,0,FILE_ATTCH_ONE_EXT_SIZE); snprintf(buff,FILE_ATTCH_ONE_EXT_SIZE-2,"%d:%s:%x:%x:%x:%c", info->fileid, info->filename, (unsigned int)info->size, (unsigned int)info->m_time, (unsigned int)info->ipmsg_fattr,FILELIST_SEPARATOR); buff[FILE_ATTCH_ONE_EXT_SIZE-1]='\0'; dbg_out("attach-file:%s=%s\n",info->filepath,buff); new_string=g_strdup(buff); if (ext_file_encoding != NULL) g_free(ext_file_encoding); if (!new_string) goto error_out; /* -ENOMEM */ *string=new_string; rc=0; error_out: g_mutex_unlock(info->mutex); return rc; } int get_attach_file_extention(attach_file_block_t *afcb,const gchar **ext_string){ int rc; gchar *all_files=NULL; size_t len,total_len,buff_len; file_info_t *info; GList *file_list,*entry; if ( (!afcb) || (!ext_string) ) return -EINVAL; all_files=g_malloc(FATTACH_BUFF_LEN); if (!all_files) return -ENOMEM; memset(all_files,0,FATTACH_BUFF_LEN); buff_len=FATTACH_BUFF_LEN; total_len=0; file_list=afcb->files; for(entry=g_list_first(file_list);entry;entry=g_list_next(entry)) { gchar *string; info=entry->data; rc=create_one_file_string(info,(const gchar **)&string); if (rc<0) goto free_all_files; len=strlen(string); while(buff_len <= (total_len+len)) { /* null終端を考慮して=を入れている */ if (internal_extend_memory(&all_files,(buff_len + FATTACH_BUFF_LEN),buff_len,TRUE)){ rc=-ENOMEM; g_free(string); goto free_all_files; } buff_len += FATTACH_BUFF_LEN; } strncat(all_files,string,len); dbg_out("New string state:%s(addr:0x%x)\n", all_files, (unsigned int)all_files); g_free(string); total_len+=len; all_files[total_len]='\0'; } len=strlen(all_files); while ( (len>1) && (all_files[len-1] == FILELIST_SEPARATOR) ) { all_files[len-1]='\0'; --len; } *ext_string=all_files; dbg_out("attach-file-ext:%s\n",*ext_string); return 0; free_all_files: if (all_files) g_free(all_files); return rc; } static gint find_attach_file_block(gconstpointer a,gconstpointer b){ attach_file_block_t *blk_a,*blk_b; if ( (!a) || (!b) ) return -EINVAL; blk_a=(attach_file_block_t *)a; blk_b=(attach_file_block_t *)b; return (!(blk_a->pkt_no == blk_b->pkt_no)); } int ref_attach_file_block(pktno_t pktno,const char *ipaddr) { GList *node; attach_file_block_t chk_blk; attach_file_block_t *updated_afcb; int rc; if ( (!pktno) || (!ipaddr) ) return -EINVAL; chk_blk.pkt_no=pktno; g_static_mutex_lock(&upload_queue_mutex); rc=-ENOENT; node=g_list_find_custom(uploads,&chk_blk,find_attach_file_block); if (!node) goto unlock_out; g_assert(node->data); updated_afcb=node->data; dbg_out("Ref afcb:%ld %s\n",pktno,ipaddr); if (!(updated_afcb->ipaddr)) updated_afcb->ipaddr=g_strdup(ipaddr); ++(updated_afcb->count); dbg_out("ref update count:pktno=%ld current count:%d\n",pktno,updated_afcb->count); rc=0; unlock_out: g_static_mutex_unlock(&upload_queue_mutex); if (!rc) download_monitor_update_state(); return rc; } int unref_attach_file_block(pktno_t pktno) { GList *node; attach_file_block_t chk_blk; attach_file_block_t *updated_afcb; int rc; chk_blk.pkt_no=pktno; g_static_mutex_lock(&upload_queue_mutex); rc=-ENOENT; node=g_list_find_custom(uploads,&chk_blk,find_attach_file_block); if (!node) goto unlock_out; g_assert(node->data); updated_afcb=node->data; /* 強制的なカウントの減算を行う場合は, どこかでカウンタを * インクリメントしているはず */ g_assert (updated_afcb->count>0); --(updated_afcb->count); dbg_out("unref update count:pktno=%ld current count:%d\n",pktno,updated_afcb->count); unlock_out: g_static_mutex_unlock(&upload_queue_mutex); return rc; } void show_file_list(attach_file_block_t *afcb) { GList *file_list,*node; char time_buff[27]; g_assert(afcb); g_mutex_lock(afcb->mutex); file_list=afcb->files; for(node=g_list_first (file_list);node;node=g_list_next(node)) { file_info_t *info; if (node) { info=node->data; if (info) { g_mutex_lock(info->mutex); dbg_out("\t owner:0x%x id:%d type:%d path:%s filename:%s size:%lld(0x%llx) mtime:%s(0x%x)\n", (unsigned int)info->main_info_ref, info->fileid, info->ipmsg_fattr, info->filepath, info->filename, info->size, info->size, ctime_r(&(info->m_time), time_buff), (unsigned int)info->m_time); g_mutex_unlock(info->mutex); } } } g_mutex_unlock(afcb->mutex); } void show_upload_queue(void) { GList *node; int count=0; attach_file_block_t *blk; g_static_mutex_lock(&upload_queue_mutex); for(node=g_list_first (uploads);node;node=g_list_next(node),++count) { blk=node->data; if (blk) { g_mutex_lock(blk->mutex); dbg_out("%d: pktno:%ld\n",count,blk->pkt_no); g_mutex_unlock(blk->mutex); } else { g_assert_not_reached(); } } g_static_mutex_unlock(&upload_queue_mutex); } int add_upload_queue(pktno_t pktno,attach_file_block_t *afcb) { if (!afcb) return -EINVAL; afcb->pkt_no=pktno; g_static_mutex_lock(&upload_queue_mutex); uploads=g_list_append(uploads,afcb); g_static_mutex_unlock(&upload_queue_mutex); show_upload_queue(); return 0; } int remove_link_from_upload_queue(pktno_t pktno,GList **r_node) { GList *node; attach_file_block_t chk_blk; int rc; if (!r_node) return -EINVAL; chk_blk.pkt_no=pktno; g_static_mutex_lock(&upload_queue_mutex); rc=-ENOENT; node=g_list_find_custom(uploads,&chk_blk,find_attach_file_block); if (!node) goto unlock_out; uploads=g_list_remove_link(uploads,node); *r_node=node; unlock_out: g_static_mutex_unlock(&upload_queue_mutex); show_upload_queue(); return rc; } static gint find_attach_file_info(gconstpointer a,gconstpointer b){ file_info_t *info_a,*info_b; if ( (!a) || (!b) ) return -EINVAL; info_a=(file_info_t *)a; info_b=(file_info_t *)b; return (!(info_a->fileid == info_b->fileid)); } int release_attach_file_block(const pktno_t pktno,gboolean force){ GList *node; attach_file_block_t chk_blk; attach_file_block_t *afcb; int rc=-ENOENT; chk_blk.pkt_no=pktno; g_static_mutex_lock(&upload_queue_mutex); rc=-ENOENT; node=g_list_find_custom(uploads,&chk_blk,find_attach_file_block); if (!node) goto unlock_out; afcb=(attach_file_block_t *)node->data; g_assert(afcb); g_mutex_lock(afcb->mutex); if (afcb->count>0) --afcb->count; /* 1度も送信されていなければ, 0になりうるため判定後にデクリメント */ if (force) /* 強制開放 */ afcb->count=0; if (afcb->count>0) { dbg_out("Attach file still alive:count=%d\n",afcb->count); g_mutex_unlock(afcb->mutex); goto unlock_out; } g_mutex_unlock(afcb->mutex); uploads=g_list_remove_link(uploads,node); g_list_free_1(node); rc=destroy_attach_file_block(&afcb); unlock_out: g_static_mutex_unlock(&upload_queue_mutex); return rc; } /* *download_monitor_release_attach_file経由以外で呼び出してはならない. */ int release_attach_file(const pktno_t pktno,int fileid){ GList *node; GList *fnode,*flist; attach_file_block_t chk_blk; attach_file_block_t *afcb; file_info_t chk_info; file_info_t *finfo; int rc=-ENOENT; int remains=-ENOENT; chk_blk.pkt_no=pktno; g_static_mutex_lock(&upload_queue_mutex); rc=-ENOENT; node=g_list_find_custom(uploads,&chk_blk,find_attach_file_block); if (!node) goto unlock_out; afcb=node->data; g_assert(afcb); g_mutex_lock(afcb->mutex); flist=afcb->files; chk_info.fileid=fileid; fnode=g_list_find_custom(flist,&chk_info,find_attach_file_info); if (!fnode) goto afcb_unlock_out; finfo=fnode->data; g_mutex_lock(finfo->mutex); g_assert(finfo); g_assert(finfo->filepath); dbg_out("fileinfo found: path=%s size=%d(%x)\n", finfo->filepath, finfo->size, finfo->size); afcb->files=g_list_remove(afcb->files,finfo); g_mutex_unlock(finfo->mutex); destroy_file_info(finfo); remains=g_list_length(afcb->files); rc=0; afcb_unlock_out: g_mutex_unlock(afcb->mutex); unlock_out: g_static_mutex_unlock(&upload_queue_mutex); if (remains==0) rc=release_attach_file_block(pktno,FALSE); show_upload_queue(); return rc; } int refer_attach_file(const pktno_t pktno,int fileid,unsigned long *ipmsg_fattr,const char **path, off_t *size){ GList *node; GList *fnode,*flist; attach_file_block_t chk_blk; attach_file_block_t *afcb; file_info_t chk_info; file_info_t *finfo; char *fpath; int rc=-ENOENT; if ( (!path) || (!size) ) return -EINVAL; chk_blk.pkt_no=pktno; g_static_mutex_lock(&upload_queue_mutex); rc=-ENOENT; node=g_list_find_custom(uploads,&chk_blk,find_attach_file_block); if (!node) goto unlock_out; afcb=node->data; g_assert(afcb); g_mutex_lock(afcb->mutex); flist=afcb->files; chk_info.fileid=fileid; fnode=g_list_find_custom(flist,&chk_info,find_attach_file_info); if (!fnode) goto afcb_unlock_out; finfo=fnode->data; g_mutex_lock(finfo->mutex); g_assert(finfo); g_assert(finfo->filepath); dbg_out("fileinfo found: pktno=%d id:%d type=%d (%s) path=%s size=%lld(%llx)\n", pktno, fileid, finfo->ipmsg_fattr, get_file_type_name(finfo->ipmsg_fattr), finfo->filepath, finfo->size, finfo->size); *ipmsg_fattr=finfo->ipmsg_fattr; fpath=g_strdup(finfo->filepath); rc=-ENOMEM; if (!fpath) goto finfo_unlock_out; *path=fpath; *size=finfo->size; rc=0; finfo_unlock_out: g_mutex_unlock(finfo->mutex); afcb_unlock_out: g_mutex_unlock(afcb->mutex); unlock_out: g_static_mutex_unlock(&upload_queue_mutex); show_upload_queue(); return rc; } static int destroy_download_file_info(download_file_block_t **ret_info) { download_file_block_t *remove_info = NULL; if ( (ret_info == NULL) || ( (*ret_info) == NULL ) ) return -EINVAL; remove_info = *ret_info; if (remove_info->filename != NULL) { g_free(remove_info->filename); remove_info->filename=NULL; } dbg_out("Free: %x\n",(unsigned int)remove_info); g_slice_free(download_file_block_t, remove_info); return 0; } static int init_download_file_info(download_file_block_t **ret_info) { download_file_block_t *new_info = NULL; int rc = 0; if (ret_info == NULL) return -EINVAL; rc = -ENOMEM; new_info = g_slice_new(download_file_block_t); if (new_info == NULL) return rc; memset(new_info, 0, sizeof(download_file_block_t)); *ret_info = new_info; return 0; free_out: dbg_out("Free: %x\n", (unsigned int)new_info); g_slice_free(download_file_block_t, new_info); return rc; } static int get_one_download_file_info(const gchar *string,download_file_block_t **new_info_ref){ char *sp = NULL; char *ep = NULL; char *buffer = NULL; download_file_block_t * new_info = NULL; int rc = 0; size_t len = 0; long int_val = 0; off_t size_val = 0; size_t remains = 0; char time_buff[27]; if ( (string == NULL) || (new_info_ref == NULL) ) return -EINVAL; rc = init_download_file_info(&new_info); if (rc < 0) return rc; rc = -ENOMEM; buffer = g_strdup(string); if (buffer == NULL) goto free_slice_out; len = strlen(string); remains = len; rc = -ENOENT; sp = buffer; /* * file id */ ep = memchr(sp, ':', remains); rc = -EINVAL; if (ep == NULL) goto free_out; *ep = '\0'; errno = 0; int_val = strtol(sp, (char **)NULL, 10); g_assert(errno == 0); new_info->fileid = int_val; dbg_out("file id:%d(%x)\n", new_info->fileid, new_info->fileid); sp = ++ep; remains =len - ((unsigned long)ep - (unsigned long)buffer); /* * file name */ ep = memchr(sp, ':', remains); rc = -EINVAL; if (ep == NULL) goto free_out; *ep = '\0'; new_info->filename = g_strdup(sp); rc = -ENOMEM; if (new_info->filename == NULL) goto free_out; dbg_out("file name:%s\n", new_info->filename); sp = ++ep; /* * size */ ep = memchr(sp, ':', remains); rc = -EINVAL; if (ep == NULL) goto free_out; *ep = '\0'; errno = 0; size_val = strtoll(sp, (char **)NULL, 16); g_assert(!errno); new_info->size = size_val; dbg_out("size:%d(%x)\n", new_info->size, new_info->size); sp = ++ep; remains =len - ((unsigned long)ep - (unsigned long)buffer); /* * m_time */ ep = memchr(sp, ':', remains); rc = -EINVAL; if (ep == NULL) goto free_out; *ep = '\0'; errno = 0; int_val = strtol(sp, (char **)NULL, 16); g_assert(!errno); new_info->m_time = int_val; dbg_out("mtime:%s(%x)\n", ctime_r(&(new_info->m_time), time_buff), (unsigned int)new_info->m_time); sp = ++ep; remains =len - ((unsigned long)ep - (unsigned long)buffer); /* * type */ ep = memchr(sp, ':', remains); rc = -EINVAL; if (ep != NULL) /* 拡張属性がある場合を考慮してこの判定は他とは逆になる */ *ep = '\0'; errno = 0; int_val=strtol(sp, (char **)NULL, 16); g_assert(!errno); new_info->ipmsg_fattr = int_val; dbg_out("type:%x\n", new_info->ipmsg_fattr); /* 拡張属性は無視する(FSによって使用できないことがあるので) */ *new_info_ref = new_info; if (buffer != NULL) g_free(buffer); return 0; /* 正常終了 */ free_out: if (buffer != NULL) g_free(buffer); free_slice_out: dbg_out("Free: %x\n", (unsigned int)new_info); g_slice_free(download_file_block_t, new_info); return rc; } static int show_download_list(const GList *download_list) { GList *node = NULL; download_file_block_t *info = NULL; char time_buff[27]; if (download_list == NULL) return -EINVAL; for(node = g_list_first ((GList *)download_list); node != NULL; node = g_list_next(node) ) { info = (download_file_block_t *)(node->data); dbg_out("file-id:%x filename:%s size:%lld date:%s\n", info->fileid, info->filename, info->size, ctime_r(&(info->m_time), time_buff)); } return 0; } int destroy_download_list(const GList **download_list) { GList *node = NULL; download_file_block_t *info = NULL; GList *remove_list = NULL; char time_buff[27]; if ( (download_list == NULL) || ( (*download_list) == NULL) ) return -EINVAL; /* * リスト内を探査し, データ参照ポインタの先にあるダウンロードファイル情報を開放する */ remove_list = (GList *)(*download_list); for(node = g_list_first(remove_list); node; node = g_list_next(node) ) { info = (download_file_block_t *)(node->data); dbg_out("remove file-id:%x filename:%s size:%lld date:%s\n", info->fileid, info->filename, info->size, ctime_r(&(info->m_time), time_buff)); dbg_out("Free: %x\n", (unsigned int)info); g_slice_free(download_file_block_t, info); } /* * リストを開放し, ポインタをNULLに設定しておく */ g_list_free(remove_list); *download_list = NULL; return 0; } int parse_download_string(const char *string, GList **list){ char *sp = NULL; char *ep = NULL; char *buffer = NULL; download_file_block_t *new_info = NULL; GList *new_list = NULL; ssize_t len = 0; int rc = 0; if ( (string == NULL) || (list == NULL) ) { rc = -EINVAL; goto error_out; } dbg_out("attachment string:%s\n", string); /* * 編集用に複製を作成 */ buffer = g_strdup(string); if (buffer == NULL) { rc = -ENOMEM; goto error_out; } /* * 1エントリの終端を探査 */ sp = buffer; do { /* * 終端検出処理 * 1エントリの終端を探査 */ len = strlen(sp); ep = memchr(sp, FILELIST_SEPARATOR, len); /* * 次の要素が存在する場合 */ if (ep != NULL) { *ep = '\0'; /* 終端化 */ } dbg_out("new string:%s\n", sp); /* * 1エントリの内容を解析し, ダウンロード候補のリストを得る */ new_info = NULL; rc = get_one_download_file_info(sp, &new_info); if (rc != 0) { if (new_info != NULL) destroy_download_file_info(&new_info); continue; } new_list = g_list_append(new_list, new_info); /* * 次の要素へ */ if (ep != NULL) { sp = ++ep; } } while (ep != NULL); /* * 関数後処理 */ show_download_list(new_list); /* 更新結果を表示 */ *list = new_list; /* リスト返却 */ rc = 0; /* 正常終了 */ free_buffer_out: if (buffer != NULL) g_free(buffer); error_out: return rc; } static int get_filename_list(attach_file_block_t *afcb, gchar **string){ size_t len = 0; GList *node = NULL; file_info_t *info = NULL; gchar *fnames = NULL; if ( (afcb == NULL) || (string == NULL) ) return -EINVAL; len = 0; for(node=g_list_first(afcb->files); node; node = g_list_next(node)) { info = (file_info_t *)(node->data); g_assert(info); g_mutex_lock(info->mutex); if (info->filename != NULL) { /* null終端と空白があるので+2 */ len += (strlen(info->filename) + 2); } g_mutex_unlock(info->mutex); } /* * ファイル名保存領域を獲得する. */ fnames = g_malloc(len); if (fnames == NULL) return -ENOMEM; memset(fnames,0,len); for(node=g_list_first(afcb->files); node != NULL; node=g_list_next(node) ) { info=(file_info_t *)(node->data); g_assert(info != NULL); g_mutex_lock(info->mutex); if (info->filename) { strncat(fnames, info->filename, len - 1); strncat(fnames, " ", len - 1); } g_mutex_unlock(info->mutex); } fnames[len-1] = '\0'; *string = fnames; return 0; } static int afcb_get_username(attach_file_block_t *afcb, gchar **string){ int rc = 0; gchar *username = NULL; userdb_t *entry = NULL; char buff[256]; if ( (afcb == NULL) || (string == NULL) ) return -EINVAL; dbg_out("retrive:%s\n", afcb->ipaddr); userdb_search_user_by_addr(afcb->ipaddr, (const userdb_t **)&entry); if (entry != NULL) { dbg_out("get:%s %s\n", entry->nickname, entry->ipaddr); memset(buff, 0, 256); snprintf(buff, 256, "%s@%s(%s)", entry->nickname, entry->group, entry->ipaddr); buff[255]='\0'; destroy_user_info(entry); username = g_strdup(buff); if (username != NULL) *string = username; else rc = -ENOMEM; } return rc; } void update_download_view(GtkWidget *window) { attach_file_block_t *afcb; GList *node; GtkWidget *view; GtkTreeModel *model; GtkTreeIter iter; attach_file_block_t *blk; dbg_out("here\n"); g_static_mutex_lock(&upload_queue_mutex); g_assert(window); view=lookup_widget(GTK_WIDGET(window),"treeview5"); g_assert(view); model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); if (gtk_tree_model_get_iter_first(model,&iter)) { gtk_list_store_clear(GTK_LIST_STORE(model)); } model = gtk_tree_view_get_model(GTK_TREE_VIEW(view)); gtk_tree_model_get_iter_first(model,&iter); for(node=g_list_first (uploads);node;node=g_list_next(node)) { blk=node->data; if (blk){ char *files=NULL; char *name=NULL; int count=0; g_mutex_lock(blk->mutex); if (get_filename_list(blk, &files)) goto unlock_blk; if (afcb_get_username(blk, &name)) goto free_files; count=g_list_length(blk->files); gtk_list_store_append(GTK_LIST_STORE(model), &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, DOWNLOAD_VIEW_FNAME,files, DOWNLOAD_VIEW_REMAIN,count, DOWNLOAD_VIEW_USER,name, DOWNLOAD_VIEW_PKTNO,blk->pkt_no, -1); if (name) g_free(name); free_files: if (files) g_free(files); unlock_blk: g_mutex_unlock(blk->mutex); } } g_static_mutex_unlock(&upload_queue_mutex); } g2ipmsg-0.9.6+dfsg/src/fileattach.h000066400000000000000000000070541126724573600171040ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(FILEATTACH_H) #define FILEATTACH_H #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include "ipmsg_types.h" #define FILE_ATTCH_ONE_EXT_SIZE 512 #define FATTACH_BUFF_LEN 1024 #define DOWNLOAD_VIEW_FNAME (0) #define DOWNLOAD_VIEW_REMAIN (1) #define DOWNLOAD_VIEW_USER (2) #define DOWNLOAD_VIEW_PKTNO (3) typedef struct _attach_file_block{ guint count; GMutex *mutex; int max_id; pktno_t pkt_no; GList *files; /*ファイル情報*/ gchar *ipaddr; }attach_file_block_t; typedef struct _download_file_info{ /* ダウンロードファイル情報 */ int fileid; gchar *filename; off_t size; time_t m_time; ipmsg_ftype_t ipmsg_fattr; }download_file_block_t; typedef struct _file_info{ GMutex *mutex; attach_file_block_t *main_info_ref; download_file_block_t *dfcb_ref; int fileid; gchar *filepath; gchar *filename; off_t size; time_t m_time; ipmsg_ftype_t ipmsg_fattr; off_t offset; /*未使用*/ GList *xattrs; /*未使用*/ }file_info_t; int create_attach_file_block(attach_file_block_t **afcb); int destroy_attach_file_block(attach_file_block_t **afcb); int release_attach_file_block(const pktno_t pktno,gboolean force); int ref_attach_file_block(pktno_t pktno,const char *ipaddr); int unref_attach_file_block(pktno_t pktno); int set_attch_file_block_pktno(attach_file_block_t *afcb,const pktno_t pktno); int add_attach_file(attach_file_block_t *afcb,const gchar *path); int remove_attach_file(attach_file_block_t *afcb,const gchar *path); int release_attach_file(const pktno_t pktno,int fileid); int get_attach_file_extention(attach_file_block_t *afcb,const gchar **ext_string); int refer_attach_file(const pktno_t pktno,int fileid, ipmsg_ftype_t *ipmsg_fattr,const char **path,off_t *size); int destroy_download_list(const GList **download_list); int parse_download_string(const char *string, GList **list); int get_file_info(const gchar *path, off_t *size, time_t *mtime, ipmsg_ftype_t *ipmsg_type); void show_file_list(attach_file_block_t *afcb); int add_upload_queue(pktno_t pktno,attach_file_block_t *afcb) ; GList *get_download_monitor_info(void); const gchar *get_file_type_name(ipmsg_ftype_t fattr); #endif /* FILEATTACH_H */ g2ipmsg-0.9.6+dfsg/src/fuzai.c000066400000000000000000000163641126724573600161150ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" static void onAbsenceSelectionChanged (GtkTreeSelection *sel,gpointer user_data) { GtkTreeIter selected_row; GtkWidget *text_view; GtkWidget *view; GtkWidget *entry; GtkTreeModel *model; GtkTextBuffer *buffer; gint index; gchar *title; gchar *message; view=GTK_WIDGET(gtk_tree_selection_get_tree_view(sel)); g_assert(view); g_assert(gtk_tree_selection_get_mode(sel) == GTK_SELECTION_SINGLE); entry=GTK_WIDGET(lookup_widget(view,"AbsenceTitleEntry")); g_assert(entry); text_view=GTK_WIDGET(lookup_widget(view,"fuzaiText")); g_assert(text_view); if (gtk_tree_selection_get_selected(sel, &model, &selected_row)) { gtk_tree_model_get (model, &selected_row, 1, &index, -1); dbg_out("Selected index:%d\n",index); if (!hostinfo_get_absent_title(index,(const char **)&title)) { gtk_entry_set_text(GTK_ENTRY(entry), title); g_free(title); } if (!hostinfo_get_absent_message(index, &message)) { buffer=gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view)); gtk_text_buffer_set_text(buffer,message,-1); g_free(message); } } else { g_assert_not_reached(); } } static int setup_fuzai_view(GtkTreeView *view) { GList *node; GtkTreeModel *model; GtkListStore *liststore; GtkTreeViewColumn *col; GtkCellRenderer *renderer; GtkTreeSelection *sel; if (!view) return -EINVAL; liststore = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_INT); g_assert(liststore); gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(liststore)); g_object_unref(liststore); /* bind to view */ /* * タイトル設定 */ /* --- Column #1 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, _("title")); /* pack tree view column into tree view */ gtk_tree_view_append_column(GTK_TREE_VIEW(view), col); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the title */ gtk_tree_view_column_add_attribute(col, renderer, "text", 0); gtk_tree_view_column_set_resizable (col,TRUE); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE ); g_signal_connect(sel, "changed", G_CALLBACK(onAbsenceSelectionChanged), NULL); return 0; } GtkWidget * internal_create_fuzai_editor(void){ GtkWidget *window; GtkWidget *titleView; GtkWidget *entry; GtkWidget *text_view; int max_index; int max_message; int index; int rc; gchar *title; gchar *message; GtkTreeModel *model; GtkTreeIter newrow; GtkTreeSelection *sel; GtkTextBuffer *buffer; gint width,height; rc=hostinfo_refer_absent_length(&max_index); if (rc<0) goto error_out; rc=hostinfo_refer_absent_message_slots(&max_message); if (rc<0) goto error_out; if (max_index>max_message) max_index=max_message; window=create_absenceEditor(); g_assert(window); titleView=GTK_WIDGET(lookup_widget(window,"absenseTitles")); g_assert(titleView); entry=GTK_WIDGET(lookup_widget(window,"AbsenceTitleEntry")); g_assert(entry); text_view=GTK_WIDGET(lookup_widget(window,"fuzaiText")); g_assert(text_view); setup_fuzai_view(GTK_TREE_VIEW(titleView)); for(index=0;index #endif #include "udp.h" extern udp_con_t *udp_con; /** システムトレイ組み込み試行マイクロ秒数 * 現在のところ1秒 */ #define STATUS_ICON_WAIT_MICRO_SEC ((1UL)*(1000UL)*(1000UL)) /** グループ情報獲得試行回数 * 現在のところ20回 */ #define IPMSG_COMMON_MAX_RETRY (20) /** 受信通知用アイコン更新間隔 * 現在のところ500ms */ #define MSG_WATCH_INTERVAL (500) /** g2ipmsgロックファイル */ #define IPMG_LOCK_FILE "/tmp/g2ipmsg.lock" /** キー入力のチャタリング間隔 * 現在のところ, 300ms */ #define IPMSG_KEY_BTN_CHATTER_MS (300) /** 表示優先度の最小値 * -1は非表示を表す */ #define USERLIST_PRIO_MIN (-1) /** デフォルトの表示優先度 */ #define USERLIST_DEFAULT_PRIO (0) /** 最高表示優先度 */ #define USERLIST_PRIO_MAX (4) /** ダイアログ表示待ち時間(未使用) */ #define G2IPMSG_DIALOG_WAIT_MS (10000) /** 優先度が健全であることを確認する. * @param[in] prio_val 環境変数名 * @retval 真 健全な優先度である. * @retval 偽 不正な優先度である. */ #define prio_is_valid(prio_val) ( (prio_val>=USERLIST_PRIO_MIN) && \ (prio_val<=USERLIST_PRIO_MAX) ) /** 文字列操作時のデフォルトバッファサイズ */ #define IPMSG_BUFSIZ (0x1000) /** ipmsgのメッセージ交換時のバッファサイズ * @note ソケットバッファのサイズに指定する. */ #define _MSG_BUF_SIZE (65536) /** ipmsgのメッセージ交換時のバッファサイズの最小値 * @note ソケットバッファのサイズに指定する. */ #define _MSG_BUF_MIN_SIZE ((_MSG_BUF_SIZE)/2) /** ipmsgのファイル交換時のバッファサイズ(256KB) * @note ソケットバッファのサイズに指定する. */ #define _TCP_BUF_SIZE (0x40000) /** ipmsgのファイル交換時のバッファサイズの最小値 * @note ソケットバッファのサイズに指定する. */ #define _TCP_BUF_MIN_SIZE (_TCP_BUF_SIZE/2) /** ipmsgのファイル交換時のファイルバッファサイズ */ #define TCP_FILE_BUFSIZ (8192) #if defined(USE_OPENSSL) /** デフォルトのエントリフラグ(暗号化通信使用時) */ #define G2IPMSG_DEFAULT_ENTRY_FLAGS (IPMSG_FILEATTACHOPT|IPMSG_ENCRYPTOPT) /** デフォルトの送信フラグ(暗号化通信使用時) */ #define G2IPMSG_DEFAULT_SEND_FLAGS (IPMSG_SENDCHECKOPT|IPMSG_ENCRYPTOPT) #else /** デフォルトのエントリフラグ */ #define G2IPMSG_DEFAULT_ENTRY_FLAGS (IPMSG_FILEATTACHOPT) /** デフォルトの送信フラグ */ #define G2IPMSG_DEFAULT_SEND_FLAGS (IPMSG_SENDCHECKOPT) #endif /** ホストリスト取得長 */ #define G2IPMSG_DEFAULT_HOST_LIST_LEN 1 /** 起動/メッセージ受信通知音 */ #define G2IPMSG_SOUND_FILE "g2ipmsg/g2ipmsg.ogg" /** 不明を表す文字列 */ #define G2IPMSG_UNKNOWN_NAME _("UnKnown") int init_ipmsg(void); void cleanup_ipmsg(void); int create_lock_file(void); int release_lock_file(void); int ipmsg_send_message(const udp_con_t *, const char *, const char *, size_t ); int ipmsg_send_broad_cast(const udp_con_t *, const char *, size_t ); #endif /* G2IPMSG_H */ g2ipmsg-0.9.6+dfsg/src/hostinfo.c000066400000000000000000001153301126724573600166210ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * 2007/06/02 Fix some problems occur when it is installed as new installation * by Yuhei Matsunaga * */ #include "common.h" static GConfClient *client=NULL; static gchar *groupname=NULL; static gchar *nickname=NULL; static gchar *hostname=NULL; static gchar *logfile_string=NULL; static gchar *cite_string=NULL; static gboolean current_absent_state=FALSE; static int absent_id=-1; static GSList *cached_prio; GStaticMutex hostinfo_mutex = G_STATIC_MUTEX_INIT; static gchar *pubkey_pass_string = NULL; static gchar *lock_pass_string = NULL; static gchar *encoding_string = NULL; static const char *keys[] = { HOSTINFO_KEY_PORT, HOSTINFO_KEY_GROUP, HOSTINFO_KEY_NICKNAME, HOSTINFO_KEY_MSGSEC, HOSTINFO_KEY_CONFIRM_MSG, HOSTINFO_KEY_BROADCASTS, HOSTINFO_KEY_POPUP, HOSTINFO_KEY_SOUND, HOSTINFO_KEY_ENCLOSE, HOSTINFO_KEY_CITATION, HOSTINFO_KEY_LOGFILEPATH, HOSTINFO_KEY_ENABLE_LOG, HOSTINFO_KEY_LOG_NAME, HOSTINFO_KEY_LOG_IPADDR, HOSTINFO_KEY_CITE_STRING, HOSTINFO_KEY_ABS_TITLE, HOSTINFO_KEY_ABS_MSGS, HOSTINFO_KEY_DEBUG, HOSTINFO_KEY_MSGWIN_WIDTH, HOSTINFO_KEY_MSGWIN_HEIGHT, HOSTINFO_KEY_RECVWIN_WIDTH, HOSTINFO_KEY_RECVWIN_HEIGHT, HOSTINFO_KEY_ATTACHWIN_WIDTH, HOSTINFO_KEY_ATTACHWIN_HEIGHT, HOSTINFO_KEY_ABSENCE_WIDTH, HOSTINFO_KEY_ABSENCE_HEIGHT, HOSTINFO_KEY_IPV6, HOSTINFO_KEY_DIALUP, HOSTINFO_KEY_GET_HLIST, HOSTINFO_KEY_ALLOW_HLIST, HOSTINFO_KEY_USE_SYSTRAY, HOSTINFO_KEY_HEADER_VISIBLE, HOSTINFO_KEY_HEADER_ORDER, HOSTINFO_KEY_SORT_GROUP, HOSTINFO_KEY_SUB_SORT_ID, HOSTINFO_KEY_SORT_GROUP_DESCENDING, HOSTINFO_KEY_SUB_SORT_DESCENDING, HOSTINFO_KEY_CRYPT_SPEED, HOSTINFO_KEY_CIPHER, HOSTINFO_KEY_ENCRYPT_PUBKEY, HOSTINFO_KEY_LOCK, HOSTINFO_KEY_ENC_PASSWD, HOSTINFO_KEY_LOCK_PASSWD, HOSTINFO_KEY_LOCK_MSGLOG, HOSTINFO_KEY_ICONIFY_DIALOGS, HOSTINFO_KEY_EXTERNAL_ENCODING, NULL }; gboolean hostinfo_refer_debug_state(void) { if (!client) return FALSE; return gconf_client_get_bool(client,HOSTINFO_KEY_DEBUG,NULL); } int hostinfo_send_broad_cast(const udp_con_t *con,const char *msg,size_t len){ GSList *addr_top,*addr_list; udp_send_broadcast(con,msg,len); addr_top=addr_list=hostinfo_get_ipmsg_broadcast_list(); while(addr_list != NULL) { gchar *element = addr_list->data; dbg_out("Send Broad cast:%s\n",element); udp_send_broadcast_with_addr(con,element,msg,len); g_free(element); addr_list=g_slist_next(addr_list); } if (addr_top) g_slist_free(addr_top); return 0; } int hostinfo_set_ipmsg_broadcast_list(GSList *list){ if (!list){ gconf_client_unset(client, HOSTINFO_KEY_BROADCASTS, NULL); } else{ gconf_client_set_list(client,HOSTINFO_KEY_BROADCASTS,GCONF_VALUE_STRING,list,NULL); gconf_client_clear_cache(client); } return 0; } GSList* hostinfo_get_ipmsg_broadcast_list(void){ return gconf_client_get_list(client,HOSTINFO_KEY_BROADCASTS,GCONF_VALUE_STRING,NULL); } int hostinfo_refer_absent_length(int *max_index){ int rc=-ESRCH; GSList *title_top,*title_list; if (!max_index) return -EINVAL; title_top=title_list=gconf_client_get_list(client,HOSTINFO_KEY_ABS_TITLE,GCONF_VALUE_STRING,NULL); if (title_top) { *max_index=g_slist_length(title_top); rc=0; } while(title_list != NULL) { gchar *element = title_list->data; dbg_out("free absent title:%s\n",element); g_free(element); title_list=g_slist_next(title_list); } if (title_top) g_slist_free(title_top); return rc; } int hostinfo_get_absent_title(int index,const char **title){ int rc=0; GSList *title_top,*title_list; GSList *title_ref; title_top=title_list=gconf_client_get_list(client,HOSTINFO_KEY_ABS_TITLE,GCONF_VALUE_STRING,NULL); if (!title_top) return -ESRCH; title_ref=g_slist_nth(title_top,index); if (title_ref) { *title=(title_ref->data)?(title_ref->data):(_("Undefined")); title_top=g_slist_remove_link(title_top,title_ref); g_slist_free_1(title_ref); }else{ rc=-ESRCH; } title_list=title_top; while(title_list != NULL) { gchar *element = title_list->data; dbg_out("Free absent title:%s\n",element); g_free(element); title_list=g_slist_next(title_list); } if (title_top) g_slist_free(title_top); return rc; } int hostinfo_set_ipmsg_absent_title(int index,const char *title){ int rc=0; GSList *title_top,*title_list; GSList *title_ref; if (!title) return -EINVAL; title_top=title_list=gconf_client_get_list(client,HOSTINFO_KEY_ABS_TITLE,GCONF_VALUE_STRING,NULL); if (!title_top) return -ESRCH; rc=-ESRCH; title_ref=g_slist_nth(title_top,index); if (!title_ref) goto free_list_out; g_free(title_ref->data); title_ref->data=g_strdup(title); g_assert(title_ref->data); /* ここで続行すると設定の整合性がとれなくなる */ if (!(title_ref->data)) { rc=-ENOMEM; title_top=g_slist_remove_link(title_top,title_ref); g_slist_free_1(title_ref); goto free_list_out; } gconf_client_set_list(client,HOSTINFO_KEY_ABS_TITLE,GCONF_VALUE_STRING,title_top,NULL); gconf_client_clear_cache(client); rc=0; free_list_out: title_list=title_top; while(title_list != NULL) { gchar *element = title_list->data; dbg_out("Free absent title:%s\n",element); g_free(element); title_list=g_slist_next(title_list); } if (title_top) g_slist_free(title_top); return rc; } /* absent msgs */ int hostinfo_refer_absent_message_slots(int *max_index){ int rc=-ESRCH; GSList *message_top,*message_list; if (!max_index) return -EINVAL; message_top=message_list=gconf_client_get_list(client,HOSTINFO_KEY_ABS_MSGS,GCONF_VALUE_STRING,NULL); if (message_top) { *max_index=g_slist_length(message_top); rc=0; } while(message_list != NULL) { gchar *element = message_list->data; dbg_out("free absent message:%s\n",element); g_free(element); message_list=g_slist_next(message_list); } if (message_top) g_slist_free(message_top); return rc; } int hostinfo_get_absent_message(int index, char **message){ int rc = 0; GSList *message_top = NULL, *message_list = NULL; char *ret_message = NULL; char *current_message = NULL; message_top = message_list=gconf_client_get_list(client, HOSTINFO_KEY_ABS_MSGS, GCONF_VALUE_STRING, NULL); if (message_top == NULL) return -ESRCH; current_message = (char *)g_slist_nth_data(message_top, index); if (current_message != NULL) ret_message = g_strdup(current_message); else ret_message = g_strdup(_("Undefined")); message_list = message_top; while(message_list != NULL) { gchar *element = message_list->data; if (element == current_message) { dbg_out("returned original message:%s\n", element); } dbg_out("Free absent message:%s\n", element); g_free(element); message_list = g_slist_next(message_list); } if (message_top != NULL) g_slist_free(message_top); rc = 0; *message = ret_message; dbg_out("Absence Message:%s\n", *message); error_out: return rc; } int hostinfo_set_ipmsg_absent_message(int index,const char *message){ int rc=0; GSList *message_top,*message_list; GSList *message_ref; if (!message) return -EINVAL; message_top=message_list=gconf_client_get_list(client,HOSTINFO_KEY_ABS_MSGS,GCONF_VALUE_STRING,NULL); if (!message_top) return -ESRCH; rc=-ESRCH; message_ref=g_slist_nth(message_top,index); if (!message_ref) goto free_list_out; g_free(message_ref->data); message_ref->data=g_strdup(message); g_assert(message_ref->data); /* ここで続行すると設定の整合性がとれなくなる */ if (!(message_ref->data)) { rc=-ENOMEM; message_top=g_slist_remove_link(message_top,message_ref); g_slist_free_1(message_ref); goto free_list_out; } gconf_client_set_list(client,HOSTINFO_KEY_ABS_MSGS,GCONF_VALUE_STRING,message_top,NULL); gconf_client_clear_cache(client); rc=0; free_list_out: message_list=message_top; while(message_list != NULL) { gchar *element = message_list->data; dbg_out("Free absent message:%s\n",element); g_free(element); message_list=g_slist_next(message_list); } if (message_top) g_slist_free(message_top); return rc; } /* ids */ int hostinfo_get_absent_id(int *index){ int max_index; int max_slots; if (!index) return -EINVAL; if (hostinfo_refer_absent_length(&max_index)) return -EINVAL; if (hostinfo_refer_absent_message_slots(&max_slots)) return -EINVAL; g_assert(max_index == max_slots); if (absent_id < 0) return -EINVAL; if (absent_id > max_index) return -EINVAL; *index=absent_id; return 0; } int hostinfo_set_absent_id(int index){ int max_index; int max_slots; if (index<0) return -EINVAL; if (hostinfo_refer_absent_length(&max_index)) return -EINVAL; if (hostinfo_refer_absent_message_slots(&max_slots)) return -EINVAL; g_assert(max_index==max_slots); if (index>max_index) return -EINVAL; absent_id=index; return 0; } /** 現在の不在通知文を獲得する * @param[in] message_p 通知分返却領域を差すポインタのアドレス. * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int hostinfo_get_current_absence_message(char **message_p) { int rc = 0; int index = 0; char *absence_message = NULL; /* * 引数異常 */ if (message_p == NULL) { rc = -EINVAL; goto no_free_out; } if ( hostinfo_is_ipmsg_absent() ) { /* * 現在の不在設定値を獲得する. */ rc = hostinfo_get_absent_id(&index); if ( rc != 0 ) { goto no_free_out; } /* * 不在通知文を獲得する. */ rc = hostinfo_get_absent_message(index, &absence_message); if (rc != 0) { g_assert(absence_message == NULL); goto no_free_out; } } else { /* * 不在中でなければ, 在席通知を返却する */ absence_message = g_strdup(_("I am here.")); if (absence_message == NULL) { rc = -ENOMEM; goto no_free_out; } } *message_p = absence_message; rc = 0; /* 正常終了 */ no_free_out: return rc; } gboolean hostinfo_is_ipmsg_absent(void) { return current_absent_state; } gboolean hostinfo_set_ipmsg_absent(gboolean state) { current_absent_state=state; return current_absent_state; } gboolean hostinfo_refer_ipmsg_default_secret(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_MSGSEC,NULL); } gboolean hostinfo_set_ipmsg_default_secret(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_MSGSEC,val,NULL); } gboolean hostinfo_refer_ipmsg_default_confirm(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_CONFIRM_MSG,NULL); } gboolean hostinfo_set_ipmsg_default_confirm(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_CONFIRM_MSG,val,NULL); } gboolean hostinfo_refer_ipmsg_default_popup(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_POPUP,NULL); } gboolean hostinfo_set_ipmsg_default_popup(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_POPUP,val,NULL); } gboolean hostinfo_refer_ipmsg_default_sound(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_SOUND,NULL); } gboolean hostinfo_set_ipmsg_default_sound(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_SOUND,val,NULL); } gboolean hostinfo_refer_ipmsg_default_enclose(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_ENCLOSE,NULL); } gboolean hostinfo_set_ipmsg_default_enclose(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_ENCLOSE,val,NULL); } gboolean hostinfo_refer_ipmsg_default_citation(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_CITATION,NULL); } gboolean hostinfo_set_ipmsg_default_citation(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_CITATION,val,NULL); } gboolean hostinfo_refer_ipmsg_ipaddr_logging(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_LOG_IPADDR,NULL); } gboolean hostinfo_set_ipmsg_ipaddr_logging(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_LOG_IPADDR,val,NULL); } gboolean hostinfo_refer_ipmsg_logname_logging(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_LOG_NAME,NULL); } gboolean hostinfo_set_ipmsg_logname_logging(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_LOG_NAME,val,NULL); } gboolean hostinfo_refer_ipmsg_enable_log(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_ENABLE_LOG,NULL); } gboolean hostinfo_set_ipmsg_enable_log(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_ENABLE_LOG,val,NULL); } gboolean hostinfo_refer_ipmsg_ipv6_mode(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_IPV6,NULL); } gboolean hostinfo_set_ipmsg_ipv6_mode(gboolean val) { return gconf_client_set_bool(client,HOSTINFO_KEY_IPV6,val,NULL); } gboolean hostinfo_refer_ipmsg_is_get_hlist(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_GET_HLIST,NULL); } gboolean hostinfo_set_ipmsg_is_get_hlist(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_GET_HLIST,val,NULL); } gboolean hostinfo_refer_ipmsg_is_allow_hlist(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_ALLOW_HLIST,NULL); } gboolean hostinfo_set_ipmsg_is_allow_hlist(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_ALLOW_HLIST,val,NULL); } gboolean hostinfo_refer_ipmsg_dialup_mode(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_DIALUP,NULL); } gboolean hostinfo_set_ipmsg_dialup_mode(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_DIALUP,val,NULL); } gboolean hostinfo_refer_ipmsg_is_sort_with_group(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_SORT_GROUP,NULL); } gboolean hostinfo_set_ipmsg_sort_with_group(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_SORT_GROUP,val,NULL); } gint hostinfo_refer_ipmsg_sub_sort_id(void) { return gconf_client_get_int(client,HOSTINFO_KEY_SUB_SORT_ID,NULL); } gboolean hostinfo_set_ipmsg_sub_sort_id(gint val) { gconf_client_clear_cache(client); return gconf_client_set_int(client,HOSTINFO_KEY_SUB_SORT_ID,val,NULL); } gboolean hostinfo_refer_ipmsg_group_sort_order(void) { return !(gconf_client_get_bool(client,HOSTINFO_KEY_SORT_GROUP_DESCENDING,NULL)); } gboolean hostinfo_set_ipmsg_group_sort_order(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_SORT_GROUP_DESCENDING,(!(val)),NULL); } gboolean hostinfo_refer_ipmsg_sub_sort_order(void) { return !(gconf_client_get_bool(client,HOSTINFO_KEY_SUB_SORT_DESCENDING,NULL)); } gboolean hostinfo_set_ipmsg_sub_sort_order(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_SUB_SORT_DESCENDING,(!(val)),NULL); } int hostinfo_set_ipmsg_logfile(const char *file) { gchar *string; int rc; if (!file) return -EINVAL; rc=logfile_reopen_logfile(file); if (rc) return rc; g_static_mutex_lock(&hostinfo_mutex); if (logfile_string) g_free(logfile_string); logfile_string=NULL; gconf_client_set_string(client,HOSTINFO_KEY_LOGFILEPATH,file,NULL); string=gconf_client_get_string(client,HOSTINFO_KEY_LOGFILEPATH,NULL); if (string) { dbg_out("gconf return logfile %s\n",string); g_static_mutex_unlock(&hostinfo_mutex); logfile_string=string; gconf_client_clear_cache(client); return 0; } g_static_mutex_unlock(&hostinfo_mutex); return -ENOMEM; } const char * hostinfo_refer_ipmsg_logfile(void) { char *string; g_static_mutex_lock(&hostinfo_mutex); if (logfile_string) goto unlock_out; string=gconf_client_get_string(client,HOSTINFO_KEY_LOGFILEPATH,NULL); if (string) { dbg_out("gconf return logfile %s\n",string); g_static_mutex_unlock(&hostinfo_mutex); logfile_string=string; } unlock_out: g_static_mutex_unlock(&hostinfo_mutex); return (logfile_string)?(logfile_string):(""); } const char * hostinfo_refer_ipmsg_cite_string(void) { char *string; if (cite_string) return cite_string; g_static_mutex_lock(&hostinfo_mutex); string=gconf_client_get_string(client,HOSTINFO_KEY_CITE_STRING,NULL); if (string) { dbg_out("gconf return cite string:%s\n",string); cite_string=string; g_static_mutex_unlock(&hostinfo_mutex); return (const char *)cite_string; } g_static_mutex_unlock(&hostinfo_mutex); return ">"; } int hostinfo_refer_ipmsg_port(void){ int port; g_static_mutex_lock(&hostinfo_mutex); port=gconf_client_get_int(client,HOSTINFO_KEY_PORT,NULL); dbg_out("gconf return port:%d\n",port); g_static_mutex_unlock(&hostinfo_mutex); if (!port) return DEFAULT_PORT; return port; } int hostinfo_set_ipmsg_port(int port){ int new; g_static_mutex_lock(&hostinfo_mutex); gconf_client_set_int(client,HOSTINFO_KEY_PORT,port,NULL); gconf_client_clear_cache(client); new=gconf_client_get_int(client,HOSTINFO_KEY_PORT,NULL); dbg_out("gconf return port:%d\n",new); g_static_mutex_unlock(&hostinfo_mutex); if (!new) return DEFAULT_PORT; return port; } const char * hostinfo_refer_user_name(void) { struct passwd *ref_p; g_static_mutex_lock(&hostinfo_mutex); ref_p=getpwuid(getuid()); if (!ref_p) { err_out("Can not get pwent:%s (%d)\n",strerror(errno),errno); g_static_mutex_unlock(&hostinfo_mutex); return _("UnKnown"); } dbg_out("UserName:%s\n",ref_p->pw_name); g_static_mutex_unlock(&hostinfo_mutex); return ref_p->pw_name; } const char * hostinfo_refer_group_name(void) { g_static_mutex_lock(&hostinfo_mutex); if (!groupname) { groupname=gconf_client_get_string(client,HOSTINFO_KEY_GROUP,NULL); dbg_out("gconf return groupname:%s\n",groupname); } g_static_mutex_unlock(&hostinfo_mutex); return (groupname)?(groupname):(_("Default Group")); } int hostinfo_set_group_name(const char *groupName) { if (!groupName) return -EINVAL; dbg_out("set groupname:%s\n",groupName); g_static_mutex_lock(&hostinfo_mutex); if (groupname) g_free(groupname); g_assert(client); gconf_client_set_string(client,HOSTINFO_KEY_GROUP,groupName,NULL); gconf_client_clear_cache(client); groupname=gconf_client_get_string(client,HOSTINFO_KEY_GROUP,NULL); dbg_out("gconf return groupname:%s\n",groupname); g_static_mutex_unlock(&hostinfo_mutex); return 0; } int hostinfo_set_nick_name(const char *nickName) { if (!nickName) return -EINVAL; g_static_mutex_lock(&hostinfo_mutex); dbg_out("set nickName:%s\n",nickName); g_assert(client); if (nickname) g_free(nickname); gconf_client_set_string(client,HOSTINFO_KEY_NICKNAME,nickName,NULL); gconf_client_clear_cache(client); nickname=gconf_client_get_string(client,HOSTINFO_KEY_NICKNAME,NULL); dbg_out("gconf return nick name:%s\n",nickname); g_static_mutex_unlock(&hostinfo_mutex); return 0; } const char * hostinfo_refer_nick_name(void) { g_static_mutex_lock(&hostinfo_mutex); if (!nickname) { nickname=gconf_client_get_string(client,HOSTINFO_KEY_NICKNAME,NULL); dbg_out("gconf return nick name:%s\n",nickname); } g_static_mutex_unlock(&hostinfo_mutex); return (nickname)?(nickname):(_("Default Nick Name")); } const char * hostinfo_refer_host_name(void){ if (hostname != NULL) goto ret; g_static_mutex_lock(&hostinfo_mutex); hostname = g_malloc(128); if (gethostname(hostname, 128) < 0) { g_free(hostname); hostname = NULL; g_static_mutex_unlock(&hostinfo_mutex); return _("UnKnown"); } hostname[127]=0; g_static_mutex_unlock(&hostinfo_mutex); ret: return hostname; } static void hostinfo_gconf_notify_func(GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data){ dbg_out("Configuration is changed: key=%s\n",(char *)user_data); } unsigned long hostinfo_get_normal_send_flags(void){ unsigned long flags=0; g_static_mutex_lock(&hostinfo_mutex); flags=G2IPMSG_DEFAULT_SEND_FLAGS; /* 受信確認をデフォルト */ if (gconf_client_get_bool(client,HOSTINFO_KEY_MSGSEC,NULL)) flags|=IPMSG_SECRETOPT; if (gconf_client_get_bool(client,HOSTINFO_KEY_CONFIRM_MSG,NULL)) flags|=IPMSG_SENDCHECKOPT; dbg_out("gconf return flags:%x\n",flags); g_static_mutex_unlock(&hostinfo_mutex); return flags; } unsigned long hostinfo_get_normal_entry_flags(void){ unsigned long flags=G2IPMSG_DEFAULT_ENTRY_FLAGS; g_static_mutex_lock(&hostinfo_mutex); if (hostinfo_refer_ipmsg_dialup_mode()) flags |= IPMSG_DIALUPOPT; if (hostinfo_is_ipmsg_absent()) { flags |= IPMSG_ABSENCEOPT; dbg_out("Inabsense mode :%x\n",flags); } dbg_out("gconf return flags:%x\n",flags); g_static_mutex_unlock(&hostinfo_mutex); return flags; } static int hostinfo_get_ipmsg_window_size(const gchar *wkey,const gchar *hkey,gint *width,gint *height){ dbg_out("here\n"); if ( (!wkey) || (!hkey) || (!width) || (!height) ) return -EINVAL; g_static_mutex_lock(&hostinfo_mutex); *width=gconf_client_get_int(client,wkey,NULL); *height=gconf_client_get_int(client,hkey,NULL); g_static_mutex_unlock(&hostinfo_mutex); dbg_out("gconf return size:(%s,%s)=(%d,%d)\n",wkey,hkey,*width,*height); return 0; } static int hostinfo_set_ipmsg_window_size(const gchar *wkey,const gchar *hkey,gint width,gint height){ int rwidth,rheight; dbg_out("here\n"); if ( (!wkey) || (!hkey) ) return -EINVAL; dbg_out("gconf set size:(%s,%s)=(%d,%d)\n",wkey,hkey,width,height); g_static_mutex_lock(&hostinfo_mutex); gconf_client_set_int(client,wkey,width,NULL); gconf_client_set_int(client,hkey,height,NULL); gconf_client_clear_cache(client); rwidth=gconf_client_get_int(client,wkey,NULL); rheight=gconf_client_get_int(client,hkey,NULL); g_static_mutex_unlock(&hostinfo_mutex); dbg_out("gconf get size:(%s,%s)=(%d,%d)\n",wkey,hkey,rwidth,rheight); return 0; } int hostinfo_get_ipmsg_message_window_size(gint *width,gint *height){ int rc; if ( (!width) || (!height) ) return -EINVAL; rc=hostinfo_get_ipmsg_window_size(HOSTINFO_KEY_MSGWIN_WIDTH, HOSTINFO_KEY_MSGWIN_HEIGHT, width, height); dbg_out("gconf return size:(%d,%d)\n",*width,*height); return rc; } int hostinfo_set_ipmsg_message_window_size(gint width,gint height){ int rc; dbg_out("gconf set size:(%d,%d)\n",width,height); rc=hostinfo_set_ipmsg_window_size(HOSTINFO_KEY_MSGWIN_WIDTH, HOSTINFO_KEY_MSGWIN_HEIGHT, width, height); return rc; } int hostinfo_get_ipmsg_recv_window_size(gint *width,gint *height){ int rc; if ( (!width) || (!height) ) return -EINVAL; rc=hostinfo_get_ipmsg_window_size(HOSTINFO_KEY_RECVWIN_WIDTH, HOSTINFO_KEY_RECVWIN_HEIGHT, width, height); dbg_out("gconf return size:(%d,%d)\n",*width,*height); return rc; } int hostinfo_set_ipmsg_recv_window_size(gint width,gint height){ int rc; dbg_out("gconf set size:(%d,%d)\n",width,height); rc=hostinfo_set_ipmsg_window_size(HOSTINFO_KEY_RECVWIN_WIDTH, HOSTINFO_KEY_RECVWIN_HEIGHT, width, height); return rc; } int hostinfo_get_ipmsg_attach_editor_size(gint *width,gint *height){ int rc; if ( (!width) || (!height) ) return -EINVAL; rc=hostinfo_get_ipmsg_window_size(HOSTINFO_KEY_ATTACHWIN_WIDTH, HOSTINFO_KEY_ATTACHWIN_HEIGHT, width, height); dbg_out("gconf return size:(%d,%d)\n",*width,*height); return rc; } int hostinfo_set_ipmsg_attach_editor_size(gint width,gint height){ int rc; dbg_out("gconf set size:(%d,%d)\n",width,height); rc=hostinfo_set_ipmsg_window_size(HOSTINFO_KEY_ATTACHWIN_WIDTH, HOSTINFO_KEY_ATTACHWIN_HEIGHT, width, height); return rc; } int hostinfo_get_ipmsg_absence_editor_size(gint *width,gint *height){ int rc; if ( (!width) || (!height) ) return -EINVAL; rc=hostinfo_get_ipmsg_window_size(HOSTINFO_KEY_ABSENCE_WIDTH, HOSTINFO_KEY_ABSENCE_HEIGHT, width, height); dbg_out("gconf return size:(%d,%d)\n",*width,*height); return rc; } int hostinfo_set_ipmsg_absence_editor_size(gint width,gint height){ int rc; dbg_out("gconf set size:(%d,%d)\n",width,height); rc=hostinfo_set_ipmsg_window_size(HOSTINFO_KEY_ABSENCE_WIDTH, HOSTINFO_KEY_ABSENCE_HEIGHT, width, height); return rc; } unsigned long hostinfo_get_ipmsg_crypt_capability(void){ int rc; unsigned long state; rc=hostinfo_refer_ipmsg_cipher(&state); if (!rc) return state; return 0; } int hostinfo_get_ipmsg_system_addr_family(void){ if (gconf_client_get_bool(client,HOSTINFO_KEY_IPV6,NULL)) return AF_INET6; else return AF_INET; /* デフォルトはIPV4 */ } gboolean is_sound_system_available(void){ #if defined(HAVE_GST) return TRUE; #else return FALSE; #endif /* HAVE_GST */ } static int update_cached_prio(void) { GSList *conf_top,*conf_list; GSList *conf_ref; conf_list=cached_prio; while(conf_list != NULL) { gchar *element = conf_list->data; if (element) g_free(element); conf_list=g_slist_next(conf_list); } if (cached_prio) g_slist_free(conf_top); cached_prio=conf_list=gconf_client_get_list(client,HOSTINFO_KEY_DEFAULT_PRIO,GCONF_VALUE_STRING,NULL); } int hostinfo_update_ipmsg_ipaddr_prio(const char *ipaddr,int prio){ int rc=0; GSList *conf_top,*conf_list; GSList *conf_ref; gchar *addr; gchar *prio_str; gchar buff[1024]; if (!ipaddr) return -EINVAL; conf_top=conf_list=gconf_client_get_list(client,HOSTINFO_KEY_DEFAULT_PRIO,GCONF_VALUE_STRING,NULL); memset(buff,0,1024); snprintf(buff,1023,"%d%c%s",prio,HOSTINFO_PRIO_SEPARATOR,ipaddr); buff[1023]='\0'; for(conf_ref=conf_top;conf_ref;conf_ref=g_slist_next(conf_ref)) { if (conf_ref->data) { prio_str=conf_ref->data; /* 優先度@アドレスの形式 */ dbg_out("Addr-info:%s\n",prio_str); addr=strchr(prio_str,HOSTINFO_PRIO_SEPARATOR); g_assert(addr); ++addr; if (!strcmp(addr,ipaddr)) { g_free(conf_ref->data); conf_ref->data=g_strdup(buff); if (!conf_ref->data) { rc=-ENOMEM; goto free_list_out; } dbg_out("Replace prio:%s\n",conf_ref->data); goto start_config; } } } prio_str=g_strdup(buff); if (!prio_str) { rc=-ENOMEM; goto free_list_out; } conf_top=g_slist_append(conf_top,prio_str); start_config: gconf_client_set_list(client,HOSTINFO_KEY_DEFAULT_PRIO,GCONF_VALUE_STRING,conf_top,NULL); gconf_client_clear_cache(client); rc=0; update_cached_prio(); free_list_out: conf_list=conf_top; while(conf_list != NULL) { gchar *element = conf_list->data; if (element) g_free(element); conf_list=g_slist_next(conf_list); } if (conf_top) g_slist_free(conf_top); return rc; } int hostinfo_get_ipmsg_ipaddr_prio(const char *ipaddr,int *prio){ GSList *conf_top,*conf_list; GSList *conf_ref; gchar *addr; gchar *tmp_str; gchar *prio_str; int val=0; if ( (!ipaddr) || (!prio) ) return -EINVAL; if (!cached_prio) update_cached_prio(); conf_top=cached_prio; for(conf_ref=conf_top;conf_ref;conf_ref=g_slist_next(conf_ref)) { if (conf_ref->data) { prio_str=g_strdup(conf_ref->data); if (!prio_str) { *prio=0; /* FIXME */ return -ENOMEM; } /* 優先度@アドレスの形式 */ dbg_out("Addr-info:%s\n",prio_str); addr=strchr(prio_str,HOSTINFO_PRIO_SEPARATOR); g_assert(addr); *addr='\0'; ++addr; if (!strcmp(addr,ipaddr)) { val=strtol(prio_str, (char **)NULL, 10); if (prio_is_valid(val)) { dbg_out("default prio:%d (%s)\n",val,addr); } else { dbg_out("default prio invalid :%s\n",addr); val=0; } g_free(prio_str); break; } g_free(prio_str); } } *prio=val; return 0; } gboolean hostinfo_refer_enable_systray(void){ if (!client) return FALSE; return gconf_client_get_bool(client,HOSTINFO_KEY_USE_SYSTRAY,NULL); } gboolean hostinfo_set_enable_systray(gboolean val){ gboolean rc; uint state; g_static_mutex_lock(&hostinfo_mutex); rc=gconf_client_set_bool(client,HOSTINFO_KEY_HEADER_VISIBLE,val,NULL); gconf_client_clear_cache(client); state=gconf_client_get_int(client,HOSTINFO_KEY_HEADER_VISIBLE,NULL); dbg_out("Set header:%x \n",state); g_static_mutex_unlock(&hostinfo_mutex); return rc; } guint hostinfo_refer_header_state(void){ guint state; g_static_mutex_lock(&hostinfo_mutex); state=gconf_client_get_int(client,HOSTINFO_KEY_HEADER_VISIBLE,NULL); dbg_out("Header:%x \n",state); g_static_mutex_unlock(&hostinfo_mutex); return state; } gboolean hostinfo_set_header_state(guint val){ guint state; g_static_mutex_lock(&hostinfo_mutex); gconf_client_set_int(client,HOSTINFO_KEY_HEADER_VISIBLE,val,NULL); gconf_client_clear_cache(client); g_static_mutex_unlock(&hostinfo_mutex); } int hostinfo_get_header_order(int index,int *col_id){ int rc=0; GSList *header_top; GSList *header_ref; GSList *tmplist = NULL; if ( (index<0) || (index>=MAX_VIEW_ID) ) return -EINVAL; if (!col_id) return -EINVAL; header_top=gconf_client_get_list(client,HOSTINFO_KEY_HEADER_ORDER,GCONF_VALUE_INT,NULL); if (!header_top){ tmplist = g_slist_append(tmplist, GINT_TO_POINTER(index)); gconf_client_set_list(client, HOSTINFO_KEY_HEADER_ORDER, GCONF_VALUE_INT, tmplist, NULL); gconf_client_clear_cache(client); } else if (g_slist_find(header_top, GINT_TO_POINTER(index)) == NULL) { header_top = g_slist_append(header_top, GINT_TO_POINTER(index)); gconf_client_set_list(client, HOSTINFO_KEY_HEADER_ORDER, GCONF_VALUE_INT, header_top, NULL); gconf_client_clear_cache(client); } rc=-ESRCH; header_ref=g_slist_nth(header_top,index); if (!header_ref) goto free_list_out; *col_id=(int)header_ref->data; gconf_client_set_list(client,HOSTINFO_KEY_HEADER_ORDER,GCONF_VALUE_INT,header_top,NULL); gconf_client_clear_cache(client); rc=0; free_list_out: if (header_top) g_slist_free(header_top); return rc; } int hostinfo_set_ipmsg_header_order(int index,int col_id){ int rc=0; GSList *header_top; GSList *header_ref; if ( (index<0) || (index>=MAX_VIEW_ID) ) return -EINVAL; header_top=gconf_client_get_list(client,HOSTINFO_KEY_HEADER_ORDER,GCONF_VALUE_INT,NULL); if (!header_top) return -ESRCH; rc=-ESRCH; header_ref=g_slist_nth(header_top,index); if (header_ref) { header_ref->data=(gpointer)col_id; gconf_client_set_list(client,HOSTINFO_KEY_HEADER_ORDER,GCONF_VALUE_INT,header_top,NULL); gconf_client_clear_cache(client); rc=0; } if (header_top) g_slist_free(header_top); return rc; } gboolean hostinfo_refer_ipmsg_crypt_policy_is_speed(void) { return gconf_client_get_bool(client,HOSTINFO_KEY_CRYPT_SPEED,NULL); } int hostinfo_set_ipmsg_crypt_policy_as_speed(gboolean val){ gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_CRYPT_SPEED,val,NULL); } gboolean hostinfo_refer_ipmsg_encrypt_public_key(void){ return gconf_client_get_bool(client,HOSTINFO_KEY_ENCRYPT_PUBKEY,NULL); } int hostinfo_set_ipmsg_encrypt_public_key(gboolean val){ gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_ENCRYPT_PUBKEY,val,NULL); } gboolean hostinfo_refer_ipmsg_use_lock(void){ return gconf_client_get_bool(client,HOSTINFO_KEY_LOCK,NULL); } int hostinfo_set_ipmsg_use_lock(gboolean val){ gconf_client_clear_cache(client); return gconf_client_set_bool(client,HOSTINFO_KEY_LOCK,val,NULL); } int hostinfo_refer_ipmsg_cipher(unsigned long *cipher) { unsigned long cipher_state; if (!cipher) return -EINVAL; #if !defined(USE_OPENSSL) return -ENOSYS; /* Not supported */ #endif /* !USE_OPENSSL */ cipher_state = gconf_client_get_int(client,HOSTINFO_KEY_CIPHER,NULL); if ( ( (cipher_state & RSA_CAPS) == 0) || ( (cipher_state & SYM_CAPS) == 0) ){ war_out("Invalid enc-capabirity:%x\n", cipher_state); cipher_state = G2IPMSG_CRYPTO_CAP; war_out("Force to set:%x\n", cipher_state); hostinfo_set_ipmsg_cipher(cipher_state); } *cipher=cipher_state; return 0; } int hostinfo_set_ipmsg_cipher(unsigned long val){ gconf_client_clear_cache(client); return gconf_client_set_int(client,HOSTINFO_KEY_CIPHER,val,NULL); } static void hostinfo_update_internal_password(int type) { g_static_mutex_lock(&hostinfo_mutex); switch(type) { case HOSTINFO_PASSWD_TYPE_ENCKEY: if (pubkey_pass_string == NULL) { pubkey_pass_string = gconf_client_get_string(client, HOSTINFO_KEY_ENC_PASSWD, NULL); dbg_out("gconf return encoded password for keys:%s\n", (pubkey_pass_string != NULL) ? (pubkey_pass_string) : ("Not set yet")); } break; case HOSTINFO_PASSWD_TYPE_LOCK: if (lock_pass_string == NULL) { lock_pass_string = gconf_client_get_string(client, HOSTINFO_KEY_LOCK_PASSWD, NULL); dbg_out("gconf return encoded password for lock:%s\n", (lock_pass_string != NULL) ? (lock_pass_string) : ("Not set yet")); } break; default: g_assert_not_reached(); break; } g_static_mutex_unlock(&hostinfo_mutex); } static void hostinfo_register_password(int type, const char *encoded_password) { g_assert(encoded_password != NULL); dbg_out("set encryption key password(encoded):%s\n", encoded_password); g_static_mutex_lock(&hostinfo_mutex); g_assert(client); switch(type) { case HOSTINFO_PASSWD_TYPE_ENCKEY: if (pubkey_pass_string != NULL) { g_free(pubkey_pass_string); pubkey_pass_string = NULL; } /* * Update internal cache */ gconf_client_set_string(client, HOSTINFO_KEY_ENC_PASSWD, encoded_password, NULL); gconf_client_clear_cache(client); pubkey_pass_string = gconf_client_get_string(client, HOSTINFO_KEY_ENC_PASSWD, NULL); break; case HOSTINFO_PASSWD_TYPE_LOCK: if (lock_pass_string != NULL) { g_free(lock_pass_string); lock_pass_string = NULL; } /* * Update internal cache */ gconf_client_set_string(client, HOSTINFO_KEY_LOCK_PASSWD, encoded_password, NULL); gconf_client_clear_cache(client); lock_pass_string = gconf_client_get_string(client, HOSTINFO_KEY_LOCK_PASSWD, NULL); break; default: g_assert_not_reached(); break; } g_static_mutex_unlock(&hostinfo_mutex); } const char * hostinfo_refer_encryption_key_password(void) { hostinfo_update_internal_password(HOSTINFO_PASSWD_TYPE_ENCKEY); return (pubkey_pass_string != NULL) ? (pubkey_pass_string) : ""; } int hostinfo_set_encryption_key_password(const char *encoded_password) { if (encoded_password == NULL) return -EINVAL; hostinfo_register_password(HOSTINFO_PASSWD_TYPE_ENCKEY, encoded_password); return 0; } const char * hostinfo_refer_lock_password(void) { hostinfo_update_internal_password(HOSTINFO_PASSWD_TYPE_LOCK); return (lock_pass_string != NULL) ? (lock_pass_string) : ""; } int hostinfo_set_lock_password(const char *encoded_password) { if (encoded_password == NULL) return -EINVAL; hostinfo_register_password(HOSTINFO_PASSWD_TYPE_LOCK, encoded_password); return 0; } gboolean hostinfo_refer_ipmsg_iconify_dialogs(void) { return gconf_client_get_bool(client, HOSTINFO_KEY_ICONIFY_DIALOGS, NULL); } gboolean hostinfo_set_ipmsg_iconify_dialogs(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client, HOSTINFO_KEY_ICONIFY_DIALOGS, val, NULL); } gboolean hostinfo_refer_ipmsg_log_locked_message_handling(void) { return gconf_client_get_bool(client, HOSTINFO_KEY_LOCK_MSGLOG, NULL); } gboolean hostinfo_set_log_locked_message_handling(gboolean val) { gconf_client_clear_cache(client); return gconf_client_set_bool(client, HOSTINFO_KEY_LOCK_MSGLOG, val, NULL); } int hostinfo_set_encoding(const char *encoding) { if (encoding == NULL) return -EINVAL; g_static_mutex_lock(&hostinfo_mutex); dbg_out("set encoding : %s\n", encoding); g_assert(client); if (encoding_string != NULL) g_free(encoding_string); gconf_client_set_string(client, HOSTINFO_KEY_EXTERNAL_ENCODING, encoding, NULL); gconf_client_clear_cache(client); encoding_string = gconf_client_get_string(client, HOSTINFO_KEY_EXTERNAL_ENCODING, NULL); dbg_out("gconf return encoding:%s\n", encoding_string); g_static_mutex_unlock(&hostinfo_mutex); return 0; } const char * hostinfo_refer_encoding(void) { g_static_mutex_lock(&hostinfo_mutex); if (encoding_string == NULL) { do { encoding_string = gconf_client_get_string(client, HOSTINFO_KEY_EXTERNAL_ENCODING, NULL); if (encoding_string == NULL) /* 未登録の場合は、デフォルトを登録 */ hostinfo_set_encoding(IPMSG_PROTO_CODE); } while (encoding_string == NULL); dbg_out("gconf return encoding name:%s\n", encoding_string); } g_static_mutex_unlock(&hostinfo_mutex); g_assert(encoding_string != NULL); return encoding_string; } int hostinfo_init_hostinfo(void){ int i; client = gconf_client_get_default (); gconf_client_add_dir (client, PATH, GCONF_CLIENT_PRELOAD_NONE, NULL); /* * Add keys */ for(i=0;keys[i];++i) { dbg_out("Add %s\n",keys[i]); gconf_client_notify_add (client, keys[i], hostinfo_gconf_notify_func, (gpointer)keys[i], NULL, NULL); } return 0; } void hostinfo_cleanup_hostinfo(void){ if (groupname) g_free(groupname); if (nickname) g_free(nickname); if (hostname) g_free(hostname); if (cite_string) g_free(cite_string); } g2ipmsg-0.9.6+dfsg/src/hostinfo.h000066400000000000000000000270261126724573600166320ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(HOSTINFO_H) #define HOSTINFO_H #include #define DEFAULT_PORT 2425 #define PATH "/apps/g2ipmsg" #define HOSTINFO_KEY_PORT "/apps/g2ipmsg/portno" #define HOSTINFO_KEY_GROUP "/apps/g2ipmsg/group" #define HOSTINFO_KEY_NICKNAME "/apps/g2ipmsg/nickname" #define HOSTINFO_KEY_MSGSEC "/apps/g2ipmsg/secret" #define HOSTINFO_KEY_CONFIRM_MSG "/apps/g2ipmsg/confirm" #define HOSTINFO_KEY_BROADCASTS "/apps/g2ipmsg/broadcasts" /* ブロードキャスト */ #define HOSTINFO_KEY_POPUP "/apps/g2ipmsg/popup" #define HOSTINFO_KEY_SOUND "/apps/g2ipmsg/sound" #define HOSTINFO_KEY_ENCLOSE "/apps/g2ipmsg/enclose" #define HOSTINFO_KEY_CITATION "/apps/g2ipmsg/cite" #define HOSTINFO_KEY_LOGFILEPATH "/apps/g2ipmsg/logfilepath" #define HOSTINFO_KEY_ENABLE_LOG "/apps/g2ipmsg/enablelog" #define HOSTINFO_KEY_LOG_NAME "/apps/g2ipmsg/enablelogname" /* ログオン名記録 */ #define HOSTINFO_KEY_LOG_IPADDR "/apps/g2ipmsg/enablelogaddr" /* アドレス記録 */ #define HOSTINFO_KEY_CITE_STRING "/apps/g2ipmsg/citestring" /* 引用文字 */ #define HOSTINFO_KEY_ABS_TITLE "/apps/g2ipmsg/absence_titles" /* 不在タイトル */ #define HOSTINFO_KEY_ABS_MSGS "/apps/g2ipmsg/absence_messages" /* 不在文 */ #define HOSTINFO_KEY_DEBUG "/apps/g2ipmsg/enable_debug" /* デバッグ文 */ #define HOSTINFO_KEY_MSGWIN_WIDTH "/apps/g2ipmsg/msg_win_width" /* メッセージウィンドウの幅 */ #define HOSTINFO_KEY_MSGWIN_HEIGHT "/apps/g2ipmsg/msg_win_height" /* メッセージウィンドウの高さ */ #define HOSTINFO_KEY_RECVWIN_WIDTH "/apps/g2ipmsg/recv_win_width" /* 受信ウィンドウの幅 */ #define HOSTINFO_KEY_RECVWIN_HEIGHT "/apps/g2ipmsg/recv_win_height" /* 受信ウィンドウの高さ */ #define HOSTINFO_KEY_ATTACHWIN_WIDTH "/apps/g2ipmsg/attach_win_width" /* 添付ファイルエディタの幅 */ #define HOSTINFO_KEY_ATTACHWIN_HEIGHT "/apps/g2ipmsg/attach_win_height" /* 添付ファイルエディタの高さ */ #define HOSTINFO_KEY_ABSENCE_WIDTH "/apps/g2ipmsg/absence_win_width" /* 不在文エディタの幅 */ #define HOSTINFO_KEY_ABSENCE_HEIGHT "/apps/g2ipmsg/absence_win_height" /* 不在文エディタの高さ */ #define HOSTINFO_KEY_IPV6 "/apps/g2ipmsg/ipv6" /* ipv6モード */ #define HOSTINFO_KEY_DIALUP "/apps/g2ipmsg/dialup" /* ダイアルアップモード */ #define HOSTINFO_KEY_GET_HLIST "/apps/g2ipmsg/get_host_list" /* ホストリスト取得を実施する */ #define HOSTINFO_KEY_ALLOW_HLIST "/apps/g2ipmsg/allow_host_list" /* ホストリストを送信する */ #define HOSTINFO_KEY_DEFAULT_PRIO "/apps/g2ipmsg/default_prio" /* 表示優先度 */ #define HOSTINFO_KEY_USE_SYSTRAY "/apps/g2ipmsg/use_systray" /* システムトレイに常駐する */ #define HOSTINFO_KEY_HEADER_VISIBLE "/apps/g2ipmsg/header_visible" /* ヘッダ表示 */ #define HOSTINFO_KEY_HEADER_ORDER "/apps/g2ipmsg/header_order" /* ヘッダ順序 */ #define HOSTINFO_KEY_SORT_GROUP "/apps/g2ipmsg/sort_with_group" /* グループでソートする */ #define HOSTINFO_KEY_SUB_SORT_ID "/apps/g2ipmsg/sub_sort_id" /* ソート種別 */ #define HOSTINFO_KEY_SORT_GROUP_DESCENDING "/apps/g2ipmsg/group_sort_descending" /* グループは逆順でソートする */ #define HOSTINFO_KEY_SUB_SORT_DESCENDING "/apps/g2ipmsg/sub_sort_descending" /* サブソート種別は逆順にする */ #define HOSTINFO_KEY_CRYPT_SPEED "/apps/g2ipmsg/crypt_policy_speed" /* 速度優先で選択 */ #define HOSTINFO_KEY_CIPHER "/apps/g2ipmsg/ciphers" /* 暗号化方式 */ #define HOSTINFO_KEY_ENCRYPT_PUBKEY "/apps/g2ipmsg/encrypt_publickey" /* 秘密/公開鍵を暗号化して保存 */ #define HOSTINFO_KEY_LOCK "/apps/g2ipmsg/lock" /* 錠を使用する */ #define HOSTINFO_KEY_ENC_PASSWD "/apps/g2ipmsg/enc_pass" /* 公開鍵暗号化鍵パスワード */ #define HOSTINFO_KEY_LOCK_PASSWD "/apps/g2ipmsg/lock_pass" /* 錠パスワード */ #define HOSTINFO_KEY_LOCK_MSGLOG "/apps/g2ipmsg/loglockedmessage" /* 錠付きメッセージは開封後ログをとる */ #define HOSTINFO_KEY_ICONIFY_DIALOGS "/apps/g2ipmsg/iconify_dialogs" /* 通常ダイアログをアイコン化する */ #define HOSTINFO_KEY_EXTERNAL_ENCODING "/apps/g2ipmsg/external_encoding" /* 外部エンコード形式 */ #define HOSTINFO_PRIO_SEPARATOR '@' #define HEADER_VISUAL_GROUP_ID 0x1 #define HEADER_VISUAL_HOST_ID 0x2 #define HEADER_VISUAL_IPADDR_ID 0x4 #define HEADER_VISUAL_LOGON_ID 0x8 #define HEADER_VISUAL_PRIO_ID 0x10 #define HEADER_VISUAL_GRID_ID 0x20 #define SORT_TYPE_USER 0x0 #define SORT_TYPE_MACHINE 0x1 #define SORT_TYPE_IPADDR 0x2 #define HOSTINFO_PASSWD_TYPE_ENCKEY 0x1 #define HOSTINFO_PASSWD_TYPE_LOCK 0x2 int hostinfo_refer_ipmsg_port(void); const char *hostinfo_refer_user_name(void); const char *hostinfo_refer_group_name(void); const char *hostinfo_refer_nick_name(void); const char *hostinfo_refer_host_name(void); const char *hostinfo_refer_ipmsg_cite_string(void); gboolean hostinfo_refer_ipmsg_default_secret(void); gboolean hostinfo_refer_ipmsg_default_confirm(void); gboolean hostinfo_refer_ipmsg_default_popup(void); gboolean hostinfo_refer_ipmsg_default_sound(void); gboolean hostinfo_refer_ipmsg_default_enclose(void); gboolean hostinfo_refer_ipmsg_default_citation(void); gboolean hostinfo_refer_ipmsg_ipv6_mode(void); gboolean hostinfo_refer_ipmsg_is_get_hlist(void); gboolean hostinfo_refer_ipmsg_is_allow_hlist(void); gboolean hostinfo_refer_ipmsg_dialup_mode(void); gboolean hostinfo_refer_ipmsg_ipaddr_logging(void); gboolean hostinfo_refer_ipmsg_logname_logging(void); gboolean hostinfo_refer_ipmsg_enable_log(void); gboolean hostinfo_refer_enable_systray(void); guint hostinfo_refer_header_state(void); gboolean hostinfo_refer_ipmsg_is_sort_with_group(void); gint hostinfo_refer_ipmsg_sub_sort_id(void); gboolean hostinfo_refer_ipmsg_group_sort_order(void); gboolean hostinfo_refer_ipmsg_sub_sort_order(void); gboolean hostinfo_set_ipmsg_default_secret(gboolean val); gboolean hostinfo_set_ipmsg_default_confirm(gboolean val); gboolean hostinfo_set_ipmsg_default_popup(gboolean val); gboolean hostinfo_set_ipmsg_default_sound(gboolean val); gboolean hostinfo_set_ipmsg_default_enclose(gboolean val); gboolean hostinfo_set_ipmsg_default_citation(gboolean val); gboolean hostinfo_set_ipmsg_ipv6_mode(gboolean val); gboolean hostinfo_set_ipmsg_is_get_hlist(gboolean val); gboolean hostinfo_set_ipmsg_is_allow_hlist(gboolean val); gboolean hostinfo_set_ipmsg_dialup_mode(gboolean val); gboolean hostinfo_set_ipmsg_ipaddr_logging(gboolean val); gboolean hostinfo_set_ipmsg_logname_logging(gboolean val); gboolean hostinfo_set_ipmsg_enable_log(gboolean val); gboolean hostinfo_set_enable_systray(gboolean val); gboolean hostinfo_set_header_state(guint val); gboolean hostinfo_set_ipmsg_sort_with_group(gboolean val); gboolean hostinfo_set_ipmsg_sub_sort_id(gint val); gboolean hostinfo_set_ipmsg_group_sort_order(gboolean val); gboolean hostinfo_set_ipmsg_sub_sort_order(gboolean val); int hostinfo_set_ipmsg_logfile(const char *file); int hostinfo_set_ipmsg_broadcast_list(GSList *list); GSList* hostinfo_get_ipmsg_broadcast_list(void); const char *hostinfo_refer_ipmsg_logfile(void); unsigned long hostinfo_get_normal_send_flags(void); unsigned long hostinfo_get_normal_entry_flags(void); int hostinfo_set_group_name(const char *groupName); int hostinfo_set_nick_name(const char *nickName); int hostinfo_set_ipmsg_port(int port); int hostinfo_send_broad_cast(const udp_con_t *con,const char *msg,size_t len); gboolean hostinfo_is_ipmsg_absent(void); gboolean hostinfo_set_ipmsg_absent(gboolean state); int hostinfo_get_absent_id(int *index); int hostinfo_set_absent_id(int index); int hostinfo_get_absent_title(int index,const char **title); int hostinfo_set_ipmsg_absent_title(int index,const char *title); int hostinfo_refer_absent_length(int *max_index); int hostinfo_refer_absent_message_slots(int *max_index); int hostinfo_get_absent_message(int index, char **message); int hostinfo_set_ipmsg_absent_message(int index,const char *message); int hostinfo_get_current_absence_message(char **message_p); gboolean hostinfo_refer_debug_state(void); int hostinfo_get_ipmsg_message_window_size(gint *width,gint *height); int hostinfo_set_ipmsg_message_window_size(gint width,gint height); int hostinfo_get_ipmsg_recv_window_size(gint *width,gint *height); int hostinfo_set_ipmsg_recv_window_size(gint width,gint height); int hostinfo_get_ipmsg_attach_editor_size(gint *width,gint *height); int hostinfo_set_ipmsg_attach_editor_size(gint width,gint height); int hostinfo_get_ipmsg_absence_editor_size(gint *width,gint *height); int hostinfo_set_ipmsg_absence_editor_size(gint width,gint height); int hostinfo_get_ipmsg_system_addr_family(void); int hostinfo_update_ipmsg_ipaddr_prio(const char *ipaddr,int prio); int hostinfo_get_ipmsg_ipaddr_prio(const char *ipaddr,int *prio); int hostinfo_get_header_order(int index,int *col_id); int hostinfo_set_ipmsg_header_order(int index,int col_id); gboolean hostinfo_refer_ipmsg_crypt_policy_is_speed(void); int hostinfo_set_ipmsg_crypt_policy_as_speed(gboolean val); gboolean hostinfo_refer_ipmsg_encrypt_public_key(void); int hostinfo_set_ipmsg_encrypt_public_key(gboolean val); gboolean hostinfo_refer_ipmsg_use_lock(void); int hostinfo_set_ipmsg_use_lock(gboolean val); unsigned long hostinfo_get_ipmsg_crypt_capability(void); gboolean is_sound_system_available(void); int hostinfo_refer_ipmsg_cipher(unsigned long *cipher); int hostinfo_set_ipmsg_cipher(unsigned long val); const char *hostinfo_refer_encryption_key_password(void); int hostinfo_set_encryption_key_password(const char *encoded_password); const char *hostinfo_refer_lock_password(void); int hostinfo_set_lock_password(const char *encoded_password); gboolean hostinfo_refer_ipmsg_iconify_dialogs(void); gboolean hostinfo_set_ipmsg_iconify_dialogs(gboolean val); gboolean hostinfo_refer_ipmsg_log_locked_message_handling(void); gboolean hostinfo_set_log_locked_message_handling(gboolean val); int hostinfo_set_encoding(const char *encoding); const char *hostinfo_refer_encoding(void); int hostinfo_init_hostinfo(void); void hostinfo_cleanup_hostinfo(void); #endif /* HOSTINFO_H */ g2ipmsg-0.9.6+dfsg/src/interface.c000066400000000000000000005456131126724573600167430ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include "callbacks.h" #include "interface.h" #include "support.h" #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) static GnomeUIInfo file1_menu_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("Attachment"), NULL, (gpointer) on_attachment1_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, "gtk-file", 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_CLOSE_ITEM (on_close1_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo sort_filter1_menu_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("Set priority as 1"), NULL, (gpointer) on_menu_set_priority_as_1_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set priority as 2"), NULL, (gpointer) on_menu_set_priority_as_2_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set priority as 3"), NULL, (gpointer) on_menu_set_priority_as_3_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set priority as 4"), NULL, (gpointer) on_menu_set_priority_as_4_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set them as default"), NULL, (gpointer) on_menu_set_them_as_default_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set them invisible item"), NULL, (gpointer) on_menu_set_them_invisible_item_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, N_("Show invisible items"), NULL, (gpointer) on_menu_show_invisible_items_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set all as default"), NULL, (gpointer) on_menu_set_all_as_default_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; static GnomeUIInfo edit1_menu_uiinfo[] = { GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_PREFERENCES_ITEM (on_preferences1_activate, NULL), GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_SUBTREE, N_("Sort filter"), N_("Set priority of entries"), sort_filter1_menu_uiinfo, NULL, NULL, GNOME_APP_PIXMAP_STOCK, "gtk-sort-ascending", 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("User list view config"), N_("Set user list configurations."), (gpointer) on_menu_user_list_view_config_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, "gtk-preferences", 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Save list headers state"), N_("Save current setting about user list."), (gpointer) on_menu_save_list_headers_state_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, "gtk-apply", 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, N_("security configuration"), N_("Set security relevant configuration"), (gpointer) on_menu_security_configuration_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, "gtk-preferences", 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; static GnomeUIInfo update1_menu_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("Update"), NULL, (gpointer) on_update2_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, "gtk-refresh", 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("get version"), NULL, (gpointer) on_get_version1_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, "gtk-dialog-question", 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("get absence info"), NULL, (gpointer) on_absence_info1_activate, NULL, NULL, GNOME_APP_PIXMAP_STOCK, "gtk-dialog-question", 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; static GnomeUIInfo help1_menu_uiinfo[] = { GNOMEUIINFO_MENU_ABOUT_ITEM (on_about1_activate, NULL), GNOMEUIINFO_END }; static GnomeUIInfo menubar1_uiinfo[] = { GNOMEUIINFO_MENU_FILE_TREE (file1_menu_uiinfo), GNOMEUIINFO_SEPARATOR, GNOMEUIINFO_MENU_SETTINGS_TREE (edit1_menu_uiinfo), GNOMEUIINFO_MENU_VIEW_TREE (update1_menu_uiinfo), GNOMEUIINFO_MENU_HELP_TREE (help1_menu_uiinfo), GNOMEUIINFO_END }; GtkWidget* create_messageWindow (void) { GtkWidget *messageWindow; GdkPixbuf *messageWindow_icon_pixbuf; GtkWidget *bonobodock1; GtkWidget *vbox1; GtkWidget *vpaned1; GtkWidget *hbox21; GtkWidget *scrolledwindow13; GtkWidget *messageUserTree; GtkWidget *vbox17; GtkWidget *frame15; GtkWidget *alignment19; GtkWidget *messageWinUsersEntry; GtkWidget *messageWinUserNumFrameLabel; GtkWidget *messageWinUpdateBtn; GtkWidget *scrolledwindow11; GtkWidget *textview1; GtkWidget *hbox1; GtkWidget *messageWinCloseBtn; GtkWidget *sendBtn; GtkWidget *hbox20; GtkWidget *encloseCheckBtn; GtkWidget *lockChkBtn; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); messageWindow = gnome_app_new ("G2ipmsg", _("g2ipmsg")); gtk_widget_set_extension_events (messageWindow, GDK_EXTENSION_EVENTS_ALL); gtk_window_set_destroy_with_parent (GTK_WINDOW (messageWindow), TRUE); messageWindow_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (messageWindow_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (messageWindow), messageWindow_icon_pixbuf); gdk_pixbuf_unref (messageWindow_icon_pixbuf); } bonobodock1 = GNOME_APP (messageWindow)->dock; gtk_widget_show (bonobodock1); gnome_app_create_menus (GNOME_APP (messageWindow), menubar1_uiinfo); vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox1); gnome_app_set_contents (GNOME_APP (messageWindow), vbox1); vpaned1 = gtk_vpaned_new (); gtk_widget_show (vpaned1); gtk_box_pack_start (GTK_BOX (vbox1), vpaned1, TRUE, TRUE, 0); gtk_paned_set_position (GTK_PANED (vpaned1), 134); hbox21 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox21); gtk_paned_pack1 (GTK_PANED (vpaned1), hbox21, TRUE, TRUE); scrolledwindow13 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow13); gtk_box_pack_start (GTK_BOX (hbox21), scrolledwindow13, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow13), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow13), GTK_SHADOW_IN); messageUserTree = gtk_tree_view_new (); gtk_widget_show (messageUserTree); gtk_container_add (GTK_CONTAINER (scrolledwindow13), messageUserTree); gtk_container_set_border_width (GTK_CONTAINER (messageUserTree), 2); gtk_tooltips_set_tip (tooltips, messageUserTree, _("Please select receivers or drop attachment files."), NULL); gtk_tree_view_set_reorderable (GTK_TREE_VIEW (messageUserTree), TRUE); vbox17 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox17); gtk_box_pack_start (GTK_BOX (hbox21), vbox17, FALSE, FALSE, 4); frame15 = gtk_frame_new (NULL); gtk_widget_show (frame15); gtk_box_pack_start (GTK_BOX (vbox17), frame15, FALSE, FALSE, 0); gtk_widget_set_size_request (frame15, 40, 78); gtk_container_set_border_width (GTK_CONTAINER (frame15), 1); alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment19); gtk_container_add (GTK_CONTAINER (frame15), alignment19); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 0, 0, 12, 0); messageWinUsersEntry = gtk_entry_new (); gtk_widget_show (messageWinUsersEntry); gtk_container_add (GTK_CONTAINER (alignment19), messageWinUsersEntry); gtk_tooltips_set_tip (tooltips, messageWinUsersEntry, _("current users"), NULL); gtk_editable_set_editable (GTK_EDITABLE (messageWinUsersEntry), FALSE); gtk_entry_set_invisible_char (GTK_ENTRY (messageWinUsersEntry), 8226); messageWinUserNumFrameLabel = gtk_label_new (_("Users")); gtk_widget_show (messageWinUserNumFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame15), messageWinUserNumFrameLabel); gtk_label_set_use_markup (GTK_LABEL (messageWinUserNumFrameLabel), TRUE); messageWinUpdateBtn = gtk_button_new_from_stock ("gtk-refresh"); gtk_widget_show (messageWinUpdateBtn); gtk_box_pack_start (GTK_BOX (vbox17), messageWinUpdateBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, messageWinUpdateBtn, _("Please push this button to update the user list."), NULL); scrolledwindow11 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow11); gtk_paned_pack2 (GTK_PANED (vpaned1), scrolledwindow11, TRUE, TRUE); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow11), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow11), GTK_SHADOW_IN); textview1 = gtk_text_view_new (); gtk_widget_show (textview1); gtk_container_add (GTK_CONTAINER (scrolledwindow11), textview1); gtk_widget_set_size_request (textview1, -1, 120); gtk_tooltips_set_tip (tooltips, textview1, _("Please edit your message or drop attachment files."), NULL); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (textview1), GTK_WRAP_CHAR); hbox1 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0); gtk_widget_set_size_request (hbox1, -1, 40); messageWinCloseBtn = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (messageWinCloseBtn); gtk_box_pack_start (GTK_BOX (hbox1), messageWinCloseBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, messageWinCloseBtn, _("Please push this button to close this window."), NULL); sendBtn = gtk_button_new_with_mnemonic (_("SEND")); gtk_widget_show (sendBtn); gtk_box_pack_start (GTK_BOX (hbox1), sendBtn, FALSE, FALSE, 0); gtk_widget_set_size_request (sendBtn, 80, -1); gtk_tooltips_set_tip (tooltips, sendBtn, _("Please push this button to send the message."), NULL); hbox20 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox20); gtk_box_pack_start (GTK_BOX (hbox1), hbox20, TRUE, TRUE, 0); encloseCheckBtn = gtk_check_button_new_with_mnemonic (_("enclose message")); gtk_widget_show (encloseCheckBtn); gtk_box_pack_start (GTK_BOX (hbox20), encloseCheckBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, encloseCheckBtn, _("Check here to make this message sealed."), NULL); lockChkBtn = gtk_check_button_new_with_mnemonic (_("lock")); gtk_widget_show (lockChkBtn); gtk_box_pack_start (GTK_BOX (hbox20), lockChkBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, lockChkBtn, _("Check here to lock this message(need to enclose the message)."), NULL); g_signal_connect ((gpointer) messageWindow, "drag_data_received", G_CALLBACK (on_app1_drag_data_received), NULL); g_signal_connect ((gpointer) messageWindow, "destroy", G_CALLBACK (on_app1_destroy), NULL); g_signal_connect ((gpointer) messageWindow, "show", G_CALLBACK (on_messageWindow_show), NULL); g_signal_connect ((gpointer) messageWindow, "size_allocate", G_CALLBACK (on_messageWindow_size_allocate), NULL); g_signal_connect ((gpointer) messageWindow, "key_release_event", G_CALLBACK (on_messageWindow_key_release_event), NULL); g_signal_connect ((gpointer) vpaned1, "drag_data_received", G_CALLBACK (on_vpaned1_drag_data_received), NULL); g_signal_connect ((gpointer) messageUserTree, "drag_data_received", G_CALLBACK (on_messageUserTree_drag_data_received), NULL); g_signal_connect ((gpointer) messageWinUpdateBtn, "clicked", G_CALLBACK (on_messageWinUpdateBtn_clicked), NULL); g_signal_connect ((gpointer) textview1, "drag_data_received", G_CALLBACK (on_textview1_drag_data_received), NULL); g_signal_connect ((gpointer) textview1, "button_press_event", G_CALLBACK (on_textview1_button_press_event), NULL); g_signal_connect ((gpointer) messageWinCloseBtn, "clicked", G_CALLBACK (on_messageWinCloseBtn_clicked), NULL); g_signal_connect ((gpointer) sendBtn, "clicked", G_CALLBACK (on_sendBtn_clicked), NULL); g_signal_connect ((gpointer) encloseCheckBtn, "toggled", G_CALLBACK (on_encloseCheckBtn_toggled), NULL); g_signal_connect ((gpointer) lockChkBtn, "toggled", G_CALLBACK (on_lockChkBtn_toggled), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (messageWindow, messageWindow, "messageWindow"); GLADE_HOOKUP_OBJECT (messageWindow, bonobodock1, "bonobodock1"); GLADE_HOOKUP_OBJECT (messageWindow, menubar1_uiinfo[0].widget, "file1"); GLADE_HOOKUP_OBJECT (messageWindow, file1_menu_uiinfo[0].widget, "attachment1"); GLADE_HOOKUP_OBJECT (messageWindow, file1_menu_uiinfo[1].widget, "_______________1"); GLADE_HOOKUP_OBJECT (messageWindow, file1_menu_uiinfo[2].widget, "__________c_1"); GLADE_HOOKUP_OBJECT (messageWindow, menubar1_uiinfo[1].widget, "separator1"); GLADE_HOOKUP_OBJECT (messageWindow, menubar1_uiinfo[2].widget, "edit1"); GLADE_HOOKUP_OBJECT (messageWindow, edit1_menu_uiinfo[0].widget, "separator3"); GLADE_HOOKUP_OBJECT (messageWindow, edit1_menu_uiinfo[1].widget, "preferences1"); GLADE_HOOKUP_OBJECT (messageWindow, edit1_menu_uiinfo[2].widget, "_______________4"); GLADE_HOOKUP_OBJECT (messageWindow, edit1_menu_uiinfo[3].widget, "sort_filter1"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[0].widget, "menu_set_priority_as_1"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[1].widget, "menu_set_priority_as_2"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[2].widget, "menu_set_priority_as_3"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[3].widget, "menu_set_priority_as_4"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[4].widget, "menu_set_them_as_default"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[5].widget, "menu_set_them_invisible_item"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[6].widget, "_______________5"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[7].widget, "menu_show_invisible_items"); GLADE_HOOKUP_OBJECT (messageWindow, sort_filter1_menu_uiinfo[8].widget, "menu_set_all_as_default"); GLADE_HOOKUP_OBJECT (messageWindow, edit1_menu_uiinfo[4].widget, "menu_user_list_view_config"); GLADE_HOOKUP_OBJECT (messageWindow, edit1_menu_uiinfo[5].widget, "menu_save_list_headers_state"); GLADE_HOOKUP_OBJECT (messageWindow, edit1_menu_uiinfo[6].widget, "_______________6"); GLADE_HOOKUP_OBJECT (messageWindow, edit1_menu_uiinfo[7].widget, "menu_security_configuration"); GLADE_HOOKUP_OBJECT (messageWindow, menubar1_uiinfo[3].widget, "update1"); GLADE_HOOKUP_OBJECT (messageWindow, update1_menu_uiinfo[0].widget, "update2"); GLADE_HOOKUP_OBJECT (messageWindow, update1_menu_uiinfo[1].widget, "get_version1"); GLADE_HOOKUP_OBJECT (messageWindow, update1_menu_uiinfo[2].widget, "absence_info1"); GLADE_HOOKUP_OBJECT (messageWindow, menubar1_uiinfo[4].widget, "help1"); GLADE_HOOKUP_OBJECT (messageWindow, help1_menu_uiinfo[0].widget, "about1"); GLADE_HOOKUP_OBJECT (messageWindow, vbox1, "vbox1"); GLADE_HOOKUP_OBJECT (messageWindow, vpaned1, "vpaned1"); GLADE_HOOKUP_OBJECT (messageWindow, hbox21, "hbox21"); GLADE_HOOKUP_OBJECT (messageWindow, scrolledwindow13, "scrolledwindow13"); GLADE_HOOKUP_OBJECT (messageWindow, messageUserTree, "messageUserTree"); GLADE_HOOKUP_OBJECT (messageWindow, vbox17, "vbox17"); GLADE_HOOKUP_OBJECT (messageWindow, frame15, "frame15"); GLADE_HOOKUP_OBJECT (messageWindow, alignment19, "alignment19"); GLADE_HOOKUP_OBJECT (messageWindow, messageWinUsersEntry, "messageWinUsersEntry"); GLADE_HOOKUP_OBJECT (messageWindow, messageWinUserNumFrameLabel, "messageWinUserNumFrameLabel"); GLADE_HOOKUP_OBJECT (messageWindow, messageWinUpdateBtn, "messageWinUpdateBtn"); GLADE_HOOKUP_OBJECT (messageWindow, scrolledwindow11, "scrolledwindow11"); GLADE_HOOKUP_OBJECT (messageWindow, textview1, "textview1"); GLADE_HOOKUP_OBJECT (messageWindow, hbox1, "hbox1"); GLADE_HOOKUP_OBJECT (messageWindow, messageWinCloseBtn, "messageWinCloseBtn"); GLADE_HOOKUP_OBJECT (messageWindow, sendBtn, "sendBtn"); GLADE_HOOKUP_OBJECT (messageWindow, hbox20, "hbox20"); GLADE_HOOKUP_OBJECT (messageWindow, encloseCheckBtn, "encloseCheckBtn"); GLADE_HOOKUP_OBJECT (messageWindow, lockChkBtn, "lockChkBtn"); GLADE_HOOKUP_OBJECT_NO_REF (messageWindow, tooltips, "tooltips"); return messageWindow; } GtkWidget* create_configWindow1 (void) { GtkWidget *configWindow1; GdkPixbuf *configWindow1_icon_pixbuf; GtkWidget *vbox2; GtkWidget *hbox3; GtkWidget *frame1; GtkWidget *alignment1; GtkWidget *entry2; GtkWidget *configUserFrameLabel; GtkWidget *frame2; GtkWidget *alignment2; GtkWidget *hbox12; GtkWidget *comboboxentry1; GtkWidget *configWindowAddGroupBtn; GtkWidget *configGroupFrameLabel; GtkWidget *hbox4; GtkWidget *frame3; GtkWidget *alignment3; GtkWidget *vbox3; GtkWidget *configOpenCheckChkBtn; GtkWidget *configNonPopupCheckBtn; GtkWidget *configNoSoundCheckBtn; GtkWidget *configEncloseEnableCheckBtn; GtkWidget *configCitationCheckBtn; GtkWidget *configIPV6CheckBtn; GtkWidget *configDialUpCheckBtn; GtkWidget *configIconifyCheckBtn; GtkWidget *hbox28; GtkWidget *configEncodingLabel; GtkWidget *configEncodingComboBox; GtkWidget *configOptionLabel; GtkWidget *frame4; GtkWidget *alignment4; GtkWidget *table1; GtkWidget *logFileDialogBtn; GtkWidget *alignment6; GtkWidget *hbox6; GtkWidget *image1; GtkWidget *label6; GtkWidget *entry1; GtkWidget *enableLogToggle; GtkWidget *loggingOptionFrame; GtkWidget *alignment18; GtkWidget *vbox16; GtkWidget *loginNameLoggingToggle; GtkWidget *logIPAddrToggle; GtkWidget *logLockToggle; GtkWidget *logfileSubMenuLabel; GtkWidget *configLogFileFrameLabel; GtkWidget *frame5; GtkWidget *alignment5; GtkWidget *hbox7; GtkWidget *entry3; GtkWidget *vbuttonbox1; GtkWidget *configAddBcastBtn; GtkWidget *configRemoveBcastBtn; GtkWidget *scrolledwindow3; GtkWidget *treeview4; GtkWidget *configBcastFrameLabel; GtkWidget *hbox5; GtkWidget *configApplySettingBtn; GtkWidget *configCancelBtn; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); configWindow1 = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (configWindow1), _("configuration")); gtk_window_set_resizable (GTK_WINDOW (configWindow1), FALSE); gtk_window_set_destroy_with_parent (GTK_WINDOW (configWindow1), TRUE); configWindow1_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (configWindow1_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (configWindow1), configWindow1_icon_pixbuf); gdk_pixbuf_unref (configWindow1_icon_pixbuf); } vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox2); gtk_container_add (GTK_CONTAINER (configWindow1), vbox2); hbox3 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox3); gtk_box_pack_start (GTK_BOX (vbox2), hbox3, TRUE, TRUE, 1); frame1 = gtk_frame_new (NULL); gtk_widget_show (frame1); gtk_box_pack_start (GTK_BOX (hbox3), frame1, TRUE, TRUE, 0); alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment1); gtk_container_add (GTK_CONTAINER (frame1), alignment1); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0); entry2 = gtk_entry_new (); gtk_widget_show (entry2); gtk_container_add (GTK_CONTAINER (alignment1), entry2); gtk_tooltips_set_tip (tooltips, entry2, _("Enter your nick name."), NULL); gtk_entry_set_invisible_char (GTK_ENTRY (entry2), 8226); configUserFrameLabel = gtk_label_new (_("User Name")); gtk_widget_show (configUserFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame1), configUserFrameLabel); gtk_label_set_use_markup (GTK_LABEL (configUserFrameLabel), TRUE); frame2 = gtk_frame_new (NULL); gtk_widget_show (frame2); gtk_box_pack_start (GTK_BOX (hbox3), frame2, TRUE, TRUE, 0); alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment2); gtk_container_add (GTK_CONTAINER (frame2), alignment2); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 0, 0, 12, 0); hbox12 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox12); gtk_container_add (GTK_CONTAINER (alignment2), hbox12); comboboxentry1 = gtk_combo_box_entry_new_text (); gtk_widget_show (comboboxentry1); gtk_box_pack_start (GTK_BOX (hbox12), comboboxentry1, TRUE, TRUE, 0); configWindowAddGroupBtn = gtk_button_new_with_mnemonic (_("Add")); gtk_widget_show (configWindowAddGroupBtn); gtk_box_pack_start (GTK_BOX (hbox12), configWindowAddGroupBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configWindowAddGroupBtn, _("Please push here to add your group name."), NULL); configGroupFrameLabel = gtk_label_new (_("Group Name")); gtk_widget_show (configGroupFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame2), configGroupFrameLabel); gtk_label_set_use_markup (GTK_LABEL (configGroupFrameLabel), TRUE); hbox4 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox4); gtk_box_pack_start (GTK_BOX (vbox2), hbox4, TRUE, TRUE, 0); frame3 = gtk_frame_new (NULL); gtk_widget_show (frame3); gtk_box_pack_start (GTK_BOX (hbox4), frame3, TRUE, TRUE, 0); alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment3); gtk_container_add (GTK_CONTAINER (frame3), alignment3); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment3), 0, 0, 12, 0); vbox3 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox3); gtk_container_add (GTK_CONTAINER (alignment3), vbox3); configOpenCheckChkBtn = gtk_check_button_new_with_mnemonic (_("enable open check")); gtk_widget_show (configOpenCheckChkBtn); gtk_box_pack_start (GTK_BOX (vbox3), configOpenCheckChkBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configOpenCheckChkBtn, _("Please check here to receive read notification from receiver."), NULL); configNonPopupCheckBtn = gtk_check_button_new_with_mnemonic (_("Non-popup receive")); gtk_widget_show (configNonPopupCheckBtn); gtk_box_pack_start (GTK_BOX (vbox3), configNonPopupCheckBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configNonPopupCheckBtn, _("Refrain automatic popuped receive window creation."), NULL); configNoSoundCheckBtn = gtk_check_button_new_with_mnemonic (_("No sound")); gtk_widget_show (configNoSoundCheckBtn); gtk_box_pack_start (GTK_BOX (vbox3), configNoSoundCheckBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configNoSoundCheckBtn, _("Please check here to refrain from playing sounds."), NULL); configEncloseEnableCheckBtn = gtk_check_button_new_with_mnemonic (_("check enclose message as default")); gtk_widget_show (configEncloseEnableCheckBtn); gtk_box_pack_start (GTK_BOX (vbox3), configEncloseEnableCheckBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configEncloseEnableCheckBtn, _("Please check here if you want to send sealed messages as default."), NULL); configCitationCheckBtn = gtk_check_button_new_with_mnemonic (_("check citation as default")); gtk_widget_show (configCitationCheckBtn); gtk_box_pack_start (GTK_BOX (vbox3), configCitationCheckBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configCitationCheckBtn, _("Please check here if you want to edit reply message with citation of original message."), NULL); configIPV6CheckBtn = gtk_check_button_new_with_mnemonic (_("enable IP V6 only mode (Need restart)")); gtk_widget_show (configIPV6CheckBtn); gtk_box_pack_start (GTK_BOX (vbox3), configIPV6CheckBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configIPV6CheckBtn, _("Please check here to use this software on the IP V6 environment."), NULL); configDialUpCheckBtn = gtk_check_button_new_with_mnemonic (_("enable dial up connection mode")); gtk_widget_show (configDialUpCheckBtn); gtk_box_pack_start (GTK_BOX (vbox3), configDialUpCheckBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configDialUpCheckBtn, _("Please check here to use this software on the dial up environment."), NULL); configIconifyCheckBtn = gtk_check_button_new_with_mnemonic (_("iconfy read confirmation dialog")); gtk_widget_show (configIconifyCheckBtn); gtk_box_pack_start (GTK_BOX (vbox3), configIconifyCheckBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, configIconifyCheckBtn, _("Please check here to iconify read confirmation dialog window."), NULL); hbox28 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox28); gtk_box_pack_start (GTK_BOX (vbox3), hbox28, TRUE, TRUE, 0); configEncodingLabel = gtk_label_new (_("External representation of IPMSG character code")); gtk_widget_show (configEncodingLabel); gtk_box_pack_start (GTK_BOX (hbox28), configEncodingLabel, FALSE, FALSE, 0); configEncodingComboBox = gtk_combo_box_new_text (); gtk_widget_show (configEncodingComboBox); gtk_box_pack_start (GTK_BOX (hbox28), configEncodingComboBox, TRUE, TRUE, 0); configOptionLabel = gtk_label_new (_("Options")); gtk_widget_show (configOptionLabel); gtk_frame_set_label_widget (GTK_FRAME (frame3), configOptionLabel); gtk_label_set_use_markup (GTK_LABEL (configOptionLabel), TRUE); frame4 = gtk_frame_new (NULL); gtk_widget_show (frame4); gtk_box_pack_start (GTK_BOX (hbox4), frame4, TRUE, TRUE, 0); alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment4); gtk_container_add (GTK_CONTAINER (frame4), alignment4); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 12, 0); table1 = gtk_table_new (2, 2, FALSE); gtk_widget_show (table1); gtk_container_add (GTK_CONTAINER (alignment4), table1); logFileDialogBtn = gtk_button_new (); gtk_widget_show (logFileDialogBtn); gtk_table_attach (GTK_TABLE (table1), logFileDialogBtn, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, logFileDialogBtn, _("Please push this button to choose the log-file."), NULL); alignment6 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment6); gtk_container_add (GTK_CONTAINER (logFileDialogBtn), alignment6); hbox6 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox6); gtk_container_add (GTK_CONTAINER (alignment6), hbox6); image1 = gtk_image_new_from_stock ("gtk-floppy", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image1); gtk_box_pack_start (GTK_BOX (hbox6), image1, FALSE, FALSE, 0); label6 = gtk_label_new_with_mnemonic (_("log file")); gtk_widget_show (label6); gtk_box_pack_start (GTK_BOX (hbox6), label6, FALSE, FALSE, 0); entry1 = gtk_entry_new (); gtk_widget_show (entry1); gtk_table_attach (GTK_TABLE (table1), entry1, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, entry1, _("This entry show log-file path, please edit here to specify your log-file path."), NULL); gtk_entry_set_invisible_char (GTK_ENTRY (entry1), 8226); enableLogToggle = gtk_check_button_new_with_mnemonic (_("enable logging")); gtk_widget_show (enableLogToggle); gtk_table_attach (GTK_TABLE (table1), enableLogToggle, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, enableLogToggle, _("Please check here to enable logging facility."), NULL); loggingOptionFrame = gtk_frame_new (NULL); gtk_widget_show (loggingOptionFrame); gtk_table_attach (GTK_TABLE (table1), loggingOptionFrame, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); alignment18 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment18); gtk_container_add (GTK_CONTAINER (loggingOptionFrame), alignment18); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment18), 0, 0, 12, 0); vbox16 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox16); gtk_container_add (GTK_CONTAINER (alignment18), vbox16); loginNameLoggingToggle = gtk_check_button_new_with_mnemonic (_("logging logon name")); gtk_widget_show (loginNameLoggingToggle); gtk_box_pack_start (GTK_BOX (vbox16), loginNameLoggingToggle, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (loginNameLoggingToggle), 2); gtk_tooltips_set_tip (tooltips, loginNameLoggingToggle, _("Please check here to log user's logon name into the log-file."), NULL); logIPAddrToggle = gtk_check_button_new_with_mnemonic (_("logging IP Addresses")); gtk_widget_show (logIPAddrToggle); gtk_box_pack_start (GTK_BOX (vbox16), logIPAddrToggle, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (logIPAddrToggle), 2); gtk_tooltips_set_tip (tooltips, logIPAddrToggle, _("Please check here to log user's IP addresses into the log-file."), NULL); logLockToggle = gtk_check_button_new_with_mnemonic (_("logging locked messages after opening the message.")); gtk_widget_show (logLockToggle); gtk_box_pack_start (GTK_BOX (vbox16), logLockToggle, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, logLockToggle, _("Please check here if you want to log the content of the message after the message is opened when the message is locked."), NULL); logfileSubMenuLabel = gtk_label_new (_("Logging Option")); gtk_widget_show (logfileSubMenuLabel); gtk_frame_set_label_widget (GTK_FRAME (loggingOptionFrame), logfileSubMenuLabel); gtk_label_set_use_markup (GTK_LABEL (logfileSubMenuLabel), TRUE); configLogFileFrameLabel = gtk_label_new (_("Logfile")); gtk_widget_show (configLogFileFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame4), configLogFileFrameLabel); gtk_label_set_use_markup (GTK_LABEL (configLogFileFrameLabel), TRUE); frame5 = gtk_frame_new (NULL); gtk_widget_show (frame5); gtk_box_pack_start (GTK_BOX (vbox2), frame5, TRUE, TRUE, 1); alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment5); gtk_container_add (GTK_CONTAINER (frame5), alignment5); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 0); hbox7 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox7); gtk_container_add (GTK_CONTAINER (alignment5), hbox7); entry3 = gtk_entry_new (); gtk_widget_show (entry3); gtk_box_pack_start (GTK_BOX (hbox7), entry3, TRUE, FALSE, 0); gtk_tooltips_set_tip (tooltips, entry3, _("Please input broad cast address."), NULL); gtk_entry_set_invisible_char (GTK_ENTRY (entry3), 8226); vbuttonbox1 = gtk_vbutton_box_new (); gtk_widget_show (vbuttonbox1); gtk_box_pack_start (GTK_BOX (hbox7), vbuttonbox1, TRUE, FALSE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (vbuttonbox1), GTK_BUTTONBOX_SPREAD); configAddBcastBtn = gtk_button_new_with_mnemonic (_(">>")); gtk_widget_show (configAddBcastBtn); gtk_container_add (GTK_CONTAINER (vbuttonbox1), configAddBcastBtn); GTK_WIDGET_SET_FLAGS (configAddBcastBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, configAddBcastBtn, _("Please push this button to add the broad cast address to broad cast address list."), NULL); configRemoveBcastBtn = gtk_button_new_with_mnemonic (_("<<")); gtk_widget_show (configRemoveBcastBtn); gtk_container_add (GTK_CONTAINER (vbuttonbox1), configRemoveBcastBtn); GTK_WIDGET_SET_FLAGS (configRemoveBcastBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, configRemoveBcastBtn, _("Please push this button to remove the broad cast address from broad cast address list."), NULL); scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow3); gtk_box_pack_start (GTK_BOX (hbox7), scrolledwindow3, TRUE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow3), 1); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN); treeview4 = gtk_tree_view_new (); gtk_widget_show (treeview4); gtk_container_add (GTK_CONTAINER (scrolledwindow3), treeview4); gtk_widget_set_size_request (treeview4, 200, 168); gtk_tooltips_set_tip (tooltips, treeview4, _("This list shows broad cast addresses for entry/absence status notification."), NULL); configBcastFrameLabel = gtk_label_new (_("Broadcast address setting")); gtk_widget_show (configBcastFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame5), configBcastFrameLabel); gtk_label_set_use_markup (GTK_LABEL (configBcastFrameLabel), TRUE); hbox5 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox5); gtk_box_pack_start (GTK_BOX (vbox2), hbox5, TRUE, TRUE, 0); configApplySettingBtn = gtk_button_new_from_stock ("gtk-yes"); gtk_widget_show (configApplySettingBtn); gtk_box_pack_start (GTK_BOX (hbox5), configApplySettingBtn, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, configApplySettingBtn, _("Please push this button to apply this configuration."), NULL); configCancelBtn = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (configCancelBtn); gtk_box_pack_start (GTK_BOX (hbox5), configCancelBtn, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, configCancelBtn, _("Please push this button to discard this configuration"), NULL); g_signal_connect ((gpointer) configWindow1, "destroy", G_CALLBACK (on_configWindow_destroy), NULL); g_signal_connect ((gpointer) configWindow1, "show", G_CALLBACK (on_configWindow_show), NULL); g_signal_connect ((gpointer) entry2, "activate", G_CALLBACK (on_entry2_activate), NULL); g_signal_connect ((gpointer) comboboxentry1, "editing_done", G_CALLBACK (on_comboboxentry1_editing_done), NULL); g_signal_connect ((gpointer) configWindowAddGroupBtn, "clicked", G_CALLBACK (on_configWindowAddGroupBtn_clicked), NULL); g_signal_connect ((gpointer) configOpenCheckChkBtn, "toggled", G_CALLBACK (on_configOpenCheckChkBtn_toggled), NULL); g_signal_connect ((gpointer) configNonPopupCheckBtn, "toggled", G_CALLBACK (on_configNonPopupCheckBtn_toggled), NULL); g_signal_connect ((gpointer) configNoSoundCheckBtn, "toggled", G_CALLBACK (on_configNoSoundCheckBtn_toggled), NULL); g_signal_connect ((gpointer) configEncloseEnableCheckBtn, "toggled", G_CALLBACK (on_configEncloseEnableCheckBtn_toggled), NULL); g_signal_connect ((gpointer) configCitationCheckBtn, "toggled", G_CALLBACK (on_configCitationCheckBtn_toggled), NULL); g_signal_connect ((gpointer) configIPV6CheckBtn, "toggled", G_CALLBACK (on_configIPV6CheckBtn_toggled), NULL); g_signal_connect ((gpointer) logFileDialogBtn, "pressed", G_CALLBACK (on_logFileDialogBtn_pressed), NULL); g_signal_connect ((gpointer) logFileDialogBtn, "released", G_CALLBACK (on_logFileDialogBtn_released), NULL); g_signal_connect ((gpointer) logFileDialogBtn, "clicked", G_CALLBACK (on_logFileDialogBtn_clicked), NULL); g_signal_connect ((gpointer) entry1, "editing_done", G_CALLBACK (on_entry1_editing_done), NULL); g_signal_connect ((gpointer) entry1, "activate", G_CALLBACK (on_entry1_activate), NULL); g_signal_connect ((gpointer) enableLogToggle, "toggled", G_CALLBACK (on_enableLogToggle_toggled), NULL); g_signal_connect ((gpointer) entry3, "activate", G_CALLBACK (on_entry3_activate), NULL); g_signal_connect ((gpointer) entry3, "changed", G_CALLBACK (on_entry3_changed), NULL); g_signal_connect ((gpointer) configAddBcastBtn, "clicked", G_CALLBACK (on_configAddBcastBtn_clicked), NULL); g_signal_connect ((gpointer) configRemoveBcastBtn, "pressed", G_CALLBACK (on_configRemoveBcastBtn_pressed), NULL); g_signal_connect ((gpointer) configRemoveBcastBtn, "released", G_CALLBACK (on_configRemoveBcastBtn_released), NULL); g_signal_connect ((gpointer) configRemoveBcastBtn, "clicked", G_CALLBACK (on_configRemoveBcastBtn_clicked), NULL); g_signal_connect ((gpointer) configApplySettingBtn, "clicked", G_CALLBACK (on_configApplySettingBtn_clicked), NULL); g_signal_connect ((gpointer) configApplySettingBtn, "pressed", G_CALLBACK (on_configApplySettingBtn_pressed), NULL); g_signal_connect ((gpointer) configApplySettingBtn, "released", G_CALLBACK (on_configApplySettingBtn_released), NULL); g_signal_connect ((gpointer) configCancelBtn, "pressed", G_CALLBACK (on_configCancelBtn_pressed), NULL); g_signal_connect ((gpointer) configCancelBtn, "released", G_CALLBACK (on_configCancelBtn_released), NULL); g_signal_connect ((gpointer) configCancelBtn, "clicked", G_CALLBACK (on_configCancelBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (configWindow1, configWindow1, "configWindow1"); GLADE_HOOKUP_OBJECT (configWindow1, vbox2, "vbox2"); GLADE_HOOKUP_OBJECT (configWindow1, hbox3, "hbox3"); GLADE_HOOKUP_OBJECT (configWindow1, frame1, "frame1"); GLADE_HOOKUP_OBJECT (configWindow1, alignment1, "alignment1"); GLADE_HOOKUP_OBJECT (configWindow1, entry2, "entry2"); GLADE_HOOKUP_OBJECT (configWindow1, configUserFrameLabel, "configUserFrameLabel"); GLADE_HOOKUP_OBJECT (configWindow1, frame2, "frame2"); GLADE_HOOKUP_OBJECT (configWindow1, alignment2, "alignment2"); GLADE_HOOKUP_OBJECT (configWindow1, hbox12, "hbox12"); GLADE_HOOKUP_OBJECT (configWindow1, comboboxentry1, "comboboxentry1"); GLADE_HOOKUP_OBJECT (configWindow1, configWindowAddGroupBtn, "configWindowAddGroupBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configGroupFrameLabel, "configGroupFrameLabel"); GLADE_HOOKUP_OBJECT (configWindow1, hbox4, "hbox4"); GLADE_HOOKUP_OBJECT (configWindow1, frame3, "frame3"); GLADE_HOOKUP_OBJECT (configWindow1, alignment3, "alignment3"); GLADE_HOOKUP_OBJECT (configWindow1, vbox3, "vbox3"); GLADE_HOOKUP_OBJECT (configWindow1, configOpenCheckChkBtn, "configOpenCheckChkBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configNonPopupCheckBtn, "configNonPopupCheckBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configNoSoundCheckBtn, "configNoSoundCheckBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configEncloseEnableCheckBtn, "configEncloseEnableCheckBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configCitationCheckBtn, "configCitationCheckBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configIPV6CheckBtn, "configIPV6CheckBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configDialUpCheckBtn, "configDialUpCheckBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configIconifyCheckBtn, "configIconifyCheckBtn"); GLADE_HOOKUP_OBJECT (configWindow1, hbox28, "hbox28"); GLADE_HOOKUP_OBJECT (configWindow1, configEncodingLabel, "configEncodingLabel"); GLADE_HOOKUP_OBJECT (configWindow1, configEncodingComboBox, "configEncodingComboBox"); GLADE_HOOKUP_OBJECT (configWindow1, configOptionLabel, "configOptionLabel"); GLADE_HOOKUP_OBJECT (configWindow1, frame4, "frame4"); GLADE_HOOKUP_OBJECT (configWindow1, alignment4, "alignment4"); GLADE_HOOKUP_OBJECT (configWindow1, table1, "table1"); GLADE_HOOKUP_OBJECT (configWindow1, logFileDialogBtn, "logFileDialogBtn"); GLADE_HOOKUP_OBJECT (configWindow1, alignment6, "alignment6"); GLADE_HOOKUP_OBJECT (configWindow1, hbox6, "hbox6"); GLADE_HOOKUP_OBJECT (configWindow1, image1, "image1"); GLADE_HOOKUP_OBJECT (configWindow1, label6, "label6"); GLADE_HOOKUP_OBJECT (configWindow1, entry1, "entry1"); GLADE_HOOKUP_OBJECT (configWindow1, enableLogToggle, "enableLogToggle"); GLADE_HOOKUP_OBJECT (configWindow1, loggingOptionFrame, "loggingOptionFrame"); GLADE_HOOKUP_OBJECT (configWindow1, alignment18, "alignment18"); GLADE_HOOKUP_OBJECT (configWindow1, vbox16, "vbox16"); GLADE_HOOKUP_OBJECT (configWindow1, loginNameLoggingToggle, "loginNameLoggingToggle"); GLADE_HOOKUP_OBJECT (configWindow1, logIPAddrToggle, "logIPAddrToggle"); GLADE_HOOKUP_OBJECT (configWindow1, logLockToggle, "logLockToggle"); GLADE_HOOKUP_OBJECT (configWindow1, logfileSubMenuLabel, "logfileSubMenuLabel"); GLADE_HOOKUP_OBJECT (configWindow1, configLogFileFrameLabel, "configLogFileFrameLabel"); GLADE_HOOKUP_OBJECT (configWindow1, frame5, "frame5"); GLADE_HOOKUP_OBJECT (configWindow1, alignment5, "alignment5"); GLADE_HOOKUP_OBJECT (configWindow1, hbox7, "hbox7"); GLADE_HOOKUP_OBJECT (configWindow1, entry3, "entry3"); GLADE_HOOKUP_OBJECT (configWindow1, vbuttonbox1, "vbuttonbox1"); GLADE_HOOKUP_OBJECT (configWindow1, configAddBcastBtn, "configAddBcastBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configRemoveBcastBtn, "configRemoveBcastBtn"); GLADE_HOOKUP_OBJECT (configWindow1, scrolledwindow3, "scrolledwindow3"); GLADE_HOOKUP_OBJECT (configWindow1, treeview4, "treeview4"); GLADE_HOOKUP_OBJECT (configWindow1, configBcastFrameLabel, "configBcastFrameLabel"); GLADE_HOOKUP_OBJECT (configWindow1, hbox5, "hbox5"); GLADE_HOOKUP_OBJECT (configWindow1, configApplySettingBtn, "configApplySettingBtn"); GLADE_HOOKUP_OBJECT (configWindow1, configCancelBtn, "configCancelBtn"); GLADE_HOOKUP_OBJECT_NO_REF (configWindow1, tooltips, "tooltips"); return configWindow1; } GtkWidget* create_initialWindow (void) { GtkWidget *initialWindow; GdkPixbuf *initialWindow_icon_pixbuf; GtkWidget *bonobodock2; GtkWidget *startBtn; GtkWidget *image3; GtkWidget *appbar2; initialWindow = gnome_app_new ("G2ipmsg", _("g2ipmsg")); gtk_window_set_position (GTK_WINDOW (initialWindow), GTK_WIN_POS_CENTER); initialWindow_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (initialWindow_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (initialWindow), initialWindow_icon_pixbuf); gdk_pixbuf_unref (initialWindow_icon_pixbuf); } bonobodock2 = GNOME_APP (initialWindow)->dock; gtk_widget_show (bonobodock2); startBtn = gtk_button_new (); gtk_widget_show (startBtn); gnome_app_set_contents (GNOME_APP (initialWindow), startBtn); gtk_widget_set_size_request (startBtn, 34, 34); image3 = create_pixmap (initialWindow, "g2ipmsg/ipmsg.xpm"); gtk_widget_show (image3); gtk_container_add (GTK_CONTAINER (startBtn), image3); appbar2 = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER); gtk_widget_show (appbar2); gnome_app_set_statusbar (GNOME_APP (initialWindow), appbar2); g_signal_connect ((gpointer) initialWindow, "destroy", G_CALLBACK (on_initialWindow_destroy), NULL); g_signal_connect ((gpointer) initialWindow, "show", G_CALLBACK (on_initialWindow_show), NULL); g_signal_connect ((gpointer) initialWindow, "check_resize", G_CALLBACK (on_initialWindow_check_resize), NULL); g_signal_connect ((gpointer) initialWindow, "size_allocate", G_CALLBACK (on_initialWindow_size_allocate), NULL); g_signal_connect ((gpointer) startBtn, "clicked", G_CALLBACK (on_startBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (initialWindow, initialWindow, "initialWindow"); GLADE_HOOKUP_OBJECT (initialWindow, bonobodock2, "bonobodock2"); GLADE_HOOKUP_OBJECT (initialWindow, startBtn, "startBtn"); GLADE_HOOKUP_OBJECT (initialWindow, image3, "image3"); GLADE_HOOKUP_OBJECT (initialWindow, appbar2, "appbar2"); return initialWindow; } GtkWidget* create_downloadWindow (void) { GtkWidget *downloadWindow; GdkPixbuf *downloadWindow_icon_pixbuf; GtkWidget *frame6; GtkWidget *alignment7; GtkWidget *viewport1; GtkWidget *fixed1; GtkWidget *DownLoadDirectoryEntry; GtkWidget *DownLoadDirectoryLabel; GtkWidget *DownLoadOpenBtn; GtkWidget *DownLoadOKBtn; GtkWidget *DownLoadCancelBtn; GtkWidget *scrolledwindow12; GtkWidget *DownLoadFileTree; GtkWidget *DownLoadAllCheckBtn; GtkWidget *downloadManagerFrameLabel; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); downloadWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request (downloadWindow, 733, 395); gtk_window_set_title (GTK_WINDOW (downloadWindow), _("DownLoad")); gtk_window_set_resizable (GTK_WINDOW (downloadWindow), FALSE); gtk_window_set_destroy_with_parent (GTK_WINDOW (downloadWindow), TRUE); downloadWindow_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (downloadWindow_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (downloadWindow), downloadWindow_icon_pixbuf); gdk_pixbuf_unref (downloadWindow_icon_pixbuf); } frame6 = gtk_frame_new (NULL); gtk_widget_show (frame6); gtk_container_add (GTK_CONTAINER (downloadWindow), frame6); gtk_frame_set_shadow_type (GTK_FRAME (frame6), GTK_SHADOW_NONE); alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment7); gtk_container_add (GTK_CONTAINER (frame6), alignment7); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 12, 0); viewport1 = gtk_viewport_new (NULL, NULL); gtk_widget_show (viewport1); gtk_container_add (GTK_CONTAINER (alignment7), viewport1); fixed1 = gtk_fixed_new (); gtk_widget_show (fixed1); gtk_container_add (GTK_CONTAINER (viewport1), fixed1); DownLoadDirectoryEntry = gtk_entry_new (); gtk_widget_show (DownLoadDirectoryEntry); gtk_fixed_put (GTK_FIXED (fixed1), DownLoadDirectoryEntry, 136, 320); gtk_widget_set_size_request (DownLoadDirectoryEntry, 288, 40); gtk_tooltips_set_tip (tooltips, DownLoadDirectoryEntry, _("This entry show where files are stored."), NULL); gtk_entry_set_invisible_char (GTK_ENTRY (DownLoadDirectoryEntry), 8226); DownLoadDirectoryLabel = gtk_label_new (_("Down load directory")); gtk_widget_show (DownLoadDirectoryLabel); gtk_fixed_put (GTK_FIXED (fixed1), DownLoadDirectoryLabel, 8, 288); gtk_widget_set_size_request (DownLoadDirectoryLabel, 232, 32); DownLoadOpenBtn = gtk_button_new_from_stock ("gtk-open"); gtk_widget_show (DownLoadOpenBtn); gtk_fixed_put (GTK_FIXED (fixed1), DownLoadOpenBtn, 32, 320); gtk_widget_set_size_request (DownLoadOpenBtn, 96, 40); gtk_tooltips_set_tip (tooltips, DownLoadOpenBtn, _("Please push this button to choose download directory."), NULL); DownLoadOKBtn = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (DownLoadOKBtn); gtk_fixed_put (GTK_FIXED (fixed1), DownLoadOKBtn, 448, 320); gtk_widget_set_size_request (DownLoadOKBtn, 104, 40); gtk_tooltips_set_tip (tooltips, DownLoadOKBtn, _("Please push this button to start downloads."), NULL); DownLoadCancelBtn = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (DownLoadCancelBtn); gtk_fixed_put (GTK_FIXED (fixed1), DownLoadCancelBtn, 560, 320); gtk_widget_set_size_request (DownLoadCancelBtn, 144, 40); gtk_tooltips_set_tip (tooltips, DownLoadCancelBtn, _("Please push this button to discard download files."), NULL); scrolledwindow12 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow12); gtk_fixed_put (GTK_FIXED (fixed1), scrolledwindow12, 0, 0); gtk_widget_set_size_request (scrolledwindow12, 712, 248); DownLoadFileTree = gtk_tree_view_new (); gtk_widget_show (DownLoadFileTree); gtk_container_add (GTK_CONTAINER (scrolledwindow12), DownLoadFileTree); gtk_widget_set_size_request (DownLoadFileTree, 680, 256); gtk_tooltips_set_tip (tooltips, DownLoadFileTree, _("Please select files to be saved."), NULL); DownLoadAllCheckBtn = gtk_check_button_new_with_mnemonic (_("down load all at once")); gtk_widget_show (DownLoadAllCheckBtn); gtk_fixed_put (GTK_FIXED (fixed1), DownLoadAllCheckBtn, 8, 264); gtk_widget_set_size_request (DownLoadAllCheckBtn, 216, 24); gtk_tooltips_set_tip (tooltips, DownLoadAllCheckBtn, _("Please check here if you want to download all of selected files at once."), NULL); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (DownLoadAllCheckBtn), TRUE); downloadManagerFrameLabel = gtk_label_new (_("DownLoad files")); gtk_widget_show (downloadManagerFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame6), downloadManagerFrameLabel); gtk_label_set_use_markup (GTK_LABEL (downloadManagerFrameLabel), TRUE); g_signal_connect ((gpointer) downloadWindow, "destroy", G_CALLBACK (on_downloadWindow_destroy), NULL); g_signal_connect ((gpointer) downloadWindow, "check_resize", G_CALLBACK (on_downloadWindow_check_resize), NULL); g_signal_connect ((gpointer) downloadWindow, "size_allocate", G_CALLBACK (on_downloadWindow_size_allocate), NULL); g_signal_connect ((gpointer) DownLoadOpenBtn, "clicked", G_CALLBACK (on_DownLoadOpenBtn_clicked), NULL); g_signal_connect ((gpointer) DownLoadOKBtn, "clicked", G_CALLBACK (on_DownLoadOKBtn_clicked), NULL); g_signal_connect ((gpointer) DownLoadCancelBtn, "clicked", G_CALLBACK (on_DownLoadCancelBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (downloadWindow, downloadWindow, "downloadWindow"); GLADE_HOOKUP_OBJECT (downloadWindow, frame6, "frame6"); GLADE_HOOKUP_OBJECT (downloadWindow, alignment7, "alignment7"); GLADE_HOOKUP_OBJECT (downloadWindow, viewport1, "viewport1"); GLADE_HOOKUP_OBJECT (downloadWindow, fixed1, "fixed1"); GLADE_HOOKUP_OBJECT (downloadWindow, DownLoadDirectoryEntry, "DownLoadDirectoryEntry"); GLADE_HOOKUP_OBJECT (downloadWindow, DownLoadDirectoryLabel, "DownLoadDirectoryLabel"); GLADE_HOOKUP_OBJECT (downloadWindow, DownLoadOpenBtn, "DownLoadOpenBtn"); GLADE_HOOKUP_OBJECT (downloadWindow, DownLoadOKBtn, "DownLoadOKBtn"); GLADE_HOOKUP_OBJECT (downloadWindow, DownLoadCancelBtn, "DownLoadCancelBtn"); GLADE_HOOKUP_OBJECT (downloadWindow, scrolledwindow12, "scrolledwindow12"); GLADE_HOOKUP_OBJECT (downloadWindow, DownLoadFileTree, "DownLoadFileTree"); GLADE_HOOKUP_OBJECT (downloadWindow, DownLoadAllCheckBtn, "DownLoadAllCheckBtn"); GLADE_HOOKUP_OBJECT (downloadWindow, downloadManagerFrameLabel, "downloadManagerFrameLabel"); GLADE_HOOKUP_OBJECT_NO_REF (downloadWindow, tooltips, "tooltips"); return downloadWindow; } GtkWidget* create_downloadDialog (void) { GtkWidget *downloadDialog; GdkPixbuf *downloadDialog_icon_pixbuf; GtkWidget *dialog_vbox1; GtkWidget *scrolledwindow5; GtkWidget *treeview2; GtkWidget *dialog_action_area1; GtkWidget *downloadDialogSaveBtn; GtkWidget *downloadDialogCloseBtn; downloadDialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (downloadDialog), _("download dialog")); gtk_window_set_modal (GTK_WINDOW (downloadDialog), TRUE); downloadDialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (downloadDialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (downloadDialog), downloadDialog_icon_pixbuf); gdk_pixbuf_unref (downloadDialog_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (downloadDialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox1 = GTK_DIALOG (downloadDialog)->vbox; gtk_widget_show (dialog_vbox1); scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow5); gtk_box_pack_start (GTK_BOX (dialog_vbox1), scrolledwindow5, TRUE, TRUE, 0); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN); treeview2 = gtk_tree_view_new (); gtk_widget_show (treeview2); gtk_container_add (GTK_CONTAINER (scrolledwindow5), treeview2); dialog_action_area1 = GTK_DIALOG (downloadDialog)->action_area; gtk_widget_show (dialog_action_area1); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END); downloadDialogSaveBtn = gtk_button_new_from_stock ("gtk-save"); gtk_widget_show (downloadDialogSaveBtn); gtk_dialog_add_action_widget (GTK_DIALOG (downloadDialog), downloadDialogSaveBtn, 0); GTK_WIDGET_SET_FLAGS (downloadDialogSaveBtn, GTK_CAN_DEFAULT); downloadDialogCloseBtn = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (downloadDialogCloseBtn); gtk_dialog_add_action_widget (GTK_DIALOG (downloadDialog), downloadDialogCloseBtn, GTK_RESPONSE_CLOSE); GTK_WIDGET_SET_FLAGS (downloadDialogCloseBtn, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (downloadDialog, downloadDialog, "downloadDialog"); GLADE_HOOKUP_OBJECT_NO_REF (downloadDialog, dialog_vbox1, "dialog_vbox1"); GLADE_HOOKUP_OBJECT (downloadDialog, scrolledwindow5, "scrolledwindow5"); GLADE_HOOKUP_OBJECT (downloadDialog, treeview2, "treeview2"); GLADE_HOOKUP_OBJECT_NO_REF (downloadDialog, dialog_action_area1, "dialog_action_area1"); GLADE_HOOKUP_OBJECT (downloadDialog, downloadDialogSaveBtn, "downloadDialogSaveBtn"); GLADE_HOOKUP_OBJECT (downloadDialog, downloadDialogCloseBtn, "downloadDialogCloseBtn"); return downloadDialog; } GtkWidget* create_downloadfilechooserdialog (void) { GtkWidget *downloadfilechooserdialog; GdkPixbuf *downloadfilechooserdialog_icon_pixbuf; GtkWidget *dialog_vbox2; GtkWidget *dialog_action_area2; GtkWidget *button3; GtkWidget *button4; downloadfilechooserdialog = gtk_file_chooser_dialog_new (_("save down loaded file"), NULL, GTK_FILE_CHOOSER_ACTION_SAVE, NULL); gtk_container_set_border_width (GTK_CONTAINER (downloadfilechooserdialog), 5); gtk_window_set_modal (GTK_WINDOW (downloadfilechooserdialog), TRUE); downloadfilechooserdialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (downloadfilechooserdialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (downloadfilechooserdialog), downloadfilechooserdialog_icon_pixbuf); gdk_pixbuf_unref (downloadfilechooserdialog_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (downloadfilechooserdialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox2 = GTK_DIALOG (downloadfilechooserdialog)->vbox; gtk_widget_show (dialog_vbox2); dialog_action_area2 = GTK_DIALOG (downloadfilechooserdialog)->action_area; gtk_widget_show (dialog_action_area2); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END); button3 = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (button3); gtk_dialog_add_action_widget (GTK_DIALOG (downloadfilechooserdialog), button3, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT); button4 = gtk_button_new_from_stock ("gtk-open"); gtk_widget_show (button4); gtk_dialog_add_action_widget (GTK_DIALOG (downloadfilechooserdialog), button4, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) downloadfilechooserdialog, "destroy", G_CALLBACK (on_downloadfilechooserdialog_destroy), NULL); g_signal_connect ((gpointer) downloadfilechooserdialog, "confirm_overwrite", G_CALLBACK (on_downloadfilechooserdialog_confirm_overwrite), NULL); g_signal_connect ((gpointer) downloadfilechooserdialog, "current_folder_changed", G_CALLBACK (on_downloadfilechooserdialog_current_folder_changed), NULL); g_signal_connect ((gpointer) downloadfilechooserdialog, "file_activated", G_CALLBACK (on_downloadfilechooserdialog_file_activated), NULL); g_signal_connect ((gpointer) downloadfilechooserdialog, "update_preview", G_CALLBACK (on_downloadfilechooserdialog_update_preview), NULL); g_signal_connect ((gpointer) downloadfilechooserdialog, "close", G_CALLBACK (on_downloadfilechooserdialog_close), NULL); g_signal_connect ((gpointer) downloadfilechooserdialog, "response", G_CALLBACK (on_downloadfilechooserdialog_response), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (downloadfilechooserdialog, downloadfilechooserdialog, "downloadfilechooserdialog"); GLADE_HOOKUP_OBJECT_NO_REF (downloadfilechooserdialog, dialog_vbox2, "dialog_vbox2"); GLADE_HOOKUP_OBJECT_NO_REF (downloadfilechooserdialog, dialog_action_area2, "dialog_action_area2"); GLADE_HOOKUP_OBJECT (downloadfilechooserdialog, button3, "button3"); GLADE_HOOKUP_OBJECT (downloadfilechooserdialog, button4, "button4"); gtk_widget_grab_default (button4); return downloadfilechooserdialog; } GtkWidget* create_logfileChooserdialog (void) { GtkWidget *logfileChooserdialog; GdkPixbuf *logfileChooserdialog_icon_pixbuf; GtkWidget *dialog_vbox3; GtkWidget *dialog_action_area3; GtkWidget *button5; GtkWidget *button6; logfileChooserdialog = gtk_file_chooser_dialog_new (_("LogFile"), NULL, GTK_FILE_CHOOSER_ACTION_SAVE, NULL); gtk_container_set_border_width (GTK_CONTAINER (logfileChooserdialog), 5); gtk_window_set_destroy_with_parent (GTK_WINDOW (logfileChooserdialog), TRUE); logfileChooserdialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (logfileChooserdialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (logfileChooserdialog), logfileChooserdialog_icon_pixbuf); gdk_pixbuf_unref (logfileChooserdialog_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (logfileChooserdialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox3 = GTK_DIALOG (logfileChooserdialog)->vbox; gtk_widget_show (dialog_vbox3); dialog_action_area3 = GTK_DIALOG (logfileChooserdialog)->action_area; gtk_widget_show (dialog_action_area3); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END); button5 = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (button5); gtk_dialog_add_action_widget (GTK_DIALOG (logfileChooserdialog), button5, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (button5, GTK_CAN_DEFAULT); button6 = gtk_button_new_from_stock ("gtk-open"); gtk_widget_show (button6); gtk_dialog_add_action_widget (GTK_DIALOG (logfileChooserdialog), button6, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (button6, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (logfileChooserdialog, logfileChooserdialog, "logfileChooserdialog"); GLADE_HOOKUP_OBJECT_NO_REF (logfileChooserdialog, dialog_vbox3, "dialog_vbox3"); GLADE_HOOKUP_OBJECT_NO_REF (logfileChooserdialog, dialog_action_area3, "dialog_action_area3"); GLADE_HOOKUP_OBJECT (logfileChooserdialog, button5, "button5"); GLADE_HOOKUP_OBJECT (logfileChooserdialog, button6, "button6"); gtk_widget_grab_default (button6); return logfileChooserdialog; } GtkWidget* create_aboutdialog (void) { GtkWidget *aboutdialog; const gchar *authors[] = { "Takeharu KATO", NULL }; /* TRANSLATORS: Replace this string with your names, one name per line. */ gchar *translators = "ZC Miao\n"; GdkPixbuf *aboutdialog_logo_pixbuf; aboutdialog = gtk_about_dialog_new (); gtk_container_set_border_width (GTK_CONTAINER (aboutdialog), 1); gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (aboutdialog), VERSION); gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (aboutdialog), _("G2ipmsg")); gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (aboutdialog), _("Takeharu KATO")); gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (aboutdialog), _("Copyright (c) 2008, Takeharu KATO\nAll rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n \n THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n SUCH DAMAGE.")); gtk_about_dialog_set_wrap_license (GTK_ABOUT_DIALOG (aboutdialog), TRUE); gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (aboutdialog), authors); gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (aboutdialog), translators); aboutdialog_logo_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); gtk_about_dialog_set_logo (GTK_ABOUT_DIALOG (aboutdialog), aboutdialog_logo_pixbuf); g_signal_connect ((gpointer) aboutdialog, "destroy", G_CALLBACK (on_aboutdialog_destroy), NULL); g_signal_connect ((gpointer) aboutdialog, "close", G_CALLBACK (on_aboutdialog_close), NULL); g_signal_connect ((gpointer) aboutdialog, "response", G_CALLBACK (on_aboutdialog_response), NULL); g_signal_connect ((gpointer) aboutdialog, "check_resize", G_CALLBACK (on_aboutdialog_check_resize), NULL); g_signal_connect ((gpointer) aboutdialog, "size_allocate", G_CALLBACK (on_aboutdialog_size_allocate), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (aboutdialog, aboutdialog, "aboutdialog"); return aboutdialog; } GtkWidget* create_readNotifyDialog (void) { GtkWidget *readNotifyDialog; GdkPixbuf *readNotifyDialog_icon_pixbuf; GtkWidget *dialog_vbox4; GtkWidget *vbox4; GtkWidget *readNotifyTitleLabel; GtkWidget *readNotifyDialogUserGroupLabel; GtkWidget *readNotifyLogonIPAddrLabel; GtkWidget *dialog_action_area4; GtkWidget *readNotifyDialogOKBtn; readNotifyDialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (readNotifyDialog), _("Read Message")); gtk_window_set_destroy_with_parent (GTK_WINDOW (readNotifyDialog), TRUE); readNotifyDialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (readNotifyDialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (readNotifyDialog), readNotifyDialog_icon_pixbuf); gdk_pixbuf_unref (readNotifyDialog_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (readNotifyDialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox4 = GTK_DIALOG (readNotifyDialog)->vbox; gtk_widget_show (dialog_vbox4); vbox4 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox4); gtk_box_pack_start (GTK_BOX (dialog_vbox4), vbox4, TRUE, TRUE, 0); readNotifyTitleLabel = gtk_label_new (_("Read Message")); gtk_widget_show (readNotifyTitleLabel); gtk_box_pack_start (GTK_BOX (vbox4), readNotifyTitleLabel, TRUE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (readNotifyTitleLabel), GTK_JUSTIFY_CENTER); readNotifyDialogUserGroupLabel = gtk_label_new (""); gtk_widget_show (readNotifyDialogUserGroupLabel); gtk_box_pack_start (GTK_BOX (vbox4), readNotifyDialogUserGroupLabel, TRUE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (readNotifyDialogUserGroupLabel), GTK_JUSTIFY_CENTER); gtk_label_set_line_wrap (GTK_LABEL (readNotifyDialogUserGroupLabel), TRUE); readNotifyLogonIPAddrLabel = gtk_label_new (""); gtk_widget_show (readNotifyLogonIPAddrLabel); gtk_box_pack_start (GTK_BOX (vbox4), readNotifyLogonIPAddrLabel, TRUE, TRUE, 0); gtk_label_set_justify (GTK_LABEL (readNotifyLogonIPAddrLabel), GTK_JUSTIFY_CENTER); gtk_label_set_line_wrap (GTK_LABEL (readNotifyLogonIPAddrLabel), TRUE); dialog_action_area4 = GTK_DIALOG (readNotifyDialog)->action_area; gtk_widget_show (dialog_action_area4); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_END); readNotifyDialogOKBtn = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (readNotifyDialogOKBtn); gtk_dialog_add_action_widget (GTK_DIALOG (readNotifyDialog), readNotifyDialogOKBtn, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (readNotifyDialogOKBtn, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) readNotifyDialog, "close", G_CALLBACK (on_readNotifyDialog_close), NULL); g_signal_connect ((gpointer) readNotifyDialog, "response", G_CALLBACK (on_readNotifyDialog_response), NULL); g_signal_connect ((gpointer) readNotifyDialog, "destroy", G_CALLBACK (on_readNotifyDialog_destroy), NULL); g_signal_connect ((gpointer) readNotifyDialog, "window_state_event", G_CALLBACK (on_readNotifyDialog_window_state_event), NULL); g_signal_connect ((gpointer) readNotifyDialogOKBtn, "pressed", G_CALLBACK (on_readNotifyDialogOKBtn_pressed), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (readNotifyDialog, readNotifyDialog, "readNotifyDialog"); GLADE_HOOKUP_OBJECT_NO_REF (readNotifyDialog, dialog_vbox4, "dialog_vbox4"); GLADE_HOOKUP_OBJECT (readNotifyDialog, vbox4, "vbox4"); GLADE_HOOKUP_OBJECT (readNotifyDialog, readNotifyTitleLabel, "readNotifyTitleLabel"); GLADE_HOOKUP_OBJECT (readNotifyDialog, readNotifyDialogUserGroupLabel, "readNotifyDialogUserGroupLabel"); GLADE_HOOKUP_OBJECT (readNotifyDialog, readNotifyLogonIPAddrLabel, "readNotifyLogonIPAddrLabel"); GLADE_HOOKUP_OBJECT_NO_REF (readNotifyDialog, dialog_action_area4, "dialog_action_area4"); GLADE_HOOKUP_OBJECT (readNotifyDialog, readNotifyDialogOKBtn, "readNotifyDialogOKBtn"); return readNotifyDialog; } GtkWidget* create_viewWindow (void) { GtkWidget *viewWindow; GdkPixbuf *viewWindow_icon_pixbuf; GtkWidget *vbox5; GtkWidget *frame7; GtkWidget *alignment8; GtkWidget *vbox6; GtkWidget *viewwindowUserInfoLabel; GtkWidget *viewwindowDateLabel; GtkWidget *viewwindowFrameLabel; GtkWidget *scrolledwindow6; GtkWidget *viewwindowTextView; GtkWidget *hbox10; GtkWidget *viewwindowCloseBtn; GtkWidget *viewwindowReplyBtn; GtkWidget *alignment9; GtkWidget *hbox11; GtkWidget *image9; GtkWidget *label10; GtkWidget *viewWinOptionHbox; GtkWidget *viewwindowCitationCheck; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); viewWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (viewWindow), _("Receive message")); viewWindow_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (viewWindow_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (viewWindow), viewWindow_icon_pixbuf); gdk_pixbuf_unref (viewWindow_icon_pixbuf); } vbox5 = gtk_vbox_new (FALSE, 2); gtk_widget_show (vbox5); gtk_container_add (GTK_CONTAINER (viewWindow), vbox5); frame7 = gtk_frame_new (NULL); gtk_widget_show (frame7); gtk_box_pack_start (GTK_BOX (vbox5), frame7, FALSE, FALSE, 0); alignment8 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment8); gtk_container_add (GTK_CONTAINER (frame7), alignment8); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment8), 0, 0, 12, 0); vbox6 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox6); gtk_container_add (GTK_CONTAINER (alignment8), vbox6); viewwindowUserInfoLabel = gtk_label_new (""); gtk_widget_show (viewwindowUserInfoLabel); gtk_box_pack_start (GTK_BOX (vbox6), viewwindowUserInfoLabel, TRUE, TRUE, 0); gtk_widget_set_size_request (viewwindowUserInfoLabel, -1, 35); viewwindowDateLabel = gtk_label_new (""); gtk_widget_show (viewwindowDateLabel); gtk_box_pack_start (GTK_BOX (vbox6), viewwindowDateLabel, TRUE, TRUE, 0); gtk_widget_set_size_request (viewwindowDateLabel, -1, 25); viewwindowFrameLabel = gtk_label_new (_("Message from ...")); gtk_widget_show (viewwindowFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame7), viewwindowFrameLabel); gtk_label_set_use_markup (GTK_LABEL (viewwindowFrameLabel), TRUE); scrolledwindow6 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow6); gtk_box_pack_start (GTK_BOX (vbox5), scrolledwindow6, TRUE, TRUE, 0); gtk_widget_set_size_request (scrolledwindow6, 340, 200); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow6), GTK_SHADOW_IN); viewwindowTextView = gtk_text_view_new (); gtk_widget_show (viewwindowTextView); gtk_container_add (GTK_CONTAINER (scrolledwindow6), viewwindowTextView); gtk_text_view_set_editable (GTK_TEXT_VIEW (viewwindowTextView), FALSE); gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (viewwindowTextView), FALSE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (viewwindowTextView), GTK_WRAP_CHAR); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (viewwindowTextView), FALSE); hbox10 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox10); gtk_box_pack_start (GTK_BOX (vbox5), hbox10, FALSE, FALSE, 0); gtk_widget_set_size_request (hbox10, -1, 50); viewwindowCloseBtn = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (viewwindowCloseBtn); gtk_box_pack_start (GTK_BOX (hbox10), viewwindowCloseBtn, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, viewwindowCloseBtn, _("Please push this button to close this window."), NULL); viewwindowReplyBtn = gtk_button_new (); gtk_widget_show (viewwindowReplyBtn); gtk_box_pack_start (GTK_BOX (hbox10), viewwindowReplyBtn, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, viewwindowReplyBtn, _("Please push this button to reply."), NULL); alignment9 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment9); gtk_container_add (GTK_CONTAINER (viewwindowReplyBtn), alignment9); hbox11 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox11); gtk_container_add (GTK_CONTAINER (alignment9), hbox11); image9 = gtk_image_new_from_stock ("gnome-stock-book-open", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image9); gtk_box_pack_start (GTK_BOX (hbox11), image9, FALSE, FALSE, 0); label10 = gtk_label_new_with_mnemonic (_("Reply")); gtk_widget_show (label10); gtk_box_pack_start (GTK_BOX (hbox11), label10, FALSE, FALSE, 0); viewWinOptionHbox = gtk_hbox_new (TRUE, 0); gtk_widget_show (viewWinOptionHbox); gtk_box_pack_start (GTK_BOX (hbox10), viewWinOptionHbox, FALSE, TRUE, 0); viewwindowCitationCheck = gtk_check_button_new_with_mnemonic (_("Cite")); gtk_widget_show (viewwindowCitationCheck); gtk_box_pack_start (GTK_BOX (viewWinOptionHbox), viewwindowCitationCheck, TRUE, FALSE, 0); gtk_tooltips_set_tip (tooltips, viewwindowCitationCheck, _("Please check here to cite original message to reply."), NULL); g_signal_connect ((gpointer) viewWindow, "destroy", G_CALLBACK (on_viewWindow_destroy), NULL); g_signal_connect ((gpointer) viewWindow, "show", G_CALLBACK (on_viewWindow_show), NULL); g_signal_connect ((gpointer) viewWindow, "check_resize", G_CALLBACK (on_viewWindow_check_resize), NULL); g_signal_connect ((gpointer) viewWindow, "size_allocate", G_CALLBACK (on_viewWindow_size_allocate), NULL); g_signal_connect ((gpointer) viewwindowTextView, "button_press_event", G_CALLBACK (on_viewwindowTextView_button_press_event), NULL); g_signal_connect ((gpointer) viewwindowCloseBtn, "clicked", G_CALLBACK (on_viewwindowCloseBtn_clicked), NULL); g_signal_connect ((gpointer) viewwindowReplyBtn, "clicked", G_CALLBACK (on_viewwindowReplyBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (viewWindow, viewWindow, "viewWindow"); GLADE_HOOKUP_OBJECT (viewWindow, vbox5, "vbox5"); GLADE_HOOKUP_OBJECT (viewWindow, frame7, "frame7"); GLADE_HOOKUP_OBJECT (viewWindow, alignment8, "alignment8"); GLADE_HOOKUP_OBJECT (viewWindow, vbox6, "vbox6"); GLADE_HOOKUP_OBJECT (viewWindow, viewwindowUserInfoLabel, "viewwindowUserInfoLabel"); GLADE_HOOKUP_OBJECT (viewWindow, viewwindowDateLabel, "viewwindowDateLabel"); GLADE_HOOKUP_OBJECT (viewWindow, viewwindowFrameLabel, "viewwindowFrameLabel"); GLADE_HOOKUP_OBJECT (viewWindow, scrolledwindow6, "scrolledwindow6"); GLADE_HOOKUP_OBJECT (viewWindow, viewwindowTextView, "viewwindowTextView"); GLADE_HOOKUP_OBJECT (viewWindow, hbox10, "hbox10"); GLADE_HOOKUP_OBJECT (viewWindow, viewwindowCloseBtn, "viewwindowCloseBtn"); GLADE_HOOKUP_OBJECT (viewWindow, viewwindowReplyBtn, "viewwindowReplyBtn"); GLADE_HOOKUP_OBJECT (viewWindow, alignment9, "alignment9"); GLADE_HOOKUP_OBJECT (viewWindow, hbox11, "hbox11"); GLADE_HOOKUP_OBJECT (viewWindow, image9, "image9"); GLADE_HOOKUP_OBJECT (viewWindow, label10, "label10"); GLADE_HOOKUP_OBJECT (viewWindow, viewWinOptionHbox, "viewWinOptionHbox"); GLADE_HOOKUP_OBJECT (viewWindow, viewwindowCitationCheck, "viewwindowCitationCheck"); GLADE_HOOKUP_OBJECT_NO_REF (viewWindow, tooltips, "tooltips"); return viewWindow; } GtkWidget* create_sendFailDialog (void) { GtkWidget *sendFailDialog; GdkPixbuf *sendFailDialog_icon_pixbuf; GtkWidget *dialog_vbox5; GtkWidget *vbox7; GtkWidget *SendFailDialogNotifyLabel; GtkWidget *SendFailDialogUserLabel; GtkWidget *SendFailDialogConfirmLabel; GtkWidget *dialog_action_area5; GtkWidget *cancelbutton1; GtkWidget *okbutton1; sendFailDialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (sendFailDialog), _("SendFail")); gtk_window_set_destroy_with_parent (GTK_WINDOW (sendFailDialog), TRUE); sendFailDialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (sendFailDialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (sendFailDialog), sendFailDialog_icon_pixbuf); gdk_pixbuf_unref (sendFailDialog_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (sendFailDialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox5 = GTK_DIALOG (sendFailDialog)->vbox; gtk_widget_show (dialog_vbox5); vbox7 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox7); gtk_box_pack_start (GTK_BOX (dialog_vbox5), vbox7, TRUE, TRUE, 0); SendFailDialogNotifyLabel = gtk_label_new (_("Can not send message")); gtk_widget_show (SendFailDialogNotifyLabel); gtk_box_pack_start (GTK_BOX (vbox7), SendFailDialogNotifyLabel, TRUE, TRUE, 0); SendFailDialogUserLabel = gtk_label_new (""); gtk_widget_show (SendFailDialogUserLabel); gtk_box_pack_start (GTK_BOX (vbox7), SendFailDialogUserLabel, TRUE, TRUE, 0); SendFailDialogConfirmLabel = gtk_label_new (_("Retry?")); gtk_widget_show (SendFailDialogConfirmLabel); gtk_box_pack_start (GTK_BOX (vbox7), SendFailDialogConfirmLabel, TRUE, TRUE, 0); dialog_action_area5 = GTK_DIALOG (sendFailDialog)->action_area; gtk_widget_show (dialog_action_area5); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area5), GTK_BUTTONBOX_END); cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (cancelbutton1); gtk_dialog_add_action_widget (GTK_DIALOG (sendFailDialog), cancelbutton1, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton1, GTK_CAN_DEFAULT); okbutton1 = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (okbutton1); gtk_dialog_add_action_widget (GTK_DIALOG (sendFailDialog), okbutton1, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton1, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) sendFailDialog, "show", G_CALLBACK (on_sendFailDialog_show), NULL); g_signal_connect ((gpointer) sendFailDialog, "destroy", G_CALLBACK (on_sendFailDialog_destroy), NULL); g_signal_connect ((gpointer) sendFailDialog, "response", G_CALLBACK (on_sendFailDialog_response), NULL); g_signal_connect ((gpointer) sendFailDialog, "close", G_CALLBACK (on_sendFailDialog_close), NULL); g_signal_connect ((gpointer) cancelbutton1, "clicked", G_CALLBACK (on_cancelbutton1_clicked), NULL); g_signal_connect ((gpointer) okbutton1, "clicked", G_CALLBACK (on_okbutton1_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (sendFailDialog, sendFailDialog, "sendFailDialog"); GLADE_HOOKUP_OBJECT_NO_REF (sendFailDialog, dialog_vbox5, "dialog_vbox5"); GLADE_HOOKUP_OBJECT (sendFailDialog, vbox7, "vbox7"); GLADE_HOOKUP_OBJECT (sendFailDialog, SendFailDialogNotifyLabel, "SendFailDialogNotifyLabel"); GLADE_HOOKUP_OBJECT (sendFailDialog, SendFailDialogUserLabel, "SendFailDialogUserLabel"); GLADE_HOOKUP_OBJECT (sendFailDialog, SendFailDialogConfirmLabel, "SendFailDialogConfirmLabel"); GLADE_HOOKUP_OBJECT_NO_REF (sendFailDialog, dialog_action_area5, "dialog_action_area5"); GLADE_HOOKUP_OBJECT (sendFailDialog, cancelbutton1, "cancelbutton1"); GLADE_HOOKUP_OBJECT (sendFailDialog, okbutton1, "okbutton1"); return sendFailDialog; } GtkWidget* create_attachFileEditor (void) { GtkWidget *attachFileEditor; GdkPixbuf *attachFileEditor_icon_pixbuf; GtkWidget *attachFileEditorMainFrame; GtkWidget *alignment10; GtkWidget *hbox14; GtkWidget *frame9; GtkWidget *alignment11; GtkWidget *table2; GtkWidget *AttachFileFileChooseBtn; GtkWidget *AttachNullLabelRightTop; GtkWidget *attachNullLabelLeftTop; GtkWidget *attachNullLabelLeftBottom; GtkWidget *attachNullLabelRightBottom; GtkWidget *AttachFilePathEntry; GtkWidget *AttachSelectFileFrame; GtkWidget *vbuttonbox2; GtkWidget *AttachFIleAddBtn; GtkWidget *AttachFileRemoveBtn; GtkWidget *frame10; GtkWidget *alignment12; GtkWidget *attachedViewWindow; GtkWidget *attachedFilesView; GtkWidget *AttachFileListFrame; GtkWidget *attachFileEditorMainFrameLabel; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); attachFileEditor = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (attachFileEditor), _("Edit Attachments")); attachFileEditor_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (attachFileEditor_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (attachFileEditor), attachFileEditor_icon_pixbuf); gdk_pixbuf_unref (attachFileEditor_icon_pixbuf); } attachFileEditorMainFrame = gtk_frame_new (NULL); gtk_widget_show (attachFileEditorMainFrame); gtk_container_add (GTK_CONTAINER (attachFileEditor), attachFileEditorMainFrame); alignment10 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment10); gtk_container_add (GTK_CONTAINER (attachFileEditorMainFrame), alignment10); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment10), 0, 0, 12, 0); hbox14 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox14); gtk_container_add (GTK_CONTAINER (alignment10), hbox14); frame9 = gtk_frame_new (NULL); gtk_widget_show (frame9); gtk_box_pack_start (GTK_BOX (hbox14), frame9, FALSE, FALSE, 0); alignment11 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment11); gtk_container_add (GTK_CONTAINER (frame9), alignment11); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment11), 0, 0, 12, 0); table2 = gtk_table_new (3, 2, FALSE); gtk_widget_show (table2); gtk_container_add (GTK_CONTAINER (alignment11), table2); gtk_table_set_col_spacings (GTK_TABLE (table2), 2); AttachFileFileChooseBtn = gtk_button_new_from_stock ("gtk-open"); gtk_widget_show (AttachFileFileChooseBtn); gtk_table_attach (GTK_TABLE (table2), AttachFileFileChooseBtn, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 28); gtk_tooltips_set_tip (tooltips, AttachFileFileChooseBtn, _("Please push here to choose an attachment file."), NULL); AttachNullLabelRightTop = gtk_label_new (""); gtk_widget_show (AttachNullLabelRightTop); gtk_table_attach (GTK_TABLE (table2), AttachNullLabelRightTop, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_misc_set_alignment (GTK_MISC (AttachNullLabelRightTop), 0, 0.5); attachNullLabelLeftTop = gtk_label_new (""); gtk_widget_show (attachNullLabelLeftTop); gtk_table_attach (GTK_TABLE (table2), attachNullLabelLeftTop, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_misc_set_alignment (GTK_MISC (attachNullLabelLeftTop), 0, 0.5); attachNullLabelLeftBottom = gtk_label_new (""); gtk_widget_show (attachNullLabelLeftBottom); gtk_table_attach (GTK_TABLE (table2), attachNullLabelLeftBottom, 0, 1, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_misc_set_alignment (GTK_MISC (attachNullLabelLeftBottom), 0, 0.5); attachNullLabelRightBottom = gtk_label_new (""); gtk_widget_show (attachNullLabelRightBottom); gtk_table_attach (GTK_TABLE (table2), attachNullLabelRightBottom, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); gtk_misc_set_alignment (GTK_MISC (attachNullLabelRightBottom), 0, 0.5); AttachFilePathEntry = gtk_entry_new (); gtk_widget_show (AttachFilePathEntry); gtk_table_attach (GTK_TABLE (table2), AttachFilePathEntry, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, AttachFilePathEntry, _("This entry show the attachment file path."), NULL); gtk_entry_set_invisible_char (GTK_ENTRY (AttachFilePathEntry), 8226); AttachSelectFileFrame = gtk_label_new (_("FileChooser")); gtk_widget_show (AttachSelectFileFrame); gtk_frame_set_label_widget (GTK_FRAME (frame9), AttachSelectFileFrame); gtk_label_set_use_markup (GTK_LABEL (AttachSelectFileFrame), TRUE); vbuttonbox2 = gtk_vbutton_box_new (); gtk_widget_show (vbuttonbox2); gtk_box_pack_start (GTK_BOX (hbox14), vbuttonbox2, TRUE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbuttonbox2), 4); gtk_button_box_set_layout (GTK_BUTTON_BOX (vbuttonbox2), GTK_BUTTONBOX_SPREAD); AttachFIleAddBtn = gtk_button_new_with_mnemonic (_(">>")); gtk_widget_show (AttachFIleAddBtn); gtk_container_add (GTK_CONTAINER (vbuttonbox2), AttachFIleAddBtn); GTK_WIDGET_SET_FLAGS (AttachFIleAddBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, AttachFIleAddBtn, _("Please push this button to add the file into attachment file list."), NULL); AttachFileRemoveBtn = gtk_button_new_with_mnemonic (_("<<")); gtk_widget_show (AttachFileRemoveBtn); gtk_container_add (GTK_CONTAINER (vbuttonbox2), AttachFileRemoveBtn); GTK_WIDGET_SET_FLAGS (AttachFileRemoveBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, AttachFileRemoveBtn, _("Please push this button to remove the file from attachment file list."), NULL); frame10 = gtk_frame_new (NULL); gtk_widget_show (frame10); gtk_box_pack_start (GTK_BOX (hbox14), frame10, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame10), GTK_SHADOW_IN); alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment12); gtk_container_add (GTK_CONTAINER (frame10), alignment12); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 0, 0, 12, 0); attachedViewWindow = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (attachedViewWindow); gtk_container_add (GTK_CONTAINER (alignment12), attachedViewWindow); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (attachedViewWindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (attachedViewWindow), GTK_SHADOW_IN); attachedFilesView = gtk_tree_view_new (); gtk_widget_show (attachedFilesView); gtk_container_add (GTK_CONTAINER (attachedViewWindow), attachedFilesView); gtk_widget_set_size_request (attachedFilesView, 200, 100); gtk_container_set_border_width (GTK_CONTAINER (attachedFilesView), 1); gtk_tooltips_set_tip (tooltips, attachedFilesView, _("This list shows attachment files of the message."), NULL); gtk_tree_view_set_reorderable (GTK_TREE_VIEW (attachedFilesView), TRUE); AttachFileListFrame = gtk_label_new (_("Attached files")); gtk_widget_show (AttachFileListFrame); gtk_frame_set_label_widget (GTK_FRAME (frame10), AttachFileListFrame); gtk_label_set_use_markup (GTK_LABEL (AttachFileListFrame), TRUE); attachFileEditorMainFrameLabel = gtk_label_new (_("Attachment Editor")); gtk_widget_show (attachFileEditorMainFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (attachFileEditorMainFrame), attachFileEditorMainFrameLabel); gtk_label_set_use_markup (GTK_LABEL (attachFileEditorMainFrameLabel), TRUE); g_signal_connect ((gpointer) attachFileEditor, "destroy", G_CALLBACK (on_attachFileEditor_destroy), NULL); g_signal_connect ((gpointer) attachFileEditor, "show", G_CALLBACK (on_attachFileEditor_show), NULL); g_signal_connect ((gpointer) attachFileEditor, "check_resize", G_CALLBACK (on_attachFileEditor_check_resize), NULL); g_signal_connect ((gpointer) attachFileEditor, "size_allocate", G_CALLBACK (on_attachFileEditor_size_allocate), NULL); g_signal_connect ((gpointer) attachFileEditorMainFrame, "drag_data_received", G_CALLBACK (on_attachFileEditorMainFrame_drag_data_received), NULL); g_signal_connect ((gpointer) AttachFileFileChooseBtn, "clicked", G_CALLBACK (on_AttachFileFileChooseBtn_clicked), NULL); g_signal_connect ((gpointer) AttachFilePathEntry, "activate", G_CALLBACK (on_AttachFilePathEntry_activate), NULL); g_signal_connect ((gpointer) AttachFilePathEntry, "changed", G_CALLBACK (on_AttachFilePathEntry_changed), NULL); g_signal_connect ((gpointer) AttachFilePathEntry, "drag_data_received", G_CALLBACK (on_AttachFilePathEntry_drag_data_received), NULL); g_signal_connect ((gpointer) AttachFIleAddBtn, "clicked", G_CALLBACK (on_AttachFIleAddBtn_clicked), NULL); g_signal_connect ((gpointer) AttachFileRemoveBtn, "clicked", G_CALLBACK (on_AttachFileRemoveBtn_clicked), NULL); g_signal_connect ((gpointer) attachedFilesView, "drag_data_received", G_CALLBACK (on_attachedFilesView_drag_data_received), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (attachFileEditor, attachFileEditor, "attachFileEditor"); GLADE_HOOKUP_OBJECT (attachFileEditor, attachFileEditorMainFrame, "attachFileEditorMainFrame"); GLADE_HOOKUP_OBJECT (attachFileEditor, alignment10, "alignment10"); GLADE_HOOKUP_OBJECT (attachFileEditor, hbox14, "hbox14"); GLADE_HOOKUP_OBJECT (attachFileEditor, frame9, "frame9"); GLADE_HOOKUP_OBJECT (attachFileEditor, alignment11, "alignment11"); GLADE_HOOKUP_OBJECT (attachFileEditor, table2, "table2"); GLADE_HOOKUP_OBJECT (attachFileEditor, AttachFileFileChooseBtn, "AttachFileFileChooseBtn"); GLADE_HOOKUP_OBJECT (attachFileEditor, AttachNullLabelRightTop, "AttachNullLabelRightTop"); GLADE_HOOKUP_OBJECT (attachFileEditor, attachNullLabelLeftTop, "attachNullLabelLeftTop"); GLADE_HOOKUP_OBJECT (attachFileEditor, attachNullLabelLeftBottom, "attachNullLabelLeftBottom"); GLADE_HOOKUP_OBJECT (attachFileEditor, attachNullLabelRightBottom, "attachNullLabelRightBottom"); GLADE_HOOKUP_OBJECT (attachFileEditor, AttachFilePathEntry, "AttachFilePathEntry"); GLADE_HOOKUP_OBJECT (attachFileEditor, AttachSelectFileFrame, "AttachSelectFileFrame"); GLADE_HOOKUP_OBJECT (attachFileEditor, vbuttonbox2, "vbuttonbox2"); GLADE_HOOKUP_OBJECT (attachFileEditor, AttachFIleAddBtn, "AttachFIleAddBtn"); GLADE_HOOKUP_OBJECT (attachFileEditor, AttachFileRemoveBtn, "AttachFileRemoveBtn"); GLADE_HOOKUP_OBJECT (attachFileEditor, frame10, "frame10"); GLADE_HOOKUP_OBJECT (attachFileEditor, alignment12, "alignment12"); GLADE_HOOKUP_OBJECT (attachFileEditor, attachedViewWindow, "attachedViewWindow"); GLADE_HOOKUP_OBJECT (attachFileEditor, attachedFilesView, "attachedFilesView"); GLADE_HOOKUP_OBJECT (attachFileEditor, AttachFileListFrame, "AttachFileListFrame"); GLADE_HOOKUP_OBJECT (attachFileEditor, attachFileEditorMainFrameLabel, "attachFileEditorMainFrameLabel"); GLADE_HOOKUP_OBJECT_NO_REF (attachFileEditor, tooltips, "tooltips"); return attachFileEditor; } GtkWidget* create_ipmsgDownloadOverWrite (void) { GtkWidget *ipmsgDownloadOverWrite; GdkPixbuf *ipmsgDownloadOverWrite_icon_pixbuf; GtkWidget *dialog_vbox6; GtkWidget *frame11; GtkWidget *alignment13; GtkWidget *vbox8; GtkWidget *ovwerwriteLabel1; GtkWidget *overwriteFileNameLabel; GtkWidget *overwriteConfirmMsgLabel; GtkWidget *downloadConfirmLabel; GtkWidget *dialog_action_area6; GtkWidget *cancelbutton2; GtkWidget *okbutton2; ipmsgDownloadOverWrite = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (ipmsgDownloadOverWrite), _("Overwrite comfirmation")); ipmsgDownloadOverWrite_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (ipmsgDownloadOverWrite_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (ipmsgDownloadOverWrite), ipmsgDownloadOverWrite_icon_pixbuf); gdk_pixbuf_unref (ipmsgDownloadOverWrite_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (ipmsgDownloadOverWrite), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox6 = GTK_DIALOG (ipmsgDownloadOverWrite)->vbox; gtk_widget_show (dialog_vbox6); frame11 = gtk_frame_new (NULL); gtk_widget_show (frame11); gtk_box_pack_start (GTK_BOX (dialog_vbox6), frame11, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame11), GTK_SHADOW_IN); alignment13 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment13); gtk_container_add (GTK_CONTAINER (frame11), alignment13); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment13), 0, 0, 12, 0); vbox8 = gtk_vbox_new (TRUE, 0); gtk_widget_show (vbox8); gtk_container_add (GTK_CONTAINER (alignment13), vbox8); ovwerwriteLabel1 = gtk_label_new (_("Following file already exist:")); gtk_widget_show (ovwerwriteLabel1); gtk_box_pack_start (GTK_BOX (vbox8), ovwerwriteLabel1, FALSE, FALSE, 0); overwriteFileNameLabel = gtk_label_new (_("FilePath")); gtk_widget_show (overwriteFileNameLabel); gtk_box_pack_start (GTK_BOX (vbox8), overwriteFileNameLabel, FALSE, FALSE, 0); overwriteConfirmMsgLabel = gtk_label_new (_("Over Write?")); gtk_widget_show (overwriteConfirmMsgLabel); gtk_box_pack_start (GTK_BOX (vbox8), overwriteConfirmMsgLabel, FALSE, FALSE, 0); downloadConfirmLabel = gtk_label_new (_("Over write confirmation")); gtk_widget_show (downloadConfirmLabel); gtk_frame_set_label_widget (GTK_FRAME (frame11), downloadConfirmLabel); gtk_label_set_use_markup (GTK_LABEL (downloadConfirmLabel), TRUE); dialog_action_area6 = GTK_DIALOG (ipmsgDownloadOverWrite)->action_area; gtk_widget_show (dialog_action_area6); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area6), GTK_BUTTONBOX_END); cancelbutton2 = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (cancelbutton2); gtk_dialog_add_action_widget (GTK_DIALOG (ipmsgDownloadOverWrite), cancelbutton2, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton2, GTK_CAN_DEFAULT); okbutton2 = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (okbutton2); gtk_dialog_add_action_widget (GTK_DIALOG (ipmsgDownloadOverWrite), okbutton2, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton2, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (ipmsgDownloadOverWrite, ipmsgDownloadOverWrite, "ipmsgDownloadOverWrite"); GLADE_HOOKUP_OBJECT_NO_REF (ipmsgDownloadOverWrite, dialog_vbox6, "dialog_vbox6"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, frame11, "frame11"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, alignment13, "alignment13"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, vbox8, "vbox8"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, ovwerwriteLabel1, "ovwerwriteLabel1"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, overwriteFileNameLabel, "overwriteFileNameLabel"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, overwriteConfirmMsgLabel, "overwriteConfirmMsgLabel"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, downloadConfirmLabel, "downloadConfirmLabel"); GLADE_HOOKUP_OBJECT_NO_REF (ipmsgDownloadOverWrite, dialog_action_area6, "dialog_action_area6"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, cancelbutton2, "cancelbutton2"); GLADE_HOOKUP_OBJECT (ipmsgDownloadOverWrite, okbutton2, "okbutton2"); return ipmsgDownloadOverWrite; } GtkWidget* create_downloadMonitor (void) { GtkWidget *downloadMonitor; GdkPixbuf *downloadMonitor_icon_pixbuf; GtkWidget *fixed2; GtkWidget *hbuttonbox1; GtkWidget *deleteBtn; GtkWidget *updateBtn; GtkWidget *closeBtn; GtkWidget *frame12; GtkWidget *alignment14; GtkWidget *scrolledwindow9; GtkWidget *treeview5; GtkWidget *frameLabel; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); downloadMonitor = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (downloadMonitor), _("Down load monitor")); gtk_window_set_resizable (GTK_WINDOW (downloadMonitor), FALSE); downloadMonitor_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (downloadMonitor_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (downloadMonitor), downloadMonitor_icon_pixbuf); gdk_pixbuf_unref (downloadMonitor_icon_pixbuf); } fixed2 = gtk_fixed_new (); gtk_widget_show (fixed2); gtk_container_add (GTK_CONTAINER (downloadMonitor), fixed2); hbuttonbox1 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox1); gtk_fixed_put (GTK_FIXED (fixed2), hbuttonbox1, 8, 256); gtk_widget_set_size_request (hbuttonbox1, 440, 36); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox1), GTK_BUTTONBOX_SPREAD); deleteBtn = gtk_button_new_from_stock ("gtk-remove"); gtk_widget_show (deleteBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox1), deleteBtn); GTK_WIDGET_SET_FLAGS (deleteBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, deleteBtn, _("Please push this button to revoke permission to down load the file."), NULL); updateBtn = gtk_button_new_from_stock ("gtk-refresh"); gtk_widget_show (updateBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox1), updateBtn); GTK_WIDGET_SET_FLAGS (updateBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, updateBtn, _("Please push this button to update the download file list."), NULL); closeBtn = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (closeBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox1), closeBtn); GTK_WIDGET_SET_FLAGS (closeBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, closeBtn, _("Please push this button to close this window."), NULL); frame12 = gtk_frame_new (NULL); gtk_widget_show (frame12); gtk_fixed_put (GTK_FIXED (fixed2), frame12, 16, 8); gtk_widget_set_size_request (frame12, 536, 240); alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment14); gtk_container_add (GTK_CONTAINER (frame12), alignment14); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment14), 0, 0, 12, 0); scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow9); gtk_container_add (GTK_CONTAINER (alignment14), scrolledwindow9); treeview5 = gtk_tree_view_new (); gtk_widget_show (treeview5); gtk_container_add (GTK_CONTAINER (scrolledwindow9), treeview5); gtk_tooltips_set_tip (tooltips, treeview5, _("This list shows download files which you sent."), NULL); frameLabel = gtk_label_new (_("download files")); gtk_widget_show (frameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame12), frameLabel); gtk_label_set_use_markup (GTK_LABEL (frameLabel), TRUE); g_signal_connect ((gpointer) downloadMonitor, "destroy", G_CALLBACK (on_downloadMonitor_destroy), NULL); g_signal_connect ((gpointer) downloadMonitor, "show", G_CALLBACK (on_downloadMonitor_show), NULL); g_signal_connect ((gpointer) downloadMonitor, "check_resize", G_CALLBACK (on_downloadMonitor_check_resize), NULL); g_signal_connect ((gpointer) downloadMonitor, "size_allocate", G_CALLBACK (on_downloadMonitor_size_allocate), NULL); g_signal_connect ((gpointer) deleteBtn, "clicked", G_CALLBACK (on_deleteBtn_clicked), NULL); g_signal_connect ((gpointer) updateBtn, "clicked", G_CALLBACK (on_updateBtn_clicked), NULL); g_signal_connect ((gpointer) closeBtn, "clicked", G_CALLBACK (on_closeBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (downloadMonitor, downloadMonitor, "downloadMonitor"); GLADE_HOOKUP_OBJECT (downloadMonitor, fixed2, "fixed2"); GLADE_HOOKUP_OBJECT (downloadMonitor, hbuttonbox1, "hbuttonbox1"); GLADE_HOOKUP_OBJECT (downloadMonitor, deleteBtn, "deleteBtn"); GLADE_HOOKUP_OBJECT (downloadMonitor, updateBtn, "updateBtn"); GLADE_HOOKUP_OBJECT (downloadMonitor, closeBtn, "closeBtn"); GLADE_HOOKUP_OBJECT (downloadMonitor, frame12, "frame12"); GLADE_HOOKUP_OBJECT (downloadMonitor, alignment14, "alignment14"); GLADE_HOOKUP_OBJECT (downloadMonitor, scrolledwindow9, "scrolledwindow9"); GLADE_HOOKUP_OBJECT (downloadMonitor, treeview5, "treeview5"); GLADE_HOOKUP_OBJECT (downloadMonitor, frameLabel, "frameLabel"); GLADE_HOOKUP_OBJECT_NO_REF (downloadMonitor, tooltips, "tooltips"); return downloadMonitor; } GtkWidget* create_passwdWindow (void) { GtkWidget *passwdWindow; GdkPixbuf *passwdWindow_icon_pixbuf; GtkWidget *vbox9; GtkWidget *vbox10; GtkWidget *passWordWindowLabel; GtkWidget *hbox15; GtkWidget *oldPasswdLabel; GtkWidget *currentPassWordEntry; GtkWidget *hbox16; GtkWidget *passwdEntryLabel1; GtkWidget *passwdEntry1; GtkWidget *hbox24; GtkWidget *passwdEntryLabel2; GtkWidget *passwdEntry2; GtkWidget *hbuttonbox2; GtkWidget *passWordOKBtn; GtkWidget *PassWordCancelBtn; passwdWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (passwdWindow), _("password")); gtk_window_set_destroy_with_parent (GTK_WINDOW (passwdWindow), TRUE); passwdWindow_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (passwdWindow_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (passwdWindow), passwdWindow_icon_pixbuf); gdk_pixbuf_unref (passwdWindow_icon_pixbuf); } vbox9 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox9); gtk_container_add (GTK_CONTAINER (passwdWindow), vbox9); vbox10 = gtk_vbox_new (TRUE, 0); gtk_widget_show (vbox10); gtk_box_pack_start (GTK_BOX (vbox9), vbox10, TRUE, TRUE, 0); passWordWindowLabel = gtk_label_new (""); gtk_widget_show (passWordWindowLabel); gtk_box_pack_start (GTK_BOX (vbox10), passWordWindowLabel, TRUE, TRUE, 0); hbox15 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox15); gtk_box_pack_start (GTK_BOX (vbox10), hbox15, TRUE, TRUE, 0); oldPasswdLabel = gtk_label_new (_("current password")); gtk_widget_show (oldPasswdLabel); gtk_box_pack_start (GTK_BOX (hbox15), oldPasswdLabel, TRUE, TRUE, 0); currentPassWordEntry = gtk_entry_new (); gtk_widget_show (currentPassWordEntry); gtk_box_pack_start (GTK_BOX (hbox15), currentPassWordEntry, TRUE, TRUE, 0); gtk_entry_set_visibility (GTK_ENTRY (currentPassWordEntry), FALSE); gtk_entry_set_invisible_char (GTK_ENTRY (currentPassWordEntry), 8226); hbox16 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox16); gtk_box_pack_start (GTK_BOX (vbox10), hbox16, TRUE, TRUE, 0); passwdEntryLabel1 = gtk_label_new (_("password")); gtk_widget_show (passwdEntryLabel1); gtk_box_pack_start (GTK_BOX (hbox16), passwdEntryLabel1, TRUE, TRUE, 0); gtk_widget_set_size_request (passwdEntryLabel1, 130, -1); passwdEntry1 = gtk_entry_new (); gtk_widget_show (passwdEntry1); gtk_box_pack_start (GTK_BOX (hbox16), passwdEntry1, TRUE, TRUE, 0); gtk_entry_set_visibility (GTK_ENTRY (passwdEntry1), FALSE); gtk_entry_set_invisible_char (GTK_ENTRY (passwdEntry1), 8226); hbox24 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox24); gtk_box_pack_start (GTK_BOX (vbox10), hbox24, TRUE, TRUE, 0); passwdEntryLabel2 = gtk_label_new (_("confirm password")); gtk_widget_show (passwdEntryLabel2); gtk_box_pack_start (GTK_BOX (hbox24), passwdEntryLabel2, TRUE, TRUE, 0); gtk_widget_set_size_request (passwdEntryLabel2, 130, -1); passwdEntry2 = gtk_entry_new (); gtk_widget_show (passwdEntry2); gtk_box_pack_start (GTK_BOX (hbox24), passwdEntry2, TRUE, TRUE, 0); gtk_entry_set_visibility (GTK_ENTRY (passwdEntry2), FALSE); gtk_entry_set_invisible_char (GTK_ENTRY (passwdEntry2), 8226); hbuttonbox2 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox2); gtk_box_pack_start (GTK_BOX (vbox9), hbuttonbox2, TRUE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox2), GTK_BUTTONBOX_SPREAD); passWordOKBtn = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (passWordOKBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox2), passWordOKBtn); GTK_WIDGET_SET_FLAGS (passWordOKBtn, GTK_CAN_DEFAULT); PassWordCancelBtn = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (PassWordCancelBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox2), PassWordCancelBtn); GTK_WIDGET_SET_FLAGS (PassWordCancelBtn, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) currentPassWordEntry, "changed", G_CALLBACK (on_currentPassWordEntry_changed), NULL); g_signal_connect ((gpointer) passwdEntry1, "changed", G_CALLBACK (on_passwdEntry1_changed), NULL); g_signal_connect ((gpointer) passwdEntry2, "changed", G_CALLBACK (on_passwdEntry2_changed), NULL); g_signal_connect ((gpointer) passWordOKBtn, "clicked", G_CALLBACK (on_passWordOKBtn_clicked), NULL); g_signal_connect ((gpointer) PassWordCancelBtn, "clicked", G_CALLBACK (on_PassWordCancelBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (passwdWindow, passwdWindow, "passwdWindow"); GLADE_HOOKUP_OBJECT (passwdWindow, vbox9, "vbox9"); GLADE_HOOKUP_OBJECT (passwdWindow, vbox10, "vbox10"); GLADE_HOOKUP_OBJECT (passwdWindow, passWordWindowLabel, "passWordWindowLabel"); GLADE_HOOKUP_OBJECT (passwdWindow, hbox15, "hbox15"); GLADE_HOOKUP_OBJECT (passwdWindow, oldPasswdLabel, "oldPasswdLabel"); GLADE_HOOKUP_OBJECT (passwdWindow, currentPassWordEntry, "currentPassWordEntry"); GLADE_HOOKUP_OBJECT (passwdWindow, hbox16, "hbox16"); GLADE_HOOKUP_OBJECT (passwdWindow, passwdEntryLabel1, "passwdEntryLabel1"); GLADE_HOOKUP_OBJECT (passwdWindow, passwdEntry1, "passwdEntry1"); GLADE_HOOKUP_OBJECT (passwdWindow, hbox24, "hbox24"); GLADE_HOOKUP_OBJECT (passwdWindow, passwdEntryLabel2, "passwdEntryLabel2"); GLADE_HOOKUP_OBJECT (passwdWindow, passwdEntry2, "passwdEntry2"); GLADE_HOOKUP_OBJECT (passwdWindow, hbuttonbox2, "hbuttonbox2"); GLADE_HOOKUP_OBJECT (passwdWindow, passWordOKBtn, "passWordOKBtn"); GLADE_HOOKUP_OBJECT (passwdWindow, PassWordCancelBtn, "PassWordCancelBtn"); return passwdWindow; } GtkWidget* create_absenceEditor (void) { GtkWidget *absenceEditor; GdkPixbuf *absenceEditor_icon_pixbuf; GtkWidget *hbox17; GtkWidget *frame13; GtkWidget *alignment15; GtkWidget *scrolledwindow8; GtkWidget *absenseTitles; GtkWidget *AbsenceTitleFrameLabel; GtkWidget *vbox11; GtkWidget *vbox12; GtkWidget *frame14; GtkWidget *alignment16; GtkWidget *vbox13; GtkWidget *hbox19; GtkWidget *AbsenceTitleLabel; GtkWidget *AbsenceTitleEntry; GtkWidget *scrolledwindow7; GtkWidget *fuzaiText; GtkWidget *AbsenceEditFrameLabel; GtkWidget *hbuttonbox3; GtkWidget *applyAndAbsentBtn; GtkWidget *applyOnlyBtn; GtkWidget *absenceEditorCloseBtn; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); absenceEditor = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_size_request (absenceEditor, -1, 268); gtk_window_set_title (GTK_WINDOW (absenceEditor), _("Absence Notification")); gtk_window_set_destroy_with_parent (GTK_WINDOW (absenceEditor), TRUE); absenceEditor_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (absenceEditor_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (absenceEditor), absenceEditor_icon_pixbuf); gdk_pixbuf_unref (absenceEditor_icon_pixbuf); } hbox17 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox17); gtk_container_add (GTK_CONTAINER (absenceEditor), hbox17); frame13 = gtk_frame_new (NULL); gtk_widget_show (frame13); gtk_box_pack_start (GTK_BOX (hbox17), frame13, FALSE, FALSE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame13), GTK_SHADOW_IN); alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment15); gtk_container_add (GTK_CONTAINER (frame13), alignment15); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment15), 0, 0, 12, 0); scrolledwindow8 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow8); gtk_container_add (GTK_CONTAINER (alignment15), scrolledwindow8); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_SHADOW_IN); absenseTitles = gtk_tree_view_new (); gtk_widget_show (absenseTitles); gtk_container_add (GTK_CONTAINER (scrolledwindow8), absenseTitles); gtk_tooltips_set_tip (tooltips, absenseTitles, _("This list shows absence message titiles."), NULL); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (absenseTitles), FALSE); gtk_tree_view_set_reorderable (GTK_TREE_VIEW (absenseTitles), TRUE); AbsenceTitleFrameLabel = gtk_label_new (_("Titles")); gtk_widget_show (AbsenceTitleFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame13), AbsenceTitleFrameLabel); gtk_label_set_use_markup (GTK_LABEL (AbsenceTitleFrameLabel), TRUE); vbox11 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox11); gtk_box_pack_start (GTK_BOX (hbox17), vbox11, TRUE, TRUE, 0); vbox12 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox12); gtk_box_pack_start (GTK_BOX (vbox11), vbox12, TRUE, TRUE, 0); frame14 = gtk_frame_new (NULL); gtk_widget_show (frame14); gtk_box_pack_start (GTK_BOX (vbox12), frame14, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame14), GTK_SHADOW_IN); alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment16); gtk_container_add (GTK_CONTAINER (frame14), alignment16); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment16), 0, 0, 12, 0); vbox13 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox13); gtk_container_add (GTK_CONTAINER (alignment16), vbox13); hbox19 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox19); gtk_box_pack_start (GTK_BOX (vbox13), hbox19, TRUE, TRUE, 0); AbsenceTitleLabel = gtk_label_new (_("Title")); gtk_widget_show (AbsenceTitleLabel); gtk_box_pack_start (GTK_BOX (hbox19), AbsenceTitleLabel, FALSE, TRUE, 3); AbsenceTitleEntry = gtk_entry_new (); gtk_widget_show (AbsenceTitleEntry); gtk_box_pack_start (GTK_BOX (hbox19), AbsenceTitleEntry, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, AbsenceTitleEntry, _("This entry show absence message title, please edit this entry as you like."), NULL); gtk_entry_set_invisible_char (GTK_ENTRY (AbsenceTitleEntry), 8226); scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow7); gtk_box_pack_start (GTK_BOX (vbox13), scrolledwindow7, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN); fuzaiText = gtk_text_view_new (); gtk_widget_show (fuzaiText); gtk_container_add (GTK_CONTAINER (scrolledwindow7), fuzaiText); gtk_tooltips_set_tip (tooltips, fuzaiText, _("Please edit this entry as you like to modify the absence message."), NULL); AbsenceEditFrameLabel = gtk_label_new (_("Absence message")); gtk_widget_show (AbsenceEditFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (frame14), AbsenceEditFrameLabel); gtk_label_set_use_markup (GTK_LABEL (AbsenceEditFrameLabel), TRUE); hbuttonbox3 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox3); gtk_box_pack_start (GTK_BOX (vbox11), hbuttonbox3, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbuttonbox3), 1); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_SPREAD); gtk_box_set_spacing (GTK_BOX (hbuttonbox3), 5); applyAndAbsentBtn = gtk_button_new_with_mnemonic (_("Set absent mode")); gtk_widget_show (applyAndAbsentBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox3), applyAndAbsentBtn); GTK_WIDGET_SET_FLAGS (applyAndAbsentBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, applyAndAbsentBtn, _("Please push this button to apply changes and to enter the absent mode."), NULL); applyOnlyBtn = gtk_button_new_with_mnemonic (_("Apply Only")); gtk_widget_show (applyOnlyBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox3), applyOnlyBtn); GTK_WIDGET_SET_FLAGS (applyOnlyBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, applyOnlyBtn, _("Push this button to apply changes on this absence message."), NULL); absenceEditorCloseBtn = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (absenceEditorCloseBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox3), absenceEditorCloseBtn); GTK_WIDGET_SET_FLAGS (absenceEditorCloseBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, absenceEditorCloseBtn, _("Please push this button to close this window."), NULL); g_signal_connect ((gpointer) absenceEditor, "destroy", G_CALLBACK (on_absenceEditor_destroy), NULL); g_signal_connect ((gpointer) absenceEditor, "show", G_CALLBACK (on_absenceEditor_show), NULL); g_signal_connect ((gpointer) absenceEditor, "size_allocate", G_CALLBACK (on_absenceEditor_size_allocate), NULL); g_signal_connect ((gpointer) applyAndAbsentBtn, "clicked", G_CALLBACK (on_applyAndAbsentBtn_clicked), NULL); g_signal_connect ((gpointer) applyOnlyBtn, "clicked", G_CALLBACK (on_applyOnlyBtn_clicked), NULL); g_signal_connect ((gpointer) absenceEditorCloseBtn, "clicked", G_CALLBACK (on_absenceEditorCloseBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (absenceEditor, absenceEditor, "absenceEditor"); GLADE_HOOKUP_OBJECT (absenceEditor, hbox17, "hbox17"); GLADE_HOOKUP_OBJECT (absenceEditor, frame13, "frame13"); GLADE_HOOKUP_OBJECT (absenceEditor, alignment15, "alignment15"); GLADE_HOOKUP_OBJECT (absenceEditor, scrolledwindow8, "scrolledwindow8"); GLADE_HOOKUP_OBJECT (absenceEditor, absenseTitles, "absenseTitles"); GLADE_HOOKUP_OBJECT (absenceEditor, AbsenceTitleFrameLabel, "AbsenceTitleFrameLabel"); GLADE_HOOKUP_OBJECT (absenceEditor, vbox11, "vbox11"); GLADE_HOOKUP_OBJECT (absenceEditor, vbox12, "vbox12"); GLADE_HOOKUP_OBJECT (absenceEditor, frame14, "frame14"); GLADE_HOOKUP_OBJECT (absenceEditor, alignment16, "alignment16"); GLADE_HOOKUP_OBJECT (absenceEditor, vbox13, "vbox13"); GLADE_HOOKUP_OBJECT (absenceEditor, hbox19, "hbox19"); GLADE_HOOKUP_OBJECT (absenceEditor, AbsenceTitleLabel, "AbsenceTitleLabel"); GLADE_HOOKUP_OBJECT (absenceEditor, AbsenceTitleEntry, "AbsenceTitleEntry"); GLADE_HOOKUP_OBJECT (absenceEditor, scrolledwindow7, "scrolledwindow7"); GLADE_HOOKUP_OBJECT (absenceEditor, fuzaiText, "fuzaiText"); GLADE_HOOKUP_OBJECT (absenceEditor, AbsenceEditFrameLabel, "AbsenceEditFrameLabel"); GLADE_HOOKUP_OBJECT (absenceEditor, hbuttonbox3, "hbuttonbox3"); GLADE_HOOKUP_OBJECT (absenceEditor, applyAndAbsentBtn, "applyAndAbsentBtn"); GLADE_HOOKUP_OBJECT (absenceEditor, applyOnlyBtn, "applyOnlyBtn"); GLADE_HOOKUP_OBJECT (absenceEditor, absenceEditorCloseBtn, "absenceEditorCloseBtn"); GLADE_HOOKUP_OBJECT_NO_REF (absenceEditor, tooltips, "tooltips"); return absenceEditor; } GtkWidget* create_DownloadConfirmDialog (void) { GtkWidget *DownloadConfirmDialog; GdkPixbuf *DownloadConfirmDialog_icon_pixbuf; GtkWidget *dialog_vbox7; GtkWidget *DownLoadCompleteFrame; GtkWidget *alignment17; GtkWidget *vbox14; GtkWidget *DownLoadCompleteFileLabel; GtkWidget *DownLoadConfirmFileSizeLabel; GtkWidget *DownLoadConfirmAppLabel; GtkWidget *DownLoadCompleteLabel; GtkWidget *dialog_action_area7; GtkWidget *DownLoadConfirmClose; GtkWidget *DownLoadConfirmOpen; GtkWidget *DownLoadConfirmExec; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); DownloadConfirmDialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (DownloadConfirmDialog), _("Down load complete")); gtk_window_set_destroy_with_parent (GTK_WINDOW (DownloadConfirmDialog), TRUE); DownloadConfirmDialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (DownloadConfirmDialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (DownloadConfirmDialog), DownloadConfirmDialog_icon_pixbuf); gdk_pixbuf_unref (DownloadConfirmDialog_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (DownloadConfirmDialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox7 = GTK_DIALOG (DownloadConfirmDialog)->vbox; gtk_widget_show (dialog_vbox7); DownLoadCompleteFrame = gtk_frame_new (NULL); gtk_widget_show (DownLoadCompleteFrame); gtk_box_pack_start (GTK_BOX (dialog_vbox7), DownLoadCompleteFrame, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (DownLoadCompleteFrame), GTK_SHADOW_NONE); alignment17 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment17); gtk_container_add (GTK_CONTAINER (DownLoadCompleteFrame), alignment17); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment17), 0, 0, 12, 0); vbox14 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox14); gtk_container_add (GTK_CONTAINER (alignment17), vbox14); DownLoadCompleteFileLabel = gtk_label_new (_("FileName")); gtk_widget_show (DownLoadCompleteFileLabel); gtk_box_pack_start (GTK_BOX (vbox14), DownLoadCompleteFileLabel, FALSE, FALSE, 0); DownLoadConfirmFileSizeLabel = gtk_label_new (_("FileSize")); gtk_widget_show (DownLoadConfirmFileSizeLabel); gtk_box_pack_start (GTK_BOX (vbox14), DownLoadConfirmFileSizeLabel, FALSE, FALSE, 0); DownLoadConfirmAppLabel = gtk_label_new (_("appName")); gtk_widget_show (DownLoadConfirmAppLabel); gtk_box_pack_start (GTK_BOX (vbox14), DownLoadConfirmAppLabel, FALSE, FALSE, 0); DownLoadCompleteLabel = gtk_label_new (_("Down Load Complete")); gtk_widget_show (DownLoadCompleteLabel); gtk_frame_set_label_widget (GTK_FRAME (DownLoadCompleteFrame), DownLoadCompleteLabel); gtk_label_set_use_markup (GTK_LABEL (DownLoadCompleteLabel), TRUE); dialog_action_area7 = GTK_DIALOG (DownloadConfirmDialog)->action_area; gtk_widget_show (dialog_action_area7); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area7), GTK_BUTTONBOX_END); DownLoadConfirmClose = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (DownLoadConfirmClose); gtk_dialog_add_action_widget (GTK_DIALOG (DownloadConfirmDialog), DownLoadConfirmClose, GTK_RESPONSE_CLOSE); GTK_WIDGET_SET_FLAGS (DownLoadConfirmClose, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, DownLoadConfirmClose, _("Please push this button to close this window."), NULL); DownLoadConfirmOpen = gtk_button_new_from_stock ("gtk-open"); gtk_widget_show (DownLoadConfirmOpen); gtk_dialog_add_action_widget (GTK_DIALOG (DownloadConfirmDialog), DownLoadConfirmOpen, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (DownLoadConfirmOpen, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, DownLoadConfirmOpen, _("Please push this button to open the directory which the downloaded file is stored."), NULL); DownLoadConfirmExec = gtk_button_new_from_stock ("gtk-execute"); gtk_widget_show (DownLoadConfirmExec); gtk_dialog_add_action_widget (GTK_DIALOG (DownloadConfirmDialog), DownLoadConfirmExec, GTK_RESPONSE_ACCEPT); GTK_WIDGET_SET_FLAGS (DownLoadConfirmExec, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, DownLoadConfirmExec, _("Please push this button to handle the downloaded file."), NULL); g_signal_connect ((gpointer) DownloadConfirmDialog, "show", G_CALLBACK (on_DownloadConfirmDialog_show), NULL); g_signal_connect ((gpointer) DownloadConfirmDialog, "destroy", G_CALLBACK (on_DownloadConfirmDialog_destroy), NULL); g_signal_connect ((gpointer) DownLoadConfirmClose, "clicked", G_CALLBACK (on_DownLoadConfirmClose_clicked), NULL); g_signal_connect ((gpointer) DownLoadConfirmOpen, "clicked", G_CALLBACK (on_DownLoadConfirmClose_clicked), NULL); g_signal_connect ((gpointer) DownLoadConfirmExec, "clicked", G_CALLBACK (on_DownLoadConfirmExec_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (DownloadConfirmDialog, DownloadConfirmDialog, "DownloadConfirmDialog"); GLADE_HOOKUP_OBJECT_NO_REF (DownloadConfirmDialog, dialog_vbox7, "dialog_vbox7"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, DownLoadCompleteFrame, "DownLoadCompleteFrame"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, alignment17, "alignment17"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, vbox14, "vbox14"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, DownLoadCompleteFileLabel, "DownLoadCompleteFileLabel"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, DownLoadConfirmFileSizeLabel, "DownLoadConfirmFileSizeLabel"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, DownLoadConfirmAppLabel, "DownLoadConfirmAppLabel"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, DownLoadCompleteLabel, "DownLoadCompleteLabel"); GLADE_HOOKUP_OBJECT_NO_REF (DownloadConfirmDialog, dialog_action_area7, "dialog_action_area7"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, DownLoadConfirmClose, "DownLoadConfirmClose"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, DownLoadConfirmOpen, "DownLoadConfirmOpen"); GLADE_HOOKUP_OBJECT (DownloadConfirmDialog, DownLoadConfirmExec, "DownLoadConfirmExec"); GLADE_HOOKUP_OBJECT_NO_REF (DownloadConfirmDialog, tooltips, "tooltips"); return DownloadConfirmDialog; } GtkWidget* create_downLoadFailDialog (void) { GtkWidget *downLoadFailDialog; GdkPixbuf *downLoadFailDialog_icon_pixbuf; GtkWidget *dialog_vbox8; GtkWidget *vbox15; GtkWidget *downloadFailLabel; GtkWidget *downLoadFailFileLabel; GtkWidget *downLoadFailRetryLabel; GtkWidget *dialog_action_area8; GtkWidget *cancelbutton3; GtkWidget *okbutton3; downLoadFailDialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (downLoadFailDialog), _("Down load failed")); gtk_window_set_destroy_with_parent (GTK_WINDOW (downLoadFailDialog), TRUE); downLoadFailDialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (downLoadFailDialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (downLoadFailDialog), downLoadFailDialog_icon_pixbuf); gdk_pixbuf_unref (downLoadFailDialog_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (downLoadFailDialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox8 = GTK_DIALOG (downLoadFailDialog)->vbox; gtk_widget_show (dialog_vbox8); vbox15 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox15); gtk_box_pack_start (GTK_BOX (dialog_vbox8), vbox15, TRUE, TRUE, 0); downloadFailLabel = gtk_label_new (_("Can not receive the file properly.")); gtk_widget_show (downloadFailLabel); gtk_box_pack_start (GTK_BOX (vbox15), downloadFailLabel, FALSE, FALSE, 0); downLoadFailFileLabel = gtk_label_new (""); gtk_widget_show (downLoadFailFileLabel); gtk_box_pack_start (GTK_BOX (vbox15), downLoadFailFileLabel, FALSE, FALSE, 0); downLoadFailRetryLabel = gtk_label_new (_("Retry this file?")); gtk_widget_show (downLoadFailRetryLabel); gtk_box_pack_start (GTK_BOX (vbox15), downLoadFailRetryLabel, FALSE, FALSE, 0); dialog_action_area8 = GTK_DIALOG (downLoadFailDialog)->action_area; gtk_widget_show (dialog_action_area8); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area8), GTK_BUTTONBOX_END); cancelbutton3 = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (cancelbutton3); gtk_dialog_add_action_widget (GTK_DIALOG (downLoadFailDialog), cancelbutton3, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton3, GTK_CAN_DEFAULT); okbutton3 = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (okbutton3); gtk_dialog_add_action_widget (GTK_DIALOG (downLoadFailDialog), okbutton3, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton3, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (downLoadFailDialog, downLoadFailDialog, "downLoadFailDialog"); GLADE_HOOKUP_OBJECT_NO_REF (downLoadFailDialog, dialog_vbox8, "dialog_vbox8"); GLADE_HOOKUP_OBJECT (downLoadFailDialog, vbox15, "vbox15"); GLADE_HOOKUP_OBJECT (downLoadFailDialog, downloadFailLabel, "downloadFailLabel"); GLADE_HOOKUP_OBJECT (downLoadFailDialog, downLoadFailFileLabel, "downLoadFailFileLabel"); GLADE_HOOKUP_OBJECT (downLoadFailDialog, downLoadFailRetryLabel, "downLoadFailRetryLabel"); GLADE_HOOKUP_OBJECT_NO_REF (downLoadFailDialog, dialog_action_area8, "dialog_action_area8"); GLADE_HOOKUP_OBJECT (downLoadFailDialog, cancelbutton3, "cancelbutton3"); GLADE_HOOKUP_OBJECT (downLoadFailDialog, okbutton3, "okbutton3"); return downLoadFailDialog; } GtkWidget* create_downloadOpenDirOnlydialog (void) { GtkWidget *downloadOpenDirOnlydialog; GtkWidget *dialog_vbox9; GtkWidget *vbox18; GtkWidget *downloadOpenDirNotifyLabel; GtkWidget *downloadOpenDirDescLabel; GtkWidget *downloadOpenDirNameLabel; GtkWidget *dialog_action_area9; GtkWidget *cancelbutton4; GtkWidget *okbutton4; downloadOpenDirOnlydialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (downloadOpenDirOnlydialog), _("down load complete")); gtk_window_set_type_hint (GTK_WINDOW (downloadOpenDirOnlydialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox9 = GTK_DIALOG (downloadOpenDirOnlydialog)->vbox; gtk_widget_show (dialog_vbox9); vbox18 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox18); gtk_box_pack_start (GTK_BOX (dialog_vbox9), vbox18, TRUE, TRUE, 0); downloadOpenDirNotifyLabel = gtk_label_new (_("Down load complete")); gtk_widget_show (downloadOpenDirNotifyLabel); gtk_box_pack_start (GTK_BOX (vbox18), downloadOpenDirNotifyLabel, FALSE, FALSE, 0); downloadOpenDirDescLabel = gtk_label_new (_("Do you want to open the directory?")); gtk_widget_show (downloadOpenDirDescLabel); gtk_box_pack_start (GTK_BOX (vbox18), downloadOpenDirDescLabel, FALSE, FALSE, 0); downloadOpenDirNameLabel = gtk_label_new (_("Directory")); gtk_widget_show (downloadOpenDirNameLabel); gtk_box_pack_start (GTK_BOX (vbox18), downloadOpenDirNameLabel, FALSE, FALSE, 0); dialog_action_area9 = GTK_DIALOG (downloadOpenDirOnlydialog)->action_area; gtk_widget_show (dialog_action_area9); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area9), GTK_BUTTONBOX_END); cancelbutton4 = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (cancelbutton4); gtk_dialog_add_action_widget (GTK_DIALOG (downloadOpenDirOnlydialog), cancelbutton4, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton4, GTK_CAN_DEFAULT); okbutton4 = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (okbutton4); gtk_dialog_add_action_widget (GTK_DIALOG (downloadOpenDirOnlydialog), okbutton4, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (okbutton4, GTK_CAN_DEFAULT); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (downloadOpenDirOnlydialog, downloadOpenDirOnlydialog, "downloadOpenDirOnlydialog"); GLADE_HOOKUP_OBJECT_NO_REF (downloadOpenDirOnlydialog, dialog_vbox9, "dialog_vbox9"); GLADE_HOOKUP_OBJECT (downloadOpenDirOnlydialog, vbox18, "vbox18"); GLADE_HOOKUP_OBJECT (downloadOpenDirOnlydialog, downloadOpenDirNotifyLabel, "downloadOpenDirNotifyLabel"); GLADE_HOOKUP_OBJECT (downloadOpenDirOnlydialog, downloadOpenDirDescLabel, "downloadOpenDirDescLabel"); GLADE_HOOKUP_OBJECT (downloadOpenDirOnlydialog, downloadOpenDirNameLabel, "downloadOpenDirNameLabel"); GLADE_HOOKUP_OBJECT_NO_REF (downloadOpenDirOnlydialog, dialog_action_area9, "dialog_action_area9"); GLADE_HOOKUP_OBJECT (downloadOpenDirOnlydialog, cancelbutton4, "cancelbutton4"); GLADE_HOOKUP_OBJECT (downloadOpenDirOnlydialog, okbutton4, "okbutton4"); return downloadOpenDirOnlydialog; } GtkWidget* create_viewConfigWindow (void) { GtkWidget *viewConfigWindow; GdkPixbuf *viewConfigWindow_icon_pixbuf; GtkWidget *vbox19; GtkWidget *frame19; GtkWidget *alignment23; GtkWidget *vbox21; GtkWidget *vbox22; GtkWidget *table4; GtkWidget *viewConfigGroupChkBtn; GtkWidget *viewConfigHostChkBtn; GtkWidget *viewConfigIPAddrChkBtn; GtkWidget *viewConfigLogonChkBtn; GtkWidget *viewConfigPriorityChkBtn; GtkWidget *viewConfigGridChkBtn; GtkWidget *listheaderDescriptionText; GtkWidget *ViewSettingFrame; GtkWidget *frame16; GtkWidget *alignment20; GtkWidget *vbox20; GtkWidget *frame17; GtkWidget *alignment21; GtkWidget *hbox23; GtkWidget *groupSortCheckBtn; GtkWidget *groupInverseBtn; GtkWidget *groupSortFrame; GtkWidget *frame18; GtkWidget *alignment22; GtkWidget *table3; GtkWidget *secondKeyUserRBtn; GSList *secondKeyUserRBtn_group = NULL; GtkWidget *secondKeyMachineRBtn; GtkWidget *secondKeyIPAddrRBtn; GtkWidget *secondKeyInverseBtn; GtkWidget *secondSortFrame; GtkWidget *SortSettingFrame; GtkWidget *hbox22; GtkWidget *viewConfigCloseBtn; GtkWidget *configApplyBtn; viewConfigWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (viewConfigWindow), _("View Config")); gtk_window_set_resizable (GTK_WINDOW (viewConfigWindow), FALSE); viewConfigWindow_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (viewConfigWindow_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (viewConfigWindow), viewConfigWindow_icon_pixbuf); gdk_pixbuf_unref (viewConfigWindow_icon_pixbuf); } vbox19 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox19); gtk_container_add (GTK_CONTAINER (viewConfigWindow), vbox19); frame19 = gtk_frame_new (NULL); gtk_widget_show (frame19); gtk_box_pack_start (GTK_BOX (vbox19), frame19, TRUE, TRUE, 0); alignment23 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment23); gtk_container_add (GTK_CONTAINER (frame19), alignment23); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment23), 0, 0, 12, 0); vbox21 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox21); gtk_container_add (GTK_CONTAINER (alignment23), vbox21); vbox22 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox22); gtk_box_pack_start (GTK_BOX (vbox21), vbox22, TRUE, TRUE, 0); table4 = gtk_table_new (2, 3, FALSE); gtk_widget_show (table4); gtk_box_pack_start (GTK_BOX (vbox22), table4, TRUE, TRUE, 0); viewConfigGroupChkBtn = gtk_check_button_new_with_mnemonic (_("Group")); gtk_widget_show (viewConfigGroupChkBtn); gtk_table_attach (GTK_TABLE (table4), viewConfigGroupChkBtn, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); viewConfigHostChkBtn = gtk_check_button_new_with_mnemonic (_("Host Name")); gtk_widget_show (viewConfigHostChkBtn); gtk_table_attach (GTK_TABLE (table4), viewConfigHostChkBtn, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); viewConfigIPAddrChkBtn = gtk_check_button_new_with_mnemonic (_("IP Address")); gtk_widget_show (viewConfigIPAddrChkBtn); gtk_table_attach (GTK_TABLE (table4), viewConfigIPAddrChkBtn, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); viewConfigLogonChkBtn = gtk_check_button_new_with_mnemonic (_("Logon Name")); gtk_widget_show (viewConfigLogonChkBtn); gtk_table_attach (GTK_TABLE (table4), viewConfigLogonChkBtn, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); viewConfigPriorityChkBtn = gtk_check_button_new_with_mnemonic (_("Priority")); gtk_widget_show (viewConfigPriorityChkBtn); gtk_table_attach (GTK_TABLE (table4), viewConfigPriorityChkBtn, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); viewConfigGridChkBtn = gtk_check_button_new_with_mnemonic (_("Show Grid")); gtk_widget_show (viewConfigGridChkBtn); gtk_table_attach (GTK_TABLE (table4), viewConfigGridChkBtn, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); listheaderDescriptionText = gtk_text_view_new (); gtk_widget_show (listheaderDescriptionText); gtk_box_pack_start (GTK_BOX (vbox22), listheaderDescriptionText, FALSE, FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (listheaderDescriptionText), 10); gtk_text_view_set_editable (GTK_TEXT_VIEW (listheaderDescriptionText), FALSE); gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (listheaderDescriptionText), FALSE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (listheaderDescriptionText), GTK_WRAP_WORD); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (listheaderDescriptionText), FALSE); gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (listheaderDescriptionText)), _("You can reorder list header by drag-and-drop the list header."), -1); ViewSettingFrame = gtk_label_new (_("user list view relevant options")); gtk_widget_show (ViewSettingFrame); gtk_frame_set_label_widget (GTK_FRAME (frame19), ViewSettingFrame); gtk_label_set_use_markup (GTK_LABEL (ViewSettingFrame), TRUE); frame16 = gtk_frame_new (NULL); gtk_widget_show (frame16); gtk_box_pack_start (GTK_BOX (vbox19), frame16, TRUE, TRUE, 0); alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment20); gtk_container_add (GTK_CONTAINER (frame16), alignment20); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 12, 0); vbox20 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox20); gtk_container_add (GTK_CONTAINER (alignment20), vbox20); frame17 = gtk_frame_new (NULL); gtk_widget_show (frame17); gtk_box_pack_start (GTK_BOX (vbox20), frame17, TRUE, FALSE, 0); alignment21 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment21); gtk_container_add (GTK_CONTAINER (frame17), alignment21); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment21), 0, 0, 12, 0); hbox23 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox23); gtk_container_add (GTK_CONTAINER (alignment21), hbox23); groupSortCheckBtn = gtk_check_button_new_with_mnemonic (_("Sort with group")); gtk_widget_show (groupSortCheckBtn); gtk_box_pack_start (GTK_BOX (hbox23), groupSortCheckBtn, TRUE, FALSE, 0); groupInverseBtn = gtk_toggle_button_new_with_mnemonic (_("Descending Sort")); gtk_widget_show (groupInverseBtn); gtk_box_pack_start (GTK_BOX (hbox23), groupInverseBtn, TRUE, FALSE, 0); groupSortFrame = gtk_label_new (_("Sort with group")); gtk_widget_show (groupSortFrame); gtk_frame_set_label_widget (GTK_FRAME (frame17), groupSortFrame); gtk_label_set_use_markup (GTK_LABEL (groupSortFrame), TRUE); frame18 = gtk_frame_new (NULL); gtk_widget_show (frame18); gtk_box_pack_start (GTK_BOX (vbox20), frame18, TRUE, FALSE, 0); alignment22 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment22); gtk_container_add (GTK_CONTAINER (frame18), alignment22); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment22), 0, 0, 12, 0); table3 = gtk_table_new (2, 2, TRUE); gtk_widget_show (table3); gtk_container_add (GTK_CONTAINER (alignment22), table3); gtk_table_set_row_spacings (GTK_TABLE (table3), 2); gtk_table_set_col_spacings (GTK_TABLE (table3), 2); secondKeyUserRBtn = gtk_radio_button_new_with_mnemonic (NULL, _("User Name")); gtk_widget_show (secondKeyUserRBtn); gtk_table_attach (GTK_TABLE (table3), secondKeyUserRBtn, 0, 1, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (secondKeyUserRBtn), secondKeyUserRBtn_group); secondKeyUserRBtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (secondKeyUserRBtn)); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (secondKeyUserRBtn), TRUE); secondKeyMachineRBtn = gtk_radio_button_new_with_mnemonic (NULL, _("Machine Name")); gtk_widget_show (secondKeyMachineRBtn); gtk_table_attach (GTK_TABLE (table3), secondKeyMachineRBtn, 0, 1, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (secondKeyMachineRBtn), secondKeyUserRBtn_group); secondKeyUserRBtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (secondKeyMachineRBtn)); secondKeyIPAddrRBtn = gtk_radio_button_new_with_mnemonic (NULL, _("IP Address")); gtk_widget_show (secondKeyIPAddrRBtn); gtk_table_attach (GTK_TABLE (table3), secondKeyIPAddrRBtn, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (secondKeyIPAddrRBtn), secondKeyUserRBtn_group); secondKeyUserRBtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (secondKeyIPAddrRBtn)); secondKeyInverseBtn = gtk_toggle_button_new_with_mnemonic (_("Descending Sort")); gtk_widget_show (secondKeyInverseBtn); gtk_table_attach (GTK_TABLE (table3), secondKeyInverseBtn, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); secondSortFrame = gtk_label_new (_("Sort with following key")); gtk_widget_show (secondSortFrame); gtk_frame_set_label_widget (GTK_FRAME (frame18), secondSortFrame); gtk_label_set_use_markup (GTK_LABEL (secondSortFrame), TRUE); SortSettingFrame = gtk_label_new (_("Sotring Configuration")); gtk_widget_show (SortSettingFrame); gtk_frame_set_label_widget (GTK_FRAME (frame16), SortSettingFrame); gtk_label_set_use_markup (GTK_LABEL (SortSettingFrame), TRUE); hbox22 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox22); gtk_box_pack_start (GTK_BOX (vbox19), hbox22, FALSE, FALSE, 0); viewConfigCloseBtn = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (viewConfigCloseBtn); gtk_box_pack_start (GTK_BOX (hbox22), viewConfigCloseBtn, FALSE, FALSE, 0); configApplyBtn = gtk_button_new_from_stock ("gtk-apply"); gtk_widget_show (configApplyBtn); gtk_box_pack_start (GTK_BOX (hbox22), configApplyBtn, FALSE, FALSE, 0); g_signal_connect ((gpointer) groupInverseBtn, "toggled", G_CALLBACK (on_groupInverseBtn_toggled), NULL); g_signal_connect ((gpointer) secondKeyInverseBtn, "toggled", G_CALLBACK (on_secondKeyInverseBtn_toggled), NULL); g_signal_connect ((gpointer) viewConfigCloseBtn, "clicked", G_CALLBACK (on_viewConfigCloseBtn_clicked), NULL); g_signal_connect ((gpointer) configApplyBtn, "clicked", G_CALLBACK (on_configApplyBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (viewConfigWindow, viewConfigWindow, "viewConfigWindow"); GLADE_HOOKUP_OBJECT (viewConfigWindow, vbox19, "vbox19"); GLADE_HOOKUP_OBJECT (viewConfigWindow, frame19, "frame19"); GLADE_HOOKUP_OBJECT (viewConfigWindow, alignment23, "alignment23"); GLADE_HOOKUP_OBJECT (viewConfigWindow, vbox21, "vbox21"); GLADE_HOOKUP_OBJECT (viewConfigWindow, vbox22, "vbox22"); GLADE_HOOKUP_OBJECT (viewConfigWindow, table4, "table4"); GLADE_HOOKUP_OBJECT (viewConfigWindow, viewConfigGroupChkBtn, "viewConfigGroupChkBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, viewConfigHostChkBtn, "viewConfigHostChkBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, viewConfigIPAddrChkBtn, "viewConfigIPAddrChkBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, viewConfigLogonChkBtn, "viewConfigLogonChkBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, viewConfigPriorityChkBtn, "viewConfigPriorityChkBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, viewConfigGridChkBtn, "viewConfigGridChkBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, listheaderDescriptionText, "listheaderDescriptionText"); GLADE_HOOKUP_OBJECT (viewConfigWindow, ViewSettingFrame, "ViewSettingFrame"); GLADE_HOOKUP_OBJECT (viewConfigWindow, frame16, "frame16"); GLADE_HOOKUP_OBJECT (viewConfigWindow, alignment20, "alignment20"); GLADE_HOOKUP_OBJECT (viewConfigWindow, vbox20, "vbox20"); GLADE_HOOKUP_OBJECT (viewConfigWindow, frame17, "frame17"); GLADE_HOOKUP_OBJECT (viewConfigWindow, alignment21, "alignment21"); GLADE_HOOKUP_OBJECT (viewConfigWindow, hbox23, "hbox23"); GLADE_HOOKUP_OBJECT (viewConfigWindow, groupSortCheckBtn, "groupSortCheckBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, groupInverseBtn, "groupInverseBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, groupSortFrame, "groupSortFrame"); GLADE_HOOKUP_OBJECT (viewConfigWindow, frame18, "frame18"); GLADE_HOOKUP_OBJECT (viewConfigWindow, alignment22, "alignment22"); GLADE_HOOKUP_OBJECT (viewConfigWindow, table3, "table3"); GLADE_HOOKUP_OBJECT (viewConfigWindow, secondKeyUserRBtn, "secondKeyUserRBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, secondKeyMachineRBtn, "secondKeyMachineRBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, secondKeyIPAddrRBtn, "secondKeyIPAddrRBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, secondKeyInverseBtn, "secondKeyInverseBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, secondSortFrame, "secondSortFrame"); GLADE_HOOKUP_OBJECT (viewConfigWindow, SortSettingFrame, "SortSettingFrame"); GLADE_HOOKUP_OBJECT (viewConfigWindow, hbox22, "hbox22"); GLADE_HOOKUP_OBJECT (viewConfigWindow, viewConfigCloseBtn, "viewConfigCloseBtn"); GLADE_HOOKUP_OBJECT (viewConfigWindow, configApplyBtn, "configApplyBtn"); return viewConfigWindow; } static GnomeUIInfo sortfilter1_menu_uiinfo[] = { { GNOME_APP_UI_ITEM, N_("Set priority as 1"), NULL, (gpointer) on_set_priority1_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set priority as 2"), NULL, (gpointer) on_set_priority_as_2_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set priority as 3"), NULL, (gpointer) on_set_priority_as_3_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set priority as 4"), NULL, (gpointer) on_set_priority_as_4_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set them as default"), NULL, (gpointer) on_set_as_default_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set them invisible item"), NULL, (gpointer) on_set_invisible_item_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, N_("Show invisible items"), NULL, (gpointer) on_show_invisible_items1_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Set all as default"), NULL, (gpointer) on_set_all_as_default_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; static GnomeUIInfo userlistPopUpMenu_uiinfo[] = { { GNOME_APP_UI_SUBTREE, N_("Sort filter"), NULL, sortfilter1_menu_uiinfo, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("Group selection"), NULL, (gpointer) on_groupselection_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("AttachmentFile"), NULL, (gpointer) on_attachmentfile_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_SEPARATOR, { GNOME_APP_UI_ITEM, N_("Save list headers state"), NULL, (gpointer) on_save_list_headers_state1_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, { GNOME_APP_UI_ITEM, N_("User list view config"), NULL, (gpointer) on_set_user_list_view_config_activate, NULL, NULL, GNOME_APP_PIXMAP_NONE, NULL, 0, (GdkModifierType) 0, NULL }, GNOMEUIINFO_END }; GtkWidget* create_userlistPopUpMenu (void) { GtkWidget *userlistPopUpMenu; GtkAccelGroup *accel_group; accel_group = gtk_accel_group_new (); userlistPopUpMenu = gtk_menu_new (); gnome_app_fill_menu (GTK_MENU_SHELL (userlistPopUpMenu), userlistPopUpMenu_uiinfo, accel_group, FALSE, 0); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (userlistPopUpMenu, userlistPopUpMenu, "userlistPopUpMenu"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, userlistPopUpMenu_uiinfo[0].widget, "sortfilter1"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[0].widget, "set_priority1"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[1].widget, "set_priority_as_2"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[2].widget, "set_priority_as_3"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[3].widget, "set_priority_as_4"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[4].widget, "set_as_default"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[5].widget, "set_invisible_item"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[6].widget, "_______________2"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[7].widget, "show_invisible_items1"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, sortfilter1_menu_uiinfo[8].widget, "set_all_as_default"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, userlistPopUpMenu_uiinfo[1].widget, "groupselection"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, userlistPopUpMenu_uiinfo[2].widget, "attachmentfile"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, userlistPopUpMenu_uiinfo[3].widget, "_______________3"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, userlistPopUpMenu_uiinfo[4].widget, "save_list_headers_state1"); GLADE_HOOKUP_OBJECT (userlistPopUpMenu, userlistPopUpMenu_uiinfo[5].widget, "set_user_list_view_config"); gtk_menu_set_accel_group (GTK_MENU (userlistPopUpMenu), accel_group); return userlistPopUpMenu; } GtkWidget* create_clientInfoWindow (void) { GtkWidget *clientInfoWindow; GdkPixbuf *clientInfoWindow_icon_pixbuf; GtkWidget *clientInfoFrame; GtkWidget *alignment24; GtkWidget *vbox25; GtkWidget *vbox26; GtkWidget *clientInfoTypeLabel; GtkWidget *clientInfoUserLabel; GtkWidget *scrolledwindow14; GtkWidget *clientInfoTextview; GtkWidget *clientInfoOKBtn; GtkWidget *clientInfoFrameLabel; clientInfoWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (clientInfoWindow), _("client information")); gtk_window_set_destroy_with_parent (GTK_WINDOW (clientInfoWindow), TRUE); clientInfoWindow_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (clientInfoWindow_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (clientInfoWindow), clientInfoWindow_icon_pixbuf); gdk_pixbuf_unref (clientInfoWindow_icon_pixbuf); } clientInfoFrame = gtk_frame_new (NULL); gtk_widget_show (clientInfoFrame); gtk_container_add (GTK_CONTAINER (clientInfoWindow), clientInfoFrame); alignment24 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment24); gtk_container_add (GTK_CONTAINER (clientInfoFrame), alignment24); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment24), 0, 0, 12, 0); vbox25 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox25); gtk_container_add (GTK_CONTAINER (alignment24), vbox25); vbox26 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox26); gtk_box_pack_start (GTK_BOX (vbox25), vbox26, FALSE, FALSE, 0); clientInfoTypeLabel = gtk_label_new (""); gtk_widget_show (clientInfoTypeLabel); gtk_box_pack_start (GTK_BOX (vbox26), clientInfoTypeLabel, FALSE, FALSE, 0); clientInfoUserLabel = gtk_label_new (""); gtk_widget_show (clientInfoUserLabel); gtk_box_pack_start (GTK_BOX (vbox26), clientInfoUserLabel, FALSE, FALSE, 0); scrolledwindow14 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow14); gtk_box_pack_start (GTK_BOX (vbox25), scrolledwindow14, TRUE, TRUE, 0); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow14), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow14), GTK_SHADOW_IN); clientInfoTextview = gtk_text_view_new (); gtk_widget_show (clientInfoTextview); gtk_container_add (GTK_CONTAINER (scrolledwindow14), clientInfoTextview); gtk_text_view_set_editable (GTK_TEXT_VIEW (clientInfoTextview), FALSE); clientInfoOKBtn = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (clientInfoOKBtn); gtk_box_pack_start (GTK_BOX (vbox25), clientInfoOKBtn, FALSE, FALSE, 0); clientInfoFrameLabel = gtk_label_new (_("Client Information")); gtk_widget_show (clientInfoFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (clientInfoFrame), clientInfoFrameLabel); gtk_label_set_use_markup (GTK_LABEL (clientInfoFrameLabel), TRUE); g_signal_connect ((gpointer) clientInfoOKBtn, "clicked", G_CALLBACK (on_clientInfoOKBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (clientInfoWindow, clientInfoWindow, "clientInfoWindow"); GLADE_HOOKUP_OBJECT (clientInfoWindow, clientInfoFrame, "clientInfoFrame"); GLADE_HOOKUP_OBJECT (clientInfoWindow, alignment24, "alignment24"); GLADE_HOOKUP_OBJECT (clientInfoWindow, vbox25, "vbox25"); GLADE_HOOKUP_OBJECT (clientInfoWindow, vbox26, "vbox26"); GLADE_HOOKUP_OBJECT (clientInfoWindow, clientInfoTypeLabel, "clientInfoTypeLabel"); GLADE_HOOKUP_OBJECT (clientInfoWindow, clientInfoUserLabel, "clientInfoUserLabel"); GLADE_HOOKUP_OBJECT (clientInfoWindow, scrolledwindow14, "scrolledwindow14"); GLADE_HOOKUP_OBJECT (clientInfoWindow, clientInfoTextview, "clientInfoTextview"); GLADE_HOOKUP_OBJECT (clientInfoWindow, clientInfoOKBtn, "clientInfoOKBtn"); GLADE_HOOKUP_OBJECT (clientInfoWindow, clientInfoFrameLabel, "clientInfoFrameLabel"); return clientInfoWindow; } GtkWidget* create_securityConfig (void) { GtkWidget *securityConfig; GdkPixbuf *securityConfig_icon_pixbuf; GtkWidget *vbox28; GtkWidget *hostlistControlFrame; GtkWidget *alignment25; GtkWidget *vbox29; GtkWidget *sendHostListChkBtn; GtkWidget *obtainHostlistChkBtn; GtkWidget *hostlistControlFrameLabel; GtkWidget *ConfigCipherFrame; GtkWidget *alignment26; GtkWidget *table5; GtkWidget *configRC2Bit40Btn; GtkWidget *configRC2Bit128Btn; GtkWidget *configRC2Bit256Btn; GtkWidget *configBFBit128Btn; GtkWidget *configBFBit256Btn; GtkWidget *configMD5Btn; GtkWidget *configSHA1Btn; GtkWidget *configRSABit512Btn; GtkWidget *configRSABit1024Btn; GtkWidget *configRSABit2048Btn; GtkWidget *configAESBit128Btn; GtkWidget *configAESBit192Btn; GtkWidget *configAESBit256Btn; GtkWidget *ConfigCipherLabel; GtkWidget *configGenericSecurityFrame; GtkWidget *alignment27; GtkWidget *vbox32; GtkWidget *keySelectAlgoCBtn; GtkWidget *hbox26; GtkWidget *RSAKeyEncryptionCBtn; GtkWidget *pubkeyPWDBtn; GtkWidget *hbox25; GtkWidget *useLockCBtn; GtkWidget *lockPWDBtn; GtkWidget *ConfigGenericSecurityFLbl; GtkWidget *hbuttonbox4; GtkWidget *configSecurityOKBtn; GtkWidget *configSecurityCancelBtn; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); securityConfig = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (securityConfig), _("Host List Control/Security")); gtk_window_set_resizable (GTK_WINDOW (securityConfig), FALSE); securityConfig_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.png"); if (securityConfig_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (securityConfig), securityConfig_icon_pixbuf); gdk_pixbuf_unref (securityConfig_icon_pixbuf); } vbox28 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox28); gtk_container_add (GTK_CONTAINER (securityConfig), vbox28); hostlistControlFrame = gtk_frame_new (NULL); gtk_widget_show (hostlistControlFrame); gtk_box_pack_start (GTK_BOX (vbox28), hostlistControlFrame, TRUE, TRUE, 0); alignment25 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment25); gtk_container_add (GTK_CONTAINER (hostlistControlFrame), alignment25); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment25), 0, 0, 12, 0); vbox29 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox29); gtk_container_add (GTK_CONTAINER (alignment25), vbox29); sendHostListChkBtn = gtk_check_button_new_with_mnemonic (_("Allow host list sending")); gtk_widget_show (sendHostListChkBtn); gtk_box_pack_start (GTK_BOX (vbox29), sendHostListChkBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, sendHostListChkBtn, _("Please check here if you want to send your host list to other hosts."), NULL); obtainHostlistChkBtn = gtk_check_button_new_with_mnemonic (_("Enable getting host list facility")); gtk_widget_show (obtainHostlistChkBtn); gtk_box_pack_start (GTK_BOX (vbox29), obtainHostlistChkBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, obtainHostlistChkBtn, _("Please check here if you want to obtain host lists from other hosts."), NULL); hostlistControlFrameLabel = gtk_label_new (_("Host list")); gtk_widget_show (hostlistControlFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (hostlistControlFrame), hostlistControlFrameLabel); gtk_label_set_use_markup (GTK_LABEL (hostlistControlFrameLabel), TRUE); ConfigCipherFrame = gtk_frame_new (NULL); gtk_widget_show (ConfigCipherFrame); gtk_box_pack_start (GTK_BOX (vbox28), ConfigCipherFrame, TRUE, TRUE, 0); alignment26 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment26); gtk_container_add (GTK_CONTAINER (ConfigCipherFrame), alignment26); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment26), 0, 0, 12, 0); table5 = gtk_table_new (5, 3, FALSE); gtk_widget_show (table5); gtk_container_add (GTK_CONTAINER (alignment26), table5); configRC2Bit40Btn = gtk_check_button_new_with_mnemonic (_("RC2 40 bits")); gtk_widget_show (configRC2Bit40Btn); gtk_table_attach (GTK_TABLE (table5), configRC2Bit40Btn, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configRC2Bit40Btn, _("Please check here if you want to use RC2 40 bits key for encryption."), NULL); configRC2Bit128Btn = gtk_check_button_new_with_mnemonic (_("RC2 128 bits")); gtk_widget_show (configRC2Bit128Btn); gtk_table_attach (GTK_TABLE (table5), configRC2Bit128Btn, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configRC2Bit128Btn, _("Please check here if you want to use RC2 128 bits key for encryption."), NULL); configRC2Bit256Btn = gtk_check_button_new_with_mnemonic (_("RC2 256 bits")); gtk_widget_show (configRC2Bit256Btn); gtk_table_attach (GTK_TABLE (table5), configRC2Bit256Btn, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configRC2Bit256Btn, _("Please check here if you want to use RC2 256 bits key for encryption."), NULL); configBFBit128Btn = gtk_check_button_new_with_mnemonic (_("Blowfish 128 bits")); gtk_widget_show (configBFBit128Btn); gtk_table_attach (GTK_TABLE (table5), configBFBit128Btn, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configBFBit128Btn, _("Please check here if you want to use blowfish 128 bits key for encryption."), NULL); configBFBit256Btn = gtk_check_button_new_with_mnemonic (_("Blowfish 256 bits")); gtk_widget_show (configBFBit256Btn); gtk_table_attach (GTK_TABLE (table5), configBFBit256Btn, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configBFBit256Btn, _("Please check here if you want to use blowfish 256 bits key for encryption."), NULL); configMD5Btn = gtk_check_button_new_with_mnemonic (_("MD5 sign")); gtk_widget_show (configMD5Btn); gtk_table_attach (GTK_TABLE (table5), configMD5Btn, 0, 1, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configMD5Btn, _("Please check here if you want to use MD5 hash function to sign your messages."), NULL); configSHA1Btn = gtk_check_button_new_with_mnemonic (_("SHA1 sign")); gtk_widget_show (configSHA1Btn); gtk_table_attach (GTK_TABLE (table5), configSHA1Btn, 1, 2, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configSHA1Btn, _("Please check here if you want to use SHA1 hash function to sign your messages."), NULL); configRSABit512Btn = gtk_check_button_new_with_mnemonic (_("RSA 512 bits")); gtk_widget_show (configRSABit512Btn); gtk_table_attach (GTK_TABLE (table5), configRSABit512Btn, 0, 1, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configRSABit512Btn, _("Please check here if you want to use RSA 512 bits key to encrypt the common key."), NULL); configRSABit1024Btn = gtk_check_button_new_with_mnemonic (_("RSA 1024 bits")); gtk_widget_show (configRSABit1024Btn); gtk_table_attach (GTK_TABLE (table5), configRSABit1024Btn, 1, 2, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configRSABit1024Btn, _("Please check here if you want to use RSA 1024 bits key to encrypt the common key."), NULL); configRSABit2048Btn = gtk_check_button_new_with_mnemonic (_("RSA 2048 bits")); gtk_widget_show (configRSABit2048Btn); gtk_table_attach (GTK_TABLE (table5), configRSABit2048Btn, 2, 3, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configRSABit2048Btn, _("Please check here if you want to use RSA 2048 bits key to encrypt the common key."), NULL); configAESBit128Btn = gtk_check_button_new_with_mnemonic (_("AES 128 bits")); gtk_widget_show (configAESBit128Btn); gtk_table_attach (GTK_TABLE (table5), configAESBit128Btn, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configAESBit128Btn, _("Please check here if you want to use AES 128 bits key for encryption."), NULL); configAESBit192Btn = gtk_check_button_new_with_mnemonic (_("AES 192 bits")); gtk_widget_show (configAESBit192Btn); gtk_table_attach (GTK_TABLE (table5), configAESBit192Btn, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configAESBit192Btn, _("Please check here if you want to use AES 192 bits key for encryption."), NULL); configAESBit256Btn = gtk_check_button_new_with_mnemonic (_("AES 256 bits")); gtk_widget_show (configAESBit256Btn); gtk_table_attach (GTK_TABLE (table5), configAESBit256Btn, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, configAESBit256Btn, _("Please check here if you want to use AES 256 bits key for encryption."), NULL); ConfigCipherLabel = gtk_label_new (_("Cipher selection")); gtk_widget_show (ConfigCipherLabel); gtk_frame_set_label_widget (GTK_FRAME (ConfigCipherFrame), ConfigCipherLabel); gtk_label_set_use_markup (GTK_LABEL (ConfigCipherLabel), TRUE); configGenericSecurityFrame = gtk_frame_new (NULL); gtk_widget_show (configGenericSecurityFrame); gtk_box_pack_start (GTK_BOX (vbox28), configGenericSecurityFrame, TRUE, TRUE, 0); alignment27 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment27); gtk_container_add (GTK_CONTAINER (configGenericSecurityFrame), alignment27); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment27), 0, 0, 12, 0); vbox32 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox32); gtk_container_add (GTK_CONTAINER (alignment27), vbox32); keySelectAlgoCBtn = gtk_check_button_new_with_mnemonic (_("Select the encrypt key according to its speed")); gtk_widget_show (keySelectAlgoCBtn); gtk_box_pack_start (GTK_BOX (vbox32), keySelectAlgoCBtn, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, keySelectAlgoCBtn, _("Please check here if you want to select the common key according to its coding speed.Please note that some clients can not handle arbitary combinations of keys(i.e. Windows client can handle RSA 1024 bits with Blowfish 128 bits or RSA 512 bits with RC2 40 bits)."), NULL); hbox26 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox26); gtk_box_pack_start (GTK_BOX (vbox32), hbox26, TRUE, TRUE, 0); RSAKeyEncryptionCBtn = gtk_check_button_new_with_mnemonic (_("Store encrypted public/private key pairs")); gtk_widget_show (RSAKeyEncryptionCBtn); gtk_box_pack_start (GTK_BOX (hbox26), RSAKeyEncryptionCBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, RSAKeyEncryptionCBtn, _("Please check here if you want to store public/private keys with encryption ."), NULL); pubkeyPWDBtn = gtk_button_new_with_mnemonic (_("set password")); gtk_widget_show (pubkeyPWDBtn); gtk_box_pack_start (GTK_BOX (hbox26), pubkeyPWDBtn, TRUE, FALSE, 0); gtk_tooltips_set_tip (tooltips, pubkeyPWDBtn, _("Please push this button to set password for private/public key encryption."), NULL); hbox25 = gtk_hbox_new (TRUE, 0); gtk_widget_show (hbox25); gtk_box_pack_start (GTK_BOX (vbox32), hbox25, TRUE, TRUE, 0); useLockCBtn = gtk_check_button_new_with_mnemonic (_("Enable lock for enclosed messages")); gtk_widget_show (useLockCBtn); gtk_box_pack_start (GTK_BOX (hbox25), useLockCBtn, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, useLockCBtn, _("Please check here if you want to use the lock feature(Sent messages can be opened by receiver's password.)"), NULL); lockPWDBtn = gtk_button_new_with_mnemonic (_("set password")); gtk_widget_show (lockPWDBtn); gtk_box_pack_start (GTK_BOX (hbox25), lockPWDBtn, FALSE, FALSE, 0); gtk_tooltips_set_tip (tooltips, lockPWDBtn, _("Please push this button to set password for unlock messages."), NULL); ConfigGenericSecurityFLbl = gtk_label_new (_("Security Relevant Options")); gtk_widget_show (ConfigGenericSecurityFLbl); gtk_frame_set_label_widget (GTK_FRAME (configGenericSecurityFrame), ConfigGenericSecurityFLbl); gtk_label_set_use_markup (GTK_LABEL (ConfigGenericSecurityFLbl), TRUE); hbuttonbox4 = gtk_hbutton_box_new (); gtk_widget_show (hbuttonbox4); gtk_box_pack_start (GTK_BOX (vbox28), hbuttonbox4, TRUE, TRUE, 0); gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_SPREAD); configSecurityOKBtn = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (configSecurityOKBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox4), configSecurityOKBtn); GTK_WIDGET_SET_FLAGS (configSecurityOKBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, configSecurityOKBtn, _("Please push this button to apply the configuration."), NULL); configSecurityCancelBtn = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (configSecurityCancelBtn); gtk_container_add (GTK_CONTAINER (hbuttonbox4), configSecurityCancelBtn); GTK_WIDGET_SET_FLAGS (configSecurityCancelBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, configSecurityCancelBtn, _("Please push this button to discard the configuration."), NULL); g_signal_connect ((gpointer) RSAKeyEncryptionCBtn, "toggled", G_CALLBACK (on_RSAKeyEncryptionCBtn_toggled), NULL); g_signal_connect ((gpointer) pubkeyPWDBtn, "clicked", G_CALLBACK (on_pubkeyPWDBtn_clicked), NULL); g_signal_connect ((gpointer) useLockCBtn, "toggled", G_CALLBACK (on_useLockCBtn_toggled), NULL); g_signal_connect ((gpointer) lockPWDBtn, "clicked", G_CALLBACK (on_lockPWDBtn_clicked), NULL); g_signal_connect ((gpointer) configSecurityOKBtn, "clicked", G_CALLBACK (on_configSecurityOKBtn_clicked), NULL); g_signal_connect ((gpointer) configSecurityCancelBtn, "clicked", G_CALLBACK (on_configSecurityCancelBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (securityConfig, securityConfig, "securityConfig"); GLADE_HOOKUP_OBJECT (securityConfig, vbox28, "vbox28"); GLADE_HOOKUP_OBJECT (securityConfig, hostlistControlFrame, "hostlistControlFrame"); GLADE_HOOKUP_OBJECT (securityConfig, alignment25, "alignment25"); GLADE_HOOKUP_OBJECT (securityConfig, vbox29, "vbox29"); GLADE_HOOKUP_OBJECT (securityConfig, sendHostListChkBtn, "sendHostListChkBtn"); GLADE_HOOKUP_OBJECT (securityConfig, obtainHostlistChkBtn, "obtainHostlistChkBtn"); GLADE_HOOKUP_OBJECT (securityConfig, hostlistControlFrameLabel, "hostlistControlFrameLabel"); GLADE_HOOKUP_OBJECT (securityConfig, ConfigCipherFrame, "ConfigCipherFrame"); GLADE_HOOKUP_OBJECT (securityConfig, alignment26, "alignment26"); GLADE_HOOKUP_OBJECT (securityConfig, table5, "table5"); GLADE_HOOKUP_OBJECT (securityConfig, configRC2Bit40Btn, "configRC2Bit40Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configRC2Bit128Btn, "configRC2Bit128Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configRC2Bit256Btn, "configRC2Bit256Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configBFBit128Btn, "configBFBit128Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configBFBit256Btn, "configBFBit256Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configMD5Btn, "configMD5Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configSHA1Btn, "configSHA1Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configRSABit512Btn, "configRSABit512Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configRSABit1024Btn, "configRSABit1024Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configRSABit2048Btn, "configRSABit2048Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configAESBit128Btn, "configAESBit128Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configAESBit192Btn, "configAESBit192Btn"); GLADE_HOOKUP_OBJECT (securityConfig, configAESBit256Btn, "configAESBit256Btn"); GLADE_HOOKUP_OBJECT (securityConfig, ConfigCipherLabel, "ConfigCipherLabel"); GLADE_HOOKUP_OBJECT (securityConfig, configGenericSecurityFrame, "configGenericSecurityFrame"); GLADE_HOOKUP_OBJECT (securityConfig, alignment27, "alignment27"); GLADE_HOOKUP_OBJECT (securityConfig, vbox32, "vbox32"); GLADE_HOOKUP_OBJECT (securityConfig, keySelectAlgoCBtn, "keySelectAlgoCBtn"); GLADE_HOOKUP_OBJECT (securityConfig, hbox26, "hbox26"); GLADE_HOOKUP_OBJECT (securityConfig, RSAKeyEncryptionCBtn, "RSAKeyEncryptionCBtn"); GLADE_HOOKUP_OBJECT (securityConfig, pubkeyPWDBtn, "pubkeyPWDBtn"); GLADE_HOOKUP_OBJECT (securityConfig, hbox25, "hbox25"); GLADE_HOOKUP_OBJECT (securityConfig, useLockCBtn, "useLockCBtn"); GLADE_HOOKUP_OBJECT (securityConfig, lockPWDBtn, "lockPWDBtn"); GLADE_HOOKUP_OBJECT (securityConfig, ConfigGenericSecurityFLbl, "ConfigGenericSecurityFLbl"); GLADE_HOOKUP_OBJECT (securityConfig, hbuttonbox4, "hbuttonbox4"); GLADE_HOOKUP_OBJECT (securityConfig, configSecurityOKBtn, "configSecurityOKBtn"); GLADE_HOOKUP_OBJECT (securityConfig, configSecurityCancelBtn, "configSecurityCancelBtn"); GLADE_HOOKUP_OBJECT_NO_REF (securityConfig, tooltips, "tooltips"); return securityConfig; } GtkWidget* create_passwdDialog (void) { GtkWidget *passwdDialog; GdkPixbuf *passwdDialog_icon_pixbuf; GtkWidget *dialog_vbox10; GtkWidget *hbox27; GtkWidget *PassWordDialogLabel; GtkWidget *passwordEntry; GtkWidget *dialog_action_area10; GtkWidget *passWordDialogCancelBtn; GtkWidget *passWordDialogCOKBtn; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); passwdDialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (passwdDialog), _("Password")); gtk_window_set_resizable (GTK_WINDOW (passwdDialog), FALSE); gtk_window_set_destroy_with_parent (GTK_WINDOW (passwdDialog), TRUE); passwdDialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.png"); if (passwdDialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (passwdDialog), passwdDialog_icon_pixbuf); gdk_pixbuf_unref (passwdDialog_icon_pixbuf); } gtk_window_set_type_hint (GTK_WINDOW (passwdDialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox10 = GTK_DIALOG (passwdDialog)->vbox; gtk_widget_show (dialog_vbox10); hbox27 = gtk_hbox_new (FALSE, 0); gtk_widget_show (hbox27); gtk_box_pack_start (GTK_BOX (dialog_vbox10), hbox27, TRUE, TRUE, 0); PassWordDialogLabel = gtk_label_new (_("password")); gtk_widget_show (PassWordDialogLabel); gtk_box_pack_start (GTK_BOX (hbox27), PassWordDialogLabel, TRUE, TRUE, 0); passwordEntry = gtk_entry_new (); gtk_widget_show (passwordEntry); gtk_box_pack_start (GTK_BOX (hbox27), passwordEntry, TRUE, TRUE, 0); gtk_tooltips_set_tip (tooltips, passwordEntry, _("Please input password here(push OK button to finish.)."), NULL); gtk_entry_set_visibility (GTK_ENTRY (passwordEntry), FALSE); gtk_entry_set_invisible_char (GTK_ENTRY (passwordEntry), 8226); dialog_action_area10 = GTK_DIALOG (passwdDialog)->action_area; gtk_widget_show (dialog_action_area10); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area10), GTK_BUTTONBOX_END); passWordDialogCancelBtn = gtk_button_new_from_stock ("gtk-cancel"); gtk_widget_show (passWordDialogCancelBtn); gtk_dialog_add_action_widget (GTK_DIALOG (passwdDialog), passWordDialogCancelBtn, GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (passWordDialogCancelBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, passWordDialogCancelBtn, _("Please push this button to discard your input."), NULL); passWordDialogCOKBtn = gtk_button_new_from_stock ("gtk-ok"); gtk_widget_show (passWordDialogCOKBtn); gtk_dialog_add_action_widget (GTK_DIALOG (passwdDialog), passWordDialogCOKBtn, GTK_RESPONSE_OK); GTK_WIDGET_SET_FLAGS (passWordDialogCOKBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, passWordDialogCOKBtn, _("Please push this button to finish inputing password."), NULL); g_signal_connect ((gpointer) passwordEntry, "activate", G_CALLBACK (on_passwordEntry_activate), NULL); g_signal_connect ((gpointer) passWordDialogCancelBtn, "clicked", G_CALLBACK (on_passWordDialogCancelBtn_clicked), NULL); g_signal_connect ((gpointer) passWordDialogCOKBtn, "clicked", G_CALLBACK (on_passWordDialogCOKBtn_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (passwdDialog, passwdDialog, "passwdDialog"); GLADE_HOOKUP_OBJECT_NO_REF (passwdDialog, dialog_vbox10, "dialog_vbox10"); GLADE_HOOKUP_OBJECT (passwdDialog, hbox27, "hbox27"); GLADE_HOOKUP_OBJECT (passwdDialog, PassWordDialogLabel, "PassWordDialogLabel"); GLADE_HOOKUP_OBJECT (passwdDialog, passwordEntry, "passwordEntry"); GLADE_HOOKUP_OBJECT_NO_REF (passwdDialog, dialog_action_area10, "dialog_action_area10"); GLADE_HOOKUP_OBJECT (passwdDialog, passWordDialogCancelBtn, "passWordDialogCancelBtn"); GLADE_HOOKUP_OBJECT (passwdDialog, passWordDialogCOKBtn, "passWordDialogCOKBtn"); GLADE_HOOKUP_OBJECT_NO_REF (passwdDialog, tooltips, "tooltips"); return passwdDialog; } GtkWidget* create_errorDialog (void) { GtkWidget *errorDialog; GtkWidget *dialog_vbox12; GtkWidget *errorDialogvbox; GtkWidget *errorDialogErrorTitleLabel; GtkWidget *frame20; GtkWidget *alignment28; GtkWidget *table6; GtkWidget *errorDialogErrInfoFileLabel; GtkWidget *errorDialogErrInfoFuncLabel; GtkWidget *errorDialogErrInfoLineLabel; GtkWidget *errorDialogErrInfoFileNameContLabel; GtkWidget *errorDialogErrInfoFunctionContLabel; GtkWidget *errorDialogErrInfoFileLineContLabel; GtkWidget *errorDialogErrorInfoLabel; GtkWidget *errorDialogErrorMSGFrame; GtkWidget *alignment29; GtkWidget *scrolledwindow15; GtkWidget *errorDialogErrorTextView; GtkWidget *errorDialogErrorMSGFrameLabel; GtkWidget *dialog_action_area12; GtkWidget *errorDialogCloseBtn; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); errorDialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (errorDialog), _("error")); gtk_window_set_destroy_with_parent (GTK_WINDOW (errorDialog), TRUE); gtk_window_set_icon_name (GTK_WINDOW (errorDialog), "gtk-dialog-error"); gtk_window_set_type_hint (GTK_WINDOW (errorDialog), GDK_WINDOW_TYPE_HINT_DIALOG); dialog_vbox12 = GTK_DIALOG (errorDialog)->vbox; gtk_widget_show (dialog_vbox12); errorDialogvbox = gtk_vbox_new (FALSE, 0); gtk_widget_show (errorDialogvbox); gtk_box_pack_start (GTK_BOX (dialog_vbox12), errorDialogvbox, TRUE, TRUE, 0); errorDialogErrorTitleLabel = gtk_label_new (_("g2ipmsg detects an error")); gtk_widget_show (errorDialogErrorTitleLabel); gtk_box_pack_start (GTK_BOX (errorDialogvbox), errorDialogErrorTitleLabel, FALSE, FALSE, 0); frame20 = gtk_frame_new (NULL); gtk_widget_show (frame20); gtk_box_pack_start (GTK_BOX (errorDialogvbox), frame20, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (frame20), GTK_SHADOW_ETCHED_OUT); alignment28 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment28); gtk_container_add (GTK_CONTAINER (frame20), alignment28); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment28), 0, 0, 12, 0); table6 = gtk_table_new (3, 2, FALSE); gtk_widget_show (table6); gtk_container_add (GTK_CONTAINER (alignment28), table6); errorDialogErrInfoFileLabel = gtk_label_new (_("FileName")); gtk_widget_show (errorDialogErrInfoFileLabel); gtk_table_attach (GTK_TABLE (table6), errorDialogErrInfoFileLabel, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (errorDialogErrInfoFileLabel), 0, 0.5); gtk_misc_set_padding (GTK_MISC (errorDialogErrInfoFileLabel), 4, 4); errorDialogErrInfoFuncLabel = gtk_label_new (_("Function")); gtk_widget_show (errorDialogErrInfoFuncLabel); gtk_table_attach (GTK_TABLE (table6), errorDialogErrInfoFuncLabel, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (errorDialogErrInfoFuncLabel), 0, 0.5); gtk_misc_set_padding (GTK_MISC (errorDialogErrInfoFuncLabel), 4, 4); errorDialogErrInfoLineLabel = gtk_label_new (_("Line")); gtk_widget_show (errorDialogErrInfoLineLabel); gtk_table_attach (GTK_TABLE (table6), errorDialogErrInfoLineLabel, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_misc_set_alignment (GTK_MISC (errorDialogErrInfoLineLabel), 0, 0.5); gtk_misc_set_padding (GTK_MISC (errorDialogErrInfoLineLabel), 4, 4); errorDialogErrInfoFileNameContLabel = gtk_label_new (""); gtk_widget_show (errorDialogErrInfoFileNameContLabel); gtk_table_attach (GTK_TABLE (table6), errorDialogErrInfoFileNameContLabel, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_label_set_justify (GTK_LABEL (errorDialogErrInfoFileNameContLabel), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (errorDialogErrInfoFileNameContLabel), 0, 0.5); gtk_misc_set_padding (GTK_MISC (errorDialogErrInfoFileNameContLabel), 4, 4); errorDialogErrInfoFunctionContLabel = gtk_label_new (""); gtk_widget_show (errorDialogErrInfoFunctionContLabel); gtk_table_attach (GTK_TABLE (table6), errorDialogErrInfoFunctionContLabel, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND), 0, 0); gtk_label_set_justify (GTK_LABEL (errorDialogErrInfoFunctionContLabel), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (errorDialogErrInfoFunctionContLabel), 0, 0.5); gtk_misc_set_padding (GTK_MISC (errorDialogErrInfoFunctionContLabel), 4, 4); errorDialogErrInfoFileLineContLabel = gtk_label_new (""); gtk_widget_show (errorDialogErrInfoFileLineContLabel); gtk_table_attach (GTK_TABLE (table6), errorDialogErrInfoFileLineContLabel, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (errorDialogErrInfoFileLineContLabel), GTK_JUSTIFY_RIGHT); gtk_misc_set_alignment (GTK_MISC (errorDialogErrInfoFileLineContLabel), 0, 0.5); gtk_misc_set_padding (GTK_MISC (errorDialogErrInfoFileLineContLabel), 4, 4); errorDialogErrorInfoLabel = gtk_label_new (_("Error Information")); gtk_widget_show (errorDialogErrorInfoLabel); gtk_frame_set_label_widget (GTK_FRAME (frame20), errorDialogErrorInfoLabel); gtk_label_set_use_markup (GTK_LABEL (errorDialogErrorInfoLabel), TRUE); errorDialogErrorMSGFrame = gtk_frame_new (NULL); gtk_widget_show (errorDialogErrorMSGFrame); gtk_box_pack_start (GTK_BOX (errorDialogvbox), errorDialogErrorMSGFrame, TRUE, TRUE, 0); gtk_frame_set_shadow_type (GTK_FRAME (errorDialogErrorMSGFrame), GTK_SHADOW_NONE); alignment29 = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_widget_show (alignment29); gtk_container_add (GTK_CONTAINER (errorDialogErrorMSGFrame), alignment29); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment29), 0, 0, 12, 0); scrolledwindow15 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow15); gtk_container_add (GTK_CONTAINER (alignment29), scrolledwindow15); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow15), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow15), GTK_SHADOW_ETCHED_OUT); errorDialogErrorTextView = gtk_text_view_new (); gtk_widget_show (errorDialogErrorTextView); gtk_container_add (GTK_CONTAINER (scrolledwindow15), errorDialogErrorTextView); gtk_tooltips_set_tip (tooltips, errorDialogErrorTextView, _("Descriptions of the error."), NULL); gtk_text_view_set_editable (GTK_TEXT_VIEW (errorDialogErrorTextView), FALSE); gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (errorDialogErrorTextView), GTK_WRAP_CHAR); errorDialogErrorMSGFrameLabel = gtk_label_new (_("Error Message")); gtk_widget_show (errorDialogErrorMSGFrameLabel); gtk_frame_set_label_widget (GTK_FRAME (errorDialogErrorMSGFrame), errorDialogErrorMSGFrameLabel); gtk_label_set_use_markup (GTK_LABEL (errorDialogErrorMSGFrameLabel), TRUE); dialog_action_area12 = GTK_DIALOG (errorDialog)->action_area; gtk_widget_show (dialog_action_area12); gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area12), GTK_BUTTONBOX_END); errorDialogCloseBtn = gtk_button_new_from_stock ("gtk-close"); gtk_widget_show (errorDialogCloseBtn); gtk_dialog_add_action_widget (GTK_DIALOG (errorDialog), errorDialogCloseBtn, GTK_RESPONSE_CLOSE); GTK_WIDGET_SET_FLAGS (errorDialogCloseBtn, GTK_CAN_DEFAULT); gtk_tooltips_set_tip (tooltips, errorDialogCloseBtn, _("Please push this button to close this dialog."), NULL); g_signal_connect ((gpointer) errorDialogCloseBtn, "pressed", G_CALLBACK (on_errorDialogCloseBtn_pressed), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (errorDialog, errorDialog, "errorDialog"); GLADE_HOOKUP_OBJECT_NO_REF (errorDialog, dialog_vbox12, "dialog_vbox12"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogvbox, "errorDialogvbox"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrorTitleLabel, "errorDialogErrorTitleLabel"); GLADE_HOOKUP_OBJECT (errorDialog, frame20, "frame20"); GLADE_HOOKUP_OBJECT (errorDialog, alignment28, "alignment28"); GLADE_HOOKUP_OBJECT (errorDialog, table6, "table6"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrInfoFileLabel, "errorDialogErrInfoFileLabel"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrInfoFuncLabel, "errorDialogErrInfoFuncLabel"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrInfoLineLabel, "errorDialogErrInfoLineLabel"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrInfoFileNameContLabel, "errorDialogErrInfoFileNameContLabel"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrInfoFunctionContLabel, "errorDialogErrInfoFunctionContLabel"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrInfoFileLineContLabel, "errorDialogErrInfoFileLineContLabel"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrorInfoLabel, "errorDialogErrorInfoLabel"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrorMSGFrame, "errorDialogErrorMSGFrame"); GLADE_HOOKUP_OBJECT (errorDialog, alignment29, "alignment29"); GLADE_HOOKUP_OBJECT (errorDialog, scrolledwindow15, "scrolledwindow15"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrorTextView, "errorDialogErrorTextView"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogErrorMSGFrameLabel, "errorDialogErrorMSGFrameLabel"); GLADE_HOOKUP_OBJECT_NO_REF (errorDialog, dialog_action_area12, "dialog_action_area12"); GLADE_HOOKUP_OBJECT (errorDialog, errorDialogCloseBtn, "errorDialogCloseBtn"); GLADE_HOOKUP_OBJECT_NO_REF (errorDialog, tooltips, "tooltips"); return errorDialog; } g2ipmsg-0.9.6+dfsg/src/interface.h000066400000000000000000000021471126724573600167360ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ GtkWidget* create_messageWindow (void); GtkWidget* create_configWindow1 (void); GtkWidget* create_initialWindow (void); GtkWidget* create_downloadWindow (void); GtkWidget* create_downloadDialog (void); GtkWidget* create_downloadfilechooserdialog (void); GtkWidget* create_logfileChooserdialog (void); GtkWidget* create_aboutdialog (void); GtkWidget* create_readNotifyDialog (void); GtkWidget* create_viewWindow (void); GtkWidget* create_sendFailDialog (void); GtkWidget* create_attachFileEditor (void); GtkWidget* create_ipmsgDownloadOverWrite (void); GtkWidget* create_downloadMonitor (void); GtkWidget* create_passwdWindow (void); GtkWidget* create_absenceEditor (void); GtkWidget* create_DownloadConfirmDialog (void); GtkWidget* create_downLoadFailDialog (void); GtkWidget* create_downloadOpenDirOnlydialog (void); GtkWidget* create_viewConfigWindow (void); GtkWidget* create_userlistPopUpMenu (void); GtkWidget* create_clientInfoWindow (void); GtkWidget* create_securityConfig (void); GtkWidget* create_passwdDialog (void); GtkWidget* create_errorDialog (void); g2ipmsg-0.9.6+dfsg/src/ipmsg.c000066400000000000000000000133351126724573600161110ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Initial main.c file generated by Glade. Edit as required. * Glade will not overwrite this file. */ #include "common.h" #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) udp_con_t *udp_con; static udp_con_t con; void read_message(gpointer data, gint source, GdkInputCondition condition) { int rc = 0; char *msg_buff = NULL; size_t len = 0; udp_con_t *con = NULL; con = (udp_con_t *) data; if (con == NULL) return; gdk_input_remove(con->target_tag); len=0; msg_buff=NULL; udp_recv_message(udp_con,&msg_buff,&len); if (len>0) { msg_data_t msg; init_message_data(&msg); dbg_out("Message arrive\n"); rc = parse_message(udp_get_peeraddr(udp_con), &msg, msg_buff, len); g_free(msg_buff); msg_buff=NULL; if (rc == 0) ipmsg_dispatch_message(udp_con,&msg); release_message_data(&msg); } dbg_out("Add socket:%d\n",udp_con->soc); udp_con->target_tag = gdk_input_add(udp_con->soc,GDK_INPUT_READ,read_message, con); } int ipmsg_send_broad_cast(const udp_con_t *con,const char *msg,size_t len){ if ( (!con) || (!msg) ) return -EINVAL; userdb_send_broad_cast(con,msg,len); hostinfo_send_broad_cast(con,msg,len); return 0; } int ipmsg_send_message(const udp_con_t *con, const char *ipaddr, const char *msg,size_t len) { int rc = 0; if (ipaddr != NULL) { /* ユニキャスト */ rc = udp_send_message(con, ipaddr, hostinfo_refer_ipmsg_port(), msg, len); if (rc >0 ) rc = 0; } else { /* ブロードキャスト */ userdb_send_broad_cast(con,msg,len); hostinfo_send_broad_cast(con,msg,len); } return rc; } int internal_extend_memory(void **buff_p,size_t new_size,size_t orig_size,gboolean is_clear) { void *new_buff; void *orig_buff; if ( (!buff_p) || (!(*buff_p)) ) return -EINVAL; orig_buff=*buff_p; new_buff=g_malloc(new_size); if (!new_buff) return -ENOMEM; if (is_clear) memset(new_buff,0,new_size); memmove(new_buff,orig_buff,orig_size); g_free(orig_buff); *buff_p=new_buff; return 0; } int create_lock_file(void){ int fd = 0; int rc = 0; fd = open(IPMG_LOCK_FILE,O_RDWR|O_EXCL|O_CREAT,(S_IRUSR|S_IWUSR)); if (fd < 0) { fd = open(IPMG_LOCK_FILE, O_RDWR); if (fd < 0) { rc = -errno; goto error_out; } } rc = flock(fd, LOCK_EX|LOCK_NB); if (rc < 0) { rc = -errno; goto error_out; } rc = 0; error_out: if (rc < 0) { ipmsg_err_dialog_mordal("%s:%s %s : %d (%s)\n", _("Can not setup lock file"), IPMG_LOCK_FILE, _("errno"), rc, strerror(errno)); } success_out: return rc; } int release_lock_file(void){ int fd; int rc; fd=open(IPMG_LOCK_FILE,O_RDWR); if (fd<0) return -errno; rc=flock(fd,LOCK_UN); if (rc<0) return -errno; rc=unlink(IPMG_LOCK_FILE); if (rc<0) return -errno; return 0; } int init_ipmsg(void){ int rc; char *cwd=NULL; rc=get_envval("HOME",&cwd); if (!rc) rc=chdir(cwd); else { rc=get_envval("TMPDIR",&cwd); if (!rc) rc=chdir(cwd); else rc=chdir("/tmp"); } if (rc) { rc=-errno; goto error_out; } userdb_init_userdb(); logfile_init_logfile(); init_message_info_manager(); init_sound_system(PACKAGE); #if defined(USE_OPENSSL) pcrypt_crypt_init_keys(); #endif /* USE_OPENSSL */ //udp_server_setup(hostinfo_refer_ipmsg_port(), PF_UNSPEC); memset(&con,0,sizeof(udp_con_t)); rc=udp_setup_server(&con,hostinfo_refer_ipmsg_port(),hostinfo_get_ipmsg_system_addr_family()); if (rc<0) goto error_out; rc=udp_enable_broadcast(&con); if (rc<0) goto error_out; udp_con=&con; dbg_out("Add socket:%d\n", udp_con->soc); udp_con->target_tag = gdk_input_add(udp_con->soc, GDK_INPUT_READ, read_message, udp_con); ipmsg_send_br_entry(udp_con,0); rc=0; error_out: if (cwd) g_free(cwd); return rc; } void cleanup_ipmsg(void){ ipmsg_send_br_exit(udp_con,hostinfo_get_normal_send_flags()); udp_release_connection(udp_con); logfile_shutdown_logfile(); dbg_out("UI Thread ended\n"); cleanup_sound_system(); #if defined(USE_OPENSSL) pcrypt_crypt_release_keys(); #endif /* USE_OPENSSL */ userdb_cleanup_userdb(); hostinfo_cleanup_hostinfo(); } g2ipmsg-0.9.6+dfsg/src/ipmsg.h000066400000000000000000000140471126724573600161170ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(IPMSG_H) #define IPMSG_H #define IPMSG_VERSION 0x001 #define IPMSG_PORT 0x979 /* command */ #define IPMSG_NOOPERATION 0x00000000UL #define IPMSG_BR_ENTRY 0x00000001UL #define IPMSG_BR_EXIT 0x00000002UL #define IPMSG_ANSENTRY 0x00000003UL #define IPMSG_BR_ABSENCE 0x00000004UL #define IPMSG_BR_ISGETLIST 0x00000010UL #define IPMSG_OKGETLIST 0x00000011UL #define IPMSG_GETLIST 0x00000012UL #define IPMSG_ANSLIST 0x00000013UL #define IPMSG_BR_ISGETLIST2 0x00000018UL #define IPMSG_SENDMSG 0x00000020UL #define IPMSG_RECVMSG 0x00000021UL #define IPMSG_READMSG 0x00000030UL #define IPMSG_DELMSG 0x00000031UL #define IPMSG_ANSREADMSG 0x00000032UL #define IPMSG_GETINFO 0x00000040UL #define IPMSG_SENDINFO 0x00000041UL #define IPMSG_GETABSENCEINFO 0x00000050UL #define IPMSG_SENDABSENCEINFO 0x00000051UL #define IPMSG_GETFILEDATA 0x00000060UL #define IPMSG_RELEASEFILES 0x00000061UL #define IPMSG_GETDIRFILES 0x00000062UL #define IPMSG_GETPUBKEY 0x00000072UL #define IPMSG_ANSPUBKEY 0x00000073UL /* option for all command */ #define IPMSG_ABSENCEOPT 0x00000100UL #define IPMSG_SERVEROPT 0x00000200UL #define IPMSG_DIALUPOPT 0x00010000UL #define IPMSG_FILEATTACHOPT 0x00200000UL #define IPMSG_ENCRYPTOPT 0x00400000UL #define IPMSG_UTF8OPT 0x00800000UL /* option for send command */ #define IPMSG_SENDCHECKOPT 0x00000100UL #define IPMSG_SECRETOPT 0x00000200UL #define IPMSG_BROADCASTOPT 0x00000400UL #define IPMSG_MULTICASTOPT 0x00000800UL #define IPMSG_NOPOPUPOPT 0x00001000UL #define IPMSG_AUTORETOPT 0x00002000UL #define IPMSG_RETRYOPT 0x00004000UL #define IPMSG_PASSWORDOPT 0x00008000UL #define IPMSG_NOLOGOPT 0x00020000UL #define IPMSG_NEWMUTIOPT 0x00040000UL #define IPMSG_NOADDLISTOPT 0x00080000UL #define IPMSG_READCHECKOPT 0x00100000UL #define IPMSG_SECRETEXOPT (IPMSG_READCHECKOPT|IPMSG_SECRETOPT) #define IPMSG_NO_REPLY_OPTS (IPMSG_BROADCASTOPT|IPMSG_AUTORETOPT) /* encryption flags for encrypt command */ #define IPMSG_RSA_512 0x00000001UL #define IPMSG_RSA_1024 0x00000002UL #define IPMSG_RSA_2048 0x00000004UL #define IPMSG_RC2_40 0x00001000UL #define IPMSG_RC2_128 0x00004000UL #define IPMSG_RC2_256 0x00008000UL #define IPMSG_BLOWFISH_128 0x00020000UL #define IPMSG_BLOWFISH_256 0x00040000UL #define IPMSG_AES_128 0x00100000UL #define IPMSG_AES_192 0x00200000UL #define IPMSG_AES_256 0x00400000UL #define IPMSG_SIGN_STAMPOPT 0x01000000UL #define IPMSG_SIGN_MD5 0x10000000UL #define IPMSG_SIGN_SHA1 0x20000000UL /* compatibilty for Win beta version */ #define IPMSG_RC2_40OLD 0x00000010UL // for beta1-4 only #define IPMSG_RC2_128OLD 0x00000040UL // for beta1-4 only #define IPMSG_BLOWFISH_128OLD 0x00000400UL // for beta1-4 only #define IPMSG_RC2_40ALL (IPMSG_RC2_40|IPMSG_RC2_40OLD) #define IPMSG_RC2_128ALL (IPMSG_RC2_128|IPMSG_RC2_128OLD) #define IPMSG_BLOWFISH_128ALL (IPMSG_BLOWFISH_128|IPMSG_BLOWFISH_128OLD) /* file types for fileattach command */ #define IPMSG_FILE_REGULAR 0x00000001UL #define IPMSG_FILE_DIR 0x00000002UL #define IPMSG_FILE_RETPARENT 0x00000003UL // return parent directory #define IPMSG_FILE_SYMLINK 0x00000004UL #define IPMSG_FILE_CDEV 0x00000005UL // for UNIX #define IPMSG_FILE_BDEV 0x00000006UL // for UNIX #define IPMSG_FILE_FIFO 0x00000007UL // for UNIX #define IPMSG_FILE_RESFORK 0x00000010UL // for Mac /* file attribute options for fileattach command */ #define IPMSG_FILE_RONLYOPT 0x00000100UL #define IPMSG_FILE_HIDDENOPT 0x00001000UL #define IPMSG_FILE_EXHIDDENOPT 0x00002000UL // for MacOS X #define IPMSG_FILE_ARCHIVEOPT 0x00004000UL #define IPMSG_FILE_SYSTEMOPT 0x00008000UL /* extend attribute types for fileattach command */ #define IPMSG_FILE_UID 0x00000001UL #define IPMSG_FILE_USERNAME 0x00000002UL // uid by string #define IPMSG_FILE_GID 0x00000003UL #define IPMSG_FILE_GROUPNAME 0x00000004UL // gid by string #define IPMSG_FILE_PERM 0x00000010UL // for UNIX #define IPMSG_FILE_MAJORNO 0x00000011UL // for UNIX devfile #define IPMSG_FILE_MINORNO 0x00000012UL // for UNIX devfile #define IPMSG_FILE_CTIME 0x00000013UL // for UNIX #define IPMSG_FILE_MTIME 0x00000014UL #define IPMSG_FILE_ATIME 0x00000015UL #define IPMSG_FILE_CREATETIME 0x00000016UL #define IPMSG_FILE_CREATOR 0x00000020UL // for Mac #define IPMSG_FILE_FILETYPE 0x00000021UL // for Mac #define IPMSG_FILE_FINDERINFO 0x00000022UL // for Mac #define IPMSG_FILE_ACL 0x00000030UL #define IPMSG_FILE_ALIASFNAME 0x00000040UL // alias fname #define IPMSG_FILE_UNICODEFNAME 0x00000041UL // UNICODE fname #define FILELIST_SEPARATOR '\a' #define HOSTLIST_SEPARATOR '\a' #define HOSTLIST_DUMMY "\b" #define HLIST_ENTRY_SEPARATOR ':' #endif g2ipmsg-0.9.6+dfsg/src/ipmsg_types.h000066400000000000000000000035351126724573600173430ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(IPMSG_TYPES_H) #define IPMSG_TYPES_H /** @file * @brief IPMSG型定義 * @author Takeharu KATO */ #ifdef HAVE_CONFIG_H # include #endif #include /** パケット番号型 */ typedef int32_t pktno_t; /** ケイパビリティ型 */ typedef unsigned long ipmsg_cap_t; /** 送信フラグ型 */ typedef unsigned long ipmsg_send_flags_t; /** コマンド型 */ typedef unsigned long ipmsg_command_t; /** ファイル種別型 */ typedef unsigned long ipmsg_ftype_t; #endif /* IPMSG_TYPES_H */ g2ipmsg-0.9.6+dfsg/src/logfile.c000066400000000000000000000165241126724573600164160ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" static int handle=-1; GStaticMutex logfile_mutex = G_STATIC_MUTEX_INIT; static int open_log_file(const char *filepath,int *new_fd) { int fd; if ( (!filepath) || (!new_fd) ) return -EINVAL; g_assert(filepath); fd=open(filepath,O_APPEND|O_CREAT|O_WRONLY,S_IRUSR|S_IWUSR); if (fd < 0) { err_out("open fail:[%s] %s(%d)\n",filepath,strerror(errno),errno); return -errno; } *new_fd=fd; return 0; } static int internal_reopen_logfile(const char *filepath){ int new_fd; int rc; if (g_static_mutex_trylock(&logfile_mutex)) { g_static_mutex_unlock(&logfile_mutex); g_assert_not_reached(); /* ロックチェック失敗 */ } g_assert(filepath); rc=open_log_file(filepath,&new_fd); if (rc<0) return rc; if (handle>0) { rc=0; if (close(handle)<0) { rc=-errno; close(new_fd); return rc; } } dbg_out("Change log into %s(fd=%d)\n",filepath,new_fd); handle=new_fd; return 0; } int logfile_init_logfile(void){ const gchar *filepath; int new_fd; int rc; filepath=hostinfo_refer_ipmsg_logfile(); if (!filepath) return -EINVAL; if (handle>0) return -EEXIST; rc = open_log_file(filepath,&new_fd); if(rc == 0){ dbg_out("Init log into %s(fd=%d)\n",filepath,new_fd); handle=new_fd; } return 0; } int logfile_reopen_logfile(const char *filepath){ int new_fd; int rc; if (!filepath) return -EINVAL; g_static_mutex_lock(&logfile_mutex); rc=internal_reopen_logfile(filepath); g_static_mutex_unlock(&logfile_mutex); return rc; } /* *この関数はログファイルロックを獲得してから呼び出すこと. */ static int confirm_file_existence(void){ char *fpath; struct stat buf; struct stat fd_buf; int rc; int rc_fd; int new_fd; if (g_static_mutex_trylock(&logfile_mutex)) { g_static_mutex_unlock(&logfile_mutex); g_assert_not_reached(); /* ロックチェック失敗 */ } fpath=(char *)hostinfo_refer_ipmsg_logfile(); if (!fpath) return -EINVAL; memset(&buf,0,sizeof(buf)); memset(&fd_buf,0,sizeof(fd_buf)); rc=stat(fpath,&buf); rc_fd=fstat(handle, &fd_buf); if ( (rc<0) || (rc_fd<0) || (buf.st_ino != fd_buf.st_ino) || (buf.st_dev != fd_buf.st_dev) ) { /* ファイルが消された場合 再度オープンする*/ /* ファイル記述子を握っているので, * ファイルを移動/削除して同じ名前のファイルを作成した場合は, * 別のinodeになるので異常を検出するはず. */ dbg_out("Stat fail:%s so force reopen:%s (%d)\n", fpath, strerror(errno), errno); rc=internal_reopen_logfile(fpath); } return rc; } /* *この関数はログファイルロックを獲得してから呼び出すこと. */ static int write_one_line(const char *string) { int rc; size_t len; if (!string) return -EINVAL; if (handle<0) return -ENOENT; if (g_static_mutex_trylock(&logfile_mutex)) { g_static_mutex_unlock(&logfile_mutex); g_assert_not_reached(); /* ロックチェック失敗 */ } confirm_file_existence(); len=strlen(string); rc=write(handle,string,len); if (rc<0) { dbg_out("write fail:%s(%d)\n",strerror(errno),errno); goto error_out; } if (len != rc) { dbg_out("Partial write: len=%d rc=%d\n",len,rc); goto error_out; } len=strlen(LOGFILE_NEW_LINE); rc=write(handle,LOGFILE_NEW_LINE,len); if (rc<0) { dbg_out("write fail:%s(%d)\n",strerror(errno),errno); goto error_out; } if (len != rc) { dbg_out("Partial write: len=%d rc=%d\n",len,rc); goto error_out; } rc=0; error_out: return rc; } int logfile_write_log(const char *direction,const char *ipaddr,const char *message){ char buffer[LOGFILE_MAX_LINE_LEN]; char logname[64]; char loged_ipaddr[64]; userdb_t *user_info=NULL; int rc; struct timeval tv; g_assert(direction); if ( (!ipaddr) || (!message) ) return -EINVAL; dbg_out("logging: direction: %s addr : %s message:%s\n", direction, ipaddr, message); rc=userdb_search_user_by_addr(ipaddr,(const userdb_t **)&user_info); if (rc) return rc; if (handle<0) return -ENOENT; rc=flock(handle,LOCK_EX|LOCK_NB); if (rc<0) return -errno; rc=lseek(handle, 0,SEEK_END); if (rc<0) return -errno; logname[0]=loged_ipaddr[0]='\0'; if (hostinfo_refer_ipmsg_logname_logging()) snprintf(logname,63,"[%s]",user_info->user); if (hostinfo_refer_ipmsg_ipaddr_logging()) snprintf(loged_ipaddr,63,"/%s",ipaddr); logname[64-1]=loged_ipaddr[64-1]='\0'; g_static_mutex_lock(&logfile_mutex); write_one_line(LOGFILE_START_HEADER); snprintf(buffer,LOGFILE_MAX_LINE_LEN-1,LOGFILE_FMT, direction, user_info->nickname, logname, user_info->group, user_info->host, loged_ipaddr); write_one_line(buffer); gettimeofday(&tv,NULL); ctime_r(&(tv.tv_sec),buffer); write_one_line(buffer); write_one_line(LOGFILE_END_HEADER); write_one_line(message); write_one_line(""); rc=0; g_static_mutex_unlock(&logfile_mutex); destroy_user_info(user_info); rc=flock(handle,LOCK_UN); if (rc<0) return -errno; return rc; } int logfile_send_log(const char *ipaddr, const ipmsg_send_flags_t flags, const char *message){ dbg_out("send log: addr : %s message:%s\n", ipaddr, message); if (!hostinfo_refer_ipmsg_enable_log()) return -ENOENT; return logfile_write_log(LOGFILE_TO_STR,ipaddr,message); } int logfile_recv_log(const char *ipaddr, const ipmsg_send_flags_t flags, const char *message) { int rc = 0; dbg_out("recv log: addr : %s message:%s\n", ipaddr, message); if (!hostinfo_refer_ipmsg_enable_log()) return -ENOENT; /* * 施錠に関する処理 */ if ( ( flags & IPMSG_PASSWORDOPT ) && ( hostinfo_refer_ipmsg_log_locked_message_handling() ) ) { return -EPERM; /* 施錠付きの場合, 後で開封時にロギングする */ } rc = logfile_write_log(LOGFILE_FROM_STR, ipaddr, message); return rc; } int logfile_shutdown_logfile(void){ if (handle>0) close(handle); return 0; } g2ipmsg-0.9.6+dfsg/src/logfile.h000066400000000000000000000040431126724573600164140ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(LOGFILE_H) #define LOGFILE_H #define LOGFILE_START_HEADER "=====================================" #define LOGFILE_END_HEADER "-------------------------------------" #define LOGFILE_NEW_LINE "\n" #define LOGFILE_MAX_LINE_LEN 0x1000 #define LOGFILE_FMT " %s %s %s (%s/%s%s)" #define LOGFILE_TO_STR "To:" #define LOGFILE_FROM_STR "From:" #define LOGFILE_SND_HLIST_STR "SEND HOST LIST:" int logfile_init_logfile(void); int logfile_reopen_logfile(const char *filepath); int logfile_send_log(const char *ipaddr, const ipmsg_send_flags_t flags, const char *message); int logfile_recv_log(const char *ipaddr, const ipmsg_send_flags_t flags, const char *message); int logfile_shutdown_logfile(void); #endif /* LOGFILE_H */ g2ipmsg-0.9.6+dfsg/src/main.c000066400000000000000000000074751126724573600157260ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * Initial main.c file generated by Glade. Edit as required. * Glade will not overwrite this file. */ #include "common.h" GThread *ui_thread; GThread *tcp_thread; gpointer ipmsg_ui_thread(gpointer data){ GtkWidget *initialContainer; GTimer *wait_timer=NULL; gulong elapsed; #if defined(G2IPMSG_SYSTRAY) && GTK_CHECK_VERSION(2,10,0) if (hostinfo_refer_enable_systray()) { /* Note: See:start_message_watcher in recvmsg.c * Strictly speaking, status icon is not Gtk Widget, * start_message_watcher can distinguish them, * so assgin the icon to initialContainer */ initialContainer = create_ipmsg_status_icon(); g_assert(initialContainer); wait_timer=g_timer_new(); g_assert(wait_timer); for(elapsed=0;elapsed0) { GList *node; /* FIXME */ node=g_list_first (monitor_wins); g_assert(node->data); gtk_window_present (GTK_WINDOW(node->data)); g_static_mutex_unlock(&monitor_win_mutex); return; } window=create_downloadMonitor(); g_assert(window); setup_download_window(window); g_static_mutex_unlock(&monitor_win_mutex); download_monitor_add_waiter_window(window); gtk_widget_show(window); } void on_mainmenu_new_message_item(gpointer menuitem){ dbg_out("here\n"); on_startBtn_clicked (NULL,NULL); } void on_mainmenu_download_item(gpointer menuitem){ on_create_download_monitor(); } void on_mainmenu_preferences_item(gpointer menuitem){ dbg_out("here\n"); on_preferences1_activate(menuitem,NULL); } void on_mainmenu_config_security_item(gpointer menuitem){ dbg_out("here\n"); on_menu_security_configuration_activate(menuitem,NULL); } void on_mainmenu_about_item(gpointer menuitem){ dbg_out("here\n"); ipmsg_show_about_dialog(); } void on_mainmenu_log_item(gpointer menuitem){ dbg_out("here\n"); show_ipmsg_log(); } void on_mainmenu_absent_item(gpointer menuitem){ dbg_out("here\n"); } void on_mainmenu_attend_item(gpointer menuitem){ dbg_out("here\n"); hostinfo_set_ipmsg_absent(FALSE); ipmsg_send_br_absence(udp_con,0); } void on_mainmenu_foreground_win_item(gpointer menuitem){ dbg_out("here\n"); present_all_displayed_windows(); } void on_mainmenu_remove_win_item(gpointer menuitem){ dbg_out("here\n"); destroy_all_opened_windows(); } void on_mainmenu_quit_item (gpointer menuitem){ dbg_out("here\n"); on_initialWindow_destroy(GTK_OBJECT(menuitem),NULL); } void on_fuzai_item_activate (gpointer user_data){ int max_index; int index; index=(int)user_data - 1; dbg_out("here:%x\n",index); if (hostinfo_refer_absent_length(&max_index)) { g_assert_not_reached(); } dbg_out("Max index:%d\n",max_index); if ( (index >= max_index) || (index < 0) ) return; hostinfo_set_absent_id(index); hostinfo_set_ipmsg_absent(TRUE); ipmsg_send_br_absence(udp_con,0); return; } void on_fuzai_config_activate (gpointer menuitem){ GtkWidget *window; dbg_out("here:%x\n",(unsigned int)menuitem); window=internal_create_fuzai_editor(); gtk_widget_show(window); } static GtkWidget * create_fuzai_menu(void){ GtkWidget *menu; GtkWidget *new_item; GtkWidget *separator4_item; GtkWidget *config_item; gchar name[16]; gchar *title; int i,max_index=0; menu=gtk_menu_new(); if (hostinfo_refer_absent_length(&max_index)) { g_assert_not_reached(); } dbg_out("Max index:%d\n",max_index); for(i=0;ibutton); switch (event->button) { case 3: gtk_menu_popup(GTK_MENU(create_main_menu()), NULL, NULL, NULL, NULL, event->button, event->time); default: /* main menu */ return FALSE; break; } return TRUE; } void ipmsg_show_about_dialog(void){ GdkPixbuf *aboutDialog_icon_pixbuf; GtkWidget *aboutDialog; const gchar *authors[]={ G2IPMSG_AUTHOR, NULL }; dbg_out("here\n"); aboutDialog=create_aboutdialog (); g_assert(aboutDialog); gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(aboutDialog),(const gchar **)authors); gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG(aboutDialog),G2IPMSG_TRANSLATOR); gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG(aboutDialog),_("Takeharu KATO")); aboutDialog_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (aboutDialog_icon_pixbuf) { gtk_window_set_icon (GTK_WINDOW (aboutDialog), aboutDialog_icon_pixbuf); gdk_pixbuf_unref (aboutDialog_icon_pixbuf); } gtk_widget_show (aboutDialog); } static void do_update_monitor_win(gpointer data,gpointer user_data) { GtkWidget *window; GtkWidget *view; GtkTreeSelection *sel; if (!data) return; window=GTK_WIDGET(data); view=lookup_widget(GTK_WIDGET(window),"treeview5"); g_assert(view); update_download_view(window); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); update_download_monitor_button(sel); return; } int download_monitor_delete_btn_action(GtkButton *button, gpointer user_data){ GtkWidget *window; GtkWidget *view; GtkTreeSelection *sel; GtkTreeIter selected_row; GtkTreeModel *model; pktno_t pkt_no; dbg_out("here\n"); g_static_mutex_lock(&monitor_win_mutex); window=lookup_widget(GTK_WIDGET(button),"downloadMonitor"); view=lookup_widget(GTK_WIDGET(window),"treeview5"); g_assert(view); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); if (gtk_tree_selection_get_selected(sel, &model, &selected_row)) { gtk_tree_model_get(model, &selected_row, 3, &pkt_no, -1); dbg_out("Relase:%ld\n",pkt_no); release_attach_file_block(pkt_no,TRUE); gtk_list_store_remove(GTK_LIST_STORE(model), &selected_row); } download_monitor_update_state(); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); update_download_monitor_button(sel); g_static_mutex_unlock(&monitor_win_mutex); } int download_monitor_update_state(void){ g_static_mutex_lock(&monitor_win_mutex); g_list_foreach(monitor_wins, do_update_monitor_win, NULL); g_static_mutex_unlock(&monitor_win_mutex); } /* *スレッド経由でのリリースファイル */ void download_monitor_release_file(const pktno_t pktno,int fileid){ g_static_mutex_lock(&monitor_win_mutex); release_attach_file(pktno,fileid); gdk_threads_enter(); g_list_foreach(monitor_wins, do_update_monitor_win, NULL); gdk_threads_leave(); g_static_mutex_unlock(&monitor_win_mutex); } /* *スレッド経由でのリリースファイル */ int download_monitor_refer_file(const pktno,int fileid,unsigned long *ipmsg_fattr,const char **path, off_t *size){ int rc; g_static_mutex_lock(&monitor_win_mutex); if (g_list_length(monitor_wins)>0) { rc=refer_attach_file(pktno,fileid,ipmsg_fattr,path,size); } g_static_mutex_unlock(&monitor_win_mutex); return rc; } int download_monitor_add_waiter_window(GtkWidget *window){ if (!window) return -EINVAL; dbg_out("here %x\n",(unsigned int)window); g_static_mutex_lock(&monitor_win_mutex); monitor_wins=g_list_append(monitor_wins,(gpointer)window); g_static_mutex_unlock(&monitor_win_mutex); return 0; } int download_monitor_remove_waiter_window(GtkWidget *window){ if (!window) return -EINVAL; dbg_out("here %x\n",(unsigned int)window); g_static_mutex_lock(&monitor_win_mutex); monitor_wins=g_list_remove(monitor_wins,(gpointer)window); g_static_mutex_unlock(&monitor_win_mutex); return 0; } int show_ipmsg_log(void){ int rc; gchar *logfile; GnomeVFSMimeApplication *app; GList params; gchar *url; dbg_out("here\n"); rc=0; if (!hostinfo_refer_ipmsg_enable_log()) goto error_out; rc=-ENOMEM; if (g_path_is_absolute ((gchar *)hostinfo_refer_ipmsg_logfile())) logfile=g_strdup((gchar *)hostinfo_refer_ipmsg_logfile()); else { gchar *current_dir; current_dir=g_get_current_dir(); if (!current_dir) goto error_out; logfile=g_build_filename (current_dir,hostinfo_refer_ipmsg_logfile(),NULL); g_free(current_dir); dbg_out("Absolute path:%s\n",logfile); } if (!logfile) goto error_out; url=gnome_vfs_get_uri_from_local_path(logfile); if (!url) goto free_log_file; params.data = (char *) url; params.prev = NULL; params.next = NULL; rc=-ENOENT; app=gnome_vfs_mime_get_default_application("text/plain"); if (!app) goto free_url; gnome_vfs_mime_application_launch(app, ¶ms); gnome_vfs_mime_application_free (app); rc=0; free_url: g_free(url); free_log_file: g_free(logfile); error_out: return rc; } GtkWidget* internal_create_viewConfigWindow (void){ GtkWidget *window=NULL; GtkWidget *viewConfigGroupChkBtn=NULL; GtkWidget *viewConfigHostChkBtn=NULL; GtkWidget *viewConfigIPAddrChkBtn=NULL; GtkWidget *viewConfigLogonChkBtn=NULL; GtkWidget *viewConfigPriorityChkBtn=NULL; GtkWidget *viewConfigGridChkBtn=NULL; GtkWidget *viewConfigGroupSortChkBtn=NULL; GtkWidget *viewConfigGroupInverseSortBtn=NULL; GtkWidget *viewConfigSecondKeyUserRBtn=NULL; GtkWidget *viewConfigSecondKeyMachineRBtn=NULL; GtkWidget *viewConfigSecondKeyIPAddrRBtn=NULL; GtkWidget *viewConfigOtherSortInverseBtn=NULL; uint state; state=hostinfo_refer_header_state(); window=create_viewConfigWindow(); viewConfigGroupChkBtn=lookup_widget(window,"viewConfigGroupChkBtn"); viewConfigHostChkBtn=lookup_widget(window, "viewConfigHostChkBtn"); viewConfigIPAddrChkBtn=lookup_widget(window,"viewConfigIPAddrChkBtn"); viewConfigLogonChkBtn=lookup_widget(window,"viewConfigLogonChkBtn"); viewConfigPriorityChkBtn=lookup_widget(window,"viewConfigPriorityChkBtn"); viewConfigGridChkBtn=lookup_widget(window,"viewConfigGridChkBtn"); viewConfigGroupSortChkBtn=lookup_widget(window,"groupSortCheckBtn"); viewConfigGroupInverseSortBtn=lookup_widget(window,"groupInverseBtn"); viewConfigSecondKeyUserRBtn=lookup_widget(window,"secondKeyUserRBtn"); viewConfigSecondKeyMachineRBtn=lookup_widget(window,"secondKeyMachineRBtn"); viewConfigSecondKeyIPAddrRBtn=lookup_widget(window,"secondKeyIPAddrRBtn"); viewConfigOtherSortInverseBtn=lookup_widget(window,"secondKeyInverseBtn"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigGroupChkBtn),(state&HEADER_VISUAL_GROUP_ID)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigHostChkBtn),(state&HEADER_VISUAL_HOST_ID)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigIPAddrChkBtn),(state&HEADER_VISUAL_IPADDR_ID)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigLogonChkBtn),(state&HEADER_VISUAL_LOGON_ID)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigPriorityChkBtn),(state&HEADER_VISUAL_PRIO_ID)); #if GTK_CHECK_VERSION(2,10,6) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigGridChkBtn),(state&HEADER_VISUAL_GRID_ID)); #else gtk_widget_set_sensitive(viewConfigGridChkBtn,FALSE); #endif /* * Group sort */ if (hostinfo_refer_ipmsg_is_sort_with_group()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigGroupSortChkBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigGroupSortChkBtn),FALSE); if (hostinfo_refer_ipmsg_group_sort_order()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigGroupInverseSortBtn),FALSE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigGroupInverseSortBtn),TRUE); /* * Sub sort */ switch(hostinfo_refer_ipmsg_sub_sort_id()) { default: case SORT_TYPE_USER: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyUserRBtn),TRUE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyIPAddrRBtn),FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyMachineRBtn),FALSE); break; case SORT_TYPE_MACHINE: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyUserRBtn),FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyIPAddrRBtn),FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyMachineRBtn),TRUE); break; case SORT_TYPE_IPADDR: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyUserRBtn),FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyIPAddrRBtn),TRUE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigSecondKeyMachineRBtn),FALSE); break; } if (hostinfo_refer_ipmsg_sub_sort_order()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigOtherSortInverseBtn),FALSE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(viewConfigOtherSortInverseBtn),TRUE); return window; } g2ipmsg-0.9.6+dfsg/src/menu.h000066400000000000000000000045131126724573600157410ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(MENU_H) #define MENU_H #include #include gboolean on_init_win_event_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data); GtkWidget *create_main_menu(void); int show_ipmsg_log(void); void on_mainmenu_new_message_item(gpointer menuitem); int download_monitor_add_waiter_window(GtkWidget *window); int download_monitor_remove_waiter_window(GtkWidget *window); int download_monitor_update_state(void); void on_create_download_monitor(void); GtkWidget* internal_create_viewConfigWindow (void); void download_monitor_release_file(const pktno_t pktno,int fileid); void release_download_info(gpointer data, gpointer user_data); int download_monitor_update_state_from_thread(void); int download_monitor_delete_btn_action(GtkButton *button, gpointer user_data); GtkWidget *create_menu_item(const char *name, const char *label, gpointer data, void (*menu_item_callback_function) (gpointer user_data)); #endif /* MENU_H */ g2ipmsg-0.9.6+dfsg/src/message.c000066400000000000000000000150731126724573600164170ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" int get_command_from_msg(const msg_data_t *msg, unsigned long *command, unsigned long *command_opts) { int rc = 0; if ( (msg == NULL) || (command == NULL) ) { rc = -EINVAL; } if (command_opts != NULL) *command_opts = msg->command_opts; *command = msg->command; error_out: return rc; } const char * refer_user_name_from_msg(const msg_data_t *msg){ if (!msg) return G2IPMSG_UNKNOWN_NAME; return (msg->username)?(msg->username):(G2IPMSG_UNKNOWN_NAME); } const char * refer_host_name_from_msg(const msg_data_t *msg){ if (!msg) return G2IPMSG_UNKNOWN_NAME; return (msg->hostname)?(msg->hostname):(G2IPMSG_UNKNOWN_NAME); } const char * refer_nick_name_from_msg(const msg_data_t *msg){ if (!msg) return G2IPMSG_UNKNOWN_NAME; return (msg->message)?(msg->message):(G2IPMSG_UNKNOWN_NAME); } const char * refer_group_name_from_msg(const msg_data_t *msg){ if (!msg) return G2IPMSG_UNKNOWN_NAME; return (msg->extstring)?(msg->extstring):(G2IPMSG_UNKNOWN_NAME); } pktno_t refer_pkt_no_name_from_msg(const msg_data_t *msg){ return msg->pkt_seq_no; } int init_message_data(msg_data_t *msg){ if (!msg) return -EINVAL; memset(msg,0,sizeof(msg_data_t)); msg->magic=IPMSG_MSG_MAGIC; return 0; } int release_message_data(msg_data_t *msg){ if ( (!msg) || (msg->magic!= IPMSG_MSG_MAGIC) ) return -EINVAL; if (msg->username) g_free(msg->username); if (msg->hostname) g_free(msg->hostname); if (msg->extstring) g_free(msg->extstring); if (msg->message) g_free(msg->message); msg->magic=0; return 0; } int parse_message(const char *ipaddr,msg_data_t *msg,const char *message_buff,size_t len){ long int_val; pktno_t pkt_val; char *sp=NULL; char *ep=NULL; char *buffer; ssize_t remains; char *temp_buffer=NULL; size_t tmp_len; int rc=0; /* * TCP経由でよばれた場合は, ipaddrがNULLになりうる */ if ( (!message_buff) || (!msg) || (msg->magic!= IPMSG_MSG_MAGIC) ) return -EINVAL; _assert(len>0); buffer=g_malloc(len); if (!buffer) return -ENOMEM; gettimeofday(&msg->tv, NULL); memcpy(buffer,message_buff,len); remains=len; /* * バージョン番号 */ sp=buffer; ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =len - ((unsigned long)ep-(unsigned long)buffer); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; int_val=strtol(sp, (char **)NULL, 10); msg->version=int_val; sp=ep; /* * シーケンス番号 */ ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =len - ((unsigned long)ep-(unsigned long)buffer); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; pkt_val=strtoll(sp, (char **)NULL, 10); msg->pkt_seq_no=pkt_val; sp=ep; /* * 名前 */ ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =len - ((unsigned long)ep-(unsigned long)buffer); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; msg->username=g_strdup(sp); sp=ep; /* * ホスト名 */ ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =len - ((unsigned long)ep-(unsigned long)buffer); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; msg->hostname=g_strdup(sp); sp=ep; /* * コマンド番号 */ ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; ++ep; int_val=strtol(sp, (char **)NULL, 10); msg->command = ipmsg_protocol_flags_get_command(int_val); msg->command_opts = ipmsg_protocol_flags_get_opt(int_val); sp=ep; /* *メッセージ本文 */ ep=memchr(sp, '\0', remains); if (!ep) { rc=-EINVAL; goto error_out; } if ( (msg->command == IPMSG_SENDMSG) && (msg->command_opts & (IPMSG_ENCRYPTOPT)) ) { #if defined(USE_OPENSSL) unsigned char *enc_buff=NULL; char *extend=NULL; char *sep=NULL; size_t enc_len; /* 暗号化がある場合は, NULLを許さない(署名の検証があるので) */ if (ipaddr == NULL) goto error_out; /* 復号不能のためメッセージは捨てる(攻撃とみなす) */ dbg_out("This is encrypted message:%s.\n",sp); rc = ipmsg_decrypt_message(ipaddr,sp,&enc_buff,&enc_len); if (rc) { goto error_out; } msg->message=g_strdup(enc_buff); if (!(msg->message)) goto decode_end; dbg_out("body:%s\n",msg->message); dbg_out("Decrypt message %s(%d) total=%d.\n",enc_buff,strlen(enc_buff),enc_len); decode_end: if (enc_buff) g_free(enc_buff); #else dbg_out("I can not decode encrypted message.Ignore the message."); goto error_out; /* 暗号化されたメッセージは捨てる * (暗号化できないクライアントに送ってきた方が悪い) */ #endif /* USE_OPENSSL */ }else{ msg->message=g_strdup(sp); if (!(msg->message)) goto error_out; dbg_out("body:%s\n",msg->message); } /* *拡張部 */ if ( ((unsigned long)ep - (unsigned long)buffer) < len) { ++ep; sp=ep; msg->extstring=g_strdup(sp); dbg_out("extention:%s\n",msg->extstring); } error_out: g_free(buffer); return rc; } g2ipmsg-0.9.6+dfsg/src/message.h000066400000000000000000000043501126724573600164200ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(MESSAGE_H) #define MESSAGE_H #include "ipmsg_types.h" #define IPMSG_MSG_MAGIC 0x20061123 #define NAME_LEN 32 typedef struct _msg_data{ int magic; int version; pktno_t pkt_seq_no; int command; int command_opts; char *username; char *hostname; char *extstring; struct timeval tv; char *message; }msg_data_t; int get_command_from_msg(const msg_data_t *msg, unsigned long *command, unsigned long *command_opts); const char *refer_user_name_from_msg(const msg_data_t *msg); const char *refer_host_name_from_msg(const msg_data_t *msg); const char *refer_group_name_from_msg(const msg_data_t *msg); const char *refer_nick_name_from_msg(const msg_data_t *msg); pktno_t refer_pkt_no_name_from_msg(const msg_data_t *msg); int init_message_data(msg_data_t *msg); int release_message_data(msg_data_t *msg); int parse_message(const char *ipaddr,msg_data_t *msg,const char *message_buff,size_t len); #endif /* MESSAGE_H */ g2ipmsg-0.9.6+dfsg/src/msginfo.c000066400000000000000000000172471126724573600164420ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" static GList *message_list=NULL; GStaticMutex msglst_mutex = G_STATIC_MUTEX_INIT; static guint timer_id; static gint message_info_find_element(gconstpointer a,gconstpointer b) { message_info_t *msg_a,*msg_b; if ( (!a) || (!b) ) return -EINVAL; msg_a=(message_info_t *)a; msg_b=(message_info_t *)b; if (msg_a->seq_no == msg_b->seq_no) return 0; /* found */ return 1; /* Not found */ } static int free_message_entry(GList *entry){ message_info_t *this_msg; if (!entry) return -EINVAL; this_msg=entry->data; _assert(this_msg); dbg_out("Release seqno %d msg\n",this_msg->seq_no); g_free(this_msg->ipaddr); g_free(this_msg->ed_msg_string); dbg_out("Free: %x\n",(unsigned int)this_msg); g_slice_free(message_info_t,this_msg); message_list=g_list_remove_link(message_list,entry); g_list_free(entry); return 0; } int unregister_sent_message(int pktno){ GList *found; message_info_t srch_msg; dbg_out("Try to unregister %d\n",pktno); srch_msg.seq_no=pktno; g_static_mutex_lock(&msglst_mutex); found=g_list_find_custom (message_list,&srch_msg,message_info_find_element); if (found) { free_message_entry(found); } g_static_mutex_unlock(&msglst_mutex); return 0; } /** 送信済みメッセージを記憶し, 後で再送するように予約する. * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] pktno 送信時パケット番号 * @param[in] packet 送信パケット(外部形式) * @param[in] len メッセージ長 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int register_sent_message(const udp_con_t *con, const char *ipaddr, int pktno, const char *packet, size_t len){ message_info_t *new_msg = NULL; message_info_t *update_msg = NULL; GList *found = NULL; message_info_t srch_msg; int rc = 0; if ( (con == NULL) || (ipaddr == NULL) || (packet == NULL) ) return -EINVAL; dbg_out("register ipaddr=%s\n", ipaddr); srch_msg.seq_no = pktno; g_static_mutex_lock(&msglst_mutex); found = g_list_find_custom (message_list, &srch_msg, message_info_find_element); if (found != NULL) { /* 既に存在する場合は, リトライ回数を減算(ここにはこないはず) */ err_out("pktno duplicated: %d\n", pktno); g_assert_not_reached(); _assert(found->data); update_msg = found->data; --(update_msg->retry_remains); dbg_out("pktno: %d remain:%d\n", pktno, update_msg->retry_remains); if (update_msg->retry_remains == 0) free_message_entry(found); g_static_mutex_unlock(&msglst_mutex); goto success_out; } g_static_mutex_unlock(&msglst_mutex); new_msg = g_slice_new(message_info_t); if (new_msg == NULL) { rc = -ENOMEM; goto error_out; } new_msg->ed_msg_string = NULL; new_msg->ed_msg_string = g_strdup(packet); new_msg->ipaddr = g_strdup(ipaddr); if (new_msg->ipaddr == NULL) { rc = -ENOMEM; goto free_msg_string; } new_msg->con = (udp_con_t *)con; new_msg->len = len; new_msg->seq_no = pktno; new_msg->retry_remains = MSG_INFO_MAX_RETRY; new_msg->first = TRUE; g_static_mutex_lock(&msglst_mutex); message_list = g_list_append(message_list, new_msg); g_static_mutex_unlock(&msglst_mutex); dbg_out("Add new message:(pktno, packet)=(%d %s)\n", pktno, packet); success_out: rc = 0; return rc; /* 正常終了 */ /* * 異常系 */ if (new_msg->ipaddr != NULL) g_free(new_msg->ipaddr); free_msg_string: if (new_msg->ed_msg_string != NULL) g_free(new_msg->ed_msg_string); free_message_info: dbg_out("Free: %x\n",(unsigned int)new_msg); g_slice_free(message_info_t,new_msg); error_out: return rc; } static gboolean retry_message_handler(gpointer data) { retry_messages_once(); return TRUE; } int retry_messages_once(void){ int rc=0; GList *last; GList *entry; GList *retry_messages=NULL; message_info_t *this_msg; g_static_mutex_lock(&msglst_mutex); last=g_list_last(message_list); g_static_mutex_unlock(&msglst_mutex); if (!last) { return 0; } dbg_out("Try to re-send unsent messages.\n"); g_source_remove (timer_id); g_static_mutex_lock(&msglst_mutex); while((entry=g_list_first(message_list))) { if (entry->data) { this_msg=entry->data; if (this_msg->first) { this_msg->first=FALSE; } else { dbg_out("retry:%d seq:%d addr:%s port: %d\nmsg:\n%s\n", this_msg->retry_remains, this_msg->seq_no, this_msg->ipaddr, hostinfo_refer_ipmsg_port(), this_msg->ed_msg_string); /* * メッセージの再登録を避けるために, udp_send_messageを直接呼び出す. */ rc = ipmsg_send_message(udp_con, this_msg->ipaddr, this_msg->ed_msg_string, this_msg->len); if (rc<0) { rc*=-1; ipmsg_err_dialog("%s: %s %d\n", _("Can not send"), strerror(rc), rc); }else{ --this_msg->retry_remains; } } if (!(this_msg->retry_remains)) { GtkWidget *dialog; GtkWidget *nameLabel; userdb_t *user_info=NULL; char buffer[64]; dialog=GTK_WIDGET(create_sendFailDialog ()); if (!userdb_search_user_by_addr(this_msg->ipaddr,(const userdb_t **)&user_info)) { nameLabel=lookup_widget(dialog,"SendFailDialogUserLabel"); g_assert(nameLabel); snprintf(buffer,63,"%s@%s (%s)",user_info->nickname,user_info->group,user_info->host); buffer[63]='\0'; gtk_label_set_text(GTK_LABEL(nameLabel),buffer); g_assert(!destroy_user_info(user_info)); } if (gtk_dialog_run (GTK_DIALOG (dialog))==GTK_RESPONSE_OK) { this_msg->retry_remains=MSG_INFO_MAX_RETRY; dbg_out("reset retry count:seq=%d (remains:%d)\n", this_msg->seq_no,this_msg->retry_remains); this_msg->first=TRUE; /* 再登録 */ }else{ dbg_out("Free:seq=%d\n", this_msg->seq_no); free_message_entry(entry); gtk_widget_destroy (dialog); continue; } gtk_widget_destroy (dialog); } message_list=g_list_remove_link(message_list,entry); retry_messages=g_list_concat(retry_messages,entry); } } message_list=g_list_concat(message_list,retry_messages); g_static_mutex_unlock(&msglst_mutex); timer_id=g_timeout_add(MSG_INFO_RETRY_INTERVAL,retry_message_handler,NULL); return 0; } int init_message_info_manager(void){ dbg_out("Start retry handler\n"); timer_id=g_timeout_add(MSG_INFO_RETRY_INTERVAL,retry_message_handler,NULL); return 0; } g2ipmsg-0.9.6+dfsg/src/msginfo.h000066400000000000000000000042361126724573600164410ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(MSG_INFO_H) #define MSG_INFO_H #include "ipmsg_types.h" #include "udp.h" #include #define MSG_INFO_MAX_RETRY 5 #define MSG_INFO_RETRY_INTERVAL (5*1000) /* 5秒 */ typedef struct _message_info{ udp_con_t *con; pktno_t seq_no; /* パケット番号 */ gchar *ipaddr; /* 送信先アドレスのコピー */ gchar *ed_msg_string; /* 外部形式で表した送信伝文(のコピー) */ size_t len; int retry_remains; /* 残回数 */ gboolean first; }message_info_t; typedef struct _send_info{ char *msg; int flags; GtkWidget *attachment_editor; }send_info_t; int register_sent_message(const udp_con_t *con,const char *ipaddr,pktno_t pktno,const char *message,size_t len); int unregister_sent_message(int pktno); int retry_messages_once(void); int init_message_info_manager(void); #endif /* MSG_INFO_H */ g2ipmsg-0.9.6+dfsg/src/msgout.h000066400000000000000000000072141126724573600163140ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(MSGOUT_H) #define MSGOUT_H //#define DEBUG 1 #if defined(DEBUG) #define dbg_out(fmt,arg...) do{ \ fprintf(stderr, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ syslog(LOG_INFO|LOG_USER, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ fflush(stderr); \ }while(0) #else #define dbg_out(fmt,arg...) do{ \ if (hostinfo_refer_debug_state()){ \ fprintf(stderr, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ syslog(LOG_INFO|LOG_USER, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ fflush(stderr); \ } \ }while(0) #endif #define war_out(fmt,arg...) do{ \ if (hostinfo_refer_debug_state()){ \ fprintf(stderr, "Warning : [file:%s line:%d ] " fmt,__FILE__,__LINE__,##arg); \ fflush(stderr); \ syslog(LOG_WARNING|LOG_USER, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ } \ }while(0) #define err_out(fmt,arg...) do{ \ fprintf(stderr, "Error : [file:%s line:%d ] " fmt,__FILE__,__LINE__,##arg); \ fflush(stderr); \ if (hostinfo_refer_debug_state()){ \ syslog(LOG_ERR|LOG_USER, "[file:%s function: %s line:%d ] " fmt,__FILE__,__FUNCTION__,__LINE__,##arg); \ } \ }while(0) #define _assert(cond) do{ \ if (!(cond)) { \ fprintf(stderr, "Assertion : [file:%s line:%d ]\n",__FILE__,__LINE__); \ fflush(stderr); \ abort(); \ } \ }while(0) #endif g2ipmsg-0.9.6+dfsg/src/netcommon.c000066400000000000000000000160331126724573600167670ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" static int internal_set_buffer(const int soc,int type,int max,int min,int *actual){ int rc = 0; int size = 0; if ( (soc < 0) || (actual == NULL) ) return -EINVAL; if ( (type != SO_RCVBUF) && (type != SO_SNDBUF) ) return -EINVAL; size = max; rc = setsockopt(soc, SOL_SOCKET, type, (void*)&size, sizeof(int)); if (rc < 0) { size = min; rc = setsockopt(soc, SOL_SOCKET, type, (void*)&size, sizeof(int)); if (rc < 0) { ipmsg_err_dialog("%s:(min, max) = (%d, %d) %s(%d)\n", _("Can not set buffer size"), min, max, strerror(errno), errno); *actual = size; return -errno; } } *actual = size; return 0; } int sock_set_buffer(int soc, unsigned long min_buf, unsigned long max_buf){ int rc = 0; int size=0; if (soc<0) return -EINVAL; rc = internal_set_buffer(soc,SO_RCVBUF,max_buf,min_buf,&size); if (size < _MSG_BUF_MIN_SIZE) { dbg_out("Can not set recv buf size:%s (%d)\n", strerror(-rc), -rc); return rc; } size = 0; rc = internal_set_buffer(soc,SO_SNDBUF, max_buf, min_buf,&size); if (size < _MSG_BUF_MIN_SIZE) { dbg_out("Can not set send buf size:%s (%d)\n", strerror(-rc), -rc); return rc; } dbg_out("Set buffer size:%lu\n",size); return 0; } static int internal_set_timeout(const int soc,int type,unsigned long msec){ int rc; int size; struct timeval tmout; int sec; int usec; if (soc<0) return -EINVAL; if ( (type != SO_RCVTIMEO) && (type != SO_SNDTIMEO) ) return -EINVAL; sec=msec/1000; usec=( (msec % 1000) * 1000 ); tmout.tv_sec=sec; tmout.tv_usec=usec; dbg_out("Try to set %d socket for %s timeout %d sec %d msec\n", soc, (type == SO_RCVTIMEO) ? ("Receive") : ("Send"), sec, (usec/1000) ); rc=setsockopt(soc, SOL_SOCKET, type, (void*)&tmout, sizeof(struct timeval)); if (rc<0) { ipmsg_err_dialog("%s:%s(%d)\n", _("Can not set broad cast"), strerror(errno), errno); return -errno; } dbg_out("Set socket %d for %s timeout %d sec %d msec\n", soc, (type == SO_RCVTIMEO) ? ("Receive") : ("Send"), sec, (usec/1000) ); return 0; } int sock_recv_time_out(int soc,long msec){ int rc; if ( (soc<0) || (msec<0) ) return -EINVAL; rc=internal_set_timeout(soc,SO_RCVTIMEO,(unsigned long)msec); if (rc<0) return rc; return 0; } int sock_send_time_out(int soc,long msec){ int rc; if ( (soc<0) || (msec<0) ) return -EINVAL; rc=internal_set_timeout(soc,SO_SNDTIMEO,(unsigned long)msec); if (rc<0) return rc; return 0; } int setup_addr_info(struct addrinfo **infop, const char *ipaddr,int port,int stype,int family){ int rc = 0; int soc = 0; struct addrinfo hints; struct addrinfo *res = NULL; struct addrinfo *node = NULL; char port_str[11]; char host[NI_MAXHOST]; char serv[NI_MAXSERV]; if (infop == NULL) return -EINVAL; memset(&hints, 0, sizeof(struct addrinfo)); snprintf(port_str, 10, "%d", port); if (family != 0) hints.ai_family = family; else hints.ai_family = PF_UNSPEC; hints.ai_socktype = stype; if (ipaddr == NULL) { hints.ai_flags = AI_PASSIVE; } rc = getaddrinfo(ipaddr, port_str, &hints,&res); if (rc != 0) { ipmsg_err_dialog("%s:%s(%d)\n", _("Can not get addr info"), gai_strerror(rc), rc); rc = (rc < 0) ? (rc) : (-rc); goto error_out; } for(node = res;node;node = node->ai_next) { rc = getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host), serv, sizeof(serv), NI_NUMERICHOST|NI_NUMERICSERV); g_assert (rc == 0); dbg_out("host:%s service:%s (family,type,proto)=(%d,%d,%d)\n", host, serv, res->ai_family, res->ai_socktype, res->ai_protocol); } *infop = res; return 0; error_out: return rc; } int wait_socket(int soc,int wait_for,int sec) { #if defined(G2IPMSG_ENABLE_WAIT_SOCK) fd_set rd_set; fd_set wr_set; int rc; int max_count; struct timeval tmout_val; int i; for(i=0;i0) { FD_ZERO(&rd_set); FD_ZERO(&wr_set); if (wait_for & WAIT_FOR_READ) FD_SET(soc,&rd_set); if (wait_for & WAIT_FOR_WRITE) FD_SET(soc,&wr_set); ipmsg_update_ui(); dbg_out("select READ[%s] WRITE[%s]\n", (wait_for & WAIT_FOR_READ)?("WAIT"):("NO"), (wait_for & WAIT_FOR_WRITE)?("WAIT"):("NO") ); tmout_val.tv_sec=0; tmout_val.tv_usec=(WAIT_UNIT_MS*1000); rc=select(soc+1,&rd_set,&wr_set,NULL,&tmout_val); if (rc>0) { dbg_out("selectOK\n"); break; } if (rc<0) { if (errno == EINTR) continue; dbg_out("select Fail:%s (%d)\n",strerror(errno),errno); return -errno; } --max_count; } if ( (wait_for & WAIT_FOR_READ ) && (FD_ISSET(soc,&rd_set)) ) return 0; if ( (wait_for & WAIT_FOR_WRITE ) && (FD_ISSET(soc,&wr_set)) ) return 0; } return -EINVAL; #else return 0; #endif } int sock_set_recv_timeout(int soc,int sec){ int rc; struct timeval tmout_val; tmout_val.tv_sec=sec; tmout_val.tv_usec=0; dbg_out("Set timeout:%d\n",sec); rc=setsockopt(soc, SOL_SOCKET, SO_RCVTIMEO, (void*)&tmout_val, sizeof(struct timeval)); if (rc<0) { ipmsg_err_dialog("Can not set timeout for socket :%s(%d)\n",strerror(errno),errno); return -errno; } return 0; } int netcommon_get_peeraddr(struct addrinfo *info, char *peer_addr) { int rc = 0; if ( (info == NULL) || (peer_addr == NULL) ) return -EINVAL; rc=getnameinfo(info->ai_addr, info->ai_addrlen, peer_addr, NI_MAXHOST, NULL, 0, NI_NUMERICHOST); g_assert (rc == 0); dbg_out("get peer host:%s (family,type,proto)=(%d,%d,%d)\n", peer_addr, info->ai_family, info->ai_socktype, info->ai_protocol); return 0; } g2ipmsg-0.9.6+dfsg/src/netcommon.h000066400000000000000000000035761126724573600170040ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(NETCOMMON_H) #define NETCOMMON_H #define WAIT_FOR_READ 1 #define WAIT_FOR_WRITE 2 #define NET_MAX_RETRY 20 #define WAIT_UNIT_MS (500UL) int wait_socket(int soc,int wait_for,int sec); int sock_set_buffer(int soc, unsigned long min_buf, unsigned long max_buf); int sock_recv_time_out(int soc,long msec); int sock_send_time_out(int soc,long msec); int setup_addr_info(struct addrinfo **infop, const char *ipaddr,int port,int stype,int family); int sock_set_recv_timeout(int soc,int sec); int netcommon_get_peeraddr(struct addrinfo *, char *); #endif /* NETCOMMON_H */ g2ipmsg-0.9.6+dfsg/src/pbkdf2.c000066400000000000000000000164631126724573600161470ustar00rootroot00000000000000/* * Following codes are derived from * ``Secure Programming Cookbook for C and C++''. * URL:http://www.oreilly.com/catalog/secureprgckbk/ * http://www.secureprogramming.com/ * * Licensing Information can be obtain from following URL: * * http://www.secureprogramming.com/?action=license * * Copyright 2003 by John Viega and Matt Messier. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the developer of this software nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "common.h" /* pkcs5 */ static void pkcs5_initial_prf(unsigned char *p, size_t plen, unsigned char *salt, size_t saltlen, size_t i, unsigned char *out, size_t *outlen){ size_t swapped_i; HMAC_CTX ctx; HMAC_CTX_init(&ctx); HMAC_Init(&ctx,p,plen,EVP_sha1()); HMAC_Update(&ctx,salt,saltlen); swapped_i=htonl(i); HMAC_Update(&ctx,(unsigned char *)&swapped_i,sizeof(swapped_i)); HMAC_Final(&ctx,out,(unsigned int *)outlen); HMAC_CTX_cleanup(&ctx); } static void pkcs5_subsequent_prf(unsigned char *p, size_t plen, unsigned char *v, size_t vlen, unsigned char *o, size_t *olen){ HMAC_CTX ctx; HMAC_CTX_init(&ctx); HMAC_Init(&ctx,p,plen,EVP_sha1()); HMAC_Update(&ctx,v,vlen); HMAC_Final(&ctx,o,(unsigned int *)olen); HMAC_CTX_cleanup(&ctx); } static void pkcs5_F(unsigned char *p, size_t plen, unsigned char *salt, size_t saltlen, size_t ic, size_t bix, unsigned char *out){ size_t i,j,outlen; unsigned char ulast[PBKDF2_PRF_OUT_LEN]; memset(out,0,PBKDF2_PRF_OUT_LEN); pkcs5_initial_prf(p,plen,salt,saltlen,bix,ulast,&outlen); for(i=1;i<=ic;++i){ for(j=0;j (((unsigned long long)1)<<32 -1) * PBKDF2_PRF_OUT_LEN){ abort(); } l=dklen / PBKDF2_PRF_OUT_LEN; r=dklen % PBKDF2_PRF_OUT_LEN; for(i=1;i<=l;++i) pkcs5_F(pw,pwlen,salt,saltlen,ic,i,dk + (i-1) * PBKDF2_PRF_OUT_LEN); if (r) { pkcs5_F(pw,pwlen,salt,saltlen,ic,i,final); for(l=0;l UINT_MAX) || (!endptr) || (*endptr != '$') ) { g_free(base64_salt); return -EINVAL; } iterations=(unsigned long)tmp_ulong; rc=base64_decode(base64_salt,&salt_len,(gchar **)&raw_salt); if (rc) { g_free(base64_salt); return rc; } } output=g_malloc(PBKDF2_KEY_LEN); if (!output) goto free_base64_encoded_salt; key_len=strlen(key); spc_pbkdf2((unsigned char *)key,key_len,raw_salt,salt_len,iterations,output,PBKDF2_KEY_LEN); rc=base64_encode(key,key_len+1,(gchar **)&base64_out); if (rc) goto free_output; for(num_len=1,tmp_num=iterations;tmp_num;++num_len,tmp_num/=10); result_len=strlen(base64_out)+strlen(base64_salt)+num_len+PBKDF2_FORMAT_ADDED_LEN+1; dbg_out("result_len:%d\n",result_len); ret_str=g_malloc(result_len); rc=-ENOMEM; if (!ret_str) goto free_base64_encoded_out; snprintf(ret_str,result_len,PBKDF2_FORMAT,base64_salt,iterations,base64_out); ret_str[result_len-1]='\0'; dbg_out("ret_str:%s\n",ret_str); *enc_pass=ret_str; rc=0; free_base64_encoded_out: if (base64_out) g_free(base64_out); free_output: if (output) g_free(output); free_base64_encoded_salt: if (base64_salt) g_free(base64_salt); free_raw_salt: if (raw_salt) g_free(raw_salt); return rc; } int pbkdf2_verify(const char *plain_passwd,const char *crypt_passwd){ int rc; int match = -EPERM; char *pbkdf2_result = NULL; if ( (!plain_passwd) || (!crypt_passwd) ) return -EINVAL; rc = pbkdf2_encrypt(plain_passwd,crypt_passwd,&pbkdf2_result); if (rc != 0) goto error_out; match = strcmp(pbkdf2_result,crypt_passwd); error_out: if (pbkdf2_result != NULL) g_free(pbkdf2_result); dbg_out("comp:%d\n",match); return match; } g2ipmsg-0.9.6+dfsg/src/pbkdf2.h000066400000000000000000000043101126724573600161400ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(IPMSG_PBKDF2_H) #define IPMSG_PBKDF2_H #ifdef HAVE_CONFIG_H # include #endif #include #define PBKDF2_PRF_OUT_LEN 20 #define PBKDF2_SALT_LEN 8 #define PBKDF2_KEY_LEN 16 #define PBKDF2_PREFIX "$10$" #define PBKDF2_FORMAT PBKDF2_PREFIX "%s$%u$%s" #define PBKDF2_PREFIX_LEN (4) #define PBKDF2_FORMAT_ADDED_LEN (PBKDF2_PREFIX_LEN+2) /* strlen("$10$")+strlen("$")*2 */ #define PBKDF2_ITER_CNT 10000 #if defined(USE_OPENSSL) int pbkdf2_encrypt(const char *key, const char *salt,char **enc_pass); int pbkdf2_encoded_passwd_configured(const char *enc_pass); int pbkdf2_verify(const char *plain_passwd,const char *crypt_passwd); #else #define pbkdf2_encrypt(key, salt, enc_pass) (-ENOSYS) #define pbkdf2_verify(plain_passwd, crypt_passwd) (-ENOSYS) #define pbkdf2_encoded_passwd_configured(enc_pass) (-ENOSYS) #endif /* USE_OPENSSL */ #endif /* IPMSG_PBKDF2_H */ g2ipmsg-0.9.6+dfsg/src/private.h000066400000000000000000000045021126724573600164450ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(PRIVATE_H) #define PRIVATE_H #define IPMSG_PRIVATE_DATA_MAGIC 0x19731219 #define IPMSG_PRIVATE_NO_TYPE 0 #define IPMSG_PRIVATE_RECVMSG 1 #define IPMSG_PRIVATE_AFCB 2 #define IPMSG_PRIVATE_PASSWD 3 typedef struct _ipmsg_private_data{ int magic; int type; void *data; }ipmsg_private_data_t; typedef struct _ipmsg_recvmsg_private{ char *ipaddr; pktno_t pktno; int flags; char *ext_part; }ipmsg_recvmsg_private_t; #define IPMSG_ASSERT_PRIVATE(private,ptype) do{ \ g_assert((private)); \ g_assert((private)->magic == IPMSG_PRIVATE_DATA_MAGIC); \ g_assert((private)->type == (ptype)); \ }while(0) #define IPMSG_HOOKUP_DATA(component,data_p,name) \ g_object_set_data_full (G_OBJECT (component), name, \ data_p, (GDestroyNotify) destroy_ipmsg_private) int init_ipmsg_private(ipmsg_private_data_t **priv,const int type); int init_recvmsg_private(const char *ipaddr,int flags,int pktno, ipmsg_private_data_t **priv); void destroy_ipmsg_private(gpointer data); #endif g2ipmsg-0.9.6+dfsg/src/protocol.c000066400000000000000000002121761126724573600166370ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** @file * @brief IPMSGプロトコル関連関数群 * @author Takeharu KATO */ /** パケット番号 * @attention 内部リンケージ */ static pktno_t pkt_no = 0; /** スレッド間でのパケット番号アクセス排他用ロック * @attention 内部リンケージ */ GStaticMutex pktno_mutex = G_STATIC_MUTEX_INIT; /** IPMSGのメッセージパケットを生成し, 送信先のコードセットに変換する * @param[in] ipaddr 送信先IPアドレス(送信先コードセット判定に使用) * (NULLの場合は, ブロードキャスト用として * 扱い, デフォルトコードセットを使用する). * @param[in] pkt_arg パケット番号(0の場合は, 自動生成する) * @param[in] flags 送信フラグ * @param[in] message メッセージ部に格納する文字列を設定する. * @param[in] extension 拡張部に格納する文字列を設定する. * @param[out] external 外部形式のパケット文字列を指すためのポインタのアドレス * @param[out] len_p 送信パケット長(ヌルターミネート含む)返却先アドレス * @param[out] pkt_ret 割り当てたパケット番号の返却先アドレス * IPMSG_PROTOCOL_MSG_NONEED_PKTNOが指定された場合は, * パケット番号の返却を実施しない * @retval 0 正常終了 * @retval -EINVAL 引数異常 * * @attention 内部リンケージ */ static int build_ipmsg_packet(const char *ipaddr, const pktno_t pkt_arg, const ipmsg_send_flags_t flags, const char *message, const char *extension, char **external, size_t *len_p, pktno_t *pkt_ret) { int rc = 0; pktno_t pkt_no = 0; size_t len = 0; gchar *converted_common = NULL; gchar *converted_message = NULL; gchar *converted_extension = NULL; gchar *converted_all_packet = NULL; gchar *common = NULL; if ( (ipaddr == NULL) || (external == NULL) || (*external != NULL) || (len_p == NULL) ) { rc = -EINVAL; } /* * パケット番号獲得 */ if (pkt_arg == IPMSG_PROTOCOL_PKTNUM_AUTO) pkt_no = ipmsg_get_pkt_no(); else pkt_no = pkt_arg; common = g_malloc(IPMSG_BUFSIZ); if (common == NULL) goto error_out; /* * 共通部分生成 */ snprintf(common, IPMSG_BUFSIZ, IPMSG_PROTOCOL_COMMON_MSG_FMT, pkt_no, hostinfo_refer_user_name(), hostinfo_refer_host_name(), flags); /* * 外部形式に変換 */ len = 0; /* 出力長を初期化 */ /* 共通部分 */ rc = ipmsg_convert_string_external(ipaddr, common, (const char **)&converted_common); if (rc != 0) { ipmsg_err_dialog("%s:%s\n", _("Can not convert common into external representation"), common); goto free_common_out; } else { /* * 末尾のヌルターミネートを含めて送信するため1加える */ len += (strlen(converted_common) + 1); } /* メッセージ本体 */ if (message != NULL) { rc = ipmsg_convert_string_external(ipaddr, message, (const char **)&converted_message); if (rc != 0) { ipmsg_err_dialog("%s\n", _("Can not convert message into external representation")); goto free_converted_common; } else { /* * 末尾のヌルターミネートを含めて送信するため1加える */ len += (strlen(converted_message) + 1); } } /* 拡張部 */ if (extension != NULL) { rc = ipmsg_convert_string_external(ipaddr, extension, (const char **)&converted_extension); if (rc != 0) { ipmsg_err_dialog("%s:%s\n", _("Can not convert extension into external representation"), extension); goto free_converted_message; } else { /* * 末尾のヌルターミネートを含めて送信するため1加える */ len += (strlen(converted_extension) + 1); } } /* * パケットを組み立てる */ converted_all_packet = g_malloc(len); if (converted_all_packet == NULL) { rc = -ENOMEM; goto free_converted_extension; } memset(converted_all_packet, 0, len); snprintf(converted_all_packet, len, IPMSG_PROTOCOL_ALLMSG_PACKET_FMT, converted_common, (converted_message != NULL) ? (converted_message) : (""), IPMSG_PROTOCOL_MSG_EXT_DELIM, (converted_extension != NULL) ? (converted_extension) : ("")); dbg_out("New packet:" IPMSG_PROTOCOL_ALLMSG_PACKET_FMT, common, message, IPMSG_PROTOCOL_MSG_EXT_DELIM_SYM, extension); /* * 返却 */ *external = converted_all_packet; *len_p = len; if (pkt_ret != IPMSG_PROTOCOL_MSG_NONEED_PKTNO) *pkt_ret = pkt_no; rc = 0; /* 正常終了 */ free_converted_extension: if (converted_extension != NULL) g_free(converted_extension); free_converted_message: if (converted_message != NULL) g_free(converted_message); free_converted_common: if (converted_common != NULL) g_free(converted_common); free_common_out: if (common != NULL) g_free(common); error_out: return rc; } /** IPMSGのパケットを送出する. * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] pktno パケット番号 * - IPMSG_PROTOCOL_PKTNUM_AUTO 番号を自動的に割り当てる * - 上記以外 pktnoで指定した番号を使用 * @param[in] flags 送信フラグ * @param[in] message メッセージ部(内部形式) * - IPMSG_PROTOCOL_MSG_NO_MESSAGE 空文を送信する * - 上記以外 messageで指定した文を送信する * @param[in] extension 拡張部(内部形式) * - IPMSG_PROTOCOL_MSG_NO_EXTENSION 空文を送信する * - 上記以外 extensionで指定した文を送信する * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @attention 内部リンケージ */ static int ipmsg_send_packet(const udp_con_t *con, const char *ipaddr, const pktno_t pktno, const int flags, const char *message, const char *extension) { char *packet = NULL; int rc = 0; size_t len = 0; pktno_t sent_pkt_no = 0; if ( (ipaddr == IPMSG_PROTOCOL_ENTRY_PKT_ADDR) && (con == NULL) ){ rc = -EINVAL; goto error_out; } /* * パケット構築 */ rc = build_ipmsg_packet(ipaddr, pktno, flags, message, extension, &packet, &len, &sent_pkt_no); if (rc != 0) { g_assert(packet == NULL); /* エラー時は獲得しない前提 */ goto error_out; } dbg_out("send message to %s:(message, ext-part) = (%s, %s)\n", ( ipaddr ), ( (message != NULL) ? message : ""), ( (extension != NULL) ? extension : "") ); /* * 送信済みパケット記録 */ if ( ( flags & IPMSG_SENDCHECKOPT ) && ( !( flags & (IPMSG_NO_REPLY_OPTS|IPMSG_AUTORETOPT) ) ) ){ rc = register_sent_message(con, ipaddr, sent_pkt_no, packet, len); if (rc < 0) { rc = -rc; ipmsg_err_dialog( _("Can not register message for:" "%s reason: %s error code = %d"), ipaddr, strerror(rc), rc); goto free_packet_out; } } /* * 送信 */ rc = ipmsg_send_message(con, ipaddr, packet, len); if (rc != 0) { goto free_packet_out; } rc = 0; /* 正常終了 */ free_packet_out: g_free(packet); error_out: return rc; } #if 0 /** IPMSGのブロードキャストパケットを送出する. * @param[in] pktno パケット番号 * - IPMSG_PROTOCOL_PKTNUM_AUTO 番号を自動的に割り当てる * - 上記以外 pktnoで指定した番号を使用 * @param[in] flags 送信フラグ * @param[in] message メッセージ部(内部形式) * - IPMSG_PROTOCOL_MSG_NO_MESSAGE 空文を送信する * - 上記以外 messageで指定した文を送信する * @param[in] extension 拡張部(内部形式) * - IPMSG_PROTOCOL_MSG_NO_EXTENSION 空文を送信する * - 上記以外 extensionで指定した文を送信する * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @attention 内部リンケージ */ static int ipmsg_send_broadcast(const pktno_t pktno, const int flags, const char *message, const char *extension) { char *packet = NULL; int rc = 0; size_t len = 0; pktno_t sent_pkt_no = 0; if ( ipaddr != IPMSG_PROTOCOL_ENTRY_PKT_ADDR) { rc = -EINVAL; goto error_out; } /* * パケット構築 */ rc = build_ipmsg_packet(ipaddr, pktno, flags, message, extension, &packet, &len, &sent_pkt_no); if (rc != 0) { g_assert(packet == NULL); /* エラー時は獲得しない前提 */ goto error_out; } dbg_out("send message to %s:(message, ext-part) = (%s, %s)\n", ("Broad cast addr"), ( (message != NULL) ? message : ""), ( (extension != NULL) ? extension : "") ); /* * 送信 */ rc = udp_send_broadcast(packet, len); if (rc != 0) { goto free_packet_out; } rc = 0; /* 正常終了 */ free_packet_out: g_free(packet); error_out: return rc; } #endif /** IPMSGのパケット番号通知/インデクス番号通知系メッセージを送出する. * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * - IPMSG_PROTOCOL_ENTRY_PKT_ADDR ブロードキャストとして扱う * - 上記以外 ユニキャストとして扱う * @param[in] flags 送信フラグ * @param[in] pktno 通知するパケット番号 * - IPMSG_PROTOCOL_PKTNUM_AUTO 番号を自動的に割り当てる * - 上記以外 pktnoで指定した番号を使用 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @note 各番号通知系メッセージの形式は, 以下のとおり: * * IPMSG_RECVMSG パケット形式 * - メッセージ部: 受信パケット番号を表す文字列 * - 拡張部 : なし * * IPMSG_RELEASEFILES * - メッセージ部: 開放ファイルパケット番号を表す文字列 * - 拡張部 : なし * * IPMSG_GETLIST: * - メッセージ部: ホストリストエントリ取得開始番号 * - 拡張部 : なし * * @attention 内部リンケージ */ static int ipmsg_notify_number(const udp_con_t *con, const char *ipaddr , ipmsg_send_flags_t flags, pktno_t num) { int rc = 0; char pkt_buf[IPMSG_PROTOCOL_PKTNUM_LEN]; g_assert(con != NULL); /* 呼び出し側責任で引数チェックを実施 */ /* * パケット番号を文字列化して送信. */ snprintf(pkt_buf, IPMSG_PROTOCOL_PKTNUM_LEN, IPMSG_PROTOCOL_PKTNUM_FMT, num); dbg_out("Notify number : (ipaddr, pktno) = (%s, %d)\n", ipaddr, num); /* * パケット送信 */ rc = ipmsg_send_packet(con, ipaddr,IPMSG_PROTOCOL_PKTNUM_AUTO, flags, pkt_buf, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_BR_ISGETLIST2を送出する. * @param[in] flags 送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @note IPMSG_BR_ISGETLIST2 パケット形式 * * - メッセージ部: 空文 * - 拡張部 : なし * * @attention 内部リンケージ */ static int ipmsg_send_br_isgetlist2(const udp_con_t *con, const ipmsg_send_flags_t flags){ int rc = 0; ipmsg_send_flags_t local_flags = 0; if (con == NULL) { rc = -EINVAL; goto error_out; } /* * フラグを設定する */ local_flags = flags; local_flags |= hostinfo_get_normal_entry_flags(); local_flags |= IPMSG_BR_ISGETLIST2; /* * パケット送信 */ rc = ipmsg_send_packet(con, IPMSG_PROTOCOL_ENTRY_PKT_ADDR, IPMSG_PROTOCOL_PKTNUM_AUTO, local_flags, IPMSG_PROTOCOL_MSG_NO_MESSAGE, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_RECVMSGを送出する. * @param[in] con UDPコネクション情報 * @param[in] orig_msg 受信したメッセージのメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @attention 内部リンケージ */ static int ipmsg_send_recv_msg(const udp_con_t *con, const msg_data_t *orig_msg){ const char *ipaddr = NULL; int rc = 0; size_t len = 0; pktno_t packet_num = 0; ipmsg_send_flags_t local_flags = 0; if ( (con == NULL) || (orig_msg == NULL) ) { rc = -EINVAL; goto error_out; } /* * フラグを設定する */ local_flags = (IPMSG_RECVMSG|IPMSG_AUTORETOPT); /* * ピアのIPアドレスを参照する */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } /* * 送信されたパケット番号を取得 */ packet_num = refer_pkt_no_name_from_msg(orig_msg); dbg_out("Send recv packet : (ipaddr, pktno) = (%s, %d)\n", ipaddr, packet_num); /* * パケット送信 */ rc = ipmsg_notify_number(con, ipaddr , local_flags, packet_num); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_READMSGパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージのメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * * @attention 内部リンケージ */ static int ipmsg_proc_read_msg(const udp_con_t *con,const msg_data_t *msg) { int rc = 0; pktno_t pktno = 0; gchar *user = NULL; struct timeval tv; if (con == NULL) { rc = -EINVAL; goto error_out; } gettimeofday(&tv, NULL); /* 受信確認時刻取得 */ if (msg != NULL) { errno = 0; pktno = strtol(msg->message, (char **)NULL, 10); if (errno == 0) { dbg_out("read mssage:seq %ld\n", pkt_no); } else { war_out("Gan not optain packet number:%s\n", msg->message); rc = -errno; goto error_out; } dbg_out("read mssage:seq %s\n", msg->message); user = g_strdup(refer_user_name_from_msg(msg)); /* ユーザ名獲得 */ } /* * メモリ不足の場合やmsgがNULLの場合, ユーザ名にNULLを送信。 * user領域の開放は受け手責任で実施する. */ read_message_dialog(user, udp_get_peeraddr(con), tv.tv_sec); rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_ANSPUBKEYパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージのメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOSYS 暗号化未サポート * @retval -ENOENT ピアのIPアドレスが不明 * @attention 内部リンケージ */ static int ipmsg_proc_anspubkey(const udp_con_t *con,const msg_data_t *msg){ int rc = 0; char *pubkey_e = NULL; char *pubkey_n = NULL; const char *ipaddr = NULL; ipmsg_cap_t peer_cap = 0; if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } /* * ピアのIPアドレスを取得する. */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } #if defined(USE_OPENSSL) /* * ANSPUBKEYパケットから公開鍵と秘密鍵を獲得する. */ rc = pcrypt_crypt_parse_anspubkey(msg->message, &peer_cap, (unsigned char **)&pubkey_e, (unsigned char **)&pubkey_n); if (rc != 0) { dbg_out("Can not parse anspub key message:rc=%d\n", rc); goto error_out; } /* * ANSPUBKEYパケットに登録された内容で, 公開鍵と秘密鍵を更新する. */ rc = userdb_replace_public_key_by_addr(ipaddr, peer_cap, pubkey_e, pubkey_n); if (rc != 0) { dbg_out("Can register parse anspub key message:rc=%d\n", rc); goto free_pubkey_out; } rc = 0; /* 正常終了 */ free_pubkey_out: if (pubkey_e != NULL) g_free(pubkey_e); if (pubkey_n != NULL) g_free(pubkey_n); #else rc = -ENOSYS; /* 暗号化機能未サポート */ #endif /* USE_OPENSSL */ error_out: return rc; } /** IPMSGのIPMSG_GETPUBKEYパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージのメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @attention 内部リンケージ */ static int ipmsg_proc_get_public_key(const udp_con_t *con,const msg_data_t *msg) { int rc = 0; size_t len = 0; int index = 0; ipmsg_cap_t peer_cap = 0; ipmsg_send_flags_t local_flags = 0; char *ans_msg = NULL; const char *ipaddr = NULL; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } /* * フラグ設定 */ local_flags = IPMSG_ANSPUBKEY; /* * ピアのIPアドレスを取得する. */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } #if defined(USE_OPENSSL) peer_cap = (ipmsg_cap_t)strtoul(msg->message, (char **)NULL, 16); dbg_out("Get public key:peer capability %x(%s)\n", peer_cap, msg->message); rc = pcrypt_crypt_generate_anspubkey_string(peer_cap, (const char **)&ans_msg); if (rc != 0) { g_assert(ans_msg == NULL); goto error_out; } /* * パケット送信 */ rc = ipmsg_send_packet(con, ipaddr,IPMSG_PROTOCOL_PKTNUM_AUTO, local_flags, ans_msg, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto free_ans_msg_out; } rc = 0; /* 正常終了 */ free_ans_msg_out: if (ans_msg != NULL) g_free(ans_msg); #else rc = -ENOSYS; /* 暗号化未サポート */ #endif /* USE_OPENSSL */ error_out: return rc; } /** IPMSGのIPMSG_RELEASEFILESパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージのメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @attention 内部リンケージ */ static int ipmsg_proc_release_files_msg(const udp_con_t *con, const msg_data_t *msg) { pktno_t pktno = 0; int rc = 0; if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } /* * 開放する添付ファイルを示すパケット番号を獲得する */ errno = 0; pktno = strtol(msg->message, (char **)NULL, 10); if (errno == 0) { dbg_out("read mssage:seq %ld\n", pkt_no); } else { err_out("Can not parse packet no.\n"); rc = -errno; goto error_out; } dbg_out("release files mssage:seq %d(%s)\n", pktno, msg->message); /* * 指定された添付ファイルを開放する */ rc = release_attach_file_block(pktno, FALSE); if (rc < 0) { dbg_out("Can not release attach file information:pktno=%d %s (%d)", pktno, strerror(-rc), -rc); goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_RECVMSGパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージのメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * * @attention 内部リンケージ */ static int ipmsg_proc_recv_msg(const udp_con_t *con, const msg_data_t *msg) { int rc = 0; pktno_t pktno = 0; if ( (con == NULL) || (msg == NULL) || (msg->message == NULL) ) { rc = -EINVAL; goto error_out; } /* * パケット番号取得 */ errno = 0; pktno = strtol(msg->message, (char **)NULL, 10); if (errno == 0) { dbg_out("recv mssage:seq %ld\n", pkt_no); } else { err_out("Can not parse packet no.\n"); rc = -errno; goto error_out; } dbg_out("recv mssage:seq %ld\n", pkt_no); unregister_sent_message(pktno); /* 送信完了パケットを再送登録から除去する */ rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_BR_ISGETLIST2パケットを処理する. * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ(未使用) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * * @attention 内部リンケージ */ static int ipmsg_proc_br_isgetlist2(const udp_con_t *con, const msg_data_t *msg){ int rc = 0; ipmsg_send_flags_t local_flags = 0; const char *ipaddr = NULL; if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } /* * フラグ設定 */ local_flags = IPMSG_OKGETLIST; /* * ピアのIPアドレスを参照する */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } /* * パケット送信 */ rc = ipmsg_send_packet(con, ipaddr, IPMSG_PROTOCOL_PKTNUM_AUTO, local_flags, IPMSG_PROTOCOL_MSG_NO_MESSAGE, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_GETLISTパケットを処理する. * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ(未使用) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @note IPMSG_ANSLISTを返却する. * * IPMSG_ANSLISTのパケット形式: * * - メッセージ部: ホストリストメッセージ * - 拡張部 : なし * * ホストリストメッセージの形式: * * - ホストリストの内容を1エントリ毎に:で区切って送信する. * - 1エントリの情報は, 以下の順で, デリミタ('\a'(0x13))で区切って送信する. * -# ユーザ名 * -# ホスト名 * -# IPMSG_ANSLIST(十進で記載:19) * -# IPアドレス * -# ポート番号 * -# ニックネーム * -# グループ名 * * @attention 内部リンケージ */ static int ipmsg_proc_getlist(const udp_con_t *con,const msg_data_t *msg){ char *host_list = NULL; const char *ipaddr = NULL; ipmsg_send_flags_t local_flags = 0; int length = 0; int start = 0; int rc = 0; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } /* * フラグ設定 */ local_flags = IPMSG_ANSLIST; /* * ピアのIPアドレスを参照する */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } /* * 返却するホストリスト作成 */ length = G2IPMSG_DEFAULT_HOST_LIST_LEN; /* ホストリスト長設定 */ /* 要求されたホストリストの返却開始位置を取得する. */ errno = 0; start = strtol(msg->message, (char **)NULL, 10); if (errno != 0) { err_out("Can not parse IPMSG_GETLIST packet no.\n"); rc = -errno; goto error_out; } dbg_out("require:%d(%s)\n", start, msg->message); /* 返却するホストリストを作成する */ rc = userdb_get_hostlist_string(start, &length, (const char **)&host_list); if (rc != 0) { g_assert(host_list == NULL); goto error_out; } /* * 送信 */ rc = ipmsg_send_packet(con, ipaddr, IPMSG_PROTOCOL_PKTNUM_AUTO, local_flags, host_list, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto free_hostlist_out; } rc = 0; /* 正常終了 */ free_hostlist_out: if (host_list != NULL) g_free(host_list); error_out: return rc; } /** ユーザ情報更新要求を処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ情報 * @param[in] op_type 操作種別 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_protocol_user_opration(const udp_con_t *con, const msg_data_t *msg, const int op_type) { int rc = 0; g_assert( (con != NULL) && (msg != NULL) ); /* 呼び出し元責任で確認 */ switch(op_type) { case IPMSG_PROTOCOL_USR_ADD: /* ユーザ追加 */ rc = userdb_add_user(con, msg); /* 既にユーザが存在する場合は, * ユーザ情報更新処理に移行し, それ以外の場合は, 復帰する. */ if (rc != -EEXIST) break; /* fall through */ case IPMSG_PROTOCOL_USR_UPDATE: /* ユーザ情報更新 */ rc = userdb_update_user(con, msg); break; case IPMSG_PROTOCOL_USR_DEL: /* ユーザ情報削除 */ rc = userdb_del_user(con, msg); break; case IPMSG_PROTOCOL_ADD_WITH_HOSTLIST: /* ホストリストによる追加 */ rc = userdb_hostlist_answer_add(con, msg); break; default: break; } userdb_print_user_list(); return rc; } /** IPMSGのIPMSG_ANSLISTパケットを処理する. * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ(未使用) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * * @attention 内部リンケージ */ static int ipmsg_proc_anslist(const udp_con_t *con, const msg_data_t *msg){ int rc= 0; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } /* * ANSLISTを元にユーザリストにエントリを登録する */ rc = ipmsg_protocol_user_opration(con, msg, IPMSG_PROTOCOL_ADD_WITH_HOSTLIST); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_OKGETLISTパケットを処理する. * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ(未使用) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * * @attention 内部リンケージ */ static int ipmsg_proc_okgetlist(const udp_con_t *con, const msg_data_t *msg){ int rc = 0; const char *ipaddr = NULL; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } dbg_out("OK_GETLIST from %s.\n",udp_get_peeraddr(con)); /* * ピアのIPアドレスを参照する */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } /* * 最初のエントリからホストリスト要求を発行する */ rc = ipmsg_send_get_list(udp_con, ipaddr, 0); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのエントリ系パケットを送出する. * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送出先IPアドレス(NULLの場合は, ブロードキャスト) * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note エントリ系ブロードキャストパケットの形式は, 以下のとおり * * IPMSG_BR_ENTRY パケット形式 * - メッセージ部: ニックネーム (通常時) * ニックネーム<空白>'['不在種別']' (不在モード時) * - 拡張部 : グループ名 * * IPMSG_ANSENTRY パケット形式 * - メッセージ部: ニックネーム (通常時) * ニックネーム<空白>'['不在種別']' (不在モード時) * - 拡張部 : グループ名 * * IPMSG_BR_EXIT パケット形式 * - メッセージ部: ニックネーム (通常時) * - 拡張部 : グループ名 * * IPMSG_BR_ABSENCE パケット形式 * - メッセージ部: ニックネーム (通常時) * ニックネーム<空白>'['不在種別']' (不在モード時) * - 拡張部 : グループ名 */ static int ipmsg_send_entry_packets(const udp_con_t *con, const char *ipaddr, const int flags) { int rc = 0; size_t len = 0; size_t msg_part_len = 0; ipmsg_send_flags_t local_flags = 0; int abs_index = 0; char *absent_title = NULL; char *message = NULL; char *extension = NULL; if (con == NULL) { rc = -EINVAL; goto error_out; } /* * 送信フラグ作成 */ local_flags = flags; /* * 自発的IPMSG_ANSENTRYパケット以外は, デフォルトのフラグを設定 */ if ( !( (local_flags & IPMSG_ANSENTRY) && (local_flags & hostinfo_get_normal_entry_flags()) ) ) local_flags |= hostinfo_get_normal_entry_flags(); dbg_out("Entry Type Flag :%x\n", local_flags); /* * IPMSG_BR_EXITは, 不在通知不要. */ if ( ipmsg_protocol_flags_get_command(flags) == IPMSG_BR_EXIT ) goto create_message; /* * 不在処理拡張 */ if (hostinfo_is_ipmsg_absent()) { rc = hostinfo_get_absent_id(&abs_index); if (rc == 0) { hostinfo_get_absent_title(abs_index, (const char **)&absent_title); } } create_message: /* * メッセージ部 */ msg_part_len = (strlen(hostinfo_refer_nick_name())) + /* ニックネーム */ ((absent_title != NULL) ? (strlen(absent_title) + IPMSG_PROTOCOL_BR_ABSENT_FMT_LEN) : (0) ) + 1; /* +1 は, ヌルターミネート */ message = g_malloc(msg_part_len); if (message == NULL) { rc = -ENOMEM; goto error_out; } if (absent_title != NULL) snprintf(message, msg_part_len, IPMSG_PROTOCOL_BR_ABSENT_FMT, hostinfo_refer_nick_name(), (absent_title)); else snprintf(message, msg_part_len, IPMSG_PROTOCOL_BR_ENTRY_FMT, hostinfo_refer_nick_name()); message[msg_part_len - 1] = '\0'; /* * 拡張部 */ extension = g_strdup(hostinfo_refer_group_name()); if (extension == NULL) { rc = -ENOMEM; goto free_message_out; } /* * パケット送信 */ rc = ipmsg_send_packet(con, IPMSG_PROTOCOL_ENTRY_PKT_ADDR, IPMSG_PROTOCOL_PKTNUM_AUTO, local_flags, message, extension); if (rc != 0) { goto free_extension_out; } rc = 0; /* 正常終了 */ free_extension_out: if (extension != NULL) g_free(extension); free_message_out: if (message != NULL) g_free(message); error_out: return rc; } /** IPMSGのIPMSG_ANSENTRYパケットを送出する * @param[in] con UDPコネクション情報 * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note IPMSG_ANSENTRYパケットの形式は, 以下のとおり * * IPMSG_ANSENTRY パケット形式 * - メッセージ部: ニックネーム (通常時) * ニックネーム<空白>'['不在種別']' (不在モード時) * - 拡張部 : グループ名 */ static int ipmsg_send_ans_entry_common(const udp_con_t *con, const char *ipaddr, const ipmsg_send_flags_t flags){ int rc = 0; ipmsg_send_flags_t local_flags = 0; local_flags = flags; local_flags |= IPMSG_ANSENTRY; rc = ipmsg_send_entry_packets(con, ipaddr, local_flags); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSG_BR_ENTRYへの応答として, IPMSG_ANSENTRYパケットを送出する * @param[in] con UDPコネクション情報 * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note IPMSG_ANSENTRYパケットの形式は, 以下のとおり * * IPMSG_ANSENTRY パケット形式 * - メッセージ部: ニックネーム (通常時) * ニックネーム<空白>'['不在種別']' (不在モード時) * - 拡張部 : グループ名 */ static int ipmsg_send_ans_entry(const udp_con_t *con,const int flags){ int rc = 0; ipmsg_send_flags_t local_flags = 0; local_flags = flags; local_flags |= hostinfo_get_normal_entry_flags(); dbg_out("ANS-Entry Flag :%x\n", local_flags); /* * 応答用ANS_ENTRYを返す. */ rc = ipmsg_send_ans_entry_common(con, udp_get_peeraddr(con), local_flags); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_BR_ABSENCEパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_proc_br_absence(const udp_con_t *con, const msg_data_t *msg){ int rc = 0; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } dbg_out("\nNew user: \n\tUser:%s Host: %s\n\t" "NickName: %s GroupName:%s\n", refer_user_name_from_msg(msg), refer_host_name_from_msg(msg), refer_nick_name_from_msg(msg), refer_group_name_from_msg(msg)); /* ユーザーリストを更新する */ rc = ipmsg_protocol_user_opration(con, msg, IPMSG_PROTOCOL_USR_UPDATE); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_BR_ENTRYパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_proc_br_entry(const udp_con_t *con,const msg_data_t *msg) { int rc = 0; const char *ipaddr = NULL; ipmsg_command_t command = 0; ipmsg_cap_t peer_cap = 0; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } ipmsg_send_ans_entry(con, 0); /* ユーザーリストを更新する */ rc = ipmsg_protocol_user_opration(con, msg, IPMSG_PROTOCOL_USR_ADD); if (rc != 0) { goto error_out; } /* * ピアのIPアドレスを取得する */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } /* コマンドオプションを取得 */ rc = get_command_from_msg(msg, &command, &peer_cap); g_assert(rc == 0); /* * 暗号化可能なピアの場合, 鍵獲得を試みる */ if (peer_cap & IPMSG_ENCRYPTOPT) { ipmsg_send_getpubkey(con, ipaddr); } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_BR_EXITパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_proc_br_exit(const udp_con_t *con,const msg_data_t *msg) { int rc = 0; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } dbg_out("\nLeave user: \n\tUser:%s Host: %s\n\t" "NickName: %s GroupName:%s\n", refer_user_name_from_msg(msg), refer_host_name_from_msg(msg), refer_nick_name_from_msg(msg), refer_group_name_from_msg(msg)); /* ユーザーリストを更新する */ rc = ipmsg_protocol_user_opration(con, msg, IPMSG_PROTOCOL_USR_DEL); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_ANSENTRYパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信メッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_proc_ans_entry(const udp_con_t *con,const msg_data_t *msg) { int rc = 0; const char *ipaddr = NULL; ipmsg_command_t command = 0; ipmsg_cap_t peer_cap = 0; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } dbg_out("\nNew user: \n\tUser:%s Host: %s\n\t" "NickName: %s GroupName:%s\n", refer_user_name_from_msg(msg), refer_host_name_from_msg(msg), refer_nick_name_from_msg(msg), refer_group_name_from_msg(msg)); /* ユーザーリストを更新する */ rc = ipmsg_protocol_user_opration(con, msg, IPMSG_PROTOCOL_USR_ADD); if (rc != 0) { goto error_out; } /* * ピアのIPアドレスを取得する */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } /* コマンドオプションを取得 */ rc = get_command_from_msg(msg, &command, &peer_cap); g_assert(rc == 0); /* * 暗号化可能なピアの場合, 鍵獲得を試みる */ if (peer_cap & IPMSG_ENCRYPTOPT) { ipmsg_send_getpubkey(con, ipaddr); } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGの情報系/メッセージ送信系パケットを送出する * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] flags 送信フラグ * @param[in] pktno パケット番号 * @param[in] message メッセージ部 * @param[in] extension 拡張部 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note 情報系/メッセージ送信系パケットの形式は, 以下のとおり. * * IPMSG_SENDABSENCEINFO パケット形式 * - メッセージ部: 不在通知文 * - 拡張部 : なし * * IPMSG_SENDINFO パケット形式 * - メッセージ部: 版数情報(自由形式) * - 拡張部 : なし * * IPMSG_SENDMSG パケット形式 * - メッセージ部: メッセージ本文 * - 拡張部 : 添付ファイル文字列 */ static int ipmsg_send_sendmsg_packets(const udp_con_t *con, const char *ipaddr, int flags, int pkt_no, const char *message, const char *extension) { int rc = 0; size_t len = 0; char *sent_message = NULL; char *converted_message = NULL; size_t sent_msg_len = 0; gchar *internal_message = NULL; ipmsg_cap_t peer_cap = 0; ipmsg_cap_t peer_crypt_cap = 0; ipmsg_send_flags_t local_flags = 0; if ( (con == NULL) || (ipaddr == NULL) || (message == NULL) ) { rc = -EINVAL; goto errot_out; } /* * フラグ設定 */ local_flags = flags; /* * フラグ値加工 */ if ( flags & IPMSG_PROTOCOL_INFOMSG_TYPE ) { /* 情報系パケットにはSENDMSGおよび暗号化フラグをつけない */ local_flags &= ~(IPMSG_SENDMSG| IPMSG_ENCRYPTOPT); local_flags |= (IPMSG_NO_REPLY_OPTS|IPMSG_AUTORETOPT); /* 自動送信フラグ */ } else { local_flags |= IPMSG_SENDMSG; } /* ファイル添付を指定されたが, 拡張部が無い場合, ファイル添付を中止 */ if ( (local_flags & IPMSG_FILEATTACHOPT) && (extension == NULL) ) { local_flags &= ~IPMSG_FILEATTACHOPT; war_out("%s\n%s", _("No extension in file attached message." "Ignore attachments.")); } sent_message = (char *)message; /* 平文を送ることを仮定 */ /* * 暗号化通信パケットの処理 */ #if defined(USE_OPENSSL) if (local_flags & IPMSG_ENCRYPTOPT) { /* 暗号化メッセージを送る場合 */ /* * ピアの暗号化能力を参照し, 暗号化不可能の場合は, 暗号化を * 取りやめる. */ rc = userdb_get_cap_by_addr(ipaddr, &peer_cap, &peer_crypt_cap); if (rc != 0) { /* 暗号化能力不明のため暗号化しないで抜ける. */ goto cancel_encryption; } if ( ( !(peer_cap & IPMSG_ENCRYPTOPT) ) || (peer_crypt_cap == 0) ) { /* 未だ暗号化に必要な情報が得られていない * 次回に備えて取得要求を発行し, 今回は暗号化せずに送る. */ ipmsg_send_getpubkey(con, ipaddr); goto cancel_encryption; } if (peer_cap & IPMSG_ENCRYPTOPT) { /* * 暗号化を実施する場合は, 先にエンコード変換が必要 */ rc = ipmsg_convert_string_external(ipaddr, message, (const gchar **)&converted_message); if (rc != 0) { ipmsg_err_dialog("%s:%s\n", _("Can not convert common into external representation"), message); goto cancel_encryption; /* 平文送信 */ } /* * 暗号化可能なピアについては, 暗号化を実施 */ dbg_out("Peer's cap=%x\n", peer_cap); rc = ipmsg_encrypt_message(ipaddr, converted_message, (unsigned char **)&sent_message, &sent_msg_len); if (rc != 0) { /* 暗号化失敗 */ goto cancel_encryption; } dbg_out("Encrypted message.%s\n", sent_message); /* 暗号化に成功した場合は, この時点で送信ログを * 記録する */ logfile_send_log(ipaddr, local_flags, message); goto end_encryption; } } cancel_encryption: /* * 暗号化未対応なピアについては, * 暗号化処理をせずに抜ける */ dbg_out("Peer can not handle crypted message.rc=%d cap=%x\n", rc, peer_cap); local_flags &= ~IPMSG_ENCRYPTOPT; sent_message = (char *)message; /* 平文を送る */ end_encryption: #else /* * 暗号化をせずに送信 */ flags &= ~IPMSG_ENCRYPTOPT; #endif /* USE_OPENSSL */ /* * パケット送信 */ rc = ipmsg_send_packet(con, ipaddr, pkt_no, local_flags, sent_message, extension); if (rc != 0) { goto free_internal_message_out; } rc = 0; /* 正常終了 */ free_internal_message_out: if (internal_message == NULL) g_free(internal_message); free_sent_message_out: if ( (message != sent_message) && (sent_message != NULL) ) g_free(sent_message); if (converted_message != NULL) g_free(converted_message); errot_out: return rc; } /** IPMSGのIPMSG_SENDABSENCEINFOパケットを送出する * @param[in] con UDPコネクション情報 * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_send_absence_msg(const udp_con_t *con, const int flags) { char *absence_message = NULL; const char *ipaddr = NULL; int local_flags = 0; int rc = 0; if (con == NULL) { rc = -EINVAL; goto no_need_free_out; } /* * フラグを設定する */ local_flags = flags; local_flags |= (IPMSG_NO_REPLY_OPTS|IPMSG_AUTORETOPT); /* * ピアのIPアドレスを取得する */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto no_need_free_out; } /* * 不在通知電文を獲得する */ rc = hostinfo_get_current_absence_message(&absence_message); if (rc != 0) { g_assert(absence_message == NULL); goto no_need_free_out; } rc = ipmsg_send_sendmsg_packets(con, ipaddr, local_flags, IPMSG_PROTOCOL_PKTNUM_AUTO, absence_message, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto free_absence_message; } dbg_out("Absence message:%s\n", absence_message); rc = 0; /* 正常終了 */ free_absence_message: if (absence_message != NULL) g_free(absence_message); no_need_free_out: return rc; } /** IPMSGのIPMSG_SENDABSENCEINFO/IPMSG_SENDINFOパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_proc_send_info_packets(const udp_con_t *con, const msg_data_t *msg) { int rc = 0; ipmsg_command_t received_command = 0; gchar *peer_name = NULL; dbg_out("here\n"); g_assert( (con != NULL) && (msg != NULL) ); /* 呼び出し元責任で確認 */ dbg_out("send absence info:version %s\n", msg->message); /* * 受信したコマンドを取得 */ received_command = IPMSG_NOOPERATION; rc = get_command_from_msg(msg, &received_command, NULL); if (rc != 0) goto error_out; /* ユーザ名をメッセージから抽出する */ peer_name = g_strdup(refer_user_name_from_msg(msg)); if (peer_name == NULL) { rc = -ENOMEM; goto error_out; } /* * 受信したメッセージを処理 * peer_nameの開放は, 受け手で実施 */ switch (received_command) { case IPMSG_SENDABSENCEINFO: info_message_window(peer_name, udp_get_peeraddr(con), IPMSG_SENDABSENCEINFO, msg->message); break; case IPMSG_SENDINFO: info_message_window(peer_name, udp_get_peeraddr(con), IPMSG_SENDINFO, msg->message); break; default: break; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_SEND_INFOパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_proc_send_info(const udp_con_t *con, const msg_data_t *msg) { int rc = 0; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } dbg_out("send info:version %s\n", msg->message); rc = ipmsg_proc_send_info_packets(con, msg); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_SENDABSENCEINFOパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ static int ipmsg_proc_send_absence_info(const udp_con_t *con, const msg_data_t *msg) { int rc = 0; dbg_out("here\n"); if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } dbg_out("send absence info %s\n", msg->message); rc = ipmsg_proc_send_info_packets(con, msg); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_GETABSENCEINFOパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージのメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @attention 内部リンケージ */ static int ipmsg_proc_get_absence_info(const udp_con_t *con, const msg_data_t *orig_msg) { ipmsg_send_flags_t local_flags = 0; int rc = 0; dbg_out("here\n"); if (con == NULL) { rc = -EINVAL; goto error_out; } /* * フラグ作成 */ local_flags = hostinfo_get_normal_send_flags(); local_flags |= IPMSG_SENDABSENCEINFO; /* * 不在通知文送信 */ rc = ipmsg_send_absence_msg(con, local_flags); if (rc != 0) goto error_out; rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_GETINFOパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] orig_msg 受信メッセージ(未使用) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOENT ピアのIPアドレスを獲得できなかった. * @retval -ENOMEM メモリ不足 * @note IPMSG_SENDINFOを送出する. * @attention 内部リンケージ */ static int ipmsg_proc_get_info(const udp_con_t *con, const msg_data_t *orig_msg){ char *version_string = NULL; const char *ipaddr = NULL; ipmsg_send_flags_t local_flags = 0; size_t len = 0; int rc = 0; dbg_out("here\n"); if (con == NULL) { rc = -EINVAL; goto error_out; } /* * フラグ設定 */ local_flags = IPMSG_SENDINFO; /* * ピアのIPアドレスを取得する */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -ENOENT; goto error_out; } /* * 返却文字列長を算出する * 書式指定文字列の長さをそのまま足しているので, 実際に必要な分より少し多めに * 取っている. */ len = 0; len += strlen(IPMSG_PROTOCOL_SENDINFO_FMT); len += strlen(_("Edition")); len += strlen(PACKAGE); len += strlen(_("Version")); len += strlen(VERSION); len += 1; /* ヌルターミネート */ /* * 領域割り付け */ version_string = g_malloc(len); if (version_string == NULL) { rc = -ENOMEM; goto error_out; } /* * 版数文字列作成 */ snprintf(version_string, len, IPMSG_PROTOCOL_SENDINFO_FMT, _("Edition"), PACKAGE, _("Version"), VERSION); dbg_out("Version string:%s\n", version_string); /* * 送信 */ rc = ipmsg_send_sendmsg_packets(con, ipaddr, local_flags, IPMSG_PROTOCOL_PKTNUM_AUTO, version_string, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto free_version_string_out; } rc = 0; free_version_string_out: if (version_string != NULL) g_free(version_string); error_out: return rc; } /** IPMSG_SENDMSGパケットを処理する. * @param[in] con UDPコネクション情報 * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note */ static int ipmsg_proc_send_msg(const udp_con_t *con, const msg_data_t *msg) { gchar *internal_message = NULL; const gchar *ipaddr = NULL; int local_flags = 0; int rc = 0; /* * 文字列変換のためにピアのIPアドレスを取得する. */ ipaddr = udp_get_peeraddr(con); if (ipaddr == NULL) { rc = -EINVAL; goto error_out; } /* * 文字列を内部形式に変換する. */ rc = ipmsg_convert_string_internal(ipaddr, msg->message, (const gchar **)&internal_message); if (rc != 0) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), ipaddr); goto error_out; } dbg_out("message:\n%s\n", internal_message); /* * ログを取らないように要求している場合を除いてログを設定する. * 鍵付き封書のログ処理抑制は, ログ処理機構で実施 * (IPMSGのプロトコル上の仕様ではないため). */ if ( !(msg->command_opts & IPMSG_NOLOGOPT) ) logfile_recv_log(ipaddr, msg->command_opts, internal_message); /* * 返信抑制フラグが付いている場合は, 返信に関わる処理を実施しない. */ if ( msg->command_opts & IPMSG_NO_REPLY_OPTS ) goto show_receive_win; /* * 送受信確認チェックが付いているメッセージの場合, * 受信確認パケットを送信する. */ if ( msg->command_opts & IPMSG_SENDCHECKOPT ) ipmsg_send_recv_msg(con, msg); /* * 不在の場合は, 不在通知を実施する. * */ if ( hostinfo_is_ipmsg_absent() ) { local_flags = hostinfo_get_normal_send_flags(); if (hostinfo_refer_ipmsg_default_secret()) local_flags |= IPMSG_SECRETOPT; ipmsg_send_absence_msg(con, local_flags); } show_receive_win: /* * 受信ウィンドウを生成する. */ if (hostinfo_refer_ipmsg_default_popup()) store_message_window(msg, ipaddr); else recv_message_window(msg, ipaddr); rc = 0; /* 正常終了 */ free_internal_message_out: if (internal_message != NULL) g_free(internal_message); error_out: return rc; } /** 送信パケットのパケット番号を取得する. * @retval パケット番号 */ pktno_t ipmsg_get_pkt_no(void) { pktno_t this_pkt_no = 0; /* * 自動パケット番号生成とぶつからない番号を生成する */ g_static_mutex_lock(&pktno_mutex); do{ ++pkt_no; this_pkt_no = (time(NULL) % 100000 + pkt_no); } while (this_pkt_no == IPMSG_PROTOCOL_PKTNUM_AUTO); g_static_mutex_unlock(&pktno_mutex); return this_pkt_no; } /** 自発的なIPMSG_ANSENTRYパケットを送出する * 不正暗号化電文受信時に, 暗号化能力をキャンセルするのに使用する. * @param[in] con UDPコネクション情報 * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note IPMSG_ANSENTRYパケットの形式は, 以下のとおり * * IPMSG_ANSENTRY パケット形式 * - メッセージ部: ニックネーム (通常時) * ニックネーム<空白>'['不在種別']' (不在モード時) * - 拡張部 : グループ名 */ int ipmsg_send_gratuitous_ans_entry(const udp_con_t *con, const char *ipaddr, const int flags){ int rc = 0; if ( (con == NULL) || (ipaddr == NULL) ) return -EINVAL; /* 無条件に送りつけるANS_ENTRYなので, flagsは呼び出し側責任で設定する. * これは, 暗号化通信のキャンセルなどで使用する. */ dbg_out("Send gratutous ANS_ENTRY to %s with 0x%08x\n", ipaddr, flags); rc = ipmsg_send_ans_entry_common(con, ipaddr, flags); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_BR_ENTRYパケットを送出する. * @param[in] con UDPコネクション情報 * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note * IPMSG_BR_ENTRY パケット形式 * - メッセージ部: ニックネーム (通常時) * ニックネーム<空白>'['不在種別']' (不在モード時) * - 拡張部 : グループ名 */ int ipmsg_send_br_entry(const udp_con_t *con, const int flags){ int rc = 0; ipmsg_send_flags_t local_flags = 0; if (con == NULL) { rc = -EINVAL; goto error_out; } /* * 設定されている場合は, ホストリストを要求 */ if (hostinfo_refer_ipmsg_is_get_hlist()) ipmsg_send_br_isgetlist2(con, flags); local_flags = flags; local_flags |= IPMSG_BR_ENTRY; dbg_out("BR-Entry Flag :%x\n", local_flags); rc = ipmsg_send_entry_packets(con, IPMSG_PROTOCOL_ENTRY_PKT_ADDR, local_flags); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_BR_EXITパケットを送出する. * @param[in] con UDPコネクション情報 * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note * IPMSG_BR_EXIT パケット形式 * - メッセージ部: ニックネーム (通常時) * - 拡張部 : グループ名 */ int ipmsg_send_br_exit(const udp_con_t *con, const int flags){ int rc = 0; ipmsg_send_flags_t local_flags = 0; local_flags = flags; local_flags |= IPMSG_BR_EXIT; dbg_out("BR-Exit Flag :%x\n", local_flags); rc = ipmsg_send_entry_packets(con, IPMSG_PROTOCOL_ENTRY_PKT_ADDR, local_flags); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_BR_ABSENCEパケットを送出する. * @param[in] con UDPコネクション情報 * @param[in] flags パケット送信フラグ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @note * IPMSG_BR_ABSENCE パケット形式 * - メッセージ部: * - ニックネーム (通常時) * - ニックネーム<空白>'['不在種別']' (不在モード時) * - 拡張部 : グループ名 */ int ipmsg_send_br_absence(const udp_con_t *con, const int flags) { int rc = 0; ipmsg_send_flags_t local_flags = 0; local_flags = flags; local_flags |= IPMSG_BR_ABSENCE; dbg_out("BR-Absence Flag :%x\n", local_flags); rc = ipmsg_send_entry_packets(con, IPMSG_PROTOCOL_ENTRY_PKT_ADDR, local_flags); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのファイル取得メッセージ(外部形式)を作成する * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] ftype ファイル種別 * @param[in] msg_string ファイル取得メッセージ部 * @param[in] flags パケット送信フラグ * @param[out] returned_len ファイル取得メッセージ長の返却領域 * @param[out] returned_message ファイル取得メッセージの返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int ipmsg_construct_getfile_message(const tcp_con_t *con, const char *ipaddr, ipmsg_ftype_t ftype, const char *msg_string, ipmsg_send_flags_t flags, size_t *returned_len, char **returned_message){ int rc = 0; ipmsg_send_flags_t local_flags = 0; char *packet = NULL; size_t packet_len = 0; pktno_t sent_pkt_no = 0; if ( (con == NULL) || (ipaddr == NULL) || (msg_string == NULL) || (returned_len == NULL) || (returned_message == NULL) ) { rc = -EINVAL; goto error_out; } /* * フラグ設定 */ local_flags = flags; local_flags |= hostinfo_get_normal_send_flags(); local_flags |= ( (ftype == IPMSG_FILE_DIR) ? (IPMSG_GETDIRFILES) : (IPMSG_GETFILEDATA) ); /* * パケット生成(外部形式) */ rc = build_ipmsg_packet(ipaddr, IPMSG_PROTOCOL_PKTNUM_AUTO, local_flags, msg_string, IPMSG_PROTOCOL_MSG_NO_EXTENSION, &packet, &packet_len, IPMSG_PROTOCOL_MSG_NONEED_PKTNO); if ( rc != 0 ) { goto error_out; } /* * 返却 */ *returned_message = packet; *returned_len = packet_len; rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_SENDMSGパケットを送出する * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] flags 送信フラグ * @param[in] pktno パケット番号 * @param[in] message メッセージ本文 * @param[in] extension 拡張部 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int ipmsg_send_send_msg(const udp_con_t *con, const char *ipaddr, int flags, int pkt_no, const char *message, const char *extension){ int rc = 0; if ( (con == NULL) || (ipaddr == NULL) || (message == NULL) ) { rc = -EINVAL; goto error_out; } /* メッセージ送信 */ rc = ipmsg_send_sendmsg_packets(con, ipaddr, flags, pkt_no, message, extension); if (rc != 0) { goto error_out; } /* * 送信ログを記録(自動送信パケットは記録しない). */ if ( (ipmsg_protocol_flags_get_command(flags) == IPMSG_SENDMSG) && ( !(flags & (IPMSG_AUTORETOPT|IPMSG_ENCRYPTOPT)) ) ) { /* ロギングはオプションであるため, 失敗しても通信は, 正常終了させる */ logfile_send_log(ipaddr, flags, message); } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_RELEASEFILESパケットを送出する * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] pktno 開放するファイルのパケット番号 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int ipmsg_send_release_files(const udp_con_t *con, const char *ipaddr, int pktno){ int rc = 0; ipmsg_send_flags_t local_flags = 0; dbg_out("here"); if ( (con == NULL) || (ipaddr == NULL) ) { rc = -EINVAL; goto error_out; } /* * フラグ設定 */ local_flags = IPMSG_RELEASEFILES; dbg_out("Send release file pktno=%d\n", pktno); /* * パケット送信 */ rc = ipmsg_notify_number(con, ipaddr , local_flags, pktno); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_GETLISTパケットを送出する. ‘ * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] index 取得開始ホストリストエントリ番号 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * */ int ipmsg_send_get_list(const udp_con_t *con, const char *ipaddr, const int index) { int rc = 0; ipmsg_send_flags_t local_flags = 0; dbg_out("here"); if ( (con == NULL) || (ipaddr == NULL) ) { rc = -EINVAL; goto error_out; } /* * フラグ設定 */ local_flags = IPMSG_GETLIST; dbg_out("Send getlist index = %d\n", index); /* * パケット送信 */ rc = ipmsg_notify_number(con, ipaddr , local_flags, index); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_READMSGを送出する. * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] pkt_num 開封済みメッセージのパケット番号 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @attention 内部リンケージ */ int ipmsg_send_read_msg(const udp_con_t *con, const char *ipaddr, pktno_t pkt_num){ int rc = 0; size_t len = 0; ipmsg_send_flags_t local_flags = 0; if (con == NULL) { rc = -EINVAL; goto error_out; } /* * フラグを設定する */ local_flags = (IPMSG_READMSG|IPMSG_AUTORETOPT); dbg_out("Send readmsg packet : (ipaddr, pkt_num) = (%s, %d)\n", ipaddr, pkt_num); /* * パケット送信 */ rc = ipmsg_notify_number(con, ipaddr , local_flags, pkt_num); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGの情報系パケット取得要求を送出する. * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @param[in] command 情報系コマンド * @retval 0 正常終了 * @retval -EINVAL 引数異常 * * IPMSG_GETABSENCEINFO パケット形式 * - メッセージ部: なし * - 拡張部 : なし * * IPMSG_GETINFO パケット形式 * - メッセージ部: なし * - 拡張部 : なし */ int ipmsg_send_get_info_msg(const udp_con_t *con,const char *ipaddr,ipmsg_command_t command){ int rc = 0; size_t len = 0; ipmsg_send_flags_t local_flags = 0; if ( (con == NULL) || (ipaddr == NULL) || ( !(command & IPMSG_PROTOCOL_GETINFO_TYPE) ) ) { rc = -EINVAL; goto error_out; } g_assert( ( (command & IPMSG_GETINFO) == IPMSG_GETINFO) || ( (command & IPMSG_GETABSENCEINFO) == IPMSG_GETABSENCEINFO) ) ; /* * フラグ設定 */ local_flags = command; /* * パケット送信 */ rc = ipmsg_send_packet(con, ipaddr, IPMSG_PROTOCOL_PKTNUM_AUTO, local_flags, IPMSG_PROTOCOL_MSG_NO_MESSAGE, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto error_out; } rc = 0; /* 正常終了 */ error_out: return rc; } /** IPMSGのIPMSG_GETPUBKEYパケットを送出する. * @param[in] con UDPコネクション情報 * @param[in] ipaddr 送信先IPアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常 * * IPMSG_GETPUBKEY パケット形式 * - メッセージ部: 暗号化ケイパビリティ(16進)を文字列で表した数値 * - 拡張部 : なし */ int ipmsg_send_getpubkey(const udp_con_t *con, const char *ipaddr){ char *cap_string = NULL; char *send_string = NULL; int rc = 0; size_t len = 0; ipmsg_send_flags_t local_flags = 0; ipmsg_cap_t capability = 0; dbg_out("here\n"); if ( (con == NULL) || (ipaddr == NULL) ) { rc = -EINVAL; goto error_out; } #if !defined(USE_OPENSSL) rc = -ENOSYS; /* 未サポート */ goto error_out; #else /* * フラグ設定 */ local_flags = IPMSG_GETPUBKEY; /* * 暗号化能力を文字列化 */ capability = hostinfo_get_ipmsg_crypt_capability(); rc = pcrypt_crypt_generate_getpubkey_string(capability, (const char **)&cap_string); if (rc != 0) { g_assert(cap_string == NULL); goto error_out; } dbg_out("Send GETPUBKEY Capability:%s\n", cap_string); /* * パケット送信 */ rc = ipmsg_send_packet(con, ipaddr, IPMSG_PROTOCOL_PKTNUM_AUTO, local_flags, cap_string, IPMSG_PROTOCOL_MSG_NO_EXTENSION); if (rc != 0) { goto free_cap_string_out; } rc = 0; /* 正常終了 */ free_cap_string_out: if (cap_string != NULL) g_free(cap_string); #endif /* USE_OPENSSL */ error_out: return rc; } /** 受信したパケットを処理する * @param[in] con UDPコネクション情報 * @param[in] msg 受信したメッセージ情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOENT 指定されたコマンドが見つからなかった. */ int ipmsg_dispatch_message(const udp_con_t *con, const msg_data_t *msg){ int rc = 0; if ( (con == NULL) || (msg == NULL) ) { rc = -EINVAL; goto error_out; } switch(msg->command) { case IPMSG_NOOPERATION: break; case IPMSG_BR_ENTRY: dbg_out("Dispatch br_entry\n"); ipmsg_proc_br_entry(con, msg); break; case IPMSG_BR_EXIT: dbg_out("Dispatch br_exit\n"); ipmsg_proc_br_exit(con, msg); break; case IPMSG_ANSENTRY: dbg_out("Dispatch ans_entry\n"); ipmsg_proc_ans_entry(con, msg); break; case IPMSG_BR_ABSENCE: dbg_out("Dispatch br_absense\n"); ipmsg_proc_br_absence(con, msg); break; case IPMSG_BR_ISGETLIST: dbg_out("Dispatch isget_list2\n"); if (hostinfo_refer_ipmsg_is_allow_hlist()) ipmsg_proc_br_isgetlist2(con, msg); break; case IPMSG_OKGETLIST: dbg_out("Dispatch okget_list\n"); if (hostinfo_refer_ipmsg_is_get_hlist()) ipmsg_proc_okgetlist(con, msg); break; case IPMSG_GETLIST: dbg_out("Dispatch get_list\n"); if (hostinfo_refer_ipmsg_is_allow_hlist()) ipmsg_proc_getlist(con, msg); else dbg_out("Discard getlist request\n"); break; case IPMSG_ANSLIST: dbg_out("Dispatch ans_list\n"); ipmsg_proc_anslist(con, msg); break; case IPMSG_BR_ISGETLIST2: dbg_out("Dispatch br_isget_list2\n"); if (hostinfo_refer_ipmsg_is_allow_hlist()) ipmsg_proc_br_isgetlist2(con, msg); break; case IPMSG_SENDMSG: dbg_out("Dispatch send_message\n"); ipmsg_proc_send_msg(con, msg); break; case IPMSG_RECVMSG: dbg_out("Dispatch recv_message\n"); ipmsg_proc_recv_msg(con, msg); break; case IPMSG_READMSG: dbg_out("Dispatch read_message\n"); ipmsg_proc_read_msg(con, msg); break; case IPMSG_DELMSG: dbg_out("Dispatch delete_message\n"); break; case IPMSG_ANSREADMSG: dbg_out("Dispatch ans_read_message\n"); break; case IPMSG_GETINFO: dbg_out("Dispatch get_info\n"); ipmsg_proc_get_info(con, msg); break; case IPMSG_SENDINFO: dbg_out("Dispatch send_info\n"); ipmsg_proc_send_info(con, msg); break; case IPMSG_GETABSENCEINFO: dbg_out("Dispatch get_absence_info\n"); ipmsg_proc_get_absence_info(con, msg); break; case IPMSG_SENDABSENCEINFO: dbg_out("Dispatch send_absence_info\n"); ipmsg_proc_send_absence_info(con, msg); break; case IPMSG_RELEASEFILES: dbg_out("Dispatch release files\n"); ipmsg_proc_release_files_msg(con, msg); break; case IPMSG_GETPUBKEY: dbg_out("Dispatch get public key\n"); ipmsg_proc_get_public_key(con, msg); break; case IPMSG_ANSPUBKEY: dbg_out("Dispatch ans public key\n"); ipmsg_proc_anspubkey(con, msg); break; default: dbg_out("Can not dispatch unknown:%x\n", msg->command); /* Unknown command */ rc = -ENOENT; break; } error_out: return rc; } g2ipmsg-0.9.6+dfsg/src/protocol.h000066400000000000000000000201351126724573600166340ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(PROTOCOL_H) /** ヘッダの多重インクルード抑制 */ #define PROTOCOL_H /** @file * @brief IPMSGプロトコル関連定義 * @author Takeharu KATO */ #ifdef HAVE_CONFIG_H # include #endif #include #include "ipmsg.h" #include "ipmsg_types.h" #include "tcp.h" #include "udp.h" /** パケット生成時にパケット番号を自動的に割り当てる */ #define IPMSG_PROTOCOL_PKTNUM_AUTO (0) /** パケット番号文字列長(ヌルターミネート含む) */ #define IPMSG_PROTOCOL_PKTNUM_LEN (11) /** パケット番号->文字列変換用書式指定文字列 */ #define IPMSG_PROTOCOL_PKTNUM_FMT "%d" /** エントリ系パケットを表すIPアドレス, * @note ブロードキャストパケットの場合, 送信先IPアドレスにNULLを指定して * build_ipmsg_packetを呼び出すことで, パケット作成する */ #define IPMSG_PROTOCOL_ENTRY_PKT_ADDR (NULL) /** メッセージ部が無い(空文)コマンドであることを示す. * @note メッセージ部が無い(空文)コマンドの場合, メッセージ部にNULLを指定して * build_ipmsg_packetを呼び出すことで, パケット作成する */ #define IPMSG_PROTOCOL_MSG_NO_MESSAGE (NULL) /** 拡張部が無い(空文)コマンドであることを示す. * @note 拡張部が無い(空文)コマンドの場合, 拡張部にNULLを指定して * build_ipmsg_packetを呼び出すことで, パケット作成する */ #define IPMSG_PROTOCOL_MSG_NO_EXTENSION (NULL) /** 生成したパケットのパケット番号を取得しない * @note パケット番号返却アドレスにNULLを指定して * build_ipmsg_packetを呼び出すことで, パケット作成する */ #define IPMSG_PROTOCOL_MSG_NONEED_PKTNO (NULL) /** IPMSGのパケット形式(全コマンド共通部分)を表す書式指定文字列 * @note 1:pktno:ユーザ名:ホスト名:送信フラグ を表す文字列. */ #define IPMSG_PROTOCOL_COMMON_MSG_FMT "1:%ld:%s:%s:%lu:" /** IPMSGのパケット(全体)を作成するための書式指定文字列 * @note 共通部メッセージ部\0拡張部という形式. 共通部の末尾にデリミタである:を * 入れたため, このような定義としている */ #define IPMSG_PROTOCOL_ALLMSG_PACKET_FMT "%s%s%c%s" /** IPMSGのパケットのメッセージ部, 拡張部のデリミタ文字 * @note 共通部メッセージ部\0拡張部という形式 */ #define IPMSG_PROTOCOL_MSG_EXT_DELIM '\0' /** デバッグ文表示のためのメッセージ部, 拡張部のデリミタ文字 * @note 共通部メッセージ部\0拡張部という形式 */ #define IPMSG_PROTOCOL_MSG_EXT_DELIM_SYM '|' /** BR_ENTRYの書式指定文字列(通常時の書式) * @note 通常時と不在時とで, 書式が変わるため, 別定義を作成している. */ #define IPMSG_PROTOCOL_BR_ENTRY_FMT "%s" /** BR_ENTRYの書式指定文字列(不在時の書式) * @note 通常時と不在時とで, 書式が変わるため, 別定義を作成している. */ #define IPMSG_PROTOCOL_BR_ABSENT_FMT "%s [%s]" /** 不在文文字列の書式 */ #define IPMSG_PROTOCOL_BR_ABSENT_FMT_LEN (3) /* 空白 + '[' + ']'の3文字 */ /** 版数返却文字列の書式 */ #define IPMSG_PROTOCOL_SENDINFO_FMT "GNOME2 %s (%s)\n%s:%s" /** 情報系パケット(情報通知)のコマンドを表すビットマップ */ #define IPMSG_PROTOCOL_INFOMSG_TYPE (IPMSG_SENDINFO|IPMSG_SENDABSENCEINFO) /** 情報系パケット(情報取得要求)のコマンドを表すビットマップ */ #define IPMSG_PROTOCOL_GETINFO_TYPE (IPMSG_GETINFO|IPMSG_GETABSENCEINFO) /** 何もしないことを表すユーザDB操作(未使用) */ #define IPMSG_PROTOCOL_USR_NOP (0) /** ユーザ追加を表すユーザDB操作 */ #define IPMSG_PROTOCOL_USR_ADD (1) /** ユーザ情報更新を表すユーザDB操作 */ #define IPMSG_PROTOCOL_USR_UPDATE (2) /** ユーザ情報削除を表すユーザDB操作 */ #define IPMSG_PROTOCOL_USR_DEL (3) /** ホストリストによるユーザ情報追加を表すユーザDB操作 */ #define IPMSG_PROTOCOL_ADD_WITH_HOSTLIST (4) /** IPMSGのコマンド部分を取り出すマスク */ #define IPMSG_PROTOCOL_COMMAND_MASK (0xffUL) /** IPMSGのコマンドオプション部分を取り出すマスク */ #define IPMSG_PROTOCOL_COMMAND_OPT_MASK (0xffffff00UL) /** IPMSGのコマンド種別を取り出すマスク */ #define IPMSG_PROTOCOL_COMMAND_TYPE_MASK (0xf0UL) /** エントリパケット種別 */ #define IPMSG_PROTOCOL_COMMAND_ENTRY_TYPE (0x00UL) /** ホストリストパケット種別 */ #define IPMSG_PROTOCOL_COMMAND_HLIST_TYPE (0x10UL) /** メッセージ送信パケット種別 */ #define IPMSG_PROTOCOL_COMMAND_SEND_TYPE (0x20UL) /** メッセージ受信確認パケット種別 */ #define IPMSG_PROTOCOL_COMMAND_RECV_TYPE (0x30UL) /** 情報送信パケット種別 */ #define IPMSG_PROTOCOL_COMMAND_INFO_TYPE (0x40UL) /** 不在通知パケット種別 */ #define IPMSG_PROTOCOL_COMMAND_ABSENCE_TYPE (0x50UL) /** ファイル添付パケット種別 */ #define IPMSG_PROTOCOL_COMMAND_FILE_TYPE (0x60UL) /** 暗号通信基盤パケット種別 */ #define IPMSG_PROTOCOL_COMMAND_CRYPT_TYPE (0x70UL) /** パケットからコマンド種別を取り出す * @param[in] flags フラグ値 * @return フラグ中のコマンド部分 */ #define ipmsg_protocol_flags_get_command(flags) \ ( ((ipmsg_command_t)(flags)) & (IPMSG_PROTOCOL_COMMAND_MASK) ) /** パケットの送信フラグからコマンドオプションを取り出す * @param[in] flags フラグ値 * @return フラグ中のコマンドオプション部分 */ #define ipmsg_protocol_flags_get_opt(flags) \ ( ((ipmsg_command_t)(flags)) & (IPMSG_PROTOCOL_COMMAND_OPT_MASK) ) pktno_t ipmsg_get_pkt_no(void); int ipmsg_send_release_files(const udp_con_t *, const char *, int ); int ipmsg_send_br_entry(const udp_con_t *, const int ); int ipmsg_send_gratuitous_ans_entry(const udp_con_t *, const char *, const int ); int ipmsg_send_br_exit(const udp_con_t *, const int ); int ipmsg_send_br_absence(const udp_con_t *, const int ); int ipmsg_send_read_msg(const udp_con_t *, const char *, pktno_t ); int ipmsg_send_send_msg(const udp_con_t *, const char *, int , int , const char *, const char *); int ipmsg_dispatch_message(const udp_con_t *, const msg_data_t *); int ipmsg_send_get_info_msg(const udp_con_t *, const char *, ipmsg_command_t ); int ipmsg_send_getpubkey(const udp_con_t *, const char *); int ipmsg_send_get_list(const udp_con_t *, const char *, const int ); int ipmsg_construct_getfile_message(const tcp_con_t *, const char *, ipmsg_ftype_t , const char *, ipmsg_send_flags_t , size_t *, char **); #endif /* PROTOCOL_H */ g2ipmsg-0.9.6+dfsg/src/pubcrypt.c000066400000000000000000001661451126724573600166520ustar00rootroot00000000000000/* * Following codes(particularly check_secure_directory function) * are derived from * ``Secure Programming Cookbook for C and C++''. * URL:http://www.oreilly.com/catalog/secureprgckbk/ * http://www.secureprogramming.com/ * * Licensing Information can be obtain from following URL: * * http://www.secureprogramming.com/?action=license * * Copyright 2003 by John Viega and Matt Messier. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the developer of this software nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "common.h" /** @file * @brief 公開鍵暗号関数群 * @author Takeharu KATO */ /** スレッド間でのディレクトリ属性アクセス排他用ロック * @attention 内部リンケージ */ GStaticMutex dir_check_mutex = G_STATIC_MUTEX_INIT; /** スレッド間でのファイル属性アクセス排他用ロック * @attention 内部リンケージ */ GStaticMutex file_check_mutex = G_STATIC_MUTEX_INIT; /** スレッド間でのRSA鍵アクセス排他用ロック * @attention 内部リンケージ */ GStaticMutex rsa_key_mutex = G_STATIC_MUTEX_INIT; /** RSA公開鍵鍵テーブル * @attention 内部リンケージ */ static RSA *rsa_keys[RSA_KEY_MAX]; /** 鍵種別インデクスから公開鍵暗号化能力IDへの変換テーブル * @attention 内部リンケージ */ static const int key2ipmsg_key_type[]={ IPMSG_RSA_2048, IPMSG_RSA_1024, IPMSG_RSA_512, -1}; /** IPMSGの公開鍵暗号化能力IDからRSA公開鍵テーブルのインデクスを取得する. * @param[in] cap ipmsgの公開鍵暗号化能力ID * @param[out] indp インデクス値変換領域のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(capが不正なIDを示しているかindpがNULLである). * @attention 内部リンケージ */ static int get_rsa_key_index(const ipmsg_cap_t cap, int *indp){ int rc = 0; int index = 0; if ( (indp == NULL) || (!(cap & RSA_CAPS)) ) return -EINVAL; switch(cap) { case IPMSG_RSA_512: index = RSA_KEY_INDEX_512; break; case IPMSG_RSA_1024: index = RSA_KEY_INDEX_1024; break; case IPMSG_RSA_2048: index = RSA_KEY_INDEX_2048; break; default: g_assert_not_reached(); break; } *indp = index; return 0; } /** RSA鍵を格納したファイルを読み取り用に開く * @param[out] fd_p 開いたファイルを操作するためのファイル記述子格納領域のアドレス * @param[in] file RSA鍵ファイルのファイル名 * @retval 0 正常終了 * @retval -EINVAL 引数異常(fd_pまたはfileがNULLである). * @retval -EPERM 以下のいずれかが発生した. * - ファイルに対するアクセス権がない * - rootが所有するファイルである, * - 自身が所有するファイルでない. * - シンボリックリンクである * @attention 内部リンケージ */ static int open_key_file_for_read(int *fd_p, const unsigned char *file) { int rc = 0; int fd = 0; uid_t uid = 0; struct stat fbuff,lbuff; if ( (fd_p == NULL) || (file == NULL) ) return -EINVAL; g_static_mutex_lock(&file_check_mutex); /* 厳密にいえば不要 */ fd = open(file, O_RDONLY); if (fd < 0) { rc = -errno; goto unlock_out; } rc = fstat(fd, &fbuff); if (rc < 0) { rc = -errno; goto error_out; } rc = lstat(file,&lbuff); if (rc < 0) { rc = -errno; goto error_out; } uid = geteuid(); /* * 偏執的ではあるが, リンクでないことを確認する */ rc = -EPERM; if ( (lbuff.st_mode != fbuff.st_mode) || (lbuff.st_ino != fbuff.st_ino) || (lbuff.st_dev != fbuff.st_dev) ) goto error_out; /* * 本人以外に書き込めないことを確認する */ if ( ((fbuff.st_mode) & RSA_DIR_INVALID_FLAGS)) goto error_out; /* * rootが所有するファイルには, 開かない */ if ( (fbuff.st_uid == 0) || ( (fbuff.st_uid) && (fbuff.st_uid != uid) ) ) goto error_out; rc = 0; *fd_p = fd; unlock_out: g_static_mutex_unlock(&file_check_mutex); /* 厳密にいえば不要 */ return rc; error_out: close(fd); g_static_mutex_unlock(&file_check_mutex); /* 厳密にいえば不要 */ return rc; } /** RSA鍵を格納したファイルを書き込み用に開く * @param[out] fd_p 開いたファイルを操作するためのファイル記述子格納領域のアドレス * @param[in] file RSA鍵ファイルのファイル名 * @retval 0 正常終了 * @retval -EINVAL 引数異常(fd_pまたはfileがNULLである). * @retval -EPERM 以下のいずれかが発生した. * - ファイルに対するアクセス権がない * - rootが所有するファイルである, * - 自身が所有するファイルでない. * - シンボリックリンクである * @attention 内部リンケージ */ static int open_key_file_for_write(int *fd_p, const unsigned char *file) { int rc = 0; int fd = 0; uid_t uid = 0; struct stat fbuff,lbuff; if ( (fd_p == NULL) || (file == NULL) ) return -EINVAL; g_static_mutex_lock(&file_check_mutex); /* 厳密にいえば不要 */ fd = open(file, O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR); if (fd < 0){ if (errno != EEXIST) { rc = -errno; goto unlock_out; } else { fd = open(file, O_WRONLY); if (fd < 0){ rc = -errno; goto unlock_out; } } } rc = fstat(fd, &fbuff); if (rc < 0) { rc = -errno; goto error_out; } rc = lstat(file, &lbuff); if (rc < 0) { rc = -errno; goto error_out; } uid = geteuid(); /* * 偏執的ではあるが, リンクでないことを確認する */ rc = -EPERM; if ( (lbuff.st_mode != fbuff.st_mode) || (lbuff.st_ino != fbuff.st_ino) || (lbuff.st_dev != fbuff.st_dev) ) goto error_out; /* * 本人以外に書き込めないことを確認する */ if ( ((fbuff.st_mode) & RSA_DIR_INVALID_FLAGS)) goto error_out; /* * rootが所有するファイルには, 書き込まない */ if ( (fbuff.st_uid == 0) || ( (fbuff.st_uid > 0) && (fbuff.st_uid != uid) ) ) goto error_out; rc = 0; *fd_p = fd; unlock_out: g_static_mutex_unlock(&file_check_mutex); /* 厳密にいえば不要 */ return rc; error_out: close(fd); g_static_mutex_unlock(&file_check_mutex); /* 厳密にいえば不要 */ return rc; } /** ディレクトリが安全であることを確認する * @param[in] dir 確認対象のディレクトリへのパス * @retval 0 正常終了 * @retval -EINVAL 引数異常(fd_pまたはfileがNULLである). * @retval -EPERM 以下のいずれかが発生した. * - ディレクトリへの移動に失敗した * - rootまたは自分自身以外に書き込めるディレクトリが * 指定されたパス上に存在する. * - rootが所有するディレクトリである, * - root以外の他ユーザが所有するディレクトリが指定された * パス上に存在する * - シンボリックリンクが指定されたパス上に存在する * @attention 内部リンケージ */ static int check_secure_directory(const unsigned char *dir) { DIR *fd = NULL; DIR *start = NULL; int rc = 0; uid_t uid = 0; void *ref = NULL; struct stat fbuff,lbuff; char new_dir[PATH_MAX + 1]; g_static_mutex_lock(&dir_check_mutex); /* 厳密にいえば不要 */ start = opendir("."); if (start == NULL) { rc = -errno; goto unlock_out; } rc = lstat(dir, &lbuff); if (rc < 0) { rc = -errno; goto close_dir_out; } uid = geteuid(); do { rc = chdir(dir); if (rc != 0) { rc = -errno; goto ret_to_work_dir_out; } fd = opendir("."); if (fd == 0) goto ret_to_work_dir_out; rc = fstat(dirfd(fd), &fbuff); closedir(fd); if (rc < 0) { rc = -errno; goto ret_to_work_dir_out; } /* * 偏執的ではあるが, リンクでないことを確認する */ rc = -EPERM; if ( (lbuff.st_mode != fbuff.st_mode) || (lbuff.st_ino != fbuff.st_ino) || (lbuff.st_dev != fbuff.st_dev) ) goto ret_to_work_dir_out; /* * 本人以外に書き込めないことを確認する */ if ( ((fbuff.st_mode) & RSA_DIR_INVALID_FLAGS)) goto ret_to_work_dir_out; /* * 他者が所有するディレクトリがある場合には, 書き込まない */ if ( (fbuff.st_uid > 0) && (fbuff.st_uid != uid) ) goto ret_to_work_dir_out; /* *1つ上のディレクトリを探査する */ dir=".."; rc = lstat(dir, &lbuff); if (rc < 0) { rc = -errno; goto ret_to_work_dir_out; } memset(new_dir, 0, PATH_MAX + 1); ref = getcwd(new_dir, PATH_MAX + 1); /* 次に調査するディレクトリの * 親ディレクトリを獲得 */ if (ref == NULL) goto ret_to_work_dir_out; } while (new_dir[1] != '\0'); if (new_dir[1] == '\0') rc = 0; else rc = -EPERM; ret_to_work_dir_out: fchdir(dirfd(start)); close_dir_out: closedir(start); unlock_out: g_static_mutex_unlock(&dir_check_mutex); /* 厳密にいえば不要 */ return rc; } /** パスワード入力ダイアログを生成する * @param[out] passwd_p 入力したパスワードへのポインタを返却する領域のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(passwd_pがNULLである). * @retval -EPERM 以下のいずれかが発生した. * @retval -ENOMEM メモリが不足しいる. * @attention 内部リンケージ */ static int ipmsg_pem_passwd_dialog(gchar **passwd_p){ int rc = -EPERM; gchar *input_passwd = NULL; if (passwd_p == NULL) return -EINVAL; rc = password_confirm_window(HOSTINFO_PASSWD_TYPE_ENCKEY, &input_passwd); if ( (rc == -EPERM) || (rc == -ENOMEM) ) { g_assert(input_passwd == NULL); /* 割り当てられていないはず */ goto error_out; } dbg_out("passwd call back buffer = %s\n", input_passwd); *passwd_p = input_passwd; error_out: return rc; } /** 暗号化PEMを開く際によばれるコールバック関数 * @param[out] buf パスフレーズ格納先バッファ * @param[in] len パスフレーズ格納先バッファ長 * @param[in] rwflag * 0 ... 読み込み用にオープンした * 1 ... 書き込み用にオープンした * @param[in] cb_arg コールバック関数への引数 * (NULLのときは暗号化しない) * @retval 0 異常終了をOpenSSLに通知 * @retval 1 設定されているパスワードをOpenSSLに通知 * @attention 内部リンケージ */ static int ipmsg_pem_passwd_call_back(char *buf, int len, int rwflag, void *cb_arg){ int rc = 0; /* * パスワード要求は既に受け付けたので, 単純にエラーにする. */ if (cb_arg == NULL) { rc = 0; /* 失敗させる */ goto error_out; } /* * 暗号化ファイルが残っていた場合 */ snprintf(buf, len, "%s", cb_arg); buf[len - 1]='\0'; dbg_out("passwd len = %d passwd=%s\n", len, buf); rc = 1; error_out: return rc; } /** 秘密鍵を3DES-EDE-CBCに従って暗号化してファイルに保存する * @param[in] fpath 保存先ファイル名 * @param[in] rsa 保存対象RSA情報のアドレス * @param[in] passwd 鍵保存時のPKCS#5鍵導出に使用するパスフレーズ * NULLの場合は, 暗号化せずに鍵を保存する. * @retval 0 正常終了 * @retval -EINVAL 引数異常(fpathまたはrsaがNULLである). * @retval -EPERM ファイルへの書込み権がないか, * 安全でないファイルへ書き込みを試みた * @retval -ENOMEM メモリが不足しいる. * @attention 内部リンケージ */ static int store_private_key(const char *fpath, const RSA *rsa, const char *passwd){ int rc = 0; int fd = 0; FILE *fp = NULL; EVP_CIPHER *enc = NULL; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (fpath == NULL) || (rsa == NULL) ) return -EINVAL; rc = open_key_file_for_write(&fd, fpath); if (rc != 0) goto error_out; fp = fdopen(fd, "w"); if (fp == NULL) { rc = -errno; goto error_out; } if (passwd != NULL) enc = (EVP_CIPHER *)EVP_des_ede_cbc(); rc = PEM_write_RSAPrivateKey(fp, (RSA *)rsa, enc, NULL, 0, ipmsg_pem_passwd_call_back, (void *)passwd); if (rc == 0) { rc = ERR_get_error(); err_out("Can not store private key %s : err=%s\n", fpath, ERR_error_string(rc, errbuf)); rc = -EPERM; fclose(fp); goto error_out; } rc = fclose(fp); if (rc != 0) { rc = -errno; goto error_out; } rc = 0; dbg_out("Store key into %s\n", fpath); error_out: return rc; } /** 公開鍵をファイルに保存する * @param[in] fpath 保存先ファイル名 * @param[in] rsa 保存対象RSA情報のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(fpathまたはrsaがNULLである). * @retval -EPERM ファイルへの書込み権がないか, * 安全でないファイルへ書き込みを試みた * @retval -ENOMEM メモリが不足しいる. * @attention 内部リンケージ */ static int store_public_key(const char *fpath, const RSA *rsa){ int rc = 0; int fd = 0; FILE *fp = NULL; EVP_CIPHER *enc = NULL; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (fpath == NULL) || (rsa == NULL) ) return -EINVAL; rc = open_key_file_for_write(&fd, fpath); if (rc < 0) goto error_out; fp = fdopen(fd, "w"); if (fp == NULL) { rc = -errno; goto error_out; } rc = PEM_write_RSAPublicKey(fp, rsa); if (rc == 0){ rc = ERR_get_error(); err_out("Can not store public key %s : err=%s\n", fpath, ERR_error_string(rc, errbuf)); rc = -rc; fclose(fp); goto error_out; } rc = fclose(fp); if (rc != 0) { rc = -errno; goto error_out; } rc=0; error_out: return rc; } /** 秘密鍵をファイルから読み込む * @param[in] fpath 保存先ファイル名 * @param[out] rsa 読み込んだ秘密鍵を格納するRSA情報のアドレスの返却領域 * @param[in] passwd 鍵保存時のPKCS#5鍵導出に使用するパスフレーズ * NULLの場合は, 暗号化せずに鍵を保存する. * @retval 0 正常終了 * @retval -EINVAL 引数異常(fpathまたはrsaがNULLである). * @retval -EPERM ファイルへの読み込み権がないか, * 安全でないファイルからの読み取りを試みた * @retval -ENOMEM メモリが不足しいる. * @attention 内部リンケージ */ static int load_private_key(const char *fpath, RSA **rsa, const char *passwd){ int rc = 0; int fd = 0; FILE *fp = NULL; void *ref = NULL; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (fpath == NULL) || (rsa == NULL) ) return -EINVAL; rc = open_key_file_for_read(&fd, fpath); if (rc != 0) goto error_out; fp = fdopen(fd, "r"); if (fp == NULL) { rc = -errno; goto error_out; } ref = PEM_read_RSAPrivateKey(fp,rsa, ipmsg_pem_passwd_call_back, (void *)passwd); if (ref == NULL){ rc = ERR_get_error(); err_out("Can not load private key %s : err=%s\n", fpath, ERR_error_string(rc, errbuf)); rc = -EPERM; fclose(fp); goto error_out; } rc = fclose(fp); if (rc != 0) { rc = -errno; goto error_out; } rc=0; error_out: return rc; } /** 公開鍵をファイルから読み込む * @param[in] fpath 保存先ファイル名 * @param[out] rsa 読み込んだ公開鍵を格納するRSA情報のアドレスの返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常(fpathまたはrsaがNULLである). * @retval -EPERM ファイルからの読み取り権がないか, * 安全でないファイルからの読み取りを試みた * @retval -ENOMEM メモリが不足しいる. * @attention 内部リンケージ */ static int load_public_key(const char *fpath, RSA **rsa){ int rc = 0; int fd = 0; FILE *fp = NULL; EVP_CIPHER *enc = NULL; RSA *ref = NULL; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (fpath == NULL) || (rsa == NULL) ) return -EINVAL; rc = open_key_file_for_read(&fd, fpath); if (rc != 0) goto error_out; fp = fdopen(fd, "r"); if (fp == NULL) { rc = -errno; goto error_out; } ref = PEM_read_RSAPublicKey(fp, rsa, NULL, NULL); if (ref == NULL){ rc = ERR_get_error(); err_out("Can not read public key %s : err=%s\n", fpath, ERR_error_string(rc, errbuf)); rc = -rc; fclose(fp); goto error_out; } rc = fclose(fp); if (rc != 0) { rc = -errno; goto error_out; } rc = 0; error_out: return rc; } /** RSAの鍵ペア(公開鍵/秘密鍵)を生成する * @param[in] fpath 保存先ファイル名 * @param[out] rsa 読み込んだ秘密鍵を格納するRSA情報のアドレスの返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常(fpathまたはrsaがNULLである). * @retval -EPERM 安全な鍵を生成できなかった. * @attention 内部リンケージ */ static int generate_rsa_key(RSA **rsa_p, ipmsg_cap_t key_type) { char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; int rc = 0; RSA *rsa = NULL; int keylen = 0; int retry_count = RSA_KEYGEN_RETRY; if (rsa_p == NULL) return -EINVAL; rc = pcrypt_get_rsa_key_length(key_type, &keylen); if (rc != 0) return rc; dbg_out("generate key length:%d\n", keylen); /* * RSA 鍵生成 */ retry: rsa = RSA_generate_key(keylen, RSA_F4, NULL, NULL); if ( rsa == NULL ){ rc = ERR_get_error(); dbg_out("in generate_key: err=%s\n", ERR_error_string(rc, errbuf)); return -rc; } /* * RSA鍵の安全性を検証する */ if (RSA_check_key(rsa) > 0){ /* 安全な鍵である */ *rsa_p = rsa; rc = 0; } else { /* * 安全な鍵の生成に失敗した場合は, 鍵生成をやり直す. */ rc = ERR_get_error(); err_out("This is invalid key: err=%s\n", ERR_error_string(rc, errbuf)); RSA_free(rsa); rc = -EPERM; --retry_count; if (retry_count > 0) goto retry; } return rc; } /** ピアから送られてきた16進文字列形式(hex形式)の公開鍵をRSA鍵情報に変換する * @param[in] peer_e ピアの暗号化指数(hex形式) * @param[in] peer_n ピアの公開モジューロ(法)(hex形式) * @param[out] rsa 公開鍵情報を格納するRSA情報のアドレスの返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常(peer_eまたはpeer_n, rsaのいずれかがNULLである). * @retval -ENOMEM メモリ不足 * @attention 内部リンケージ */ static int convert_peer_key(const char *peer_e,const char *peer_n,RSA **rsa){ int rc = 0; RSA *pubkey = NULL; BIGNUM *bn_e = NULL; BIGNUM *bn_n = NULL; size_t size_in_byte = 0; if ( (peer_e == NULL) || (peer_n == NULL) || (rsa == NULL) ) return -EINVAL; pubkey = RSA_new(); if (pubkey == NULL) return -ENOMEM; rc = -ENOMEM; bn_e = BN_new(); if (bn_e == NULL) goto free_pubkey_out; bn_n = BN_new(); if (bn_n == NULL) goto free_bn_e_out; rc = BN_hex2bn(&bn_e, peer_e); if (rc == 0) goto free_bn_e_out; rc = BN_hex2bn(&bn_n, peer_n); if (rc == 0) goto free_bn_e_out; pubkey->e = bn_e; pubkey->n = bn_n; *rsa = pubkey; return 0; free_bn_n_out: if (bn_n != NULL) BN_free(bn_n); free_bn_e_out: if (bn_e != NULL) BN_free(bn_e); free_pubkey_out: if (pubkey != NULL) RSA_free(pubkey); return rc; } /** RSA鍵情報をRSA鍵テーブルに登録する * @param[in] cap ipmsgの公開鍵暗号化能力ID * @param[in] rsa 登録するRSA鍵情報 * @retval 0 正常終了 * @retval -EINVAL 引数異常(不正な暗号化能力IDを指定したか, rsaがNULLである). * @attention 内部リンケージ */ static int pcrypt_crypt_set_rsa_key(ipmsg_cap_t cap, const RSA *rsa) { int rc = 0; int index = 0; if ( (!(cap & RSA_CAPS)) || (rsa == NULL) ) return -EINVAL; rc = get_rsa_key_index(cap, &index); if (rc != 0) return rc; g_static_mutex_lock(&rsa_key_mutex); if (rsa_keys[index] != NULL) RSA_free(rsa_keys[index]); rsa_keys[index] = (RSA *)rsa; g_static_mutex_unlock(&rsa_key_mutex); return 0; } /** IPMSG_ANSPUBKEYコマンドで返却するRSA鍵種別を算出する * @param[in] peer_cap ピアの暗号化能力 * @param[out] selected_key ピアに返却するRSA鍵種別(使用可能なRSA公開鍵 * 暗号化能力IDの論理和)を格納する領域. * @param[in] speed 速度優先度選択を行う指示を指定する. * 真の場合, 処理速度優先で選択する. * 偽の場合, 暗号強度優先で選択する. * @retval 0 正常終了 * @retval -EINVAL 引数異常(不正な暗号化能力IDを指定したか, rsaがNULLである). * @retval -ENOENT 使用可能な鍵が見付からなかった. * @attention 内部リンケージ */ static int select_rsa_key_for_answer(ipmsg_cap_t peer_cap, ipmsg_cap_t *selected_key, const int speed) { ipmsg_cap_t candidates = 0; int i = 0; int added_num = 1; int first = 0; int key_type = 0; if (selected_key == NULL) return -EINVAL; candidates = (get_asymkey_part(peer_cap) & hostinfo_get_ipmsg_crypt_capability() ); if (speed) { first = RSA_KEY_MAX - 1; added_num = -1; } for (i = first; ((i >= 0) && (i < RSA_KEY_MAX) && (!(key2ipmsg_key_type[i] & candidates) ) ); i += added_num); if ( !( (i >= 0) && (i < RSA_KEY_MAX) ) ) return -ENOENT; *selected_key = key2ipmsg_key_type[i]; dbg_out("Selected key name in ipmsg:0x%x\n", key2ipmsg_key_type[i]); return 0; } /** ipmsgの公開鍵暗号化能力IDからRSAの鍵長を取得する. * @param[in] key_type ipmsgの公開鍵暗号化能力ID * @param[out] len 鍵長を返却する先のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(不正な暗号化能力IDを指定した). */ int pcrypt_get_rsa_key_length(ipmsg_cap_t key_type, size_t *len){ size_t keylen = 0; int rc = 0; if (len == NULL) return -EINVAL; switch (key_type) { case IPMSG_RSA_512: keylen = 512; break; case IPMSG_RSA_1024: keylen = 1024; break; default: /* デフォルトは, 2048 */ case IPMSG_RSA_2048: keylen = 2048; break; } *len = keylen; rc = 0; return rc; } /** IPMSG_ANSPUBKEYパケットの解析を行う * @param[in] string IPMSG_ANSPUBKEYパケット(拡張部)を記録した文字列 * @param[out] peer_cap ピアの暗号化能力格納先アドレスを示す * ポインタ変数のアドレス * @param[out] crypt_e ピアの暗号化指数(hex形式)格納先アドレスを示す * ポインタ変数のアドレス(複製を返却, 呼び出し元で要開放) * @param[out] crypt_n ピアの公開モジューロ(hex形式)格納先アドレスを示す * ポインタ変数のアドレス(複製を返却, 呼び出し元で要開放) * @retval 0 正常終了 * @retval -EINVAL 引数異常(不正な暗号化能力IDを指定した). * @retval -ENOMEM メモリ不足 */ int pcrypt_crypt_parse_anspubkey(const char *string, ipmsg_cap_t *peer_cap, unsigned char **crypt_e, unsigned char **crypt_n) { char *val_e = NULL; char *val_n = NULL; char *sp = NULL; char *ep = NULL; char *buffer = NULL; char *hex = NULL; ssize_t remains = 0; ipmsg_cap_t cap = 0; size_t len = 0; int rc = 0; if ( (string == NULL) || (peer_cap == NULL) || (crypt_e == NULL) || (crypt_n == NULL) ) return -EINVAL; buffer = g_strdup(string); if (buffer == NULL) return -ENOMEM; len = strlen(string); remains = len; /* * 暗号化能力 */ sp = buffer; ep = memchr(sp, ':', remains); if (ep == NULL) { rc = -EINVAL; goto error_out; } *ep = '\0'; remains = len - ( (unsigned long)ep - (unsigned long)buffer ); if (remains <= 0) { rc = -EINVAL; goto error_out; } ++ep; cap = (ipmsg_cap_t)strtol(sp, (char **)NULL, 16); dbg_out("parsed capability:%x\n",cap); sp = ep; /* * 公開指数 */ ep = memchr(sp, '-', remains); if (ep == NULL) { rc = -EINVAL; goto error_out; } *ep = '\0'; remains = len - ( (unsigned long)ep - (unsigned long)buffer ); if (remains <= 0) { rc = -EINVAL; goto error_out; } ++ep; dbg_out("parsed public exponential:%s\n", sp); val_e = g_strdup(sp); if (val_e == NULL) { rc = -ENOMEM; goto error_out; } sp=ep; /* *公開モジューロ(法) */ dbg_out("parsed public modulo:%s\n", sp); val_n = g_strdup(sp); if (val_n == NULL) { rc = -ENOMEM; dbg_out("Error code:%d\n", rc); goto error_out; } /* *返却 */ *peer_cap = cap; *crypt_e = val_e; *crypt_n = val_n; rc = 0; error_out: if (buffer != NULL) g_free(buffer); return rc; } /** IPMSG_ANSPUBKEYパケットの生成を行う * @param[in] peer_cap ピアの暗号化能力 * @param[out] message_p 生成したIPMSG_ANSPUBKEYパケットを指し示すポインタ変数の * アドレス. * @retval 0 正常終了 * @retval -EINVAL 引数異常 * 以下のいずれかまたは両方が発生した. * - 不正な暗号化能力IDをpeer_capに指定した * - message_pがNULL). * @retval -ENOMEM メモリ不足 */ int pcrypt_crypt_generate_anspubkey_string(ipmsg_cap_t peer_cap, const char **message_p) { char *buffer = NULL; char *string = NULL; char *hex_e = NULL; char *hex_n = NULL; RSA *rsa = NULL; int rc = 0; ipmsg_cap_t skey_type = 0; ipmsg_cap_t akey_type = 0; ipmsg_cap_t sign_type = 0; size_t total_len = 0; int i = 0; if ( (message_p == NULL) && (!(peer_cap & RSA_CAPS)) ) return -EINVAL; rc = select_rsa_key_for_answer(peer_cap, &akey_type, hostinfo_refer_ipmsg_crypt_policy_is_speed()); if (rc != 0) return rc; dbg_out("RSA key:%x\n", akey_type); rc = select_symmetric_key(peer_cap, &skey_type, hostinfo_refer_ipmsg_crypt_policy_is_speed()); if (rc != 0) return rc; dbg_out("sym key:%x\n", skey_type); rc = select_signature(peer_cap, &sign_type, hostinfo_refer_ipmsg_crypt_policy_is_speed()); if (rc != 0) dbg_out("No sign:%x\n", sign_type); else dbg_out("Sign type:%x\n", sign_type); rc = pcrypt_crypt_refer_rsa_key(akey_type, &rsa); if (rc != 0){ dbg_out("Can not find rsa key:%d\n", rc); return -EINVAL; } buffer = g_malloc(_MSG_BUF_SIZE); if (buffer == NULL) return -ENOMEM; memset(buffer, 0, _MSG_BUF_SIZE); rc = -ENOMEM; hex_e = BN_bn2hex(rsa->e); if (hex_e == NULL) goto free_buffer_out; hex_n = BN_bn2hex(rsa->n); if (hex_n == NULL) goto free_hex_n_out; dbg_out("hex-e:%s hex-n:%s\n", hex_e, hex_n); snprintf(buffer, _MSG_BUF_SIZE, "%x:%s-%s", (akey_type|skey_type|sign_type), hex_e, hex_n); dbg_out("Generated:%s\n", buffer); string = g_strdup(buffer); total_len = strlen(buffer); /* * 小文字に変換 */ for(i = 0; i < total_len; ++i) { string[i] = tolower((int)string[i]); } *message_p = string; rc = 0; free_hex_n_out: if (hex_n != NULL) OPENSSL_free(hex_n); free_hex_e_out: if (hex_e != NULL) OPENSSL_free(hex_e); free_buffer_out: if (buffer != NULL) g_free(buffer); return rc; } /** IPMSG_GETPUBKEYパケットの生成を行う * @param[in] cap 自ホストの暗号化能力 * @param[out] message_p 生成したIPMSG_ANSPUBKEYパケットを指し示すポインタ変数の * アドレス. * @retval 0 正常終了 * @retval -EINVAL 引数異常 * (不正な暗号化能力IDをcapに指定したか, またはmessage_pがNULL). * @retval -ENOMEM メモリ不足 */ int pcrypt_crypt_generate_getpubkey_string(ipmsg_cap_t cap, const char **message_p) { char *buffer = NULL; char *string = NULL; int rc = 0; if (message_p == NULL) return -EINVAL; buffer = g_malloc(IPMSG_GETPUBKEY_LEN); if (buffer == NULL) { rc = -ENOMEM; goto no_free_out; } snprintf(buffer, IPMSG_GETPUBKEY_LEN, "%x", cap); dbg_out("Generated:%s\n", buffer); string = g_strdup(buffer); if (string == NULL) { rc = -ENOMEM; goto buffer_free_out; } *message_p = string; rc = 0; buffer_free_out: if (buffer != NULL) g_free(buffer); no_free_out: return rc; } /** インデクス値からRSA鍵情報のアドレスを獲得する * @param[in] index 自ホストの暗号化能力 * @param[out] rsa_p RSA鍵情報を指し示すポインタ変数の * アドレス. * @retval 0 正常終了 * @retval -EINVAL 引数異常 * (不正なインデクスをindexに指定した). * @retval -ENOENT 指定されたインデクスに鍵が登録されていなかった. */ int pcrypt_crypt_refer_rsa_key_with_index(int index, RSA **rsa_p) { int rc = 0; if ( (index < 0) || (RSA_KEY_MAX <= index) ) return -EINVAL; rc = 0; g_static_mutex_lock(&rsa_key_mutex); if (rsa_keys[index] != NULL) *rsa_p = rsa_keys[index]; else rc = -ENOENT; g_static_mutex_unlock(&rsa_key_mutex); return rc; } /** IPMSGの公開鍵暗号化能力IDからRSA鍵情報のアドレスを獲得する * @param[in] cap 公開鍵暗号化能力ID * @param[out] rsa_p RSA鍵情報を指し示すポインタ変数の * アドレス. * @retval 0 正常終了 * @retval -EINVAL 引数異常 * (不正なIDをcapに指定した). * @retval -ENOENT 指定されたインデクスに鍵が登録されていなかった. */ int pcrypt_crypt_refer_rsa_key(ipmsg_cap_t cap, RSA **rsa_p) { int rc = 0; int index = 0; if (!(cap & RSA_CAPS)) return -EINVAL; rc = get_rsa_key_index(cap, &index); if (rc != 0) return rc; g_static_mutex_lock(&rsa_key_mutex); if (rsa_keys[index]) { *rsa_p = rsa_keys[index]; rc = 0; } else { rc = -ENOENT; } g_static_mutex_unlock(&rsa_key_mutex); return rc; } /** RSA鍵を初期化する. * * @retval 0 正常終了 * @attention 鍵格納用パスフレーズが不正だった場合は, 強制終了する. */ int pcrypt_crypt_init_keys(void) { int rc = 0; int i = 0; int keylen = 0; RSA *rsa = NULL; gchar *passwd = NULL; size_t pass_len = 0; OpenSSL_add_all_algorithms(); ERR_load_crypto_strings(); if (hostinfo_refer_ipmsg_encrypt_public_key()) { rc = ipmsg_pem_passwd_dialog(&passwd); if (rc == -EPERM) { ipmsg_err_dialog_mordal("%s", _("Can not load RSA key due to invalid passphrase.")); exit(1); } g_assert( (passwd == NULL) || (rc == 0) ); } for(i = 0;key2ipmsg_key_type[i] >= 0; ++i) { rc = pcrypt_load_rsa_key(key2ipmsg_key_type[i], passwd); if (rc == 0) continue; /* 鍵をロードした */ dbg_out("Can not load key:rc=%d\n", rc); rc = generate_rsa_key(&rsa, key2ipmsg_key_type[i]); if (rc != 0) { rc = pcrypt_get_rsa_key_length(key2ipmsg_key_type[i], &keylen); if (rc != 0) err_out("Can not generate key length:%d\n", keylen); else err_out("Can not generate key length invalid key index:%d\n", i); rsa_keys[i] = NULL; continue; } rc = pcrypt_crypt_set_rsa_key(key2ipmsg_key_type[i], rsa); if (rc != 0) { err_out("Can not set key length:%d\n", keylen); } else { /* * 生成した鍵を保存する */ rc = pcrypt_store_rsa_key(key2ipmsg_key_type[i], passwd); if (rc != 0) err_out("Can not store key: length: %d\n", keylen); } } passwd_free_out: if (passwd != NULL) { pass_len = strlen(passwd); memset(passwd, 0xdd, pass_len); /* パスワード格納領域を廃棄 */ g_free(passwd); } return 0; } /** RSA鍵テーブルを開放する. * * @retval 0 正常終了 */ int pcrypt_crypt_release_keys(void) { int rc = 0; int i = 0; int keylen = 0; ERR_free_strings(); for(i = 0; key2ipmsg_key_type[i] >= 0; ++i) { rc = pcrypt_get_rsa_key_length(key2ipmsg_key_type[i], &keylen); if (rc == 0) dbg_out("clear key length:%d\n", keylen); if (rsa_keys[i] != NULL){ RSA_free(rsa_keys[i]); rsa_keys[i] = NULL; } } return 0; } /** ピアの公開鍵で電文暗号化に使用する共通鍵を暗号化する * @param[in] peer_cap ピアの公開鍵暗号化能力ID * @param[in] peer_e ピアの暗号化指数(hex形式) * @param[in] peer_n ピアの公開モジューロ(hex形式) * @param[in] plain 平文(電文暗号化に使用する共通鍵) * @param[in] plain_length 平文の長さ(バイト長) * @param[out] ret_buff 暗号化電文(hex形式)の返却領域 * @param[out] akey_type 公開鍵暗号鍵種別を表す暗号化ケイパビリティ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * (不正なIDをcapに指定した). * @retval -ENOMEM メモリ不足 */ int pcrypt_encrypt_message(const ipmsg_cap_t peer_cap, const char *peer_e, const char *peer_n, const char *plain, size_t plain_length, char **ret_buff, ipmsg_cap_t *akey_type){ int rc = 0; RSA *pubkey = NULL; BIGNUM *bn_encoded_key = NULL; size_t enc_len = 0; size_t crypt_len = 0; char *encrypted_key = NULL; char *encoded_key = NULL; ipmsg_cap_t key_type = 0; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (peer_e == NULL) || (peer_n == NULL) || (plain == NULL) || (ret_buff == NULL) ) return -EINVAL; /* * hex形式のピアの鍵からRSA鍵情報を生成する */ rc = convert_peer_key(peer_e, peer_n, &pubkey); if (rc != 0) return rc; /* * 電文の暗号化に使用する鍵をピアの公開鍵で暗号化する. */ rc = -ENOMEM; enc_len = RSA_size(pubkey); /* 暗号化電文長を取得する */ dbg_out("Public key:e=%s n=%s len=%d\n", peer_e, peer_n, enc_len); encrypted_key = g_malloc(enc_len); /* 暗号化した共通鍵格納領域を確保 */ if (encrypted_key == NULL) goto free_pubkey_out; rc = RSA_public_encrypt(plain_length, plain, encrypted_key, pubkey, RSA_PKCS1_PADDING); /* PKCS1パディングによる暗号化を実施 */ if (rc <= 0) { rc = ERR_get_error(); err_out("Can not encrypt key with public key: err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto free_encrypted_key_out; } /* * 使用した鍵情報を取得 */ rc = select_asymmetric_key(peer_cap, pubkey, &key_type); if (rc != 0) goto free_encrypted_key_out; /* * 暗号化した共通鍵をhex形式に変換 */ rc = -ENOMEM; bn_encoded_key = BN_bin2bn(encrypted_key, enc_len, NULL); /* エンディアン変換 */ if (bn_encoded_key == NULL) goto free_encrypted_key_out; encoded_key = BN_bn2hex(bn_encoded_key); /* hex形式に変換 */ if (encoded_key == NULL) goto free_bn_encoded_key_out; /* * 暗号化した共通鍵と使用した鍵種別を返却 */ *ret_buff = encoded_key; *akey_type = key_type; rc = 0; free_bn_encoded_key_out: if (bn_encoded_key != NULL) BN_free(bn_encoded_key); free_encrypted_key_out: if (encrypted_key != NULL) g_free(encrypted_key); free_pubkey_out: if (pubkey != NULL) { BN_free(pubkey->n); BN_free(pubkey->e); pubkey->n = NULL; pubkey->e = NULL; RSA_free(pubkey); } return rc; } /** 自ホストの秘密鍵で電文復号化用共通鍵を復号化する * @param[in] cap 暗号化に使用した鍵種別 * @param[in] encrypted_skey 暗号化された共通鍵(hex形式) * @param[out] ret_buff 復号化した共通鍵(バイナリ形式)の返却領域 * @param[out] decrypted_len 復号化した共通鍵長を返却する領域のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常 * (encrypted_skey, ret_buff, decrypted_lenの * いずれかがNULL). * @retval -ENOMEM メモリ不足 */ int pcrypt_decrypt_message(ipmsg_cap_t cap, const char *encrypted_skey, char **ret_buff, size_t *decrypted_len) { int rc = 0; RSA *privkey = NULL; char *decrypted_skey = NULL; BIGNUM *bn_encrypted_key = NULL; char *bin_skey = NULL; size_t bn_encrypted_key_len = 0; size_t decrypted_skey_len = 0; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (encrypted_skey == NULL) || (ret_buff == NULL) || (decrypted_len == NULL) ) return -EINVAL; rc = pcrypt_crypt_refer_rsa_key(cap, &privkey); if (rc != 0) return rc; /* * ネットワークバイトオーダ形式の共通鍵格納領域確保 */ rc = -ENOMEM; bn_encrypted_key = BN_new(); if (bn_encrypted_key == NULL) goto no_free_out; /* * hex形式をネットワークバイトオーダ形式に変換 */ rc = BN_hex2bn(&bn_encrypted_key, encrypted_skey); if (rc == 0) { rc = ERR_get_error(); err_out("Can not convert hex-key to BIGNUM: err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto free_bn_encrypted_key_out; } /* * バイナリ形式の電文暗号化鍵格納領域を確保 */ bn_encrypted_key_len = BN_num_bytes(bn_encrypted_key); rc = -ENOMEM; bin_skey = g_malloc(bn_encrypted_key_len); if (bin_skey == NULL) goto free_bn_encrypted_key_out; /* * バイナリ形式に変換 */ rc = BN_bn2bin(bn_encrypted_key, bin_skey); if (rc == 0) { rc = ERR_get_error(); err_out("Can not convert BIGNUM:to binary err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto free_bin_skey_out; } /* * 秘密鍵長から電文暗号化鍵長を算出 */ decrypted_skey_len = BN_num_bytes(privkey->n); /* * 電文暗号化鍵格納領域を確保 */ rc = -ENOMEM; decrypted_skey = g_malloc(decrypted_skey_len); if (decrypted_skey == NULL) goto free_bin_skey_out; /* * 電文暗号化鍵を復号化 */ rc = RSA_private_decrypt(bn_encrypted_key_len, bin_skey, decrypted_skey, privkey, RSA_PKCS1_PADDING); if (rc <= 0) { if (decrypted_skey != NULL) g_free(decrypted_skey); rc = ERR_get_error(); err_out("Can not decrypt secret key err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto free_bin_skey_out; } /* * 復号化した鍵を返却 */ *decrypted_len = decrypted_skey_len; *ret_buff = decrypted_skey; rc = 0; free_bin_skey_out: if (bin_skey != NULL) g_free(bin_skey); free_bn_encrypted_key_out: if (bn_encrypted_key != NULL) BN_free(bn_encrypted_key); no_free_out: return rc; } /** 自ホストの秘密鍵を使用して電文に署名を付す * @param[in] cap 通信に使用する書名種別を含む暗号化ケイパビリティ * @param[in] sign_type 使用する署名種別 * - IPMSG_SIGN_MD5 MD5署名を使用 * - IPMSG_SIGN_SHA1 SHA1を使用 * @param[in] msg_str 署名対象となる暗号化鍵を含む暗号化電文 * (IPMSG暗号化電文パケットの本文部) * @param[out] ret_buff msg_strに付した署名を指し示すためのポインタ変数の * アドレスを指定 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * (msg_str, ret_buffのいずれかがNULL). * @retval -ENOMEM メモリ不足 */ int pcrypt_sign(const ipmsg_cap_t cap, const ipmsg_cap_t sign_type, const unsigned char *msg_str, unsigned char **ret_buff) { int rc = 0; size_t out_len = 0; size_t msg_len = 0; int nid_sign_type = 0; size_t digest_len = 0; RSA *key = NULL; unsigned char *out = NULL; BIGNUM *bn_hash = NULL; unsigned char *hash_string = NULL; void *ref = NULL; BIGNUM *bn_ref = NULL; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; unsigned char hash[MD5SHA1_DIGEST_LEN]; if ( (msg_str == NULL) || (ret_buff == NULL) ) return -EINVAL; /* * 使用した暗号化ケイパビリティからRSA鍵情報を獲得する */ rc = pcrypt_crypt_refer_rsa_key(cap, &key); if (rc != 0) return rc; msg_len = strlen(msg_str); /* 署名対象電文長を獲得 */ rc = -ENOMEM; out = g_malloc(RSA_size(key)); /* 署名のサイズを獲得 */ if (out == NULL) goto no_free_out; /* * 署名のハッシュ値を獲得 */ switch(sign_type) { case IPMSG_SIGN_MD5: nid_sign_type = NID_md5; digest_len = MD5_DIGEST_LEN; ref = MD5(msg_str, msg_len, hash); if (ref == NULL) { rc = ERR_get_error(); err_out("Can not calculate MD5 hash value: err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto out_free_out; } break; case IPMSG_SIGN_SHA1: nid_sign_type = NID_sha1; digest_len = SHA1_DIGEST_LEN; ref = SHA1(msg_str, msg_len, hash); if (ref == NULL) { rc = ERR_get_error(); err_out("Can not calculate SHA1 hash value: err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto out_free_out; } break; default: rc = -EINVAL; goto out_free_out; break; } /* * バイナリ形式の署名を生成 */ rc = RSA_sign(nid_sign_type, hash, digest_len, out, &out_len, key); if (rc < 0) goto out_free_out; /* * 署名をネットワークバイトオーダに変換 */ rc = -ENOMEM; bn_hash = BN_new(); if (bn_hash == NULL) goto out_free_out; bn_ref = BN_bin2bn(out, out_len, bn_hash); /* bin2bnは, 複製を作らないことに注意 */ if (bn_ref == NULL) { rc = ERR_get_error(); err_out("Can not convert binary sign to BIGNUM: err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto bn_hash_free_out; } /* * 署名をhex形式に変換 */ hash_string = BN_bn2hex(bn_hash); if (hash_string == NULL) { rc = ERR_get_error(); err_out("Can not convert BIGNUM sign to hex: err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto bn_hash_free_out; } rc = 0; *ret_buff = hash_string; /* 署名を返却 */ bn_hash_free_out: if (bn_hash != NULL) BN_free(bn_hash); out_free_out: if (out != NULL) g_free(out); no_free_out: return rc; } /** 電文に付加された署名を検証し, 電文の完全性を検証する. * @param[in] cap 通信に使用した書名種別を含む暗号化ケイパビリティ * @param[in] sign_type 使用した署名種別 * - IPMSG_SIGN_MD5 MD5署名を使用 * - IPMSG_SIGN_SHA1 SHA1を使用 * @param[in] msg_str 検証対象となる暗号化鍵を含む暗号化電文(hex形式) * @param[in] sign msg_strに付された署名(hex形式) * @param[in] peer_e ピアの暗号化指数(hex形式) * @param[in] peer_n ピアの公開モジューロ(hex形式) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * (msg_str, sign, peer_e, peer_nの * いずれかがNULL). * @retval -ENOMEM メモリ不足 */ int pcrypt_verify_sign(const ipmsg_cap_t cap, const ipmsg_cap_t sign_type, const unsigned char *msg_str, const unsigned char *sign, const unsigned char *peer_e, const unsigned char *peer_n) { int rc = 0; RSA *key = NULL; BIGNUM *bn_sign = NULL; void *ref = NULL; unsigned char *raw_sign = NULL; size_t msg_len = 0; int nid_sign_type = 0; size_t digest_len = 0; unsigned char hash[MD5SHA1_DIGEST_LEN]; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (msg_str == NULL) || (sign == NULL) || (peer_e == NULL) || (peer_n == NULL) ) return -EINVAL; /* * ピアの公開鍵からRSA鍵情報を獲得 */ rc = convert_peer_key(peer_e, peer_n, &key); if (rc != 0) return rc; msg_len = strlen(msg_str); rc = -ENOMEM; /* *hex形式の署名をネットワークバイトオーダ形式に変換 */ rc = BN_hex2bn(&bn_sign, sign); if (rc == 0) { rc = ERR_get_error(); err_out("Can not convert hex-key to BIGNUM: err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto bn_sign_free_out; } /* * バイナリ形式の署名用の領域を確保 */ raw_sign = g_malloc(BN_num_bytes(bn_sign)); if (raw_sign == NULL) goto bn_sign_free_out; /* * バイナリ形式に変換 */ rc = BN_bn2bin(bn_sign, raw_sign); if (rc != RSA_size(key)) { err_out("hash size is invalid(rc, rsa-key-size)=(%d, %d)\n", rc, RSA_size(key)); goto raw_sign_free_out; } /* * タイミング攻撃対策 */ rc = RSA_blinding_on(key, NULL); if (rc == 0) { rc = ERR_get_error(); err_out("Can not make RSA key blind: err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto raw_sign_free_out; } /* * 署名検証用に本文からハッシュ値を算出 */ switch(sign_type) { default: rc = -EINVAL; goto raw_sign_free_out; break; case IPMSG_SIGN_MD5: nid_sign_type = NID_md5; ref = MD5(msg_str, msg_len, hash); if (rc == 0) { rc = ERR_get_error(); err_out("Can not calculate MD5 hash value : err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; dbg_out("Verify with MD5 sign\n"); goto raw_sign_free_out; } digest_len = MD5_DIGEST_LEN; break; case IPMSG_SIGN_SHA1: nid_sign_type = NID_sha1; ref = SHA1(msg_str, msg_len, hash); if (rc == 0) { rc = ERR_get_error(); err_out("Can not calculate SHA1 hash value : err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto raw_sign_free_out; } digest_len = SHA1_DIGEST_LEN; dbg_out("Verify with SHA1 sign\n"); break; } /* * 署名検証 */ rc = RSA_verify(nid_sign_type, hash,digest_len, raw_sign, RSA_size(key), key); if (rc == 0){ rc = ERR_get_error(); err_out("Sign invalid : err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; goto raw_sign_free_out; } else { rc = 0; } raw_sign_free_out: if (raw_sign != NULL) g_free(raw_sign); bn_sign_free_out: if (bn_sign != NULL) BN_free(bn_sign); free_key_out: if (key != NULL) { g_assert(key->n); g_assert(key->e); BN_free(key->n); BN_free(key->e); key->n = NULL; key->e = NULL; RSA_free(key); } no_free_out: return rc; } /** IPMSGの公開鍵暗号化能力IDから鍵情報格納先ファイル名を割り出す. * @param[in] key_type IPMSGの公開鍵暗号化能力ID * @param[out] pubkey 公開鍵格納ファイル * @param[out] privkey 秘密鍵格納ファイル * @retval 0 正常終了 * @retval -EINVAL 引数異常 * (msg_str, sign, peer_e, peer_nの * いずれかがNULL). * @retval -ENOMEM メモリ不足 */ int pcrypt_get_key_filename(const ipmsg_cap_t key_type, char **pubkey, char **privkey) { int rc = 0; size_t key_len = 0; size_t key_fname_len = 0; RSA *rsa = NULL; size_t key_priv_fname_len = 0; size_t key_pub_fname_len = 0; char *pub_key_file = NULL; char *priv_key_file = NULL; int j = 0; if ( (pubkey == NULL) || (privkey == NULL) ) return -EINVAL; rc = pcrypt_get_rsa_key_length(key_type, &key_len); if (rc != 0) return rc; dbg_out("Key bits:%d\n", key_len); /* キー長をbit長で表した値の桁数を算出 */ for(j = key_len, key_fname_len = 1;j != 0;j /= 10, ++key_fname_len); /* +1 は, 末尾のヌルターミネート分 */ key_priv_fname_len = strlen(RSA_PRIVKEY_FNAME_PREFIX) + key_fname_len + 1; priv_key_file = g_malloc(key_priv_fname_len); if (priv_key_file == NULL) return -EINVAL; key_pub_fname_len = strlen(RSA_PUBKEY_FNAME_PREFIX) + key_fname_len + 1; pub_key_file = g_malloc(key_pub_fname_len); if (pub_key_file == NULL) goto priv_key_file_free_out; snprintf(priv_key_file,key_priv_fname_len - 1, "%s%d", RSA_PRIVKEY_FNAME_PREFIX, key_len); snprintf(pub_key_file, key_pub_fname_len - 1, "%s%d", RSA_PUBKEY_FNAME_PREFIX, key_len); dbg_out("Public key files are Private-key:%s Public-key:%s\n", priv_key_file, pub_key_file); *pubkey = pub_key_file; *privkey = priv_key_file; return 0; pub_key_file_free_out: if (pub_key_file != NULL) g_free(pub_key_file); priv_key_file_free_out: if (priv_key_file != NULL) g_free(priv_key_file); return rc; } /** RSAのキーペア(公開鍵/秘密鍵)をファイルに書き込む * @param[in] key_type IPMSGの公開鍵暗号化能力ID * @param[in] passwd 鍵保存時のPKCS#5鍵導出に使用するパスフレーズ * NULLの場合は, 暗号化せずに鍵を保存する. * @retval 0 正常終了 * @retval -EPERM 書き込み権限が無い * @retval -ENOMEM メモリ不足 */ int pcrypt_store_rsa_key(const ipmsg_cap_t key_type, const char *passwd) { int rc = 0; gchar *store_dir = NULL; char *home_dir = NULL; size_t key_len = 0; RSA *rsa = 0; int j = 0; size_t key_fname_len = 0; char *priv_key_file = NULL; char *pub_key_file = NULL; char *file_path = NULL; rc = get_envval("HOME", &home_dir); if (rc != 0) goto no_free_out; store_dir = g_build_filename(home_dir,G2IPMSG_KEY_DIR, NULL); if (store_dir == NULL) goto home_dir_free_out; rc = check_secure_directory(store_dir); if ( (rc != 0) && (rc != -ENOENT) ) { err_out("Directory %s is not secure.\n", store_dir); goto store_dir_free_out; } if (rc == -ENOENT) { dbg_out("Directory %s does not exist.\n", store_dir); rc = mkdir(store_dir, S_IRWXU); if (rc != 0){ rc = -errno; goto store_dir_free_out; } } dbg_out("Directory check:%s OK\n", store_dir); rc = pcrypt_crypt_refer_rsa_key(key_type, &rsa); if (rc != 0) goto store_dir_free_out; rc = pcrypt_get_key_filename(key_type, &pub_key_file, &priv_key_file); if (rc != 0) goto store_dir_free_out; /* * Private key */ key_fname_len = strlen(store_dir) + strlen(priv_key_file) + 3; file_path = g_malloc(key_fname_len); if (file_path == NULL) goto filename_free_out; snprintf(file_path, key_fname_len, "%s" G_DIR_SEPARATOR_S "%s", store_dir, priv_key_file); rc = store_private_key(file_path, rsa, passwd); if (rc != 0) goto filename_free_out; if (file_path != NULL) g_free(file_path); file_path = NULL; /* * Public key */ key_fname_len = strlen(store_dir) + strlen(pub_key_file) + 3; file_path = g_malloc(key_fname_len); if (file_path == NULL) goto filename_free_out; snprintf(file_path, key_fname_len, "%s" G_DIR_SEPARATOR_S "%s", store_dir, pub_key_file); rc = store_public_key(file_path, rsa); if (rc != 0) goto filename_free_out; if (file_path != NULL) g_free(file_path); file_path = NULL; rc = 0; filename_free_out: if (file_path != NULL) g_free(file_path); pub_key_file_free_out: if (pub_key_file != NULL) g_free(pub_key_file); if (priv_key_file != NULL) g_free(priv_key_file); store_dir_free_out: if (store_dir != NULL) g_free(store_dir); home_dir_free_out: if (home_dir != NULL) g_free(home_dir); no_free_out: return rc; } /** RSAのキーペア(公開鍵/秘密鍵)をファイルから読み込む * @param[in] key_type IPMSGの公開鍵暗号化能力ID * @param[in] passwd 鍵保存時のPKCS#5鍵導出に使用するパスフレーズ * NULLの場合は, 暗号化なしのファイルを仮定する. * @retval 0 正常終了 * @retval -EPERM 読み取り権限が無い * @retval -ENOMEM メモリ不足 */ int pcrypt_load_rsa_key(const ipmsg_cap_t key_type, const gchar *passwd){ int rc = 0; gchar *store_dir = NULL; char *home_dir = NULL; size_t key_len = 0; RSA *rsa = NULL; int j = 0; size_t key_fname_len = 0; char *priv_key_file = NULL; char *pub_key_file = NULL; char *file_path = NULL; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; rc = get_envval("HOME", &home_dir); if (rc != 0) goto no_free_out; store_dir = g_build_filename(home_dir, G2IPMSG_KEY_DIR, NULL); if (store_dir == NULL) { rc = -EPERM; goto home_dir_free_out; } rc = check_secure_directory(store_dir); if (rc != 0) { err_out("Directory %s is not secure or does not exist.\n",store_dir); goto store_dir_free_out; } dbg_out("Directory check:%s OK\n",store_dir); rc = pcrypt_get_key_filename(key_type, &pub_key_file, &priv_key_file); if (rc != 0) goto store_dir_free_out; /* * Private key */ key_fname_len = strlen(store_dir) + strlen(priv_key_file) + 3; file_path = g_malloc(key_fname_len); if (file_path == NULL) goto filename_free_out; snprintf(file_path, key_fname_len, "%s" G_DIR_SEPARATOR_S "%s", store_dir, priv_key_file); rc = load_private_key(file_path, &rsa, passwd); if (rc != 0) goto filename_free_out; if (file_path != NULL) { g_free(file_path); file_path = NULL; } /* * Public key */ key_fname_len = strlen(store_dir) + strlen(pub_key_file) + 3; file_path = g_malloc(key_fname_len); if (file_path == NULL) goto filename_free_out; snprintf(file_path, key_fname_len,"%s" G_DIR_SEPARATOR_S "%s", store_dir, pub_key_file); rc = load_public_key(file_path, &rsa); if (rc != 0) goto filename_free_out; if (file_path != NULL) { g_free(file_path); file_path=NULL; } rc = RSA_check_key(rsa); if (rc == 0) { rc = ERR_get_error(); err_out("Invalid RSA key : err=%s\n", ERR_error_string(rc, errbuf)); rc = -rc; RSA_free(rsa); goto filename_free_out; } rc = pcrypt_crypt_set_rsa_key(key_type, rsa); if (rc != 0) { RSA_free(rsa); goto filename_free_out; } rc = pcrypt_get_rsa_key_length(key_type, &key_len); g_assert(rc == 0); dbg_out("RSA key length: %d has been loaded successfully.\n", key_len); rc = 0; filename_free_out: if (file_path != NULL) g_free(file_path); pub_key_file_free_out: if (pub_key_file != NULL) g_free(pub_key_file); if (priv_key_file != NULL) g_free(priv_key_file); store_dir_free_out: if (store_dir != NULL) g_free(store_dir); home_dir_free_out: if (home_dir != NULL) g_free(home_dir); no_free_out: return rc; } /** 通信に使用する公開鍵を選択する. * @param[in] peer_cap ピアの公開鍵暗号化能力ID * @param[in] rsa RSA鍵情報 * @param[out] selected_key 通信に使用するRSA鍵種別(使用するRSA公開鍵 * 暗号化能力IDの論理和)を格納する領域. * @retval 0 正常終了 * @retval -EINVAL rsaまたはselected_keyがNULLである. * @retval -ENOENT 使用可能な鍵が無い. */ int select_asymmetric_key(const ipmsg_cap_t peer_cap, const RSA *rsa, ipmsg_cap_t *selected_key) { ipmsg_cap_t candidates = 0; int i = 0; int rc = 0; int added_num = 1; int first = 0; int key_type = 0; size_t size_in_bit = 0; if ( (selected_key == NULL) || (rsa == NULL) ) return -EINVAL; candidates = (peer_cap & hostinfo_get_ipmsg_crypt_capability()); if (candidates == 0) return -ENOENT; size_in_bit = RSA_size(rsa) * 8; dbg_out("key size=%d.\n", size_in_bit); switch(size_in_bit) { case 512: dbg_out("This is 512 bit key.\n"); key_type = IPMSG_RSA_512; break; case 1024: dbg_out("This is 1024 bit key.\n"); key_type = IPMSG_RSA_1024; break; case 2048: dbg_out("This is 2048 bit key.\n"); key_type = IPMSG_RSA_2048; break; default: rc = -ENOENT; goto error_out; break; } if (!(key_type & candidates)) return -ENOENT; *selected_key = key_type; dbg_out("Selected key name in ipmsg:0x%x\n", key_type); error_out: return rc; } /** 通信に使用する署名を選択する. * @param[in] peer_cap ピアの公開鍵暗号化能力ID * @param[out] selected_algo 署名に使用するアルゴリズム * 暗号化能力IDの論理和)を格納する領域. * @param[in] speed 速度優先で選択を行う指示を指定する. * - 真の場合, 処理速度優先で選択する. * - 偽の場合, 暗号強度優先で選択する. * @retval 0 正常終了 * @retval -EINVAL selected_algoがNULLである. * @retval -ENOENT 使用可能な署名が無い. */ int select_signature(const ipmsg_cap_t peer_cap, ipmsg_cap_t *selected_algo, const int speed) { int rc = 0; ipmsg_cap_t candidate = 0; if (selected_algo == NULL) return -EINVAL; if ( !(peer_cap & SIGN_CAPS) ) return -ENOENT; /* * 速度が早い順に探査し, 速度優先の場合は, 見つかったところでぬける * 下記の処理は, 処理速度順で判定を配置していくこと. */ rc = 0; /* 正常終了を仮定 */ if (peer_cap & IPMSG_SIGN_MD5) { /* MD5 */ candidate = IPMSG_SIGN_MD5; if (speed) goto selected_out; } if (peer_cap & IPMSG_SIGN_SHA1) { /* SHA1 */ candidate = IPMSG_SIGN_SHA1; if (speed) goto selected_out; } if (candidate == 0) { /* 上記でチェックしているので, ここには来ない */ g_assert_not_reached(); goto error_out; /* 見つからなかった */ } selected_out: *selected_algo = candidate; error_out: return rc; } g2ipmsg-0.9.6+dfsg/src/pubcrypt.h000066400000000000000000000105311126724573600166420ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_PUBCRYPT_H) #define G2IPMSG_PUBCRYPT_H /** @file * @brief 公開鍵(非対称鍵)暗号系暗号関連定義 * @author Takeharu KATO */ #include #include #include #ifdef HAVE_CONFIG_H # include #endif #if defined(USE_OPENSSL) #include #include #include /** RSA鍵生成試行回数 */ #define RSA_KEYGEN_RETRY (10) /** RSA 2048 bits 鍵 インデクス */ #define RSA_KEY_INDEX_2048 (0) /** RSA 1024 bits 鍵 インデクス */ #define RSA_KEY_INDEX_1024 (1) /** RSA 512 bits 鍵 インデクス */ #define RSA_KEY_INDEX_512 (2) /** RSA鍵種別総数 */ #define RSA_KEY_MAX (3) /** RSA暗号化能力ビットマップ */ #define RSA_CAPS (IPMSG_RSA_512|IPMSG_RSA_1024|IPMSG_RSA_2048) /** 署名能力ビットマップ */ #define SIGN_CAPS (IPMSG_SIGN_MD5|IPMSG_SIGN_SHA1) /** MD5署名長 */ #define MD5_DIGEST_LEN (16) /** SHA1署名長 */ #define SHA1_DIGEST_LEN (20) /** MD5/SHA1署名共通バッファ長 */ #define MD5SHA1_DIGEST_LEN (36) /** IPMSG_GETPUBKEYパケットのメッセージ部の長さ(ヌルターミネート含む) */ #define IPMSG_GETPUBKEY_LEN (9) /** 安全でないディレクトリのパーミッション */ #define RSA_DIR_INVALID_FLAGS (S_IWOTH|S_IWGRP) /** RSA秘密鍵のファイル名プレフィックス */ #define RSA_PRIVKEY_FNAME_PREFIX "priv-key-" /** RSA公開鍵のファイル名プレフィックス */ #define RSA_PUBKEY_FNAME_PREFIX "pub-key-" /* * プロトタイプ宣言 */ int pcrypt_get_rsa_key_length(ipmsg_cap_t , size_t *); int pcrypt_crypt_parse_anspubkey(const char *, ipmsg_cap_t *, unsigned char **, unsigned char **); int pcrypt_crypt_generate_anspubkey_string(ipmsg_cap_t , const char **); int pcrypt_crypt_generate_getpubkey_string(ipmsg_cap_t , const char **); int pcrypt_crypt_init_keys(void); int pcrypt_crypt_release_keys(void); int pcrypt_crypt_refer_rsa_key_with_index(int , RSA **); int pcrypt_crypt_refer_rsa_key(ipmsg_cap_t , RSA **); int pcrypt_encrypt_message(const ipmsg_cap_t , const char *, const char *, const char *, size_t , char **, ipmsg_cap_t *); int pcrypt_decrypt_message(ipmsg_cap_t , const char *, char **, size_t *); int pcrypt_sign(const ipmsg_cap_t , const ipmsg_cap_t , const unsigned char *, unsigned char **); int pcrypt_verify_sign(const ipmsg_cap_t , const ipmsg_cap_t , const unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *); int pcrypt_store_rsa_key(const ipmsg_cap_t , const gchar *); int pcrypt_load_rsa_key(const ipmsg_cap_t , const gchar *); int select_asymmetric_key(const ipmsg_cap_t , const RSA *, ipmsg_cap_t *); int select_signature(ipmsg_cap_t peer_cap,ipmsg_cap_t *selected_algo,int speed); #else /** OpenSSL未使用時のRSA暗号化能力ビットマップ */ #define RSA_CAPS (0) /** OpenSSL未使用時の署名能力ビットマップ */ #define SIGN_CAPS (0) #endif /* USE_OPENSSL */ #endif /* G2IPMSG_PUBCRYPT_H */ g2ipmsg-0.9.6+dfsg/src/rand.c000066400000000000000000000042531126724573600157150ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" static int check_random_seed(void){ int rc; unsigned short seed_in; int retry; #if defined(HAVE_RAND_POLL) RAND_poll(); #endif /* HAVE_RAND_POLL */ for (rc=RAND_status(),retry=CRYPT_RND_MAX_RETRY;(!rc)&&(retry);rc=RAND_status(),--retry) { seed_in = rand() & 0xffff; RAND_seed(&seed_in, sizeof(seed_in)); } rc = (rc)?(0):(-EBUSY); return rc; } int add_timing_entropy(void) { /* FIXME add implementation */ } int generate_rand(unsigned char *buf,size_t len){ int rc = -EAGAIN; int rand_ok = 0; int retry = CRYPT_RND_MAX_RETRY; if (check_random_seed()) { err_out("Can not seed random\n"); g_assert_not_reached(); } do{ memset(buf,0,len); rand_ok = RAND_bytes(buf,len); if (rand_ok == 1) { rc = 0; break; } }while( (rand_ok != 1) && (--retry) ); return rc; } g2ipmsg-0.9.6+dfsg/src/recvmsg.c000066400000000000000000000542761126724573600164510ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) static GList *store_wins=NULL; static GList *displayed_wins=NULL; static GList *opened_wins=NULL; static guint init_win_timer_id; static GtkWidget *normal_image=NULL; static GtkWidget *reverse_image=NULL; GStaticMutex openwin_mutex = G_STATIC_MUTEX_INIT; GStaticMutex displayedwin_mutex = G_STATIC_MUTEX_INIT; GStaticMutex store_win_mutex = G_STATIC_MUTEX_INIT; int init_ipmsg_private(ipmsg_private_data_t **priv,const int type){ ipmsg_private_data_t *new_priv; int rc=0; if (!priv) return -EINVAL; rc=-ENOMEM; new_priv=g_malloc(sizeof(ipmsg_private_data_t)); if (!new_priv) goto error_out; rc=0; new_priv->magic=IPMSG_PRIVATE_DATA_MAGIC; new_priv->type=type; new_priv->data=NULL; *priv=new_priv; error_out: return rc; } static void destroy_recvmsg_private(ipmsg_private_data_t *private) { ipmsg_recvmsg_private_t *priv; IPMSG_ASSERT_PRIVATE(private,IPMSG_PRIVATE_RECVMSG); priv=private->data; dbg_out("destroy private:ipaddr %s pktno:%d\n",priv->ipaddr,priv->pktno); g_assert(priv->ipaddr); g_free(priv->ipaddr); priv->ipaddr=NULL; if (priv->ext_part){ g_free(priv->ext_part); priv->ext_part=NULL; } g_free(priv); } int init_recvmsg_private(const char *ipaddr,int flags,int pktno, ipmsg_private_data_t **priv) { ipmsg_recvmsg_private_t *element; ipmsg_private_data_t *new_prev; int rc=0; if ( (!ipaddr) || (!priv) ) return -EINVAL; rc=-ENOMEM; element=g_malloc(sizeof(ipmsg_recvmsg_private_t)); if (!element) goto no_free_out; memset(element,0,sizeof(ipmsg_recvmsg_private_t)); if (init_ipmsg_private(&new_prev,IPMSG_PRIVATE_RECVMSG)<0) goto error_out; element->pktno=pktno; element->flags=flags; element->ipaddr=g_strdup(ipaddr); if (element->ipaddr) { new_prev->data=(void *)element; *priv=new_prev; return 0; } no_ipaddr: g_free(new_prev); error_out: g_free(element); no_free_out: return rc; } void destroy_ipmsg_private(gpointer data) { ipmsg_private_data_t *private; g_assert(data); dbg_out("Called destroy private::%x\n",(unsigned int)data); private = (ipmsg_private_data_t *)data; dbg_out("Called destroy private magic::%x\n",private->magic); if (private->magic != IPMSG_PRIVATE_DATA_MAGIC) goto error_out; switch(private->type) { case IPMSG_PRIVATE_RECVMSG: destroy_recvmsg_private(private); break; case IPMSG_PRIVATE_PASSWD: private->data = NULL; /* ただの整数型なので問題無し */ break; default: g_assert_not_reached(); break; } error_out: dbg_out("Free private ::%x\n",(unsigned int)private); g_free(private); dbg_out("Complete free private ::%x\n",(unsigned int)private); return; } /** メッセージウィンドウの開封ボタン押下動作処理 * @param[in] button 開封ボタンウィジェットへのポインタ * @param[in] user_data 付帯情報(未使用) */ void on_sealBtn_clicked (GtkButton *button, gpointer user_data){ int rc = 0; GtkTextView *text_view = NULL; GtkScrolledWindow *scrolledwindow = NULL; GtkWindow *top = NULL; GtkWidget *container = NULL; GtkToggleButton *cite_toggle = NULL; GtkWindow *download_window = NULL; GtkDialog *passwdDialog = NULL; ipmsg_private_data_t *private = NULL; ipmsg_recvmsg_private_t *sender_info = NULL; GtkTextIter start_iter,end_iter; GtkTextBuffer *buffer = NULL; gchar *message = NULL; gint text_line = 0; g_assert(button != NULL); private = (ipmsg_private_data_t *)lookup_widget(GTK_WIDGET(button), "senderInfo" ); IPMSG_ASSERT_PRIVATE(private, IPMSG_PRIVATE_RECVMSG); sender_info = private->data; top = GTK_WINDOW(lookup_widget(GTK_WIDGET(button), "viewWindow")); g_assert(top != NULL); cite_toggle = GTK_TOGGLE_BUTTON(lookup_widget(GTK_WIDGET(button), "viewwindowCitationCheck")); g_assert(cite_toggle != NULL); /* * 錠前付きメッセージの処理 */ if (sender_info->flags & IPMSG_PASSWORDOPT) { rc = password_confirm_window(HOSTINFO_PASSWD_TYPE_LOCK, NULL); if (rc == -EPERM) return; /* 解錠失敗 */ sender_info->flags &= ~IPMSG_PASSWORDOPT; /* 錠解除 */ } if ( (sender_info->ipaddr) && (!(sender_info->flags & IPMSG_NO_REPLY_OPTS) ) ) { dbg_out("recv notify:%s(%d)\n", sender_info->ipaddr, sender_info->pktno); ipmsg_send_read_msg(udp_con, sender_info->ipaddr, sender_info->pktno); } sender_info->flags &= ~IPMSG_SECRETOPT; dbg_out("new flags %x\n", sender_info->flags); text_view = GTK_TEXT_VIEW(lookup_widget(GTK_WIDGET(button), "viewwindowTextView")); container = gtk_widget_get_parent( GTK_WIDGET(button) ); g_assert(container != NULL); dbg_out("Seal Btn Container Name:%s(0x%x)\n", gtk_widget_get_name(container), (unsigned int)container); scrolledwindow = GTK_SCROLLED_WINDOW(lookup_widget(GTK_WIDGET(button), "scrolledwindow6")); /* * View Portを取り除くと自動的にviewport(とその上のボタン)が破棄される. */ gtk_container_remove(GTK_CONTAINER(scrolledwindow), GTK_WIDGET (container)); gtk_container_add(GTK_CONTAINER (scrolledwindow), GTK_WIDGET(text_view)); /* * ログ記録 */ if (hostinfo_refer_ipmsg_log_locked_message_handling()) { buffer = gtk_text_view_get_buffer(text_view); text_line = gtk_text_buffer_get_line_count(buffer); gtk_text_buffer_get_start_iter(buffer, &start_iter); gtk_text_buffer_get_end_iter(buffer, &end_iter); message = gtk_text_buffer_get_text(buffer, &start_iter, &end_iter, FALSE); if (message != NULL) { /* ログの成否に関わらず先に進む */ logfile_recv_log(sender_info->ipaddr, sender_info->flags, message); g_free(message); /* メッセージ開放 */ } } gtk_widget_set_sensitive(GTK_WIDGET(cite_toggle), TRUE); if (hostinfo_refer_ipmsg_default_citation()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cite_toggle), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cite_toggle), FALSE); if ((sender_info->flags & IPMSG_FILEATTACHOPT) && (sender_info->ext_part) ){ /* ダウンロードウィンドウ生成 */ dbg_out("This message has attachment\n"); rc = internal_create_download_window(top, &download_window); if (rc == 0) { g_assert (download_window != NULL); append_displayed_window(download_window); gtk_widget_show(GTK_WIDGET(download_window)); } else { ipmsg_err_dialog("%s : %s (%d)", _("Can not create download window"), strerror(-rc), rc); } } append_opened_window(top); if (sender_info->ext_part != NULL) { g_free(sender_info->ext_part); sender_info->ext_part = NULL; } } void on_sealBtn_destroy (GtkObject *object, gpointer user_data) { dbg_out("here\n"); } static GtkWindow * internal_create_recv_message_window(const msg_data_t *msg,const char *from){ int rc = 0; char *message = NULL; int pktno = 0; int flags = 0; gchar *internal_message = NULL; GtkWindow *window = NULL; GtkTextView *text_view = NULL; GtkTextBuffer *buffer = NULL; GtkWidget *SealBtn = NULL; gint len = 0; GtkWidget *scrolledwindow = NULL; GtkLabel *userlabel = NULL; GtkLabel *timelabel = NULL; GtkWidget *cite_toggle = NULL; ipmsg_private_data_t *priv = NULL; userdb_t *user_info = NULL; char label_string[64]; char time_string[26]; char seal_string[96]; gint width = 0, height = 0; if ( (msg == NULL) || (from == NULL) ) return NULL; message = msg->message; if (message == NULL) return NULL; pktno = msg->pkt_seq_no; flags = msg->command_opts; convert_string_internal(message, (const gchar **)&internal_message); if (internal_message == NULL) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), from); return NULL; } dbg_out("Recive_win:(from:%s)%s\n", from, internal_message); window = GTK_WINDOW(create_viewWindow()); timelabel = GTK_LABEL(lookup_widget(GTK_WIDGET(window), "viewwindowDateLabel")); if (get_current_time_string(time_string, ((msg->tv).tv_sec))) gtk_label_set_text(timelabel, _("UnKnown")); else gtk_label_set_text(timelabel, time_string); userlabel = GTK_LABEL(lookup_widget(GTK_WIDGET(window), "viewwindowUserInfoLabel")); g_assert(userlabel); rc = userdb_search_user_by_addr(from, (const userdb_t **)&user_info); if (rc == 0) { g_assert(userlabel); snprintf(label_string, 63, "%s@%s (%s)", user_info->nickname, user_info->group, user_info->host); label_string[63] = '\0'; gtk_label_set_text(userlabel,label_string); g_assert(destroy_user_info(user_info) == 0); } else { dbg_out("Can not find user:rc=%d\n", rc); gtk_label_set_text(userlabel, refer_user_name_from_msg(msg)); } cite_toggle = lookup_widget(GTK_WIDGET(window), "viewwindowCitationCheck"); g_assert(cite_toggle != NULL); if (hostinfo_refer_ipmsg_default_citation()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cite_toggle), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cite_toggle), FALSE); text_view = GTK_TEXT_VIEW(lookup_widget(GTK_WIDGET(window), "viewwindowTextView")); buffer = gtk_text_view_get_buffer(text_view); len = strlen(internal_message); gtk_text_buffer_set_text(buffer, internal_message, len); gtk_widget_set_events(GTK_WIDGET(text_view), GDK_BUTTON_PRESS_MASK); gtk_signal_connect (GTK_OBJECT (text_view), "button_press_event", GTK_SIGNAL_FUNC (on_viewwindowTextView_button_press_event), NULL); /* * 添付ファイル */ if (init_recvmsg_private(from,flags,pktno,&priv) == 0) { dbg_out("Hook private\n"); IPMSG_HOOKUP_DATA(window,priv, "senderInfo"); } if ((priv != NULL) && (flags & IPMSG_FILEATTACHOPT) ){ ipmsg_recvmsg_private_t *element; dbg_out("This message has attachment:%s\n", msg->extstring); element = (ipmsg_recvmsg_private_t *)priv->data; element->ext_part = g_strdup(msg->extstring); } /* * 封書 */ if (flags & IPMSG_SECRETOPT) { /* disable citation */ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cite_toggle), FALSE); gtk_widget_set_sensitive(cite_toggle, FALSE); scrolledwindow = lookup_widget(GTK_WIDGET(window), "scrolledwindow6"); g_assert(scrolledwindow); memset(seal_string, 0, 96); snprintf(seal_string, 96, "%s %s %s", _("Remove the seal"), ( (flags & IPMSG_FILEATTACHOPT) ? _("[Attachment]") : ""), ( (flags & IPMSG_PASSWORDOPT) ? _("(Locked)") : "") ); seal_string[95] = '\0'; SealBtn = gtk_button_new_with_label (seal_string); if (SealBtn != NULL){ gtk_container_remove(GTK_CONTAINER(scrolledwindow), GTK_WIDGET(text_view)); dbg_out("Seal set\n"); gtk_widget_show(SealBtn); gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(scrolledwindow), SealBtn); g_signal_connect ((gpointer) SealBtn, "clicked", G_CALLBACK (on_sealBtn_clicked), NULL); g_signal_connect ((gpointer) SealBtn, "destroy", G_CALLBACK (on_sealBtn_destroy), NULL); GLADE_HOOKUP_OBJECT (window, SealBtn, "SealBtn"); } } g_free(internal_message); /* *ウィンドウサイズ復元 */ if (hostinfo_get_ipmsg_recv_window_size(&width, &height) == 0) { dbg_out("Resize:(%d,%d)\n",width,height); gtk_window_resize (GTK_WINDOW(window), width, height); } return window; } static void print_one_window(gpointer data,gpointer user_data) { if (!data) return; dbg_out("stored window: %x\n",(unsigned int)data); return; } static void listup_current_stored_windows(void){ g_static_mutex_lock(&store_win_mutex); g_list_foreach(store_wins, print_one_window, NULL); g_static_mutex_unlock(&store_win_mutex); } static void show_one_window(gpointer data,gpointer user_data) { int rc = 0; GtkWindow *top = NULL; GtkWindow *download_window = NULL; ipmsg_private_data_t *private = NULL; ipmsg_recvmsg_private_t *sender_info = NULL; if (data == NULL) return; top = GTK_WINDOW(data); dbg_out("show stored window: %x\n", (unsigned int)top); private = (ipmsg_private_data_t *)lookup_widget(GTK_WIDGET(top), "senderInfo" ); IPMSG_ASSERT_PRIVATE(private,IPMSG_PRIVATE_RECVMSG); sender_info = private->data; g_assert(sender_info != NULL); /* ダウンロードウィンドウ生成 */ if ((!(sender_info->flags & IPMSG_SECRETOPT)) && (sender_info->flags & IPMSG_FILEATTACHOPT) && (sender_info->ext_part)){ dbg_out("This message has attachment\n"); rc = internal_create_download_window(top, &download_window); if (!rc) { g_assert (download_window); append_displayed_window(download_window); gtk_widget_show (GTK_WIDGET(download_window)); }else{ err_out("Can not create download window %s (%d)\n", strerror(-rc), rc); } } if (!(sender_info->flags & IPMSG_SECRETOPT)) { append_opened_window(top); } append_displayed_window(top); gtk_widget_show (GTK_WIDGET(top)); play_sound(); return; } void show_stored_windows(void) { g_static_mutex_lock(&store_win_mutex); g_list_foreach(store_wins, show_one_window, NULL); g_list_free(store_wins); store_wins=NULL; g_static_mutex_unlock(&store_win_mutex); } void store_message_window(const msg_data_t *msg,const char *from){ GtkWindow *window = NULL; window = internal_create_recv_message_window(msg, from); if (window != NULL) { g_static_mutex_lock(&store_win_mutex); store_wins = g_list_append(store_wins, window); g_static_mutex_unlock(&store_win_mutex); listup_current_stored_windows(); } } gboolean recv_windows_are_stored(void) { GList *first; g_static_mutex_lock(&store_win_mutex); first=g_list_first(store_wins); g_static_mutex_unlock(&store_win_mutex); if (first) return TRUE; return FALSE; } void recv_message_window(const msg_data_t *msg,const char *from){ int rc = 0; GtkWindow *window = NULL; GtkTextView *text_view = NULL; GtkWindow *download_window = NULL; ipmsg_private_data_t *private = NULL; ipmsg_recvmsg_private_t *sender_info = NULL; if ( (msg == NULL) || (from == NULL) ) return; window = internal_create_recv_message_window(msg, from); if (window != NULL) { private = (ipmsg_private_data_t *)lookup_widget( GTK_WIDGET(window), "senderInfo"); IPMSG_ASSERT_PRIVATE(private, IPMSG_PRIVATE_RECVMSG); sender_info = private->data; /* 封書でなければここでダウンロードウィンドウ生成 */ if ( (!(sender_info->flags & IPMSG_SECRETOPT)) && (sender_info->flags & IPMSG_FILEATTACHOPT) && (sender_info->ext_part != NULL) ) { dbg_out("This message has attachment\n"); rc = internal_create_download_window(window, &download_window); if (rc == 0) { g_assert(download_window != NULL); gtk_widget_show(GTK_WIDGET(download_window)); append_displayed_window(download_window); } else { err_out("Can't create download win (%d)\n", strerror(-rc), rc); } } if (!(sender_info->flags & IPMSG_SECRETOPT)) { append_opened_window(window); text_view = GTK_TEXT_VIEW( lookup_widget(GTK_WIDGET(window), "viewwindowTextView")); } gtk_widget_show(GTK_WIDGET(window)); append_displayed_window(window); play_sound(); } } int append_opened_window(GtkWindow *window) { g_assert(window); dbg_out("Append openlist:%x\n",(unsigned int)window); g_static_mutex_lock(&openwin_mutex); opened_wins=g_list_append(opened_wins,window); g_static_mutex_unlock(&openwin_mutex); return 0; } int destroy_all_opened_windows(void) { GList *node; GtkWidget *window; g_static_mutex_lock(&openwin_mutex); while((node=g_list_first (opened_wins))) { window=node->data; g_assert(window); opened_wins=g_list_remove (opened_wins,node); /* 参照のみなのでここではデータは開放しない */ g_static_mutex_unlock(&openwin_mutex); gtk_widget_destroy(window); g_static_mutex_lock(&openwin_mutex); } g_static_mutex_unlock(&openwin_mutex); return 0; } int remove_window_from_openlist(GtkWidget *window){ g_static_mutex_lock(&openwin_mutex); dbg_out("Remove %x from openlist\n",(unsigned int)window); /* 参照のみなのでここではデータは開放しない */ opened_wins=g_list_remove(opened_wins,window); g_static_mutex_unlock(&openwin_mutex); return 0; } int append_displayed_window(GtkWindow *window) { g_assert(window); dbg_out("Append displayed windows list:%x\n",(unsigned int)window); g_static_mutex_lock(&displayedwin_mutex); if (g_list_find(displayed_wins,window)) { dbg_out("Already exist %x\n",(unsigned int)window); goto unlock_out; } displayed_wins=g_list_append(displayed_wins,window); unlock_out: g_static_mutex_unlock(&displayedwin_mutex); return 0; } int remove_window_from_displaylist(GtkWidget *window){ g_static_mutex_lock(&displayedwin_mutex); dbg_out("Remove %x from displaylist\n",(unsigned int)window); if (g_list_find(displayed_wins,window)) /* 参照のみなのでここではデータは開放しない */ displayed_wins=g_list_remove(displayed_wins,window); g_static_mutex_unlock(&displayedwin_mutex); return 0; } void present_all_displayed_windows(void) { GList *node; GtkWidget *window; g_static_mutex_lock(&displayedwin_mutex); for(node=g_list_first (displayed_wins); node; node=g_list_next (node)) { window=node->data; g_assert(window); gtk_window_present (GTK_WINDOW(window)); } g_static_mutex_unlock(&displayedwin_mutex); return ; } static void on_pixmap_destroy(GtkObject *object, gpointer user_data) { // dbg_out("here %x\n",object); } static GtkWidget* lookup_widget_with_applet(GtkWidget *widget, const gchar *widget_name) { GtkWidget *found_widget; found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), widget_name); if (!found_widget) found_widget=lookup_widget(widget,widget_name); if (!found_widget) g_warning ("Widget not found: %s", widget_name); return found_widget; } static gboolean default_message_watcher(GtkWidget *window,gboolean is_normal) { GtkWidget *startBtn; GtkWidget *current_image; GtkWidget *new_image; g_assert(window); current_image=lookup_widget_with_applet(window,"image3"); g_assert(current_image); startBtn = lookup_widget_with_applet(window,"startBtn"); g_assert(startBtn); g_signal_connect ((gpointer) current_image, "destroy", G_CALLBACK (on_pixmap_destroy),NULL); if (is_normal) new_image=normal_image; else new_image=reverse_image; gtk_widget_show (new_image); //dbg_out("remove:%x\n",current_image); gtk_container_remove (GTK_CONTAINER (startBtn), current_image); gtk_container_add (GTK_CONTAINER (startBtn), new_image); //dbg_out("new object relation:%x => %x\n",current_image,new_image); GLADE_HOOKUP_OBJECT (window, new_image, "image3"); } static gboolean message_watcher(gpointer data) { static gboolean is_normal=TRUE; GtkWidget *init_win=data; g_assert(init_win); g_source_remove (init_win_timer_id); if ( (is_normal) && (!recv_windows_are_stored()) && (!hostinfo_is_ipmsg_absent()) ) goto source_set_out; if ( (!is_normal) && (!recv_windows_are_stored()) && (hostinfo_is_ipmsg_absent()) ) goto source_set_out; g_assert(normal_image); g_assert(reverse_image); if (is_normal) is_normal=FALSE; else is_normal=TRUE; #if GTK_CHECK_VERSION(2,10,0) if ((GTK_IS_STATUS_ICON(init_win))) systray_message_watcher(init_win,is_normal); else #endif default_message_watcher(init_win,is_normal); source_set_out: init_win_timer_id=g_timeout_add(MSG_WATCH_INTERVAL,message_watcher,init_win); return TRUE; } int start_message_watcher(GtkWidget *init_win){ if (!init_win) return -EINVAL; normal_image = create_pixmap (init_win, "g2ipmsg/ipmsg.xpm"); reverse_image = create_pixmap (init_win, "g2ipmsg/ipmsgrev.xpm"); g_assert(normal_image); g_assert(reverse_image); gtk_widget_ref (normal_image); gtk_widget_ref (reverse_image); dbg_out("Start message watcher \n"); init_win_timer_id=g_timeout_add(MSG_WATCH_INTERVAL,message_watcher,init_win); return 0; } int cleanup_message_watcher(void){ dbg_out("End message watcher \n"); gtk_widget_unref (normal_image); gtk_widget_unref (reverse_image); g_source_remove (init_win_timer_id); dbg_out("Cleanuped message watcher \n"); return 0; } g2ipmsg-0.9.6+dfsg/src/screensaver.c000066400000000000000000000071351126724573600173130ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** @file * @brief スクリーンセーバ連系関連関数群 * @author Takeharu KATO */ /* * Following definitions are obtained from * http://lists.freedesktop.org/archives/xdg/2006-June/006523.html */ #define SCREEN_SAVER_DBUS_SERVICE "org.gnome.ScreenSaver" #define SCREEN_SAVER_DBUS_OBJ_PATH "/org/gnome/ScreenSaver" #define SCREEN_SAVER_DBUS_IF "org.gnome.ScreenSaver" #define SCREEN_SAVER_GETACTIVATE_MSG "GetActive" /** スクリーンセーバが起動中であることを確認する * @param[in,out] state_p スクリーンセーバの動作状態返却領域のアドレス * @retval 0 正常終了 * @retval -EEXIST コネクション(バス)の生成に失敗 * @retval -ENOENT スクリーンセーバがGetActiveを解釈できなかった. */ int check_screensaver_active(gboolean *state_p) { DBusGConnection *connection = NULL; GError *error = NULL; DBusGProxy *proxy = NULL; gboolean ret = FALSE; gboolean state = FALSE; int rc = 0; /* Get a connection to the session bus */ error = NULL; connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error); if (connection == NULL) { dbg_out("Error:%s\n", error->message); g_error_free(error); rc = -EEXIST; goto error_out; } /* Create proxy */ proxy = dbus_g_proxy_new_for_name(connection, SCREEN_SAVER_DBUS_SERVICE, SCREEN_SAVER_DBUS_OBJ_PATH, SCREEN_SAVER_DBUS_IF); /* * getActive command specification is described as follow: * * Name: getActive * Args: (none) * Returns: DBUS_TYPE_BOOLEAN * Descriptions: Returns the value of the current state of activity. * (boolean value: TRUE ... active/FALSE ... inactive) */ error = NULL; ret = dbus_g_proxy_call(proxy, SCREEN_SAVER_GETACTIVATE_MSG, &error, G_TYPE_INVALID, G_TYPE_BOOLEAN, &state, G_TYPE_INVALID); if (ret == 0) { /* Error handling */ dbg_out("Error :%s %s\n", dbus_g_error_get_name(error), error->message); rc = -ENOENT; g_error_free(error); goto error_out; } g_object_unref(proxy); if (state) dbg_out("Screen saver is Active\n"); else dbg_out("Screen saver is InActive\n"); *state_p = state; rc = 0; error_out: return rc; } g2ipmsg-0.9.6+dfsg/src/screensaver.h000066400000000000000000000033171126724573600173160ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_SCREENSAVER_H) #define G2IPMSG_SCREENSAVER_H /** @file * @brief スクリーンセーバ連系インターフェース関連定義 * @author Takeharu KATO */ #ifdef HAVE_CONFIG_H # include #endif #include #if defined(USE_GNOME_SCREENSAVER) int check_screensaver_active(gboolean *); #endif /* USE_GNOME_SCREENSAVER */ #endif /* G2IPMSG_SCREENSAVER_H */ g2ipmsg-0.9.6+dfsg/src/sound.c000066400000000000000000000114041126724573600161150ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" gboolean can_sound=FALSE; #if defined(HAVE_GST) GstElement *pipeline, *source, *parser, *decoder, *conv, *sink; static gboolean on_bus_error_callback (GstBus *bus, GstMessage *message, gpointer data){ GError *err; gchar *debug; gst_message_parse_error (message, &err, &debug); g_free (debug); dbg_out ("Error: %s\n", err->message); g_error_free (err); return TRUE; } static gboolean on_bus_eos_callback (GstBus *bus, GstMessage *message, gpointer data){ dbg_out ("eos\n"); gst_element_set_state (pipeline, GST_STATE_NULL); return TRUE; } static void new_pad (GstElement *element, GstPad *pad, gpointer data) { GstPad *sinkpad; /* We can now link this pad with the audio decoder */ dbg_out ("Dynamic pad created, linking parser/decoder\n"); sinkpad = gst_element_get_pad (decoder, "sink"); gst_pad_link (pad, sinkpad); gst_object_unref (sinkpad); } void play_sound(void){ gchar *pathname; if ( (!can_sound) || (hostinfo_refer_ipmsg_default_sound()) ) return; /* set filename property on the file source. Also add a message * handler. */ pathname = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_SOUND, G2IPMSG_SOUND_FILE, TRUE, NULL); if (!pathname) { err_out("No sound file!!\n"); return; } dbg_out("Sound file:%s\n",pathname); g_object_set (G_OBJECT (source), "location", pathname, NULL); g_free(pathname); /* Now set to playing and iterate. */ dbg_out ("Setting to PLAYING\n"); gst_element_set_state (pipeline, GST_STATE_PLAYING); } void init_sound_system(const char *appname){ GstBus *bus; gst_init (NULL, NULL); g_assert(appname); pipeline = gst_pipeline_new (appname); source = gst_element_factory_make ("filesrc", "file-source"); parser = gst_element_factory_make ("oggdemux", "ogg-parser"); decoder = gst_element_factory_make ("vorbisdec", "vorbis-decoder"); conv = gst_element_factory_make ("audioconvert", "converter"); sink = gst_element_factory_make ("gconfaudiosink", "sink"); if (!GST_IS_ELEMENT (sink)) sink = gst_element_factory_make ("alsasink", "alsa-output"); if (!GST_IS_ELEMENT (sink)) { err_out ("Could not get default audio sink from GConf\n"); return; } bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); gst_bus_add_signal_watch (bus); g_signal_connect (bus, "message::error", G_CALLBACK (on_bus_error_callback), NULL); g_signal_connect (bus, "message::eos", G_CALLBACK (on_bus_eos_callback), NULL); /* put all elements in a bin */ gst_bin_add_many (GST_BIN (pipeline), source, parser, decoder, conv, sink, NULL); /* link together - note that we cannot link the parser and * decoder yet, becuse the parser uses dynamic pads. For that, * we set a pad-added signal handler. */ gst_element_link (source, parser); gst_element_link_many (decoder, conv, sink, NULL); g_signal_connect (parser, "pad-added", G_CALLBACK (new_pad), NULL); can_sound=TRUE; gst_element_set_state (pipeline, GST_STATE_READY); play_sound(); return ; } void cleanup_sound_system(void){ if (GST_IS_PIPELINE (pipeline)) return; gst_element_set_state (pipeline, GST_STATE_NULL); g_print ("Deleting pipeline\n"); gst_object_unref (GST_OBJECT (pipeline)); } #else void init_sound_system(const char *name){ can_sound=FALSE; return; } void play_sound(void) { return; } void cleanup_sound_system(void){ return; } #endif g2ipmsg-0.9.6+dfsg/src/sound.h000066400000000000000000000031741126724573600161270ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_SOUND_H) #define G2IPMSG_SOUND_H #ifdef HAVE_CONFIG_H # include #endif #if defined(HAVE_GST) #include #include #endif /* HAVE_GST */ void init_sound_system(const char *name); void play_sound(void); void cleanup_sound_system(void); #endif /* G2IPMSG_SOUND_H */ g2ipmsg-0.9.6+dfsg/src/support.c000066400000000000000000000056201126724573600165040ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include "support.h" GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name) { GtkWidget *parent, *found_widget; for (;;) { if (GTK_IS_MENU (widget)) parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); else parent = widget->parent; if (!parent) parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey"); if (parent == NULL) break; widget = parent; } found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), widget_name); if (!found_widget) g_warning ("Widget not found: %s", widget_name); return found_widget; } /* This is an internally used function to create pixmaps. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename) { GtkWidget *pixmap; gchar *pathname; if (!filename || !filename[0]) return gtk_image_new (); pathname = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_PIXMAP, filename, TRUE, NULL); if (!pathname) { g_warning (_("Couldn't find pixmap file: %s"), filename); return gtk_image_new (); } pixmap = gtk_image_new_from_file (pathname); g_free (pathname); return pixmap; } /* This is an internally used function to create pixmaps. */ GdkPixbuf* create_pixbuf (const gchar *filename) { gchar *pathname = NULL; GdkPixbuf *pixbuf; GError *error = NULL; if (!filename || !filename[0]) return NULL; pathname = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_PIXMAP, filename, TRUE, NULL); if (!pathname) { g_warning (_("Couldn't find pixmap file: %s"), filename); return NULL; } pixbuf = gdk_pixbuf_new_from_file (pathname, &error); if (!pixbuf) { fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", pathname, error->message); g_error_free (error); } g_free (pathname); return pixbuf; } /* This is used to set ATK action descriptions. */ void glade_set_atk_action_description (AtkAction *action, const gchar *action_name, const gchar *description) { gint n_actions, i; n_actions = atk_action_get_n_actions (action); for (i = 0; i < n_actions; i++) { if (!strcmp (atk_action_get_name (action, i), action_name)) atk_action_set_description (action, i, description); } } g2ipmsg-0.9.6+dfsg/src/support.h000066400000000000000000000025111126724573600165050ustar00rootroot00000000000000/* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #undef Q_ #ifdef ENABLE_NLS # define Q_(String) g_strip_context ((String), gettext (String)) #else # define Q_(String) g_strip_context ((String), (String)) #endif /* * Public Functions. */ /* * This function returns a widget in a component created by Glade. * Call it with the toplevel widget in the component (i.e. a window/dialog), * or alternatively any widget in the component, and the name of the widget * you want returned. */ GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name); /* * Private Functions. */ /* This is used to create the pixmaps used in the interface. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename); /* This is used to create the pixbufs used in the interface. */ GdkPixbuf* create_pixbuf (const gchar *filename); /* This is used to set ATK action descriptions. */ void glade_set_atk_action_description (AtkAction *action, const gchar *action_name, const gchar *description); g2ipmsg-0.9.6+dfsg/src/symcrypt.c000066400000000000000000000604151126724573600166650ustar00rootroot00000000000000/* * Following codes are derived from * ``Secure Programming Cookbook for C and C++''. * URL:http://www.oreilly.com/catalog/secureprgckbk/ * http://www.secureprogramming.com/ * * Licensing Information can be obtain from following URL: * * http://www.secureprogramming.com/?action=license * * Copyright 2003 by John Viega and Matt Messier. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * 3. Neither the name of the developer of this software nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ #include "common.h" /** @file * @brief 共通鍵暗号処理 * @author Takeharu KATO */ /** キー選択順序テーブル * @attention 内部リンケージ */ static ipmsg_cap_t key_select_table[]={ IPMSG_AES_256, IPMSG_BLOWFISH_256, IPMSG_RC2_256, IPMSG_AES_192, IPMSG_AES_128, IPMSG_BLOWFISH_128, IPMSG_RC2_128, IPMSG_RC2_40, -1, }; /** IPMSGの暗号化ケイパビリティから鍵長を取得する * @param[in] type 16進数文字(0-9a-fA-F) * @param[out] ret_len 鍵長(単位:バイト) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOENT 指定されたケイパビリティに対応する鍵が見付からなかった */ int symcrypt_get_skey_length(const ipmsg_cap_t type, size_t *ret_len){ size_t key_len = 0; int rc = 0; if (ret_len == NULL) { rc = -EINVAL; goto error_out; } switch(type){ case IPMSG_RC2_40: key_len = 5; break; case IPMSG_RC2_128: case IPMSG_AES_128: case IPMSG_BLOWFISH_128: key_len = 16; break; case IPMSG_AES_192: key_len = 24; break; case IPMSG_RC2_256: case IPMSG_AES_256: case IPMSG_BLOWFISH_256: key_len = 32; break; default: rc = -ENOENT; goto error_out; break; } *ret_len = key_len; /* 鍵長返却 */ rc = 0; /* 正常終了 */ error_out: return rc; } /** BlowFish暗号化のセットアップを行う * @param[in] key 暗号化鍵(バイナリ形式) * @param[in] key_len_byte 暗号化鍵長(単位:バイト) * @param[in] iv 情報ベクタ * @param[out] ret 設定済み暗号コンテキスト返却領域を指す * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @retval -ENOENT 指定されたケイパビリティに対応する鍵が見付からなかった */ int blowfish_cbc_encrypt_setup(const char *key, const size_t key_len_byte, const char *iv, EVP_CIPHER_CTX **ret) { int rc = 0; EVP_CIPHER_CTX *ctx = NULL; if (ret == NULL) { rc = -EINVAL; goto error_out; } /* * 暗号コンテキスト獲得 */ ctx = (EVP_CIPHER_CTX *)g_malloc(sizeof(EVP_CIPHER_CTX)); if (ctx == NULL) { rc = -ENOMEM; goto error_out; } EVP_CIPHER_CTX_init(ctx); /* 暗号コンテキスト初期化 */ /* * 暗号コンテキスト設定 */ EVP_EncryptInit(ctx, EVP_bf_cbc(), NULL, NULL); /* BlowFishを使用 */ EVP_CIPHER_CTX_set_key_length(ctx, key_len_byte); /* 鍵長設定 */ EVP_EncryptInit(ctx, NULL, key, iv); /* iv設定 */ *ret = ctx; rc = 0; error_out: return rc; } /** BlowFish複号化のセットアップを行う * @param[in] key 暗号化鍵(バイナリ形式) * @param[in] key_len_byte 暗号化鍵長(単位:バイト) * @param[in] iv 情報ベクタ * @param[out] ret 設定済み暗号コンテキスト返却領域を指す * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int blowfish_cbc_decrypt_setup(const char *key, const size_t key_len_byte, const char *iv, EVP_CIPHER_CTX **ret) { int rc = 0; EVP_CIPHER_CTX *ctx = NULL; if (ret == NULL) { rc = -EINVAL; goto error_out; } /* * 暗号コンテキスト獲得 */ ctx = (EVP_CIPHER_CTX *)g_malloc(sizeof(EVP_CIPHER_CTX)); if (ctx == NULL) { rc = -ENOMEM; goto error_out; } EVP_CIPHER_CTX_init(ctx); /* 暗号コンテキスト初期化 */ /* * 暗号コンテキスト設定 */ EVP_DecryptInit(ctx, EVP_bf_cbc(), NULL, NULL); /* BlowFish暗号を使用 */ EVP_CIPHER_CTX_set_key_length(ctx, key_len_byte); /* 鍵長設定 */ EVP_DecryptInit(ctx, NULL, key, iv); /* iv設定 */ /* * 返却 */ *ret = ctx; rc = 0; error_out: return rc; } /** AES暗号化のセットアップを行う * @param[in] key 暗号化鍵(バイナリ形式) * @param[in] key_len_byte 暗号化鍵長(単位:バイト) * @param[in] iv 情報ベクタ * @param[out] ret 設定済み暗号コンテキスト返却領域を指す * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @retval -ENOENT 指定されたケイパビリティに対応する鍵が見付からなかった */ int aes_cbc_encrypt_setup(const char *key, const size_t key_len_byte, const char *iv, EVP_CIPHER_CTX **ret) { int rc = 0; EVP_CIPHER_CTX *ctx = NULL; if (ret == NULL) { rc = -EINVAL; goto error_out; } /* * 暗号コンテキスト獲得 */ ctx = (EVP_CIPHER_CTX *)g_malloc(sizeof(EVP_CIPHER_CTX)); if (ctx == NULL) { rc = -ENOMEM; goto error_out; } EVP_CIPHER_CTX_init(ctx); /* 暗号コンテキスト初期化 */ /* * 暗号コンテキスト設定 */ switch(key_len_byte) { case 16: /* IPMSG_AES_128 */ EVP_EncryptInit(ctx, EVP_aes_128_cbc(), NULL, NULL); break; case 24: /* IPMSG_AES_192 */ EVP_EncryptInit(ctx, EVP_aes_192_cbc(), NULL, NULL); break; case 32: /* IPMSG_AES_256 */ EVP_EncryptInit(ctx, EVP_aes_256_cbc(), NULL, NULL); break; default: rc = -ENOENT; goto error_out; break; } EVP_CIPHER_CTX_set_key_length(ctx, key_len_byte); /* 鍵長設定 */ EVP_EncryptInit(ctx, NULL, key, iv); /* iv設定 */ *ret = ctx; rc = 0; error_out: return rc; } /** AES複号化のセットアップを行う * @param[in] key 暗号化鍵(バイナリ形式) * @param[in] key_len_byte 暗号化鍵長(単位:バイト) * @param[in] iv 情報ベクタ * @param[out] ret 設定済み暗号コンテキスト返却領域を指す * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int aes_cbc_decrypt_setup(const char *key, const size_t key_len_byte, const char *iv, EVP_CIPHER_CTX **ret) { int rc = 0; EVP_CIPHER_CTX *ctx = NULL; if (ret == NULL) { rc = -EINVAL; goto error_out; } /* * 暗号コンテキスト獲得 */ ctx = (EVP_CIPHER_CTX *)g_malloc(sizeof(EVP_CIPHER_CTX)); if (ctx == NULL) { rc = -ENOMEM; goto error_out; } EVP_CIPHER_CTX_init(ctx); /* 暗号コンテキスト初期化 */ /* * 暗号コンテキスト設定 */ /* * 暗号コンテキスト設定 */ switch(key_len_byte) { case 16: /* IPMSG_AES_128 */ EVP_DecryptInit(ctx, EVP_aes_128_cbc(), NULL, NULL); break; case 24: /* IPMSG_AES_192 */ EVP_DecryptInit(ctx, EVP_aes_192_cbc(), NULL, NULL); break; case 32: /* IPMSG_AES_256 */ EVP_DecryptInit(ctx, EVP_aes_256_cbc(), NULL, NULL); break; default: rc = -ENOENT; goto error_out; break; } EVP_CIPHER_CTX_set_key_length(ctx, key_len_byte); /* 鍵長設定 */ EVP_DecryptInit(ctx, NULL, key, iv); /* iv設定 */ /* * 返却 */ *ret = ctx; rc = 0; error_out: return rc; } /** RC2暗号化のセットアップを行う * @param[in] key 暗号化鍵(バイナリ形式) * @param[in] key_len_byte 暗号化鍵長(単位:バイト) * @param[in] iv 情報ベクタ * @param[out] ret 設定済み暗号コンテキスト返却領域を指す * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int rc2_cbc_encrypt_setup(const char *key, const size_t key_len_byte, const char *iv, EVP_CIPHER_CTX **ret) { int rc = 0; EVP_CIPHER_CTX *ctx = NULL; if (ret == NULL) { rc = -EINVAL; goto error_out; } /* * 暗号コンテキスト取得 */ ctx = (EVP_CIPHER_CTX *)g_malloc(sizeof(EVP_CIPHER_CTX)); if (ctx == NULL) { rc = -ENOMEM; goto error_out; } EVP_CIPHER_CTX_init(ctx); /* 暗号コンテキスト初期化 */ /* * 暗号コンテキスト設定 */ EVP_EncryptInit(ctx, EVP_rc2_cbc(), NULL,NULL); /* RC2を使う */ EVP_CIPHER_CTX_set_key_length(ctx,key_len_byte); /* 鍵長を設定 */ EVP_EncryptInit(ctx, NULL, key, iv); /* ivを設定 */ /* * 設定したコンテキストを返却 */ *ret = ctx; rc = 0; error_out: return rc; } /** RC2複号化のセットアップを行う * @param[in] key 暗号化鍵(バイナリ形式) * @param[in] key_len_byte 暗号化鍵長(単位:バイト) * @param[in] iv 情報ベクタ * @param[out] ret 設定済み暗号コンテキスト返却領域を指す * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int rc2_cbc_decrypt_setup(const char *key, const size_t key_len_byte, const char *iv, EVP_CIPHER_CTX **ret) { int rc = 0; EVP_CIPHER_CTX *ctx = NULL; if (ret == NULL) { rc = -EINVAL; goto error_out; } /* * 暗号化コンテキスト獲得 */ ctx = (EVP_CIPHER_CTX *)g_malloc(sizeof(EVP_CIPHER_CTX)); if (ctx == NULL) { rc = -ENOMEM; goto error_out; } EVP_CIPHER_CTX_init(ctx); /* 暗号コンテキスト初期化 */ /* * 暗号コンテキスト設定 */ EVP_DecryptInit(ctx, EVP_rc2_cbc(), NULL, NULL); /* RC2を使用 */ EVP_CIPHER_CTX_set_key_length(ctx,key_len_byte); /* 鍵長設定 */ EVP_DecryptInit(ctx, NULL, key,iv); /* iv設定 */ /* * 返却 */ *ret = ctx; rc = 0; error_out: return rc; } /** Cipher Block Chaining(CBC)モードでの暗号化を行う * @param[in] ctx 暗号コンテキスト * @param[in] data 平文 * @param[in] inl 入力電文(平文)長(単位:バイト) * @param[out] ret_buff 暗号化した電文(バイナリ形式)を指すポインタ変数のアドレス * @param[out] rb_len 暗号化した電文(バイナリ形式)の長さ(単位:バイト) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @retval -ENOENT 暗号化に失敗した */ int common_cbc_encrypt(EVP_CIPHER_CTX *ctx, const char *data, const int inl, char **ret_buff, size_t *rb_len) { int rc = 0; int buf_size = 0; size_t out_len = 0; size_t total_out_len = 0; char *buffer = NULL; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (ctx == NULL) || (data == NULL) || (ret_buff == NULL) ) { rc = -EINVAL; goto error_out; } /* * 暗号化電文格納領域を確保 */ buf_size = inl + EVP_CIPHER_CTX_block_size(ctx) + 1; if (buf_size < inl) { rc = -EINVAL; goto error_out; } /* * 暗号化データ格納領域を確保 */ buffer = g_malloc(buf_size); if (buffer == NULL) { rc = -ENOMEM; goto error_out; } /* * 暗号化を実施 */ rc = EVP_EncryptUpdate(ctx, buffer, &out_len, data, inl); if (rc == 0) { rc = ERR_get_error(); err_out("Can not Encrypt update message err=%s\n", ERR_error_string(rc, errbuf)); rc = -ENOENT; goto free_buffer_out; } total_out_len = out_len; /* * パディング処理を実施 */ rc = EVP_EncryptFinal (ctx, buffer + total_out_len, &out_len); if (rc == 0) { rc = ERR_get_error(); err_out("Can not Encrypt update message err=%s\n", ERR_error_string(rc, errbuf)); rc = -ENOENT; goto free_buffer_out; } total_out_len += out_len; /* パディング領域長を追加 */ /* * 返却 */ *ret_buff = buffer; *rb_len = total_out_len; rc = 0; /* 正常終了 */ return rc; free_buffer_out: if (buffer != NULL) g_free(buffer); error_out: return rc; } /** Cipher Block Chaining(CBC)モードでの複号化を行う * @param[in] ctx 暗号コンテキスト * @param[in] ct 暗号化電文(バイナリ形式) * @param[in] inl 入力電文(暗号化電文)長(単位:バイト) * @param[out] ret_buff 複号化した電文(バイナリ形式)を指すポインタ変数のアドレス * @param[out] rb_len 複号化した電文(バイナリ形式)の長さ(単位:バイト) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 * @retval -ENOENT 暗号化に失敗した */ int common_cbc_decrypt(EVP_CIPHER_CTX *ctx, const char *ct, const int inl, char **ret_buff, size_t *outl) { int rc = 0; int ol = 0, i = 0, tlen = 0; char *pt = NULL; char errbuf[G2IPMSG_CRYPT_EBUFSIZ]; if ( (ctx == NULL) || (ct == NULL) || (ret_buff == NULL) || (outl == NULL) ) { rc = -EINVAL; goto error_out; } /* * 復号化した電文を格納する領域を確保 */ i = inl + EVP_CIPHER_CTX_block_size(ctx) + 1; pt = g_malloc(i); if (pt == NULL) { rc = -ENOMEM; goto error_out; } if (i < inl) { rc = -EINVAL; goto error_out; } dbg_out("Decrypt try to :%d length\n",inl); /* * 復号化を実施 */ rc = EVP_DecryptUpdate(ctx, pt, &ol, ct, inl); if (rc == 0) { rc = ERR_get_error(); err_out("Can not decrypt update message err=%s\n", ERR_error_string(rc, errbuf)); rc = -ENOENT; goto free_buffer_out; } dbg_out("Decrypt update %d length\n", ol); /* * 最終ブロックの復号化 */ rc=EVP_DecryptFinal (ctx, pt + ol, &tlen); if (rc == 0) { rc = ERR_get_error(); err_out("Can not decrypt finalize message err=%s\n", ERR_error_string(rc, errbuf)); rc = -ENOENT; goto free_buffer_out; } ol += tlen; pt[ol] = '\0'; /* 文字列化するために念のためヌルターミネートする */ /* * 返却 */ *ret_buff = pt; *outl = ol; return 0; /* 正常終了 */ free_buffer_out: if (pt != NULL) g_free(pt); error_out: return rc; } /** 暗号コンテキストを開放する * @param[in] ctx_p 暗号コンテキストを指しているポインタ変数のアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常 */ int common_cbc_finalize(EVP_CIPHER_CTX **ctx_p) { int rc = 0; EVP_CIPHER_CTX *ctx = NULL; if ( (ctx_p == NULL) || (*ctx_p == NULL) ) { rc = -EINVAL; goto error_out; } ctx = *ctx_p; EVP_CIPHER_CTX_cleanup(ctx); /* 暗号コンテキストの中身を開放 */ g_free(ctx); /* 暗号コンテキストを開放 */ *ctx_p = NULL; /* NULLに再初期化 */ rc = 0; /* 正常終了 */ error_out: return rc; } /** 共通鍵暗号による暗号化を行う * @param[in] type 暗号種別を表す暗号ケイパビリティ * @param[in] plain 平文 * @param[out] key_p 暗号化に使用した鍵を指すポインタのアドレス * @param[out] key_len_p 暗号化に使用した鍵の鍵長返却領域 * @param[out] enc_p 暗号化された電文を指すポインタのアドレス * @param[out] enc_len_p 暗号化された電文の電文長返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int symcrypt_encrypt_message(ipmsg_cap_t type, const unsigned char *plain, char **key_p, size_t *key_len_p, char **enc_p, size_t *enc_len_p){ size_t key_len = 0; size_t enc_len = 0; size_t plain_len = 0; EVP_CIPHER_CTX *ctx = NULL; char *key = NULL; char *enc = NULL; int rc = 0; char iv[EVP_MAX_IV_LENGTH]; if ( (plain == NULL) || (key_p == NULL) || (key_len_p == NULL) || (enc_p == NULL) || (enc_len_p == NULL) ) { rc = -EINVAL; goto error_out; } /* * 平文のバッファ長を獲得(ヌルターミネートを含む) */ plain_len = strlen(plain) + 1; /* * 暗号ケイパビリティから鍵長を算出 */ rc = symcrypt_get_skey_length(type, &key_len); if (rc != 0) goto error_out; /* * 鍵格納バッファを獲得 */ key = g_malloc(key_len); if (key == NULL) { rc = -ENOMEM; goto error_out; } /* * 暗号化鍵を生成(ランダム値を使用) */ rc = generate_rand(key, key_len); if (rc != 0) goto key_free_out; /* * IPMSGで規定されたivを設定 */ memset(iv, 0, EVP_MAX_IV_LENGTH); /* * 暗号コンテキストの設定 */ switch(type){ case IPMSG_RC2_40: case IPMSG_RC2_128: case IPMSG_RC2_256: dbg_out("Use RC2 key %d\n", key_len); rc = rc2_cbc_encrypt_setup(key, key_len, NULL, &ctx); break; case IPMSG_BLOWFISH_128: case IPMSG_BLOWFISH_256: dbg_out("Use BlowFish key %d\n", key_len); rc = blowfish_cbc_encrypt_setup(key, key_len, NULL, &ctx); break; case IPMSG_AES_128: case IPMSG_AES_192: case IPMSG_AES_256: dbg_out("Use AES key %d\n", key_len); rc = aes_cbc_encrypt_setup(key, key_len, NULL, &ctx); break; default: rc = -EINVAL; /* 不正な鍵種別 */ break; } if (rc != 0) { err_out("Can not set key\n"); goto key_free_out; } /* * 暗号化を実施 */ rc = common_cbc_encrypt(ctx, plain, plain_len, &enc, &enc_len); if (rc != 0) { err_out("Can not encrypt message\n"); goto key_free_out; } /* * 暗号コンテキスト開放 */ rc = common_cbc_finalize(&ctx); if (rc != 0) { err_out("Can not clean up encrypt\n"); goto enc_free_out; } /* * 返却 */ *key_p = key; /* 暗号鍵 */ *key_len_p = key_len; /* 鍵長 */ *enc_p = enc; /* 暗号化電文 */ *enc_len_p = enc_len; /* 暗号化電文長 */ return 0; enc_free_out: if (enc != NULL) g_free(enc); ctx_free_out: if (ctx != NULL) common_cbc_finalize(&ctx); key_free_out: if (key != NULL) g_free(key); error_out: return rc; } /** 共通鍵暗号による複号化を行う * @param[in] type 暗号種別を表す暗号ケイパビリティ * @param[in] encoded 暗号化電文 * @param[in] enc_len 暗号化電文長(単位:バイト) * @param[in] key 暗号化に使用した鍵 * @param[out] dec_p 複号化された電文を指すポインタのアドレス * @param[out] dec_len_p 複号化された電文の電文長返却領域 * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int symcrypt_decrypt_message(ipmsg_cap_t type,const unsigned char *encoded, size_t enc_len, const char *key,char **dec_p, size_t *dec_len_p){ EVP_CIPHER_CTX *ctx = NULL; char *dec = NULL; char *new_dec = NULL; size_t key_len = 0; size_t dec_len = 0; int rc = 0; if ( (encoded == NULL) || (key == NULL) || (dec_p == NULL) || (dec_len_p == NULL) ) { rc = -EINVAL; goto error_out; } /* * 暗号化ケイパビリティから鍵長を獲得 */ rc = symcrypt_get_skey_length(type, &key_len); if (rc != 0) goto error_out; /* * 暗号コンテキストのセットアップを行う */ switch(type){ case IPMSG_RC2_40: case IPMSG_RC2_128: case IPMSG_RC2_256: dbg_out("Use RC2 key %d\n", key_len); rc = rc2_cbc_decrypt_setup(key, key_len, NULL, &ctx); break; case IPMSG_BLOWFISH_128: case IPMSG_BLOWFISH_256: dbg_out("Use blowfish key %d\n", key_len); rc = blowfish_cbc_decrypt_setup(key, key_len, NULL, &ctx); break; case IPMSG_AES_128: case IPMSG_AES_192: case IPMSG_AES_256: dbg_out("Use AES key %d\n", key_len); rc = aes_cbc_decrypt_setup(key, key_len, NULL, &ctx); break; default: rc = -EINVAL; break; } if (rc != 0) goto error_out; dbg_out("Decrypt:%s (len=%d) into plain\n", encoded, enc_len); rc = common_cbc_decrypt(ctx, encoded, enc_len, &dec, &dec_len); if (rc != 0) { err_out("Can not decrypt\n"); goto ctx_free_out; } dbg_out("Decrypt len:%d\n", dec_len); /* * 暗号コンテキスト開放 */ rc = common_cbc_finalize(&ctx); if (rc != 0) { err_out("Can not clean up decrypt\n"); goto dec_free_out; } /* * ヌルターミネートされていない電文を受け取った場合は, * 自分でヌルターミネートを追加する. */ if (dec[dec_len-1] != '\0') { new_dec = g_malloc(dec_len+1); if (new_dec == NULL) goto dec_free_out; memcpy(new_dec, dec, dec_len); new_dec[dec_len] = '\0'; g_free(dec); dec = new_dec; } /* * 返却 */ *dec_p = dec; *dec_len_p = dec_len; rc = 0; /* 正常終了 */ dbg_out("decoded:%s (%d)\n", dec, dec_len); return 0; dec_free_out: if (dec != NULL) g_free(dec); ctx_free_out: if (ctx != NULL) common_cbc_finalize(&ctx); error_out: return rc; } /** ピアの暗号化能力に基づいて暗号化に使用する共通鍵種別を決定する. * @param[in] peer_cap ピアの暗号ケイパビリティ * @param[out] selected_key 選択した鍵種別返却領域 * @param[in] speed 速度優先で鍵の選択を実施する指示 * - 真 処理速度優先で選択する * - 偽 安全性優先で選択する(デフォルト) * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOENT 使用可能な暗号が見付からなかった. */ int select_symmetric_key(ipmsg_cap_t peer_cap, ipmsg_cap_t *selected_key, int speed){ int i = 0; int rc = 0; int first = 0; int key_type = 0; int added_num = 1; ipmsg_cap_t candidates = 0; if (selected_key == NULL) { rc = -EINVAL; goto error_out; } /* * 通信に使用可能な鍵種別を算出する */ candidates = (get_symkey_part(peer_cap) & hostinfo_get_ipmsg_crypt_capability()); if (speed) { /* * 速度優先の場合は, テーブルの末尾から先頭に向かって, * 鍵探査を行う. */ first = SYMCRYPT_MAX_KEY_TYPE - 1; added_num = -1; } else { /* * 暗号強度優先の場合は, テーブルの先頭から末尾に向かって, * 鍵探査を行う. */ first = 0; added_num = 1; } /* * キー選択順序テーブルを探査し, 通信に使用する鍵を決定する. */ for (i=first; ( (i >= 0) && (i < SYMCRYPT_MAX_KEY_TYPE) && (!(key_select_table[i] & candidates) ) ); i += added_num); if ( !( (i >= 0) && (i < SYMCRYPT_MAX_KEY_TYPE) ) ) { rc = -ENOENT; /* 鍵が見付からなかった */ goto error_out; } /* * 返却 */ *selected_key = key_select_table[i]; dbg_out("Selected key name in ipmsg:0x%x\n", key_select_table[i]); error_out: return rc; } g2ipmsg-0.9.6+dfsg/src/symcrypt.h000066400000000000000000000064401126724573600166700ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_SYMCRYPT_H) #define G2IPMSG_SYMCRYPT_H /** @file * @brief 対称鍵暗号関連定義 * @author Takeharu KATO */ #ifdef HAVE_CONFIG_H # include #endif #include "ipmsg.h" #if defined(USE_OPENSSL) #include /** 対称鍵種別の数 */ #define SYMCRYPT_MAX_KEY_TYPE (8) /** RC2の暗号能力を表すビットマップ */ #define RC2_CAPS (IPMSG_RC2_40|IPMSG_RC2_128|IPMSG_RC2_256) /** BlowFishの暗号能力を表すビットマップ */ #define BLOWFISH_CAPS (IPMSG_BLOWFISH_128|IPMSG_BLOWFISH_256) /** AESの暗号能力を表すビットマップ */ #define AES_CAPS (IPMSG_AES_256|IPMSG_AES_192|IPMSG_AES_128) /** 対称鍵暗号能力を表すビットマップ */ #define SYM_CAPS (RC2_CAPS|BLOWFISH_CAPS|AES_CAPS) int ipmsg_get_skey_length(const ipmsg_cap_t ,size_t *); int blowfish_cbc_encrypt_setup(const char *, const size_t , const char *, EVP_CIPHER_CTX **); int blowfish_cbc_decrypt_setup(const char *, const size_t , const char *, EVP_CIPHER_CTX **); int aes_cbc_encrypt_setup(const char *, const size_t , const char *, EVP_CIPHER_CTX **); int aes_cbc_decrypt_setup(const char *, const size_t , const char *, EVP_CIPHER_CTX **); int rc2_cbc_encrypt_setup(const char *, const size_t , const char *, EVP_CIPHER_CTX **); int rc2_cbc_decrypt_setup(const char *, const size_t , const char *, EVP_CIPHER_CTX **); int common_cbc_encrypt(EVP_CIPHER_CTX *, const char *, const int , char **, size_t *); int common_cbc_decrypt(EVP_CIPHER_CTX *, const char *, const int , char **, size_t *); int common_cbc_finalize(EVP_CIPHER_CTX **); int symcrypt_encrypt_message(ipmsg_cap_t , const unsigned char *, char **, size_t *, char **, size_t *); int symcrypt_decrypt_message(ipmsg_cap_t , const unsigned char *, size_t , const char *, char **, size_t *); int select_symmetric_key(ipmsg_cap_t , ipmsg_cap_t *, int ); #else #define SYM_CAPS (0) #endif /* USE_OPENSSL */ #endif /* G2IPMSG_SYMCRYPT_H */ g2ipmsg-0.9.6+dfsg/src/systray.c000066400000000000000000000103641126724573600165070ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" #if GTK_CHECK_VERSION(2,10,0) #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) static void on_statusIcon_activate(GtkStatusIcon *status_icon, gpointer user_data) { dbg_out("here\n"); /* We need following cast to avoid compiler warnings. */ on_startBtn_clicked ((GtkButton *)status_icon,NULL); } static void on_statusIcon_popupmenu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data) { dbg_out("here\n"); gtk_menu_popup(GTK_MENU(create_main_menu()), NULL, NULL, gtk_status_icon_position_menu, status_icon, button,activate_time); } gboolean systray_message_watcher(GtkWidget *status_icon,gboolean is_normal) { GtkStatusIcon *icon=(GtkStatusIcon *)status_icon; GdkPixbuf *statusIcon_icon_pixbuf=NULL; g_assert(icon); if (recv_windows_are_stored()) { if (is_normal) { statusIcon_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); }else{ statusIcon_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsgrev.xpm"); } }else{ gtk_status_icon_set_blinking(icon,FALSE); if (hostinfo_is_ipmsg_absent()) { statusIcon_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsgrev.xpm"); }else{ statusIcon_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); } } if (statusIcon_icon_pixbuf) { gtk_status_icon_set_from_pixbuf(icon,statusIcon_icon_pixbuf); gdk_pixbuf_unref (statusIcon_icon_pixbuf); } return TRUE; } static gboolean systray_event_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { dbg_out("buttonWin: button press: %d\n", event->button); switch (event->button) { case 1: on_startBtn_clicked (GTK_BUTTON(widget),user_data); default: return FALSE; break; } return TRUE; } GtkWidget * create_ipmsg_status_icon(void){ GtkStatusIcon *statusIcon = NULL; GdkPixbuf *statusIcon_icon_pixbuf = NULL; statusIcon_icon_pixbuf = create_pixbuf ("g2ipmsg/ipmsg.xpm"); if (statusIcon_icon_pixbuf) { statusIcon = gtk_status_icon_new_from_pixbuf(statusIcon_icon_pixbuf); gdk_pixbuf_unref (statusIcon_icon_pixbuf); } g_signal_connect ((gpointer) statusIcon, "activate", G_CALLBACK (on_statusIcon_activate), NULL); g_signal_connect ((gpointer) statusIcon, "popup-menu", G_CALLBACK (on_statusIcon_popupmenu), NULL); gtk_status_icon_set_tooltip(statusIcon,_("G2ipmsg")); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (statusIcon, statusIcon, "statusIcon"); return (GtkWidget *)statusIcon; } #endif /* GTK_CHECK_VERSION(2,10,0) */ g2ipmsg-0.9.6+dfsg/src/systray.h000066400000000000000000000030171126724573600165110ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(SYSTRAY_H) #define SYSTRAY_H #include #include gboolean systray_message_watcher(GtkWidget *icon,gboolean is_normal); GtkWidget *create_ipmsg_status_icon(void); #endif /* SYSTRAY_H */ g2ipmsg-0.9.6+dfsg/src/tcp.c000066400000000000000000000514731126724573600155650ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" static int destroy_tcp_connection(tcp_con_t *con) { dbg_out("Here\n"); if (!con) return -EINVAL; if (con->peer_info) freeaddrinfo(con->peer_info); con->peer_info=NULL; close(con->soc); return 0; } static int parse_request(request_msg_t *req,const char *request_string){ size_t len; long int_val; char *sp=NULL; char *ep=NULL; char *buffer; size_t remains; gboolean has_offset=FALSE; int rc=0; if ( (!request_string) || (!req) ) return -EINVAL; dbg_out("Here:%s\n",request_string); buffer=g_strdup(request_string); if (!buffer) return -ENOMEM; len=strlen(request_string); _assert(len>0); remains=len; /* * パケット番号 */ sp=buffer; ep=memchr(sp, ':', remains); if (!ep) { rc=-EINVAL; goto error_out; } *ep='\0'; remains =len - ((unsigned long)ep-(unsigned long)buffer); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; int_val=strtol(sp, (char **)NULL, 16); req->pkt_no=int_val; dbg_out("pktno:%ld\n",req->pkt_no); sp=ep; /* * ファイルID */ ep=memchr(sp, ':', remains); if (ep) { has_offset=TRUE; *ep='\0'; remains =len - ((unsigned long)ep-(unsigned long)buffer); if (remains<=0) { rc=-EINVAL; goto error_out; } ++ep; } int_val=strtol(sp, (char **)NULL, 16); req->fileid=int_val; dbg_out("fileid:%d(%x)\n",req->fileid,req->fileid); sp=ep; /* * オフセット */ if (has_offset) int_val=strtol(sp, (char **)NULL, 16); else int_val=0; /* 仮に0にする */ req->offset=int_val; dbg_out("offset:%d(%x)\n",req->offset,req->offset); error_out: g_free(buffer); return rc; } static int tcp_ipmsg_finalize_connection(tcp_con_t *con){ int rc=0; char dummy[1]; g_assert(con); sock_set_buffer(con->soc, _TCP_BUF_MIN_SIZE, _TCP_BUF_SIZE); dbg_out("Wait for closing by peer.\n"); sock_set_recv_timeout(con->soc,TCP_CLOSE_WAIT_SEC); rc=wait_socket(con->soc,WAIT_FOR_READ,TCP_SELECT_SEC); if (rc<0) { dbg_out("OK timeout select :%s(%d)\n",strerror(errno),errno); return -errno; } memset(dummy, 0, sizeof(dummy)); rc=recv(con->soc, dummy,sizeof(dummy),0); /* 相手のクローズ検出 */ if (rc<0) dbg_out("OK timeout:%s(%d)\n",strerror(errno),errno); else rc=0; return rc; } static int tcp_transfer_file(tcp_con_t *con,const char *path,const off_t size, off_t offset){ int fd; int rc; char *buff = NULL; off_t read_len; off_t file_remains; off_t soc_remains; off_t write_len; off_t total_write; char *wp; struct sigaction saved_act; if ( (!con) || (!path) ) return -EINVAL; buff = g_malloc(TCP_FILE_BUFSIZ); if (buff == NULL) return -ENOMEM; fd=open(path,O_RDONLY); if (fd<0) return -errno; rc=lseek(fd, offset, SEEK_SET); if (rc<0) { rc=-errno; goto close_out; } total_write=0; file_remains=size; while(file_remains>0) { read_len=read(fd,buff,TCP_FILE_BUFSIZ); if (read_len<0) { rc=-errno; err_out("Can not read file %s %d\n",strerror(errno),errno); goto close_out; } file_remains -= read_len; soc_remains = read_len; wp = buff; if (wait_socket(con->soc,WAIT_FOR_WRITE,TCP_SELECT_SEC)<0) { err_out("Can not send socket\n"); goto close_out; } dbg_out("sock remains:%d\n",soc_remains); disable_pipe_signal(&saved_act); while(soc_remains > 0) { write_len = write(con->soc, wp, soc_remains); if (write_len<0) { if (errno==EINTR) continue; err_out("Can not send %s %d\n",strerror(errno),errno); enable_pipe_signal(&saved_act); goto close_out; } dbg_out("write len :%d\n",write_len); wp += write_len; total_write += write_len; soc_remains -= write_len; } enable_pipe_signal(&saved_act); dbg_out("transfer %s %d/%d(%d)\n",path,total_write,size,file_remains); } rc=0; close_out: close(fd); if (rc<0) dbg_out("Can not send file:%s %s %d\n",path,strerror(errno),errno); if (buff != NULL) g_free(buff); return rc; } static int create_response(unsigned long type,const char *name,const size_t size,const char *dir,char **response){ int rc=0; char *buff=NULL; size_t act_len; gchar *res; size_t local_size; int msg_fid; char *local_name_p; dbg_out("here:\n"); if ( ( (!name) && (type != IPMSG_FILE_RETPARENT) ) || (!dir) || (!response) ) return -EINVAL; if (type != IPMSG_FILE_RETPARENT) dbg_out("file:%s size:%d(%x)\n", name,size,size); else dbg_out("Return to parent.\n"); switch(type) { case IPMSG_FILE_REGULAR: msg_fid=1; local_size=size; local_name_p=(char *)name; break; case IPMSG_FILE_DIR: msg_fid=2; local_size=0; local_name_p=(char *)name; break; case IPMSG_FILE_RETPARENT: msg_fid=3; local_size=0; local_name_p="."; break; default: dbg_out("Invalid type:%d\n",type); return -EINVAL; break; } /* *メッセージ形成 */ buff=g_malloc(IPMSG_BUFSIZ); if (!buff) return -ENOMEM; snprintf(buff,IPMSG_BUFSIZ-1,"xxxx:%s:%x:%d:", local_name_p,local_size,msg_fid); /* 仮の長さを算出 */ buff[IPMSG_BUFSIZ-1]='\0'; act_len=strlen(buff); snprintf(buff,IPMSG_BUFSIZ-1,"%04x:%s:%x:%d:", act_len,local_name_p,local_size,msg_fid); /* メッセージ作成 */ buff[IPMSG_BUFSIZ-1]='\0'; rc=-ENOSPC; if (act_len != strlen(buff)) { err_out("Message too long:%s\n",buff); goto error_out; } *response = buff; rc=0; goto no_free_out; error_out: if (buff) g_free(buff); no_free_out: return rc; } static const char * tcp_get_peeraddr(const tcp_con_t *con) { int rc = 0; struct addrinfo *info = NULL; g_assert(con); info=con->peer_info; g_assert(info); rc = netcommon_get_peeraddr(info, (char *)con->peer); return (const char *)con->peer; } static int send_header(tcp_con_t *con,const char *response){ int rc; size_t soc_remains; ssize_t send_len; char *wp; int buff_len; const char *peer_addr=NULL; struct sigaction saved_act; gchar *send_buffer = NULL; if ( (!con) || (!response) ) return -EINVAL; peer_addr = tcp_get_peeraddr(con); rc = ipmsg_convert_string_external(peer_addr, response, (const char **)&send_buffer); if (rc != 0) { ipmsg_err_dialog("%s\n", _("Can not convert header into external representation")); goto no_free_out; } soc_remains = strlen(send_buffer); if (wait_socket(con->soc, WAIT_FOR_WRITE, TCP_SELECT_SEC) < 0) { err_out("Can not send socket\n"); goto error_out; } wp=(char *)send_buffer; dbg_out("Send:%s(%d, %x)\n",wp,soc_remains,soc_remains); while(soc_remains>0) { disable_pipe_signal(&saved_act); send_len=send(con->soc,wp,soc_remains,0); enable_pipe_signal(&saved_act); if (send_len<0) { if (errno == EINTR) continue; rc=-errno; err_out("Error:%s (%d)\n",strerror(errno),errno); goto error_out; } wp += send_len; soc_remains -= send_len; dbg_out("soc remains:%d\n",soc_remains); } rc=0; error_out: if (send_buffer != NULL) g_free(send_buffer); no_free_out: return rc; } static int read_directory_files(tcp_con_t *con,const char *parent,GnomeVFSFileInfo *info) { int rc; char *rel_path; char *full_path; char *res_message; if ( (!con) || (!parent) || (!info) ) return -EINVAL; if ( (!strcmp("..",info->name)) || (!strcmp(".",info->name) ) ) return -EINVAL; if (info->type==GNOME_VFS_FILE_TYPE_REGULAR) { rc=create_response(IPMSG_FILE_REGULAR,info->name,info->size,parent,&res_message); if (rc<0) return rc; dbg_out("Send file:%s\n",res_message); rc=send_header(con,res_message); g_free(res_message); if (rc<0) return rc; } rc=-ENOMEM; full_path=g_build_filename(parent,info->name,NULL); if (!full_path) return rc; /* send file */ tcp_transfer_file(con,full_path,info->size,0); g_free(full_path); return 0; } static int send_directory(tcp_con_t *con,const char *top_dir,const char *basename,GnomeVFSFileInfo *info){ int rc; char *uri; GnomeVFSResult res; GnomeVFSDirectoryHandle *handle; char *next_dir; char *res_message; if ( (!top_dir) || (!info) || (!basename) ) return -EINVAL; rc=create_response(IPMSG_FILE_DIR,info->name,info->size,top_dir,&res_message); if (rc<0) return rc; dbg_out("Send dir:%s (%s)\n",res_message,top_dir); rc=send_header(con,res_message); g_free(res_message); if (rc<0) return rc; uri=gnome_vfs_get_uri_from_local_path(top_dir); if (!uri) return -ENOMEM; /* *ファイルを送付 */ res=gnome_vfs_directory_open(&handle,uri,GNOME_VFS_FILE_INFO_FOLLOW_LINKS); res=gnome_vfs_directory_read_next(handle,info); while (res==GNOME_VFS_OK) { read_directory_files(con,top_dir,info); res=gnome_vfs_directory_read_next(handle,info); } gnome_vfs_directory_close(handle); /* *ディレクトリを送付 */ res=gnome_vfs_directory_open(&handle,uri,GNOME_VFS_FILE_INFO_FOLLOW_LINKS); if (res!=GNOME_VFS_OK) { err_out("Can not open dir:%s %s (%d)\n", top_dir, gnome_vfs_result_to_string(res), res); goto error_out; } res=gnome_vfs_directory_read_next(handle,info); if (res!=GNOME_VFS_OK) { if (res != GNOME_VFS_ERROR_EOF) err_out("Can not read next dir:%s %s (%d)\n", top_dir, gnome_vfs_result_to_string(res), res); goto error_out; } while (res==GNOME_VFS_OK) { if ( (info->type==GNOME_VFS_FILE_TYPE_DIRECTORY) && ( (strcmp(info->name,"..")) && (strcmp(info->name,"."))) ){ dbg_out("dir:%s\n",info->name); next_dir=g_build_filename(top_dir,info->name,NULL); if (!next_dir) goto error_out; rc=send_directory(con,next_dir,info->name,info); g_free(next_dir); if (rc<0) return rc; rc=create_response(IPMSG_FILE_RETPARENT,info->name,info->size,top_dir,&res_message); if (rc<0) return rc; dbg_out("Send ret parent:%s\n",res_message); rc=send_header(con,res_message); g_free(res_message); if (rc<0) return rc; } res=gnome_vfs_directory_read_next(handle,info); if (res!=GNOME_VFS_OK) { if (res != GNOME_VFS_ERROR_EOF) err_out("Can not read next dir:%s %s (%d)\n", top_dir, gnome_vfs_result_to_string(res), res); goto error_out; } } error_out: gnome_vfs_directory_close(handle); g_free(uri); return rc; } static int finalize_send_directory(tcp_con_t *con,const char *top_dir,GnomeVFSFileInfo *info){ int rc; char *res_message; if ( (!top_dir) || (!info) ) return -EINVAL; dbg_out("Here\n",res_message,top_dir); rc=create_response(IPMSG_FILE_RETPARENT,info->name,info->size,top_dir,&res_message); if (rc<0) { err_out("finalizesend directory fail %s (%d)\n", strerror(-rc),rc); return rc; } dbg_out("Send return to top dir:%s (%s)\n",res_message,top_dir); rc=send_header(con,res_message); g_free(res_message); return rc; } static int tcp_transfer_dir(tcp_con_t *con,const char *path){ int rc; char *basename; GnomeVFSFileInfo *info; GnomeVFSResult res; gchar *dir_uri; if ( (!con) || (!path) ) return -EINVAL; info=gnome_vfs_file_info_new(); dir_uri=gnome_vfs_get_uri_from_local_path(path); rc=-ENOMEM; if (!dir_uri) goto free_info_out; res=gnome_vfs_get_file_info(dir_uri,info,GNOME_VFS_FILE_INFO_FOLLOW_LINKS); if (res != GNOME_VFS_OK) { rc=-res; goto free_info_out; } basename=g_path_get_basename(path); rc=-ENOMEM; if (!basename) goto free_info_out; rc=send_directory(con,path,basename,info); g_free(basename); if (!rc) rc=finalize_send_directory(con,path,info); else err_out("Send directory fail %s (%d)\n", strerror(-rc),rc); free_info_out: gnome_vfs_file_info_unref(info); return rc; } int disable_pipe_signal(struct sigaction *saved_act){ int rc; struct sigaction new_act; if (!saved_act) return -EINVAL; memset(&new_act,0,sizeof(struct sigaction)); new_act.sa_handler=SIG_IGN; rc=sigaction(SIGPIPE,&new_act,saved_act); g_assert(!rc); return rc; } int enable_pipe_signal(struct sigaction *saved_act){ int rc; if (!saved_act) return -EINVAL; rc=sigaction(SIGPIPE,saved_act,NULL); g_assert(!rc); return rc; } int tcp_enable_keepalive(const tcp_con_t *con){ int rc; int flag; if (!con) return -EINVAL; flag=1; rc=setsockopt(con->soc, SOL_SOCKET, SO_KEEPALIVE, (void*)&flag, sizeof(int)); if (rc<0) { err_out("Can not set keepalive:%s(%d)\n",strerror(errno),errno); return -errno; } return 0; } int tcp_setup_client(int family,const char *ipaddr,int port,tcp_con_t *con){ int rc; int sock=-1; struct sockaddr_in server; struct hostent *host; struct addrinfo *info=NULL; if ( (!ipaddr) || (!con) ) return -EINVAL; rc=setup_addr_info(&info, ipaddr,port,SOCK_STREAM,family); if (rc<0) return rc; sock=socket(info->ai_family, info->ai_socktype,info->ai_protocol); if (sock<0) { err_out("Can not create socket: %s(errno:%d)\n",strerror(errno),errno); rc=-errno; goto error_out; } #ifdef IPV6_V6ONLY if (info->ai_family == AF_INET6) { int v6only=1; rc=setsockopt(sock,IPPROTO_IPV6,IPV6_V6ONLY,(void *)&v6only,sizeof(v6only)); if (rc) { goto error_out; } } #endif /* IPV6_V6ONLY */ if (connect(sock, info->ai_addr, info->ai_addrlen)<0){ err_out("Can not connect addr:%s port:%d %s (errno:%d)\n", ipaddr, port, strerror(errno), errno); rc=-errno; goto error_out; } rc = sock_set_buffer(sock, _TCP_BUF_MIN_SIZE, _TCP_BUF_SIZE); if (rc<0) { err_out("Can not set socket buffer: %s (%d)\n",strerror(errno),errno); return -errno; } /* 受信時はタイムアウト待ちを行うのでここでは, ノンブロックにしないこと */ con->soc=sock; con->family=info->ai_family; con->peer_info=info; return 0; error_out: if (info) freeaddrinfo(info); return rc; } int tcp_set_buffer(tcp_con_t *con) { if (!con) return -EINVAL; return sock_set_buffer(con->soc, _TCP_BUF_MIN_SIZE, _TCP_BUF_SIZE); } gpointer ipmsg_tcp_recv_thread(gpointer data){ ssize_t recv_len; size_t addr_len; int rc; tcp_con_t *con; char *recv_buf=NULL; int count=200; struct addrinfo *info; con=(tcp_con_t *)data; if (!con) { err_out("No connection recived\n"); g_assert(con); return NULL; } if (!(con->peer_info)) { err_out("Invalid connection recived\n"); g_assert(con->peer_info); return NULL; } rc=tcp_enable_keepalive(con); if (rc<0) return NULL; recv_buf=g_malloc(_MSG_BUF_SIZE); if (!recv_buf) return NULL; memset(recv_buf,0,_MSG_BUF_SIZE); while(1) { if (wait_socket(con->soc,WAIT_FOR_READ,TCP_SELECT_SEC)<0) { err_out("Can not send socket\n"); destroy_tcp_connection(con); goto error_out; }else{ read_retry: errno=0; memset(recv_buf, 0, sizeof(recv_buf)); info=con->peer_info; recv_len=recv(con->soc, recv_buf, _MSG_BUF_SIZE, MSG_PEEK); if (recv_len<=0) { if (errno==EINTR) goto read_retry; if (errno) err_out("Can not peek message %s(errno:%d)\n",strerror(errno),errno); destroy_tcp_connection(con); goto error_out; } dbg_out("tcp peek read:%d %s\n",recv_len,recv_buf); recv_len=recv(con->soc, recv_buf, recv_len, MSG_PEEK); dbg_out("tcp read:%d %s\n",recv_len,recv_buf); if (recv_len>0) { msg_data_t msg; request_msg_t req; char *path; off_t size; unsigned long ipmsg_fattr; recv_buf[recv_len-1]='\0'; memset(&req,0,sizeof(request_msg_t)); init_message_data(&msg); parse_message(NULL,&msg,recv_buf,recv_len); parse_request(&req,msg.message); rc=refer_attach_file(req.pkt_no,req.fileid,&ipmsg_fattr,(const char **)&path,&size); if (rc<0) { err_out("Can not find message:pktno %ld id : %d\n", req.pkt_no, req.fileid); close(con->soc); /* エラーとしてクローズする */ }else{ dbg_out("transfer:%s (%d)\n",path,size); switch(ipmsg_fattr) { case IPMSG_FILE_REGULAR: if (!tcp_transfer_file(con,path,size,0)) { tcp_ipmsg_finalize_connection(con); download_monitor_release_file(req.pkt_no,req.fileid); } break; case IPMSG_FILE_DIR: if (!tcp_transfer_dir(con,path)){ download_monitor_release_file(req.pkt_no,req.fileid); tcp_ipmsg_finalize_connection(con); } break; default: break; } release_message_data(&msg); g_free(path); break; } release_message_data(&msg); break; } } --count; if (!count) break; } if (con->peer_info) /* closeは相手側で行うので, destroy_tcp_connectionは呼び出せない * (Win版ipmsgの仕様). */ freeaddrinfo(con->peer_info); error_out: g_free(con); if (recv_buf) g_free(recv_buf); return NULL; } gpointer ipmsg_tcp_server_thread(gpointer data){ int rc; size_t len; int sock; int tcp_socket; int port; int reuse; int family; tcp_con_t *client_con=NULL; struct addrinfo *info=NULL; family=(int)data; rc=setup_addr_info(&info, NULL, hostinfo_refer_ipmsg_port(), SOCK_STREAM,family); if (rc<0) return NULL; tcp_socket = socket(info->ai_family, info->ai_socktype, info->ai_protocol); if (tcp_socket < 0) { err_out("Can not create socket:%s (%d)\n",strerror(errno),errno); goto error_out; } reuse=1; if (setsockopt(tcp_socket,SOL_SOCKET, SO_REUSEADDR, (const char *)&reuse, sizeof(reuse))<0) { err_out("Can not set sock opt:%s (%d)\n",strerror(errno),errno); goto error_out; } #ifdef IPV6_V6ONLY if (info->ai_family == AF_INET6) { int v6only=1; rc=setsockopt(tcp_socket,IPPROTO_IPV6,IPV6_V6ONLY,(void *)&v6only,sizeof(v6only)); if (rc) { goto error_out; } } #endif /* IPV6_V6ONLY */ if (bind(tcp_socket, info->ai_addr, info->ai_addrlen) != 0) { err_out("Can not bind socket:%s (%d)\n",strerror(errno),errno); goto error_out; } if (sock_set_buffer(tcp_socket, _TCP_BUF_MIN_SIZE, _TCP_BUF_SIZE)<0) { err_out("Can not set socket buffer:%s (%d)\n",strerror(errno),errno); goto error_out; } if (listen(tcp_socket, TCP_LISTEN_LEN) != 0) { err_out("Can not listen socket:%s (%d)\n",strerror(errno),errno); goto error_out; } while (1) { GThread *handler; struct addrinfo *client_info=NULL; client_con=g_malloc(sizeof(tcp_con_t)); g_assert(client_con); dbg_out("accept\n"); rc=setup_addr_info(&client_info, NULL, hostinfo_refer_ipmsg_port(), SOCK_STREAM,family); if (rc<0) goto free_client_out; sock = accept(tcp_socket, client_info->ai_addr,&(client_info->ai_addrlen)); if (sock < 0) { err_out("Can not accept:%s (%d)\n",strerror(errno),errno); goto free_client_out; } if (sock_set_buffer(sock, _TCP_BUF_MIN_SIZE, _TCP_BUF_SIZE)<0) { err_out("Can not set socket buffer:%s (%d)\n",strerror(errno),errno); goto free_client_out; } client_con->soc=sock; client_con->peer_info=client_info; handler=g_thread_create(ipmsg_tcp_recv_thread, client_con, FALSE, NULL); if (!handler) { err_out("Can not create handler thread.\n"); goto free_client_out; } } /* ここには, 来ないはずだが, 念のため */ if (info) freeaddrinfo(info); return NULL; free_client_out: destroy_tcp_connection(client_con); error_out: if (info) freeaddrinfo(info); exit(0); /* 多重起動のため 終了 */ return NULL; } g2ipmsg-0.9.6+dfsg/src/tcp.h000066400000000000000000000044241126724573600155640ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(IPMSG_TCP_H) #define IPMSG_TCP_H #include #include "g2ipmsg.h" #include "ipmsg_types.h" #define TCP_LISTEN_LEN (5) #define TCP_DOWNLOAD_RETRY (200) #define TCP_FLUSH_RETRY (10) #define TCP_SELECT_SEC (1) #define TCP_CLIENT_TMOUT_MS (500) #define TCP_CLOSE_WAIT_SEC (5) typedef struct _tcp_con{ int soc; int family; struct addrinfo *peer_info; char peer[NI_MAXHOST]; }tcp_con_t; typedef struct _request_msg{ pktno_t pkt_no; int fileid; int offset; }request_msg_t; typedef struct _tcp_dsend_pkt{ tcp_con_t *con; char *topdir; }tcp_dsend_pkt_t; gpointer ipmsg_tcp_server_thread(gpointer data); int tcp_enable_keepalive(const tcp_con_t *con); int tcp_setup_client(int family,const char *ipaddr,int port,tcp_con_t *con); int tcp_flush_buffer(tcp_con_t *con); int tcp_set_ipmsg_bufsiz(int soc); int disable_pipe_signal(struct sigaction *saved_act); int enable_pipe_signal(struct sigaction *saved_act); #endif /* IPMSG_TCP_H */ g2ipmsg-0.9.6+dfsg/src/udp.c000066400000000000000000000311201126724573600155520ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" GList *con_list = NULL; GStaticMutex udp_list_mutex = G_STATIC_MUTEX_INIT; const char * udp_get_peeraddr(const udp_con_t *con){ int rc = 0; struct addrinfo *info = NULL; g_assert(con != NULL); info = con->server_info; g_assert(info != NULL); rc = netcommon_get_peeraddr(info, (char *)con->peer); return (const char *)con->peer; } int udp_setup_server(udp_con_t *con, int port, int family) { int rc = 0; int soc = 0; char reuse = 1; struct addrinfo *info = NULL; if (con == NULL) return -EINVAL; memset(con, 0, sizeof(udp_con_t)); rc = setup_addr_info(&info, NULL, port, SOCK_DGRAM, family); if (rc < 0) return rc; rc = socket(info->ai_family, info->ai_socktype, info->ai_protocol); if (rc < 0) goto error_out; soc = rc; rc = bind(soc, info->ai_addr, info->ai_addrlen); if (rc < 0) goto error_out; con->soc = soc; con->family = family; con->port = port; /* * allocate server side */ rc = setup_addr_info(&info, NULL, port, SOCK_DGRAM, family); if (rc != 0) goto error_out; #ifdef IPV6_V6ONLY if (info->ai_family == AF_INET6) { int v6only = 1; rc = setsockopt(soc,IPPROTO_IPV6, IPV6_V6ONLY, (void *)&v6only, sizeof(v6only)); if (rc != 0) { goto error_out; } } #endif /* IPV6_V6ONLY */ con->server_info = info; rc = 0; error_out: return rc; } int udp_release_connection(udp_con_t *con) { if (con == NULL) return -EINVAL; dbg_out("Close udp sock:%d\n", con->soc); if (con->server_info != NULL) freeaddrinfo(con->server_info); con->server_info = NULL; close(con->soc); return 0; } int udp_send_message(const udp_con_t *con, const char *ipaddr, int port, const char *msg, size_t len) { int rc = 0; struct addrinfo *info = NULL; if ( (con == NULL) || (ipaddr == NULL) || (msg == NULL) ) return -EINVAL; dbg_out("send [addr:%s port:%d]:\n %s\n", ipaddr, port, msg); rc = setup_addr_info(&info, ipaddr, port, SOCK_DGRAM, con->family); if (rc < 0) goto error_out; rc = sendto(con->soc, msg, len, 0, info->ai_addr, info->ai_addrlen); error_out: if (info != NULL) freeaddrinfo(info); return rc; } int udp_send_peer(const udp_con_t *con, const char *msg, size_t len) { int rc = 0; struct addrinfo *info = NULL; if ( (con == NULL) || (msg == NULL) ) return -EINVAL; dbg_out("send peer:%s\n", msg); info = con->server_info; g_assert(info != NULL); rc = sendto(con->soc, msg, len, 0, info->ai_addr, info->ai_addrlen); return rc; } static void show_udp_con_node(gpointer data, gpointer user_data) { int rc = 0; udp_con_t *con = NULL; char peer_addr[NI_MAXHOST]; if (data == NULL) return; con = (udp_con_t *)data; rc = getnameinfo(con->server_info->ai_addr, con->server_info->ai_addrlen, peer_addr, NI_MAXHOST, NULL, 0, NI_NUMERICHOST); g_assert(rc == 0); dbg_out("ipaddr = %s len = %d family = %d port = %d\n", peer_addr, con->server_info->ai_addrlen, con->family, con->port); return; } static int show_udp_connections(void) { int rc = 0; GList *node = NULL; g_static_mutex_lock(&udp_list_mutex); g_list_foreach(con_list, show_udp_con_node, NULL); g_list_free(con_list); g_static_mutex_unlock(&udp_list_mutex); rc = 0; error_out: return rc; } static gint udp_con_find_by_family(gconstpointer a,gconstpointer b) { int rc=-EINVAL; udp_con_t *con_a, *con_b; if ( (!a) || (!b) ) goto out; con_a=(udp_con_t *)a; con_b=(udp_con_t *)b; if (con_a->family == con_b->family) return 0; rc=-ESRCH; out: return rc; /* Not found */ } int udp_send_broadcast_with_addr(const udp_con_t *con, const char *bcast, const char *msg, size_t len) { int rc = 0; struct addrinfo *info = NULL; GList *current_entry = NULL; if ( (con == NULL) || (msg == NULL) ) return -EINVAL; dbg_out("%s\n", msg); if (bcast == NULL) { switch(con->family) { case PF_INET6: rc = setup_addr_info(&info, "ff02::1", hostinfo_refer_ipmsg_port(), SOCK_DGRAM, PF_UNSPEC); break; default: rc = setup_addr_info(&info, "255.255.255.255", hostinfo_refer_ipmsg_port(), SOCK_DGRAM, PF_UNSPEC); break; } } else { rc = setup_addr_info(&info, bcast, hostinfo_refer_ipmsg_port(), SOCK_DGRAM, PF_UNSPEC); } if (rc < 0) goto error_out; rc = sendto(con->soc, msg, len, 0, info->ai_addr, info->ai_addrlen); error_out: if (info != NULL) freeaddrinfo(info); return rc; } int udp_send_broadcast(const udp_con_t *con,const char *msg,size_t len){ return udp_send_broadcast_with_addr(con,NULL,msg,len); } int alloc_udp_connection(udp_con_t **con_p) { int rc = 0; udp_con_t *con = NULL; if ( (con_p == NULL) || (*con_p != NULL) ) return -EINVAL; con = g_malloc(sizeof(udp_con_t)); if (con == NULL) { rc = -ENOMEM; goto error_out; } memset(con,0,sizeof(udp_con_t)); rc = 0; *con_p = con; error_out: return rc; } int free_udp_con_data(udp_con_t **con_p) { int rc = 0; udp_con_t *con = NULL; if ( (con_p == NULL) || (*con_p == NULL) ) return -EINVAL; con = *con_p; close(con->soc); if (con->server_info != NULL) freeaddrinfo(con->server_info); memset(con, 0, sizeof(udp_con_t)); g_free(con); *con_p = NULL; rc = 0; error_out: return rc; } int release_udp_connection(udp_con_t **con_p) { int rc = 0; GList *node = NULL; udp_con_t *con = NULL; if ( (con_p == NULL) || (*con_p == NULL) ) return -EINVAL; con = *con_p; g_static_mutex_lock(&udp_list_mutex); node = g_list_find(con_list, con); if (node == NULL) { g_static_mutex_unlock(&udp_list_mutex); rc = -ENOENT; goto error_out; } con_list = g_list_remove_link(con_list, node); g_static_mutex_unlock(&udp_list_mutex); free_udp_con_data((udp_con_t **)&(node->data)); g_list_free_1(node); *con_p = NULL; rc = 0; error_out: return rc; } static void free_udp_con_node(gpointer data, gpointer user_data) { int rc = 0; udp_con_t *con = NULL; if (data == NULL) return; con = (udp_con_t *)data; rc = free_udp_con_data((udp_con_t **)&data); g_assert(rc == 0); return; } int free_udp_conlist(void) { int rc = 0; GList *node = NULL; g_static_mutex_lock(&udp_list_mutex); g_list_foreach(con_list, free_udp_con_node, NULL); g_list_free(con_list); g_static_mutex_unlock(&udp_list_mutex); rc = 0; error_out: return rc; } int udp_server_setup(int port, int family) { int rc = 0; int soc = 0; struct addrinfo *res = NULL; struct addrinfo *node = NULL; udp_con_t *con = NULL; char port_str[11]; char host[NI_MAXHOST]; char serv[NI_MAXSERV]; char reuse = 1; struct addrinfo hints; memset(&hints, 0, sizeof(struct addrinfo)); snprintf(port_str, 10, "%d", port); if (family != 0) hints.ai_family = family; else hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; hints.ai_flags = AI_PASSIVE; rc = getaddrinfo(NULL, port_str, &hints,&res); if (rc != 0) { ipmsg_err_dialog("%s:%s(%d)\n", _("Can not get addr info"), gai_strerror(rc), rc); rc = (rc < 0) ? (rc) : (-rc); goto error_out; } for(node = res; node != NULL; node = node->ai_next) { rc = getnameinfo(node->ai_addr, node->ai_addrlen, host, sizeof(host), serv, sizeof(serv), NI_NUMERICHOST|NI_NUMERICSERV); g_assert (rc == 0); dbg_out("host:%s service:%s (family,type,proto)=(%d,%d,%d)\n", host, serv, node->ai_family, node->ai_socktype, node->ai_protocol); rc = socket(node->ai_family, node->ai_socktype, node->ai_protocol); if (rc < 0) goto free_connections; soc = rc; #ifdef IPV6_V6ONLY if (node->ai_family == AF_INET6) { int v6only=1; rc = setsockopt(soc, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&v6only, sizeof(v6only)); if (rc != 0) { goto free_connections; } } #endif /* IPV6_V6ONLY */ rc = bind(soc, node->ai_addr, node->ai_addrlen); if (rc < 0) goto free_addr_out; rc = alloc_udp_connection(&con); if (rc != 0) goto free_connections; con->server_info = g_malloc(sizeof(struct addrinfo)); if (con->server_info == NULL) goto free_connections; memmove(con->server_info, node, sizeof(struct addrinfo)); con->server_info->ai_next = NULL; con->soc = soc; con->family = node->ai_family; con->port = port; rc = udp_enable_broadcast(con); if (rc < 0) goto free_connections; con_list = g_list_append(con_list, con); con = NULL; } rc = 0; show_udp_connections(); goto free_addr_out; free_connections: free_udp_conlist(); free_addr_out: if (res != NULL) freeaddrinfo(res); error_out: return rc; } static int udp_set_buffer(const udp_con_t *con){ int rc; int size=0; if (!con) return -EINVAL; return sock_set_buffer(con->soc, _MSG_BUF_MIN_SIZE, _MSG_BUF_SIZE); } int udp_enable_broadcast(const udp_con_t *con){ int rc; int flag; int confirm,confirm_len; if (!con) return -EINVAL; dbg_out("Here\n"); flag=1; rc=setsockopt(con->soc, SOL_SOCKET, SO_BROADCAST, (void*)&flag, sizeof(int)); if (rc<0) { err_out("Can not set broad cast:%s(%d)\n",strerror(errno),errno); return -errno; } confirm=0; confirm_len=sizeof(confirm); rc=getsockopt(con->soc, SOL_SOCKET, SO_BROADCAST, (void*)&confirm, &confirm_len); if (rc<0) { err_out("Can not get broad cast:%s(%d)\n",strerror(errno),errno); return -errno; } if (confirm) dbg_out("Broadcat is set\n"); else err_out("Can not set broad cast:%s(%d)\n",strerror(errno),errno); return 0; } int udp_disable_broadcast(const udp_con_t *con){ int rc; int flag; if (!con) return -EINVAL; dbg_out("Here\n"); flag=0; rc=setsockopt(con->soc, SOL_SOCKET, SO_BROADCAST, (void*)&flag, sizeof(int)); if (rc<0) { err_out("Can not unset broad cast:%s(%d)\n",strerror(errno),errno); return -errno; } return 0; } int udp_recv_message(const udp_con_t *con,char **msg,size_t *len){ ssize_t recv_len; char *recv_buf=NULL; int old_fd_flags; int rc; int ret_code=0; struct addrinfo *info; if ( (!con) || (!msg) || (!len) ) return -EINVAL; g_assert(*msg==NULL); recv_buf=g_malloc(_MSG_BUF_SIZE); if (!recv_buf) return -ENOMEM; rc=udp_set_buffer(con); if (rc<0) goto error_out; rc=udp_enable_broadcast(con); if (rc<0) goto error_out; info=con->server_info; /* * 空読みする */ recv_len=recvfrom(con->soc,recv_buf,_MSG_BUF_SIZE,(MSG_PEEK|MSG_DONTWAIT),info->ai_addr,&(info->ai_addrlen)); if (recv_len<=0) { err_out("%s(errno:%d)\n",strerror(errno),errno); ret_code=-errno; goto error_out; } dbg_out("read:%d %s\n",recv_len,recv_buf); /* * バッファに読み込む */ recv_len=recvfrom(con->soc,recv_buf,recv_len,MSG_DONTWAIT,info->ai_addr,&(info->ai_addrlen)); if (recv_len<0) { err_out("%s(errno:%d)\n",strerror(errno),errno); ret_code=-errno; goto error_out; } /* * バッファ獲得 */ g_assert(*msg==NULL); *msg=g_malloc(recv_len); if (!(*msg)) goto error_out; dbg_out("copy:%d %s\n",recv_len,recv_buf); *len=recv_len; memmove(*msg,recv_buf,recv_len); /* 内容をコピー */ error_out: if (recv_buf) g_free(recv_buf); return ret_code; } g2ipmsg-0.9.6+dfsg/src/udp.h000066400000000000000000000046621126724573600155720ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(UDP_H) #define UDP_H #include #include typedef struct _udp_con{ int soc; int family; int port; int target_tag; char peer[NI_MAXHOST]; struct addrinfo *server_info; }udp_con_t; int alloc_udp_connection(udp_con_t **con_p); int free_udp_con_data(udp_con_t **con_p); int release_udp_connection(udp_con_t **con_p); int free_udp_conlist(void); int udp_server_setup(int port, int family); int udp_setup_server(udp_con_t *con, int port, int family); int udp_release_connection(udp_con_t *con); int udp_send_message(const udp_con_t *con,const char *ipaddr,int port, const char *msg,size_t len); int udp_send_peer(const udp_con_t *con,const char *msg,size_t len); int udp_send_broadcast_with_addr(const udp_con_t *con,const char *bcast,const char *msg,size_t len); int udp_send_broadcast(const udp_con_t *con,const char *msg,size_t len); int udp_enable_broadcast(const udp_con_t *con); int udp_disable_broadcast(const udp_con_t *con); int udp_recv_message(const udp_con_t *con,char **msg,size_t *len); const char *udp_get_peeraddr(const udp_con_t *con); int udp_release_connection(udp_con_t *con); #endif g2ipmsg-0.9.6+dfsg/src/uicommon.c000066400000000000000000000756021126724573600166250ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" #define HOOKUP_ID(component,id) \ g_object_set_data (G_OBJECT (component), "ID", (gpointer)id) #define GET_ID(component) \ ((int)g_object_get_data (G_OBJECT (component),"ID")) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) static int release_user_entry(GtkTreeView *view) { GtkTreePath *path; GtkTreeIter iter; GtkTreeModel *model; model = gtk_tree_view_get_model(view); if (!model) return -EINVAL; path=gtk_tree_path_new_first (); g_assert(path); if (gtk_tree_model_get_iter(model,&iter,path)) { while(gtk_list_store_remove(GTK_LIST_STORE(model), &iter)) dbg_out("Remove OK\n"); } gtk_tree_path_free (path); return 0; } static void on_messageUserTree_user_clicked(GtkTreeViewColumn *treeviewcolumn, gpointer user_data) { dbg_out("Here"); g_assert(treeviewcolumn); gtk_tree_view_column_set_sort_column_id(treeviewcolumn,0); } static void on_messageUserTree_group_clicked(GtkTreeViewColumn *treeviewcolumn, gpointer user_data) { dbg_out("Here"); g_assert(treeviewcolumn); gtk_tree_view_column_set_sort_column_id(treeviewcolumn,1); } static void on_messageUserTree_host_clicked(GtkTreeViewColumn *treeviewcolumn, gpointer user_data) { dbg_out("Here"); g_assert(treeviewcolumn); gtk_tree_view_column_set_sort_column_id(treeviewcolumn,2); } static void on_messageUserTree_ipaddr_clicked(GtkTreeViewColumn *treeviewcolumn, gpointer user_data) { dbg_out("Here"); g_assert(treeviewcolumn); gtk_tree_view_column_set_sort_column_id(treeviewcolumn,3); } static void on_messageUserTree_logon_clicked(GtkTreeViewColumn *treeviewcolumn, gpointer user_data) { dbg_out("Here"); g_assert(treeviewcolumn); gtk_tree_view_column_set_sort_column_id(treeviewcolumn,4); } static void on_messageUserTree_priority_clicked(GtkTreeViewColumn *treeviewcolumn, gpointer user_data) { dbg_out("Here"); g_assert(treeviewcolumn); gtk_tree_view_column_set_sort_column_id(treeviewcolumn,5); } static GtkWidget * create_group_menu(GtkWidget *window) { GtkWidget *menu; GtkWidget *new_item; GList *groups,*node; menu=gtk_menu_new(); groups=get_group_list(); for(node=g_list_first(groups);node;node=g_list_next (node)) { if (node->data){ dbg_out("Group:%s(%x)\n",node->data,node->data); new_item=create_menu_item(node->data,node->data,NULL,on_usermenu_group_item); gtk_menu_append( GTK_MENU(menu), new_item); GLADE_HOOKUP_OBJECT(new_item,window,"messageWindow"); g_free(node->data); } } g_list_free(groups); return menu; } void on_usermenu_group_item (gpointer data){ GtkMenuItem *menuitem=(GtkMenuItem *)data; GtkWidget *child; dbg_out("Here:0x%x\n",menuitem); if (menuitem) { child=GTK_BIN (menuitem)->child; if (GTK_IS_LABEL (child)) { gchar *text; GtkWidget *window; GtkWidget *view; GtkTreeSelection *sel; GtkTreeModel *model; GtkTreeIter iter; gboolean valid; gchar *groupname; text=(gchar *)gtk_label_get_text (GTK_LABEL (child)); window=lookup_widget(GTK_WIDGET(menuitem),"messageWindow"); g_assert(window); view=lookup_widget(window,"messageUserTree"); g_assert(view); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_unselect_all(sel); model=gtk_tree_view_get_model(GTK_TREE_VIEW(view)); valid=gtk_tree_model_get_iter_first (model,&iter); while(valid){ gtk_tree_model_get (model, &iter, USER_VIEW_GROUP_ID, &groupname, -1); if (!strcmp(groupname,text)) { dbg_out("Select:%s\n",groupname); sel=gtk_tree_view_get_selection(GTK_TREE_VIEW(view)); gtk_tree_selection_select_iter(sel,&iter); } g_free(groupname); valid = gtk_tree_model_iter_next (model, &iter); } } } } static GtkWidget * internal_create_view_config_menu(GtkWidget *view){ GtkWidget *menu; GtkWidget *window; GtkWidget *selectGroupMenu=NULL; window=lookup_widget(GTK_WIDGET(view),"messageWindow"); g_assert(window); menu=create_userlistPopUpMenu (); selectGroupMenu=lookup_widget(menu,"groupselection"); g_assert(selectGroupMenu); gtk_menu_item_set_submenu (GTK_MENU_ITEM (selectGroupMenu),create_group_menu(window)); GLADE_HOOKUP_OBJECT_NO_REF (menu, window, "messageWindow"); return menu; } static gboolean on_message_view_event_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { dbg_out("messageWin: button press: %d\n", event->button); switch (event->button) { case 3: gtk_menu_popup(GTK_MENU(internal_create_view_config_menu(widget)), NULL, NULL, NULL, NULL, event->button, event->time); default: /* main menu */ return FALSE; break; } return TRUE; } static GtkTreeViewColumn * create_user_view_column(int id,const char *title, GCallback callback){ GtkTreeViewColumn *col; GtkCellRenderer *renderer; if ( (id<0) || (id>=MAX_VIEW_ID) || (!title) ) return NULL; /* --- Column #1 --- */ col = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(col, title); renderer = gtk_cell_renderer_text_new(); /* pack cell renderer into tree view column */ gtk_tree_view_column_pack_start(col, renderer, TRUE); /* connect 'text' property of the cell renderer to * model column that contains the first name */ gtk_tree_view_column_add_attribute(col, renderer, "text", id); gtk_tree_view_column_set_resizable (col,TRUE); gtk_tree_view_column_set_clickable(col,TRUE); gtk_tree_view_column_set_reorderable(col, TRUE); g_signal_connect ((gpointer) col, "clicked", G_CALLBACK (callback), NULL); HOOKUP_ID(col,id); return col; } static void userview_set_new_view_priority(GtkTreeModel *model, GtkTreeIter *iter, int prio, gboolean need_notify){ int rc; gchar *ipaddr=NULL; if ( (prio < USERLIST_PRIO_MIN) || (prio > USERLIST_PRIO_MAX) ) return; dbg_out("Here: prio %d\n",prio); gtk_tree_model_get(model, iter, USER_VIEW_IPADDR_ID, &ipaddr, -1); g_assert(ipaddr); userdb_replace_prio_by_addr(ipaddr,prio,need_notify); g_free(ipaddr); return; } void setup_message_tree_view(GtkWidget *view) { GtkTreeViewColumn *col; GtkCellRenderer *renderer; guint state; GList *cols,*node; GtkTreeViewColumn *view_cols[MAX_VIEW_ID]; int col_id; int i; state=hostinfo_refer_header_state(); /* * タイトル設定 */ /* --- Column #1 --- */ col=create_user_view_column(USER_VIEW_NICKNAME_ID, _("User"), G_CALLBACK(on_messageUserTree_user_clicked)); view_cols[USER_VIEW_NICKNAME_ID]=col; g_assert(GET_ID(col)==USER_VIEW_NICKNAME_ID); /* --- Column #2 --- */ col=create_user_view_column(USER_VIEW_GROUP_ID, _("Group"), G_CALLBACK(on_messageUserTree_group_clicked)); view_cols[USER_VIEW_GROUP_ID]=col; g_assert(GET_ID(col)==USER_VIEW_GROUP_ID); if (state & HEADER_VISUAL_GROUP_ID) gtk_tree_view_column_set_visible(col,TRUE); else gtk_tree_view_column_set_visible(col,FALSE); /* --- Column #3 --- */ col=create_user_view_column(USER_VIEW_HOST_ID, _("Host"), G_CALLBACK(on_messageUserTree_host_clicked)); view_cols[USER_VIEW_HOST_ID]=col; g_assert(GET_ID(col)==USER_VIEW_HOST_ID); if (state & HEADER_VISUAL_HOST_ID) gtk_tree_view_column_set_visible(col,TRUE); else gtk_tree_view_column_set_visible(col,FALSE); /* --- Column #4 --- */ col=create_user_view_column(USER_VIEW_IPADDR_ID, _("IP Address"), G_CALLBACK(on_messageUserTree_ipaddr_clicked)); view_cols[USER_VIEW_IPADDR_ID]=col; g_assert(GET_ID(col)==USER_VIEW_IPADDR_ID); if (state & HEADER_VISUAL_IPADDR_ID) gtk_tree_view_column_set_visible(col,TRUE); else gtk_tree_view_column_set_visible(col,FALSE); /* --- Column #5 --- */ col=create_user_view_column(USER_VIEW_LOGON_ID, _("LogOn"), G_CALLBACK(on_messageUserTree_logon_clicked)); view_cols[USER_VIEW_LOGON_ID]=col; g_assert(GET_ID(col)==USER_VIEW_LOGON_ID); if (state & HEADER_VISUAL_LOGON_ID) gtk_tree_view_column_set_visible(col,TRUE); else gtk_tree_view_column_set_visible(col,FALSE); /* --- Column #6 --- */ col=create_user_view_column(USER_VIEW_PRIO_ID, _("Priority"), G_CALLBACK(on_messageUserTree_priority_clicked)); view_cols[USER_VIEW_PRIO_ID]=col; g_assert(GET_ID(col)==USER_VIEW_PRIO_ID); if (state & HEADER_VISUAL_PRIO_ID) gtk_tree_view_column_set_visible(col,TRUE); else gtk_tree_view_column_set_visible(col,FALSE); /* Append all columns */ for(i=0;i%d\n",i,col_id); gtk_tree_view_append_column(GTK_TREE_VIEW(view), view_cols[col_id]); } } gtk_signal_connect (GTK_OBJECT (view), "button_press_event", GTK_SIGNAL_FUNC (on_message_view_event_button_press_event), NULL); } void update_user_entry(GList *top,GtkWidget *view,gboolean is_forced) { GtkTreeIter toplevel; GtkListStore *liststore = NULL; GtkWidget *usersEntry = NULL; GtkTreeViewColumn *col = NULL; userdb_t *current_user = NULL; int i = 0; int users_count = 0; int prio = 0; guint state = 0; int id = 0; gchar *nick_name_ref = NULL; gchar num_str[32]; if ( (!top) || (!view) ) return; state=hostinfo_refer_header_state(); release_user_entry(GTK_TREE_VIEW(view)); liststore = gtk_list_store_new(MAX_VIEW_ID, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); for(i=0;(current_user=g_list_nth_data(top,i));++i) { g_assert(current_user); nick_name_ref = current_user->nickname; if ( (current_user->nickname == NULL) || ( current_user->nickname[0] == '\0' ) ) { if ( (current_user->user != NULL) && (current_user->user[0] != '\0') ) nick_name_ref = current_user->user; else nick_name_ref = _("Unknown"); } dbg_out("Update\n"); dbg_out("NickName: %s\n", current_user->nickname); dbg_out("Group: %s\n",current_user->group); dbg_out("User: %s\n",current_user->user); dbg_out("Host: %s\n",current_user->host); dbg_out("IP Addr: %s\n",current_user->ipaddr); dbg_out("Priority: %d\n",current_user->prio); prio=current_user->prio; memset(num_str,0,32); if (prio>0) snprintf(num_str,31,"%d",prio); else snprintf(num_str,31,"-"); num_str[31]='\0'; if ( (prio>=0) || (is_forced) ){ /* Append a top level row and leave it empty */ gtk_list_store_append(liststore, &toplevel); gtk_list_store_set(liststore, &toplevel, USER_VIEW_NICKNAME_ID, nick_name_ref, USER_VIEW_GROUP_ID,current_user->group, USER_VIEW_HOST_ID,current_user->host, USER_VIEW_IPADDR_ID,current_user->ipaddr, USER_VIEW_LOGON_ID,current_user->user, USER_VIEW_PRIO_ID,num_str, -1); } ++users_count; fflush(stdout); } gtk_tree_view_set_model(GTK_TREE_VIEW(view), GTK_TREE_MODEL(liststore)); g_object_unref(liststore); /* destroy model automatically with view */ gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(view)), GTK_SELECTION_MULTIPLE ); /* * ユーザ数更新 */ usersEntry=lookup_widget(GTK_WIDGET(view),"messageWinUsersEntry"); g_assert(usersEntry); snprintf(num_str,31,"%d",users_count); gtk_entry_set_text(GTK_ENTRY(usersEntry), num_str); #if GTK_CHECK_VERSION(2,10,0) gtk_tree_view_set_rubber_banding (GTK_TREE_VIEW(view),TRUE); if (GTK_WIDGET_REALIZED(view)) { #if GTK_CHECK_VERSION(2,10,6) gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(view),TRUE); if (state & HEADER_VISUAL_GRID_ID) gtk_tree_view_set_grid_lines(GTK_TREE_VIEW(view),GTK_TREE_VIEW_GRID_LINES_BOTH); #endif } #endif return; } void ipmsg_update_ui(void){ while (gtk_events_pending ()) gtk_main_iteration (); } void ipmsg_update_ui_user_list(void){ userdb_invalidate_userdb(); ipmsg_send_br_entry(udp_con,0); } void ipmsg_wait_ms(const int wait_ms){ GTimer *wait_timer = NULL; gulong elapsed = 0; gint remains_ms = 0; wait_timer = g_timer_new(); g_assert(wait_timer != NULL); for(remains_ms = wait_ms;remains_ms > 0; --remains_ms) { g_timer_start(wait_timer); for(elapsed = 0; elapsed < 1000UL;g_timer_elapsed(wait_timer, &elapsed)) { ipmsg_update_ui(); /* 待ちループ */ } } g_timer_destroy(wait_timer); return; } void userview_set_view_priority(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, int prio){ userview_set_new_view_priority(model, iter, prio, TRUE); return; } void userview_set_view_priority_without_update(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, int prio){ /* path はNULLになりうることに注意(on_set_all_as_default_activate 参照) */ userview_set_new_view_priority(model, iter, prio, FALSE); return; } int remind_headers_state(GtkWidget *window){ GtkWidget *view; GList *cols,*node; int count; GtkTreeViewColumn *col; dbg_out("here\n"); g_assert(window); view=lookup_widget(GTK_WIDGET(window),"messageUserTree"); cols=gtk_tree_view_get_columns(GTK_TREE_VIEW(view)); for(node=g_list_first(cols),count=0;node;node=g_list_next (node),++count) { g_assert(node->data); col=node->data; dbg_out("%d : %d\n",count,GET_ID(col)); hostinfo_set_ipmsg_header_order(count,GET_ID(col)); } return 0; } void update_rsa_encryption_button_state(GtkToggleButton *togglebutton) { GtkWindow *window = NULL; GtkCheckButton *encryptionCheckBtn = NULL; GtkButton *pubkeyPWDBtn = NULL; dbg_out("here\n"); window = GTK_WINDOW(lookup_widget(GTK_WIDGET(togglebutton), "securityConfig")); g_assert(window != NULL); encryptionCheckBtn = GTK_CHECK_BUTTON(lookup_widget(GTK_WIDGET(window), "RSAKeyEncryptionCBtn")); g_assert(encryptionCheckBtn != NULL); pubkeyPWDBtn = GTK_BUTTON(lookup_widget(GTK_WIDGET(window), "pubkeyPWDBtn")); g_assert(pubkeyPWDBtn != NULL); /* * パスワードを使用しない場合は, パスワード設定ボタンを有効化しない. */ #if defined(USE_OPENSSL) if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(encryptionCheckBtn))) gtk_widget_set_sensitive(GTK_WIDGET(pubkeyPWDBtn), TRUE); else gtk_widget_set_sensitive(GTK_WIDGET(pubkeyPWDBtn), FALSE); #else gtk_widget_set_sensitive(GTK_WIDGET(pubkeyPWDBtn), FALSE); #endif /* USE_OPENSSL */ return; } void update_lockkey_button_state(GtkToggleButton *togglebutton) { GtkWindow *window = NULL; GtkCheckButton *uselockCheckBtn = NULL; GtkButton *lockPWDBtn = NULL; dbg_out("here\n"); window = GTK_WINDOW(lookup_widget(GTK_WIDGET(togglebutton), "securityConfig")); g_assert(window != NULL); uselockCheckBtn = GTK_CHECK_BUTTON(lookup_widget(GTK_WIDGET(window), "useLockCBtn")); g_assert(uselockCheckBtn != NULL); lockPWDBtn = GTK_BUTTON(lookup_widget(GTK_WIDGET(window), "lockPWDBtn")); g_assert(lockPWDBtn != NULL); /* * 錠を使用しない場合は, パスワード設定ボタンを有効化しない. */ #if defined(USE_OPENSSL) if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(uselockCheckBtn))) gtk_widget_set_sensitive(GTK_WIDGET(lockPWDBtn), TRUE); else gtk_widget_set_sensitive(GTK_WIDGET(lockPWDBtn), FALSE); #else gtk_widget_set_sensitive(GTK_WIDGET(lockPWDBtn), FALSE); #endif /* USE_OPENSSL */ return; } GtkWidget * internal_create_crypt_config_window(void){ int rc = 0; GtkWidget *configWindow = NULL; GtkWidget *sendHostListChkBtn = NULL; GtkWidget *obtainHostlistChkBtn = NULL; GtkWidget *configRC2Bit40Btn = NULL; GtkWidget *configRC2Bit128Btn = NULL; GtkWidget *configRC2Bit256Btn = NULL; GtkWidget *configBFBit128Btn = NULL; GtkWidget *configBFBit256Btn = NULL; GtkWidget *configAESBit128Btn = NULL; GtkWidget *configAESBit192Btn = NULL; GtkWidget *configAESBit256Btn = NULL; GtkWidget *configRSABit512Btn = NULL; GtkWidget *configRSABit1024Btn = NULL; GtkWidget *configRSABit2048Btn = NULL; GtkWidget *configMD5Btn = NULL; GtkWidget *configSHA1Btn = NULL; GtkWidget *keySelectAlgoCBtn = NULL; GtkWidget *RSAKeyEncryptionCBtn = NULL; GtkWidget *useLockCBtn = NULL; unsigned long state = 0; configWindow = create_securityConfig(); g_assert(configWindow != NULL); sendHostListChkBtn = lookup_widget(configWindow, "sendHostListChkBtn"); obtainHostlistChkBtn = lookup_widget(configWindow, "obtainHostlistChkBtn"); configRC2Bit40Btn = lookup_widget(configWindow, "configRC2Bit40Btn"); configRC2Bit128Btn = lookup_widget(configWindow, "configRC2Bit128Btn"); configRC2Bit256Btn = lookup_widget(configWindow, "configRC2Bit256Btn"); configBFBit128Btn = lookup_widget(configWindow, "configBFBit128Btn"); configBFBit256Btn = lookup_widget(configWindow, "configBFBit256Btn"); configAESBit128Btn = lookup_widget(configWindow, "configAESBit128Btn"); configAESBit192Btn = lookup_widget(configWindow, "configAESBit192Btn"); configAESBit256Btn = lookup_widget(configWindow, "configAESBit256Btn"); configRSABit512Btn = lookup_widget(configWindow, "configRSABit512Btn"); configRSABit1024Btn = lookup_widget(configWindow, "configRSABit1024Btn"); configRSABit2048Btn = lookup_widget(configWindow, "configRSABit2048Btn"); configMD5Btn = lookup_widget(configWindow, "configMD5Btn"); configSHA1Btn = lookup_widget(configWindow, "configSHA1Btn"); keySelectAlgoCBtn = lookup_widget(configWindow, "keySelectAlgoCBtn"); RSAKeyEncryptionCBtn = lookup_widget(configWindow, "RSAKeyEncryptionCBtn"); useLockCBtn = lookup_widget(configWindow, "useLockCBtn"); rc = hostinfo_refer_ipmsg_cipher(&state); if (rc != 0) state = 0; /* *ホストリスト制御 */ if (hostinfo_refer_ipmsg_is_allow_hlist()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sendHostListChkBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sendHostListChkBtn),FALSE); if (hostinfo_refer_ipmsg_is_get_hlist()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(obtainHostlistChkBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(obtainHostlistChkBtn),FALSE); /* *暗号選択 */ #if defined(USE_OPENSSL) if (state & IPMSG_RC2_40) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit40Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit40Btn),FALSE); if (state & IPMSG_RC2_128) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit128Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit128Btn),FALSE); if (state & IPMSG_RC2_256) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit256Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit256Btn),FALSE); if (state & IPMSG_BLOWFISH_128) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configBFBit128Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configBFBit128Btn),FALSE); if (state & IPMSG_BLOWFISH_256) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configBFBit256Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configBFBit256Btn),FALSE); if (state & IPMSG_AES_128) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit128Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit128Btn),FALSE); if (state & IPMSG_AES_192) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit192Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit192Btn),FALSE); if (state & IPMSG_AES_256) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit256Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit256Btn),FALSE); if (state & IPMSG_RSA_512) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit512Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit512Btn),FALSE); if (state & IPMSG_RSA_1024) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit1024Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit1024Btn),FALSE); if (state & IPMSG_RSA_2048) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit2048Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit2048Btn),FALSE); if (state & IPMSG_SIGN_MD5) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configMD5Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configMD5Btn),FALSE); if (state & IPMSG_SIGN_SHA1) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configSHA1Btn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configSHA1Btn),FALSE); if (hostinfo_refer_ipmsg_crypt_policy_is_speed()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keySelectAlgoCBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keySelectAlgoCBtn),FALSE); if (hostinfo_refer_ipmsg_encrypt_public_key()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RSAKeyEncryptionCBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RSAKeyEncryptionCBtn),FALSE); if (hostinfo_refer_ipmsg_use_lock()) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(useLockCBtn),TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(useLockCBtn),FALSE); #else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit40Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configRC2Bit40Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit128Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configRC2Bit128Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRC2Bit256Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configRC2Bit256Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configBFBit128Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configBFBit128Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configBFBit256Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configBFBit256Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit512Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configRSABit512Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit128Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configAESBit128Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit192Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configAESBit192Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configAESBit256Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configAESBit256Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configBFBit128Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configBFBit128Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit1024Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configRSABit1024Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configRSABit2048Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configRSABit2048Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configMD5Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configMD5Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(configSHA1Btn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(configSHA1Btn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(keySelectAlgoCBtn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(keySelectAlgoCBtn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(RSAKeyEncryptionCBtn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(RSAKeyEncryptionCBtn), FALSE); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(useLockCBtn),FALSE); gtk_widget_set_sensitive(GTK_WIDGET(useLockCBtn), FALSE); #endif /* USE_OPENSSL */ update_rsa_encryption_button_state(GTK_TOGGLE_BUTTON(RSAKeyEncryptionCBtn)); update_lockkey_button_state(GTK_TOGGLE_BUTTON(useLockCBtn)); return configWindow; } int apply_crypt_config_window(GtkWindow *configWindow){ int rc = 0; GtkWidget *sendHostListChkBtn = NULL; GtkWidget *obtainHostlistChkBtn = NULL; GtkWidget *configRC2Bit40Btn = NULL; GtkWidget *configRC2Bit128Btn = NULL; GtkWidget *configRC2Bit256Btn = NULL; GtkWidget *configBFBit128Btn = NULL; GtkWidget *configBFBit256Btn = NULL; GtkWidget *configAESBit128Btn = NULL; GtkWidget *configAESBit192Btn = NULL; GtkWidget *configAESBit256Btn = NULL; GtkWidget *configRSABit512Btn = NULL; GtkWidget *configRSABit1024Btn = NULL; GtkWidget *configRSABit2048Btn = NULL; GtkWidget *configMD5Btn = NULL; GtkWidget *configSHA1Btn = NULL; GtkWidget *keySelectAlgoCBtn = NULL; GtkWidget *RSAKeyEncryptionCBtn = NULL; GtkWidget *useLockCBtn = NULL; const char *configured_encoded_passwd = NULL; unsigned long state = 0; if (configWindow == NULL) return -EINVAL; sendHostListChkBtn = lookup_widget(GTK_WIDGET(configWindow), "sendHostListChkBtn"); obtainHostlistChkBtn = lookup_widget(GTK_WIDGET(configWindow), "obtainHostlistChkBtn"); configRC2Bit40Btn = lookup_widget(GTK_WIDGET(configWindow),"configRC2Bit40Btn"); configRC2Bit128Btn = lookup_widget(GTK_WIDGET(configWindow), "configRC2Bit128Btn"); configRC2Bit256Btn = lookup_widget(GTK_WIDGET(configWindow), "configRC2Bit256Btn"); configBFBit128Btn = lookup_widget(GTK_WIDGET(configWindow), "configBFBit128Btn"); configBFBit256Btn = lookup_widget(GTK_WIDGET(configWindow), "configBFBit256Btn"); configAESBit128Btn = lookup_widget(GTK_WIDGET(configWindow),"configAESBit128Btn"); configAESBit192Btn = lookup_widget(GTK_WIDGET(configWindow), "configAESBit192Btn"); configAESBit256Btn = lookup_widget(GTK_WIDGET(configWindow), "configAESBit256Btn"); configRSABit512Btn = lookup_widget(GTK_WIDGET(configWindow), "configRSABit512Btn"); configRSABit1024Btn = lookup_widget(GTK_WIDGET(configWindow), "configRSABit1024Btn"); configRSABit2048Btn = lookup_widget(GTK_WIDGET(configWindow), "configRSABit2048Btn"); configMD5Btn = lookup_widget(GTK_WIDGET(configWindow), "configMD5Btn"); configSHA1Btn = lookup_widget(GTK_WIDGET(configWindow), "configSHA1Btn"); keySelectAlgoCBtn = lookup_widget(GTK_WIDGET(configWindow), "keySelectAlgoCBtn"); RSAKeyEncryptionCBtn = lookup_widget(GTK_WIDGET(configWindow), "RSAKeyEncryptionCBtn"); useLockCBtn = lookup_widget(GTK_WIDGET(configWindow), "useLockCBtn"); /* *ホストリスト制御 */ hostinfo_set_ipmsg_is_allow_hlist(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sendHostListChkBtn))); hostinfo_set_ipmsg_is_get_hlist(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(obtainHostlistChkBtn))); /* *暗号選択 */ #if defined(USE_OPENSSL) /* * 共通鍵 */ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configRC2Bit40Btn))) state |= IPMSG_RC2_40; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configRC2Bit128Btn))) state |= IPMSG_RC2_128; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configRC2Bit256Btn))) state |= IPMSG_RC2_256; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configBFBit128Btn))) state |= IPMSG_BLOWFISH_128; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configBFBit256Btn))) state |= IPMSG_BLOWFISH_256; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configAESBit128Btn))) state |= IPMSG_AES_128; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configAESBit192Btn))) state |= IPMSG_AES_192; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configAESBit256Btn))) state |= IPMSG_AES_256; /* * RSA */ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configRSABit512Btn))) state |= IPMSG_RSA_512; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configRSABit1024Btn))) state |= IPMSG_RSA_1024; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configRSABit2048Btn))) state |= IPMSG_RSA_2048; /* * 署名 */ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configMD5Btn))) state |= IPMSG_SIGN_MD5; if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(configSHA1Btn))) state |= IPMSG_SIGN_SHA1; /* * セキュリティ設定 */ hostinfo_set_ipmsg_crypt_policy_as_speed(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(keySelectAlgoCBtn))); configured_encoded_passwd = hostinfo_refer_encryption_key_password(); if ( (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(RSAKeyEncryptionCBtn))) && (pbkdf2_encoded_passwd_configured(configured_encoded_passwd) == 0) ) { hostinfo_set_ipmsg_encrypt_public_key(TRUE); } else { hostinfo_set_ipmsg_encrypt_public_key(FALSE); } hostinfo_set_ipmsg_use_lock(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(useLockCBtn))); #else /* * 暗号鍵 */ state &= ~SYM_CAPS; /* * RSA */ state &= ~RSA_CAPS; /* * 署名 */ state &= ~SIGN_CAPS; /* * セキュリティ設定 */ hostinfo_set_ipmsg_crypt_policy_as_speed(FALSE); hostinfo_set_ipmsg_encrypt_public_key(FALSE); hostinfo_set_ipmsg_use_lock(FALSE); #endif /* USE_OPENSSL */ hostinfo_set_ipmsg_cipher(state); /* 鍵情報登録 */ return 0; } g2ipmsg-0.9.6+dfsg/src/uicommon.h000066400000000000000000000077771126724573600166420ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef UI_COMMON_H #define UI_COMMON_H #include #define USER_VIEW_NICKNAME_ID (0) #define USER_VIEW_GROUP_ID (1) #define USER_VIEW_HOST_ID (2) #define USER_VIEW_IPADDR_ID (3) #define USER_VIEW_LOGON_ID (4) #define USER_VIEW_PRIO_ID (5) #define MAX_VIEW_ID (6) #define UICOMMON_DIALOG_DELIM ":" #define ipmsg_err_dialog(fmt,arg...) do{ \ error_message_dialog(FALSE, __FILE__,__FUNCTION__,__LINE__, fmt, ##arg); \ }while(0) #define ipmsg_err_dialog_mordal(fmt,arg...) do{ \ error_message_dialog(TRUE, __FILE__,__FUNCTION__,__LINE__, fmt, ##arg); \ }while(0) void recv_message_window(const msg_data_t *msg,const char *senderAddr); void store_message_window(const msg_data_t *msg,const char *senderAddr); void read_message_dialog(const gchar *user,const gchar *ipaddr, long time); void error_message_dialog(gboolean is_mordal, const char *filename, const char *funcname, const int line, const char* format, ...); int password_setting_window(int type); int password_confirm_window(int type, gchar **passphrase_p); gboolean recv_windows_are_stored(void); void show_stored_windows(void); int start_message_watcher(GtkWidget *init_win); int cleanup_message_watcher(void); void update_one_group_entry(gpointer data,GtkComboBox *user_data); int append_opened_window(GtkWindow *window); int destroy_all_opened_windows(void); int remove_window_from_openlist(GtkWidget *window); int append_displayed_window(GtkWindow *window); int remove_window_from_displaylist(GtkWidget *window); void present_all_displayed_windows(void); void ipmsg_show_about_dialog(void); gboolean on_init_win_event_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data); void update_download_view(GtkWidget *window); void update_download_monitor_button(GtkTreeSelection *sel); void ipmsg_update_ui_user_list(void); void update_user_entry(GList *top,GtkWidget *view,gboolean is_force) ; void ipmsg_update_ui(void); void userview_set_view_priority(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, int prio); void userview_set_view_priority_without_update(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, int prio); int remind_headers_state(GtkWidget *window); void on_usermenu_group_item (gpointer data); int info_message_window(const gchar *user,const gchar *ipaddr, unsigned long command,const char *message); void update_rsa_encryption_button_state(GtkToggleButton *togglebutton); void update_lockkey_button_state(GtkToggleButton *togglebutton); int apply_crypt_config_window(GtkWindow *window); void ipmsg_wait_ms(const int wait_ms); #endif /* UI_COMMON_H */ g2ipmsg-0.9.6+dfsg/src/userdb.c000066400000000000000000001074571126724573600162670ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" static GList *users=NULL; static GList *waiter_windows=NULL; GStaticMutex userdb_mutex = G_STATIC_MUTEX_INIT; GStaticMutex win_mutex = G_STATIC_MUTEX_INIT; static gint userdb_find_by_ipaddr(gconstpointer a,gconstpointer b) { int rc=-EINVAL; userdb_t *user_a,*user_b; if ( (!a) || (!b) ) goto out; user_a=(userdb_t *)a; user_b=(userdb_t *)b; if (!strcmp(user_a->ipaddr,user_b->ipaddr)) return 0; rc=-ESRCH; out: return rc; /* Not found */ } static void print_one_user_entry(gpointer data,gpointer user_data) { userdb_t *current_user; unsigned long skey,akey,sign; if (!data) return; current_user=(userdb_t *)data; dbg_out("NickName: %s\n",current_user->nickname); dbg_out("Group: %s\n",current_user->group); dbg_out("User: %s\n",current_user->user); dbg_out("Host: %s\n",current_user->host); dbg_out("IP Addr: %s (%s) \n",current_user->ipaddr, (current_user->pf == PF_INET) ? "IPV4" : "IPV6"); dbg_out("Capability: %x\n",(unsigned int)current_user->cap); if (current_user->cap & IPMSG_DIALUPOPT) dbg_out("\t Dialup host\n"); if (current_user->cap & IPMSG_FILEATTACHOPT) dbg_out("\t File Attach\n"); if (current_user->cap & IPMSG_ENCRYPTOPT) dbg_out("\t Encryption\n"); if (current_user->cap & IPMSG_UTF8OPT) dbg_out("\t UTF-8\n"); if (current_user->cap & IPMSG_ENCRYPTOPT) { #if defined(USE_OPENSSL) dbg_out("\t Crypt capability\n"); if (current_user->crypt_cap) { if (current_user->crypt_cap) { skey=get_symkey_part(current_user->crypt_cap); if (skey & IPMSG_RC2_40) dbg_out("\t RC2 40 bits\n"); if (skey & IPMSG_RC2_128) dbg_out("\t RC2 128 bits\n"); if (skey & IPMSG_RC2_256) dbg_out("\t RC2 256 bits\n"); if (skey & IPMSG_BLOWFISH_128) dbg_out("\t Blowfish 128 bits\n"); if (skey & IPMSG_BLOWFISH_256) dbg_out("\t Blowfish 256 bits\n"); if (skey & IPMSG_AES_128) dbg_out("\t AES 128 bits\n"); if (skey & IPMSG_AES_192) dbg_out("\t AES 192 bits\n"); if (skey & IPMSG_AES_256) dbg_out("\t AES 256 bits\n"); akey=get_asymkey_part(current_user->crypt_cap); if (akey & IPMSG_RSA_512) dbg_out("\t RSA 512 bits\n"); if (akey & IPMSG_RSA_1024) dbg_out("\t RSA 1024 bits\n"); if (akey & IPMSG_RSA_2048) dbg_out("\t RSA 2048 bits\n"); g_assert(current_user->pub_key_e); g_assert(current_user->pub_key_n); dbg_out("\tPublic key:\n"); dbg_out("\te=%s\n",current_user->pub_key_e); dbg_out("\tn=%s\n",current_user->pub_key_n); sign=get_sign_part(current_user->crypt_cap); if (sign) { if (sign&IPMSG_SIGN_MD5) dbg_out("\t handle MD5 sign\n"); if (sign&IPMSG_SIGN_SHA1) dbg_out("\t handle SHA1 sign\n"); }else{ dbg_out("\t No sign\n"); } } }else{ dbg_out("\t\t Unknown\n"); } #else dbg_out("\t\t Unknown\n"); #endif } return; } static int alloc_user_info(userdb_t **entry){ userdb_t *new_user; if (!entry) return -EINVAL; new_user=g_slice_new(userdb_t); if (!new_user) return -ENOMEM; memset(new_user,0,sizeof(userdb_t)); *entry=new_user; return 0; } static int destroy_user_info_contents(userdb_t *entry){ if (!entry) return -EINVAL; if (entry->user) g_free(entry->user); if (entry->host) g_free(entry->host); if (entry->group) g_free(entry->group); if (entry->nickname) g_free(entry->nickname); if (entry->ipaddr) g_free(entry->ipaddr); if (entry->pub_key_e) g_free(entry->pub_key_e); if (entry->pub_key_n) g_free(entry->pub_key_n); memset(entry,0,sizeof(userdb_t)); return 0; } static void do_notify_change(gpointer data,gpointer user_data) { GtkWidget *window; if (!data) return; window=GTK_WIDGET(data); update_users_on_message_window(window,FALSE); return; } static int notify_userdb_changed(void){ g_static_mutex_lock(&win_mutex); g_list_foreach(waiter_windows, do_notify_change, NULL); g_static_mutex_unlock(&win_mutex); } #define strdup_with_check(dest,src,member,err_label) \ ((dest)->member)=g_strdup((src)->member); \ if (!((dest)->member)) \ goto err_label ; static int copy_user_info(userdb_t *dest,userdb_t *src) { int rc=-ENOMEM; if ( (!dest) || (!src) ) return -EINVAL; g_assert(!(dest->user)); g_assert(!(dest->host)); g_assert(!(dest->group)); g_assert(!(dest->nickname)); g_assert(!(dest->ipaddr)); g_assert(!(dest->pub_key_e)); g_assert(!(dest->pub_key_n)); dest->prio=src->prio; dest->cap=src->cap; dest->crypt_cap=src->crypt_cap; dest->pf = src->pf; /* 下記はマクロであることに注意 */ strdup_with_check(dest,src,user,error_out) strdup_with_check(dest,src,host,error_out) strdup_with_check(dest,src,group,error_out) strdup_with_check(dest,src,nickname,error_out) strdup_with_check(dest,src,ipaddr,error_out) if (src->pub_key_e) { strdup_with_check(dest,src,pub_key_e,error_out) } if (src->pub_key_n) { strdup_with_check(dest,src,pub_key_n,error_out) } return 0; error_out: destroy_user_info_contents(dest); return rc; } static int fill_user_info_with_message(const udp_con_t *con, const msg_data_t *msg, userdb_t *new_user){ int rc; int default_prio; const char *peer_addr; if ( (!new_user) || (!msg) ) return -EINVAL; memset(new_user,0,sizeof(userdb_t)); peer_addr = udp_get_peeraddr(con); rc=-ENOMEM; convert_string_internal(refer_user_name_from_msg(msg),(const gchar **)&(new_user->user)); if (new_user->user == NULL) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), peer_addr); goto memclear_out; } convert_string_internal(refer_host_name_from_msg(msg),(const gchar **)&(new_user->host)); if (new_user->host == NULL) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), peer_addr); goto free_user_out; } convert_string_internal(refer_group_name_from_msg(msg),(const gchar **)&(new_user->group)); if (new_user->group == NULL) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), peer_addr); goto free_host_out; } convert_string_internal(refer_nick_name_from_msg(msg),(const gchar **)&(new_user->nickname)); if (new_user->nickname == NULL) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), peer_addr); goto free_group_out; } convert_string_internal(peer_addr,(const gchar **)&(new_user->ipaddr)); if (new_user->ipaddr == NULL) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), peer_addr); goto free_nickname_out; } rc=hostinfo_get_ipmsg_ipaddr_prio(new_user->ipaddr,&default_prio); if (rc<0) default_prio=0; new_user->cap=msg->command_opts; new_user->prio=default_prio; new_user->pf = con->family; dbg_out("Fill: %s %s %s %s %d %x\n", new_user->user, new_user->host, new_user->group, new_user->ipaddr, new_user->prio, (unsigned int)new_user->cap); return 0; free_ipaddr_out: g_free(new_user->ipaddr); free_nickname_out: g_free(new_user->nickname); free_group_out: g_free(new_user->group); free_host_out: g_free(new_user->host); free_user_out: g_free(new_user->user); memclear_out: memset(new_user,0,sizeof(userdb_t)); return rc; } static int add_with_userdb_entry(userdb_t *new_user){ int rc; GList *new_entry; GList *current_entry=NULL; if (!new_user) return -EINVAL; dbg_out("Add: %s %s %s %s %x\n", new_user->user, new_user->host, new_user->group, new_user->ipaddr, (unsigned int)new_user->cap); g_static_mutex_lock(&userdb_mutex); current_entry=g_list_find_custom (users,new_user,userdb_find_by_ipaddr); if (!current_entry){ users=g_list_append(users,new_user); } else { rc=-EEXIST; goto error_out; } /* * 健全性チェック */ new_entry=g_list_find_custom(users,new_user,userdb_find_by_ipaddr); g_assert(new_entry); g_assert(new_entry->data == new_user); g_static_mutex_unlock(&userdb_mutex); notify_userdb_changed(); return 0; error_out: g_static_mutex_unlock(&userdb_mutex); destroy_user_info(new_user); return rc; } /* *start:length:ユーザ名:ホスト名:コマンド番号:IP アドレス: *ポート番号(リトルエンディアン):ニックネーム:グループ名 */ static int userdb_add_hostlist_entry(const udp_con_t *con, userdb_t *entry,const char **entry_string_p, int *is_last){ int rc; char *buffer=NULL; char *sp,*ep; long remains; int intval; size_t len; char *user=NULL; char *host=NULL; char *ipaddr=NULL; int port; char *nickname=NULL; char *group=NULL; const char *entry_string; if ( (!entry) || (!entry_string_p) || (!is_last) ) return -EINVAL; entry_string=*entry_string_p; rc=-ENOMEM; buffer=g_strdup(entry_string); if (!buffer) goto free_buffer_out; rc=-ENOENT; *is_last=1; len=strlen(buffer); remains=len; dbg_out("Buffer:%s\n",buffer); /* * username */ sp=buffer; ep=memchr(sp, HOSTLIST_SEPARATOR, remains); if (!ep) goto free_buffer_out; remains =len - ((unsigned long)ep-(unsigned long)sp); if (remains<0) goto free_buffer_out; *ep='\0'; user=g_strdup(make_entry_canonical(sp)); if (!user) goto free_buffer_out; ++ep; sp=ep; dbg_out("user:%s\n",user); /* * host */ ep=memchr(sp, HOSTLIST_SEPARATOR, remains); if (!ep) goto free_user_out; remains =len - ((unsigned long)ep-(unsigned long)sp); if (remains<0) goto free_user_out; *ep='\0'; host=g_strdup(make_entry_canonical(sp)); if (!host) goto free_user_out; ++ep; sp=ep; dbg_out("host:%s\n",host); /* * skip command */ ep=memchr(sp, HOSTLIST_SEPARATOR , remains); if (!ep) goto free_host_out; remains =len - ((unsigned long)ep-(unsigned long)sp); if (remains<0) goto free_host_out; *ep='\0'; ++ep; sp=ep; /* * ipaddr */ ep=memchr(sp, HOSTLIST_SEPARATOR, remains); if (!ep) goto free_host_out; remains =len - ((unsigned long)ep-(unsigned long)sp); if (remains<0) goto free_host_out; *ep='\0'; ipaddr=g_strdup(make_entry_canonical(sp)); if (!ipaddr) goto free_host_out; ++ep; sp=ep; dbg_out("ipaddr:%s\n",ipaddr); /* * port */ ep=memchr(sp, HOSTLIST_SEPARATOR , remains); if (!ep) goto free_ipaddr_out; remains =len - ((unsigned long)ep-(unsigned long)sp); if (remains<0) goto free_ipaddr_out; *ep='\0'; intval=strtol(sp, (char **)NULL, 10); ++ep; sp=ep; dbg_out("port:%d\n",intval); /* * nick name */ ep=memchr(sp, HOSTLIST_SEPARATOR , remains); if (!ep) goto free_ipaddr_out; remains =len - ((unsigned long)ep-(unsigned long)sp); if (remains<0) goto free_ipaddr_out; *ep='\0'; nickname=g_strdup(make_entry_canonical(sp)); if (!nickname) goto free_ipaddr_out; ++ep; sp=ep; dbg_out("nickname:%s\n",nickname); /* * group */ ep=memchr(sp, HOSTLIST_SEPARATOR , remains); if (!ep) { ep=memchr(sp, '\0' , remains); if (!ep) goto free_nickname_out; }else{ *is_last=0; } remains =len - ((unsigned long)ep-(unsigned long)sp); if (remains<0) goto free_nickname_out; *ep='\0'; group=g_strdup(make_entry_canonical(sp)); if (!nickname) goto free_nickname_out; ++ep; dbg_out("group:%s\n",group); entry->user=user; entry->host=host; entry->group=group; entry->nickname=nickname; entry->ipaddr=ipaddr; entry->cap=IPMSG_DIALUPOPT; /* ダイアルアップとみなす */ entry->pf = con->family; dbg_out("OK entry:\nuser : %s\nhost :%s\ngroup : %s\nnickname : %s\nipaddr : %s\n", entry->user=user, entry->host=host, entry->group=group, entry->nickname=nickname, entry->ipaddr=ipaddr); rc=add_with_userdb_entry(entry); if (rc == 0) { /* 鍵情報獲得要求を発行する */ ipmsg_send_getpubkey(con, ipaddr); } *entry_string_p += (ep - buffer); dbg_out("Return: %s (%d)\n",*entry_string_p,rc); if (buffer) g_free(buffer); return rc; free_group_out: if (group) g_free(group); free_nickname_out: if (nickname) g_free(nickname); free_ipaddr_out: if (ipaddr) g_free(ipaddr); free_host_out: if (host) g_free(host); free_user_out: if (user) g_free(user); free_buffer_out: if (buffer) g_free(buffer); return rc; } static int hostlist_userinfo_add_with_answer(const udp_con_t *con, const char *message,int *next_count){ int rc; int start,end; char *string; char *sp,*ep; long remains; int intval; size_t len; userdb_t *entry=NULL; size_t this_count; size_t remain_count; int is_last=0; if ( (!message) || (!next_count) ) return -EINVAL; string=g_strdup(message); if (!string) return -ENOMEM; rc=-ENOENT; len=strlen(message); remains=len; this_count=0; *next_count=0; /* * start */ sp=string; ep=memchr(sp, HOSTLIST_SEPARATOR, remains); if (!ep) goto free_string_out; remains =len - ((unsigned long)ep-(unsigned long)sp); *ep='\0'; start=strtol(sp, (char **)NULL, 10); if (start<0) goto free_string_out; ++ep; dbg_out("Start:%d\n",start); /* * total */ sp=ep; ep=memchr(sp, HOSTLIST_SEPARATOR, remains); if (!ep) goto free_string_out; remains =len - ((unsigned long)ep-(unsigned long)sp); *ep='\0'; end=strtol(sp, (char **)NULL, 10); if (end<0) goto free_string_out; ++ep; dbg_out("End:%d\n",end); if (end0) ){ dbg_out("Add %d th entry:%s\n",this_count+1,sp); rc=alloc_user_info(&entry); if (rc) goto free_string_out; rc=userdb_add_hostlist_entry(con, entry,(const char **)&sp,&is_last); if ( (rc) && (rc != -EEXIST) ) goto free_string_out; /* エントリ不正時は追加処理側で開放する */ ++this_count; remains =len - ((unsigned long)ep-(unsigned long)sp); } free_string_out: g_free(string); if ( (this_count == 0) || (end < (this_count + start)) ) *next_count=0; else *next_count=(start + this_count); dbg_out("Next count:%d (this,start,total)=(%d,%d,%d)\n", *next_count, this_count, start, end); return rc; } static int internal_refer_user_by_addr(const char *ipaddr,const userdb_t **entry_ref){ int rc=-ESRCH; userdb_t srch_user; GList *found; if ( (!ipaddr) || (!entry_ref) ) return -EINVAL; memset(&srch_user,0,sizeof(userdb_t)); srch_user.ipaddr=(char *)ipaddr; found=g_list_find_custom (users,&srch_user,userdb_find_by_ipaddr); if (found) { g_assert(found->data); rc=0; *entry_ref=found->data; } return rc; } int destroy_user_info(userdb_t *entry){ int rc; if (!entry) return -EINVAL; rc=destroy_user_info_contents(entry); if (rc) return rc; memset(entry,0,sizeof(userdb_t)); dbg_out("Free: %x\n",(unsigned int)entry); g_slice_free(userdb_t,entry); return 0; } int userdb_hostlist_answer_add(const udp_con_t *con,const msg_data_t *msg){ int next_count=0; int rc; gchar *internal_string=NULL; if ( (!con) || (!msg) ) return -EINVAL; if (!(msg->message)) return -EINVAL; dbg_out("Here\n"); rc=convert_string_internal(msg->message,(const gchar **)&internal_string); if (rc < 0) { ipmsg_err_dialog(_("Can not convert message from %s into ineternal representation"), udp_get_peeraddr(con)); return rc; } next_count=0; rc=hostlist_userinfo_add_with_answer(con, internal_string, &next_count); if ( (rc<0) && (rc != -EEXIST) ) goto free_string_out; if (next_count) { dbg_out("Send next:%d\n",next_count); rc=ipmsg_send_get_list(udp_con,udp_get_peeraddr(con),next_count); } if (rc<0) goto free_string_out; free_string_out: if (internal_string) g_free(internal_string); error_out: return rc; } static gint userdb_sort_with_view_config(gconstpointer data_a, gconstpointer data_b, gpointer user_data){ userdb_t *user_a=(userdb_t *)data_a; userdb_t *user_b=(userdb_t *)data_b; gint rc; g_assert(user_a); g_assert(user_b); if (user_b->prio != user_a->prio) return (user_b->prio - user_a->prio); if ( (hostinfo_refer_ipmsg_is_sort_with_group()) && ( (user_a->group) && (user_b->group) ) ) { rc=strcmp(user_a->group,user_b->group); if (rc) { if (hostinfo_refer_ipmsg_group_sort_order()) return rc; else return -rc; } } rc=0; switch(hostinfo_refer_ipmsg_sub_sort_id()) { default: case SORT_TYPE_USER: if ((user_a->user) && (user_b->user)) rc=strcmp(user_a->user,user_b->user); break; case SORT_TYPE_IPADDR: if ((user_a->ipaddr) && (user_b->ipaddr)) rc=strcmp(user_a->ipaddr,user_b->ipaddr); break; case SORT_TYPE_MACHINE: if ((user_a->host) && (user_b->host)) rc=strcmp(user_a->host,user_b->host); break; } if (!hostinfo_refer_ipmsg_sub_sort_order()) return -rc; return rc; } int update_users_on_message_window(GtkWidget *window,gboolean is_force){ GtkWidget *view; GList *current_users; g_assert(window); view=lookup_widget(window,"messageUserTree"); g_assert(view); dbg_out("Notify userdb change :%x\n",(unsigned int)window); g_static_mutex_lock(&userdb_mutex); current_users=g_list_copy(refer_user_list()); if (current_users) { current_users=g_list_sort(current_users,(GCompareFunc)userdb_sort_with_view_config); update_user_entry(current_users,view,is_force); g_list_free(current_users); }else{ current_users=refer_user_list(); update_user_entry(current_users,view,is_force); } g_static_mutex_unlock(&userdb_mutex); } int userdb_search_user_by_addr(const char *ipaddr,const userdb_t **entry_ref){ int rc=-ESRCH; userdb_t srch_user; userdb_t *user_p=NULL; userdb_t *new_user; if ( (!ipaddr) || (!entry_ref) ) return -EINVAL; memset(&srch_user,0,sizeof(userdb_t)); srch_user.ipaddr=(char *)ipaddr; g_static_mutex_lock(&userdb_mutex); rc=alloc_user_info(&new_user); if (rc<0) goto unlock_out; rc=internal_refer_user_by_addr(ipaddr,(const userdb_t **)&user_p); if (rc<0){ destroy_user_info(new_user); goto unlock_out; } rc=copy_user_info(new_user,user_p); if (rc<0) { destroy_user_info(new_user); goto unlock_out; } rc=0; *entry_ref=new_user; unlock_out: g_static_mutex_unlock(&userdb_mutex); return rc; } void userdb_print_user_list(void){ g_list_foreach(users, print_one_user_entry, NULL); } static gint userdb_find_group(gconstpointer a,gconstpointer b) { int rc=-EINVAL; if ( (!a) || (!b) ) return -EINVAL; dbg_out("Pointer:0x%x 0x%x\n",a,b); return strcmp((char *)a,(char *)b); } GList * get_group_list(void){ GList *ret=NULL; GList *found; GList *node; userdb_t *ref; gchar *string; g_static_mutex_lock(&userdb_mutex); for(node=g_list_first(users);node;node=g_list_next(node)) { ref=node->data; found=g_list_find_custom (ret,ref->group,userdb_find_group); if (found) continue; string=g_strdup(ref->group); if (string) ret=g_list_append(ret,string); } g_static_mutex_unlock(&userdb_mutex); return ret; } void userdb_update_group_list(GtkComboBox *widget){ if (!widget) return; g_list_foreach(users, (GFunc)update_one_group_entry, widget); } GList * refer_user_list(void) { return users; } int userdb_add_user(const udp_con_t *con,const msg_data_t *msg){ int rc=0; userdb_t *new_user; if ( (!con) || (!msg) ) return -EINVAL; if (alloc_user_info(&new_user)) return -ENOMEM; rc=fill_user_info_with_message(con, msg, new_user); if (rc<0) { destroy_user_info(new_user); return rc; } rc=add_with_userdb_entry(new_user); return rc; } int userdb_update_user(const udp_con_t *con,const msg_data_t *msg){ userdb_t new_user; userdb_t *old_user; userdb_t backup_user; GList *update_entry; GList *new_entry; int rc; if ( (!con) || (!msg) ) return -EINVAL; memset(&new_user,0,sizeof(userdb_t)); rc=fill_user_info_with_message(con, msg, &new_user); if (rc<0) { return rc; } g_static_mutex_lock(&userdb_mutex); update_entry=g_list_find_custom(users,&new_user,userdb_find_by_ipaddr); if (!update_entry) { g_static_mutex_unlock(&userdb_mutex); destroy_user_info_contents(&new_user); return -ENOMEM; } else { /* * 旧来の情報を削除して新しい情報で更新 */ old_user=update_entry->data; memset(&backup_user,0,sizeof(userdb_t)); rc=copy_user_info(&backup_user,old_user); if (rc<0) { destroy_user_info_contents(old_user); goto fill_error_out; } destroy_user_info_contents(old_user); rc=fill_user_info_with_message(con, msg, old_user); if (rc<0) goto fill_error_out; old_user->prio=backup_user.prio; destroy_user_info_contents(&backup_user); goto ok_out; fill_error_out: destroy_user_info_contents(&backup_user); destroy_user_info(old_user); users=g_list_remove_link(users,update_entry); g_list_free(update_entry); g_static_mutex_unlock(&userdb_mutex); return rc; } ok_out: /* * 健全性チェック */ new_entry=g_list_find_custom(users,&new_user,userdb_find_by_ipaddr); g_assert(new_entry); g_assert(new_entry->data == old_user); destroy_user_info_contents(&new_user); g_static_mutex_unlock(&userdb_mutex); notify_userdb_changed(); return 0; } int userdb_replace_prio_by_addr(const char *ipaddr,int prio,gboolean need_notify){ int rc=-ESRCH; userdb_t srch_user; userdb_t *user_p=NULL; if (!ipaddr) return -EINVAL; dbg_out("Here: ipaddr:%s prio:%d\n",ipaddr,prio); memset(&srch_user,0,sizeof(userdb_t)); srch_user.ipaddr=(char *)ipaddr; g_static_mutex_lock(&userdb_mutex); rc=internal_refer_user_by_addr(ipaddr,(const userdb_t **)&user_p); if (rc<0) goto unlock_out; user_p->prio=prio; rc=hostinfo_update_ipmsg_ipaddr_prio(ipaddr,prio); unlock_out: g_static_mutex_unlock(&userdb_mutex); if (need_notify) notify_userdb_changed(); return rc; } void update_all_user_list_view(void){ notify_userdb_changed(); } int userdb_del_user(const udp_con_t *con,const msg_data_t *msg){ GList *del_entry; userdb_t del_user; userdb_t *del_user_p; int rc; if ( (!con) || (!msg) ) return -EINVAL; memset(&del_user,0,sizeof(userdb_t)); del_user.ipaddr = g_strdup(udp_get_peeraddr(con)); if (del_user.ipaddr == NULL) { goto error_out; } rc = convert_string_internal(refer_user_name_from_msg(msg), (const gchar **)&(del_user.user)); rc = convert_string_internal(refer_host_name_from_msg(msg), (const gchar **)&(del_user.host)); dbg_out("del user start\n"); g_static_mutex_lock(&userdb_mutex); del_entry=g_list_find_custom(users,&del_user,userdb_find_by_ipaddr); if (!del_entry) { rc=-ESRCH; dbg_out("No such entry:%s@%s\n",del_user.user,del_user.ipaddr); g_static_mutex_unlock(&userdb_mutex); goto free_out; } del_user_p=del_entry->data; dbg_out("Free: %x\n",(unsigned int)del_user_p); destroy_user_info(del_user_p); users=g_list_remove_link(users,del_entry); g_list_free(del_entry); g_static_mutex_unlock(&userdb_mutex); notify_userdb_changed(); rc=0; free_out: dbg_out("del user end\n"); g_free(del_user.ipaddr); free_user_out: g_free(del_user.user); error_out: return rc; } int userdb_get_hostlist_string(int start, int *length, const char **ret_string) { int index; unsigned int last; unsigned int total; int rc; GList *node; size_t str_size=0; size_t len=0; userdb_t *data; char tmp_buff[IPMSG_BUFSIZ]; unsigned long command; char *string; size_t remain_len; int count; int start_no; rc=-EINVAL; if ( (start<0) || (!length) || ((*length) < 0) || (!ret_string) ) return rc; g_static_mutex_lock(&userdb_mutex); last=start + (*length); total=g_list_length(users); rc=-ENOENT; if (!total) goto unlock_out; --total; if ( total < (last) ) last=total; memset(tmp_buff,0,IPMSG_BUFSIZ); snprintf(tmp_buff,IPMSG_BUFSIZ-1,"%5d%c%5d%c",start,HOSTLIST_SEPARATOR,total,HOSTLIST_SEPARATOR); str_size=strlen(tmp_buff)+1; /* *start:length:ユーザ名:ホスト名:コマンド番号:IP アドレス: *ポート番号(リトルエンディアン):ニックネーム:グループ名 */ /* length チェック */ for(index=start,count=0; ( (data=(userdb_t *)g_list_nth_data(users,index)) && (index<=last) ); ++index){ memset(tmp_buff,0,IPMSG_BUFSIZ); snprintf(tmp_buff,IPMSG_BUFSIZ-1,"%s%c%s%c%d%c%s%c%d%c%s%c%s%c", (data->user)?(data->user):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR, (data->host)?(data->host):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR, IPMSG_ANSLIST, HOSTLIST_SEPARATOR, (data->ipaddr)?(data->ipaddr):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR, hostinfo_refer_ipmsg_port(), HOSTLIST_SEPARATOR, (data->nickname)?(data->nickname):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR, (data->group)?(data->group):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR); len=strlen(tmp_buff); if ( (len + str_size) > (_MSG_BUF_MIN_SIZE / 2) ) { last=index; } str_size += len+1; ++count; } rc = -ENOMEM; string = g_malloc(str_size+1); if (!string) goto unlock_out; /* * 作成 */ memset(string,0,str_size+1); if (count) --count; start_no=((start+count)==total)?(0):start+count; /* 0は終端を示す */ snprintf(string,IPMSG_BUFSIZ-1,"%5d%c%5d%c",start_no,HOSTLIST_SEPARATOR,total,HOSTLIST_SEPARATOR); dbg_out("Create from %d to %d\n",start,last); for(index=start,remain_len=(str_size-strlen(string)); index<=last; ++index){ data=(userdb_t *)g_list_nth_data(users,index); memset(tmp_buff,0,IPMSG_BUFSIZ); snprintf(tmp_buff,IPMSG_BUFSIZ-1,"%s%c%s%c%d%c%s%c%d%c%s%c%s%c", (data->user)?(data->user):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR, (data->host)?(data->host):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR, IPMSG_ANSLIST, HOSTLIST_SEPARATOR, (data->ipaddr)?(data->ipaddr):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR, hostinfo_refer_ipmsg_port(), HOSTLIST_SEPARATOR, (data->nickname)?(data->nickname):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR, (data->group)?(data->group):(HOSTLIST_DUMMY), HOSTLIST_SEPARATOR); len=strlen(tmp_buff); g_assert(len<=(remain_len-1)); dbg_out("%d th :%s\n",index,tmp_buff); strncat(string,tmp_buff,remain_len); remain_len -= len; } len=strlen(string); if (string[len-1]==HOSTLIST_SEPARATOR) string[len-1]='\0'; dbg_out("String:%s\n",string); rc=0; *length=last-start; *ret_string=string; unlock_out: g_static_mutex_unlock(&userdb_mutex); return rc; } int userdb_invalidate_userdb(void){ GList *node; userdb_t *del_user; GList *new_list=NULL; dbg_out("Here\n"); g_static_mutex_lock(&userdb_mutex); for(node=g_list_first(users);node;node=g_list_next (node)) { g_assert(node->data); del_user=(userdb_t *)node->data; /* Dial Up hostは残留組となる * (可達確認がブロードキャストでできないので) */ if ( del_user->cap & IPMSG_DIALUPOPT) new_list=g_list_append(new_list,del_user); else destroy_user_info(del_user); } g_list_free (users); users=new_list; g_static_mutex_unlock(&userdb_mutex); return 0; } int userdb_send_broad_cast(const udp_con_t *con,const char *msg,size_t len) { GList *node; userdb_t *the_user; dbg_out("Here\n"); g_static_mutex_lock(&userdb_mutex); for(node=g_list_first(users);node;node=g_list_next (node)) { g_assert(node->data); the_user=(userdb_t *)node->data; dbg_out("Check host:%s\n",the_user->ipaddr); if (the_user->cap & IPMSG_DIALUPOPT) { if (!the_user->ipaddr) { dbg_out("dialup host does not have ipaddr, ignored\n"); print_one_user_entry((gpointer)the_user,NULL); }else{ dbg_out("%s is dialup host\n",the_user->ipaddr); udp_send_broadcast_with_addr(con,the_user->ipaddr,msg,len); } } } g_static_mutex_unlock(&userdb_mutex); return 0; } int userdb_add_waiter_window(GtkWidget *window){ if (!window) return -EINVAL; dbg_out("here %x\n",(unsigned int)window); g_static_mutex_lock(&win_mutex); waiter_windows=g_list_append(waiter_windows,(gpointer)window); g_static_mutex_unlock(&win_mutex); return 0; } int userdb_remove_waiter_window(GtkWidget *window){ if (!window) return -EINVAL; dbg_out("here %x\n",(unsigned int)window); g_static_mutex_lock(&win_mutex); waiter_windows=g_list_remove(waiter_windows,(gpointer)window); g_static_mutex_unlock(&win_mutex); return 0; } int userdb_replace_public_key_by_addr(const char *ipaddr,const unsigned long peer_cap,const char *key_e,const char *key_n){ int rc=-ESRCH; userdb_t srch_user; userdb_t *user_p=NULL; gchar *n_str=NULL,*e_str=NULL; if ( (!ipaddr) || (!key_e) || (!key_n) ) return -EINVAL; dbg_out("Here: ipaddr:%s key_e:%s key_n: %s\n",ipaddr,key_e,key_n); memset(&srch_user,0,sizeof(userdb_t)); srch_user.ipaddr=(char *)ipaddr; g_static_mutex_lock(&userdb_mutex); rc=internal_refer_user_by_addr(ipaddr,(const userdb_t **)&user_p); if (rc<0) goto error_out; rc=-ENOMEM; e_str=g_strdup(key_e); if (!e_str) goto error_out; n_str=g_strdup(key_n); if (!n_str) goto free_e_out; if (user_p->pub_key_e) g_free(user_p->pub_key_e); if (user_p->pub_key_n) g_free(user_p->pub_key_n); user_p->crypt_cap=peer_cap; user_p->pub_key_e=e_str; user_p->pub_key_n=n_str; dbg_out("Register: ipaddr:%s cap:0x%x key_e:%s key_n:%s\n", ipaddr, user_p->crypt_cap, user_p->pub_key_e, user_p->pub_key_n); unlock_out: g_static_mutex_unlock(&userdb_mutex); return 0; free_n_out: if (n_str) g_free(n_str); free_e_out: if (e_str) g_free(e_str); error_out: g_static_mutex_unlock(&userdb_mutex); return rc; } int userdb_get_public_key_by_addr(const char *peer_addr,unsigned long *cap_p,char **key_e,char **key_n){ int rc=-ESRCH; int i; userdb_t srch_user; userdb_t *user_p=NULL; char *ret_key_buff_e=NULL; char *ret_key_buff_n=NULL; GTimeVal tmout; gboolean status; if ( (!peer_addr) || (!key_e) || (!key_n) || (!cap_p) ) return -EINVAL; dbg_out("Get public key: ipaddr:%s\n",peer_addr); memset(&srch_user,0,sizeof(userdb_t)); srch_user.ipaddr=(char *)peer_addr; g_static_mutex_lock(&userdb_mutex); rc=internal_refer_user_by_addr(peer_addr,(const userdb_t **)&user_p); if (rc<0) goto unlock_out; dbg_out("ipaddr found:%s\n",peer_addr); print_one_user_entry(user_p,NULL); if ((user_p->crypt_cap) && (user_p->pub_key_e) && (user_p->pub_key_n) ) { rc=-ENOMEM; ret_key_buff_e=g_strdup(user_p->pub_key_e); if (!ret_key_buff_e) goto unlock_out; ret_key_buff_n=g_strdup(user_p->pub_key_n); if (!ret_key_buff_n) goto free_key_e_out; *key_e=ret_key_buff_e; *key_n=ret_key_buff_n; *cap_p=user_p->crypt_cap; dbg_out("Return :%x e=%s n=%s\n",*cap_p,*key_e,*key_n); rc=0; }else{ dbg_out("No encrypt cap %x e=%s n=%s\n", user_p->crypt_cap, (user_p->pub_key_e) ? (user_p->pub_key_e) : ("NONE"), (user_p->pub_key_n) ? (user_p->pub_key_n) : ("NONE")); rc=-ENOENT; } unlock_out: g_static_mutex_unlock(&userdb_mutex); nolock_out: return rc; free_key_n_out: if (ret_key_buff_n) g_free(ret_key_buff_n); free_key_e_out: if (ret_key_buff_e) g_free(ret_key_buff_e); return rc; } int userdb_get_cap_by_addr(const char *ipaddr, unsigned long *cap_p, unsigned long *crypt_cap_p){ int rc=-ESRCH; userdb_t srch_user; userdb_t *user_p=NULL; gchar *n_str=NULL,*e_str=NULL; if (!ipaddr) return -EINVAL; dbg_out("Here: ipaddr:%s \n",ipaddr); memset(&srch_user,0,sizeof(userdb_t)); srch_user.ipaddr=(char *)ipaddr; g_static_mutex_lock(&userdb_mutex); rc=internal_refer_user_by_addr(ipaddr,(const userdb_t **)&user_p); if (rc<0) goto error_out; rc=-ENOENT; if (cap_p != NULL) *cap_p = user_p->cap; if (crypt_cap_p != NULL) { *crypt_cap_p = 0; /* 能力が無い状態をデフォルトする */ #if defined(USE_OPENSSL) if ( (user_p->crypt_cap & RSA_CAPS) && (user_p->crypt_cap & SYM_CAPS) ) *crypt_cap_p = user_p->crypt_cap; /* 暗号化が可能な能力がある */ #endif /* USE_OPENSSL */ } dbg_out("Return cap:%s = %x\n", ipaddr, *cap_p); unlock_out: g_static_mutex_unlock(&userdb_mutex); return 0; free_n_out: if (n_str) g_free(n_str); free_e_out: if (e_str) g_free(e_str); error_out: g_static_mutex_unlock(&userdb_mutex); return rc; } int userdb_wait_public_key(const char *peer_addr,unsigned long *cap_p,char **key_e,char **key_n){ int rc=-ESRCH; int i; userdb_t srch_user; userdb_t *user_p=NULL; GTimeVal tmout; gboolean status; GTimer *wait_timer=NULL; gulong elapsed; if ( (!peer_addr) || (!key_e) || (!key_n) || (!cap_p) ) return -EINVAL; dbg_out("Wait public key: ipaddr:%s\n",peer_addr); memset(&srch_user,0,sizeof(userdb_t)); srch_user.ipaddr=(char *)peer_addr; rc=userdb_get_public_key_by_addr(peer_addr,cap_p,(char **)key_e,(char **)key_n); if (!rc) goto out; rc=ipmsg_send_getpubkey(udp_con,peer_addr); if (rc) goto out; wait_timer=g_timer_new(); if (!wait_timer) goto out; for(i=0;ipf == PF_INET6) ? (PF_INET6) : (PF_INET); rc = 0; unlock_out: g_static_mutex_unlock(&userdb_mutex); return rc; } int userdb_init_userdb(void){ users=NULL; return 0; } int userdb_cleanup_userdb(void){ } g2ipmsg-0.9.6+dfsg/src/userdb.h000066400000000000000000000067221126724573600162650ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(USERDB_H) #define USERDB_H #include #include #include #include "udp.h" #include "message.h" #define make_entry_canonical(the_string) ((strncmp((the_string),HOSTLIST_DUMMY,1))?(the_string):(_("UnKnown"))) typedef struct _userdb{ gchar *user; gchar *host; gchar *group; gchar *nickname; gchar *ipaddr; int prio; unsigned long cap; /* 端末ケイパビリティ(エントリパケットのフラグ) */ unsigned long crypt_cap; /* 端末ケイパビリティ(エントリパケットのフラグ) */ gchar *pub_key_e; /* hexフォーマット(bigendian)の文字列 */ gchar *pub_key_n; /* hexフォーマット(bigendian)の文字列 */ int pf; /* プロトコルファミリ */ }userdb_t; int userdb_init_userdb(void); int userdb_del_user(const udp_con_t *con,const msg_data_t *msg); int userdb_add_user(const udp_con_t *con,const msg_data_t *msg); int userdb_update_user(const udp_con_t *con,const msg_data_t *msg); int userdb_search_user_by_addr(const char *ipaddr,const userdb_t **entry_ref); int destroy_user_info(userdb_t *entry); void userdb_update_group_list(GtkComboBox *widget); int userdb_get_hostlist_string(int start, int *length, const char **ret_string) ; void userdb_print_user_list(void); int update_users_on_message_window(GtkWidget *window,gboolean is_forced); int userdb_invalidate_userdb(void); int userdb_send_broad_cast(const udp_con_t *con, const char *msg,size_t len); int userdb_replace_prio_by_addr(const char *ipaddr,int prio,gboolean need_notify); void update_all_user_list_view(void); int userdb_replace_public_key_by_addr(const char *ipaddr,const unsigned long peer_cap,const char *key_e,const char *key_n); int userdb_get_public_key_by_addr(const char *ipaddr,unsigned long *cap_p,char **key_e,char **key_n); int userdb_wait_public_key(const char *peer_addr,unsigned long *cap_p,char **key_e,char **key_n); int userdb_get_cap_by_addr(const char *ipaddr, unsigned long *cap_p, unsigned long *crypt_cap_p); int userdb_refer_proto_family(const char *ipaddr, int *family); int userdb_cleanup_userdb(void); GList *refer_user_list(void); GList *get_group_list(void); #endif /* USERDB_H */ g2ipmsg-0.9.6+dfsg/src/util.c000066400000000000000000000106621126724573600157470ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "common.h" /** @file * @brief 雑多なユーティリティ関数群 * @author Takeharu KATO */ /** スレッド間での環境変数アクセスへの排他用ロック * @attention 内部リンケージ */ GStaticMutex serialize_mutex = G_STATIC_MUTEX_INIT; /** スレッド間での時刻管理情報アクセスへの排他用ロック * @attention 内部リンケージ */ GStaticMutex time_var_mutex = G_STATIC_MUTEX_INIT; /** 環境変数の値を取得し, その複製を返却する. * @param[in] var 環境変数名 * @param[out] val_p 環境変数の内容を差すポインタのアドレス * @retval 0 正常終了 * @retval -EINVAL 引数異常(var, val_pのいずれかがNULL). * @retval -ENOMEM メモリ不足 */ int get_envval(const char *var, char **val_p) { char *val = NULL; char *val_str = NULL; int rc = 0; if ( (var == NULL) || (val_p == NULL) ) return -EINVAL; /* ただの気休めに過ぎないが, 一応排他 */ g_static_mutex_lock(&serialize_mutex); rc = -ENOENT; val = getenv(var); if (val == NULL) goto unlock_out; rc = -ENOMEM; val_str = g_strdup(val); if (val_str == NULL) goto unlock_out; *val_p=val_str; rc=0; unlock_out: g_static_mutex_unlock(&serialize_mutex); return (rc); } /** 指定された時刻の文字列表現を返却する. * @param[out] time_string 26文字長の時刻を返却する領域 * @param[in] sec epoch時刻 * @retval 0 正常終了 * @retval -ENOMEM メモリ不足 * @attention 時刻返却先(time_string)は, 26文字以上を格納できるように * 割り当て済みでなければならない. */ int get_current_time_string(char time_string[], long sec) { struct tm recv_tm; char time_buffer[32]; #if defined(HAVE_LOCALTIME_R) localtime_r((time_t *)&sec, &recv_tm); #else g_static_mutex_lock(&time_var_mutex); memmove(&recv_tm, localtime((time_t *)&sec), sizeof(struct tm)); g_static_mutex_unlock(&time_var_mutex); #endif /* HAVE_LOCALTIME_R */ #if defined(HAVE_ASCTIME_R) asctime_r(&recv_tm, time_buffer); #else g_static_mutex_lock(&time_var_mutex); memmove(time_buffer, asctime(&recv_tm), 26); g_static_mutex_unlock(&time_var_mutex); #endif /* HAVE_ASCTIME_R */ time_buffer[25] = '\0'; /* 26文字以上値を埋めるlibcへの対処 */ strncpy(time_string, time_buffer, 26); return 0; } /** メモリの割り当て領域を拡張し拡張した領域を0で埋める. * @param[out] ptr g_mallocで獲得した領域を保持するポインタのアドレス * @param[in] new_size 再割り当て後のサイズ * @param[in] old_size 現在のサイズ * @retval 0 正常終了 * @retval -EINVAL 引数異常 * @retval -ENOMEM メモリ不足 */ int internal_realloc(void **ptr, size_t new_size, size_t old_size){ void *orig_ptr = NULL; ssize_t clr_len = 0; if (ptr == NULL) return -EINVAL; orig_ptr = *ptr; *ptr = g_realloc(*ptr, new_size); if ( (*ptr) == NULL ) { *ptr = orig_ptr; return -ENOMEM; } clr_len = new_size - old_size; if (clr_len > 0) memset( ((*ptr)+old_size), 0, clr_len); return 0; } g2ipmsg-0.9.6+dfsg/src/util.h000066400000000000000000000030131126724573600157440ustar00rootroot00000000000000/* * Copyright (C) 2006 Takeharu KATO * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if !defined(G2IPMSG_UTIL_H) #define G2IPMSG_UTIL_H int get_envval(const char *, char **); int get_current_time_string(char [], long ); int internal_realloc(void **, size_t , size_t ); #endif /* G2IPMSG_UTIL_H */