gnome-gmail-notifier-0.10.1/0000777000175000017520000000000011357667402012624 500000000000000gnome-gmail-notifier-0.10.1/ChangeLog0000644000175000017520000010376211357667301014321 00000000000000Mon Apr 05 11:16 2010 Bradley Worley (geekysuavo@gmail.com) * GgnPrefsWindow: implemented all functionality and rewrote libglade code into newer GtkBuilder code. * GgnManager: implemented complete functionality, including advanced new mail notifications, an extended left-click popup menu under conditions of >1 enabled account, and mailto commandline support. * configure.ac: updated version to 0.10.1 for next release. Wed Dec 23 12:19 2009 Bradley Worley (geekysuavo@gmail.com) * GgnAccount: created ggn-account.[ch] and ggn-account-priv.h for the newly designed account object. accounts are now the most important object in the notifier, directly managing underlying preferences when their data are changed and keeping detailed track of their entries arrays. * ggn-account.c: entries are now managed by their states in the inbox: NEW, UNREAD, or READ. * GgnAccountList: created ggn-account-list.[ch] and the ggn-account-list-priv.h for the account list object and implemented all functionality. the account list is now generated from the GgnPrefs object on startup, meaning accounts are built behind the scenes without GgnManager intervention. * GgnAudio: created ggn-audio.[ch] and ggn-audio-priv.h for audio playback functionality and implemented all required code. * GgnEntry: created ggn-entry.[ch] and ggn-entry-priv.h for keeping track of account entries and their data, implemented fully. * GgnManager: created ggn-manager.[ch] and ggn-manager-priv.h and added a few bits of functionality. the manager is to be trimmed of all excess fat: it is to hold only the backbone application code and notification logic. * GgnPrefsWindow: created ggn-prefs-window.[ch] and the associated ggn-prefs-window-priv.h for the preferences window. no functionality as of yet. Mon Jun 22 21:21 2009 Bradley Worley (geekysuavo@gmail.com) * GgnPrefs: created ggn-prefs.[ch] and ggn-prefs-priv.h for the newly designed and cleaned up preferences access object. a quick test says it works as expected. * GgnIcon: created ggn-icon.[ch] and ggn-icon-priv.h for the status icon and notification bubble functionality. a cursory examination and testing shows it to work. Fri Jun 19 16:13 2009 Bradley Worley (geekysuavo@gmail.com) * GgnKeyring: created ggn-keyring.[ch] and implemented the functionality required for keyring access. The topology of the functions involved did not warrant the creation of a distinct GObject subclass, but was important enough to be rewritten and set apart in the codebase. Sun Jun 07 21:28 2009 Bradley Worley (geekysuavo@gmail.com) * GgnXML: created ggn-xml.[ch] and ggn-xml-priv.h for the newly bugfixed, rewritten and renamed xml parser object. * GgnAboutDialog: create ggn-about-dialog.[ch] and ggn-about-dialog-priv.h for the newly bugfixed and rewritten about dialog object. Sat Jun 06 18:48 2009 Bradley Worley (geekysuavo@gmail.com) * configure.ac: fixed LIBS and CFLAGS defines to shrink the size of the compilation output by eliminating -library and -I/nclude clutter. * Makefile.am: same as for configure.ac. Sun May 31 14:36 2009 Bradley Worley (geekysuavo@gmail.com) * ggn-atom-feed.c: added extra checks to ensure that a minimum number of trys are made for each atom feed HTTP GET. (some HTTP 401's do not trigger the soup "authenticate" signal... ???) * ggn-preferences.c: optimized the account modification routine to only change settings fields which have been modified. * ggn-config.c: fixed account edit window to carry over enabled status of account during an edit process. Sat May 30 15:21 2009 Bradley Worley (geekysuavo@gmail.com) * ggn-preferences.c: complete and absolute overhaul of much of the API involved with preferences get/set, most of which is related to accounts management. * ggn-manager.c: reworking of logic relating to the aforementioned overhaul. * ggn-config.c: reworking of logic relating to the aforementioned overhaul. * ggn-atom-feed.c: fixed infinite looping situation with an incorrect password in the SoupSessionSync "authenticate" signal. Fri May 29 14:22 2009 Bradley Worley (geekysuavo@gmail.com) * ggn-atom-feed.c: small changes to coincide with api changes in other parts of the source, namely the change from *_username() to *_user(). * ggn-config.c: fixes to accomodate api changes in the GgnPreferences source code. * ggn-manager.c: fixes to accomodate api changes in the GgnPreferences source code. * ggn-preferences.c: complete removal of the xml config file. * ggn-util.c: ggn_client_execute() exhibits safer gconf client reference count behavior now by unref()-ing the client it uses to get the browser/emailer commands. * ggn-edit.glade: added a domain name text entry for hosted gmail account users to enter their domain into. Thu May 28 19:41 2009 Bradley Worley (geekysuavo@gmail.com) * Makefile.am: fixed fixme target to use uppercase too. * ggn-util.c: added the ggn_launch_gmail function to facilitate launching gmail when necessary. Wed May 20 20:25 2009 Bradley Worley (geekysuavo@gmail.com) * configure.ac: removed libgnomeui dependency from the configure script list of dependencies. * configure.ac: removed libgnome dependency from the configure script list of dependencies. * Makefile.am: removed gnome CFLAGS and LIBS lines, replaced with gconf and gtk2 lines. * main.h: removed libgnome include statements. Wed May 20 14:20 2009 Bradley Worley (geekysuavo@gmail.com) * configure.ac: changed libsoup version requirement to version 2.4. * ggn-atom-feed.c: cosmetic changes and integrated changes from clemsbox (thanks!) into the libsoup feed download functions. Mon Apr 20 17:19 2009 Nicholas Moore (shiny.nickel@gmail.com) * ggn-preferences.c: added methods to obtain proxy username and password and storage for them both * ggn-util.h: added proxy username and password locations for gconf * ggn-manager.c: added calls methods to fetch the proxy username and password * ggn-atom-feed.c: modified the connection callback to send proxy authentication if requested and added methods to get the username and password * autogen.sh: removed call to gettext, as it was causing compilation problems Sun Jan 20 09:29 2008 Bradley Worley (geekysuavo@gmail.com) * ggn-config.c: minor aesthetic source code modifications. * ggn-preferences.c: minor aesthetic source code modifications. Thu Jan 10 18:09 2008 Bradley Worley (geekysuavo@gmail.com) * ggn-prefs.glade.in: changed to use a GtkFileChooserButton. * ggn-config.c: modified codebase to work with the above modified glade layout. Wed Jan 09 18:32 2008 Bradley Worley (geekysuavo@gmail.com) * autogen.sh: fixed the url's for finding the source packages for automake, autoconf, etc... thanks to eric.n.brown for this fix. * configure.ac: added checks for required gstreamer plugins, so as not to upset the notifier while running. :-) * ggn-config.c: implemented a simple "escape closes me" callback to make the preferences window seem a bit more like a dialog. Sat Dec 22 02:04 2007 Bradley Worley (geekysuavo@gmail.com) * configure.ac: removed all requirements of gnutls/gcrypt and added a check for gnome-keyring >= 0.4.2. * ggn-atom-feed.h: added some definitions for keyring password lookups. * ggn-preferences.c: removed all writing of passwords to the xml preferences file, and added routines for the use of gnome-keyring to load/store passwords. Fri Dec 21 01:06 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-manager.c: changed 'react' behavior to only make notifications occur when the user gains messages, not loses/reads them. Fri Sep 28 09:29 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-presence.c: changed invocation of g_thread_create to make a non-joinable thread. * ggn-atom-feed.c: changed invocation of g_thread_create to make a non-joinable thread. Wed Sep 26 16:35 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-manager.c: finalized the initial startup behavior, which now includes notifications that no accounts have been configured for use. * ggn-welcome.html: tweaked the instructions to reflect the first-time-run changes in the notifier. * ggn-presence.[ch]: added support for a warning style to display messages between errors and infos. * ggn-warn.svg: added this file to the data/ directory to be used as a warning pixmap. * ggn-manager.c: made general improvements to the logic of the mail-check functions, as well as changed the "no accounts configured" pixmap to a warning logo. Mon Sep 24 15:20 2007 Bradley Worley (geekysuavo@gmail.com) * gnome-gmail-notifier.desktop.in: removed the OnlyShowIn line in the file. Sun Sep 23 17:38 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-config.c: fixed config window to open the account editor window when the user selects 'Add' to make a new account. Sat Sep 22 09:56 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-manager.c: added preliminary support for multiple account message summaries in the icon tooltip. recommend testing before labeling it as done, though. Thu Sep 20 19:01 2007 Bradley Worley (geekysuavo@gmail.com) * gnome-gmail-notifier.desktop.in: fixed this file to use an svg file installed to the ${datadir}/pixmaps folder to ensure that the menu always has an icon no matter where it was installed to. Thu Sep 20 10:57 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-preferences.h: commented out the account section in the GGN_PREFERENCES_WFORMAT string, effectively giving first-run users a configuration with zero accounts. Sun Sep 02 20:31 2007 Bradley Worley (geekysuavo@gmail.com) * main.h: added required gnutls.h and pthread.h includes for the extra legwork needed to initialize threading in gcrypt/gnutls. * main.c: set up proper threading initialization using pthreads for gcrypt/gnutls. needs testing, but so far it's not crashing with multiple accounts like before. Fri Aug 31 20:10 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-manager.c: fixed lack of regular inbox checking on first-run situations, with room for later improvement. * ggn-crypto.c: abandoned hex method of encoding passwords for the simpler and more robust g_base64 functions from glib-2.0. Wed Aug 15 19:09 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-crypto.c: implemented full encryption and decryption functionality, including safe hex encrypted strings to ensure data persistance. * ggn-crypto.c: made massive changes and fixes to the encryption and decryption functions to make them work. * ggn-preferences.c: added support for simplistic load and save of password from xml file, and all seems to work ok. * ggn-preferences.c: added code to seamlessly upgrade users from insecure plaintext passwords to safer encrypted passwords. * ggn-util.c: added a fix to ggn_strtob to check if the value string is NULL. * data/pkg/*.in: added gnutls as a requirement to using the notifier in binary form. Tue Aug 14 20:15 2007 Bradley Worley (geekysuavo@gmail.com) * configure.ac: added checks for gnutls, which "provides" the gcrypt and gpg-error libraries we need for crypto. * ggn-crypto.[ch]: created base gobject functionality and began writing the building blocks. more to come. Tue Aug 14 12:27 2007 Bradley Worley (geekysuavo@gmail.com) * configure.ac: added code to compute sane initialization vectors for the GgnCrypto gobject, which is soon to be written. Mon Jul 09 11:11 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-prefs.glade.in: completely removed all widgets that were used to set the proxy address. * ggn-config.c: completely removed all functionality that pertained to setting the proxy address. * ggn-preferences.[ch]: removed all functionality that set a different proxy address from the GNOME settings. * ggn-config.c: removed all traces of the ubiquitous ggn_config_get_widget function, which should've been the glade_xml_get_widget function. * gnome-gmail-notifier: version officially set to 0.9.1. Thu Jul 05 16:23 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-preferences.c: fixed usage of the proxy settings. Wed Jul 04 17:32 2007 Bradley Worley (geekysuavo@gmail.com) * main.c: fixed compilation error with the locale dir when NLS is enabled. * ggn-presence.c: changed g_usleep invocation into a gtk_main_iteration_do (FALSE) invocation, which seems to fix the problem with startup notifications. (Cross your fingers and test, test, test!!!) * ggn-atom-feed.c: added an error flag to the GgnAtomFeed object, which will allow the GgnManager to track which feeds return HTTP errors (like unauthorized). * ggn-manager.c: added error count to the parameters sent to the ggn_manager_handle_inbox_change function, which can do with them what it wishes. * ggn-manager.c: added a reaction to the inbox errors that can occur during the check process, and perfected the reaction decision logic to a one-liner. * gnome-gmail-notifier: removed every trace of ggn_free_str from the program, as it was useless. * ggn-preferences.c: modified the behavior of the proxy property, so that the preferences object always pulled the proxy uri from the gnome settings via gconf. Tue Jul 03 12:03 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-manager.c: forced gdk to flush the command buffer when inside the feed checking thread. * configure.ac: added code to generate the data/*.in files' counterparts using the autotools, instead of using my stupid custom script. * data/Makefile.am: removed invocation of my stupid custom script from the rules for input files. * data/ggn-about.glade.in: fixed the version string to automatically update using the autotools scripts. Sun Jul 01 14:26 2007 Bradley Worley (geekysuavo@gmail.com) * gnome-gmail-notifier.pot: created the base PO template file for translators to work with. * ggn-manager.c: fixed the manager to ensure that the status icon has been shown before proceeding to notify the user of new mail and such. * ggn-about.glade.in: marked the GPL license as non-trans- latable. Wed Jun 27 14:23 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-config.c: fixed issue with ggn_preferences_get_* functions that returned NULL strings sometimes. * ggn-config.c: fixed segfault that occured when the user clicked "Edit" and no account was selected. * ggn-config.c: buttons that now require an account to be selected will be "greyed out" when no account is selected. * ggn-manager.c: rewrote ggn_manager_update_array and hooked it into various other functions to ensure that the GUI would never lock, and that the accounts list always stayed synced with the feeds array. * ggn-atom-feed.c: fixed warning from libsoup about soup_uri_free trying to free a NULL SoupUri. * ggn-xml-parser.c: fixed the parser to recover on the "extra content at the end of document" error, which really shouldn't keep the parser from finishing. Tue Jun 26 09:57 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-manager.c: fixed plural/singular message grammar in the notification summary. * gnome-gmail-notifier: removed scripts directory and ported all functions of those scripts to Makefile.am and data/pkg/builder. * gnome-gmail-notifier: added intltool and gettext support, and marked all translatable strings in all source files. Mon Jun 25 23:00 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-manager.c: added gdk_threads_enter/leave support. * ggn-presence.c: added gdk_threads_enter/leave support. * main.c: added gdk_threads_init support, all of this gdk_threads stuff fixed the issues with the hangups from Xlib about invalid async responses. * ggn-manager.c: implemented a correct message feedback loop system, which does all of the notifications that the previous version did, just with a little more zing. Mon Jun 25 15:15 2007 Bradley Worley (geekysuavo@gmail.com) * data: created welcome.html and associated files, which help new users setup their notifiers on the first run. * ggn-presence.c: added support for the CHECKING style, which can be used during mail check cycles. Sun Jun 24 12:59 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-about.glade.in: fixed the copyright symbol in the glade xml input file. * ggn-manager.c: fixed up ggn_manager_update_array and set the basic checking loop in place, but no actual feed refresh happens yet. * ggn-xml-parser.c: basically overhauled the load_string function on the grounds that it was crashing pretty regularly, and we came out with a shiny new xml parsing function. Sat Jun 23 21:54 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-manager.c: implemented all functionality required for normal operation, except for atom feed inbox refreshing. (the first try failed pretty horribly.) * gnome-gmail-notifier: changed all g_free statements on strings that can be changed to ggn_free_str. Sat Jun 23 12:34 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-config.c: completed all interactions between the user-interface and the preferences object and xml file. * ggn-manager.c: implemented base application management using this object, and started to work on the basic application behavior. Fri Jun 22 14:23 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-config.c: began the basic functions for using the preferences window. Fri Jun 22 11:45 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-util.c: moved ggn_btostr, ggn_strtob to this file. wrote ggn_pixmap_file and ggn_glade_file functions for a simpler method of generating filename strings. * ggn-about-dialog.c: implemented functions for loading the GgnAboutDialog glade xml files simply, to use the about dialog. * ggn-util.c: implemented ggn_client_execute, which can execute a given web client based on the link style. Thu Jun 21 21:32 2007 Bradley Worley (geekysuavo@gmail.com) * gnome-gmail-notifier: massive reorganization of the source tree. moved files in pixmaps/ to data/, moved all package spec files to data/pkg/, moved *.desktop files to data/, and added support for installation of glade xml files from data/. Thu Jun 21 18:25 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-presence.c: completed the rest of the notification, tray icon, and menu functionality, as well as a callback set for tray icon and menu actions. from the looks of the code now, it seems that the best approach to summing all of these objects is to create a GgnManager object which handles the rest of them. Thu Jun 21 13:03 2007 Bradley Worley (geekysuavo@gmail.com) * build files: added libglade support into configure.ac and src/Makefile.am to allow the application to use GladeXML objects. * package files: added libglade as a requirement for the various package managers. Thu Jun 21 11:38 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-presence.c: defined basic functions for tray icon, notifications, and sound files in the header. * ggn-presence.c: implemented sound playing function. Wed Jun 20 22:33 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-preferences.c: implemented account manipulation functions. implemented set() functions. functionality is completed. * ggn-presence.c: created presence object for maintaining a presence on the user's desktop with sounds, bubbles, and a tray icon. Wed Jun 20 17:20 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-preferences.c: implemented safe get() functions for use with the preferences file object, so NULL strings won't become "(null)" when saved to the XML file. Wed Jun 20 14:50 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-preferences.c: created basic read() and write() functions to load and save the preferences file on the fly. all xml code is backwards compatible with old notifier versions, and the transition is 100% transparent to the user. still need to implement the myriad of get/set functions. Wed Jun 20 11:40 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-xml-parser.c: functionality is completed. * ggn-atom-feed.c: added functions for looking up inbox and message information. all functionality is completed. * prefs.xml: added extra markup to allow the preferences parser to manage multiple gmail inbox accounts at one time, for first-run special actions, and for proxy server support. Tue Jun 19 23:21 2007 Bradley Worley (geekysuavo@gmail.com) * specfile.fc6.in: added libxml2 and libxml2-devel to the list of dependencies. * slack-desc.in: no dependency management in slackware. * control.edgy.in: added libxml2 and libxml2-dev to the list of dependencies. * control.feisty.in: added libxml2 and libxml2-dev to the list of dependencies. Tue Jun 19 17:53 2007 Bradley Worley (geekysuavo@gmail.com) * ggn-xml-parser.c: implemented basic XML parsing set of functionality, which is similar to GMarkup, but with extra data, such as a non-conforming XPath system, a hash table for the XML tag attributes, and true GLib signals for the processing callback functions. * ggn-atom-feed.c: linked GgnAtomFeed into the created GgnXmlParser functionality, and everything is still working. Mon Jun 18 08:32 2007 Bradley Worley (geekysuavo@gmail.com) * gnome-gmail-notifier: began rewrite of entire codebase. all objects will be wrapped in GObject code to ease many headaches. * ggn-atom-feed.c: implemented basic functionality to download the Gmail ATOM XML feed securely. * ggn-atom-feed.c: implemented multi-threading support. * ggn-atom-feed.c: added proxy server support... NEEDS TESTING! Sun Apr 29 11:52 2007 Bradley Worley (geekysuavo@gmail.com) * application.c: fixed the tooltip to update the message count even if the user has recieved new messages the last time. Fri Apr 20 16:23 2007 Bradley Worley (geekysuavo@gmail.com) * control.feisty.in: created for feisty ubuntu support. * scripts/package: added target 'feisty'. * Makefile.am: added target 'package-feisty'. * gnome-gmail-notifier: ubuntu 7.04 package support is completed! Tue Apr 10 13:49 2007 Bradley Worley (geekysuavo@gmail.com) * gnome-gmail-notifier: added _("") code to prepare for nls support. Mon Apr 09 18:10 2007 Bradley Worley (geekysuavo@gmail.com) * specfile.fc6.in: fixed %dist tag typo. * gnome-gmail-notifier: version officially set to 0.8.5. Mon Apr 09 17:53 2007 Bradley Worley (geekysuavo@gmail.com) * package: added support for the edgy target. * Makefile.am: added package-edgy target. * gnome-gmail-notifier: version officially set to 0.8.4. Sat Apr 07 10:56 2007 Bradley Worley (geekysuavo@gmail.com) * feed-downloader.c: fixed feed_download to clean up all loose ends and connections after downloading the atom feed from google. Fri Apr 06 12:39 2007 Bradley Worley (geekysuavo@gmail.com) * package: added support for the fc6 target. * Makefile.am: added package-fc6 target. * gnome-gmail-notifier: version officially set to 0.8.3. Mon Mar 05 17:28 2007 Bradley Worley (geekysuavo@gmail.com) * package: fixed fatal flaw that made our app not package anything properly. (slackware packages still work, but not to fullest extent until now.) Mon Mar 05 16:31 2007 Bradley Worley (geekysuavo@gmail.com) * package: created script to manage the creation of various os-specific packages. for now, only slack 11.0 support exists. * Makefile.am: added package-slack11.0 target. * prefs-window.c: fixed file chooser to open by default into /usr/share/sounds if no file is specified. * gnome-gmail-notifier: version officially set to 0.8.2. Sun Feb 25 14:32 2007 Bradley Worley (geekysuavo@gmail.com) * prefs-window.c: added statement to save preferences to the xml file every time the user closed the dialog. * preferences.h: replaced PREFERENCES_DEFAULT with new PREFERENCES_DEFAULT_PRINTF, which is a printf format string that provides a more useful and standard job. * preferences.c: revamped preferences_get_file and preferences_save functions to use new printf format. * slack-desc.in: created this file for purpose of making slackware *.tgz package files later. Wed Feb 21 18:32 2007 Bradley Worley (geekysuavo@gmail.com) * prefs-window.c: rewrote the generate function that creates the window, and basically fixed everything and made "version 2.0" of the window. * prefs-window.c: added complete sound file chooser support. i think the next release is ready to go! * *.c, *.h: fixed all warnings generated when source was compiled with -Wall flag, just for extra peace of mind. * gnome-gmail-notifier: version officially set to 0.8.1. Tue Feb 20 21:04 2007 Bradley Worley (geekysuavo@gmail.com) * audio.c: added audio playback functionality to app. * preferences.c: fixed first-time settings load typo for "notification" in xml file. * preferences.c: added sound file notification prefs to the xml file handling functions. * application.c: added sound notification functionality to the mail check subroutine. * prefs-window.h: added new, complete list of widgets to the PreferencesWindow structure, according to my throwaway glade template. (maybe i'll actually *use* glade in the future? hah.) Tue Feb 13 13:35 2007 Bradley Worley (geekysuavo@gmail.com) * utility.c: added functions to handle and compare the GmailTimestamp structures from atom xml files. * xml-parser.c: parser now takes in message and inbox timestamp values when parsing the atom feed. * application.c: error notification only displays on the first error, not every retry. * application.c: new message notification only displays when the new inbox differs from the last inbox, to cut down on the obtrusive bubbles. * gnome-gmail-notifier: version officially set to 0.8.0. Thu Feb 08 15:23 2007 Bradley Worley (geekysuavo@gmail.com) * application.c: remedied new interval buildup bug caused by the 0.7.0 changes. ugh. it's always something. * gnome-gmail-notifier: version officially set to 0.7.1. Thu Feb 08 13:21 2007 Bradley Worley (geekysuavo@gmail.com) * xml-parser.c: added caveat "non-fatal" to the ominous xml_parse_error message. * application.c: fixed application_update to call better option application_interval instead of application_runonce when an xml error occurred. * application.c: re-instated startup changes from 0.6.2 because they didn't break functionality anymore. * gnome-gmail-notifier: version officially set to 0.7.0. Wed Feb 07 22:52 2007 Bradley Worley (geekysuavo@gmail.com) * reverted changes made in 0.6.2!!! they broke things! Tue Feb 06 22:22 2007 Bradley Worley (geekysuavo@gmail.com) * application.c: general order of init now gives gtk and libnotify a chance to breath before checking the mail on the start of the program. this ensures the bubble shows up in the right spot, and not randomly on the screen. * gnome-gmail-notifier: version officially set to 0.6.2. Tue Feb 06 11:24 2007 Bradley Worley (geekysuavo@gmail.com) * utility.h: used configure-defined PIXMAPS_DIR path to look for images now, instead of hard-coded. * gnome-gmail-notifier: version officially set to 0.6.1. Sat Jan 27 17:00 2007 Bradley Worley (geekysuavo@gmail.com) * Makefile.am: *.desktop file is installed into the /usr/share/applications directory now, so it can be run from the main apps menu now. Sat Jan 27 15:40 2007 Bradley Worley (geekysuavo@gmail.com) * xml-parser.h: added a timestamp to the GmailMessage structure for later checking of message updates. * notifier.c: fixed notifications to consistently show icons inside the notification bubbles. * gnome-gmail-notifier: version officially set to 0.6.0. Sat Jan 20 14:53 2007 Bradley Worley (geekysuavo@gmail.com) * about-dialog.c: fixed corner close button functionality. * prefs-window.c: fixed corner close button functionality. * gnome-gmail-notifier: version officially set to 0.5.6. Fri Jan 19 18:06 2007 Bradley Worley (geekysuavo@gmail.com) * about-dialog.c: updated the url and made it clickable. also added a credits box. * gnome-gmail-notifier: version officially set to 0.5.5. Fri Jan 19 10:33 2007 Bradley Worley (geekysuavo@gmail.com) * xml-parser.c: added another specific error return for the sometimes-returned xml parse error. * application.c: improved reaction to nonfatal mail check errors in application_update, and checked for xml parse error. project seems to be bug-free. * gnome-gmail-notifier: version officially set to 0.5.4. Sat Jan 13 17:58 2007 Bradley Worley (geekysuavo@gmail.com) * application.c: application_update checks for the "bad" utf8 error and re-runs the parse if that's the case. * application.c: application_update re-registers itself with updated interval values. kind of a hack, but at least with smaller values, the change is palatable. * gnome-gmail-notifier: version officially set to 0.5.3. Sat Jan 13 15:50 2007 Bradley Worley (geekysuavo@gmail.com) * notifier.c: added extra qualifier to ensure the icon is a GtkStatusIcon object. * notifier.c: changed creation of notification bubble to work properly in ubuntu (libnotify 0.4.2 to 0.4.0). * gnome-gmail-notifier: version officially set to 0.5.2. Sat Jan 13 14:33 2007 Bradley Worley (geekysuavo@gmail.com) * utility.c: added g_sync_gui to update the gtk system. * application.c: implemented gui syncs in the update code. * feed-downloader.c: fixed feed_download to use the url string passed to it, instead of the default url string. * gnome-gmail-notifier: version officially set to 0.5.1. Sat Jan 13 13:42 2007 Bradley Worley (geekysuavo@gmail.com) * feed-downloader.c: overhauled libcurl http get source with libsoup multithreaded code. libsoup returns true utf8, so there's no interface error with GMarkupParser. * gnome-gmail-notifier: pre-alpha is a wrap, or at least that's probably the case. version officially set to 0.5.0. Tue Jan 09 22:12 2007 Bradley Worley (geekysuavo@gmail.com) * tray-icon.c: clicking a normal/newmsg icon shows a browser. * utility.c: added the browser execution functionality. * tray-icon.c: added tooltips that update based on status. * gnome-gmail-notifier: all testbeds have been implemented and interlinked with each other by the application layer. if it weren't for the parse error created by the feed interpreter, i would call this project a wrap. dammit. Tue Jan 09 18:25 2007 Bradley Worley (geekysuavo@gmail.com) * application.c: implemented tie-ins for app init, run, execute, and exit. added update and reaction code for interval-checking of mail. Tue Jan 09 16:25 2007 Bradley Worley (geekysuavo@gmail.com) * notifier.c: added complete testbed functionality. * application.c: added to manage overall application. Mon Jan 08 16:42 2007 Bradley Worley (geekysuavo@gmail.com) * application.h: added to provide app-specific info. * about-dialog.c: added complete testbed functionality. * feed-downloader.c: added complete testbed functionality. * preferences.c: added complete testbed functionality, as well as the code required to handle the additional notification options. Fri Jan 05 18:17 2007 Bradley Worley (geekysuavo@gmail.com) * prefs-window.c: added complete testbed functionality. * tray-icon.c: added complete testbed functionality. * utility.c: added gdk_pixbuf_new_from_special and gdk_pixbuf_find functionality for pixmap use. * prefs-window.c: added notification checkboxes to the preferences window. Thu Jan 04 23:02 2007 Bradley Worley (geekysuavo@gmail.com) * utility.c: added g_string_new_blank_len feature. * xml-parser.c: added complete testbed functionality. Thu Jan 04 16:29 2007 Bradley Worley (geekysuavo@gmail.com) * main.h: added outside library includes, as well as a config.h include and headers for the rest of the app. Wed Jan 03 10:46 2007 Bradley Worley (geekysuavo@gmail.com) * about-dialog.h: added function definitions to header. * feed-downloader.h: added function definitions to header. * notifier.h: added function definitions to header. * preferences.h: added function definitions to header. * prefs-window.h: added function definitions to header. * tray-icon.h: added function definitions to header. * utility.h: added function definitions to header. * xml-parser.h: added function definitions to header. Wed Dec 27 19:32 2006 Bradley Worley (geekysuavo@gmail.com) * gnome-gmail-notifier: project has officially started! version officially set at 0.4.0. ChangeLog ends here gnome-gmail-notifier-0.10.1/configure0000755000175000017520000073457611357667341014477 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.63 for gnome-gmail-notifier 0.10.1. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # 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.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); 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. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # 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 || $as_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=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _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=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_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 bug-autoconf@gnu.org about your system, echo including any error possibly output before this message. echo This can help us improve future autoconf versions. echo Configuration will now proceed without shell functions. } 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" || { $as_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 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: 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='gnome-gmail-notifier' PACKAGE_TARNAME='gnome-gmail-notifier' PACKAGE_VERSION='0.10.1' PACKAGE_STRING='gnome-gmail-notifier 0.10.1' PACKAGE_BUGREPORT='geekysuavo@gmail.com' 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='LTLIBOBJS LIBOBJS GLIB_GENMARSHAL GST_INSPECT GGN_LIBS GGN_CFLAGS PKG_CONFIG GNOME_KEYRING_REQUIRED GSTREAMER_REQUIRED LIBXML2_REQUIRED LIBSOUP_REQUIRED LIBNOTIFY_REQUIRED GCONF_REQUIRED GTK_REQUIRED GLIB_REQUIRED MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES CATOBJEXT CATALOGS MSGFMT_OPTS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc GGN_LOCALEDIR GETTEXT_PACKAGE EGREP GREP CPP DATADIRNAME ALL_LINGUAS INTLTOOL_PERL GMSGFMT MSGFMT MSGMERGE XGETTEXT INTLTOOL_POLICY_RULE INTLTOOL_SERVICE_RULE INTLTOOL_THEME_RULE INTLTOOL_SCHEMAS_RULE INTLTOOL_CAVES_RULE INTLTOOL_XML_NOMERGE_RULE INTLTOOL_XML_RULE INTLTOOL_KBD_RULE INTLTOOL_XAM_RULE INTLTOOL_UI_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_SHEET_RULE INTLTOOL_SERVER_RULE INTLTOOL_PONG_RULE INTLTOOL_OAF_RULE INTLTOOL_PROP_RULE INTLTOOL_KEYS_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_DESKTOP_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE USE_NLS INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_nls enable_dependency_tracking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG GGN_CFLAGS GGN_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { $as_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 && { $as_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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 { (exit 1); exit 1; }; } ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { $as_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 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { $as_echo "$as_me: error: working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { $as_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 -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { $as_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" || { $as_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 gnome-gmail-notifier 0.10.1 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/gnome-gmail-notifier] --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 gnome-gmail-notifier 0.10.1:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-nls do not use Native Language Support --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility GGN_CFLAGS C compiler flags for GGN, overriding pkg-config GGN_LIBS linker flags for GGN, 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" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF gnome-gmail-notifier configure 0.10.1 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 gnome-gmail-notifier $as_me 0.10.1, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) 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_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $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=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (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 an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 $as_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 ac_config_headers="$ac_config_headers src/config.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:$LINENO: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 $as_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. $as_echo "$as_me:$LINENO: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? $as_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.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_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 | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { $as_echo "$as_me:$LINENO: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } if test -z "$ac_file"; then $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 $as_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. { $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_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 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } rm -f -r a.out a.out.dSYM 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. { $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } { $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } { $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_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 | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then $as_echo_n "(cached) " >&6 else cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_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 | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then $as_echo_n "(cached) " >&6 else cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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) { $as_echo "$as_me:$LINENO: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$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 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 $as_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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5 $as_echo_n "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. if test "${enable_nls+set}" = set; then enableval=$enable_nls; USE_NLS=$enableval else USE_NLS=yes fi { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 $as_echo "$USE_NLS" >&6; } case "$am__api_version" in 1.01234) { { $as_echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5 $as_echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;} { (exit 1); exit 1; }; } ;; *) ;; esac if test -n "0.35.0"; then { $as_echo "$as_me:$LINENO: checking for intltool >= 0.35.0" >&5 $as_echo_n "checking for intltool >= 0.35.0... " >&6; } INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.35.0 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` { $as_echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5 $as_echo "$INTLTOOL_APPLIED_VERSION found" >&6; } test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || { { $as_echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.35.0 or later." >&5 $as_echo "$as_me: error: Your intltool is too old. You need intltool 0.35.0 or later." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "intltool-update", so it can be a program name with args. set dummy intltool-update; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_INTLTOOL_UPDATE+set}" = set; then $as_echo_n "(cached) " >&6 else case $INTLTOOL_UPDATE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # 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_UPDATE="$as_dir/$ac_word$ac_exec_ext" $as_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_UPDATE=$ac_cv_path_INTLTOOL_UPDATE if test -n "$INTLTOOL_UPDATE"; then { $as_echo "$as_me:$LINENO: result: $INTLTOOL_UPDATE" >&5 $as_echo "$INTLTOOL_UPDATE" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "intltool-merge", so it can be a program name with args. set dummy intltool-merge; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_INTLTOOL_MERGE+set}" = set; then $as_echo_n "(cached) " >&6 else case $INTLTOOL_MERGE in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # 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_MERGE="$as_dir/$ac_word$ac_exec_ext" $as_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_MERGE=$ac_cv_path_INTLTOOL_MERGE if test -n "$INTLTOOL_MERGE"; then { $as_echo "$as_me:$LINENO: result: $INTLTOOL_MERGE" >&5 $as_echo "$INTLTOOL_MERGE" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "intltool-extract", so it can be a program name with args. set dummy intltool-extract; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_INTLTOOL_EXTRACT+set}" = set; then $as_echo_n "(cached) " >&6 else case $INTLTOOL_EXTRACT in [\\/]* | ?:[\\/]*) ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # 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_EXTRACT="$as_dir/$ac_word$ac_exec_ext" $as_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_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT if test -n "$INTLTOOL_EXTRACT"; then { $as_echo "$as_me:$LINENO: result: $INTLTOOL_EXTRACT" >&5 $as_echo "$INTLTOOL_EXTRACT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then { { $as_echo "$as_me:$LINENO: error: The intltool scripts were not found. Please install intltool." >&5 $as_echo "$as_me: error: The intltool scripts were not found. Please install intltool." >&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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then $as_echo_n "(cached) " >&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" $as_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 { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGMERGE+set}" = set; then $as_echo_n "(cached) " >&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" $as_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 { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5 $as_echo "$MSGMERGE" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then $as_echo_n "(cached) " >&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" $as_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 { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then $as_echo_n "(cached) " >&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" $as_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 { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5 $as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then $as_echo_n "(cached) " >&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" $as_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 { $as_echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5 $as_echo "$INTLTOOL_PERL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$INTLTOOL_PERL"; then { { $as_echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5 $as_echo "$as_me: error: perl 5.x required for intltool" >&2;} { (exit 1); exit 1; }; } fi if test "x" != "xno-xml"; then { $as_echo "$as_me:$LINENO: checking for XML::Parser" >&5 $as_echo_n "checking for XML::Parser... " >&6; } if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then { $as_echo "$as_me:$LINENO: result: ok" >&5 $as_echo "ok" >&6; } else { { $as_echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then DATADIRNAME=share else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 $as_echo_n "checking for bind_textdomain_codeset... " >&6; } if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_bind_textdomain_codeset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 $as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; } if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then DATADIRNAME=share else DATADIRNAME=lib fi ;; *) DATADIRNAME=lib ;; esac fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 $as_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 { $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 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 if test -z "$ac_cv_path_GREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:$LINENO: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 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 if test -z "$ac_cv_path_EGREP"; then { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 $as_echo "$as_me: error: no acceptable egrep 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 { $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then $as_echo_n "(cached) " >&6 else cat >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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$ac_try_echo") >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -rf conftest.dSYM rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi GETTEXT_PACKAGE=$PACKAGE_NAME GGN_LOCALEDIR="${datadir}/locale" am__api_version='1.10' { $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 $as_echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` 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= { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi 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 { $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:$LINENO: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null 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. { $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # 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 { $as_echo "$as_me:$LINENO: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 $as_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=gnome-gmail-notifier VERSION=0.10.1 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # 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 -' depcc="$CC" am_compiler_list= { $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi 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 { $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ALL_LINGUAS="es" # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in locale.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 $as_echo_n "checking $ac_header usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 $as_echo_n "checking $ac_header presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------- ## ## Report this to geekysuavo@gmail.com ## ## ----------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 $as_echo_n "checking for $ac_header... " >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi as_val=`eval 'as_val=${'$as_ac_Header'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then am_cv_val_LC_MESSAGES=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$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 { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5 $as_echo_n "checking for libintl.h... " >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then $as_echo_n "(cached) " >&6 fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 $as_echo "$ac_cv_header_libintl_h" >&6; } else # Is the header compilable? { $as_echo "$as_me:$LINENO: checking libintl.h usability" >&5 $as_echo_n "checking libintl.h usability... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:$LINENO: checking libintl.h presence" >&5 $as_echo_n "checking libintl.h presence... " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 $as_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 { $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { $as_echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 $as_echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} { $as_echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 $as_echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------- ## ## Report this to geekysuavo@gmail.com ## ## ----------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:$LINENO: checking for libintl.h" >&5 $as_echo_n "checking for libintl.h... " >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then $as_echo_n "(cached) " >&6 else ac_cv_header_libintl_h=$ac_header_preproc fi { $as_echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 $as_echo "$ac_cv_header_libintl_h" >&6; } fi if test "x$ac_cv_header_libintl_h" = x""yes; then gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:$LINENO: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gt_cv_func_ngettext_libc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_ngettext_libc=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:$LINENO: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then gt_cv_func_dgettext_libc=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_dgettext_libc=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$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=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done 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 { $as_echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_bindtextdomain=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi rm -rf conftest.dSYM 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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_ngettext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -rf conftest.dSYM 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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then { $as_echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_dgettext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -rf conftest.dSYM 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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = x""yes; then gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:$LINENO: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_ngettext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -rf conftest.dSYM 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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then { $as_echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_lib_intl_dcgettext=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dcgettext=no fi rm -rf conftest.dSYM 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 { $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = x""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=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done 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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then $as_echo_n "(cached) " >&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 { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 $as_echo_n "checking for $ac_func... " >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then eval "$as_ac_var=yes" else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } as_val=`eval 'as_val=${'$as_ac_var'} $as_echo "$as_val"'` if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -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 { ($as_echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "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 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then $as_echo_n "(cached) " >&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" $as_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 { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then $as_echo_n "(cached) " >&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 { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then CATOBJEXT=.gmo DATADIRNAME=share else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) { $as_echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 $as_echo_n "checking for bind_textdomain_codeset... " >&6; } if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then $as_echo_n "(cached) " >&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 ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" $as_echo "$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 $as_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 && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then ac_cv_func_bind_textdomain_codeset=yes else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -rf conftest.dSYM rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 $as_echo "$ac_cv_func_bind_textdomain_codeset" >&6; } if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -rf conftest.dSYM 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 { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "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 { $as_echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&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 { $as_echo "$as_me:$LINENO: result: $LINGUAS" >&5 $as_echo "$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 GLIB_REQUIRED=2.6.0 GTK_REQUIRED=2.12.0 GCONF_REQUIRED=2.20.0 LIBNOTIFY_REQUIRED=0.4.2 LIBSOUP_REQUIRED=2.4.0 LIBXML2_REQUIRED=2.6.20 GSTREAMER_REQUIRED=0.10.0 GNOME_KEYRING_REQUIRED=0.4.2 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { 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" $as_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 { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { 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" $as_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 { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:$LINENO: checking for GGN" >&5 $as_echo_n "checking for GGN... " >&6; } if test -n "$GGN_CFLAGS"; then pkg_cv_GGN_CFLAGS="$GGN_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= \$GTK_REQUIRED gconf-2.0 >= \$GCONF_REQUIRED libnotify >= \$LIBNOTIFY_REQUIRED libsoup-2.4 >= \$LIBSOUP_REQUIRED libxml-2.0 >= \$LIBXML2_REQUIRED gstreamer-0.10 >= \$GSTREAMER_REQUIRED gnome-keyring-1 >= \$GNOME_KEYRING_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GGN_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GGN_LIBS"; then pkg_cv_GGN_LIBS="$GGN_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= \$GTK_REQUIRED gconf-2.0 >= \$GCONF_REQUIRED libnotify >= \$LIBNOTIFY_REQUIRED libsoup-2.4 >= \$LIBSOUP_REQUIRED libxml-2.0 >= \$LIBXML2_REQUIRED gstreamer-0.10 >= \$GSTREAMER_REQUIRED gnome-keyring-1 >= \$GNOME_KEYRING_REQUIRED\"") >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_GGN_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_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 GGN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED" 2>&1` else GGN_PKG_ERRORS=`$PKG_CONFIG --print-errors "glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GGN_PKG_ERRORS" >&5 { { $as_echo "$as_me:$LINENO: error: Package requirements (glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED) were not met: $GGN_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 GGN_CFLAGS and GGN_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 $as_echo "$as_me: error: Package requirements (glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED) were not met: $GGN_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 GGN_CFLAGS and GGN_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 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { { $as_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 GGN_CFLAGS and GGN_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 $as_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 GGN_CFLAGS and GGN_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 GGN_CFLAGS=$pkg_cv_GGN_CFLAGS GGN_LIBS=$pkg_cv_GGN_LIBS { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } : fi # Extract the first word of "gst-inspect-0.10", so it can be a program name with args. set dummy gst-inspect-0.10; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GST_INSPECT+set}" = set; then $as_echo_n "(cached) " >&6 else case $GST_INSPECT in [\\/]* | ?:[\\/]*) ac_cv_path_GST_INSPECT="$GST_INSPECT" # 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_GST_INSPECT="$as_dir/$ac_word$ac_exec_ext" $as_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_GST_INSPECT" && ac_cv_path_GST_INSPECT="no" ;; esac fi GST_INSPECT=$ac_cv_path_GST_INSPECT if test -n "$GST_INSPECT"; then { $as_echo "$as_me:$LINENO: result: $GST_INSPECT" >&5 $as_echo "$GST_INSPECT" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$GST_INSPECT = xno; then { { $as_echo "$as_me:$LINENO: error: Could not find a gst-inspect in your PATH" >&5 $as_echo "$as_me: error: Could not find a gst-inspect in your PATH" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: checking for gstreamer filesrc plugin" >&5 $as_echo_n "checking for gstreamer filesrc plugin... " >&6; } if $GST_INSPECT filesrc >/dev/null 2>/dev/null; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:$LINENO: error: Could not find gstreamer plugin '$element'" >&5 $as_echo "$as_me: error: Could not find gstreamer plugin '$element'" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: checking for gstreamer wavparse plugin" >&5 $as_echo_n "checking for gstreamer wavparse plugin... " >&6; } if $GST_INSPECT wavparse >/dev/null 2>/dev/null; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:$LINENO: error: Could not find gstreamer plugin '$element'" >&5 $as_echo "$as_me: error: Could not find gstreamer plugin '$element'" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: checking for gstreamer audioconvert plugin" >&5 $as_echo_n "checking for gstreamer audioconvert plugin... " >&6; } if $GST_INSPECT audioconvert >/dev/null 2>/dev/null; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:$LINENO: error: Could not find gstreamer plugin '$element'" >&5 $as_echo "$as_me: error: Could not find gstreamer plugin '$element'" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: checking for gstreamer audioresample plugin" >&5 $as_echo_n "checking for gstreamer audioresample plugin... " >&6; } if $GST_INSPECT audioresample >/dev/null 2>/dev/null; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:$LINENO: error: Could not find gstreamer plugin '$element'" >&5 $as_echo "$as_me: error: Could not find gstreamer plugin '$element'" >&2;} { (exit 1); exit 1; }; } fi { $as_echo "$as_me:$LINENO: checking for gstreamer autoaudiosink plugin" >&5 $as_echo_n "checking for gstreamer autoaudiosink plugin... " >&6; } if $GST_INSPECT autoaudiosink >/dev/null 2>/dev/null; then { $as_echo "$as_me:$LINENO: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:$LINENO: error: Could not find gstreamer plugin '$element'" >&5 $as_echo "$as_me: error: Could not find gstreamer plugin '$element'" >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "glib-genmarshal", so it can be a program name with args. set dummy glib-genmarshal; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GLIB_GENMARSHAL+set}" = set; then $as_echo_n "(cached) " >&6 else case $GLIB_GENMARSHAL in [\\/]* | ?:[\\/]*) ac_cv_path_GLIB_GENMARSHAL="$GLIB_GENMARSHAL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GLIB_GENMARSHAL="$as_dir/$ac_word$ac_exec_ext" $as_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_GLIB_GENMARSHAL" && ac_cv_path_GLIB_GENMARSHAL="no" ;; esac fi GLIB_GENMARSHAL=$ac_cv_path_GLIB_GENMARSHAL if test -n "$GLIB_GENMARSHAL"; then { $as_echo "$as_me:$LINENO: result: $GLIB_GENMARSHAL" >&5 $as_echo "$GLIB_GENMARSHAL" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi if test x$GLIB_GENMARSHAL = xno; then { { $as_echo "$as_me:$LINENO: error: Could not find a glib-genmarshal in your PATH" >&5 $as_echo "$as_me: error: Could not find a glib-genmarshal in your PATH" >&2;} { (exit 1); exit 1; }; } fi ac_config_files="$ac_config_files Makefile src/Makefile po/Makefile.in data/Makefile data/gnome-gmail-notifier.desktop data/ggn-about.xml data/ggn-prefs.xml data/ggn-edit.xml data/ggn-menu.xml" ac_config_commands="$ac_config_commands default" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) $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" && { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. 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 ac_config_commands="$ac_config_commands po/stamp-it" if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_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 { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 $as_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 : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # 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.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); 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. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # 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 || $as_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" || { $as_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 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: 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 gnome-gmail-notifier $as_me 0.10.1, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ gnome-gmail-notifier config.status 0.10.1 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { $as_echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { $as_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 || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "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" ;; "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; "data/gnome-gmail-notifier.desktop") CONFIG_FILES="$CONFIG_FILES data/gnome-gmail-notifier.desktop" ;; "data/ggn-about.xml") CONFIG_FILES="$CONFIG_FILES data/ggn-about.xml" ;; "data/ggn-prefs.xml") CONFIG_FILES="$CONFIG_FILES data/ggn-prefs.xml" ;; "data/ggn-edit.xml") CONFIG_FILES="$CONFIG_FILES data/ggn-edit.xml" ;; "data/ggn-menu.xml") CONFIG_FILES="$CONFIG_FILES data/ggn-menu.xml" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;; *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 $as_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") } || { $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=' ' ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 $as_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 rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\).*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\).*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 $as_echo "$as_me: error: could not setup config files machinery" >&2;} { (exit 1); exit 1; }; } _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 $as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 $as_echo "$as_me: error: could not setup config headers machinery" >&2;} { (exit 1); exit 1; }; } fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 $as_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 || { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; 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 '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" 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=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 $as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 $as_echo "$as_me: error: could not create -" >&2;} { (exit 1); exit 1; }; } fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir 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=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 $as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; "default":C) echo timestamp > stamp-h ;; "po/stamp-it":C) if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" ; then { { $as_echo "$as_me:$LINENO: error: po/Makefile.in.in was not created by intltoolize." >&5 $as_echo "$as_me: error: po/Makefile.in.in was not created by intltoolize." >&2;} { (exit 1); exit 1; }; } fi 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" sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r po/POTFILES } ' "po/Makefile.in" >"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 test $ac_write_fail = 0 || { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 $as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } # 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 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gnome-gmail-notifier-0.10.1/configure.ac0000644000175000017520000000505011357667301015024 00000000000000AC_PREREQ(2.52) AC_INIT(gnome-gmail-notifier, 0.10.1, geekysuavo@gmail.com) AC_CONFIG_SRCDIR(src/main.c) AM_CONFIG_HEADER(src/config.h) AC_PROG_CC AC_PROG_INSTALL AC_PROG_INTLTOOL([0.35.0]) AC_STDC_HEADERS GETTEXT_PACKAGE=$PACKAGE_NAME GGN_LOCALEDIR="${datadir}/locale" AC_SUBST(GETTEXT_PACKAGE) AC_SUBST(GGN_LOCALEDIR) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) ALL_LINGUAS="es" AM_GLIB_GNU_GETTEXT GLIB_REQUIRED=2.6.0 GTK_REQUIRED=2.12.0 GCONF_REQUIRED=2.20.0 LIBNOTIFY_REQUIRED=0.4.2 LIBSOUP_REQUIRED=2.4.0 LIBXML2_REQUIRED=2.6.20 GSTREAMER_REQUIRED=0.10.0 GNOME_KEYRING_REQUIRED=0.4.2 AC_SUBST(GLIB_REQUIRED) AC_SUBST(GTK_REQUIRED) AC_SUBST(GCONF_REQUIRED) AC_SUBST(LIBNOTIFY_REQUIRED) AC_SUBST(LIBSOUP_REQUIRED) AC_SUBST(LIBXML2_REQUIRED) AC_SUBST(GSTREAMER_REQUIRED) AC_SUBST(GNOME_KEYRING_REQUIRED) PKG_CHECK_MODULES(GGN, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED gconf-2.0 >= $GCONF_REQUIRED libnotify >= $LIBNOTIFY_REQUIRED libsoup-2.4 >= $LIBSOUP_REQUIRED libxml-2.0 >= $LIBXML2_REQUIRED gstreamer-0.10 >= $GSTREAMER_REQUIRED gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED) AC_SUBST(GGN_CFLAGS) AC_SUBST(GGN_LIBS) AC_PATH_PROG(GST_INSPECT, gst-inspect-0.10, no) if test x$GST_INSPECT = xno; then AC_MSG_ERROR([Could not find a gst-inspect in your PATH]) fi AC_SUBST(GST_INSPECT) AC_DEFUN([GGN_CHECK_GSTREAMER_PLUGIN], [ AC_MSG_CHECKING([for gstreamer $1 plugin]) if $GST_INSPECT $1 >/dev/null 2>/dev/null; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([Could not find gstreamer plugin '$element']) fi ]) GGN_CHECK_GSTREAMER_PLUGIN([filesrc]) GGN_CHECK_GSTREAMER_PLUGIN([wavparse]) GGN_CHECK_GSTREAMER_PLUGIN([audioconvert]) GGN_CHECK_GSTREAMER_PLUGIN([audioresample]) GGN_CHECK_GSTREAMER_PLUGIN([autoaudiosink]) AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, no) if test x$GLIB_GENMARSHAL = xno; then AC_MSG_ERROR([Could not find a glib-genmarshal in your PATH]) fi AC_SUBST(GLIB_GENMARSHAL) AC_CONFIG_FILES([Makefile src/Makefile po/Makefile.in data/Makefile data/gnome-gmail-notifier.desktop data/ggn-about.xml data/ggn-prefs.xml data/ggn-edit.xml data/ggn-menu.xml]) AC_CONFIG_COMMANDS([default], [[ echo timestamp > stamp-h ]], [[]]) AC_OUTPUT gnome-gmail-notifier-0.10.1/po/0000777000175000017520000000000011357667402013242 500000000000000gnome-gmail-notifier-0.10.1/po/es.po0000644000175000017520000001252311357667301014126 00000000000000# Translation of gnome-gmail-notifier.pot to Español. # Traducción de gnome-gmail-notifier.po a Español. # # Copyright (C) 2010 Bradley A. Worley. # This file is distributed under the same # license as the gnome-gmail-notifier package. # # Bradley A. Worley , 2010. # msgid "" msgstr "" "Project-Id-Version: gnome-gmail-notifier-0.10.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-04-09 10:14-0500\n" "PO-Revision-Date: 2010-04-09 10:15-0500\n" "Last-Translator: Bradley A. Worley \n" "Language-Team: Español \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../data/ggn-about.xml.in.h:1 msgid "A Gmail Inbox Monitor for the GNOME2 desktop" msgstr "Un Monitor del Gmail Bandeja de Entrada para GNOME2" #: ../data/ggn-about.xml.in.h:2 msgid "Copyright © 2010 Bradley Worley" msgstr "Copyright © 2010 Bradley Worley" #: ../data/ggn-about.xml.in.h:3 msgid "translator-credits" msgstr "Bradley A. Worley , 2010" #: ../data/ggn-edit.xml.in.h:1 msgid "Composition" msgstr "Composición" #: ../data/ggn-edit.xml.in.h:2 msgid "Description" msgstr "Descripción" #: ../data/ggn-edit.xml.in.h:3 msgid "Gmail Login" msgstr "Gmail Login" #: ../data/ggn-edit.xml.in.h:4 msgid "Domain:" msgstr "Dominio:" #: ../data/ggn-edit.xml.in.h:5 msgid "Edit Account" msgstr "Editar Cuenta" #: ../data/ggn-edit.xml.in.h:6 msgid "Name:" msgstr "Nombre:" #: ../data/ggn-edit.xml.in.h:7 msgid "Password:" msgstr "Contraseña:" #: ../data/ggn-edit.xml.in.h:8 msgid "Use this account to compose messages" msgstr "Usar esta cuenta para componer correos" #: ../data/ggn-edit.xml.in.h:9 msgid "Username:" msgstr "Usuario:" #: ../data/ggn-menu.xml.in.h:1 msgid "_Check Mail" msgstr "_Comprobar el Correo" #: ../data/ggn-menu.xml.in.h:2 msgid "_Quit" msgstr "_Dejar" #: ../data/ggn-prefs.xml.in.h:1 msgid "Audio Notifications" msgstr "Notificaciones de Audio" #: ../data/ggn-prefs.xml.in.h:2 msgid "Gmail Accounts" msgstr "Cuentas de Gmail" #: ../data/ggn-prefs.xml.in.h:3 msgid "Inbox Updates" msgstr "Actualizaciones" #: ../data/ggn-prefs.xml.in.h:4 msgid "Visual Notifications" msgstr "Notificacions Visuales" #: ../data/ggn-prefs.xml.in.h:5 msgid "Check with Gmail for messages every:" msgstr "Comprobar para correos nuevos cada:" #: ../data/ggn-prefs.xml.in.h:6 msgid "Display notifications for inbox errors" msgstr "Mostrar notificaciones para errores" #: ../data/ggn-prefs.xml.in.h:7 msgid "Display notifications for new messsages" msgstr "Mostrar notificaciones para correos nuevos" #: ../data/ggn-prefs.xml.in.h:8 msgid "Gmail Notifier Preferences" msgstr "Preferencias del Gmail Notifier" #: ../data/ggn-prefs.xml.in.h:9 msgid "Play a sound upon receipt of new mail" msgstr "Reproducir un sonido al recibir correos nuevos" #: ../data/ggn-prefs.xml.in.h:10 msgid "Select A Sound File" msgstr "Elegir un Archivo de Sonido" #. #. * define the constant-valued strings to use for notification. #. #: ../src/ggn-manager.c:51 msgid "Checking mail..." msgstr "Comprobando para correos..." #: ../src/ggn-manager.c:52 msgid "No accounts configured" msgstr "Ninguna cuenta configurada" #: ../src/ggn-manager.c:53 ../src/ggn-manager.c:56 msgid "Unable to check mail" msgstr "No puede comprobar correo" #: ../src/ggn-manager.c:54 ../src/ggn-manager.c:58 msgid "No new messages" msgstr "No hay correos nuevos" #: ../src/ggn-manager.c:55 msgid "No accounts are configured" msgstr "Ningunas cuentas están configuradas" #: ../src/ggn-manager.c:57 msgid "You have new mail" msgstr "Tiene correos nuevos" #: ../src/ggn-manager.c:59 msgid "Please add one or more accounts using the Preferences window." msgstr "" "Por favor, añada una o más cuentas utilizando la Ventana de Preferencias" #. add information to the tooltip. #: ../src/ggn-manager.c:197 #, c-format msgid "%d unread for %s" msgstr "%d no leído para %s" #. use the advanced title gstring. #: ../src/ggn-manager.c:238 #, c-format msgid "New mail from %s" msgstr "Correo nuevo de %s" #. add the first part of the summary gstring. #: ../src/ggn-manager.c:256 #, c-format msgid "There are %d new messages for" msgstr "Hay %d correos nuevos para" #. last. #: ../src/ggn-manager.c:281 ../src/ggn-manager.c:321 ../src/ggn-manager.c:428 msgid "and" msgstr "y" #. first. #: ../src/ggn-manager.c:316 msgid "from" msgstr "de" #. allocate a new summary gstring. #: ../src/ggn-manager.c:408 msgid "Errors occurred while checking mail for" msgstr "Se han producido errores durante la comprobación de correo para" #: ../src/ggn-manager.c:682 msgid "unread" msgstr "no leído" #. create the label. #: ../src/ggn-manager.c:744 msgid "Compose New Message" msgstr "Componer Una Mensaje" #. set the default account values. #: ../src/ggn-prefs-window.c:372 msgid "New Account" msgstr "Nueva Cuenta" #. singular value. #: ../src/ggn-prefs-window.c:538 msgid "minute" msgstr "minuto" #. plural value 2-9. #. plural value 10-60. #: ../src/ggn-prefs-window.c:542 ../src/ggn-prefs-window.c:546 msgid "minutes" msgstr "minutos" #: ../src/ggn-prefs-window.c:850 msgid "Enabled" msgstr "Activado" #: ../src/ggn-prefs-window.c:856 msgid "Name" msgstr "Nombre" #: ../src/ggn-prefs-window.c:882 msgid "Wave audio files" msgstr "Archivos de audio WAV" gnome-gmail-notifier-0.10.1/po/POTFILES.in0000644000175000017520000000047211357667301014734 00000000000000# List of source files containing translatable strings. # Please keep this file sorted alphabetically. [type: gettext/glade]data/ggn-about.xml.in [type: gettext/glade]data/ggn-edit.xml.in [type: gettext/glade]data/ggn-menu.xml.in [type: gettext/glade]data/ggn-prefs.xml.in src/ggn-manager.c src/ggn-prefs-window.c gnome-gmail-notifier-0.10.1/po/ChangeLog0000644000175000017520000000000011357667301014714 00000000000000gnome-gmail-notifier-0.10.1/po/gnome-gmail-notifier.pot0000644000175000017520000001025511357667301017714 00000000000000# SOME DESCRIPTIVE TITLE. # # Copyright (C) 2010 Bradley A. Worley. # This file is distributed under the same # license as the gnome-gmail-notifier package. # # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-04-09 10:14-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: ../data/ggn-about.xml.in.h:1 msgid "A Gmail Inbox Monitor for the GNOME2 desktop" msgstr "" #: ../data/ggn-about.xml.in.h:2 msgid "Copyright © 2010 Bradley Worley" msgstr "" #: ../data/ggn-about.xml.in.h:3 msgid "translator-credits" msgstr "" #: ../data/ggn-edit.xml.in.h:1 msgid "Composition" msgstr "" #: ../data/ggn-edit.xml.in.h:2 msgid "Description" msgstr "" #: ../data/ggn-edit.xml.in.h:3 msgid "Gmail Login" msgstr "" #: ../data/ggn-edit.xml.in.h:4 msgid "Domain:" msgstr "" #: ../data/ggn-edit.xml.in.h:5 msgid "Edit Account" msgstr "" #: ../data/ggn-edit.xml.in.h:6 msgid "Name:" msgstr "" #: ../data/ggn-edit.xml.in.h:7 msgid "Password:" msgstr "" #: ../data/ggn-edit.xml.in.h:8 msgid "Use this account to compose messages" msgstr "" #: ../data/ggn-edit.xml.in.h:9 msgid "Username:" msgstr "" #: ../data/ggn-menu.xml.in.h:1 msgid "_Check Mail" msgstr "" #: ../data/ggn-menu.xml.in.h:2 msgid "_Quit" msgstr "" #: ../data/ggn-prefs.xml.in.h:1 msgid "Audio Notifications" msgstr "" #: ../data/ggn-prefs.xml.in.h:2 msgid "Gmail Accounts" msgstr "" #: ../data/ggn-prefs.xml.in.h:3 msgid "Inbox Updates" msgstr "" #: ../data/ggn-prefs.xml.in.h:4 msgid "Visual Notifications" msgstr "" #: ../data/ggn-prefs.xml.in.h:5 msgid "Check with Gmail for messages every:" msgstr "" #: ../data/ggn-prefs.xml.in.h:6 msgid "Display notifications for inbox errors" msgstr "" #: ../data/ggn-prefs.xml.in.h:7 msgid "Display notifications for new messsages" msgstr "" #: ../data/ggn-prefs.xml.in.h:8 msgid "Gmail Notifier Preferences" msgstr "" #: ../data/ggn-prefs.xml.in.h:9 msgid "Play a sound upon receipt of new mail" msgstr "" #: ../data/ggn-prefs.xml.in.h:10 msgid "Select A Sound File" msgstr "" #. #. * define the constant-valued strings to use for notification. #. #: ../src/ggn-manager.c:51 msgid "Checking mail..." msgstr "" #: ../src/ggn-manager.c:52 msgid "No accounts configured" msgstr "" #: ../src/ggn-manager.c:53 ../src/ggn-manager.c:56 msgid "Unable to check mail" msgstr "" #: ../src/ggn-manager.c:54 ../src/ggn-manager.c:58 msgid "No new messages" msgstr "" #: ../src/ggn-manager.c:55 msgid "No accounts are configured" msgstr "" #: ../src/ggn-manager.c:57 msgid "You have new mail" msgstr "" #: ../src/ggn-manager.c:59 msgid "Please add one or more accounts using the Preferences window." msgstr "" #. add information to the tooltip. #: ../src/ggn-manager.c:197 #, c-format msgid "%d unread for %s" msgstr "" #. use the advanced title gstring. #: ../src/ggn-manager.c:238 #, c-format msgid "New mail from %s" msgstr "" #. add the first part of the summary gstring. #: ../src/ggn-manager.c:256 #, c-format msgid "There are %d new messages for" msgstr "" #. last. #: ../src/ggn-manager.c:281 ../src/ggn-manager.c:321 ../src/ggn-manager.c:428 msgid "and" msgstr "" #. first. #: ../src/ggn-manager.c:316 msgid "from" msgstr "" #. allocate a new summary gstring. #: ../src/ggn-manager.c:408 msgid "Errors occurred while checking mail for" msgstr "" #: ../src/ggn-manager.c:682 msgid "unread" msgstr "" #. create the label. #: ../src/ggn-manager.c:744 msgid "Compose New Message" msgstr "" #. set the default account values. #: ../src/ggn-prefs-window.c:372 msgid "New Account" msgstr "" #. singular value. #: ../src/ggn-prefs-window.c:538 msgid "minute" msgstr "" #. plural value 2-9. #. plural value 10-60. #: ../src/ggn-prefs-window.c:542 ../src/ggn-prefs-window.c:546 msgid "minutes" msgstr "" #: ../src/ggn-prefs-window.c:850 msgid "Enabled" msgstr "" #: ../src/ggn-prefs-window.c:856 msgid "Name" msgstr "" #: ../src/ggn-prefs-window.c:882 msgid "Wave audio files" msgstr "" gnome-gmail-notifier-0.10.1/po/POTFILES.skip0000644000175000017520000000015711357667301015274 00000000000000data/ggn-about.xml data/ggn-edit.xml data/ggn-menu.xml data/ggn-prefs.xml data/gnome-gmail-notifier.desktop.in gnome-gmail-notifier-0.10.1/po/Makefile.in.in0000644000175000017520000001541211357667334015637 00000000000000# 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; else echo "$(ALL_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 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(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="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) DISTFILES = Makefile.in.in POTFILES.in $(POFILES) EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS gnome-gmail-notifier.pot 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 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: gnome-gmail-notifier-0.10.1/po/LINGUAS0000644000175000017520000000006311357667301014200 00000000000000# please keep this list sorted alphabetically # es gnome-gmail-notifier-0.10.1/src/0000777000175000017520000000000011357667402013413 500000000000000gnome-gmail-notifier-0.10.1/src/ggn-marshal.c0000644000175000017520000001631111357667363015703 00000000000000#include "ggn-marshal.h" #include #ifdef G_ENABLE_DEBUG #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) #define g_marshal_value_peek_char(v) g_value_get_char (v) #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) #define g_marshal_value_peek_int(v) g_value_get_int (v) #define g_marshal_value_peek_uint(v) g_value_get_uint (v) #define g_marshal_value_peek_long(v) g_value_get_long (v) #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) #define g_marshal_value_peek_enum(v) g_value_get_enum (v) #define g_marshal_value_peek_flags(v) g_value_get_flags (v) #define g_marshal_value_peek_float(v) g_value_get_float (v) #define g_marshal_value_peek_double(v) g_value_get_double (v) #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) #define g_marshal_value_peek_param(v) g_value_get_param (v) #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) #define g_marshal_value_peek_object(v) g_value_get_object (v) #else /* !G_ENABLE_DEBUG */ /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. * Do not access GValues directly in your code. Instead, use the * g_value_get_*() functions */ #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int #define g_marshal_value_peek_char(v) (v)->data[0].v_int #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint #define g_marshal_value_peek_int(v) (v)->data[0].v_int #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint #define g_marshal_value_peek_long(v) (v)->data[0].v_long #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 #define g_marshal_value_peek_enum(v) (v)->data[0].v_long #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong #define g_marshal_value_peek_float(v) (v)->data[0].v_float #define g_marshal_value_peek_double(v) (v)->data[0].v_double #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer #endif /* !G_ENABLE_DEBUG */ /* NONE:NONE (./ggn-marshal.list:1) */ /* NONE:BOOLEAN (./ggn-marshal.list:2) */ /* NONE:STRING,STRING,OBJECT (./ggn-marshal.list:3) */ void ggn_marshal_VOID__STRING_STRING_OBJECT (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_STRING_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, gpointer data2); register GMarshalFunc_VOID__STRING_STRING_OBJECT callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_STRING_OBJECT) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_object (param_values + 3), data2); } /* NONE:STRING,STRING (./ggn-marshal.list:4) */ void ggn_marshal_VOID__STRING_STRING (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2); register GMarshalFunc_VOID__STRING_STRING callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 3); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), data2); } /* NONE:STRING,STRING,STRING (./ggn-marshal.list:5) */ void ggn_marshal_VOID__STRING_STRING_STRING (GClosure *closure, GValue *return_value G_GNUC_UNUSED, guint n_param_values, const GValue *param_values, gpointer invocation_hint G_GNUC_UNUSED, gpointer marshal_data) { typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer arg_3, gpointer data2); register GMarshalFunc_VOID__STRING_STRING_STRING callback; register GCClosure *cc = (GCClosure*) closure; register gpointer data1, data2; g_return_if_fail (n_param_values == 4); if (G_CCLOSURE_SWAP_DATA (closure)) { data1 = closure->data; data2 = g_value_peek_pointer (param_values + 0); } else { data1 = g_value_peek_pointer (param_values + 0); data2 = closure->data; } callback = (GMarshalFunc_VOID__STRING_STRING_STRING) (marshal_data ? marshal_data : cc->callback); callback (data1, g_marshal_value_peek_string (param_values + 1), g_marshal_value_peek_string (param_values + 2), g_marshal_value_peek_string (param_values + 3), data2); } gnome-gmail-notifier-0.10.1/src/ggn-account-list.c0000644000175000017520000005413211357667274016665 00000000000000/** * @file src/ggn-account-list.c The GgnAccountList object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnAccountList * @short_description: The account list object * @include: src/ggn-account-list.h **/ /* * include our application header. */ #include #include "ggn-account-list-priv.h" #include "ggn-account-priv.h" /* * forward function definitions. */ static void ggn_account_list_init (GgnAccountList *self); static void ggn_account_list_class_init (GgnAccountListClass *klass); static void ggn_account_list_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnAccountList, ggn_account_list, G_TYPE_OBJECT); /* * define the signals used. */ enum { MODIFIED, CHECKED, FAILED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; /** * ggn_account_list_default_modified_cb: * @alist: The account list which emitted the signal. * * This is the default "modified" callback function manager. * * Returns: void. **/ static void ggn_account_list_default_modified_cb (GgnAccountList *alist) { /* do nothing. */ } /** * ggn_account_list_default_checked_cb: * @alist: The account list which emitted the signal. * * This is the default "checked" callback function manager. * * Returns: void. **/ static void ggn_account_list_default_checked_cb (GgnAccountList *alist) { /* do nothing. */ } /** * ggn_account_list_default_failed_cb: * @alist: The account list which emitted the signal. * * This is the default "failed" callback function manager. * * Returns: void. **/ static void ggn_account_list_default_failed_cb (GgnAccountList *alist) { /* do nothing. */ } /** * ggn_account_list_account_modified: * @account: The account that was modified. * @data: The account list pointer. * * This function is called when a managed #GgnAccount emits its "modified" * signal. * * Returns: void. **/ static void ggn_account_list_account_modified (GgnAccount *account, gpointer data) { /* gain a reference to our account list. */ GgnAccountList *alist = GGN_ACCOUNT_LIST (data); /* emit the modified signal. */ g_signal_emit (alist, signals[MODIFIED], 0); } /** * ggn_account_list_account_updated: * @account: The account that was checked. * @data: The account list pointer. * * This function is called when a managed #GgnAccount emits its "updated" * signal. * * Returns: void. **/ static void ggn_account_list_account_updated (GgnAccount *emitter, gpointer data) { /* declare a few helping variables. */ gboolean success; gboolean enab; guint state, idx, num_unread, num_new; /* gain a reference to our account list. */ GgnAccountList *alist = GGN_ACCOUNT_LIST (data); /* let's be optimistic. */ success = TRUE; /* loop through all of the accounts. */ for (idx = 0; idx < alist->priv->accounts->len; idx++) { /* get the account at the given index. */ alist->priv->account = ggn_account_list_get (alist, idx); /* get the account state and enabled info. */ enab = ggn_account_get_enabled (alist->priv->account); state = ggn_account_get_state (alist->priv->account); /* get the account entry counts. */ ggn_account_get_num_entries (alist->priv->account, &num_unread, &num_new); /* only look at enabled accounts. */ if (enab == FALSE) continue; /* only emit if we are done with checking. */ if (state == GGN_ACCOUNT_STATE_CHECKING) { /* reset the counters and wait for the final account to finish. */ alist->priv->num_nonempty = 0; alist->priv->num_failed = 0; alist->priv->num_unread_entries = 0; alist->priv->num_new_entries = 0; return; } /* see if the account is outside the criteria for a successful check. */ if (state == GGN_ACCOUNT_STATE_CHECKED) { /* if there are messages... */ if (num_unread + num_new > 0) { /* increment the non-empty counter. */ alist->priv->num_nonempty++; /* add these messages to the total entry counts. */ alist->priv->num_unread_entries += num_unread; alist->priv->num_new_entries += num_new; } } else { /* we have failed to successfully check all accounts. */ success = FALSE; /* increment the failure counter. */ if (state == GGN_ACCOUNT_STATE_FAILED) alist->priv->num_failed++; } } /* emit the appropriate signal. */ if (success == TRUE) { /* emit the "checked" signal. */ g_signal_emit (alist, signals[CHECKED], 0); } else { /* emit the "failed" signal. */ g_signal_emit (alist, signals[FAILED], 0); } } /** * ggn_account_list_accounts_clear: * @alist: The account list to modify. * * Clears the entries #GPtrArray of a given #GgnAccountList. private only. * * Returns: void. **/ void ggn_account_list_accounts_clear (GgnAccountList *alist) { /* define a helping variable. */ gpointer ptr; /* loop until the pointer array is empty. */ while (alist->priv->accounts->len > 0) { /* remove the first pointer. */ ptr = g_ptr_array_index (alist->priv->accounts, 0); g_ptr_array_remove_fast (alist->priv->accounts, ptr); /* free the entry (pointer). */ ggn_account_free ((GgnAccount *) ptr); } } /* * ggn_account_list_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_account_list_init (GgnAccountList *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnAccountListPrivate, 1); /* set the preferences object to NULL. */ self->priv->prefs = NULL; /* setup the pointer array. */ self->priv->accounts = g_ptr_array_new (); self->priv->account = NULL; /* initialize the count variables. */ self->priv->num_nonempty = 0; self->priv->num_failed = 0; self->priv->num_unread_entries = 0; self->priv->num_new_entries = 0; } /* * ggn_account_list_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_account_list_class_init (GgnAccountListClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_account_list_finalize; /* setup the default signal handlers. */ klass->modified = ggn_account_list_default_modified_cb; klass->checked = ggn_account_list_default_checked_cb; klass->failed = ggn_account_list_default_failed_cb; /** * GgnAccountList::modified: * @alist: The #GgnAccountList object that issued the callback. * * Emitted when the account information is changed by a get/set function **/ signals[MODIFIED] = g_signal_new ("modified", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnAccountListClass, modified), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GgnAccountList::checked: * @alist: The #GgnAccountList object that issued the callback. * * Emitted when the account status is changed by a check action. **/ signals[CHECKED] = g_signal_new ("checked", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnAccountListClass, checked), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GgnAccountList::failed: * @alist: The #GgnAccountList object that issued the callback. * * Emitted when the account checking action fails. **/ signals[FAILED] = g_signal_new ("failed", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnAccountListClass, failed), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); } /* * ggn_account_list_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_account_list_finalize (GObject *obj) { /* make a reference to ourself. */ GgnAccountList *self = GGN_ACCOUNT_LIST (obj); /* reduce the reference count on our prefs object. */ if (self->priv->prefs) g_object_unref (G_OBJECT (self->priv->prefs)); /* free the accounts list. */ ggn_account_list_accounts_clear (self); g_ptr_array_free (self->priv->accounts, TRUE); /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_account_list_parent_class)->finalize (obj); } /** * ggn_account_list_new: * * Creates a new #GgnAccountList with default values, which are * used to manage gmail accounts for the notifier. * * Returns: the new #GgnAccountList object. Free with ggn_account_list_free(). **/ GgnAccountList *ggn_account_list_new (void) { /* make a newly created gobject. */ GgnAccountList *alist = g_object_new (GGN_TYPE_ACCOUNT_LIST, NULL); /* return the new object. */ return alist; } /** * ggn_account_list_new_from_prefs: * @prefs: The #GgnPrefs object to use. * * Creates a new #GgnAccountList with values which are pulled from the * given #GgnPrefs object, which simplifies the initialization of the * account list for outside managing objects. * * Returns: the new #GgnAccountList object. Free with ggn_account_list_free(). **/ GgnAccountList *ggn_account_list_new_from_prefs (GgnPrefs *prefs) { /* declare a few helping variables. */ GSList *emails; gchar *email; guint num; /* make a newly created gobject. */ GgnAccountList *alist = g_object_new (GGN_TYPE_ACCOUNT_LIST, NULL); /* ensure the prefs object is non-NULL. */ if (!prefs) return alist; /* set the preferences object and increase its reference count. */ alist->priv->prefs = prefs; g_object_ref (prefs); /* pull in the list of emails we have. */ emails = ggn_prefs_get_list (alist->priv->prefs, GGN_PREF_ACCOUNT_LIST); /* operate only if we have a list to use. */ if (emails) { /* loop for the number of emails in the list. */ for (num = 0; num < g_slist_length (emails); num++) { /* get the email string. */ email = (gchar *) g_slist_nth_data (emails, num); /* create the given account object. */ alist->priv->account = ggn_account_new_from_prefs (alist->priv->prefs, email); /* connect to the "modified" signal. */ alist->priv->account->priv->handler_modified = g_signal_connect (G_OBJECT (alist->priv->account), "modified", G_CALLBACK (ggn_account_list_account_modified), alist); /* connect to the "updated" signal. */ alist->priv->account->priv->handler_updated = g_signal_connect (G_OBJECT (alist->priv->account), "updated", G_CALLBACK (ggn_account_list_account_updated), alist); /* add the account to the list. */ g_ptr_array_add (alist->priv->accounts, alist->priv->account); } /* free the emails list. */ g_slist_free (emails); } /* return the new object. */ return alist; } /** * ggn_account_list_free: * @alist: The #GgnAccountList to free. * * Frees the given #GgnAccountList object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_account_list_free (GgnAccountList *alist) { /* while this object exists... */ while (G_IS_OBJECT (alist)) { /* unreference this object. */ g_object_unref (G_OBJECT (alist)); } } /** * ggn_account_list_length: * @alist: The #GgnAccountList to utilize. * * Returns the number of #GgnAccount objects that the given #GgnAccountList * is managing inside its #GPtrArray. * * Returns: A #guint representing the number of accounts we have. **/ guint ggn_account_list_length (GgnAccountList *alist) { /* return the length of the pointer array. */ return alist->priv->accounts->len; } /** * ggn_account_list_get_num_nonempty: * @alist: The #GgnAccountList to utilize. * * Returns the number of #GgnAccount objects that the given #GgnAccountList * is managing inside its #GPtrArray, but only those which contain new or * unread entries. * * Returns: A #guint representing the number of non-empty accounts we have. **/ guint ggn_account_list_get_num_nonempty (GgnAccountList *alist) { /* return the pre-computed value. */ return alist->priv->num_nonempty; } /** * ggn_account_list_get_num_enabled: * @alist: The #GgnAccountList to utilize. * * Returns the number of #GgnAccount objects that the given #GgnAccountList * is managing inside its #GPtrArray, but only those which are enabled and * not already checking mail. * * Returns: A #guint representing the number of accounts we have. **/ guint ggn_account_list_get_num_enabled (GgnAccountList *alist) { /* declare some helping variables. */ guint idx, num; /* initially... */ num = 0; /* loop through the accounts. */ for (idx = 0; idx < alist->priv->accounts->len; idx++) { /* gain a reference to the account. */ alist->priv->account = (GgnAccount *) g_ptr_array_index (alist->priv->accounts, idx); /* is the account enabled? */ if (ggn_account_get_enabled (alist->priv->account)) num++; } /* return the computed value. */ return num; } /** * ggn_account_list_get_num_failed: * @alist: The #GgnAccountList to utilize. * * Returns the number of failed #GgnAccount objects that the given * #GgnAccountList is managing inside its #GPtrArray. * * Returns: A #guint representing the number of accounts which have failed. **/ guint ggn_account_list_get_num_failed (GgnAccountList *alist) { /* return the pre-computed value. */ return alist->priv->num_failed; } /** * ggn_account_list_get_num_entries: * @alist: The #GgnAccountList to utilize. * @n_unread: A pointer to the total unread entry counter. * @n_new: A pointer to the total new entry counter. * * Returns the numbers of entries, both unread and new, which have * been summed up over all managed accounts during the check. * * Returns: void. **/ void ggn_account_list_get_num_entries (GgnAccountList *alist, guint *n_unread, guint *n_new) { /* return the pointed-to values. */ *n_unread = alist->priv->num_unread_entries; *n_new = alist->priv->num_new_entries; } /** * ggn_account_list_is_checking: * @alist: The #GgnAccountList to utilize. * * Returns whether or not we are currently checking mail by scanning through * the accounts we are managing and seeing if any are checking for mail. * * Returns: A #gboolean value. **/ gboolean ggn_account_list_is_checking (GgnAccountList *alist) { /* declare a few helping variables. */ gboolean enab; guint state; guint idx; /* loop through the list of accounts. */ for (idx = 0; idx < alist->priv->accounts->len; idx++) { /* get the account at the current index. */ alist->priv->account = (GgnAccount *) g_ptr_array_index (alist->priv->accounts, idx); /* get the account information required for a decision. */ enab = ggn_account_get_enabled (alist->priv->account); state = ggn_account_get_state (alist->priv->account); /* if the account is not checking already... */ if (state == GGN_ACCOUNT_STATE_CHECKING && enab == TRUE) { /* yep. */ return TRUE; } } /* nope. */ return FALSE; } /** * ggn_account_list_search: * @alist: The #GgnAccountList to utilize. * @email: The email of the account to look for. * * Returns the account index with the matching email string as given * by the calling function, or -1 if no match exists. * * Returns: A #gint of the account index, or -1. **/ gint ggn_account_list_search (GgnAccountList *alist, const gchar *email) { /* declare a few helping variables. */ gchar *compare; guint idx; /* to avoid warnings. */ compare = NULL; /* loop through the list of accounts. */ for (idx = 0; idx < alist->priv->accounts->len; idx++) { /* get the account at the current index. */ alist->priv->account = (GgnAccount *) g_ptr_array_index (alist->priv->accounts, idx); /* get the comparison email string. */ compare = ggn_account_get_email (alist->priv->account); /* see if this account email matches. */ if (g_utf8_collate (compare, email) == 0) { /* return the account. */ g_free (compare); return idx; } } /* not a one found, return NULL. */ g_free (compare); return -1; } /** * ggn_account_list_add: * @alist: The #GgnAccountList to utilize. * @account: The #GgnAccount to add to the managed list. * * Adds a new account to the list of accounts that are managed by the * given account list. * * Returns: void. **/ void ggn_account_list_add (GgnAccountList *alist, GgnAccount *account) { /* give the account our preferences object. */ ggn_account_give_prefs (account, alist->priv->prefs); /* link the "modified" callback to our function. */ account->priv->handler_modified = g_signal_connect (G_OBJECT (account), "modified", G_CALLBACK (ggn_account_list_account_modified), alist); /* link the "updated" callback to our function. */ account->priv->handler_updated = g_signal_connect (G_OBJECT (account), "updated", G_CALLBACK (ggn_account_list_account_updated), alist); /* add the account to the pointer array. */ g_ptr_array_add (alist->priv->accounts, account); /* finally, write the changes to gconf and gnome-keyring. */ ggn_account_set_prefs (account); } /** * ggn_account_list_del: * @alist: The #GgnAccountList to utilize. * @idx: The index of the account to remove from the managed list. * * Removes a given account at index @idx from the managed list. * * Returns: void. **/ void ggn_account_list_del (GgnAccountList *alist, guint idx) { /* check bounds. */ if (idx >= alist->priv->accounts->len) return; /* get the account at the given index first. */ alist->priv->account = g_ptr_array_index (alist->priv->accounts, idx); /* remove the account from the pointer array. */ g_ptr_array_remove_index (alist->priv->accounts, idx); /* disconnect the "modified" account signal handler. */ g_signal_handler_disconnect (G_OBJECT (alist->priv->account), alist->priv->account->priv->handler_modified); /* disconnect the "updated" account signal handler. */ g_signal_handler_disconnect (G_OBJECT (alist->priv->account), alist->priv->account->priv->handler_updated); /* unset the account preferences. */ ggn_account_unset_prefs (alist->priv->account); /* free the account object. */ ggn_account_free (alist->priv->account); } /** * ggn_account_list_check: * @alist: The #GgnAccountList to utilize. * * Begins the mail-checking process for each account in the managed list * and emits a signal when all accounts have completed their checking * thread. * * Returns: void. **/ void ggn_account_list_check (GgnAccountList *alist) { /* declare a few helping variables. */ gboolean enab; guint state; guint idx; /* reset the count variables. */ alist->priv->num_nonempty = 0; alist->priv->num_failed = 0; alist->priv->num_unread_entries = 0; alist->priv->num_new_entries = 0; /* loop through the list of accounts. */ for (idx = 0; idx < alist->priv->accounts->len; idx++) { /* get the account at the current index. */ alist->priv->account = (GgnAccount *) g_ptr_array_index (alist->priv->accounts, idx); /* get the account information required for a decision. */ enab = ggn_account_get_enabled (alist->priv->account); state = ggn_account_get_state (alist->priv->account); /* if the account is not checking already... */ if (state != GGN_ACCOUNT_STATE_CHECKING && enab == TRUE) { /* run the check routine on the account. */ ggn_account_check (alist->priv->account); } } } /** * ggn_account_list_get: * @alist: The #GgnAccountList to utilize. * @idx: The index of the account to get. * * Returns the #GgnAccount at the index @idx in the pointer array. * * Returns: A #GgnAccount object managed by the account list. **/ GgnAccount *ggn_account_list_get (GgnAccountList *alist, guint idx) { /* check bounds. */ if (idx >= alist->priv->accounts->len) return NULL; /* return the value. */ return g_ptr_array_index (alist->priv->accounts, idx); } /** * ggn_account_list_get_default: * @alist: The #GgnAccountList to utilize. * * Returns the default #GgnAccount in the managed account list. * * Returns: A #GgnAccount object managed by the account list. **/ GgnAccount *ggn_account_list_get_default (GgnAccountList *alist) { /* declare some helping variables. */ guint idx; /* loop in the list of accounts. */ for (idx = 0; idx < alist->priv->accounts->len; idx++) { /* get the account at the current index. */ alist->priv->account = (GgnAccount *) g_ptr_array_index (alist->priv->accounts, idx); /* if the account is default... */ if (ggn_account_get_default (alist->priv->account)) { /* return this account. */ return alist->priv->account; } } /* we didn't find an account. */ return NULL; } gnome-gmail-notifier-0.10.1/src/ggn-prefs-window.h0000644000175000017520000000523111357667274016705 00000000000000/** * @file src/ggn-prefs-window.h The GgnPrefsWindow object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_PREFS_WINDOW_H__ #define __GNOME_GMAIL_NOTIFIER_PREFS_WINDOW_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * object function macros. */ #define GGN_TYPE_PREFS_WINDOW (ggn_prefs_window_get_type ()) #define GGN_PREFS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_PREFS_WINDOW, GgnPrefsWindow)) #define GGN_PREFS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_PREFS_WINDOW, GgnPrefsWindowClass)) #define GGN_IS_PREFS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_PREFS_WINDOW)) #define GGN_IS_PREFS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_PREFS_WINDOW)) #define GGN_PREFS_WINDOW_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_PREFS_WINDOW, GgnPrefsWindowClass)) /* * type macros. */ typedef struct _GgnPrefsWindow GgnPrefsWindow; typedef struct _GgnPrefsWindowClass GgnPrefsWindowClass; typedef struct _GgnPrefsWindowPrivate GgnPrefsWindowPrivate; /* * object definition. */ struct _GgnPrefsWindow { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnPrefsWindowPrivate *priv; }; /* * class definition. */ struct _GgnPrefsWindowClass { /* parent gobject class. */ GObjectClass parent; }; /* * gobject-type definition. */ GType ggn_prefs_window_get_type (void); /* * object creation functions. */ GgnPrefsWindow *ggn_prefs_window_new (void); GgnPrefsWindow *ggn_prefs_window_new_from_manager (GgnManager *manager); void ggn_prefs_window_free (GgnPrefsWindow *window); /* * window show/hide functions. */ void ggn_prefs_window_show (GgnPrefsWindow *window); void ggn_prefs_window_hide (GgnPrefsWindow *window); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_PREFS_WINDOW_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-audio.c0000644000175000017520000002142411357667274015357 00000000000000/** * @file src/ggn-audio.c The GgnAudio object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnAudio * @short_description: The audio player object * @include: src/ggn-audio.h **/ /* * include our application header. */ #include #include "ggn-audio-priv.h" /* * forward function definitions. */ static void ggn_audio_init (GgnAudio *self); static void ggn_audio_class_init (GgnAudioClass *klass); static void ggn_audio_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnAudio, ggn_audio, G_TYPE_OBJECT); /** * ggn_audio_bus_call: * @bus: The gstreamer #GstBus that emitted the signal. * @msg: The gstreamer #GstMessage that was sent. * @data: Local data we gave to the calling object. * * Called when the gstreamer message bus sends information about * the currently active (playing) audio stream. * * Returns: callback success gboolean. **/ static gboolean ggn_audio_bus_call (GstBus *bus, GstMessage *msg, gpointer data) { /* regain our structure from the data. */ GgnAudio *audio = GGN_AUDIO (data); /* determine the type of message that was sent. */ switch (GST_MESSAGE_TYPE (msg)) { /* end of stream. */ case GST_MESSAGE_EOS: { /* end iteration of the audio loop. */ gst_element_set_state (audio->priv->pipeline, GST_STATE_NULL); g_main_loop_quit (audio->priv->loop); /* leave the switch */ break; } /* error message. */ case GST_MESSAGE_ERROR: { /* end iteration of the audio loop. */ gst_element_set_state (audio->priv->pipeline, GST_STATE_NULL); g_main_loop_quit (audio->priv->loop); /* leave the switch */ break; } /* anything else. */ default: break; } /* return success. */ return TRUE; } /** * ggn_audio_pad_added: * @element: The gstreamer #GstElement that emitted the signal. * @pad: The gstreamer #GstPad that was added to the element. * @data: Local data we gave to the calling object. * * Becuase elements in our pipeline utilize dynamic pads, a callback * must be set up to handle their initialization in a special way. * This function finalizes the linkage in the pipeline. * * Returns: void **/ static void ggn_audio_pad_added (GstElement *element, GstPad *pad, gpointer data) { /* pull our audioconvert element out of the data. */ GstElement *convert = (GstElement *) data; /* define the sink pad. */ GstPad *sinkpad; /* get the dynamic pad for the end of the chain. */ sinkpad = gst_element_get_pad (convert, "sink"); /* link the two pads together. */ gst_pad_link (pad, sinkpad); /* unreference our sinkpad, as it's no longer needed. */ gst_object_unref (sinkpad); } /* * ggn_audio_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_audio_init (GgnAudio *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnAudioPrivate, 1); /* setup the audio loop. */ self->priv->loop = g_main_loop_new (NULL, FALSE); /* create the gstreamer pipeline. */ self->priv->pipeline = gst_pipeline_new (PACKAGE); /* create the filesrc element. */ self->priv->source = gst_element_factory_make ("filesrc", "source"); /* create the wavparse element. */ self->priv->parse = gst_element_factory_make ("wavparse", "parse"); /* create the audioconvert element. */ self->priv->convert = gst_element_factory_make ("audioconvert", "convert"); /* create the audioresample element. */ self->priv->sample = gst_element_factory_make ("audioresample", "sample"); /* create the autoaudiosink element. */ self->priv->sink = gst_element_factory_make ("autoaudiosink", "sink"); /* add a bus watch for important messages. */ GstBus *bus = gst_pipeline_get_bus (GST_PIPELINE (self->priv->pipeline)); gst_bus_add_watch (bus, ggn_audio_bus_call, self); gst_object_unref (bus); /* add all the elements into the pipeline. */ gst_bin_add_many (GST_BIN (self->priv->pipeline), self->priv->source, self->priv->parse, self->priv->convert, self->priv->sample, self->priv->sink, NULL); /* link the source and sink ends together. */ gst_element_link (self->priv->source, self->priv->parse); gst_element_link_many (self->priv->convert, self->priv->sample, self->priv->sink, NULL); /* use a callback to link the two chains. */ g_signal_connect (G_OBJECT (self->priv->parse), "pad-added", G_CALLBACK (ggn_audio_pad_added), self->priv->convert); } /* * ggn_audio_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_audio_class_init (GgnAudioClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_audio_finalize; } /* * ggn_audio_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_audio_finalize (GObject *obj) { /* make a reference to ourself. */ GgnAudio *self = GGN_AUDIO (obj); /* ensure that the audio loop is stopped. */ g_main_loop_quit (self->priv->loop); /* free the private instance objects. */ g_main_loop_unref (self->priv->loop); gst_object_unref (self->priv->pipeline); /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_audio_parent_class)->finalize (obj); } /** * ggn_audio_new: * * Creates a new #GgnAudio with default values, which are * used to play audio files for the notifier. * * Returns: the new #GgnAudio object. Free with ggn_audio_free(). **/ GgnAudio *ggn_audio_new (void) { /* make a newly created gobject. */ GgnAudio *audio = g_object_new (GGN_TYPE_AUDIO, NULL); /* return the new object. */ return audio; } /** * ggn_audio_free: * @audio: The #GgnAudio to free. * * Frees the given #GgnAudio object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_audio_free (GgnAudio *audio) { /* while this object exists... */ while (G_IS_OBJECT (audio)) { /* unreference this object. */ g_object_unref (G_OBJECT (audio)); } } /** * ggn_audio_play_file_thread: * @data: Private data passed to the thread. * * A function used by the ggn_audio_play_file() function in order to * play all audio in a separate thread from the main application. * * Returns: thread private data. **/ gpointer ggn_audio_play_file_thread (gpointer data) { /* get our audio object. */ GgnAudio *audio = GGN_AUDIO (data); /* set the pipeline to playing and kickoff the audio loop. */ gst_element_set_state (audio->priv->pipeline, GST_STATE_PLAYING); g_main_loop_run (audio->priv->loop); /* quit the thread. */ return data; } /** * ggn_audio_play_file: * @audio: The #GgnAudio to play the file. * @filename: The filename string of the file to play. * * As long as the pipeline we have set up in the given #GgnAudio * object is not currently playing a file, this function plays * @filename through the default audio output sink. * * Returns: void. **/ void ggn_audio_play_file (GgnAudio *audio, const gchar *filename) { /* make sure the filename is not NULL. */ if (!filename) { /* exit the function. */ return; } /* make sure the file exists. */ if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR)) { /* exit the function. */ return; } /* set the location argument for the filesrc element. */ g_object_set (G_OBJECT (audio->priv->source), "location", filename, NULL); /* spawn a new thread to handle playback. */ g_thread_create (ggn_audio_play_file_thread, (gpointer) audio, FALSE, NULL); } gnome-gmail-notifier-0.10.1/src/ggn-icon-priv.h0000644000175000017520000000351711357667274016174 00000000000000/** * @file src/ggn-icon-priv.h The GgnIcon object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnIconPrivate: * @icon: Our #GtkStatusIcon that we use. * @note: Our #NotifyNotification that we use. * @style: The style of our @icon and @note objects. * @title: The title for the notifications. * @summary: The summary for the notifications. * @icon_file: The status icon image filename. * @urgency: The urgency for the notifications. * @xml: The #GtkBuilder xml object for the menu. * @menu: The #GtkMenu that the notifier uses. * @exmenu: The extended #GtkMenu that the notifier uses. * * The #GgnIcon is a GObject that is concerned with the status icon * for the GNOME GMail Notifier and its associated notification * bubbles. **/ struct _GgnIconPrivate { /* the tray icon and notification. */ GtkStatusIcon *icon; NotifyNotification *note; /* the stylistic variables. */ guint style; gchar *title; gchar *summary; gchar *icon_file; NotifyUrgency urgency; /* the gtkbuilder xml object and menu. */ GtkBuilder *xml; GtkMenu *menu; /* the extended menu. */ GtkMenu *exmenu; }; gnome-gmail-notifier-0.10.1/src/ggn-audio.h0000644000175000017520000000451311357667274015364 00000000000000/** * @file src/ggn-audio.h The GgnAudio object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_AUDIO_H__ #define __GNOME_GMAIL_NOTIFIER_AUDIO_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * object function macros. */ #define GGN_TYPE_AUDIO (ggn_audio_get_type ()) #define GGN_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_AUDIO, GgnAudio)) #define GGN_AUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_AUDIO, GgnAudioClass)) #define GGN_IS_AUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_AUDIO)) #define GGN_IS_AUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_AUDIO)) #define GGN_AUDIO_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_AUDIO, GgnAudioClass)) /* * type macros. */ typedef struct _GgnAudio GgnAudio; typedef struct _GgnAudioClass GgnAudioClass; typedef struct _GgnAudioPrivate GgnAudioPrivate; /* * object definition. */ struct _GgnAudio { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnAudioPrivate *priv; }; /* * class definition. */ struct _GgnAudioClass { /* parent gobject class. */ GObjectClass parent; }; /* * gobject-type definition. */ GType ggn_audio_get_type (void); /* * object creation functions. */ GgnAudio *ggn_audio_new (void); void ggn_audio_free (GgnAudio *audio); /* * sound file playback function. */ void ggn_audio_play_file (GgnAudio *audio, const gchar *filename); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_AUDIO_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-prefs.c0000644000175000017520000001765111357667274015404 00000000000000/** * @file src/ggn-prefs.c The GgnPrefs object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnPrefs * @short_description: The configuration access object * @include: src/ggn-prefs.h **/ /* * include our application header. */ #include #include "ggn-prefs-priv.h" /* * forward function definitions. */ static void ggn_prefs_init (GgnPrefs *self); static void ggn_prefs_class_init (GgnPrefsClass *klass); static void ggn_prefs_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnPrefs, ggn_prefs, G_TYPE_OBJECT); /* * ggn_prefs_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_prefs_init (GgnPrefs *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnPrefsPrivate, 1); /* setup the gconf2 client object. */ self->priv->conf = gconf_client_get_default (); } /* * ggn_prefs_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_prefs_class_init (GgnPrefsClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_prefs_finalize; } /* * ggn_prefs_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_prefs_finalize (GObject *obj) { /* make a reference to ourself. */ GgnPrefs *self = GGN_PREFS (obj); /* free the private instance objects. */ g_object_unref (G_OBJECT (self->priv->conf)); /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_prefs_parent_class)->finalize (obj); } /** * ggn_prefs_new: * * Creates a new #GgnPrefs with default values, which are * used to access and modify configuration values for the * notifier application behavior. * * Returns: the new #GgnPrefs object. Free with ggn_prefs_free(). **/ GgnPrefs *ggn_prefs_new (void) { /* make a newly created gobject. */ GgnPrefs *prefs = g_object_new (GGN_TYPE_PREFS, NULL); /* return the new object. */ return prefs; } /** * ggn_prefs_free: * @prefs: The #GgnPrefs to free. * * Frees the given #GgnPrefs object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_prefs_free (GgnPrefs *prefs) { /* while this object exists... */ while (G_IS_OBJECT (prefs)) { /* unreference this object. */ g_object_unref (G_OBJECT (prefs)); } } /** * ggn_prefs_get_int: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * * Utilizes the #GgnPrefs object to access a #gint that is * saved in the GConf2 database. * * Returns: the #gint value. **/ gint ggn_prefs_get_int (GgnPrefs *prefs, const gchar *key) { /* declare a helping variable. */ gint value; /* query gconf for the value. */ value = gconf_client_get_int (prefs->priv->conf, key, NULL); /* check for bounds. */ if (g_utf8_collate (key, GGN_PREF_CHECKRATE) == 0 && value <= 0) { /* ensure the check rate is a default of 10. */ value = 10; } /* return the value. */ return value; } /** * ggn_prefs_set_int: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * @value: The new value of @key to set. * * Utilizes the #GgnPrefs object to set a #gint to be saved * in the GConf2 database. * * Returns: void. **/ void ggn_prefs_set_int (GgnPrefs *prefs, const gchar *key, gint value) { /* set the new value in gconf. */ gconf_client_set_int (prefs->priv->conf, key, value, NULL); } /** * ggn_prefs_get_bool: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * * Utilizes the #GgnPrefs object to access a #gboolean that is * saved in the GConf2 database. * * Returns: the #gboolean value. **/ gboolean ggn_prefs_get_bool (GgnPrefs *prefs, const gchar *key) { /* declare a helping variable. */ gboolean value; /* query gconf for the value. */ value = gconf_client_get_bool (prefs->priv->conf, key, NULL); /* return the value. */ return value; } /** * ggn_prefs_set_bool: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * @value: The new value of @key to set. * * Utilizes the #GgnPrefs object to set a #gboolean to be saved * in the GConf2 database. * * Returns: void. **/ void ggn_prefs_set_bool (GgnPrefs *prefs, const gchar *key, gboolean value) { /* set the new value in gconf. */ gconf_client_set_bool (prefs->priv->conf, key, value, NULL); } /** * ggn_prefs_get_list: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * * Utilizes the #GgnPrefs object to access a #GSList that is * saved in the GConf2 database. * * Returns: the #GSList value. **/ GSList *ggn_prefs_get_list (GgnPrefs *prefs, const gchar *key) { /* declare a helping variable. */ GSList *value; /* query gconf for the value. */ value = gconf_client_get_list (prefs->priv->conf, key, GCONF_VALUE_STRING, NULL); /* return the value. */ return value; } /** * ggn_prefs_set_list: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * @value: The new value of @key to set. * * Utilizes the #GgnPrefs object to set a #GSList to be saved * in the GConf2 database. * * Returns: void. **/ void ggn_prefs_set_list (GgnPrefs *prefs, const gchar *key, GSList *value) { /* set the new value in gconf. */ gconf_client_set_list (prefs->priv->conf, key, GCONF_VALUE_STRING, value, NULL); } /** * ggn_prefs_get_string: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * * Utilizes the #GgnPrefs object to access a #gchar* that is * saved in the GConf2 database. * * Returns: the #gchar* value. Free with g_free(). **/ gchar *ggn_prefs_get_string (GgnPrefs *prefs, const gchar *key) { /* declare a helping variable. */ gchar *value; /* query gconf for the value. */ value = gconf_client_get_string (prefs->priv->conf, key, NULL); /* return the value. */ return value; } /** * ggn_prefs_set_string: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * @value: The new value of @key to set. * * Utilizes the #GgnPrefs object to set a #gchar* to be saved * in the GConf2 database. * * Returns: void. **/ void ggn_prefs_set_string (GgnPrefs *prefs, const gchar *key, const gchar *value) { /* ensure the string is not null. */ if (!value) return; /* set the new value in gconf. */ gconf_client_set_string (prefs->priv->conf, key, value, NULL); } /** * ggn_prefs_unset: * @prefs: The #GgnPrefs to utilize. * @key: The GConf2 key string to access. * * Utilizes the #GgnPrefs object to recursively unset (delete) a tree * from the GConf2 database. * * Returns: void. **/ void ggn_prefs_unset (GgnPrefs *prefs, const gchar *key) { /* defer to the higher power. */ gconf_client_recursive_unset (prefs->priv->conf, key, 0, NULL); } gnome-gmail-notifier-0.10.1/src/ggn-about-dialog.c0000644000175000017520000001321011357667274016617 00000000000000/** * @file src/ggn-about-dialog.c GgnAboutDialog object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnAboutDialog * @short_description: The about dialog object * @include: src/ggn-about-dialog.h **/ /* * include our application header. */ #include #include "ggn-about-dialog-priv.h" /* * forward function definitions for glib. */ static void ggn_about_dialog_init (GgnAboutDialog *self); static void ggn_about_dialog_class_init (GgnAboutDialogClass *klass); static void ggn_about_dialog_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnAboutDialog, ggn_about_dialog, G_TYPE_OBJECT); /** * ggn_about_dialog_link: * @about: the #GtkAboutDialog we're using. * @link: the link that was executed. * @data: callback data we can use. * * Callback function that is executed when the user clicks a * hyperlink inside the about dialog. When called, this function * opens the executable required to view the hyperlink. * * Returns: void. **/ static void ggn_about_dialog_link (GtkAboutDialog *about, const gchar *link, gpointer data) { /* execute the link passed to us. */ ggn_link_execute (link); } /* * ggn_about_dialog_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_about_dialog_init (GgnAboutDialog *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnAboutDialogPrivate, 1); /* setup the about dialog hyperlink handler. */ gtk_about_dialog_set_url_hook (ggn_about_dialog_link, self, NULL); gtk_about_dialog_set_email_hook (ggn_about_dialog_link, self, NULL); /* allocate a gtkbuilder object. */ self->priv->xml = gtk_builder_new (); /* load the about dialog xml file. */ gtk_builder_add_from_file (self->priv->xml, GGN_XMLUI_ABOUT, NULL); /* retrieve the about dialog widget. */ self->priv->dlg = (GtkAboutDialog *) gtk_builder_get_object (self->priv->xml, "GgnAboutDialog"); /* link the response callback to our dialog. */ g_signal_connect (G_OBJECT (self->priv->dlg), "response", G_CALLBACK (gtk_widget_hide), self); } /* * ggn_about_dialog_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_about_dialog_class_init (GgnAboutDialogClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_about_dialog_finalize; } /* * ggn_about_dialog_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_about_dialog_finalize (GObject *obj) { /* make a reference to ourself. */ GgnAboutDialog *self = GGN_ABOUT_DIALOG (obj); /* free the gtkbuilder xml and the dialog widget. */ g_object_unref (G_OBJECT (self->priv->xml)); gtk_widget_destroy (GTK_WIDGET (self->priv->dlg)); /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_about_dialog_parent_class)->finalize (obj); } /** * ggn_about_dialog_new: * * Creates a new #GgnAboutDialog object for use in the application. * It simply allows the user to view information relating to the * development version, license, and developers of the notifier. * * Returns: A new #GgnAboutDialog object. **/ GgnAboutDialog *ggn_about_dialog_new (void) { /* make a newly created gobject. */ GgnAboutDialog *dialog = g_object_new (GGN_TYPE_ABOUT_DIALOG, NULL); /* return the new object. */ return dialog; } /** * ggn_about_dialog_free: * @dialog: the #GgnAboutDialog to free. * * Frees the given #GgnAboutDialog by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_about_dialog_free (GgnAboutDialog *dialog) { /* while this object exists... */ while (G_IS_OBJECT (dialog)) { /* unreference this object. */ g_object_unref (G_OBJECT (dialog)); } } /** * ggn_about_dialog_show: * @dialog: the #GgnAboutDialog to show. * * Makes the provided about dialog visible by showing its associated * #GtkAboutDialog widget. * * Returns: void. **/ void ggn_about_dialog_show (GgnAboutDialog *dialog) { /* show the widget. */ gtk_widget_show (GTK_WIDGET (dialog->priv->dlg)); } /** * ggn_about_dialog_hide: * @dialog: the #GgnAboutDialog to hide. * * Makes the provided about dialog invisible by hiding its associated * #GtkAboutDialog widget. * * Returns: void. **/ void ggn_about_dialog_hide (GgnAboutDialog *dialog) { /* hide the widget. */ gtk_widget_hide (GTK_WIDGET (dialog->priv->dlg)); } gnome-gmail-notifier-0.10.1/src/ggn-entry.h0000644000175000017520000000540111357667274015421 00000000000000/** * @file src/ggn-entry.h The GgnEntry object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_ENTRY_H__ #define __GNOME_GMAIL_NOTIFIER_ENTRY_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * the entry state vales. */ #define GGN_ENTRY_STATE_NEW 0 #define GGN_ENTRY_STATE_UNREAD 1 #define GGN_ENTRY_STATE_READ 2 /* * object function macros. */ #define GGN_TYPE_ENTRY (ggn_entry_get_type ()) #define GGN_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_ENTRY, GgnEntry)) #define GGN_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_ENTRY, GgnEntryClass)) #define GGN_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_ENTRY)) #define GGN_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_ENTRY)) #define GGN_ENTRY_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_ENTRY, GgnEntryClass)) /* * type macros. */ typedef struct _GgnEntry GgnEntry; typedef struct _GgnEntryClass GgnEntryClass; typedef struct _GgnEntryPrivate GgnEntryPrivate; /* * object definition. */ struct _GgnEntry { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnEntryPrivate *priv; }; /* * class definition. */ struct _GgnEntryClass { /* parent gobject class. */ GObjectClass parent; }; /* * gobject-type definition. */ GType ggn_entry_get_type (void); /* * object creation functions. */ GgnEntry *ggn_entry_new (void); void ggn_entry_free (GgnEntry *entry); /* * property retrieval functions. */ gchar *ggn_entry_get_summary (GgnEntry *entry); gchar *ggn_entry_get_title (GgnEntry *entry); gchar *ggn_entry_get_sender_name (GgnEntry *entry); gchar *ggn_entry_get_sender_email (GgnEntry *entry); gchar *ggn_entry_get_link (GgnEntry *entry); gchar *ggn_entry_get_id (GgnEntry *entry); /* * state retrieval function. */ guint ggn_entry_get_state (GgnEntry *entry); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_ENTRY_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-manager.h0000644000175000017520000000470511357667274015700 00000000000000/** * @file src/ggn-manager.h The GgnManager object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_MANAGER_H__ #define __GNOME_GMAIL_NOTIFIER_MANAGER_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * object function macros. */ #define GGN_TYPE_MANAGER (ggn_manager_get_type ()) #define GGN_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_MANAGER, GgnManager)) #define GGN_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_MANAGER, GgnManagerClass)) #define GGN_IS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_MANAGER)) #define GGN_IS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_MANAGER)) #define GGN_MANAGER_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_MANAGER, GgnManagerClass)) /* * type macros. */ typedef struct _GgnManager GgnManager; typedef struct _GgnManagerClass GgnManagerClass; typedef struct _GgnManagerPrivate GgnManagerPrivate; /* * object definition. */ struct _GgnManager { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnManagerPrivate *priv; }; /* * class definition. */ struct _GgnManagerClass { /* parent gobject class. */ GObjectClass parent; }; /* * gobject-type definition. */ GType ggn_manager_get_type (void); /* * object creation functions. */ GgnManager *ggn_manager_new (void); void ggn_manager_free (GgnManager *manager); /* * main application control functions. */ void ggn_manager_main (GgnManager *manager, int argc, char **argv); void ggn_manager_quit (GgnManager *manager); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_MANAGER_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-manager-priv.h0000644000175000017520000000312111357667274016645 00000000000000/** * @file src/ggn-manager-priv.h The GgnManager object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnManagerPrivate: * @prefs_win: The preferences window we use. * @about_dlg: The about dialog we use. * @icon: The status icon in the panel. * @prefs: The globally used preferences object. * @audio: The audio playback #GObject to use. * @alist: The managed accounts listing. * * The #GgnManager is a simple GObject that coordinates the * higher-level functionality of the gnome gmail notifier * application. **/ struct _GgnManagerPrivate { /* the gtk elements of the manager. */ GgnPrefsWindow *prefs_win; GgnAboutDialog *about_dlg; /* the status icon. */ GgnIcon *icon; /* the preferences object we use. */ GgnPrefs *prefs; /* the audio playback object. */ GgnAudio *audio; /* the accounts listing. */ GgnAccountList *alist; }; gnome-gmail-notifier-0.10.1/src/ggn-prefs-priv.h0000644000175000017520000000216011357667274016354 00000000000000/** * @file src/ggn-prefs-priv.h The GgnPrefs object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnPrefsPrivate: * @conf: The #GConfClient we talk to. * * The #GgnPrefs is a simple GObject wrapper for accessing * the GConf2 settings and configuration system for GNOME * and its applications. **/ struct _GgnPrefsPrivate { /* the gconf2 client object. */ GConfClient *conf; }; gnome-gmail-notifier-0.10.1/src/ggn-icon.c0000644000175000017520000004154411357667274015213 00000000000000/** * @file src/ggn-icon.c The GgnIcon object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnIcon * @short_description: The status icon object * @include: src/ggn-icon.h **/ /* * include our application header. */ #include #include "ggn-icon-priv.h" /* * forward function definitions. */ static void ggn_icon_init (GgnIcon *self); static void ggn_icon_class_init (GgnIconClass *klass); static void ggn_icon_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnIcon, ggn_icon, G_TYPE_OBJECT); /* * define the signals used. */ enum { CLICKED, CHECK_SELECTED, PREFS_SELECTED, ABOUT_SELECTED, QUIT_SELECTED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; /** * ggn_icon_default_clicked_cb: * @icon: The status icon which emitted the signal. * * This is the default "clicked" callback function manager. * * Returns: void. **/ static void ggn_icon_default_clicked_cb (GgnIcon *icon) { /* do nothing. */ } /** * ggn_icon_default_check_selected_cb: * @icon: The status icon which emitted the signal. * * This is the default "check_selected" callback function manager. * * Returns: void. **/ static void ggn_icon_default_check_selected_cb (GgnIcon *icon) { /* do nothing. */ } /** * ggn_icon_default_prefs_selected_cb: * @icon: The status icon which emitted the signal. * * This is the default "prefs_selected" callback function manager. * * Returns: void. **/ static void ggn_icon_default_prefs_selected_cb (GgnIcon *icon) { /* do nothing. */ } /** * ggn_icon_default_about_selected_cb: * @icon: The status icon which emitted the signal. * * This is the default "about_selected" callback function manager. * * Returns: void. **/ static void ggn_icon_default_about_selected_cb (GgnIcon *icon) { /* do nothing. */ } /** * ggn_icon_default_quit_selected_cb: * @icon: The status icon which emitted the signal. * * This is the default "quit_selected" callback function manager. * * Returns: void. **/ static void ggn_icon_default_quit_selected_cb (GgnIcon *icon) { /* do nothing. */ } /** * ggn_icon_left_clicked: * @status_icon: The #GtkStatusIcon that started the callback. * @data: Our local data pointer. * * This function is called when the status icon is left-clicked. **/ static void ggn_icon_left_clicked (GtkStatusIcon *status_icon, gpointer data) { /* emit the appropriate signal. */ g_signal_emit (GGN_ICON (data), signals[CLICKED], 0); } /** * ggn_icon_right_clicked: * @status_icon: The #GtkStatusIcon that started the callback. * @data: Our local data pointer. * * This function is called when the status icon is right-clicked. **/ static void ggn_icon_right_clicked (GtkStatusIcon *status_icon, guint button, guint time, gpointer data) { /* gain a reference to our icon. */ GgnIcon *icon = GGN_ICON (data); /* bring up the dropdown menu. */ gtk_menu_popup (icon->priv->menu, NULL, NULL, gtk_status_icon_position_menu, status_icon, button, time); } /** * ggn_icon_check_selected: * @item: The #GtkMenuItem that started the callback. * @data: Our local data pointer. * * This function is called when the "check" menu item inside the * status icon's dropdown menu is selected by the user. **/ G_MODULE_EXPORT void ggn_icon_check_selected (GtkMenuItem *item, gpointer data) { /* emit the appropriate signal. */ g_signal_emit (GGN_ICON (data), signals[CHECK_SELECTED], 0); } /** * ggn_icon_prefs_selected: * @item: The #GtkMenuItem that started the callback. * @data: Our local data pointer. * * This function is called when the "prefs" menu item inside the * status icon's dropdown menu is selected by the user. **/ G_MODULE_EXPORT void ggn_icon_prefs_selected (GtkMenuItem *item, gpointer data) { /* emit the appropriate signal. */ g_signal_emit (GGN_ICON (data), signals[PREFS_SELECTED], 0); } /** * ggn_icon_about_selected: * @item: The #GtkMenuItem that started the callback. * @data: Our local data pointer. * * This function is called when the "about" menu item inside the * status icon's dropdown menu is selected by the user. **/ G_MODULE_EXPORT void ggn_icon_about_selected (GtkMenuItem *item, gpointer data) { /* emit the appropriate signal. */ g_signal_emit (GGN_ICON (data), signals[ABOUT_SELECTED], 0); } /** * ggn_icon_quit_selected: * @item: The #GtkMenuItem that started the callback. * @data: Our local data pointer. * * This function is called when the "quit" menu item inside the * status icon's dropdown menu is selected by the user. **/ G_MODULE_EXPORT void ggn_icon_quit_selected (GtkMenuItem *item, gpointer data) { /* emit the appropriate signal. */ g_signal_emit (GGN_ICON (data), signals[QUIT_SELECTED], 0); } /* * ggn_icon_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_icon_init (GgnIcon *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnIconPrivate, 1); /* create the status icon. */ self->priv->icon = gtk_status_icon_new (); /* link the left clicked callback to the icon. */ g_signal_connect (G_OBJECT (self->priv->icon), "activate", G_CALLBACK (ggn_icon_left_clicked), self); /* link the right clicked callback to the icon. */ g_signal_connect (G_OBJECT (self->priv->icon), "popup-menu", G_CALLBACK (ggn_icon_right_clicked), self); /* allocate a gtkbuilder object. */ self->priv->xml = gtk_builder_new (); /* load the dropdown menu xml file. */ gtk_builder_add_from_file (self->priv->xml, GGN_XMLUI_MENU, NULL); /* retrieve the dropdown menu widget. */ self->priv->menu = GTK_MENU (gtk_builder_get_object (self->priv->xml, "GgnContextMenu")); /* connect the signals used by the drop-down menu items. */ gtk_builder_connect_signals (self->priv->xml, self); } /* * ggn_icon_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_icon_class_init (GgnIconClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_icon_finalize; /* setup the default signal handlers. */ klass->clicked = ggn_icon_default_clicked_cb; klass->check_selected = ggn_icon_default_check_selected_cb; klass->prefs_selected = ggn_icon_default_prefs_selected_cb; klass->about_selected = ggn_icon_default_about_selected_cb; klass->quit_selected = ggn_icon_default_quit_selected_cb; /** * GgnIcon::clicked: * @icon: The #GgnIcon object that issued the callback. * * Emitted when the user left-clicks the status icon. **/ signals[CLICKED] = g_signal_new ("clicked", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnIconClass, clicked), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GgnIcon::check_selected: * @icon: The #GgnIcon object that issued the callback. * * Emitted when the user selects "check" from the dropdown * menu of the status icon that we are using. **/ signals[CHECK_SELECTED] = g_signal_new ("check_selected", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnIconClass, check_selected), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GgnIcon::prefs_selected: * @icon: The #GgnIcon object that issued the callback. * * Emitted when the user selects "prefs" from the dropdown * menu of the status icon that we are using. **/ signals[PREFS_SELECTED] = g_signal_new ("prefs_selected", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnIconClass, prefs_selected), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GgnIcon::about_selected: * @icon: The #GgnIcon object that issued the callback. * * Emitted when the user selects "about" from the dropdown * menu of the status icon that we are using. **/ signals[ABOUT_SELECTED] = g_signal_new ("about_selected", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnIconClass, about_selected), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GgnIcon::quit_selected: * @icon: The #GgnIcon object that issued the callback. * * Emitted when the user selects "quit" from the dropdown * menu of the status icon that we are using. **/ signals[QUIT_SELECTED] = g_signal_new ("quit_selected", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnIconClass, quit_selected), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); } /* * ggn_icon_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_icon_finalize (GObject *obj) { /* make a reference to ourself. */ GgnIcon *self = GGN_ICON (obj); /* free the status icon. */ g_object_unref (G_OBJECT (self->priv->icon)); /* free the strings. */ g_free (self->priv->title); g_free (self->priv->summary); /* free the dropdown menu and its gtkbuilder. */ g_object_unref (G_OBJECT (self->priv->xml)); gtk_widget_destroy (GTK_WIDGET (self->priv->menu)); /* free the left-click extended menu. */ gtk_widget_destroy (GTK_WIDGET (self->priv->exmenu)); /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_icon_parent_class)->finalize (obj); } /** * ggn_icon_new: * * Creates a new #GgnIcon with default values, which are * used to interact in the most basic way with the user. * * Returns: the new #GgnIcon object. Free with ggn_icon_free(). **/ GgnIcon *ggn_icon_new (void) { /* make a newly created gobject. */ GgnIcon *icon = g_object_new (GGN_TYPE_ICON, NULL); /* return the new object. */ return icon; } /** * ggn_icon_free: * @icon: The #GgnIcon to free. * * Frees the given #GgnIcon object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_icon_free (GgnIcon *icon) { /* while this object exists... */ while (G_IS_OBJECT (icon)) { /* unreference this object. */ g_object_unref (G_OBJECT (icon)); } } /** * ggn_icon_show: * @icon: The #GgnIcon to show. * * Shows the given #GgnIcon object in the panel tray. * * Returns: void. **/ void ggn_icon_show (GgnIcon *icon) { /* set the new visibility. */ gtk_status_icon_set_visible (icon->priv->icon, TRUE); } /** * ggn_icon_hide: * @icon: The #GgnIcon to hide. * * Hides the given #GgnIcon object in the panel tray. * * Returns: void. **/ void ggn_icon_hide (GgnIcon *icon) { /* set the new visibility. */ gtk_status_icon_set_visible (icon->priv->icon, FALSE); } /** * ggn_icon_set_style: * @icon: The #GgnIcon to modify. * @style: The new style to use. * * Sets a new style for the given #GgnIcon object. * * Returns: void. **/ void ggn_icon_set_style (GgnIcon *icon, guint style) { /* declare a helping variable. */ gchar *filename = GGN_PIXMAP_NORMAL; /* don't bother if we are already at this style. */ if (icon->priv->style == style) return; /* set the style variable. */ icon->priv->style = style; /* determine the style to use. */ if (style == GGN_ICON_STYLE_NORMAL) { /* set the icon filename. */ filename = GGN_PIXMAP_NORMAL; icon->priv->urgency = NOTIFY_URGENCY_NORMAL; } else if (style == GGN_ICON_STYLE_ERROR) { /* set the icon filename. */ filename = GGN_PIXMAP_ERROR; icon->priv->urgency = NOTIFY_URGENCY_CRITICAL; } else if (style == GGN_ICON_STYLE_WARNING) { /* set the icon filename. */ filename = GGN_PIXMAP_WARNING; icon->priv->urgency = NOTIFY_URGENCY_NORMAL; } else if (style == GGN_ICON_STYLE_MESSAGE) { /* set the icon filename. */ filename = GGN_PIXMAP_MESSAGE; icon->priv->urgency = NOTIFY_URGENCY_LOW; } else if (style == GGN_ICON_STYLE_CHECKING) { /* set the icon filename. */ filename = GGN_PIXMAP_CHECKING; icon->priv->urgency = NOTIFY_URGENCY_NORMAL; } /* update the icon filename. */ g_free (icon->priv->icon_file); icon->priv->icon_file = g_strdup (filename); /* update the gtk status icon. */ gtk_status_icon_set_from_file (icon->priv->icon, icon->priv->icon_file); } /** * ggn_icon_set_tooltip: * @icon: The #GgnIcon to modify. * @tip: The new tooltip text. * * Sets a new tooltip for the given #GgnIcon object. * * Returns: void. **/ void ggn_icon_set_tooltip (GgnIcon *icon, const gchar *tip) { /* update the gtk status icon tooltip. */ gtk_status_icon_set_tooltip (icon->priv->icon, tip); } /** * ggn_icon_set_title: * @icon: The #GgnIcon to modify. * @title: The new title text. * * Sets a new title for the notifications that arise out * of a given #GgnIcon object. * * Returns: void. **/ void ggn_icon_set_title (GgnIcon *icon, const gchar *title) { /* set the new title string. */ g_free (icon->priv->title); icon->priv->title = g_strdup (title); } /** * ggn_icon_set_summary: * @icon: The #GgnIcon to modify. * @summary: The new summary text. * * Sets a new summary for the notifications that arise out * of a given #GgnIcon object. * * Returns: void. **/ void ggn_icon_set_summary (GgnIcon *icon, const gchar *summary) { /* set the new title string. */ g_free (icon->priv->summary); icon->priv->summary = g_strdup (summary); } /** * ggn_icon_show_notification_thread: * @data: The #gpointer to our thread data. * * This is the thread function that is called by the master * function, ggn_icon_show_notification. * * Returns: a pointer to the thread data. **/ gpointer ggn_icon_show_notification_thread (gpointer data) { /* lock the gtk thread. */ gdk_threads_enter (); /* gain a reference to our icon. */ GgnIcon *icon = GGN_ICON (data); /* wait until the icon is embedded. */ while (!gtk_status_icon_is_embedded (icon->priv->icon)) { /* allow other events to occur. */ if (gtk_events_pending ()) { /* iterate gtk. */ gtk_main_iteration (); } } /* create a new notification. */ icon->priv->note = notify_notification_new (icon->priv->title, icon->priv->summary, icon->priv->icon_file, NULL); /* attach the notification to our icon. */ notify_notification_attach_to_status_icon (icon->priv->note, icon->priv->icon); /* set the notification timeout. */ notify_notification_set_timeout (icon->priv->note, (4 * 1000)); /* set the notification urgency. */ notify_notification_set_urgency (icon->priv->note, icon->priv->urgency); /* show the notification. */ notify_notification_show (icon->priv->note, NULL); /* unlock the gtk thread. */ gdk_threads_leave (); /* return from our thread. */ return data; } /** * ggn_icon_show_notification: * @icon: The #GgnIcon to utilize. * * Shows a bubble notification from the given #GgnIcon using * the currently set style, title, and summary. * * Returns: void. **/ void ggn_icon_show_notification (GgnIcon *icon) { /* ensure that libnotify is initialized. */ if (!notify_is_initted ()) notify_init (g_get_prgname ()); /* execute the notification bubble thread. */ g_thread_create (ggn_icon_show_notification_thread, (gpointer) icon, FALSE, NULL); } gnome-gmail-notifier-0.10.1/src/ggn-keyring.c0000644000175000017520000001655311357667274015735 00000000000000/** * @file src/ggn-keyring.c The GgnKeyring functions * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnKeyring * @short_description: The gnome keyring functions * @include: src/ggn-keyring.h **/ /* * include our application header. */ #include /* * constants used for gnome-keyring lookups. */ #define GGN_KEYRING_USER_NAME "user" #define GGN_KEYRING_SERVER_NAME "server" #define GGN_KEYRING_SERVER_VAL "mail.google.com" #define GGN_KEYRING_OBJECT_NAME "object" #define GGN_KEYRING_OBJECT_VAL "mail/feed/atom" #define GGN_KEYRING_PROTOCOL_NAME "protocol" #define GGN_KEYRING_PROTOCOL_VAL "https" /** * ggn_keyring_attribs: * @user: The username string. * @domain: The domain name string. * * This function will build a G#nomeKeyringAttributeList from the * passed username and domain name strings, simplifying access to * gnome-keyring. * * Returns: An allocated #GnomeKeyringAttributeList. Free with * gnome_keyring_attribute_list_free(). **/ GnomeKeyringAttributeList *ggn_keyring_attribs (const gchar *user, const gchar *domain) { /* initialize an attribute list. */ GnomeKeyringAttribute attrib; GnomeKeyringAttributeList *keyattribs; keyattribs = gnome_keyring_attribute_list_new (); /* set the "user" attribute. */ attrib.name = g_strdup (GGN_KEYRING_USER_NAME); attrib.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING; attrib.value.string = g_strdup_printf ("%s@%s", user, domain); g_array_append_val (keyattribs, attrib); /* set the "server" attribute. */ attrib.name = g_strdup (GGN_KEYRING_SERVER_NAME); attrib.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING; attrib.value.string = g_strdup (GGN_KEYRING_SERVER_VAL); g_array_append_val (keyattribs, attrib); /* set the "object" attribute. */ attrib.name = g_strdup (GGN_KEYRING_OBJECT_NAME); attrib.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING; attrib.value.string = g_strdup (GGN_KEYRING_OBJECT_VAL); g_array_append_val (keyattribs, attrib); /* set the "protocol" attribute. */ attrib.name = g_strdup (GGN_KEYRING_PROTOCOL_NAME); attrib.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING; attrib.value.string = g_strdup (GGN_KEYRING_PROTOCOL_VAL); g_array_append_val (keyattribs, attrib); /* return the attribute list. */ return keyattribs; } /** * ggn_keyring_item_create: * @user: The username string. * @domain: The domain name string. * @pass: The passphrase string. * * This function will access the gnome-keyring daemon to save * (or update, if one exists) the given gmail account information * into the keyring for use later. * * Returns: Success #gboolean. **/ gboolean ggn_keyring_item_create (const gchar *user, const gchar *domain, const gchar *pass) { /* declare some helping variables. */ guint32 id; gchar *description; GnomeKeyringResult result; GnomeKeyringAttributeList *keyattribs; /* build the string that describes the keyring entry. */ description = g_strdup_printf ("Gmail password for %s@%s", user, domain); /* define some variables for saving the passphrase. */ keyattribs = ggn_keyring_attribs (user, domain); /* synchronously write to the keyring. */ result = gnome_keyring_item_create_sync (NULL, GNOME_KEYRING_ITEM_NETWORK_PASSWORD, description, keyattribs, pass, TRUE, &id); /* free the attributes list and string. */ gnome_keyring_attribute_list_free (keyattribs); g_free (description); /* return our status boolean. */ if (result == GNOME_KEYRING_RESULT_OK) return TRUE; /* otherwise, we failed. */ return FALSE; } /** * ggn_keyring_item_delete: * @user: The username string. * @domain: The domain name string. * * This function will access the gnome-keyring daemon to delete * the given gmail account information from the keyring. * * Returns: Success #gboolean. **/ gboolean ggn_keyring_item_delete (const gchar *user, const gchar *domain) { /* declare some helping variables. */ GList *found; GnomeKeyringFound *item; GnomeKeyringResult result; GnomeKeyringAttributeList *keyattribs; /* define some variables for finding the passphrase. */ keyattribs = ggn_keyring_attribs (user, domain); /* search for the password. */ result = gnome_keyring_find_items_sync (GNOME_KEYRING_ITEM_NETWORK_PASSWORD, keyattribs, &found); /* did we find a passphrase? */ if (result == GNOME_KEYRING_RESULT_OK) { /* NOTE: read the passphrase from the _first_ found item. */ item = g_list_nth_data (found, 0); /* delete this item. */ gnome_keyring_item_delete_sync (NULL, item->item_id); } /* free the variables used for the search. */ gnome_keyring_found_list_free (found); gnome_keyring_attribute_list_free (keyattribs); /* return our status boolean. */ if (result == GNOME_KEYRING_RESULT_OK) return TRUE; /* otherwise, we failed. */ return FALSE; } /** * ggn_keyring_item_find: * @user: The username string. * @domain: The domain name string. * * This function will access the gnome-keyring daemon to find * the passphrase for the given gmail account information in * the keyring. * * Returns: Passphrase or NULL if not found. Free with g_free(). **/ gchar *ggn_keyring_item_find (const gchar *user, const gchar *domain) { /* declare some helping variables. */ GList *found; gchar *passphrase; GnomeKeyringFound *item; GnomeKeyringResult result; GnomeKeyringAttributeList *keyattribs; /* ensure the passphrase is NULL. */ passphrase = NULL; /* define some variables for finding the passphrase. */ keyattribs = ggn_keyring_attribs (user, domain); /* search for the password. */ result = gnome_keyring_find_items_sync (GNOME_KEYRING_ITEM_NETWORK_PASSWORD, keyattribs, &found); /* did we find a passphrase? */ if (result == GNOME_KEYRING_RESULT_OK) { /* NOTE: read the passphrase from the _first_ found item. */ item = g_list_nth_data (found, 0); passphrase = g_strdup (item->secret); } /* free the variables used for the search. */ gnome_keyring_found_list_free (found); gnome_keyring_attribute_list_free (keyattribs); /* return the found passphrase or NULL. */ return passphrase; } gnome-gmail-notifier-0.10.1/src/ggn-audio-priv.h0000644000175000017520000000301111357667274016332 00000000000000/** * @file src/ggn-audio-priv.h The GgnAudio object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnAudioPrivate: * @loop: The #GMainLoop used for playback. * @pipeline: The gstreamer playback pipeline. * @source: The wav file source element. * @parse: The parsing element. * @convert: The wav->pcm conversion element. * @sample: The resampling element. * @sink: The audio output sink. * * The #GgnAudio is a simple GObject wrapper for playing WAV * files using the gstreamer audio manipulation library. **/ struct _GgnAudioPrivate { /* the audio playback loop. */ GMainLoop *loop; /* the playback pipeline. */ GstElement *pipeline; /* the pipeline elements. */ GstElement *source; GstElement *parse; GstElement *convert; GstElement *sample; GstElement *sink; }; gnome-gmail-notifier-0.10.1/src/ggn-about-dialog-priv.h0000644000175000017520000000242711357667274017612 00000000000000/** * @file src/ggn-about-dialog-priv.h The GgnAboutDialog object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnAboutDialogPrivate: * @xml: The #GtkBuilder xml gui object. * @dlg: The #GtkAboutDialog widget. * * The #GgnAboutDialog is a simple object used to display information * relating to development and licensing of the notifier. See the * #GtkAboutDialog widget for more information on the premise of the * about dialog in Gnome. **/ struct _GgnAboutDialogPrivate { /* our dialog object. */ GtkBuilder *xml; GtkAboutDialog *dlg; }; gnome-gmail-notifier-0.10.1/src/ggn-icon.h0000644000175000017520000000612311357667274015212 00000000000000/** * @file src/ggn-icon.h The GgnIcon object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_ICON_H__ #define __GNOME_GMAIL_NOTIFIER_ICON_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * notify style definitions. */ enum { GGN_ICON_STYLE_NONE, GGN_ICON_STYLE_NORMAL, GGN_ICON_STYLE_ERROR, GGN_ICON_STYLE_WARNING, GGN_ICON_STYLE_MESSAGE, GGN_ICON_STYLE_CHECKING }; /* * object function macros. */ #define GGN_TYPE_ICON (ggn_icon_get_type ()) #define GGN_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_ICON, GgnIcon)) #define GGN_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_ICON, GgnIconClass)) #define GGN_IS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_ICON)) #define GGN_IS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_ICON)) #define GGN_ICON_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_ICON, GgnIconClass)) /* * type macros. */ typedef struct _GgnIcon GgnIcon; typedef struct _GgnIconClass GgnIconClass; typedef struct _GgnIconPrivate GgnIconPrivate; /* * object definition. */ struct _GgnIcon { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnIconPrivate *priv; }; /* * class definition. */ struct _GgnIconClass { /* parent gobject class. */ GObjectClass parent; /* status icon and menu callbacks. */ void (*clicked) (GgnIcon *icon); void (*check_selected) (GgnIcon *icon); void (*prefs_selected) (GgnIcon *icon); void (*about_selected) (GgnIcon *icon); void (*quit_selected) (GgnIcon *icon); }; /* * gobject-type definition. */ GType ggn_icon_get_type (void); /* * object creation functions. */ GgnIcon *ggn_icon_new (void); void ggn_icon_free (GgnIcon *icon); /* * icon visibility functions. */ void ggn_icon_show (GgnIcon *icon); void ggn_icon_hide (GgnIcon *icon); /* * style variable setting functions. */ void ggn_icon_set_style (GgnIcon *icon, guint style); void ggn_icon_set_tooltip (GgnIcon *icon, const gchar *tip); void ggn_icon_set_title (GgnIcon *icon, const gchar *title); void ggn_icon_set_summary (GgnIcon *icon, const gchar *summary); /* * notification function. */ void ggn_icon_show_notification (GgnIcon *icon); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_ICON_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-marshal.list0000644000175000017520000000013611357667274016433 00000000000000NONE:NONE NONE:BOOLEAN NONE:STRING,STRING,OBJECT NONE:STRING,STRING NONE:STRING,STRING,STRING gnome-gmail-notifier-0.10.1/src/ggn-marshal.h0000644000175000017520000000436711357667363015720 00000000000000 #ifndef __ggn_marshal_MARSHAL_H__ #define __ggn_marshal_MARSHAL_H__ #include G_BEGIN_DECLS /* NONE:NONE (./ggn-marshal.list:1) */ #define ggn_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID #define ggn_marshal_NONE__NONE ggn_marshal_VOID__VOID /* NONE:BOOLEAN (./ggn-marshal.list:2) */ #define ggn_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN #define ggn_marshal_NONE__BOOLEAN ggn_marshal_VOID__BOOLEAN /* NONE:STRING,STRING,OBJECT (./ggn-marshal.list:3) */ extern void ggn_marshal_VOID__STRING_STRING_OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); #define ggn_marshal_NONE__STRING_STRING_OBJECT ggn_marshal_VOID__STRING_STRING_OBJECT /* NONE:STRING,STRING (./ggn-marshal.list:4) */ extern void ggn_marshal_VOID__STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); #define ggn_marshal_NONE__STRING_STRING ggn_marshal_VOID__STRING_STRING /* NONE:STRING,STRING,STRING (./ggn-marshal.list:5) */ extern void ggn_marshal_VOID__STRING_STRING_STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); #define ggn_marshal_NONE__STRING_STRING_STRING ggn_marshal_VOID__STRING_STRING_STRING G_END_DECLS #endif /* __ggn_marshal_MARSHAL_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-prefs-window.c0000644000175000017520000011250011357667274016676 00000000000000/** * @file src/ggn-prefs-window.c The GgnPrefsWindow object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnPrefsWindow * @short_description: The preferences window object * @include: src/ggn-prefs-window.h **/ /* * include our application header. */ #include #include "ggn-prefs-window-priv.h" #include "ggn-manager-priv.h" /* * forward function definitions. */ static void ggn_prefs_window_init (GgnPrefsWindow *self); static void ggn_prefs_window_class_init (GgnPrefsWindowClass *klass); static void ggn_prefs_window_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnPrefsWindow, ggn_prefs_window, G_TYPE_OBJECT); /** * ggn_prefs_window_show_editor: * @window: The #GgnPrefsWindow we're working with. * * A utility function which is used to show a useful account editor * window in the event that one is required by the user's actions. * * Returns: void. **/ void ggn_prefs_window_show_editor (GgnPrefsWindow *window) { /* set the textual contents of the description entry. */ gtk_entry_set_text (window->priv->txt_edit_desc, ggn_account_get_desc (window->priv->editing)); /* set the textual contents of the username entry. */ gtk_entry_set_text (window->priv->txt_edit_user, ggn_account_get_user (window->priv->editing)); /* set the textual contents of the domain name entry. */ gtk_entry_set_text (window->priv->txt_edit_domain, ggn_account_get_domain (window->priv->editing)); /* set the textual contents of the password entry. */ gtk_entry_set_text (window->priv->txt_edit_pass, ggn_account_get_pass (window->priv->editing)); /* set the boolean value of the default checkbutton widget. */ gtk_toggle_button_set_active (window->priv->chk_edit_def, ggn_account_get_default (window->priv->editing)); /* set the sensitive value of the default checkbutton widget. */ gtk_widget_set_sensitive (GTK_WIDGET (window->priv->chk_edit_def), !ggn_account_get_default (window->priv->editing)); /* show the editor window. */ gtk_widget_show (GTK_WIDGET (window->priv->win_edit)); } /** * ggn_prefs_window_reload_listview: * @window: The #GgnPrefsWindow we're working with. * * A utility function which is used to reload the contents of the * listview holding the account listing. * * Returns: void. **/ void ggn_prefs_window_reload_listview (GgnPrefsWindow *window) { /* declare some helping variables. */ GgnAccount *account; gboolean enab; gchar *email; gchar *desc; guint idx; /* clear the list store. */ gtk_list_store_clear (window->priv->list); /* loop through the accounts list. */ for (idx = 0; idx < ggn_account_list_length (window->priv->alist); idx++) { /* get the account at the current index. */ account = ggn_account_list_get (window->priv->alist, idx); /* construct the email string. */ email = ggn_account_get_email (account); /* get the description string. */ desc = ggn_account_get_desc (account); /* get the enabled value. */ enab = ggn_account_get_enabled (account); /* append a new row object. */ gtk_list_store_append (window->priv->list, &window->priv->iter); /* set the values in the list store. */ gtk_list_store_set (window->priv->list, &window->priv->iter, ACCOUNT_ENAB, enab, ACCOUNT_DESC, desc, ACCOUNT_EMAIL, email, -1); /* free the allocated strings. (desc is an in-use string!!) */ g_free (email); } } /** * ggn_prefs_window_deleted: * @widget: The #GtkWidget that emitted the signal. * @event: The event which occurred in the widget. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the * close button in the window border of the preferences window. * * Returns: success #gboolean. **/ G_MODULE_EXPORT gboolean ggn_prefs_window_deleted (GtkWidget *widget, GdkEvent *event, gpointer data) { /* gain a reference to our preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* hide the preferences window. */ ggn_prefs_window_hide (window); /* we handled this signal. */ return TRUE; } /** * ggn_prefs_window_key_pressed: * @widget: The #GtkWidget that emitted the signal. * @event: The event which occurred in the widget. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user presses a key * with the preferences window in focus, allowing us to scan for * the escape keycode and close the window. * * Returns: success #gboolean. **/ G_MODULE_EXPORT gboolean ggn_prefs_window_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer data) { /* gain a reference to our preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* check for the escape keypress. */ if (event->keyval == GDK_Escape) { /* close the window. */ ggn_prefs_window_hide (window); } /* this callback was handled. */ return TRUE; } /** * ggn_prefs_window_account_toggled: * @renderer: The #GtkCellRendererToggle that was toggled. * @path: The string path of the cell. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user toggles an account * in the accounts list view, which either enables or disables the * given account. * * Returns: void. **/ static void ggn_prefs_window_account_toggled (GtkCellRendererToggle *renderer, gchar *path, gpointer data) { /* declare some helping variables. */ GtkTreePath *treepath; gchar *email; gint idx; /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* get the tree path. */ treepath = gtk_tree_path_new_from_string (path); gtk_tree_model_get_iter (GTK_TREE_MODEL (window->priv->list), &window->priv->iter, treepath); /* get the tree path iterator. */ gtk_tree_model_get (GTK_TREE_MODEL (window->priv->list), &window->priv->iter, ACCOUNT_EMAIL, &email, -1); /* try to find the matching account. */ idx = ggn_account_list_search (window->priv->alist, email); /* if we found it... */ if (idx >= 0) { /* get the account object. */ window->priv->editing = ggn_account_list_get (window->priv->alist, idx); /* toggle the enabled value. */ ggn_account_set_enabled (window->priv->editing, !ggn_account_get_enabled (window->priv->editing)); /* set the new value in the listview. */ gtk_list_store_set (window->priv->list, &window->priv->iter, ACCOUNT_ENAB, ggn_account_get_enabled (window->priv->editing), -1); } /* free the email string. */ g_free (email); /* free the tree path. */ gtk_tree_path_free (treepath); } /** * ggn_prefs_window_account_selected: * @sel: The #GtkTreeSelection that was used. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user selects an account * in the accounts list view. * * Returns: void. **/ static void ggn_prefs_window_account_selected (GtkTreeSelection *sel, gpointer data) { /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* get the account edit button. */ GtkWidget *btn_edit = GTK_WIDGET (gtk_builder_get_object (window->priv->xml_prefs, "btnAccountEdit")); /* get the account delete button. */ GtkWidget *btn_del = GTK_WIDGET (gtk_builder_get_object (window->priv->xml_prefs, "btnAccountDel")); /* get the tree model of the list view. */ GtkTreeModel *model = GTK_TREE_MODEL (window->priv->list); /* act on the selection. */ if (gtk_tree_selection_get_selected (sel, &model, &window->priv->iter)) { /* we have something selected, enable the buttons. */ gtk_widget_set_sensitive (btn_edit, TRUE); gtk_widget_set_sensitive (btn_del, TRUE); } else { /* nothing is selected, disable the buttons. */ gtk_widget_set_sensitive (btn_edit, FALSE); gtk_widget_set_sensitive (btn_del, FALSE); } } /** * ggn_prefs_window_account_activated: * @treeview: The #GtkTreeView that was activated. * @path: The #GtkTreePath to the activated row. * @column: The activated column. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user double-clicks an account * in the accounts list view, indicating it should be brought up for editing. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_account_activated (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *column, gpointer data) { /* declare some helping variables. */ GtkTreeModel *model; GtkTreeView *tree; gchar *email; gint idx; /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* get a reference to the tree view. */ tree = GTK_TREE_VIEW (gtk_builder_get_object (window->priv->xml_prefs, "treeAccounts")); /* get the current listview selection. */ window->priv->sel = gtk_tree_view_get_selection (tree); /* get the iterator. */ model = GTK_TREE_MODEL (window->priv->list); if (!gtk_tree_selection_get_selected (window->priv->sel, &model, &window->priv->iter)) { /* nothing is selected. */ return; } /* determine the account email address. */ gtk_tree_model_get (model, &window->priv->iter, ACCOUNT_EMAIL, &email, -1); /* search for the matching account. */ idx = ggn_account_list_search (window->priv->alist, email); /* if the account was found... */ if (idx >= 0) { /* get the account object. */ window->priv->editing = ggn_account_list_get (window->priv->alist, idx); /* show the account editor window. */ ggn_prefs_window_show_editor (window); } /* free the email string. */ g_free (email); } /** * ggn_prefs_window_account_add: * @button: The #GtkButton that was clicked. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the button * to add an account to the list view. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_account_add (GtkButton *button, gpointer data) { /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* create a new account. */ window->priv->editing = ggn_account_new (); /* set the default account values. */ ggn_account_set_desc (window->priv->editing, _("New Account")); ggn_account_set_pass (window->priv->editing, ""); ggn_account_set_user (window->priv->editing, "username"); ggn_account_set_domain (window->priv->editing, "gmail.com"); ggn_account_set_enabled (window->priv->editing, FALSE); ggn_account_set_default (window->priv->editing, FALSE); /* add the account to the accounts list. */ ggn_account_list_add (window->priv->alist, window->priv->editing); /* update the list view. */ ggn_prefs_window_reload_listview (window); /* show the account editor window. */ ggn_prefs_window_show_editor (window); } /** * ggn_prefs_window_account_del: * @button: The #GtkButton that was clicked. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the button * to delete an account from the list view. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_account_del (GtkButton *button, gpointer data) { /* declare some helping variables. */ GtkTreeModel *model; GtkTreeView *tree; gchar *email; gint idx; /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* get a reference to the accounts tree view. */ tree = GTK_TREE_VIEW (gtk_builder_get_object (window->priv->xml_prefs, "treeAccounts")); /* get the current list selection. */ window->priv->sel = gtk_tree_view_get_selection (tree); /* get the iterator. */ model = GTK_TREE_MODEL (window->priv->list); if (!gtk_tree_selection_get_selected (window->priv->sel, &model, &window->priv->iter)) { /* nothing is selected. */ return; } /* determine the account email string. */ gtk_tree_model_get (model, &window->priv->iter, ACCOUNT_EMAIL, &email, -1); /* get the matching account index, if any exists. */ idx = ggn_account_list_search (window->priv->alist, email); /* see if a matching account exists. */ if (idx >= 0) { /* remove this account from the list. */ ggn_account_list_del (window->priv->alist, idx); /* update the list view. */ ggn_prefs_window_reload_listview (window); } /* free the email string. */ g_free (email); } /** * ggn_prefs_window_account_edit: * @button: The #GtkButton that was clicked. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the button * to edit an account in the list view. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_account_edit (GtkButton *button, gpointer data) { /* declare some helping variables. */ GtkTreeModel *model; GtkTreeView *tree; gchar *email; gint idx; /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* get a reference to the accounts tree view. */ tree = GTK_TREE_VIEW (gtk_builder_get_object (window->priv->xml_prefs, "treeAccounts")); /* get the current list selection. */ window->priv->sel = gtk_tree_view_get_selection (tree); /* get the iterator. */ model = GTK_TREE_MODEL (window->priv->list); if (!gtk_tree_selection_get_selected (window->priv->sel, &model, &window->priv->iter)) { /* nothing is selected. */ return; } /* determine the account email string. */ gtk_tree_model_get (model, &window->priv->iter, ACCOUNT_EMAIL, &email, -1); /* get the matching account index, if any exists. */ idx = ggn_account_list_search (window->priv->alist, email); /* see if a matching account exists. */ if (idx >= 0) { /* get the account object. */ window->priv->editing = ggn_account_list_get (window->priv->alist, idx); /* show the account editor window. */ ggn_prefs_window_show_editor (window); } /* free the email string. */ g_free (email); } /** * ggn_prefs_window_rate_changed: * @range: The #GtkRange that was changed. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user changes the value of * the check rate slider. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_rate_changed (GtkRange *range, gpointer data) { /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* save the new value to the gconf-2 database. */ ggn_prefs_set_int (window->priv->prefs, GGN_PREF_CHECKRATE, (gint) gtk_range_get_value (range)); } /** * ggn_prefs_window_rate_format: * @scale: The #GtkScale that needs formatting. * @value: The value of the scale in question. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user changes the value of * the check rate slider to determine what string to print underneath. * * Returns: void. **/ G_MODULE_EXPORT gchar *ggn_prefs_window_rate_format (GtkScale *scale, gdouble value, gpointer data) { /* look at the value. */ if (value == 1) { /* singular value. */ return g_strdup_printf ("%1.d %s", (gint) value, _("minute")); } else if (value <= 9) { /* plural value 2-9. */ return g_strdup_printf ("%1.d %s", (gint) value, _("minutes")); } else { /* plural value 10-60. */ return g_strdup_printf ("%2.d %s", (gint) value, _("minutes")); } } /** * ggn_prefs_window_notify_msgs_toggled: * @button: The #GtkToggleButton that was toggled. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user toggles the message * notification bubble check button. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_notify_msgs_toggled (GtkToggleButton *button, gpointer data) { /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* set the new value with the prefs object. */ ggn_prefs_set_bool (window->priv->prefs, GGN_PREF_NOTIFY_NEW, gtk_toggle_button_get_active (button)); } /** * ggn_prefs_window_notify_errs_toggled: * @button: The #GtkToggleButton that was toggled. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user toggles the error * notification bubble check button. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_notify_errs_toggled (GtkToggleButton *button, gpointer data) { /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* set the new value with the prefs object. */ ggn_prefs_set_bool (window->priv->prefs, GGN_PREF_NOTIFY_ERR, gtk_toggle_button_get_active (button)); } /** * ggn_prefs_window_sound_enab_toggled: * @button: The #GtkToggleButton that was toggled. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user toggles the sound * enabling check button. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_sound_enab_toggled (GtkToggleButton *button, gpointer data) { /* gain a reference to the preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* set the new value with the prefs object. */ ggn_prefs_set_bool (window->priv->prefs, GGN_PREF_SOUND_ENAB, gtk_toggle_button_get_active (button)); } /** * ggn_prefs_window_test_sound: * @button: The #GtkButton that was clicked. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the button * to test the currently selected sound file. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_test_sound (GtkButton *button, gpointer data) { /* gain a reference to our preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* determine the current filename. */ gchar *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (window->priv->chooser)); /* play the sound file. */ if (window->priv->audio) ggn_audio_play_file (window->priv->audio, filename); /* free the filename string. */ g_free (filename); } /** * ggn_prefs_window_closed: * @button: The #GtkButton that emitted the signal. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the * "Close" button in the preferences window. * * Returns: void. **/ G_MODULE_EXPORT void ggn_prefs_window_closed (GtkButton *button, gpointer data) { /* gain a reference to our preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* hide the preferences window. */ ggn_prefs_window_hide (window); } /** * ggn_edit_window_deleted: * @widget: The #GtkWidget that emitted the signal. * @event: The event which occurred in the widget. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the * close button in the window border of the account editor window. * * Returns: success #gboolean. **/ G_MODULE_EXPORT gboolean ggn_edit_window_deleted (GtkWidget *widget, GdkEvent *event, gpointer data) { /* gain a reference to our preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* hide the account editor window. */ gtk_widget_hide (GTK_WIDGET (window->priv->win_edit)); /* we handled this signal. */ return TRUE; } /** * ggn_edit_window_key_pressed: * @widget: The #GtkWidget that emitted the signal. * @event: The event which occurred in the widget. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user presses a key * with the account editor window in focus, allowing us to scan for * the escape keycode and close the window. * * Returns: success #gboolean. **/ G_MODULE_EXPORT gboolean ggn_edit_window_key_pressed (GtkWidget *widget, GdkEventKey *event, gpointer data) { /* gain a reference to our preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* check for the escape keypress. */ if (event->keyval == GDK_Escape) { /* close the window. */ gtk_widget_hide (GTK_WIDGET (window->priv->win_edit)); } /* this callback is not always the end of the line. */ return FALSE; } /** * ggn_edit_window_cancelled: * @button: The #GtkButton that emitted the signal. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the * "Cancel" button in the account editor window. * * Returns: void. **/ G_MODULE_EXPORT void ggn_edit_window_cancelled (GtkButton *button, gpointer data) { /* gain a reference to our preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* hide the editor window. */ gtk_widget_hide (GTK_WIDGET (window->priv->win_edit)); } /** * ggn_edit_window_confirmed: * @button: The #GtkButton that emitted the signal. * @data: Private data, in this case our #GgnPrefsWindow. * * Callback function that is executed when the user clicks the * "OK" button in the account editor window. * * Returns: void. **/ G_MODULE_EXPORT void ggn_edit_window_confirmed (GtkButton *button, gpointer data) { /* declare some helping variables. */ GgnAccount *account; const gchar *user; const gchar *domain; guint idx; /* gain a reference to our preferences window. */ GgnPrefsWindow *window = GGN_PREFS_WINDOW (data); /* save the textual contents of the description entry. */ ggn_account_set_desc (window->priv->editing, gtk_entry_get_text (window->priv->txt_edit_desc)); /* save the textual contents of the username entry. */ user = gtk_entry_get_text (window->priv->txt_edit_user); /* save the textual contents of the domain entry. */ domain = gtk_entry_get_text (window->priv->txt_edit_domain); /* set the username and domain values. */ ggn_account_set_email (window->priv->editing, user, domain); /* save the textual contents of the password entry. */ ggn_account_set_pass (window->priv->editing, gtk_entry_get_text (window->priv->txt_edit_pass)); /* get the boolean value of the widget. */ if (gtk_toggle_button_get_active (window->priv->chk_edit_def)) { /* loop through the list of accounts. */ for (idx = 0; idx < ggn_account_list_length (window->priv->alist); idx++) { /* get the account at this index. */ account = ggn_account_list_get (window->priv->alist, idx); /* set the account to not-default. */ ggn_account_set_default (account, FALSE); } /* set this account to default. */ ggn_account_set_default (window->priv->editing, TRUE); } /* update the list view of accounts. */ ggn_prefs_window_reload_listview (window); /* hide the editor window. */ gtk_widget_hide (GTK_WIDGET (window->priv->win_edit)); } /* * ggn_prefs_window_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_prefs_window_init (GgnPrefsWindow *self) { /* declare a few helping variables. */ GtkFileFilter *filter; GtkWidget *item; /* set up the private data structure. */ self->priv = g_new0 (GgnPrefsWindowPrivate, 1); /* set the currently edited account to null. */ self->priv->editing = NULL; /* allocate a gtkbuilder object. */ self->priv->xml_prefs = gtk_builder_new (); /* load the preferences window xml file. */ gtk_builder_add_from_file (self->priv->xml_prefs, GGN_XMLUI_PREFS, NULL); /* retrieve the preferences window widget. */ self->priv->win_prefs = GTK_WINDOW (gtk_builder_get_object (self->priv->xml_prefs, "GgnPrefsWindow")); /* set up the accounts list view. */ self->priv->list = gtk_list_store_new (LAST_ELEMENT, G_TYPE_BOOLEAN, G_TYPE_STRING, G_TYPE_STRING); /* get a reference to the list view. */ item = GTK_WIDGET (gtk_builder_get_object (self->priv->xml_prefs, "treeAccounts")); /* set the model of the list view. */ gtk_tree_view_set_model (GTK_TREE_VIEW (item), GTK_TREE_MODEL (self->priv->list)); /* set up the accounts list view cell renderers. */ self->priv->cells[ACCOUNT_ENAB] = gtk_cell_renderer_toggle_new (); self->priv->cells[ACCOUNT_DESC] = gtk_cell_renderer_text_new (); /* set the activatable property of the first cell renderer. */ g_object_set (G_OBJECT (self->priv->cells[ACCOUNT_ENAB]), "activatable", TRUE, NULL); /* link the toggled callback to the first cell renderer. */ g_signal_connect (G_OBJECT (self->priv->cells[ACCOUNT_ENAB]), "toggled", G_CALLBACK (ggn_prefs_window_account_toggled), self); /* set up the account enabled column. */ self->priv->columns[ACCOUNT_ENAB] = gtk_tree_view_column_new_with_attributes (_("Enabled"), self->priv->cells[ACCOUNT_ENAB], "active", ACCOUNT_ENAB, NULL); /* set up the account description column. */ self->priv->columns[ACCOUNT_DESC] = gtk_tree_view_column_new_with_attributes (_("Name"), self->priv->cells[ACCOUNT_DESC], "text", ACCOUNT_DESC, NULL); /* append the columns to the accounts list view. */ gtk_tree_view_append_column (GTK_TREE_VIEW (item), self->priv->columns[ACCOUNT_ENAB]); gtk_tree_view_append_column (GTK_TREE_VIEW (item), self->priv->columns[ACCOUNT_DESC]); /* get the selection from the accounts list view. */ self->priv->sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (item)); /* link the changed callback to the list view selection. */ g_signal_connect (G_OBJECT (self->priv->sel), "changed", G_CALLBACK (ggn_prefs_window_account_selected), self); /* get a reference to the file chooser button. */ self->priv->chooser = GTK_WIDGET (gtk_builder_get_object (self->priv->xml_prefs, "btnSoundsChoose")); /* create a file-type filter for our chooser. */ filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Wave audio files")); gtk_file_filter_add_pattern (filter, "*.wav"); gtk_file_filter_add_mime_type (filter, "audio/x-wav"); /* apply the new filter to the file chooser. */ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (self->priv->chooser), filter); /* connect the signals used by the preferences window and widgets. */ gtk_builder_connect_signals (self->priv->xml_prefs, self); /* allocate another gtkbuilder object. */ self->priv->xml_edit = gtk_builder_new (); /* load the account editor window xml file. */ gtk_builder_add_from_file (self->priv->xml_edit, GGN_XMLUI_EDIT, NULL); /* retrieve the account editor window widget. */ self->priv->win_edit = GTK_WINDOW (gtk_builder_get_object (self->priv->xml_edit, "GgnEditWindow")); /* make the account editor window a child of the preferences window. */ gtk_window_set_modal (self->priv->win_edit, TRUE); gtk_window_set_transient_for (self->priv->win_edit, self->priv->win_prefs); /* get the description entry widget. */ self->priv->txt_edit_desc = GTK_ENTRY (gtk_builder_get_object (self->priv->xml_edit, "txtName")); /* get the username entry widget. */ self->priv->txt_edit_user = GTK_ENTRY (gtk_builder_get_object (self->priv->xml_edit, "txtUser")); /* get the domain name entry widget. */ self->priv->txt_edit_domain = GTK_ENTRY (gtk_builder_get_object (self->priv->xml_edit, "txtDomain")); /* get the password entry widget. */ self->priv->txt_edit_pass = GTK_ENTRY (gtk_builder_get_object (self->priv->xml_edit, "txtPass")); /* get the default value check button widget. */ self->priv->chk_edit_def = GTK_TOGGLE_BUTTON (gtk_builder_get_object (self->priv->xml_edit, "chkDefault")); /* connect the signals used by the account editor window and widgets. */ gtk_builder_connect_signals (self->priv->xml_edit, self); } /* * ggn_prefs_window_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_prefs_window_class_init (GgnPrefsWindowClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_prefs_window_finalize; } /* * ggn_prefs_window_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_prefs_window_finalize (GObject *obj) { /* make a reference to ourself. */ GgnPrefsWindow *self = GGN_PREFS_WINDOW (obj); /* free the gtkbuilder xml and window widgets. */ g_object_unref (G_OBJECT (self->priv->xml_edit)); g_object_unref (G_OBJECT (self->priv->xml_prefs)); gtk_widget_destroy (GTK_WIDGET (self->priv->win_edit)); gtk_widget_destroy (GTK_WIDGET (self->priv->win_prefs)); /* dereference our referenced objects. they will be freed elsewhere. */ self->priv->alist = NULL; self->priv->prefs = NULL; self->priv->audio = NULL; /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_prefs_window_parent_class)->finalize (obj); } /** * ggn_prefs_window_new: * * Creates a new #GgnPrefsWindow with default values, which are * used to edit preferences concerning application functionality. * * Returns: the new #GgnPrefsWindow object. Free with ggn_prefs_window_free(). **/ GgnPrefsWindow *ggn_prefs_window_new (void) { /* make a newly created gobject. */ GgnPrefsWindow *window = g_object_new (GGN_TYPE_PREFS_WINDOW, NULL); /* return the new object. */ return window; } /** * ggn_prefs_window_new_from_manager: * * Creates a new #GgnPrefsWindow with default values, which are * used to edit preferences concerning application functionality. * This function, however, adds specific information needed for * right functioning. * * Returns: the new #GgnPrefsWindow object. Free with ggn_prefs_window_free(). **/ GgnPrefsWindow *ggn_prefs_window_new_from_manager (GgnManager *manager) { /* make a newly created gobject. */ GgnPrefsWindow *window = g_object_new (GGN_TYPE_PREFS_WINDOW, NULL); /* pull in references to the manager objects we require. */ window->priv->alist = manager->priv->alist; window->priv->prefs = manager->priv->prefs; window->priv->audio = manager->priv->audio; /* return the new object. */ return window; } /** * ggn_prefs_window_free: * @window: The #GgnPrefsWindow to free. * * Frees the given #GgnPrefsWindow object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_prefs_window_free (GgnPrefsWindow *window) { /* while this object exists... */ while (G_IS_OBJECT (window)) { /* unreference this object. */ g_object_unref (G_OBJECT (window)); } } /** * ggn_prefs_window_show: * @window: the #GgnPrefsWindow to show. * * Makes the provided preferences window visible by showing its associated * #GtkWindow widget. * * Returns: void. **/ void ggn_prefs_window_show (GgnPrefsWindow *window) { /* declare some helping variables. */ GtkWidget *item; gchar *soundfile; /* if we have a prefs object, set up the widgets with values. */ if (window->priv->prefs) { /* reload the information into the listview. */ ggn_prefs_window_reload_listview (window); /* get a reference to the check rate slider. */ item = GTK_WIDGET (gtk_builder_get_object (window->priv->xml_prefs, "slideUpdates")); /* set the slider value. */ gtk_range_set_value (GTK_RANGE (item), (gdouble) ggn_prefs_get_int (window->priv->prefs, GGN_PREF_CHECKRATE)); /* get a reference to the message notification check button. */ item = GTK_WIDGET (gtk_builder_get_object (window->priv->xml_prefs, "chkNotesMsgs")); /* set the check button value. */ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), ggn_prefs_get_bool (window->priv->prefs, GGN_PREF_NOTIFY_NEW)); /* get a reference to the error notification check button. */ item = GTK_WIDGET (gtk_builder_get_object (window->priv->xml_prefs, "chkNotesErrs")); /* set the check button value. */ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), ggn_prefs_get_bool (window->priv->prefs, GGN_PREF_NOTIFY_ERR)); /* get a reference to the sound playback check button. */ item = GTK_WIDGET (gtk_builder_get_object (window->priv->xml_prefs, "chkSounds")); /* set the check button value. */ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), ggn_prefs_get_bool (window->priv->prefs, GGN_PREF_SOUND_ENAB)); /* get the sound filename. */ soundfile = ggn_prefs_get_string (window->priv->prefs, GGN_PREF_SOUND_FILE); /* set the file chooser filename. */ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (window->priv->chooser), soundfile); /* free the sound filename string. */ g_free (soundfile); } /* show the preferences window widget. */ gtk_widget_show (GTK_WIDGET (window->priv->win_prefs)); } /** * ggn_prefs_window_hide: * @window: the #GgnPrefsWindow to hide. * * Makes the provided preferences window invisible by hiding its associated * #GtkWindow widget. * * Returns: void. **/ void ggn_prefs_window_hide (GgnPrefsWindow *window) { /* get the current sound filename. */ gchar *filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (window->priv->chooser)); /* save the current soundfile setting. */ ggn_prefs_set_string (window->priv->prefs, GGN_PREF_SOUND_FILE, filename); /* free the filename string. */ g_free (filename); /* hide the preferences window widget. */ gtk_widget_hide (GTK_WIDGET (window->priv->win_prefs)); } gnome-gmail-notifier-0.10.1/src/ggn-entry.c0000644000175000017520000001363311357667274015422 00000000000000/** * @file src/ggn-entry.c The GgnEntry object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnEntry * @short_description: The account entry object * @include: src/ggn-entry.h **/ /* * include our application header. */ #include #include "ggn-entry-priv.h" /* * forward function definitions. */ static void ggn_entry_init (GgnEntry *self); static void ggn_entry_class_init (GgnEntryClass *klass); static void ggn_entry_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnEntry, ggn_entry, G_TYPE_OBJECT); /* * ggn_entry_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_entry_init (GgnEntry *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnEntryPrivate, 1); /* initialize private instance objects. */ self->priv->summary = NULL; self->priv->title = NULL; self->priv->sender_email = NULL; self->priv->sender_name = NULL; self->priv->link = NULL; self->priv->id = NULL; /* initialize the state. */ self->priv->state = GGN_ENTRY_STATE_NEW; } /* * ggn_entry_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_entry_class_init (GgnEntryClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_entry_finalize; } /* * ggn_entry_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_entry_finalize (GObject *obj) { /* make a reference to ourself. */ GgnEntry *self = GGN_ENTRY (obj); /* free the private instance objects. */ g_free (self->priv->summary); g_free (self->priv->title); g_free (self->priv->sender_email); g_free (self->priv->sender_name); g_free (self->priv->link); g_free (self->priv->id); /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_entry_parent_class)->finalize (obj); } /** * ggn_entry_new: * * Creates a new #GgnEntry with default values, which are * used to show information about the current inbox new messages. * * Returns: the new #GgnEntry object. Free with ggn_entry_free(). **/ GgnEntry *ggn_entry_new (void) { /* make a newly created gobject. */ GgnEntry *entry = g_object_new (GGN_TYPE_ENTRY, NULL); /* return the new object. */ return entry; } /** * ggn_entry_free: * @entry: The #GgnEntry to free. * * Frees the given #GgnEntry object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_entry_free (GgnEntry *entry) { /* while this object exists... */ while (G_IS_OBJECT (entry)) { /* unreference this object. */ g_object_unref (G_OBJECT (entry)); } } /** * ggn_entry_get_summary: * @entry: The #GgnEntry to access. * * Request the summary string of the #GgnEntry object. * * Returns: An in-use string. Freed automatically by ggn_entry_free(). **/ gchar *ggn_entry_get_summary (GgnEntry *entry) { /* return the value we are storing. */ return entry->priv->summary; } /** * ggn_entry_get_title: * @entry: The #GgnEntry to access. * * Request the title string of the #GgnEntry object. * * Returns: An in-use string. Freed automatically by ggn_entry_free(). **/ gchar *ggn_entry_get_title (GgnEntry *entry) { /* return the value we are storing. */ return entry->priv->title; } /** * ggn_entry_get_sender_email: * @entry: The #GgnEntry to access. * * Request the sender email string of the #GgnEntry object. * * Returns: An in-use string. Freed automatically by ggn_entry_free(). **/ gchar *ggn_entry_get_sender_email (GgnEntry *entry) { /* return the value we are storing. */ return entry->priv->sender_email; } /** * ggn_entry_get_sender_name: * @entry: The #GgnEntry to access. * * Request the sender name string of the #GgnEntry object. * * Returns: An in-use string. Freed automatically by ggn_entry_free(). **/ gchar *ggn_entry_get_sender_name (GgnEntry *entry) { /* return the value we are storing. */ return entry->priv->sender_name; } /** * ggn_entry_get_link: * @entry: The #GgnEntry to access. * * Request the link string of the #GgnEntry object. * * Returns: An in-use string. Freed automatically by ggn_entry_free(). **/ gchar *ggn_entry_get_link (GgnEntry *entry) { /* return the value we are storing. */ return entry->priv->link; } /** * ggn_entry_get_id: * @entry: The #GgnEntry to access. * * Request the id string of the #GgnEntry object. * * Returns: An in-use string. Freed automatically by ggn_entry_free(). **/ gchar *ggn_entry_get_id (GgnEntry *entry) { /* return the value we are storing. */ return entry->priv->id; } /** * ggn_entry_get_state: * @entry: The #GgnEntry to access. * * Request the state of the #GgnEntry object. * * Returns: The state #guint of the entry object. **/ guint ggn_entry_get_state (GgnEntry *entry) { /* return the value we are storing. */ return entry->priv->state; } gnome-gmail-notifier-0.10.1/src/ggn-account-list.h0000644000175000017520000000717411357667274016676 00000000000000/** * @file src/ggn-account-list.h The GgnAccountList object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_ACCOUNT_LIST_H__ #define __GNOME_GMAIL_NOTIFIER_ACCOUNT_LIST_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * object function macros. */ #define GGN_TYPE_ACCOUNT_LIST (ggn_account_list_get_type ()) #define GGN_ACCOUNT_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_ACCOUNT_LIST, GgnAccountList)) #define GGN_ACCOUNT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_ACCOUNT_LIST, GgnAccountListClass)) #define GGN_IS_ACCOUNT_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_ACCOUNT_LIST)) #define GGN_IS_ACCOUNT_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_ACCOUNT_LIST)) #define GGN_ACCOUNT_LIST_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_ACCOUNT_LIST, GgnAccountListClass)) /* * type macros. */ typedef struct _GgnAccountList GgnAccountList; typedef struct _GgnAccountListClass GgnAccountListClass; typedef struct _GgnAccountListPrivate GgnAccountListPrivate; /* * object definition. */ struct _GgnAccountList { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnAccountListPrivate *priv; }; /* * class definition. */ struct _GgnAccountListClass { /* parent gobject class. */ GObjectClass parent; /* status icon and menu callbacks. */ void (*modified) (GgnAccountList *alist); void (*checked) (GgnAccountList *alist); void (*failed) (GgnAccountList *alist); }; /* * gobject-type definition. */ GType ggn_account_list_get_type (void); /* * object creation functions. */ GgnAccountList *ggn_account_list_new (void); GgnAccountList *ggn_account_list_new_from_prefs (GgnPrefs *prefs); void ggn_account_list_free (GgnAccountList *alist); /* * account list management functions. */ guint ggn_account_list_length (GgnAccountList *alist); guint ggn_account_list_get_num_nonempty (GgnAccountList *alist); guint ggn_account_list_get_num_enabled (GgnAccountList *alist); guint ggn_account_list_get_num_failed (GgnAccountList *alist); void ggn_account_list_get_num_entries (GgnAccountList *alist, guint *n_unread, guint *n_new); gboolean ggn_account_list_is_checking (GgnAccountList *alist); gint ggn_account_list_search (GgnAccountList *alist, const gchar *email); void ggn_account_list_add (GgnAccountList *alist, GgnAccount *account); void ggn_account_list_del (GgnAccountList *alist, guint idx); void ggn_account_list_check (GgnAccountList *alist); /* * account list account retrieval functions. */ GgnAccount *ggn_account_list_get (GgnAccountList *alist, guint idx); GgnAccount *ggn_account_list_get_default (GgnAccountList *alist); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_ACCOUNT_LIST_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-xml.h0000644000175000017520000000561111357667274015063 00000000000000/** * @file src/ggn-xml.h GgnXML object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_XML_H__ #define __GNOME_GMAIL_NOTIFIER_XML_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * object function macros. */ #define GGN_TYPE_XML (ggn_xml_get_type ()) #define GGN_XML(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_XML, GgnXML)) #define GGN_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_XML, GgnXMLClass)) #define GGN_IS_XML(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_XML)) #define GGN_IS_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_XML)) #define GGN_XML_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_XML, GgnXMLClass)) /* * type macros. */ typedef struct _GgnXML GgnXML; typedef struct _GgnXMLClass GgnXMLClass; typedef struct _GgnXMLPrivate GgnXMLPrivate; /* * object definition. */ struct _GgnXML { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnXMLPrivate *priv; }; /* * class definition. */ struct _GgnXMLClass { /* parent gobject class. */ GObjectClass parent; /* "begin_element": called on opened tags. */ void (*begin_element) (GgnXML *xml, gchar *element_path, gchar *element_name, GHashTable *attributes); /* "end_element": called on closed tags. */ void (*end_element) (GgnXML *xml, gchar *element_path, gchar *element_name); /* "text": called on text content. */ void (*text) (GgnXML *xml, gchar *element_path, gchar *element_name, gchar *value); }; /* * gobject-type definition. */ GType ggn_xml_get_type (void); /* * object creation functions. */ GgnXML *ggn_xml_new (void); void ggn_xml_free (GgnXML *xml); /* * functions to parse various forms of text. */ gboolean ggn_xml_load_string (GgnXML *xml, const gchar *str); gboolean ggn_xml_load_file (GgnXML *xml, const gchar *filename); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_XML_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-entry-priv.h0000644000175000017520000000321111357667274016374 00000000000000/** * @file src/ggn-entry-priv.h The GgnEntry object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnEntryPrivate: * @summary: The message summary, a snippet of the full text. * @title: The message title from the ATOM feed. * @sender_email: Email address of the sender. * @sender_name: Human-readable name of the sender. * @link: The URL to the given message. * @id: The identifier that google provides for each message. * @state: The state of the entry: new/unread. * * The #GgnEntry is a simple GObject wrapper for containing GMail * email inbox entries that have been parsed from the ATOM feed. * Using such a wrapper allows for a more flexible approach to * the #GgnAccount objects. **/ struct _GgnEntryPrivate { /* the email account entry properties. */ gchar *summary; gchar *title; gchar *sender_email; gchar *sender_name; gchar *link; gchar *id; /* the entry state. */ guint state; }; gnome-gmail-notifier-0.10.1/src/main.h0000644000175000017520000001122211357667274014431 00000000000000/** * @file src/main.h Gnome Gmail Notifier main source * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ #ifndef __GNOME_GMAIL_NOTIFIER_MAIN_H__ #define __GNOME_GMAIL_NOTIFIER_MAIN_H__ /* * ansi include statements. these files provide * basic ansi c functionality to the rest of the * application. */ #include #include #include #include #include /* * glib include statement. this includes the glib * "object-oriented" wrapper for gtk and other * special higher-level interfaces. */ #include #include #include #include #include /* * glib explicit threading support include statement. * this includes the gthread header and the pthread * header. */ #include #include /* * gconf include statement. this includes the gconf * headers required to determine the gnome default * browser, so we can load gmail in a web browser * when the user clicks our icon. */ #include #include /* * gtk include statement. gtk provides the gui * for the rest of the application to use. */ #include #include /* * libnotify include statement. libnotify is used * to display notification "bubbles" for various * events, such as when the user recieves new mail * or the app cannot connect to the account. */ #include /* * libsoup include statement. libsoup provides the * interfaces required for downloading the atom * inbox feed from gmail using the http protocol. */ #include /* * libxml2 include statement. libxml2 provides * the xml parsing routines required to parse both * the ATOM 0.3 feed from GMail and the preferences * files for each user. */ #include /* * gstreamer include statement. gstreamer provides * a lower-level interface to the gnome sound play- * back systems and supports more than esd. */ #include /* * gnome-keyring include statement. this provides a * much more "gnome-like" method of saving password * data for each user account. */ #include /* * configuration include statements. the config.h * header is created during the ./configure process * to provide the application with some fairly * flexible defines. */ #include "config.h" /* * the filenames for graphics and gtk xml files that the notifier * loads at runtime. these are configured by the autotools scripts. */ #define GGN_PIXMAP_NORMAL PIXMAPS_DIR "/ggn-normal-lg.svg" #define GGN_PIXMAP_NORMAL_SM PIXMAPS_DIR "/ggn-normal-sm.svg" #define GGN_PIXMAP_ERROR PIXMAPS_DIR "/ggn-error-lg.svg" #define GGN_PIXMAP_ERROR_SM PIXMAPS_DIR "/ggn-error-sm.svg" #define GGN_PIXMAP_MESSAGE PIXMAPS_DIR "/ggn-new-lg.svg" #define GGN_PIXMAP_MESSAGE_SM PIXMAPS_DIR "/ggn-new-sm.svg" #define GGN_PIXMAP_WARNING PIXMAPS_DIR "/ggn-warn.svg" #define GGN_PIXMAP_CHECKING PIXMAPS_DIR "/ggn-wait.svg" #define GGN_PIXMAP_COMPOSE PIXMAPS_DIR "/ggn-write.svg" #define GGN_XMLUI_MENU XMLUI_DIR "/ggn-menu.xml" #define GGN_XMLUI_PREFS XMLUI_DIR "/ggn-prefs.xml" #define GGN_XMLUI_ABOUT XMLUI_DIR "/ggn-about.xml" #define GGN_XMLUI_EDIT XMLUI_DIR "/ggn-edit.xml" /* * application header include statements. these * include all of the definitions for internal * program functionality. */ #include "ggn-marshal.h" #include "ggn-about-dialog.h" #include "ggn-audio.h" #include "ggn-keyring.h" #include "ggn-prefs.h" #include "ggn-icon.h" #include "ggn-xml.h" #include "ggn-entry.h" #include "ggn-account.h" #include "ggn-account-list.h" #include "ggn-manager.h" #include "ggn-prefs-window.h" /* * functions that are contained in no specific object, but are * essential to the operation of the application... */ void ggn_link_execute (const gchar *link); #endif /* __GNOME_GMAIL_NOTIFIER_MAIN_H__ */ gnome-gmail-notifier-0.10.1/src/config.h.in0000644000175000017520000000354711357667363015371 00000000000000/* src/config.h.in. Generated from configure.ac by autoheader. */ /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_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 /* 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 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION gnome-gmail-notifier-0.10.1/src/ggn-prefs-window-priv.h0000644000175000017520000000553011357667274017665 00000000000000/** * @file src/ggn-prefs-window-priv.h The GgnPrefsWindow object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * the data columns for the list view. */ enum { ACCOUNT_ENAB, ACCOUNT_DESC, ACCOUNT_EMAIL, LAST_ELEMENT }; /** * GgnPrefsWindowPrivate: * @xml_prefs: The #GtkBuilder xml gui object for the preferences window. * @win_prefs: The #GtkWindow widget for the preferences window. * @xml_edit: The #GtkBuilder xml gui object for the account editor window. * @win_edit: The #GtkWindow widget for the account editor window. * @list: The #GtkTreeModel we are using to list the accounts. * @iter: The list iterator used for selections and deletions in the list. * @cells: The cells in the list view. * @columns: The columns in the list view. * @sel: The current list view selection. * @chooser: The sound file chooser widget. * @alist: The #GgnAccountList we modify to suit the user's needs. * @prefs: The #GgnPrefs object we use to manipulate settings. * @audio: The #GgnAudio object we use to sample sound files. * * The #GgnPrefsWindow is a graphical window which takes advantage of the * GtkBuilder XML user-interface object to allow the user to interact easily * with the gmail notifier for setting preferences and account information. **/ struct _GgnPrefsWindowPrivate { /* the preferences window. */ GtkBuilder *xml_prefs; GtkWindow *win_prefs; /* the account edit window. */ GtkBuilder *xml_edit; GtkWindow *win_edit; /* the list-view objects in use. */ GtkListStore *list; GtkTreeIter iter; GtkCellRenderer *cells[LAST_ELEMENT]; GtkTreeViewColumn *columns[LAST_ELEMENT]; GtkTreeSelection *sel; /* the soundfile chooser. */ GtkWidget *chooser; /* the account editor widgets. */ GtkEntry *txt_edit_desc; GtkEntry *txt_edit_user; GtkEntry *txt_edit_domain; GtkEntry *txt_edit_pass; GtkToggleButton *chk_edit_def; /* the account we are currently editing, if any. */ GgnAccount *editing; /* the accounts listing for the app. */ GgnAccountList *alist; /* the preferences object for the app. */ GgnPrefs *prefs; /* The audio playback object. */ GgnAudio *audio; }; gnome-gmail-notifier-0.10.1/src/Makefile.in0000644000175000017520000004610711357667340015405 00000000000000# Makefile.in generated by automake 1.10.2 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@ pkgdatadir = $(datadir)/@PACKAGE@ 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 = gnome-gmail-notifier$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__objects_1 = ggn-marshal.$(OBJEXT) am_gnome_gmail_notifier_OBJECTS = main.$(OBJEXT) $(am__objects_1) \ ggn-about-dialog.$(OBJEXT) ggn-audio.$(OBJEXT) \ ggn-keyring.$(OBJEXT) ggn-prefs.$(OBJEXT) ggn-icon.$(OBJEXT) \ ggn-xml.$(OBJEXT) ggn-entry.$(OBJEXT) ggn-account.$(OBJEXT) \ ggn-account-list.$(OBJEXT) ggn-prefs-window.$(OBJEXT) \ ggn-manager.$(OBJEXT) gnome_gmail_notifier_OBJECTS = $(am_gnome_gmail_notifier_OBJECTS) am__DEPENDENCIES_1 = gnome_gmail_notifier_DEPENDENCIES = $(am__DEPENDENCIES_1) gnome_gmail_notifier_LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(gnome_gmail_notifier_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ 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 = $(gnome_gmail_notifier_SOURCES) DIST_SOURCES = $(gnome_gmail_notifier_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ 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@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_REQUIRED = @GCONF_REQUIRED@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GGN_CFLAGS = @GGN_CFLAGS@ GGN_LIBS = @GGN_LIBS@ GGN_LOCALEDIR = @GGN_LOCALEDIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_REQUIRED = @GLIB_REQUIRED@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOME_KEYRING_REQUIRED = @GNOME_KEYRING_REQUIRED@ GREP = @GREP@ GSTREAMER_REQUIRED = @GSTREAMER_REQUIRED@ GST_INSPECT = @GST_INSPECT@ GTK_REQUIRED = @GTK_REQUIRED@ 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@ LDFLAGS = @LDFLAGS@ LIBNOTIFY_REQUIRED = @LIBNOTIFY_REQUIRED@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOUP_REQUIRED = @LIBSOUP_REQUIRED@ LIBXML2_REQUIRED = @LIBXML2_REQUIRED@ LTLIBOBJS = @LTLIBOBJS@ 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_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ 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@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = ggn-marshal.list MARSHAL_GENERATED = ggn-marshal.c \ ggn-marshal.h BUILT_SOURCES = $(MARSHAL_GENERATED) CLEANFILES = $(MARSHAL_GENERATED) gnome_gmail_notifier_SOURCES = main.c \ main.h \ $(MARSHAL_GENERATED) \ ggn-about-dialog.c \ ggn-about-dialog.h \ ggn-about-dialog-priv.h \ ggn-audio.c \ ggn-audio.h \ ggn-audio-priv.h \ ggn-keyring.c \ ggn-keyring.h \ ggn-prefs.c \ ggn-prefs.h \ ggn-prefs-priv.h \ ggn-icon.c \ ggn-icon.h \ ggn-icon-priv.h \ ggn-xml.c \ ggn-xml.h \ ggn-xml-priv.h \ ggn-entry.c \ ggn-entry.h \ ggn-entry-priv.h \ ggn-account.c \ ggn-account.h \ ggn-account-priv.h \ ggn-account-list.c \ ggn-account-list.h \ ggn-account-list-priv.h \ ggn-prefs-window.c \ ggn-prefs-window.h \ ggn-prefs-window-priv.h \ ggn-manager.c \ ggn-manager.h \ ggn-manager-priv.h gnome_gmail_notifier_LDFLAGS = -Wl,--export-dynamic gnome_gmail_notifier_LDADD = $(GGN_LIBS) AM_CPPFLAGS = $(GGN_CFLAGS) -Wall -Wl,--export-dynamic \ -DPIXMAPS_DIR=\""$(pkgdatadir)"\" \ -DXMLUI_DIR=\""$(pkgdatadir)"\" \ -DGETTEXT_PACKAGE=\""$(GETTEXT_PACKAGE)"\" \ -DGGN_LOCALEDIR=\""$(GGN_LOCALEDIR)"\" all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu 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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 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 src/config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 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) gnome-gmail-notifier$(EXEEXT): $(gnome_gmail_notifier_OBJECTS) $(gnome_gmail_notifier_DEPENDENCIES) @rm -f gnome-gmail-notifier$(EXEEXT) $(gnome_gmail_notifier_LINK) $(gnome_gmail_notifier_OBJECTS) $(gnome_gmail_notifier_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-about-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-account-list.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-account.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-audio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-entry.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-icon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-keyring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-manager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-marshal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-prefs-window.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-prefs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ggn-xml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ 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: $(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) @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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 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." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) 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-hdr 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-hdr 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 ggn-marshal.h: ggn-marshal.list ( @GLIB_GENMARSHAL@ --prefix=ggn_marshal $(srcdir)/ggn-marshal.list --header > ggn-marshal.tmp \ && mv ggn-marshal.tmp ggn-marshal.h ) || ( rm -f ggn-marshal.tmp && exit 1 ) ggn-marshal.c: ggn-marshal.h ( (echo '#include "ggn-marshal.h"'; @GLIB_GENMARSHAL@ --prefix=ggn_marshal $(srcdir)/ggn-marshal.list --body) > ggn-marshal.tmp \ && mv ggn-marshal.tmp ggn-marshal.c ) || ( rm -f ggn-marshal.tmp && exit 1 ) fixme: grep -n -e fixme -e FIXME *.[ch] again: clean all # 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: gnome-gmail-notifier-0.10.1/src/ggn-account-priv.h0000644000175000017520000000504011357667274016671 00000000000000/** * @file src/ggn-account-priv.h The GgnAccount object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnAccountPrivate: * @desc: The descriptive name, unique for all accounts. * @user: The account username, all text before the '@'. * @domain: The account domain name, such as gmail.com or other for hosted. * @pass: The account password, plaintext. * @enab: Whether checking this account is enabled. * @def: Whether this is the default account or not. * @prefs: The #GgnPrefs object to sync to the account. * @entries: A #GPtrArray of #GgnEntry objects. * * The #GgnAccount is a GObject that contains information related to the * authentication and inbox status of a single gmail account. All info * related to messages (entries) and logins/urls is pulled from a * #GgnAccount object. **/ struct _GgnAccountPrivate { /* the (unique) descriptive name. */ gchar *desc; /* the authentication variables. */ guint attempts; gchar *user; gchar *domain; gchar *pass; /* the status of the account. */ gboolean enab; gboolean def; /* reference to our preferences object. */ GgnPrefs *prefs; /* our libsoup objects for atom feed retrieval */ SoupSession *session; SoupMessage *msg; SoupMessageBody *msgbody; SoupURI *proxy; /* our xml parser for the atom feed. */ GgnXML *xml; /* the messages (entries) the account inbox holds. */ GPtrArray *entries; GgnEntry *entry; /* the count values for each type of entry. */ guint num_unread; guint num_new; /* the account state. */ guint state; /* the callback handler ids, used by the account list. */ gulong handler_modified; gulong handler_updated; }; /* * definitions of private functions used by the GgnAccountList. */ void ggn_account_unset_prefs (GgnAccount *account); void ggn_account_set_prefs (GgnAccount *account); gnome-gmail-notifier-0.10.1/src/ggn-prefs.h0000644000175000017520000001140211357667274015375 00000000000000/** * @file src/ggn-prefs.h The GgnPrefs object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_PREFS_H__ #define __GNOME_GMAIL_NOTIFIER_PREFS_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * gconf preference keys specific to the notifier. */ #define GGN_PREF_GLOBAL_ROOT "/apps/gnome-gmail-notifier/global" #define GGN_PREF_ACCOUNT_ROOT "/apps/gnome-gmail-notifier/accounts" #define GGN_PREF_NOTIFY_NEW GGN_PREF_GLOBAL_ROOT "/notify_new" #define GGN_PREF_NOTIFY_ERR GGN_PREF_GLOBAL_ROOT "/notify_err" #define GGN_PREF_SOUND_ENAB GGN_PREF_GLOBAL_ROOT "/sound_enab" #define GGN_PREF_SOUND_FILE GGN_PREF_GLOBAL_ROOT "/sound_file" #define GGN_PREF_CHECKRATE GGN_PREF_GLOBAL_ROOT "/checkrate" #define GGN_PREF_FIRSTRUN GGN_PREF_GLOBAL_ROOT "/firstrun" #define GGN_PREF_ACCOUNT_LIST GGN_PREF_GLOBAL_ROOT "/account_list" #define GGN_PREF_ACCOUNT_DESC GGN_PREF_ACCOUNT_ROOT "/%s/name" #define GGN_PREF_ACCOUNT_USER GGN_PREF_ACCOUNT_ROOT "/%s/user" #define GGN_PREF_ACCOUNT_DOMAIN GGN_PREF_ACCOUNT_ROOT "/%s/domain" #define GGN_PREF_ACCOUNT_ENABLED GGN_PREF_ACCOUNT_ROOT "/%s/enab" #define GGN_PREF_ACCOUNT_DEFAULT GGN_PREF_ACCOUNT_ROOT "/%s/def" /* * gconf preference keys nonspecific to the notifier. */ #define GGN_GCONF_BROWSER "/desktop/gnome/url-handlers/http/command" #define GGN_GCONF_EMAILER "/desktop/gnome/url-handlers/mailto/command" #define GGN_GCONF_PROXY_USE "/system/http_proxy/use_http_proxy" #define GGN_GCONF_PROXY_HOST "/system/http_proxy/host" #define GGN_GCONF_PROXY_PORT "/system/http_proxy/port" #define GGN_GCONF_PROXY_SSL_HOST "/system/proxy/secure_host" #define GGN_GCONF_PROXY_SSL_PORT "/system/proxy/secure_port" #define GGN_GCONF_PROXY_USER "/system/http_proxy/authentication_user" #define GGN_GCONF_PROXY_PASS "/system/http_proxy/authentication_password" /* * object function macros. */ #define GGN_TYPE_PREFS (ggn_prefs_get_type ()) #define GGN_PREFS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_PREFS, GgnPrefs)) #define GGN_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_PREFS, GgnPrefsClass)) #define GGN_IS_PREFS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_PREFS)) #define GGN_IS_PREFS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_PREFS)) #define GGN_PREFS_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_PREFS, GgnPrefsClass)) /* * type macros. */ typedef struct _GgnPrefs GgnPrefs; typedef struct _GgnPrefsClass GgnPrefsClass; typedef struct _GgnPrefsPrivate GgnPrefsPrivate; /* * object definition. */ struct _GgnPrefs { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnPrefsPrivate *priv; }; /* * class definition. */ struct _GgnPrefsClass { /* parent gobject class. */ GObjectClass parent; }; /* * gobject-type definition. */ GType ggn_prefs_get_type (void); /* * object creation functions. */ GgnPrefs *ggn_prefs_new (void); void ggn_prefs_free (GgnPrefs *prefs); /* * integer access functions. */ gint ggn_prefs_get_int (GgnPrefs *prefs, const gchar *key); void ggn_prefs_set_int (GgnPrefs *prefs, const gchar *key, gint value); /* * boolean access functions. */ gboolean ggn_prefs_get_bool (GgnPrefs *prefs, const gchar *key); void ggn_prefs_set_bool (GgnPrefs *prefs, const gchar *key, gboolean value); /* * linked list access functions. */ GSList *ggn_prefs_get_list (GgnPrefs *prefs, const gchar *key); void ggn_prefs_set_list (GgnPrefs *prefs, const gchar *key, GSList *list); /* * string access functions. */ gchar *ggn_prefs_get_string (GgnPrefs *prefs, const gchar *key); void ggn_prefs_set_string (GgnPrefs *prefs, const gchar *key, const gchar *value); /* * tree access functions. */ void ggn_prefs_unset (GgnPrefs *prefs, const gchar *key); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_PREFS_H__ */ gnome-gmail-notifier-0.10.1/src/main.c0000644000175000017520000000641411357667274014433 00000000000000/** * @file src/main.c Gnome Gmail Notifier main source * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:Main * @short_description: The main source file * @include: src/main.h **/ /* * include our application header. */ #include "main.h" /** * main: * @argc: Number of command-line arguments. * @argv: String array of command-line arguments. * * This function acts as the application's entry point, * starting the basic GTK/GThread/GObject framework * before punting to a newly created GgnManager. * * Returns: application exit status. **/ int main (int argc, char **argv) { #ifdef ENABLE_NLS /* setup gettext before anything else. */ bindtextdomain (GETTEXT_PACKAGE, GGN_LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); #endif /* ENABLE_NLS */ /* start glib threads. */ if (!g_thread_supported ()) { /* start it up! */ g_thread_init (NULL); } /* start gdk threads. */ gdk_threads_init (); /* lock and start gtk. */ gtk_init (&argc, &argv); /* start gstreamer. */ gst_init (&argc, &argv); /* create a manager object. */ GgnManager *manager = ggn_manager_new (); /* punt control to the manager. */ ggn_manager_main (manager, argc, argv); /* exit the application. */ return 0; } /** * ggn_link_execute: * @link: the complete URI of the hyperlink to be executed. * * Executes an internet/mail client application after * determining the URI prefix, which ultimately * determines which client to open. * * Returns: void. **/ void ggn_link_execute (const gchar *link) { /* declare helping variables. */ gchar *prog, *execute, *elink; GConfClient *conf; /* get the default gconf client. */ conf = gconf_client_get_default (); /* see what our URI prefix is. */ if ((g_str_has_prefix (link, "http") == TRUE) || (g_str_has_prefix (link, "file") == TRUE)) { /* load the web browser. */ prog = (gchar *) gconf_client_get_string (conf, GGN_GCONF_BROWSER, NULL); /* use the link as-is. */ elink = g_strdup (link); } else { /* load the email client. */ prog = (gchar *) gconf_client_get_string (conf, GGN_GCONF_EMAILER, NULL); /* prefix the link with mailto: */ elink = g_strdup_printf ("mailto:%s", link); } /* build the final string. */ execute = g_strdup_printf (prog, elink); /* run the command. */ g_spawn_command_line_async (execute, NULL); /* unref the gconf client. */ g_object_unref (G_OBJECT (conf)); /* free the built strings. */ g_free (execute); g_free (elink); g_free (prog); } gnome-gmail-notifier-0.10.1/src/ggn-account.h0000644000175000017520000001250611357667274015720 00000000000000/** * @file src/ggn-account.h The GgnAccount object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_ACCOUNT_H__ #define __GNOME_GMAIL_NOTIFIER_ACCOUNT_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * the xpath values that we are to recognize from the parser. */ #define GGN_ACCOUNT_XPATH_ENTRY "/feed/entry" #define GGN_ACCOUNT_XPATH_ENTRY_SUMMARY "/feed/entry/summary/text" #define GGN_ACCOUNT_XPATH_ENTRY_TITLE "/feed/entry/title/text" #define GGN_ACCOUNT_XPATH_ENTRY_SENDER_EMAIL "/feed/entry/author/email/text" #define GGN_ACCOUNT_XPATH_ENTRY_SENDER_NAME "/feed/entry/author/name/text" #define GGN_ACCOUNT_XPATH_ENTRY_LINK "/feed/entry/link" #define GGN_ACCOUNT_XPATH_ENTRY_ID "/feed/entry/id/text" /* * the account launch modes. */ #define GGN_ACCOUNT_LAUNCH_INBOX 0 #define GGN_ACCOUNT_LAUNCH_COMPOSE 1 /* * the atom feed http request values. */ #define GGN_ACCOUNT_FEED_METHOD "GET" #define GGN_ACCOUNT_FEED_URI "https://mail.google.com/mail/feed/atom" /* * the maximum number of attempts before failing to authenticate. */ #define GGN_ACCOUNT_MAX_AUTH_ATTEMPTS 3 /* * the live account state. */ #define GGN_ACCOUNT_STATE_NONE 0 #define GGN_ACCOUNT_STATE_CHECKING 1 #define GGN_ACCOUNT_STATE_CHECKED 2 #define GGN_ACCOUNT_STATE_FAILED 3 /* * object function macros. */ #define GGN_TYPE_ACCOUNT (ggn_account_get_type ()) #define GGN_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_ACCOUNT, GgnAccount)) #define GGN_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_ACCOUNT, GgnAccountClass)) #define GGN_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_ACCOUNT)) #define GGN_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_ACCOUNT)) #define GGN_ACCOUNT_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_ACCOUNT, GgnAccountClass)) /* * type macros. */ typedef struct _GgnAccount GgnAccount; typedef struct _GgnAccountClass GgnAccountClass; typedef struct _GgnAccountPrivate GgnAccountPrivate; /* * object definition. */ struct _GgnAccount { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnAccountPrivate *priv; }; /* * class definition. */ struct _GgnAccountClass { /* parent gobject class. */ GObjectClass parent; /* status icon and menu callbacks. */ void (*modified) (GgnAccount *account); void (*updated) (GgnAccount *account); }; /* * gobject-type definition. */ GType ggn_account_get_type (void); /* * object creation functions. */ GgnAccount *ggn_account_new (void); GgnAccount *ggn_account_new_from_prefs (GgnPrefs *prefs, const gchar *email); void ggn_account_free (GgnAccount *account); /* * account string get/set functions. */ gchar *ggn_account_get_desc (GgnAccount *account); void ggn_account_set_desc (GgnAccount *account, const gchar *desc); gchar *ggn_account_get_user (GgnAccount *account); void ggn_account_set_user (GgnAccount *account, const gchar *user); gchar *ggn_account_get_domain (GgnAccount *account); void ggn_account_set_domain (GgnAccount *account, const gchar *domain); gchar *ggn_account_get_pass (GgnAccount *account); void ggn_account_set_pass (GgnAccount *account, const gchar *pass); /* * account email string get/set functions. */ gchar *ggn_account_get_email (GgnAccount *account); void ggn_account_set_email (GgnAccount *account, const gchar *user, const gchar *domain); /* * account boolean get/set functions. */ gboolean ggn_account_get_enabled (GgnAccount *account); void ggn_account_set_enabled (GgnAccount *account, gboolean enab); gboolean ggn_account_get_default (GgnAccount *account); void ggn_account_set_default (GgnAccount *account, gboolean def); /* * account mail-checking and launch actions. */ void ggn_account_check (GgnAccount *account); void ggn_account_launch_inbox (GgnAccount *account); void ggn_account_launch_compose (GgnAccount *account, const gchar *recipient); /* * account reference-giving function. */ void ggn_account_give_prefs (GgnAccount *account, GgnPrefs *prefs); /* * account state function. */ guint ggn_account_get_state (GgnAccount *account); /* * account entry retrieval functions. */ void ggn_account_get_num_entries (GgnAccount *account, guint *n_unread, guint *n_new); GgnEntry *ggn_account_get_entry (GgnAccount *account, guint idx); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_ACCOUNT_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-xml-priv.h0000644000175000017520000000330511357667274016037 00000000000000/** * @file src/ggn-xml-priv.h The GgnXML object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnXMLPrivate: * @reader: The Libxml2 XML Parsing Struct. * @type: The node type of the current XML node. * @name: The name of the current XML node. * @text: The text contained in the current XML node. * @xpath: A non-conforming XPath string for parsing. * @nattr: The number of attributes in the current node. * @attribs: The attributes of the current XML node. * * The #GgnAboutDialog is a simple object used to display information * relating to development and licensing of the notifier. See the * #GtkAboutDialog widget for more information on the premise of the * about dialog in Gnome. **/ struct _GgnXMLPrivate { /* the libxml2 parser. */ xmlTextReader *reader; /* current node information. */ gint type; gchar *name; gchar *text; /* a non-conforming XPath string */ gchar *xpath; /* attribute information. */ gint nattr; GHashTable *attribs; }; gnome-gmail-notifier-0.10.1/src/ggn-manager.c0000644000175000017520000010207411357667274015671 00000000000000/** * @file src/ggn-manager.c The GgnManager object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnManager * @short_description: The coordinator object * @include: src/ggn-manager.h **/ /* * include our application header. */ #include #include "ggn-manager-priv.h" #include "ggn-icon-priv.h" /* * forward function definitions. */ static void ggn_manager_init (GgnManager *self); static void ggn_manager_class_init (GgnManagerClass *klass); static void ggn_manager_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnManager, ggn_manager, G_TYPE_OBJECT); /* * define the constant-valued strings to use for notification. */ #define GGN_MANAGER_TOOLTIP_CHECKING _("Checking mail...") #define GGN_MANAGER_TOOLTIP_NOACCTS _("No accounts configured") #define GGN_MANAGER_TOOLTIP_FAILURE _("Unable to check mail") #define GGN_MANAGER_TOOLTIP_EMPTY _("No new messages") #define GGN_MANAGER_TITLE_NOACCTS _("No accounts are configured") #define GGN_MANAGER_TITLE_FAILURE _("Unable to check mail") #define GGN_MANAGER_TITLE_NEWMAIL _("You have new mail") #define GGN_MANAGER_TITLE_EMPTY _("No new messages") #define GGN_MANAGER_SUMMARY_NOACCTS _("Please add one or more accounts \ using the Preferences window.") /** * ggn_manager_check_accounts: * @manager: Our #GgnManager object. * * This is a callable function that initiates account checking. * * Returns: void. **/ void ggn_manager_check_accounts (GgnManager *manager) { /* declare a helping variable. */ static gboolean warned_noaccounts; /* are we already checking? */ if (ggn_account_list_is_checking (manager->priv->alist)) return; /* do we have any accounts to check? */ if (ggn_account_list_get_num_enabled (manager->priv->alist) > 0) { /* set the notification style. */ ggn_icon_set_style (manager->priv->icon, GGN_ICON_STYLE_CHECKING); /* set the notification tooltip. */ ggn_icon_set_tooltip (manager->priv->icon, GGN_MANAGER_TOOLTIP_CHECKING); /* begin checking for new mail. */ ggn_account_list_check (manager->priv->alist); } else { /* have we warned about this already? */ if (!warned_noaccounts) { /* set the notification style. */ ggn_icon_set_style (manager->priv->icon, GGN_ICON_STYLE_WARNING); /* set the notification tooltip, title and summary. */ ggn_icon_set_tooltip (manager->priv->icon, GGN_MANAGER_TOOLTIP_NOACCTS); ggn_icon_set_title (manager->priv->icon, GGN_MANAGER_TITLE_NOACCTS); ggn_icon_set_summary (manager->priv->icon, GGN_MANAGER_SUMMARY_NOACCTS); /* show the notification. */ ggn_icon_show_notification (manager->priv->icon); /* we have warned now. */ warned_noaccounts = TRUE; } } } /** * ggn_manager_timeout: * @data: The application manager pointer. * * This function is a callback that is executed every so often by the * glib subsystem in order to check the available inboxes for new mail. * * Returns: FALSE. **/ gboolean ggn_manager_timeout (gpointer data) { /* declare a helping variable. */ gint rate; /* gain a reference to the manager. */ GgnManager *manager = GGN_MANAGER (data); /* check the accounts. */ ggn_manager_check_accounts (manager); /* register another timeout with the (possibly new) check rate. */ rate = ggn_prefs_get_int (manager->priv->prefs, GGN_PREF_CHECKRATE); g_timeout_add (rate * 60 * 1e3, ggn_manager_timeout, manager); /* exit the function. */ return FALSE; } /** * ggn_manager_accounts_checked: * @alist: The account list that was checked. * @data: The application manager pointer. * * This function is called when a managed #GgnAccount emits its "checked" * signal through its managing #GgnAccountList object. * * Returns: void. **/ static void ggn_manager_accounts_checked (GgnAccountList *alist, gpointer data) { /* enter the gdk main thread. */ gdk_threads_enter (); /* declare some helping variables. */ guint num_unread, tot_unread; guint num_new, tot_new; guint num_nonempty; guint idx, jdx, num; GString *gtip, *gttl, *gsum; GgnAccount *account; GgnEntry *entry; /* gain a reference to the manager object. */ GgnManager *manager = GGN_MANAGER (data); /* retrieve the count values. */ num_nonempty = ggn_account_list_get_num_nonempty (alist); /* retrieve the total number of entries. */ ggn_account_list_get_num_entries (alist, &tot_unread, &tot_new); /* act on the count values. */ if (tot_new == 0 && tot_unread == 0) { /* no mail. reset all graphical details. */ ggn_icon_set_style (manager->priv->icon, GGN_ICON_STYLE_NORMAL); ggn_icon_set_tooltip (manager->priv->icon, GGN_MANAGER_TOOLTIP_EMPTY); } else { /* new messages. set the icon style as such. */ ggn_icon_set_style (manager->priv->icon, GGN_ICON_STYLE_MESSAGE); /* allocate the tooltip gstring. */ gtip = g_string_new (""); /* loop through the accounts to build a tooltip. */ num = 0; for (idx = 0; idx < ggn_account_list_length (alist); idx++) { /* get the indexed account. */ account = ggn_account_list_get (alist, idx); /* get the entry counts. */ ggn_account_get_num_entries (account, &num_unread, &num_new); /* are there unread messages? */ if (num_unread + num_new > 0 && ggn_account_get_enabled (account)) { /* increment the count variable. */ num++; /* add information to the tooltip. */ g_string_append_printf (gtip, _("%d unread for %s"), num_unread + num_new, ggn_account_get_desc (account)); /* add a newline if we need one. */ if (num < num_nonempty) g_string_append_printf (gtip, "\n"); } } /* apply the new message tooltip text to the icon. */ ggn_icon_set_tooltip (manager->priv->icon, gtip->str); /* is there new mail, or not? */ if (tot_new > 0) { /* does the user want graphical notification? */ if (ggn_prefs_get_bool (manager->priv->prefs, GGN_PREF_NOTIFY_NEW)) { /* allocate the title and summary gstrings. */ gttl = g_string_new (""); gsum = g_string_new (""); /* determine the correct string values. */ if (tot_new == 1) { /* loop until we find the account containing the entry. */ for (idx = 0; idx < ggn_account_list_length (alist); idx++) { /* gain a reference to the indexed account. */ account = ggn_account_list_get (alist, idx); /* get the entry counts from the account. */ ggn_account_get_num_entries (account, &num_unread, &num_new); /* does this account have any entries? */ if (num_new > 0) { /* loop through the entries. */ for (jdx = 0; jdx < num_unread + num_new; jdx++) { /* gain a reference to the entry. */ entry = ggn_account_get_entry (account, jdx); /* is this a new entry? */ if (ggn_entry_get_state (entry) == GGN_ENTRY_STATE_NEW) { /* use the advanced title gstring. */ g_string_printf (gttl, _("New mail from %s"), ggn_entry_get_sender_name (entry)); /* use the single-message summary gstring. */ g_string_printf (gsum, "%s", ggn_entry_get_title (entry)); /* break from the loop. */ break; } } } } } else { /* use the basic title gstring. */ g_string_printf (gttl, GGN_MANAGER_TITLE_NEWMAIL); /* add the first part of the summary gstring. */ g_string_printf (gsum, _("There are %d new messages for"), tot_new); /* loop through the accounts list. */ num = 0; for (idx = 0; idx < ggn_account_list_length (alist); idx++) { /* gain a reference to the indexed account. */ account = ggn_account_list_get (alist, idx); /* get the entry counts for the account. */ ggn_account_get_num_entries (account, &num_unread, &num_new); /* does this account have any entries? */ if (num_unread + num_new > 0) { /* increment the counter. */ num++; /* where is this account in the list? */ if (num == 1) { /* first. */ g_string_append_printf (gsum, " %s", ggn_account_get_desc (account)); } else if (num == num_nonempty) { /* last. */ g_string_append_printf (gsum, " %s %s", _("and"), ggn_account_get_desc (account)); } else { /* anywhere else. */ g_string_append_printf (gsum, ", %s", ggn_account_get_desc (account)); } } } /* do we have between two and four messages? */ if (tot_new < 5) { /* loop through the accounts list. */ num = 0; for (idx = 0; idx < ggn_account_list_length (alist); idx++) { /* gain a reference to the indexed account. */ account = ggn_account_list_get (alist, idx); /* get the entry counts for this account. */ ggn_account_get_num_entries (account, &num_unread, &num_new); /* loop through this account's entries. */ for (jdx = 0; jdx < num_unread + num_new; jdx++) { /* gain a reference to the current entry. */ entry = ggn_account_get_entry (account, jdx); /* is this entry one of the new entries? */ if (ggn_entry_get_state (entry) == GGN_ENTRY_STATE_NEW) { /* increment the counter. */ num++; /* where is this entry in the list? */ if (num == 1) { /* first. */ g_string_append_printf (gsum, " %s %s", _("from"), ggn_entry_get_sender_name (entry)); } else if (num == tot_new) { /* last. */ g_string_append_printf (gsum, " %s %s", _("and"), ggn_entry_get_sender_name (entry)); } else { /* anywhere else. */ g_string_append_printf (gsum, ", %s", ggn_entry_get_sender_name (entry)); } } } } } } /* apply the new message title text to the icon. */ ggn_icon_set_title (manager->priv->icon, gttl->str); /* apply the new message summary text to the icon. */ ggn_icon_set_summary (manager->priv->icon, gsum->str); /* show the new message notification. */ ggn_icon_show_notification (manager->priv->icon); /* free the allocated gstrings. */ g_string_free (gttl, TRUE); g_string_free (gsum, TRUE); } /* does the user want audible notification? */ if (ggn_prefs_get_bool (manager->priv->prefs, GGN_PREF_SOUND_ENAB)) { ggn_audio_play_file (manager->priv->audio, ggn_prefs_get_string (manager->priv->prefs, GGN_PREF_SOUND_FILE)); } } /* free the tooltip gstring. */ g_string_free (gtip, TRUE); } /* leave the gdk main thread. */ gdk_threads_leave (); } /** * ggn_manager_accounts_failed: * @alist: The account list that failed. * @data: The application manager pointer. * * This function is called when a managed #GgnAccount emits its "failed" * signal through its managing #GgnAccountList object. * * Returns: void. **/ static void ggn_manager_accounts_failed (GgnAccountList *alist, gpointer data) { /* enter the gdk main thread. */ gdk_threads_enter (); /* declare a few helping variables. */ guint idx, errors, tot_errors; static gboolean notified; GgnAccount *account; GString *gsum; /* gain a reference to the manager object. */ GgnManager *manager = GGN_MANAGER (data); /* initialize the counting variables. */ errors = 0; /* set the icon style accordingly. */ ggn_icon_set_style (manager->priv->icon, GGN_ICON_STYLE_ERROR); /* does the user want graphical notification? */ if (ggn_prefs_get_bool (manager->priv->prefs, GGN_PREF_NOTIFY_ERR) && notified == FALSE) { /* get the number of errors. */ tot_errors = ggn_account_list_get_num_failed (alist); /* set the icon tooltip. */ ggn_icon_set_tooltip (manager->priv->icon, GGN_MANAGER_TOOLTIP_FAILURE); /* set the notification title. */ ggn_icon_set_title (manager->priv->icon, GGN_MANAGER_TITLE_FAILURE); /* allocate a new summary gstring. */ gsum = g_string_new (_("Errors occurred while checking mail for")); /* loop through the failed accounts. */ for (idx = 0; idx < ggn_account_list_length (alist); idx++) { /* gain a reference to the indexed account. */ account = ggn_account_list_get (alist, idx); /* does this account have errors? */ if (ggn_account_get_state (account) == GGN_ACCOUNT_STATE_FAILED) { /* increment the error counter. */ errors++; /* see where in the list of failed accounts we are. */ if (errors == 1) { /* first. */ g_string_append_printf (gsum, " %s", ggn_account_get_desc (account)); } else if (errors == tot_errors) { /* last. */ g_string_append_printf (gsum, " %s %s", _("and"), ggn_account_get_desc (account)); } else { /* anywhere else. */ g_string_append_printf (gsum, ", %s", ggn_account_get_desc (account)); } } } /* set the notification summary from the gstring contents. */ ggn_icon_set_summary (manager->priv->icon, gsum->str); /* show the error notification. */ ggn_icon_show_notification (manager->priv->icon); /* we have notified the user once. no more. */ notified = TRUE; /* free the summary gstring. */ g_string_free (gsum, TRUE); } /* leave the gdk main thread. */ gdk_threads_leave (); } /* explicitly predefine the extended menu builder function. */ static void ggn_manager_build_extended_menu (GgnManager *manager); /** * ggn_manager_icon_clicked: * @icon: The status icon that was used. * @data: The application manager pointer. * * This function is called when the manager's #GgnIcon has been clicked. * * Returns: void. **/ static void ggn_manager_icon_clicked (GgnIcon *icon, gpointer data) { /* declare some helping variables. */ GgnAccount *account; guint idx, num_enabled; /* gain a reference to the manager object. */ GgnManager *manager = GGN_MANAGER (data); /* get the number of enabled accounts. */ num_enabled = ggn_account_list_get_num_enabled (manager->priv->alist); /* how many accounts do we have? */ if (num_enabled == 0) { /* just fail. */ return; } else if (num_enabled == 1) { /* find the one enabled account. */ for (idx = 0; idx < ggn_account_list_length (manager->priv->alist); idx++) { /* gain a reference to the account. */ account = ggn_account_list_get (manager->priv->alist, idx); /* is this account enabled? */ if (ggn_account_get_enabled (account)) { /* launch the inbox for that account. */ ggn_account_launch_inbox (account); /* end the loop. */ break; } } } else { /* has the extended menu been allocated? */ if (icon->priv->exmenu) gtk_widget_destroy (GTK_WIDGET (icon->priv->exmenu)); /* re-allocate the extended menu. */ icon->priv->exmenu = (GtkMenu *) gtk_menu_new (); /* build the extended menu using managed information. */ ggn_manager_build_extended_menu (manager); /* show the extended menu. */ gtk_menu_popup (icon->priv->exmenu, NULL, NULL, gtk_status_icon_position_menu, icon->priv->icon, 0, gtk_get_current_event_time ()); } } /** * ggn_manager_menu_account_selected: * @icon: The #GtkMenuItem that was used. * @data: The application manager pointer. * * This function is called when the user clicks on an account in * the extended left-click menu in order to open its inbox. * * Returns: void. **/ static void ggn_manager_menu_account_selected (GtkMenuItem *item, gpointer data) { /* gain a reference to the account. */ GgnAccount *account = GGN_ACCOUNT (data); /* launch the inbox of that account. */ ggn_account_launch_inbox (account); } /** * ggn_manager_menu_compose_selected: * @icon: The #GtkMenuItem that was used. * @data: The application manager pointer. * * This function is called when the user clicks on the compose * option in the extended left-click menu. * * Returns: void. **/ static void ggn_manager_menu_compose_selected (GtkMenuItem *item, gpointer data) { /* declare a helping variable. */ GgnAccount *account; /* gain a reference to the manager. */ GgnManager *manager = GGN_MANAGER (data); /* get the default account. */ account = ggn_account_list_get_default (manager->priv->alist); /* launch the composition browser window. */ if (account) ggn_account_launch_compose (account, ""); } /** * ggn_manager_icon_check_selected: * @icon: The status icon that was used. * @data: The application manager pointer. * * This function is called when the manager's #GgnIcon has been used. * * Returns: void. **/ static void ggn_manager_icon_check_selected (GgnIcon *icon, gpointer data) { /* gain a reference to the manager. */ GgnManager *manager = GGN_MANAGER (data); /* try to check for mail. */ ggn_manager_check_accounts (manager); } /** * ggn_manager_icon_prefs_selected: * @icon: The status icon that was used. * @data: The application manager pointer. * * This function is called when the manager's #GgnIcon has been used. * * Returns: void. **/ static void ggn_manager_icon_prefs_selected (GgnIcon *icon, gpointer data) { /* gain a reference to our manager. */ GgnManager *manager = GGN_MANAGER (data); /* show the preferences window. */ ggn_prefs_window_show (manager->priv->prefs_win); } /** * ggn_manager_icon_about_selected: * @icon: The status icon that was used. * @data: The application manager pointer. * * This function is called when the manager's #GgnIcon has been used. * * Returns: void. **/ static void ggn_manager_icon_about_selected (GgnIcon *icon, gpointer data) { /* gain a reference to our manager. */ GgnManager *manager = GGN_MANAGER (data); /* show the about dialog. */ ggn_about_dialog_show (manager->priv->about_dlg); } /** * ggn_manager_icon_quit_selected: * @icon: The status icon that was used. * @data: The application manager pointer. * * This function is called when the manager's #GgnIcon has been used. * * Returns: void. **/ static void ggn_manager_icon_quit_selected (GgnIcon *icon, gpointer data) { /* gain a reference to our manager. */ GgnManager *manager = GGN_MANAGER (data); /* quit the application, gracefully. */ ggn_manager_quit (manager); } /** * ggn_manager_build_account_menu_item: * @account: The #GgnAccount to access for information. * * This function builds a #GtkMenuItem for a single account in the * extended left-click menu for the notifier. * * Returns: A newly allocated #GtkMenuItem. **/ static GtkWidget *ggn_manager_build_account_menu_item (GgnManager *manager, GgnAccount *account) { /* declare some helping variables. */ GtkWidget *item, *hbox, *image, *lname, *linfo; guint num_unread, num_new, state; gchar *desc, *markup; /* get the entry counts and details for the account. */ ggn_account_get_num_entries (account, &num_unread, &num_new); state = ggn_account_get_state (account); desc = ggn_account_get_desc (account); /* create a menu item */ item = gtk_menu_item_new (); /* create a horizontal box. */ hbox = gtk_hbox_new (FALSE, 0); /* create the info and name labels. */ linfo = gtk_label_new (NULL); lname = gtk_label_new (NULL); /* FIXME: figure out how to resize menu (*-sm,write) icons to 22x22 size. */ /* FIXME: rework all SVGs from basis: write, error-sm, new-sm, normal-sm. */ /* determine account information. */ if (state == GGN_ACCOUNT_STATE_FAILED) { /* show the failure emblem. */ image = gtk_image_new_from_file (GGN_PIXMAP_ERROR_SM); /* set the markup for the info label. */ markup = g_strdup_printf ("- %s", "italic", "#888888", GGN_MANAGER_TITLE_FAILURE); } else if (num_unread + num_new > 0) { /* show the new message emblem. */ image = gtk_image_new_from_file (GGN_PIXMAP_MESSAGE_SM); /* set the markup for the info label. */ markup = g_strdup_printf ("- %d %s", "italic", "#888888", num_unread + num_new, _("unread")); } else { /* as a catch-all, show the no messages emblem. */ image = gtk_image_new_from_file (GGN_PIXMAP_NORMAL_SM); /* set the markup for the info label. */ markup = g_strdup_printf ("- %s", "italic", "#888888", GGN_MANAGER_TITLE_EMPTY); } /* apply the info label markup and align it to the left. */ gtk_label_set_markup (GTK_LABEL (linfo), markup); g_object_set (G_OBJECT (linfo), "xalign", 0.0, NULL); g_free (markup); /* build and apply the name label markup. */ markup = g_strdup_printf ("%s", desc); gtk_label_set_markup (GTK_LABEL (lname), markup); g_free (markup); /* pack the widgets into the horizontal box. */ gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), lname, FALSE, FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), linfo, TRUE, TRUE, 0); /* pack the box into the menu item. */ gtk_container_add (GTK_CONTAINER (item), hbox); /* register the account menu item with its callback. */ g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (ggn_manager_menu_account_selected), account); /* return the final menu item. */ return item; } /** * ggn_manager_build_compose_menu_item: * @account: The #GgnAccount to access for information. * * This function builds a #GtkMenuItem for a single account in the * extended left-click menu for the notifier. * * Returns: A newly allocated #GtkMenuItem. **/ static GtkWidget *ggn_manager_build_compose_menu_item (GgnManager *manager) { /* declare some helping variables. */ GtkWidget *item, *hbox, *image, *label; /* create the menu item. */ item = gtk_menu_item_new (); /* create the horizontal box. */ hbox = gtk_hbox_new (FALSE, 0); /* create the image. */ image = gtk_image_new_from_file (GGN_PIXMAP_COMPOSE); /* create the label. */ label = gtk_label_new (_("Compose New Message")); g_object_set (G_OBJECT (label), "xalign", 0.0, NULL); /* pack the widgets into the horizontal box. */ gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 4); gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 4); /* pack the box into the menu item. */ gtk_container_add (GTK_CONTAINER (item), hbox); /* register the compose menu item with its callback. */ g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (ggn_manager_menu_compose_selected), manager); /* return the newly created menu item. */ return item; } /** * ggn_manager_build_extended_menu: * @manager: The #GgnManager to use. * * This function builds the extended menu for the icon to display * when the user left-clicks the status icon under conditions of * multiple enabled accounts. * * Returns: void. **/ static void ggn_manager_build_extended_menu (GgnManager *manager) { /* declare some helping variables. */ GgnAccount *account; GtkWidget *item; guint idx; /* loop for each account in the list. */ for (idx = 0; idx < ggn_account_list_length (manager->priv->alist); idx++) { /* gain a reference to the indexed account. */ account = ggn_account_list_get (manager->priv->alist, idx); /* skip disabled accounts. */ if (!ggn_account_get_enabled (account)) continue; /* build and append the menu item onto the extended menu. */ item = ggn_manager_build_account_menu_item (manager, account); gtk_menu_shell_append (GTK_MENU_SHELL (manager->priv->icon->priv->exmenu), item); } /* add a separator menu item. */ item = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL (manager->priv->icon->priv->exmenu), item); /* add a compose menu item. */ item = ggn_manager_build_compose_menu_item (manager); gtk_menu_shell_append (GTK_MENU_SHELL (manager->priv->icon->priv->exmenu), item); /* show the menu and all its menu items. */ gtk_widget_show_all (GTK_WIDGET (manager->priv->icon->priv->exmenu)); } /* * ggn_manager_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_manager_init (GgnManager *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnManagerPrivate, 1); /* create the globally used prefs object. */ self->priv->prefs = ggn_prefs_new (); /* build the managed accounts list from the prefs object. */ self->priv->alist = ggn_account_list_new_from_prefs (self->priv->prefs); /* connect to the account list's "checked" signal. */ g_signal_connect (G_OBJECT (self->priv->alist), "checked", G_CALLBACK (ggn_manager_accounts_checked), self); /* connect to the account list's "failed" signal. */ g_signal_connect (G_OBJECT (self->priv->alist), "failed", G_CALLBACK (ggn_manager_accounts_failed), self); /* create the status icon. */ self->priv->icon = ggn_icon_new (); /* connect to the status icon's "clicked" signal. */ g_signal_connect (G_OBJECT (self->priv->icon), "clicked", G_CALLBACK (ggn_manager_icon_clicked), self); /* connect to the status icon's "check_selected" signal. */ g_signal_connect (G_OBJECT (self->priv->icon), "check_selected", G_CALLBACK (ggn_manager_icon_check_selected), self); /* connect to the status icon's "prefs_selected" signal. */ g_signal_connect (G_OBJECT (self->priv->icon), "prefs_selected", G_CALLBACK (ggn_manager_icon_prefs_selected), self); /* connect to the status icon's "about_selected" signal. */ g_signal_connect (G_OBJECT (self->priv->icon), "about_selected", G_CALLBACK (ggn_manager_icon_about_selected), self); /* connect to the status icon's "quit_selected" signal. */ g_signal_connect (G_OBJECT (self->priv->icon), "quit_selected", G_CALLBACK (ggn_manager_icon_quit_selected), self); /* create the audio object. */ self->priv->audio = ggn_audio_new (); /* create the about dialog. */ self->priv->about_dlg = ggn_about_dialog_new (); /* create the preferences window. */ self->priv->prefs_win = ggn_prefs_window_new_from_manager (self); } /* * ggn_manager_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_manager_class_init (GgnManagerClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_manager_finalize; } /* * ggn_manager_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_manager_finalize (GObject *obj) { /* make a reference to ourself. */ GgnManager *self = GGN_MANAGER (obj); /* free the preferences window. */ ggn_prefs_window_free (self->priv->prefs_win); /* free the about dialog. */ ggn_about_dialog_free (self->priv->about_dlg); /* free the status icon. */ ggn_icon_free (self->priv->icon); /* free the account list object. */ ggn_account_list_free (self->priv->alist); /* free the prefs object. */ ggn_prefs_free (self->priv->prefs); /* free the audio playback object. */ ggn_audio_free (self->priv->audio); /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_manager_parent_class)->finalize (obj); } /** * ggn_manager_new: * * Creates a new #GgnManager with default values, which are * used to play coordinate the upper-level functions of the * notifier. Essentially the main function hands off control * to the GgnManager, which starts up all the required things. * * Returns: the new #GgnManager object. Free with ggn_manager_free(). **/ GgnManager *ggn_manager_new (void) { /* make a newly created gobject. */ GgnManager *manager = g_object_new (GGN_TYPE_MANAGER, NULL); /* return the new object. */ return manager; } /** * ggn_manager_free: * @manager: The #GgnManager to free. * * Frees the given #GgnManager object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_manager_free (GgnManager *manager) { /* while this object exists... */ while (G_IS_OBJECT (manager)) { /* unreference this object. */ g_object_unref (G_OBJECT (manager)); } } /** * ggn_manager_main: * @manager: The #GgnManager to start. * @argc: The number of passed commandline arguments. * @argv: The array of passed commandline arguments. * * This function sets the objects controlled by the #GgnManager into * motion, making it essentially like calling gtk_main() for a GTK+ * application. * * Returns: void. **/ void ggn_manager_main (GgnManager *manager, int argc, char **argv) { /* declare some helping variables. */ GgnAccount *account; gchar **email; gint rate; /* has the user passed the notifier an email address? */ if (argc == 2) { /* get the email string. */ email = g_strsplit (argv[1], ":", 2); /* ensure correct formatting. */ if (g_utf8_collate (email[0], "mailto") != 0 || !email[1]) return; /* ok, we have a correct email. get the default account. */ account = ggn_account_list_get_default (manager->priv->alist); /* launch the composition browser window. */ if (account) ggn_account_launch_compose (account, email[1]); /* free the string array. */ g_strfreev (email); /* quit. */ return; } /* set the default style of the notification icon. */ ggn_icon_set_style (manager->priv->icon, GGN_ICON_STYLE_NORMAL); ggn_icon_show (manager->priv->icon); /* try to check for new mail. */ ggn_manager_check_accounts (manager); /* set the inbox checking loop into motion. */ rate = ggn_prefs_get_int (manager->priv->prefs, GGN_PREF_CHECKRATE); g_timeout_add (rate * 60 * 1e3, ggn_manager_timeout, manager); /* start the main loop. */ gtk_main (); } /** * ggn_manager_quit: * @manager: The #GgnManager to stop. * * This function stops a running, allocated #GgnManager object. Given * the fact that the #GgnManager is the crux of the application, this * function also ends program execution after cleaning up and such. * * Returns: void. **/ void ggn_manager_quit (GgnManager *manager) { /* hide the prefs window and about dialog. */ ggn_prefs_window_hide (manager->priv->prefs_win); ggn_about_dialog_hide (manager->priv->about_dlg); /* hide the status icon. */ ggn_icon_hide (manager->priv->icon); /* free the manager. */ ggn_manager_free (manager); /* end the main loop. */ gtk_main_quit (); } gnome-gmail-notifier-0.10.1/src/ggn-account.c0000644000175000017520000011773711357667274015727 00000000000000/** * @file src/ggn-account.c The GgnAccount object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnAccount * @short_description: The gmail account object * @include: src/ggn-account.h **/ /* * include our application header. */ #include #include "ggn-account-priv.h" #include "ggn-entry-priv.h" /* * forward function definitions. */ static void ggn_account_init (GgnAccount *self); static void ggn_account_class_init (GgnAccountClass *klass); static void ggn_account_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnAccount, ggn_account, G_TYPE_OBJECT); /* * define the signals used. */ enum { MODIFIED, UPDATED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; /** * ggn_account_default_modified_cb: * @account: The account which emitted the signal. * * This is the default "modified" callback function manager. * * Returns: void. **/ static void ggn_account_default_modified_cb (GgnAccount *account) { /* do nothing. */ } /** * ggn_account_default_updated_cb: * @account: The account which emitted the signal. * * This is the default "updated" callback function manager. * * Returns: void. **/ static void ggn_account_default_updated_cb (GgnAccount *account) { /* do nothing. */ } /** * ggn_account_soup_auth: * @session: The soup session to authenticate. * @msg: The message in need of authentication. * @auth: The credentials object in use. * @retrying: Whether this is a reauthentication. * @data: Private data. * * This function is called when the #SoupSession in question emits the * "authenticate" signal, requiring a username and password from the * application. * * Returns: void. **/ static void ggn_account_soup_auth (SoupSession *session, SoupMessage *msg, SoupAuth *auth, gboolean retrying, gpointer data) { /* define helping variables. */ gchar *proxy_user; gchar *proxy_pass; gchar *email; /* gain a reference to our account. */ GgnAccount *account = GGN_ACCOUNT (data); /* avoid infinite loops by failing on retry. */ if (retrying == TRUE) return; /* check if its a proxy server asking for authentication. */ if (soup_auth_is_for_proxy (auth) == TRUE) { /* we can only authenticate with a proxy if we have a prefs object!!! */ if (account->priv->prefs) { /* get the proxy username. */ proxy_user = ggn_prefs_get_string (account->priv->prefs, GGN_GCONF_PROXY_USER); /* get the proxy password. */ proxy_pass = ggn_prefs_get_string (account->priv->prefs, GGN_GCONF_PROXY_PASS); /* authenticate the program with the proxy. */ if (proxy_user && proxy_pass) soup_auth_authenticate (auth, proxy_user, proxy_pass); /* free the proxy credentials strings. */ g_free (proxy_user); g_free (proxy_pass); } } else { /* ensure the ATOM feed credentials are non-NULL. */ if (account->priv->user && account->priv->domain && account->priv->pass) { /* determine if this is a hosted account. */ if (g_utf8_collate (account->priv->domain, "gmail.com") == 0) { /* authenticate using the username and password. */ soup_auth_authenticate (auth, account->priv->user, account->priv->pass); } else { /* build the email string. */ email = ggn_account_get_email (account); /* authenticate using the email and password. */ soup_auth_authenticate (auth, email, account->priv->pass); /* free the email string. */ g_free (email); } } } } /** * ggn_account_soup_restart: * @msg: The message in need of authentication. * @data: Private data. * * This function is called when the #SoupSession in question emits the * "restart" signal, which allows us to count the number of retries * that we make at authentication. * * Returns: void. **/ static void ggn_account_soup_restart (SoupMessage *msg, gpointer data) { /* gain a reference to our account object. */ GgnAccount *account = GGN_ACCOUNT (data); /* if we've made three attempts, fail. */ if (account->priv->attempts >= GGN_ACCOUNT_MAX_AUTH_ATTEMPTS) { /* abort the message. */ soup_session_abort (account->priv->session); } /* otherwise, make another attempt. */ account->priv->attempts++; } /** * ggn_account_xml_begin: * @xml: The xml parser which emitted the signal. * @element_path: The "xpath" of the element parsed. * @element_name: The name of the element parsed. * @attributes: The attributes of the element. * * This function is called when the XML parser we are using encounters * a newly opened XML tag in the ATOM feed downloaded from gmail. * * Returns: void. **/ static void ggn_account_xml_begin (GgnXML *xml, gchar *xpath, gchar *name, GHashTable *attribs, gpointer data) { /* gain a reference to the account. */ GgnAccount *account = GGN_ACCOUNT (data); /* operate on the xpath. */ if (g_utf8_collate (xpath, GGN_ACCOUNT_XPATH_ENTRY) == 0) { /* allocate a new message object. */ account->priv->entry = ggn_entry_new (); /* set the initial message state. */ account->priv->entry->priv->state = GGN_ENTRY_STATE_NEW; } else if (g_utf8_collate (xpath, GGN_ACCOUNT_XPATH_ENTRY_LINK) == 0) { /* read the hyperlink target. */ account->priv->entry->priv->link = g_strdup (g_hash_table_lookup (attribs, "href")); } } /** * ggn_account_xml_end: * @xml: The xml parser which emitted the signal. * @element_path: The "xpath" of the element parsed. * @element_name: The name of the element parsed. * * This function is called when the XML parser we are using encounters * a closed XML tag in the ATOM feed downloaded from gmail. * * Returns: void. **/ static void ggn_account_xml_end (GgnXML *xml, gchar *xpath, gchar *name, gpointer data) { /* declare a few helping variables. */ GgnEntry *arrentry; guint idx; /* gain a reference to the account. */ GgnAccount *account = GGN_ACCOUNT (data); /* operate on the xpath. */ if (g_utf8_collate (xpath, GGN_ACCOUNT_XPATH_ENTRY) == 0) { /* loop through the entries array. */ for (idx = 0; idx < account->priv->entries->len; idx++) { /* get a reference to the array entry. */ arrentry = g_ptr_array_index (account->priv->entries, idx); /* see if we have a matching entry in the array already. */ if (g_utf8_collate (arrentry->priv->id, account->priv->entry->priv->id) == 0) { /* we have a match, don't add this entry. */ arrentry->priv->state = GGN_ENTRY_STATE_UNREAD; ggn_entry_free (account->priv->entry); account->priv->num_unread++; return; } } /* no matches, move the current entry into the pointer array. */ g_ptr_array_add (account->priv->entries, account->priv->entry); account->priv->num_new++; } } /** * ggn_account_xml_text: * @xml: The xml parser which emitted the signal. * @element_path: The "xpath" of the current element. * @element_name: The name of the current element. * @value: The text we wave parsed from the XML. * * This function is called when the XML parser we are using encounters * textual data in the ATOM feed downloaded from gmail. * * Returns: void. **/ static void ggn_account_xml_text (GgnXML *xml, gchar *xpath, gchar *name, gchar *value, gpointer data) { /* gain a reference to the account. */ GgnAccount *account = GGN_ACCOUNT (data); /* operate on the xpath. */ if (g_utf8_collate (xpath, GGN_ACCOUNT_XPATH_ENTRY_SUMMARY) == 0) { /* set the value in the entry private data. */ account->priv->entry->priv->summary = g_strdup (value); } else if (g_utf8_collate (xpath, GGN_ACCOUNT_XPATH_ENTRY_TITLE) == 0) { /* set the value in the entry private data. */ account->priv->entry->priv->title = g_strdup (value); } else if (g_utf8_collate (xpath, GGN_ACCOUNT_XPATH_ENTRY_SENDER_EMAIL) == 0) { /* set the value in the entry private data. */ account->priv->entry->priv->sender_email = g_strdup (value); } else if (g_utf8_collate (xpath, GGN_ACCOUNT_XPATH_ENTRY_SENDER_NAME) == 0) { /* set the value in the entry private data. */ account->priv->entry->priv->sender_name = g_strdup (value); } else if (g_utf8_collate (xpath, GGN_ACCOUNT_XPATH_ENTRY_ID) == 0) { /* set the value in the entry private data. */ account->priv->entry->priv->id = g_strdup (value); } } /** * ggn_account_entries_clear: * @account: The account to modify. * * Clears the entries #GPtrArray of a given #GgnAccount. private only. * * Returns: void. **/ void ggn_account_entries_clear (GgnAccount *account) { /* define a helping variable. */ gpointer ptr; /* loop until the pointer array is empty. */ while (account->priv->entries->len > 0) { /* remove the first pointer. */ ptr = g_ptr_array_index (account->priv->entries, 0); g_ptr_array_remove_fast (account->priv->entries, ptr); /* free the entry (pointer). */ ggn_entry_free ((GgnEntry *) ptr); } } /* * ggn_account_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_account_init (GgnAccount *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnAccountPrivate, 1); /* set up the initial values for the private instance objects. */ self->priv->attempts = 0; self->priv->desc = NULL; self->priv->user = NULL; self->priv->domain = NULL; self->priv->pass = NULL; self->priv->enab = FALSE; self->priv->def = FALSE; /* set up the initial NULL reference to the prefs object. */ self->priv->prefs = NULL; /* initialize the soup session objects. */ self->priv->session = soup_session_sync_new (); self->priv->msg = NULL; self->priv->msgbody = NULL; self->priv->proxy = NULL; /* link the soup session to our auth callback. */ g_signal_connect (G_OBJECT (self->priv->session), "authenticate", G_CALLBACK (ggn_account_soup_auth), self); /* initialize the xml parser. */ self->priv->xml = ggn_xml_new (); /* link the begin-element callback to our callback function. */ g_signal_connect (G_OBJECT (self->priv->xml), "begin_element", G_CALLBACK (ggn_account_xml_begin), self); /* link the end-element callback to our callback function. */ g_signal_connect (G_OBJECT (self->priv->xml), "end_element", G_CALLBACK (ggn_account_xml_end), self); /* link the text callback to our callback function. */ g_signal_connect (G_OBJECT (self->priv->xml), "text", G_CALLBACK (ggn_account_xml_text), self); /* initialize the entries pointer array. */ self->priv->entries = g_ptr_array_new (); self->priv->entry = NULL; /* initialize the entry counters. */ self->priv->num_unread = 0; self->priv->num_new = 0; /* set up the account state. */ self->priv->state = GGN_ACCOUNT_STATE_NONE; } /* * ggn_account_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_account_class_init (GgnAccountClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_account_finalize; /* setup the default signal handlers. */ klass->modified = ggn_account_default_modified_cb; klass->updated = ggn_account_default_updated_cb; /** * GgnAccount::modified: * @account: The #GgnAccount object that issued the callback. * * Emitted when the account information is changed by a get/set function **/ signals[MODIFIED] = g_signal_new ("modified", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnAccountClass, modified), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GgnAccount::updated: * @account: The #GgnAccount object that issued the callback. * * Emitted when the account status is changed by a check action. **/ signals[UPDATED] = g_signal_new ("updated", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnAccountClass, updated), NULL, NULL, ggn_marshal_VOID__VOID, G_TYPE_NONE, 0); } /* * ggn_account_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_account_finalize (GObject *obj) { /* make a reference to ourself. */ GgnAccount *self = GGN_ACCOUNT (obj); /* set the account state. */ self->priv->state = GGN_ACCOUNT_STATE_NONE; /* free the strings. */ g_free (self->priv->desc); g_free (self->priv->user); g_free (self->priv->domain); g_free (self->priv->pass); /* reduce the reference count on our prefs object. */ if (self->priv->prefs) g_object_unref (G_OBJECT (self->priv->prefs)); /* unreference the soup session object. */ g_object_unref (G_OBJECT (self->priv->session)); /* free the soup proxy uri. */ if (self->priv->proxy) soup_uri_free (self->priv->proxy); /* free the xml parser. */ ggn_xml_free (self->priv->xml); /* free the entries list. */ ggn_account_entries_clear (self); g_ptr_array_free (self->priv->entries, TRUE); /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_account_parent_class)->finalize (obj); } /** * ggn_account_new: * * Creates a new #GgnAccount with default values, which are * used to access and manipulate account inbox information * * Returns: the new #GgnAccount object. Free with ggn_account_free(). **/ GgnAccount *ggn_account_new (void) { /* make a newly created gobject. */ GgnAccount *account = g_object_new (GGN_TYPE_ACCOUNT, NULL); /* return the new object. */ return account; } /** * ggn_account_new_from_prefs: * * Creates a new #GgnAccount with values that are pulled from * the preferences structure, using the email datafield. * * Returns: the new #GgnAccount object. Free with ggn_account_free(). **/ GgnAccount *ggn_account_new_from_prefs (GgnPrefs *prefs, const gchar *email) { /* declare a helping variable. */ gchar *key; /* make a newly created object. */ GgnAccount *account = g_object_new (GGN_TYPE_ACCOUNT, NULL); /* only if we passed a non-null prefs object. */ if (prefs) { /* set the account prefs object. */ ggn_account_give_prefs (account, prefs); /* read in the description string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_DESC, email); account->priv->desc = ggn_prefs_get_string (account->priv->prefs, key); g_free (key); /* read in the username string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_USER, email); account->priv->user = ggn_prefs_get_string (account->priv->prefs, key); g_free (key); /* read in the domain name string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_DOMAIN, email); account->priv->domain = ggn_prefs_get_string (account->priv->prefs, key); g_free (key); /* read in the enabled boolean. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_ENABLED, email); account->priv->enab = ggn_prefs_get_bool (account->priv->prefs, key); g_free (key); /* read in the default boolean. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_DEFAULT, email); account->priv->def = ggn_prefs_get_bool (account->priv->prefs, key); g_free (key); /* read in the password string. */ account->priv->pass = ggn_keyring_item_find (account->priv->user, account->priv->domain); } /* return the new object. */ return account; } /** * ggn_account_free: * @account: The #GgnAccount to free. * * Frees the given #GgnAccount object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_account_free (GgnAccount *account) { /* while this object exists... */ while (G_IS_OBJECT (account)) { /* unreference this object. */ g_object_unref (G_OBJECT (account)); } } /** * ggn_account_unset_prefs: * @account: The #GgnAccount to free. * * Unsets the preferences and keyring data associated with the given * #GgnAccount object, used privately for account deletion and modification. * * Returns: void. **/ void ggn_account_unset_prefs (GgnAccount *account) { /* declare a few helping variables. */ GSList *accounts; GSList *found; gchar *email; gchar *key; /* this only works if we have preferences. */ if (account->priv->prefs && account->priv->user && account->priv->domain) { /* build the email string. */ email = ggn_account_get_email (account); /* build the gconf key root string. */ key = g_strdup_printf ("%s/%s", GGN_PREF_ACCOUNT_ROOT, email); /* unset the old gconf account tree. */ ggn_prefs_unset (account->priv->prefs, key); /* unset the old keyring entry. */ ggn_keyring_item_delete (account->priv->user, account->priv->domain); /* retrieve the accounts gconf list. */ accounts = ggn_prefs_get_list (account->priv->prefs, GGN_PREF_ACCOUNT_LIST); /* operate on the list. */ if (accounts) { /* find the account in question. */ found = g_slist_find_custom (accounts, email, (GCompareFunc) g_utf8_collate); /* operate on the account. */ if (found) { /* remove the entry from the list. */ accounts = g_slist_remove_link (accounts, found); g_slist_free (found); /* return the list to gconf. */ ggn_prefs_set_list (account->priv->prefs, GGN_PREF_ACCOUNT_LIST, accounts); /* free the accounts linked list. */ g_slist_free (accounts); } } /* free the built strings. */ g_free (email); g_free (key); } } /** * ggn_account_set_prefs: * @account: The #GgnAccount to free. * * Sets the preferences and keyring data associated with the given * #GgnAccount object, used privately for account addition and modification. * * Returns: void. **/ void ggn_account_set_prefs (GgnAccount *account) { /* declare a few helping variables. */ GSList *accounts; gchar *email; gchar *key; /* this only works if we have preferences. */ if (account->priv->prefs && account->priv->user && account->priv->domain) { /* build the email string. */ email = ggn_account_get_email (account); /* resave the description string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_DESC, email); ggn_prefs_set_string (account->priv->prefs, key, account->priv->desc); g_free (key); /* resave the username string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_USER, email); ggn_prefs_set_string (account->priv->prefs, key, account->priv->user); g_free (key); /* resave the domain name string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_DOMAIN, email); ggn_prefs_set_string (account->priv->prefs, key, account->priv->domain); g_free (key); /* resave the enabled boolean. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_ENABLED, email); ggn_prefs_set_bool (account->priv->prefs, key, account->priv->enab); g_free (key); /* resave the default boolean. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_DEFAULT, email); ggn_prefs_set_bool (account->priv->prefs, key, account->priv->def); g_free (key); /* create the keyring entry. */ ggn_keyring_item_create (account->priv->user, account->priv->domain, account->priv->pass); /* retrieve the accounts gconf list. */ accounts = ggn_prefs_get_list (account->priv->prefs, GGN_PREF_ACCOUNT_LIST); /* append the account to the list. */ accounts = g_slist_append (accounts, email); /* return the list to gconf. */ ggn_prefs_set_list (account->priv->prefs, GGN_PREF_ACCOUNT_LIST, accounts); /* free the accounts linked list. */ g_slist_free (accounts); } } /** * ggn_account_get_desc: * @account: The #GgnAccount to access. * * Request the description string of the #GgnAccount object. * * Returns: An in-use string. Freed automatically by ggn_account_free(). **/ gchar *ggn_account_get_desc (GgnAccount *account) { /* return the value. */ return account->priv->desc; } /** * ggn_account_set_desc: * @account: The #GgnAccount to access. * @desc: The new value. * * Sets the description string of the #GgnAccount object. * * Returns: void. **/ void ggn_account_set_desc (GgnAccount *account, const gchar *desc) { /* declare a few helping variables. */ gchar *email; gchar *key; /* properly free and set the new value. */ g_free (account->priv->desc); account->priv->desc = g_strdup (desc); /* update the preferences value. */ if (account->priv->prefs && account->priv->user && account->priv->domain) { /* build the email string. */ email = ggn_account_get_email (account); /* build the preference key string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_DESC, email); /* set the value in the prefs database. */ ggn_prefs_set_string (account->priv->prefs, key, desc); /* free the key and email strings. */ g_free (email); g_free (key); } } /** * ggn_account_get_user: * @account: The #GgnAccount to access. * * Request the username string of the #GgnAccount object. * * Returns: An in-use string. Freed automatically by ggn_account_free(). **/ gchar *ggn_account_get_user (GgnAccount *account) { /* return the value. */ return account->priv->user; } /** * ggn_account_set_user: * @account: The #GgnAccount to access. * @user: The new value. * * Sets the username string of the #GgnAccount object. * * Returns: void. **/ void ggn_account_set_user (GgnAccount *account, const gchar *user) { /* unset the preferences for the old username. */ ggn_account_unset_prefs (account); /* properly free and set the new value. */ g_free (account->priv->user); account->priv->user = g_strdup (user); /* set the preferences for the new username. */ ggn_account_set_prefs (account); } /** * ggn_account_get_domain: * @account: The #GgnAccount to access. * * Request the domain name string of the #GgnAccount object. * * Returns: An in-use string. Freed automatically by ggn_account_free(). **/ gchar *ggn_account_get_domain (GgnAccount *account) { /* return the value. */ return account->priv->domain; } /** * ggn_account_set_domain: * @account: The #GgnAccount to access. * @domain: The new value. * * Sets the domain name string of the #GgnAccount object. * * Returns: void. **/ void ggn_account_set_domain (GgnAccount *account, const gchar *domain) { /* unset the preferences for the old domain name. */ ggn_account_unset_prefs (account); /* properly free and set the new value. */ g_free (account->priv->domain); account->priv->domain = g_strdup (domain); /* set the preferences for the new domain name. */ ggn_account_set_prefs (account); } /** * ggn_account_get_pass: * @account: The #GgnAccount to access. * * Request the password string of the #GgnAccount object. * * Returns: An in-use string. Freed automatically by ggn_account_free(). **/ gchar *ggn_account_get_pass (GgnAccount *account) { /* return the value. */ return account->priv->pass; } /** * ggn_account_set_pass: * @account: The #GgnAccount to access. * @pass: The new value. * * Sets the password string of the #GgnAccount object. * * Returns: void. **/ void ggn_account_set_pass (GgnAccount *account, const gchar *pass) { /* properly free and set the new value. */ g_free (account->priv->pass); account->priv->pass = g_strdup (pass); /* update the keyring value. */ if (account->priv->user && account->priv->domain) { /* create (or update if existing) the pass for user at domain. */ ggn_keyring_item_create (account->priv->user, account->priv->domain, account->priv->pass); } } /** * ggn_account_get_email: * @account: The #GgnAccount to access. * * Request the email string of the #GgnAccount object. * * Returns: A newly allocated email string. Free with g_free(). **/ gchar *ggn_account_get_email (GgnAccount *account) { /* return the value. */ return g_strdup_printf ("%s@%s", account->priv->user, account->priv->domain); } /** * ggn_account_set_email: * @account: The #GgnAccount to access. * @user: The new username string. * @domain: The new domain name string. * * Simultaneously sets the username and domain name strings in the * #GgnAccount object, saving time when the user edits the accounts. * * Returns: void. **/ void ggn_account_set_email (GgnAccount *account, const gchar *user, const gchar *domain) { /* unset the preferences for the old email. */ ggn_account_unset_prefs (account); /* properly free and set the new value. */ g_free (account->priv->user); g_free (account->priv->domain); account->priv->user = g_strdup (user); account->priv->domain = g_strdup (domain); /* set the preferences for the new email. */ ggn_account_set_prefs (account); } /** * ggn_account_get_enabled: * @account: The #GgnAccount to access. * * Request the enabled state of the #GgnAccount object. * * Returns: A #gboolean representing the enabled state. **/ gboolean ggn_account_get_enabled (GgnAccount *account) { /* return the value. */ return account->priv->enab; } /** * ggn_account_set_enabled: * @account: The #GgnAccount to access. * @enab: The new value. * * Sets the enabled state of the #GgnAccount object. * * Returns: void. **/ void ggn_account_set_enabled (GgnAccount *account, gboolean enab) { /* declare a few helping variables. */ gchar *email; gchar *key; /* set the new value. */ account->priv->enab = enab; /* ensure we *can* update the prefs value. */ if (account->priv->prefs && account->priv->user && account->priv->domain) { /* build the email string. */ email = ggn_account_get_email (account); /* build the preference key string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_ENABLED, email); /* set the value in the prefs database. */ ggn_prefs_set_bool (account->priv->prefs, key, enab); /* free the key and email strings. */ g_free (email); g_free (key); } } /** * ggn_account_get_default: * @account: The #GgnAccount to access. * * Request the defaulted state of the #GgnAccount object. * * Returns: A #gboolean representing the defaulted state. **/ gboolean ggn_account_get_default (GgnAccount *account) { /* return the value. */ return account->priv->def; } /** * ggn_account_set_default: * @account: The #GgnAccount to access. * @def: The new value. * * Sets the defaulted state of the #GgnAccount object. * * Returns: void. **/ void ggn_account_set_default (GgnAccount *account, gboolean def) { /* declare a few helping variables. */ gchar *email; gchar *key; /* set the new value. */ account->priv->def = def; /* ensure we *can* update the prefs value. */ if (account->priv->prefs && account->priv->user && account->priv->domain) { /* build the email string. */ email = ggn_account_get_email (account); /* build the preference key string. */ key = g_strdup_printf (GGN_PREF_ACCOUNT_DEFAULT, email); /* set the value in the prefs database. */ ggn_prefs_set_bool (account->priv->prefs, key, def); /* free the key and email strings. */ g_free (email); g_free (key); } } /** * ggn_account_check_thread: * @account: The #GgnAccount to run the check with. * * This is the private thread function called by ggn_account_check() in * the #GgnAccount code to check the inbox conditions and parse the xml * atom feed. * * Returns: void. **/ gpointer ggn_account_check_thread (gpointer data) { /* declare a few helping variables. */ gboolean success; guint status; gchar *body; guint idx; /* gain a reference to our account object. */ GgnAccount *account = GGN_ACCOUNT (data); /* set the account state. */ account->priv->state = GGN_ACCOUNT_STATE_CHECKING; /* let's be optimistic. */ success = TRUE; /* create an http request message. */ account->priv->msg = soup_message_new (GGN_ACCOUNT_FEED_METHOD, GGN_ACCOUNT_FEED_URI); /* link the restart callback to our message. */ g_signal_connect (G_OBJECT (account->priv->msg), "restarted", G_CALLBACK (ggn_account_soup_restart), account); /* reset the number of authentication attempts. */ account->priv->attempts = 0; /* send the message into the etherwebs. */ status = soup_session_send_message (account->priv->session, account->priv->msg); /* check the return status. */ if (status == SOUP_STATUS_OK) { /* reset the number of counted entries. */ account->priv->num_unread = 0; account->priv->num_new = 0; /* extract the message text from the response. */ account->priv->msgbody = account->priv->msg->response_body; soup_message_body_flatten (account->priv->msgbody); body = g_strdup (account->priv->msgbody->data); /* set all entries in the array to "read". */ for (idx = 0; idx < account->priv->entries->len; idx++) { /* gain a reference to the indexed entry and set the state to "read". */ account->priv->entry = g_ptr_array_index (account->priv->entries, idx); account->priv->entry->priv->state = GGN_ENTRY_STATE_READ; } /* parse the xml from the downloaded feed. */ if (!ggn_xml_load_string (account->priv->xml, body)) { /* unset our success boolean. */ success = FALSE; } else { /* clean up entries still marked "read". */ for (idx = 0; idx < account->priv->entries->len; idx++) { /* gain a reference to the indexed entry. */ account->priv->entry = g_ptr_array_index (account->priv->entries, idx); /* see if this entry has been read. */ if (account->priv->entry->priv->state == GGN_ENTRY_STATE_READ) { /* free and delete the entry and fix the counter integer. */ g_ptr_array_remove_index (account->priv->entries, idx); ggn_entry_free (account->priv->entry); idx--; } } } /* free the message body string. */ g_free (body); } else { /* unset our success boolean. */ success = FALSE; } /* close all open and unused connections. */ soup_session_abort (account->priv->session); /* set the appropriate status. */ if (success == TRUE) { /* we successfully checked the account. */ account->priv->state = GGN_ACCOUNT_STATE_CHECKED; } else { /* an error occurred somewhere along the way. */ account->priv->state = GGN_ACCOUNT_STATE_FAILED; } /* emit the updated signal. */ g_signal_emit (account, signals[UPDATED], 0); /* return from the function. */ return data; } /** * ggn_account_check: * @account: The #GgnAccount to run the check with. * * Initiates an asynchronous mail checking operation which returns by * emitting one of the signals defined in the #GgnAccount code. * * Returns: void. **/ void ggn_account_check (GgnAccount *account) { /* create the new thread. */ g_thread_create (ggn_account_check_thread, (gpointer) account, FALSE, NULL); } /** * ggn_account_launch: * @account: A #GgnAccount object. * @mode: Either GGN_ACCOUNT_LAUNCH_INBOX or GGN_ACCOUNT_LAUNCH_COMPOSE. * @user: The username string. * @domain: The domain name string. * @pass: The password string. * @mailto: Our recipient, or NULL. * * Launches the web-based gmail of the given gmail account using the function * ggn_link_execute(). Private use only. * * Returns: void. **/ void ggn_account_launch (GgnAccount *account, int mode, const gchar *user, const gchar *domain, const gchar *pass, const gchar *mailto) { /* declare some variables. */ gchar *authurl = NULL; gchar *navurl = NULL; /* declare some constants. */ const gchar *navmode = ((mode == GGN_ACCOUNT_LAUNCH_COMPOSE) ? "view=cm&fs=1&nsr=0" : ""); const gchar *authserv = "&service=mail&rm=false&Email="; const gchar *authpost = "&rmShown=1&signIn=Sign+in"; /* determine the launch mode. */ if (g_utf8_collate (domain, "gmail.com") == 0) { /* set the post-auth navigation url. */ navurl = g_strdup_printf ("%s?%s%s%s", "https://mail.google.com/mail/", navmode, mailto ? "&to=" : "", mailto ? mailto : ""); /* vanilla gmail site. */ authurl = g_strdup_printf ("%s%s%s%s%s@%s%s%s%s", "https://www.google.com/accounts/ServiceLoginAuth", "?ltmpl=default<mplcache=2&continue=", g_uri_escape_string (navurl, "", TRUE), authserv, user, domain, "&Passwd=", pass, authpost); } else { /* set the post-auth navigation url. */ navurl = g_strdup_printf ("%s%s/?%s%s%s", "https://mail.google.com/a/", domain, navmode, mailto ? "&to=" : "", mailto ? mailto : ""); /* hosted gmail site. */ authurl = g_strdup_printf ("%s%s%s%s%s%s%s%s%s", "https://www.google.com/a/", domain, "/LoginAction2?ltmpl=default<mplcache=2&continue=", g_uri_escape_string (navurl, "", TRUE), authserv, user, "&Passwd=", pass, authpost); } /* execute the url we have constructed. */ ggn_link_execute (authurl); /* free the strings used. */ g_free (authurl); g_free (navurl); } /** * ggn_account_launch_inbox: * @account: The #GgnAccount to use. * * Launches the web-based inbox of the given gmail account using the function * ggn_account_launch(). * * Returns: void. **/ void ggn_account_launch_inbox (GgnAccount *account) { /* utilize ggn_account_launch(). */ ggn_account_launch (account, GGN_ACCOUNT_LAUNCH_INBOX, account->priv->user, account->priv->domain, account->priv->pass, NULL); } /** * ggn_account_launch_compose: * @account: The #GgnAccount to use. * @recipient: The email address to send this email to. * * Launches the web-based composition page of the given gmail account * using the function ggn_account_launch(). * * Returns: void. **/ void ggn_account_launch_compose (GgnAccount *account, const gchar *recipient) { /* utilize ggn_account_launch(). */ ggn_account_launch (account, GGN_ACCOUNT_LAUNCH_COMPOSE, account->priv->user, account->priv->domain, account->priv->pass, recipient); } /** * ggn_account_give_prefs: * @account: The #GgnAccount to give the #GgnPrefs to. * @prefs: The #GgnPrefs pointer to give to the account. * * This function gives the given #GgnAccount object a reference to the * given #GgnPrefs object and increases the refcount of the prefs object, * to allow the account to automatically update its settings. * * Returns: void. **/ void ggn_account_give_prefs (GgnAccount *account, GgnPrefs *prefs) { /* declare a few helping variables. */ gchar *ssl_host; gchar *host; gchar *uri; gint port; gint ssl_port; /* ensure the prefs object is non-NULL. */ if (!prefs) return; /* hand the pointer off. */ account->priv->prefs = prefs; /* increment the reference count. */ g_object_ref (prefs); /* immediately check to see if we should setup the proxy. */ if (ggn_prefs_get_bool (account->priv->prefs, GGN_GCONF_PROXY_USE)) { /* get the insecure proxy hostname. */ host = ggn_prefs_get_string (account->priv->prefs, GGN_GCONF_PROXY_HOST); /* get the insecure proxy port. */ port = ggn_prefs_get_int (account->priv->prefs, GGN_GCONF_PROXY_PORT); /* get the secure proxy hostname. */ ssl_host = ggn_prefs_get_string (account->priv->prefs, GGN_GCONF_PROXY_SSL_HOST); /* get the secure proxy port. */ ssl_port = ggn_prefs_get_int (account->priv->prefs, GGN_GCONF_PROXY_SSL_PORT); /* try to use secured values first. */ if ((g_utf8_strlen (ssl_host, -1) > 0) && (ssl_port != 0)) { /* use the secure host and port. */ uri = g_strdup_printf ("http://%s:%d", ssl_host, ssl_port); } else if ((g_utf8_strlen (host, -1) > 0) && (port != 0)) { /* use the insecure host and port. */ uri = g_strdup_printf ("http://%s:%d", host, port); } else { /* we could not find the proper arguments. */ uri = NULL; } /* create the proxy uri. */ account->priv->proxy = soup_uri_new (uri); /* update the proxy for the session. */ if (account->priv->proxy) { /* set the proxy-uri property for the session. */ g_object_set (G_OBJECT (account->priv->session), SOUP_SESSION_PROXY_URI, account->priv->proxy, NULL); } /* free the allocated strings. */ g_free (ssl_host); g_free (host); g_free (uri); } } /** * ggn_account_get_state: * @account: The #GgnAccount to access. * * This function returns the live state of the gmail account. * * Returns: A #guint of the live state. **/ guint ggn_account_get_state (GgnAccount *account) { /* easy peasy. */ return account->priv->state; } /** * ggn_account_get_num_entries: * @account: The #GgnAccount to access. * @n_unread: A pointer to a #guint to hold the unread entry count. * @n_new: A pointer to a #guint to hold the new entry count. * * This function returns the number of messages (entries) that are * newly unread in the inbox of the given #GgnAccount object. * * Returns: void. **/ void ggn_account_get_num_entries (GgnAccount *account, guint *n_unread, guint *n_new) { /* set the values of the pointed-to variables. */ *n_unread = account->priv->num_unread; *n_new = account->priv->num_new; } /** * ggn_account_get_entry: * @account: The #GgnAccount to access. * @idx: The index of the #GgnEntry to retrieve. * * This function returns a pointer to a given message (entry) in * the account object. If the index is out of bounds or an error * occurs in returning the entry, NULL is returned. * * Returns: A pointer to a #GgnEntry object. Automatically freed! **/ GgnEntry *ggn_account_get_entry (GgnAccount *account, guint idx) { /* check bounds. */ if (idx >= account->priv->entries->len) return NULL; /* return the value. */ return g_ptr_array_index (account->priv->entries, idx); } gnome-gmail-notifier-0.10.1/src/ggn-account-list-priv.h0000644000175000017520000000316011357667274017643 00000000000000/** * @file src/ggn-account-list-priv.h The GgnAccountList object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * GgnAccountListPrivate: * @prefs: The #GgnPrefs object we use to track changes. * @accounts: A #GPtrArray full of #GgnAccount objects. * @account: A #GgnAccount storage element for operations. * @state: The checking/check/fail state of the accounts in the list. * * The #GgnAccountList is a GObject that manages the creation, modification, * updating, and deletion of gmail accounts. **/ struct _GgnAccountListPrivate { /* the preferences object we use. */ GgnPrefs *prefs; /* the accounts that the account list holds. */ GPtrArray *accounts; GgnAccount *account; /* the count variables for accounts the list holds. */ guint num_nonempty; guint num_failed; /* the count variables for the held entries. */ guint num_unread_entries; guint num_new_entries; }; gnome-gmail-notifier-0.10.1/src/ggn-keyring.h0000644000175000017520000000301011357667274015722 00000000000000/** * @file src/ggn-keyring.h The GgnKeyring functions * @Copyright (C) 2010 Bradley A. Worley. * * 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 */ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_KEYRING_H__ #define __GNOME_GMAIL_NOTIFIER_KEYRING_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * gnome-keyring interaction functions. */ gboolean ggn_keyring_item_create (const gchar *user, const gchar *domain, const gchar *pass); gboolean ggn_keyring_item_delete (const gchar *user, const gchar *domain); gchar *ggn_keyring_item_find (const gchar *user, const gchar *domain); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_KEYRING_H__ */ gnome-gmail-notifier-0.10.1/src/Makefile.am0000644000175000017520000000533011357667274015373 00000000000000 bin_PROGRAMS = gnome-gmail-notifier EXTRA_DIST = ggn-marshal.list MARSHAL_GENERATED = ggn-marshal.c \ ggn-marshal.h ggn-marshal.h: ggn-marshal.list ( @GLIB_GENMARSHAL@ --prefix=ggn_marshal $(srcdir)/ggn-marshal.list --header > ggn-marshal.tmp \ && mv ggn-marshal.tmp ggn-marshal.h ) || ( rm -f ggn-marshal.tmp && exit 1 ) ggn-marshal.c: ggn-marshal.h ( (echo '#include "ggn-marshal.h"'; @GLIB_GENMARSHAL@ --prefix=ggn_marshal $(srcdir)/ggn-marshal.list --body) > ggn-marshal.tmp \ && mv ggn-marshal.tmp ggn-marshal.c ) || ( rm -f ggn-marshal.tmp && exit 1 ) BUILT_SOURCES = $(MARSHAL_GENERATED) CLEANFILES = $(MARSHAL_GENERATED) gnome_gmail_notifier_SOURCES = main.c \ main.h \ $(MARSHAL_GENERATED) \ ggn-about-dialog.c \ ggn-about-dialog.h \ ggn-about-dialog-priv.h \ ggn-audio.c \ ggn-audio.h \ ggn-audio-priv.h \ ggn-keyring.c \ ggn-keyring.h \ ggn-prefs.c \ ggn-prefs.h \ ggn-prefs-priv.h \ ggn-icon.c \ ggn-icon.h \ ggn-icon-priv.h \ ggn-xml.c \ ggn-xml.h \ ggn-xml-priv.h \ ggn-entry.c \ ggn-entry.h \ ggn-entry-priv.h \ ggn-account.c \ ggn-account.h \ ggn-account-priv.h \ ggn-account-list.c \ ggn-account-list.h \ ggn-account-list-priv.h \ ggn-prefs-window.c \ ggn-prefs-window.h \ ggn-prefs-window-priv.h \ ggn-manager.c \ ggn-manager.h \ ggn-manager-priv.h gnome_gmail_notifier_LDFLAGS = -Wl,--export-dynamic gnome_gmail_notifier_LDADD = $(GGN_LIBS) AM_CPPFLAGS = $(GGN_CFLAGS) -Wall -Wl,--export-dynamic \ -DPIXMAPS_DIR=\""$(pkgdatadir)"\" \ -DXMLUI_DIR=\""$(pkgdatadir)"\" \ -DGETTEXT_PACKAGE=\""$(GETTEXT_PACKAGE)"\" \ -DGGN_LOCALEDIR=\""$(GGN_LOCALEDIR)"\" fixme: grep -n -e fixme -e FIXME *.[ch] again: clean all gnome-gmail-notifier-0.10.1/src/ggn-about-dialog.h0000644000175000017520000000512711357667274016634 00000000000000/** * @file src/ggn-about-dialog.h GgnAboutDialog object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /* * ensure this is a once-only header. */ #ifndef __GNOME_GMAIL_NOTIFIER_ABOUT_DIALOG_H__ #define __GNOME_GMAIL_NOTIFIER_ABOUT_DIALOG_H__ /* * our header is just beginning. */ G_BEGIN_DECLS /* * object function macros. */ #define GGN_TYPE_ABOUT_DIALOG (ggn_about_dialog_get_type ()) #define GGN_ABOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GGN_TYPE_ABOUT_DIALOG, GgnAboutDialog)) #define GGN_ABOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GGN_TYPE_ABOUT_DIALOG, GgnAboutDialogClass)) #define GGN_IS_ABOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GGN_TYPE_ABOUT_DIALOG)) #define GGN_IS_ABOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GGN_TYPE_ABOUT_DIALOG)) #define GGN_ABOUT_DIALOG_GET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GGN_TYPE_ABOUT_DIALOG, GgnAboutDialogClass)) /* * type macros. */ typedef struct _GgnAboutDialog GgnAboutDialog; typedef struct _GgnAboutDialogClass GgnAboutDialogClass; typedef struct _GgnAboutDialogPrivate GgnAboutDialogPrivate; /* * object definition. */ struct _GgnAboutDialog { /* parent gobject class. */ GObject parent_object; /* private instance members. */ GgnAboutDialogPrivate *priv; }; /* * class definition. */ struct _GgnAboutDialogClass { /* parent gobject class. */ GObjectClass parent; /* signals. */ }; /* * gobject-type definition. */ GType ggn_about_dialog_get_type (void); /* * object creation functions. */ GgnAboutDialog *ggn_about_dialog_new (void); void ggn_about_dialog_free (GgnAboutDialog *dialog); /* * show/hide functions. */ void ggn_about_dialog_show (GgnAboutDialog *dialog); void ggn_about_dialog_hide (GgnAboutDialog *dialog); /* * our header is at its end. */ G_END_DECLS #endif /* __GNOME_GMAIL_NOTIFIER_ABOUT_DIALOG_H__ */ gnome-gmail-notifier-0.10.1/src/ggn-xml.c0000644000175000017520000003223211357667274015055 00000000000000/** * @file src/ggn-xml.c The GgnXML object * @Copyright (C) 2010 Bradley A. Worley. * * 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 **/ /** * SECTION:GgnXML * @short_description: The xml parser object * @include: src/ggn-xml.h **/ /* * include our application header. */ #include #include "ggn-xml-priv.h" /* * forward function definitions. */ static void ggn_xml_init (GgnXML *self); static void ggn_xml_class_init (GgnXMLClass *klass); static void ggn_xml_finalize (GObject *obj); /* * define the gobject type and its basic functions. */ G_DEFINE_TYPE (GgnXML, ggn_xml, G_TYPE_OBJECT); /* * define the xml node types. */ #define GGN_XML_NODE_TYPE_TEXT 3 #define GGN_XML_NODE_TYPE_OPENTAG 1 #define GGN_XML_NODE_TYPE_CLOSETAG 15 /* * define the signals used. */ enum { BEGIN_ELEMENT, END_ELEMENT, TEXT, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; /** * ggn_xml_default_begin_element_cb: * @xml: The xml parser which emitted the signal. * @element_path: The "xpath" of the element parsed. * @element_name: The name of the element parsed. * @attributes: The attributes of the element. * * This is the default "begin_element" callback function manager. * * Returns: void. **/ static void ggn_xml_default_begin_element_cb (GgnXML *xml, gchar *element_path, gchar *element_name, GHashTable *attributes) { /* do nothing. */ } /** * ggn_xml_default_end_element_cb: * @xml: The xml parser which emitted the signal. * @element_path: The "xpath" of the element parsed. * @element_name: The name of the element parsed. * * This is the default "end_element" callback function manager. * * Returns: void. **/ static void ggn_xml_default_end_element_cb (GgnXML *xml, gchar *element_path, gchar *element_name) { /* do nothing. */ } /** * ggn_xml_default_text_cb: * @xml: The xml parser which emitted the signal. * @element_path: The "xpath" of the current element. * @element_name: The name of the current element. * @value: The text we wave parsed from the XML. * * This is the default "text" callback function manager. * * Returns: void. **/ static void ggn_xml_default_text_cb (GgnXML *xml, gchar *element_path, gchar *element_name, gchar *value) { /* do nothing. */ } /* * ggn_xml_init: * * This function is used by the gobject library to * generate a new instance of our object. */ static void ggn_xml_init (GgnXML *self) { /* set up the private data structure. */ self->priv = g_new0 (GgnXMLPrivate, 1); /* setup private instance objects. */ self->priv->reader = NULL; } /* * ggn_xml_class_init: * * This function is used by the gobject library to * generate a new class object of our object. */ static void ggn_xml_class_init (GgnXMLClass *klass) { /* setup a gobject class. */ GObjectClass *gobj_class = G_OBJECT_CLASS (klass); /* set the locations of our destruction function. */ gobj_class->finalize = ggn_xml_finalize; /* setup the default signal handler. */ klass->begin_element = ggn_xml_default_begin_element_cb; klass->end_element = ggn_xml_default_end_element_cb; klass->text = ggn_xml_default_text_cb; /** * GgnXML::begin_element: * @xml: The xml parser which emitted the signal. * @element_path: The pseudo-XPath for the parsed node. * @element_name: The tag name for the parsed node. * @attributes: The attributes inside the parsed node. * * Emitted when the parser encounters an opening XML tag. **/ signals[BEGIN_ELEMENT] = g_signal_new ("begin_element", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnXMLClass, begin_element), NULL, NULL, ggn_marshal_VOID__STRING_STRING_OBJECT, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_HASH_TABLE); /** * GgnXML::end_element: * @xml: The xml parser which emitted the signal. * @element_path: The pseudo-XPath for the parsed node. * @element_name: The tag name for the parsed node. * * Emitted when the parser encounters a closing XML tag. **/ signals[END_ELEMENT] = g_signal_new ("end_element", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnXMLClass, end_element), NULL, NULL, ggn_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING); /** * GgnXML::text: * @xml: The xml parser which emitted the signal. * @element_path: The pseudo-XPath for the parsed node. * @element_name: The tag name for the parsed node. * @value: The textual content that we've parsed. * * Emitted when the parser encounters textual content of some kind. **/ signals[TEXT] = g_signal_new ("text", G_OBJECT_CLASS_TYPE (gobj_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GgnXMLClass, text), NULL, NULL, ggn_marshal_VOID__STRING_STRING_STRING, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING); } /* * ggn_xml_finalize: * * This function is used by the gobject library to cleanly finish * the destruction process started by the dispose function. */ static void ggn_xml_finalize (GObject *obj) { /* make a reference to ourself. */ GgnXML *self = GGN_XML (obj); /* free the private instance objects. */ /* destroy the private object. */ g_free (self->priv); self->priv = NULL; /* chain up to the parent class. */ G_OBJECT_CLASS (ggn_xml_parent_class)->finalize (obj); } /** * ggn_xml_new: * * Creates a new #GgnXML with default values, which are * used to parse any XML-based strings. * * Returns: the new #GgnXML object. Free with ggn_xml_free(). **/ GgnXML *ggn_xml_new (void) { /* make a newly created gobject. */ GgnXML *xml = g_object_new (GGN_TYPE_XML, NULL); /* return the new object. */ return xml; } /** * ggn_xml_free: * @xml: The #GgnXML to free. * * Frees the given #GgnXML object by decreasing its reference count * until the #GObject library is forced to free the memory allocated * for its use. * * Returns: void. **/ void ggn_xml_free (GgnXML *xml) { /* while this object exists... */ while (G_IS_OBJECT (xml)) { /* unreference this object. */ g_object_unref (G_OBJECT (xml)); } } /** * ggn_xml_generate_xpath: * @xml: The XML parser to build an XPath from. * * This function builds a totally non-conforming XPath expression from * an xmlTextReader object by extracting the current xmlNode and then * working backwards to the document node. * * Returns: the pseudo-XPath string. Free with g_free(). **/ gchar *ggn_xml_generate_xpath (GgnXML *xml) { /* declare our helping variables. */ gchar *rev, *str; xmlNode *node; GString *gstr; /* allocate memory for the gstring. */ gstr = g_string_new (""); /* get the current xml node and add it to the string. */ node = xmlTextReaderCurrentNode (xml->priv->reader); rev = g_utf8_strreverse ((gchar *) node->name, -1); g_string_append_printf (gstr, "%s/", rev); g_free (rev); /* loop while there are still parents. */ node = node->parent; while (node->name != NULL) { /* append the node name to the string. */ rev = g_utf8_strreverse ((gchar*) node->name, -1); g_string_append_printf (gstr, "%s/", rev); g_free (rev); /* get the new parent node. */ node = node->parent; } /* create a new string from our GString. */ str = g_utf8_strreverse (gstr->str, -1); g_string_free (gstr, TRUE); /* return the new string. */ return str; } /** * ggn_xml_load_string: * @xml: An XML parser to parse the string. * @str: The XML UTF-8 text to parse. * * Loads an XML subset from a string in memory, as represented by * a gchar* variable, and then begins to parse the XML. * * Returns: success boolean. **/ gboolean ggn_xml_load_string (GgnXML *xml, const gchar *str) { /* set up the reader for parsing. */ xml->priv->reader = xmlReaderForDoc ((xmlChar *) str, NULL, "UTF-8", XML_PARSE_RECOVER | XML_PARSE_NOERROR); /* allocate the attributes hash table. */ xml->priv->attribs = g_hash_table_new (g_str_hash, g_str_equal); /* loop and continue parsing. */ while (xmlTextReaderRead (xml->priv->reader) == 1) { /* determine the xml node type. */ xml->priv->type = xmlTextReaderNodeType (xml->priv->reader); /* act variably by the node type. */ if (xml->priv->type == GGN_XML_NODE_TYPE_OPENTAG) { /* get the number of attributes. */ xml->priv->nattr = xmlTextReaderAttributeCount (xml->priv->reader); /* get the node name. */ xml->priv->name = (gchar *) xmlTextReaderConstName (xml->priv->reader); /* get a non-conforming xpath string. */ xml->priv->xpath = ggn_xml_generate_xpath (xml); /* reset the hash table. */ g_hash_table_remove_all (xml->priv->attribs); /* do we have attributes? */ if (xml->priv->nattr > 0) { /* read the attributes into the hash table. */ while (xmlTextReaderMoveToNextAttribute (xml->priv->reader)) { /* add the strings to our hash table. */ g_hash_table_insert (xml->priv->attribs, (gchar *) xmlTextReaderConstName (xml->priv->reader), (gchar *) xmlTextReaderConstValue (xml->priv->reader)); } } /* emit the "begin_element" signal. */ g_signal_emit (xml, signals[BEGIN_ELEMENT], 0, xml->priv->xpath, xml->priv->name, xml->priv->attribs); /* reset our attribute count for the next tag. */ xml->priv->nattr = 0; /* free the string we allocated. */ g_free (xml->priv->xpath); } else if (xml->priv->type == GGN_XML_NODE_TYPE_CLOSETAG) { /* get the node name. */ xml->priv->name = (gchar *) xmlTextReaderConstName (xml->priv->reader); /* get a non-conforming xpath string. */ xml->priv->xpath = ggn_xml_generate_xpath (xml); /* emit the "end_element" signal. */ g_signal_emit (xml, signals[END_ELEMENT], 0, xml->priv->xpath, xml->priv->name); /* free the string we allocated. */ g_free (xml->priv->xpath); } else if (xml->priv->type == GGN_XML_NODE_TYPE_TEXT) { /* get the node name. */ xml->priv->name = (gchar *) xmlTextReaderConstName (xml->priv->reader); /* get a non-conforming xpath string. */ xml->priv->xpath = ggn_xml_generate_xpath (xml); /* get the content text. */ xml->priv->text = (gchar *) xmlTextReaderReadString (xml->priv->reader); /* emit the "text" signal. */ g_signal_emit (xml, signals[TEXT], 0, xml->priv->xpath, xml->priv->name, xml->priv->text); /* free the strings we allocated. */ g_free (xml->priv->xpath); g_free (xml->priv->text); } /* reset our integer values. */ xml->priv->type = 0; } /* free the attributes hash table. */ g_hash_table_destroy (xml->priv->attribs); /* free the reader. */ xmlFreeTextReader (xml->priv->reader); /* set the exit status. */ return TRUE; } /** * ggn_xml_load_file: * @xml: The XML parser to parse the file. * @filename: The filename of the XML to parse. * * Loads an XML subset from an XML file, as represented by * a gchar* variable, and then begins to parse the XML. * * Returns: success boolean. **/ gboolean ggn_xml_load_file (GgnXML *xml, const gchar *filename) { /* declare some helping variables. */ gboolean status; gchar *body; /* make sure the file exists. */ if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR)) { /* exit the function. */ return FALSE; } /* read in the file's contents.. */ if (!g_file_get_contents (filename, &body, NULL, NULL)) { /* exit the function. */ return FALSE; } /* run the string parsing function. */ status = ggn_xml_load_string (xml, body); /* free the string. */ g_free (body); /* set the exit status. */ return status; } gnome-gmail-notifier-0.10.1/autogen.sh0000755000175000017520000000432711357667301014545 00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. DIE=0 PACKAGE=gnome-gmail-notifier echo "Generating configuration files for $PACKAGE, please wait..." (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have autoconf installed to compile $PACKAGE." echo "Download the appropriate package for your distribution," echo "or get the source tarball at:" echo echo " ftp://ftp.gnu.org/pub/gnu/autoconf/" DIE=1 } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have automake installed to compile $PACKAGE." echo "Download the appropriate package for your distribution," echo "or get the source tarball at:" echo echo " ftp://ftp.gnu.org/pub/gnu/automake/" DIE=1 } (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have glib-gettextize installed to compile $PACKAGE." echo "Download the appropriate package for your distribution," echo "or get the source tarball at:" echo echo " ftp://ftp.gnu.org/pub/glib/" DIE=1 } (intltoolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have intltoolize installed to compile $PACKAGE." echo "Download the appropriate package for your distribution," echo "or get the source tarball at:" echo echo " ftp://ftp.gnome.org/pub/gnome/sources/intltool/" DIE=1 } [ $DIE -eq 1 ] && exit 1; echo " intltoolize --copy --force --automake" intltoolize --copy --automake --force sed -e 's/^\(EXTRA_DISTFILES.*\)/\1 gnome-gmail-notifier.pot/g' -i po/Makefile.in.in echo " aclocal $ACLOCAL_FLAGS" aclocal $ACLOCAL_FLAGS echo " autoheader" autoheader echo " automake --add-missing" automake --add-missing echo " autoconf" autoconf if [ -x config.status -a -z "$*" ]; then ./config.status --recheck else if test -z "$*"; then echo "I am going to run ./configure with no arguments - if you wish" echo "to pass any to it, please specify them on the $0 command line." echo "If you do not wish to run ./configure, press Ctrl-C now." trap 'echo "configure aborted" ; exit 0' 1 2 15 sleep 1 fi echo " ./configure ${@}" ./configure "$@"; fi gnome-gmail-notifier-0.10.1/COPYING0000644000175000017520000004311011357667301013570 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gnome-gmail-notifier-0.10.1/install-sh0000755000175000017520000003246411173623265014550 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false 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: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # 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: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: gnome-gmail-notifier-0.10.1/missing0000755000175000017520000002557711173623265014152 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # 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=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # 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' autom4te touch the output file, or create a stub one 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 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: gnome-gmail-notifier-0.10.1/INSTALL0000644000175000017520000002240611357667301013573 00000000000000Installation 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' will install the package's files in `/usr/local/bin', `/usr/local/man', 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 give `configure' the option `--exec-prefix=PREFIX', the package will use PREFIX as the prefix for installing programs and libraries. Documentation and other data files will 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 `--target=TYPE' option 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. gnome-gmail-notifier-0.10.1/intltool-merge.in0000644000175000017520000010714111357667334016041 00000000000000#!@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.35.5"; ## 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 $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, "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"} || $ENV{"INTLTOOL_ICONV"} || "@INTLTOOL_ICONV@"; my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); # 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 && @ARGV > 2) { &utf8_sanity_check; &preparation; &print_message; "ed_merge_translations; &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 -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 { 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; } ## NOTE: deal with < - < but not > - > because it seems its ok to have ## > in the entity. For further info please look at #84738. sub entity_decode { local ($_) = @_; s/'/'/g; # ' s/"/"/g; # " s/&/&/g; s/</; 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; } } 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_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+)=.*/[$lang]$1=$translation/; print OUTPUT; } } else { print OUTPUT; } } close OUTPUT; close INPUT; } 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 ($lang, $string) = @_; $string =~ s/\\\"/\"/g; my $translation = $translations{$lang, $string}; $translation = $string if !$translation; $translation =~ s/\"/\\\"/g; return $translation } sub quoted_merge_translations { 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($lang, $1) . "\""/ge; print OUTPUT; } close OUTPUT; close INPUT; } } gnome-gmail-notifier-0.10.1/depcomp0000755000175000017520000004271311173623265014117 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -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. 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 tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # 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,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$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" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. 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 tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. 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 mechanism 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 $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: gnome-gmail-notifier-0.10.1/LICENSE0000644000175000017520000004312211357667301013545 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. gnome-gmail-notifier-0.10.1/intltool-update.in0000644000175000017520000006707511357667334016237 00000000000000#!@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.35.5"; 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. 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)+)$/; }, ".."; 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; } ## N_ Q_ and _ are the three macros defined in gi8n.h if (/[NQ]?_ *\(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) { $in2{$_} = 1; } foreach (@buf_potfiles_ignore_sorted) { $in2{$_} = 1; } my @result; foreach (@buf_allfiles_sorted) { if (!exists($in2{$_})) { push @result, $_ } } 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 GenerateHeaders { my $EXTRACT = "/usr/bin/intltool-extract"; chomp $EXTRACT; $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"}; ## Generate the .h header files, so we can allow glade and ## xml translation support if (! -x "$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"} || "@INTLTOOL_XGETTEXT@"; my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; chomp $XGETTEXT; if (! -x $XGETTEXT) { print STDERR " *** 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\=\.", "--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"} || "@INTLTOOL_MSGMERGE@"; my ($lang, $outfile) = @_; 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"} || "@INTLTOOL_MSGFMT@"; $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); } sub Console_Write_CoverageReport { my $MSGFMT = $ENV{"MSGFMT"} || "@INTLTOOL_MSGFMT@"; &GatherPOFiles; foreach my $lang (@languages) { print "$lang: "; &POFile_Update ($lang, ""); } print "\n\n * Current translation support in $MODULE \n\n"; foreach my $lang (@languages) { print "$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 "../configure.ac") { $conf_in = "../configure.ac"; } elsif (-f "../configure.in") { $conf_in = "../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; } $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; } gnome-gmail-notifier-0.10.1/Makefile.in0000644000175000017520000005041611357667340014614 00000000000000# Makefile.in generated by automake 1.10.2 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@ pkgdatadir = $(datadir)/@PACKAGE@ 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 = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \ ChangeLog INSTALL NEWS THANKS depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/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 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 ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ 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@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_REQUIRED = @GCONF_REQUIRED@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GGN_CFLAGS = @GGN_CFLAGS@ GGN_LIBS = @GGN_LIBS@ GGN_LOCALEDIR = @GGN_LOCALEDIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_REQUIRED = @GLIB_REQUIRED@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOME_KEYRING_REQUIRED = @GNOME_KEYRING_REQUIRED@ GREP = @GREP@ GSTREAMER_REQUIRED = @GSTREAMER_REQUIRED@ GST_INSPECT = @GST_INSPECT@ GTK_REQUIRED = @GTK_REQUIRED@ 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@ LDFLAGS = @LDFLAGS@ LIBNOTIFY_REQUIRED = @LIBNOTIFY_REQUIRED@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOUP_REQUIRED = @LIBSOUP_REQUIRED@ LIBXML2_REQUIRED = @LIBXML2_REQUIRED@ LTLIBOBJS = @LTLIBOBJS@ 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_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ 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@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src po data EXTRA_DIST = autogen.sh \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ LICENSE DISTCLEANFILES = intltool-extract \ intltool-merge \ intltool-update all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --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: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) # 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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(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) $(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) $(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) $(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 -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 installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." 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-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: 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: .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-lzma dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am fixme: grep -n -e fixme -e FIXME src/*.[ch] checksplat: grep '* ' -n src/*.[ch] | sed -e '/\/\*/d' -e '/ \* /d' # 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: gnome-gmail-notifier-0.10.1/AUTHORS0000644000175000017520000000032611357667301013607 00000000000000Authors of gnome-gmail-notifer. The following contributions warranted legal paper exchanges with the Free Software Foundation. Also see files ChangeLog and THANKS. (all) Bradley Worley AUTHORS ends here gnome-gmail-notifier-0.10.1/THANKS0000644000175000017520000000134111357667301013450 00000000000000Contributors to gnome-gmail-notifier. gnome-gmail-notifier has originally been written by Bradley Worley. Many people further contributed to gnome-gmail-notifier by reporting problems, suggesting various improvements or submitting actual code. Here is a list of these people. Help me keep it complete and exempt of errors. Andrea Reale andrea.reale@mentalsmash.org Dan Winship danw@gnome.org Jared Hendry buchan@gmail.com Kurt Kraut development@kurtkraut.net Misha Wolfson mywolfson@gmail.com Nick Moore shiny.nickel@gmail.com Ryan Coleman smiley2billion@gmail.com Senno During senno.during@gmail.com Stephen Eisenhauer bhs2007@gmail.com THANKS ends here gnome-gmail-notifier-0.10.1/NEWS0000644000175000017520000000676711357667301013255 00000000000000NEWS -- history of user-visible changes. Copyright (C) 2007 Brad Worley. See the end for copying conditions. Please send gmail-notifier bug reports to geekysuavo@gmail.com. Version 0.10.1 * COMPLETELY REWRITTEN! :) too many bugfixes and feature additions to even start mentioning here. Version 0.9.4 * small aesthetic fixes to the source code. * added a GtkFileChooserButton to the preferences window for a better sound chooser interface. Version 0.9.3 * fixed brokenness in 0.9.2 by moving sound functions from gnome-sound to gstreamer and moving passwords from gnutls/gcrypt to gnome-keyring. Version 0.9.2 * BROKEN!!! don't use this version. :) Version 0.9.1 * various fixes and such. i can't remember what. :) Version 0.9.0 * fixed accounts array in the GgnManager, and fixed proxy settings to use system-wide GNOME settings, as well as many other cleanups and bugfixes for 0.9.0. Version 0.9.0 * overhauled entirety of codebase to gobject-style. * this isn't really stable yet. use subversion until the next tarball is released. Version 0.8.4 * added better feed_download code so connections wouldn't pile up. (thanks Yuval!) * ubuntu edgy eft deb creation support added. Version 0.8.3 * fedora core 6 rpm creation support added. Version 0.8.2 * sound chooser opens in a better place now. * slackware 11.0 tgz creation support added. Version 0.8.1 * added audio playback support for notifications. * totally rewrote the preferences dialog... snazzy! * fixed nondescript bug in xml preferences file. Version 0.8.0 * fixed interval bug... again. Version 0.7.1 * fixed interval buildup bug. Version 0.7.0 * the changes from 0.6.2 are back, because the bug was deeper, and is now fixed. Version 0.6.3 * changes from 0.6.2 broke the app severely, so they were removed. Version 0.6.2 * fixed startup random bubble location. i know it was probably due to a bug in libnotify or other library, but it's fixed downstream now too. Version 0.6.1 * fixed pixmap "filename != NULL" errors when installed with prefix other than /usr. Version 0.6.0 * added timestamp features and such to such.... nothing. Version 0.5.4 * application checks for invalid xml tag errors returned by the parser and re-runs the mail check loop. Version 0.5.3 * application checks for invalid utf-8 errors returned by the parser and re-runs the mail check loop. Version 0.5.2 * notification bubble initialization changed to increase back- version compat with libnotify. Version 0.5.1 * minor fixes and gtk modifications. Version 0.5.0 * testbeds have been implemented in the main source tree now. * libcurl replaced by libsoup in feed downloader code. Version 0.4.0 * project is underway! * version is at 0.4.0 because this is an overhaul of the older gmail notifier for gnome. the older project was riddled with bugs right and left, so it was rewritten from scratch. ---------------------------------------------------------------------- Copyright information: Copyright (C) 2007 Brad Worley. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. Local variables: version-control: never mode: indented-text end: gnome-gmail-notifier-0.10.1/intltool-extract.in0000644000175000017520000005500611357667334016416 00000000000000#!@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.35.5"; ## 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" -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"; } 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_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"; } } } } gnome-gmail-notifier-0.10.1/data/0000777000175000017520000000000011357667402013535 500000000000000gnome-gmail-notifier-0.10.1/data/ggn-about.xml.in0000644000175000017520000004660311357667300016471 00000000000000 ggn-normal-lg.svg GDK_WINDOW_TYPE_HINT_NORMAL GTK_WIN_POS_CENTER @VERSION@ Copyright © 2010 Bradley Worley A Gmail Inbox Monitor for the GNOME2 desktop http://notifier.geekysuavo.org/ http://notifier.geekysuavo.org/ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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 St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. Bradley Worley <geekysuavo@gmail.com> translator-credits ggn-new-lg.svg False GTK_PACK_END gnome-gmail-notifier-0.10.1/data/ggn-error-lg.svg0000644000175000017520000007531311357667300016502 00000000000000 image/svg+xml Mail Emblem 2005-02-19 Lapo Calamandrei Mail emblem Jakub Steiner Andreas Nilsson mail message e-mail Lapo Calamandrei, Andreas Nilsson, Novell Inc. gnome-gmail-notifier-0.10.1/data/ggn-error-sm.svg0000644000175000017520000002633011357667300016512 00000000000000 image/svg+xml Emblem Urgent Jakub Steiner Andreas Nilsson gnome-gmail-notifier-0.10.1/data/ggn-write.svg0000644000175000017520000007450411357667300016104 00000000000000 image/svg+xml Lapo Calamandrei gnome-gmail-notifier-0.10.1/data/gnome-gmail-notifier.svg0000644000175000017520000005012211357667300020200 00000000000000 image/svg+xml Mail Emblem 2005-02-19 Lapo Calamandrei Mail emblem Jakub Steiner Andreas Nilsson mail message e-mail Lapo Calamandrei, Andreas Nilsson, Novell Inc. gnome-gmail-notifier-0.10.1/data/gnome-gmail-notifier.xml0000644000175000017520000000074611357667300020210 00000000000000 Gmail Notifier Notificador de correo Gmail gnome-gmail-notifier gnome-gmail-notifier %s gnome-gmail-notifier false gnome-gmail-notifier-0.10.1/data/ggn-new-sm.svg0000644000175000017520000002235611357667300016156 00000000000000 image/svg+xml Emblem Urgent Jakub Steiner Andreas Nilsson generic gnome-gmail-notifier-0.10.1/data/ggn-normal-sm.svg0000644000175000017520000002642611357667300016657 00000000000000 image/svg+xml Lapo Calamandrei Read-only emblem read-only no-read locked lock gnome-gmail-notifier-0.10.1/data/ggn-edit.xml.in0000644000175000017520000002611711357667300016302 00000000000000 Edit Account False GTK_WIN_POS_CENTER_ON_PARENT 460 ggn-normal-lg.svg True 4 True 2 0 GTK_SHADOW_NONE True 4 12 True 4 True Name: False False True True 1 True <b>Description</b> True True 2 0 GTK_SHADOW_NONE True 4 12 True 4 3 2 4 4 True True False 1 2 2 3 True True 1 2 1 2 True True 1 2 True Password: 2 3 True Domain: 1 2 True Username: True <b>Gmail Login</b> True 1 True 2 0 GTK_SHADOW_NONE True 4 12 True True Use this account to compose messages True True <b>Composition</b> True 2 True 4 4 True True gtk-cancel True False False 1 True True gtk-ok True False False GTK_PACK_END 2 False False 3 gnome-gmail-notifier-0.10.1/data/ggn-menu.xml.in0000644000175000017520000000360411357667300016315 00000000000000 gtk-connect itemCheck _Check Mail gtk-preferences itemPrefs gtk-about itemAbout gtk-quit itemQuit _Quit gnome-gmail-notifier-0.10.1/data/Makefile.in0000644000175000017520000004017411357667340015525 00000000000000# Makefile.in generated by automake 1.10.2 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@ pkgdatadir = $(datadir)/@PACKAGE@ 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 = : subdir = data DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/ggn-about.xml.in $(srcdir)/ggn-edit.xml.in \ $(srcdir)/ggn-menu.xml.in $(srcdir)/ggn-prefs.xml.in \ $(srcdir)/gnome-gmail-notifier.desktop.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = gnome-gmail-notifier.desktop ggn-about.xml \ ggn-prefs.xml ggn-edit.xml ggn-menu.xml SOURCES = DIST_SOURCES = 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)$(defaultdir)" "$(DESTDIR)$(desktopdir)" \ "$(DESTDIR)$(iconsdir)" "$(DESTDIR)$(pixmapsdir)" \ "$(DESTDIR)$(pkgdatadir)" defaultDATA_INSTALL = $(INSTALL_DATA) desktopDATA_INSTALL = $(INSTALL_DATA) iconsDATA_INSTALL = $(INSTALL_DATA) pixmapsDATA_INSTALL = $(INSTALL_DATA) pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(default_DATA) $(desktop_DATA) $(icons_DATA) $(pixmaps_DATA) \ $(pkgdata_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ AMTAR = @AMTAR@ 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@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCONF_REQUIRED = @GCONF_REQUIRED@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GGN_CFLAGS = @GGN_CFLAGS@ GGN_LIBS = @GGN_LIBS@ GGN_LOCALEDIR = @GGN_LOCALEDIR@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_REQUIRED = @GLIB_REQUIRED@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GNOME_KEYRING_REQUIRED = @GNOME_KEYRING_REQUIRED@ GREP = @GREP@ GSTREAMER_REQUIRED = @GSTREAMER_REQUIRED@ GST_INSPECT = @GST_INSPECT@ GTK_REQUIRED = @GTK_REQUIRED@ 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@ LDFLAGS = @LDFLAGS@ LIBNOTIFY_REQUIRED = @LIBNOTIFY_REQUIRED@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSOUP_REQUIRED = @LIBSOUP_REQUIRED@ LIBXML2_REQUIRED = @LIBXML2_REQUIRED@ LTLIBOBJS = @LTLIBOBJS@ 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_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ 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@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ defaultdir = $(datadir)/gnome-control-center/default-apps default_DATA = gnome-gmail-notifier.xml desktopdir = $(datadir)/applications desktop_in_files = gnome-gmail-notifier.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) pkgdata_in_files = ggn-about.xml.in \ ggn-prefs.xml.in \ ggn-edit.xml.in \ ggn-menu.xml.in pkgdata_DATA = $(pkgdata_in_files:.xml.in=.xml) pixmapsdir = $(pkgdatadir) pixmaps_DATA = ggn-new-lg.svg \ ggn-new-sm.svg \ ggn-error-lg.svg \ ggn-error-sm.svg \ ggn-normal-lg.svg \ ggn-normal-sm.svg \ ggn-wait.svg \ ggn-warn.svg \ ggn-write.svg iconsdir = $(datadir)/pixmaps icons_DATA = gnome-gmail-notifier.svg EXTRA_DIST = $(default_DATA) \ $(desktop_in_files) \ $(pkgdata_in_files) \ $(pixmaps_DATA) \ $(icons_DATA) CLEANFILES = $(desktop_DATA) \ $(pkgdata_DATA) DISTCLEANFILES = $(desktop_DATA) \ $(pkgdata_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu data/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh gnome-gmail-notifier.desktop: $(top_builddir)/config.status $(srcdir)/gnome-gmail-notifier.desktop.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ggn-about.xml: $(top_builddir)/config.status $(srcdir)/ggn-about.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ggn-prefs.xml: $(top_builddir)/config.status $(srcdir)/ggn-prefs.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ggn-edit.xml: $(top_builddir)/config.status $(srcdir)/ggn-edit.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ggn-menu.xml: $(top_builddir)/config.status $(srcdir)/ggn-menu.xml.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-defaultDATA: $(default_DATA) @$(NORMAL_INSTALL) test -z "$(defaultdir)" || $(MKDIR_P) "$(DESTDIR)$(defaultdir)" @list='$(default_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(defaultDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(defaultdir)/$$f'"; \ $(defaultDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(defaultdir)/$$f"; \ done uninstall-defaultDATA: @$(NORMAL_UNINSTALL) @list='$(default_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(defaultdir)/$$f'"; \ rm -f "$(DESTDIR)$(defaultdir)/$$f"; \ done install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(desktopDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(desktopdir)/$$f'"; \ $(desktopDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(desktopdir)/$$f"; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(desktopdir)/$$f'"; \ rm -f "$(DESTDIR)$(desktopdir)/$$f"; \ done install-iconsDATA: $(icons_DATA) @$(NORMAL_INSTALL) test -z "$(iconsdir)" || $(MKDIR_P) "$(DESTDIR)$(iconsdir)" @list='$(icons_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(iconsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(iconsdir)/$$f'"; \ $(iconsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(iconsdir)/$$f"; \ done uninstall-iconsDATA: @$(NORMAL_UNINSTALL) @list='$(icons_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(iconsdir)/$$f'"; \ rm -f "$(DESTDIR)$(iconsdir)/$$f"; \ done install-pixmapsDATA: $(pixmaps_DATA) @$(NORMAL_INSTALL) test -z "$(pixmapsdir)" || $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)" @list='$(pixmaps_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapsdir)/$$f'"; \ $(pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapsdir)/$$f"; \ done uninstall-pixmapsDATA: @$(NORMAL_UNINSTALL) @list='$(pixmaps_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pixmapsdir)/$$f'"; \ rm -f "$(DESTDIR)$(pixmapsdir)/$$f"; \ done install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: 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 $(DATA) installdirs: for dir in "$(DESTDIR)$(defaultdir)" "$(DESTDIR)$(desktopdir)" "$(DESTDIR)$(iconsdir)" "$(DESTDIR)$(pixmapsdir)" "$(DESTDIR)$(pkgdatadir)"; 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-defaultDATA install-desktopDATA \ install-iconsDATA install-pixmapsDATA install-pkgdataDATA install-dvi: install-dvi-am 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 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-defaultDATA uninstall-desktopDATA \ uninstall-iconsDATA uninstall-pixmapsDATA \ uninstall-pkgdataDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-defaultDATA install-desktopDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-iconsDATA install-info install-info-am \ install-man install-pdf install-pdf-am install-pixmapsDATA \ install-pkgdataDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-defaultDATA \ uninstall-desktopDATA uninstall-iconsDATA \ uninstall-pixmapsDATA uninstall-pkgdataDATA # 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: gnome-gmail-notifier-0.10.1/data/ggn-normal-lg.svg0000644000175000017520000005012211357667300016630 00000000000000 image/svg+xml Mail Emblem 2005-02-19 Lapo Calamandrei Mail emblem Jakub Steiner Andreas Nilsson mail message e-mail Lapo Calamandrei, Andreas Nilsson, Novell Inc. gnome-gmail-notifier-0.10.1/data/ggn-prefs.xml.in0000644000175000017520000004226411357667300016475 00000000000000 60 1 0 1 0 10 4 Gmail Notifier Preferences False GTK_WIN_POS_CENTER ggn-normal-lg.svg True 6 True 0 GTK_SHADOW_NONE True 12 True 4 True 2 True True GTK_POLICY_NEVER GTK_POLICY_AUTOMATIC GTK_SHADOW_IN True True False False True 2 2 True True gtk-add True False False True True gtk-remove True False False 1 True True gtk-edit True False False 2 False 1 True <b>Gmail Accounts</b> True True 0 GTK_SHADOW_NONE True 12 True 4 True 0 Check with Gmail for messages every: False False True True adjustment1 0 GTK_POS_BOTTOM 1 True <b>Inbox Updates</b> True 1 True 0 GTK_SHADOW_NONE True 12 True 4 True True Display notifications for new messsages True True True False False True True Display notifications for inbox errors True True False False 1 True <b>Visual Notifications</b> True 2 True 0 GTK_SHADOW_NONE True 12 True 4 True True Play a sound upon receipt of new mail True True True False False True 4 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Select A Sound File True True gtk-media-play True False False 1 1 True <b>Audio Notifications</b> True 3 True 2 True True gtk-close True False False GTK_PACK_END 1 False 4 gnome-gmail-notifier-0.10.1/data/ggn-wait.svg0000644000175000017520000007225311357667300015715 00000000000000 image/svg+xml Mail Emblem 2005-02-19 Lapo Calamandrei Mail emblem Jakub Steiner Andreas Nilsson mail message e-mail Lapo Calamandrei, Andreas Nilsson, Novell Inc. gnome-gmail-notifier-0.10.1/data/Makefile.am0000644000175000017520000000213711357667300015505 00000000000000 defaultdir = $(datadir)/gnome-control-center/default-apps default_DATA = gnome-gmail-notifier.xml desktopdir = $(datadir)/applications desktop_in_files = gnome-gmail-notifier.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) pkgdata_in_files = ggn-about.xml.in \ ggn-prefs.xml.in \ ggn-edit.xml.in \ ggn-menu.xml.in pkgdata_DATA = $(pkgdata_in_files:.xml.in=.xml) pixmapsdir = $(pkgdatadir) pixmaps_DATA = ggn-new-lg.svg \ ggn-new-sm.svg \ ggn-error-lg.svg \ ggn-error-sm.svg \ ggn-normal-lg.svg \ ggn-normal-sm.svg \ ggn-wait.svg \ ggn-warn.svg \ ggn-write.svg iconsdir = $(datadir)/pixmaps icons_DATA = gnome-gmail-notifier.svg EXTRA_DIST = $(default_DATA) \ $(desktop_in_files) \ $(pkgdata_in_files) \ $(pixmaps_DATA) \ $(icons_DATA) CLEANFILES = $(desktop_DATA) \ $(pkgdata_DATA) DISTCLEANFILES = $(desktop_DATA) \ $(pkgdata_DATA) gnome-gmail-notifier-0.10.1/data/gnome-gmail-notifier.desktop.in0000644000175000017520000000060611357667300021461 00000000000000[Desktop Entry] Name=Gmail Notifier Name[en_CA]=Gmail Notifier Name[en_GB]=Gmail Notifier Name[en_US]=Gmail Notifier Comment=Gmail Inbox Monitor Comment[en_CA]=Gmail Inbox Monitor Comment[en_GB]=Gmail Inbox Monitor Comment[en_US]=Gmail Inbox Monitor Icon=gnome-gmail-notifier Exec=gnome-gmail-notifier Terminal=false StartupNotify=false Type=Application Categories=Network;GNOME;GTK;Email; gnome-gmail-notifier-0.10.1/data/ggn-warn.svg0000644000175000017520000007042711357667300015721 00000000000000 image/svg+xml Mail Emblem 2005-02-19 Lapo Calamandrei Mail emblem Jakub Steiner Andreas Nilsson mail message e-mail Lapo Calamandrei, Andreas Nilsson, Novell Inc. gnome-gmail-notifier-0.10.1/data/ggn-new-lg.svg0000644000175000017520000007221011357667300016133 00000000000000 image/svg+xml Mail Emblem 2005-02-19 Lapo Calamandrei Mail emblem Jakub Steiner Andreas Nilsson mail message e-mail Lapo Calamandrei, Andreas Nilsson, Novell Inc. gnome-gmail-notifier-0.10.1/README0000644000175000017520000000344711357667301013426 00000000000000The GNOME Gmail Notifier is a project designed to provide a simple, easy- to-use application that monitors users' gmail inbox(es), and to deliver the appropriate notifications when new mail exists. In order to use the GNOME Gmail Notifier, you'll need the following prerequesite packages, whether compiled from source or not: * GLib 2.6.0 * GTK+ 2.12.0 * GConf 2.20.0 * Libxml2 2.6.20 * Libsoup 2.6.0 * Libnotify 0.4.2 * GStreamer 0.10.0 * Gnome Keyring 0.4.2 When compiling from subversion, please use './autogen.sh --prefix=/usr', 'make', and 'sudo make install' to install from source. Users installing from source tarballs may replace the 'autogen.sh' with 'configure' in the above commands to perform the same tasks. This project codebase has sustained three successive rewrites, and each has introduced numerous, massive improvements into the project. The current codebase is written using GLib and GObject, and utilizes the GLib multithreading capability to monitor multiple user accounts. Recent improvements have yielded support for proxy-based connections and faster, more reliable mail checking routines, as well as a more sturdy graphical user interface. Finally, the last rewrite nailed down the complete internal functionality of the notifier in the most logical way possible, ensuring that stability and ease of modification are the top priority. In short, the project is quite mature. Please email me with questions at , or post issues at . Anyone wanting to contribute ideas, code, or translations may email me directly. The latest subversion copy is (currently) located at google code, and the latest tarballs are hosted at . thanks for reading. enjoy the notifier. ~ brad. gnome-gmail-notifier-0.10.1/Makefile.am0000644000175000017520000000061111357667301014570 00000000000000SUBDIRS = src po data EXTRA_DIST = autogen.sh \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ LICENSE DISTCLEANFILES = intltool-extract \ intltool-merge \ intltool-update fixme: grep -n -e fixme -e FIXME src/*.[ch] checksplat: grep '* ' -n src/*.[ch] | sed -e '/\/\*/d' -e '/ \* /d' gnome-gmail-notifier-0.10.1/aclocal.m40000644000175000017520000017053411357667336014420 00000000000000# generated automatically by aclocal 1.10.2 -*- 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(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, [m4_warning([this file was generated for autoconf 2.63. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 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 40 IT_PROG_INTLTOOL AC_DEFUN([IT_PROG_INTLTOOL], [ AC_PREREQ([2.50])dnl AC_REQUIRE([AM_NLS])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=`intltool-update --version | head -1 | cut -d" " -f3` [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` ] 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 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) 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) AC_PATH_PROG(GMSGFMT, gmsgfmt, $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 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]) ]) # 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], [ if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" ]; then AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) fi 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" ] [sed '/^POTFILES =/,/[^\\]$/ { /^POTFILES =/!d r $1/POTFILES } ' "$1/Makefile.in" >"$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], ...) # nls.m4 serial 3 (gettext-0.15) dnl Copyright (C) 1995-2003, 2005-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-2003. AC_PREREQ(2.50) AC_DEFUN([AM_NLS], [ AC_MSG_CHECKING([whether NLS is requested]) dnl Default is enabled NLS AC_ARG_ENABLE(nls, [ --disable-nls do not use Native Language Support], USE_NLS=$enableval, USE_NLS=yes) AC_MSG_RESULT($USE_NLS) AC_SUBST(USE_NLS) ]) # 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, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.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.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # 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, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 4 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [# Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008 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])]) # 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, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # 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