From: Dana Jansens Date: Thu, 11 Apr 2002 03:20:38 +0000 (+0000) Subject: Initial revision X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=dfc5f034581f5a26cba5c4811500438f89f0634a;p=chaz%2Fopenbox Initial revision --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 00000000..c72e75ae --- /dev/null +++ b/AUTHORS @@ -0,0 +1,81 @@ +Openbox authors/contributors: + +Project Maintainer: + Ben Jansens (ben@orodu.net) + +Developers: + Ben Jansens (ben@orodu.net) + Scott Moynes (smoynes@nexus.carleton.ca) + +Webmaster: + Please apply :) + +-==============================================================================- + +Openbox was previously known as Blackbox. Here are the authors/contributors +from that era: + +Previous Maintainer: + Sean 'Shaleh' Perry + +Previous Contributors: + Ben 'xOr' Jansens + - metric tons of code patches + John Kennis + - bbpager, ideas, and support + Jason 'vanRijn' Kasper + - bbkeys, ideas, support + Chris Mecca + - use of his irix machine for testing + Wilbert Berendsen + - man pages and dutch nls file + Luca Marrazzo + - italian nls files + Ales Kosir + - Slovenian man pages and nls + SATO Satoru + - Japanese nls and man pages + Jan Schaumann + - German nls support + Wang Tiejun + - Chinese nls support + Jeffrey Sean Connell + - debugger class code (ommited from sources) + Frank Belew + - dgradient code + Scott Garner + - suggestions, bug reports and beta testing (*the* beta moron) + David Doan + - testing of 8bpp code + Mark Seward + - beta testing, bug reports and 32bpp testing + Keith Bolland + - beta testing, bug reports and suggestions + James Spooner + - beta testing, bug reports + Fred Knieper + - beta testing, bug reports + Steve Udell + - beta testing, bug reports, questions (very good ones) + Gregory Barlow + - bug reports and patches/suggestions (original middle click advocate) + Dyon Balding + - patch for Smart(er)Placement window placement + Mike Cole + - co-author/hacker of Image.cc (local LUG buddy) + John Kennis + - author of bbtools/beta testing/bug reports + Wilbert Berendsen + - author of blackbox/bsetroot manpages + +Second Author: + Jeff Raven + +Original Author: + Brad Hughes + +(Brad's original message): +I would also like to thank the creators of WindowMaker. Reading the existing +code has helped me immensely, and the BImage class follows the RImage data type +very closely (the 8bpp code and dithering code was based off of WindowMaker's +wrlib). diff --git a/BUGS b/BUGS new file mode 100644 index 00000000..48032b48 --- /dev/null +++ b/BUGS @@ -0,0 +1,2 @@ +* last focusd window is not updated when the window is closed while the focus + is on another workspace. This eventually can lead to a segfault. diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 00000000..338776d9 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,60 @@ +Changelog for Openbox: + +0.99.0: + * renamed header files from *.hh to *.h. (Ben Jansens) + + * fix clipping of the date/time in the toolbar with + proportional fonts. (Sean Perry, Ben Jansens) + + * added a --enable-clobber configuration option to + allow users to run off the event clobbering taking + place so that Openbox wont grab mouse events when + num lock or scroll lock are on. (Scott Moynes) + + * window menu is inconsistant in that other menus + ignore mouse button 2, but it did not, because of + the maximize option. Now all options in the window + menu ignore mouse button 2 to be consistant. (Scott Moynes) + + * changed the default configuration file from + ~/.blackboxrc to ~/.openbox/rc. (Ben Jansens) + + * ignore fully-maximized windows when smart + placing windows. (Ben Jansens) + + * windows snaps to both sides of the screen's edge, + i.e. they have double the snapping area, half + inside and half outside the visible screen. (Ben Jansens) + + * a rootCommand per-screen in the rc file which + will override the rootCommand in styles for that + screen. (Ben Jansens) + + * rolling the mouse wheel on a window's title bar + will shade/unshade the window. rolling the mouse + wheel on the root window will change workspaces (John Kennis, Ben Jansens) + + * new button press/release code in Window class, + gives window buttons more consistent behavior. (Ben Jansens) + + * custom ordering of windows' titlebar elements + with a titlebarLayout option added to the + rc file (MrFab, Ben Jansens) + + * when resizing a window in non-opaque mode, fixed + the drawn rectangle so that it is drawn entirely + within the bounds of the new window. it used to + be drawn in the area of the window + 1. (Ben Jansens) + + * changed the background of the toolbar's workspace + label when it is being edited. The text color + being used was that of the active window label, + but the background remained that of the toolbar. + Changed to use the background of the active + window label. (Ben Jansens) + + * added windowZones to the rc file specifying + the number of zones to divide a window into for + alt-drag resizing, and code to resize windows + with the number of zones specified. (Nicolas Delon, Ben Jansens) + diff --git a/ChangeLog-Blackbox b/ChangeLog-Blackbox new file mode 100644 index 00000000..25427e23 --- /dev/null +++ b/ChangeLog-Blackbox @@ -0,0 +1,1269 @@ +ChangeLog from Blackbox (this code's previous project): + +Changes from 0.62.0 to 0.62.1: + - the lock modifier code handles user redefined modifiers better + - check if the locale actually needs multibyte support before using multibyte + functions + - use srcdir in all of the makefiles + - added zh_CN (Chinese) nls support + + +Changes from 0.61.1 to 0.62.0: + - the immorel release + - added the ja_JP nls directory and man pages + - general code touchups + - blackbox-nls.hh is always generated even if --disable-nls is used. + This allows us to not have all of those hideous #ifdef NLS chunks. + Nothing to worry about, if you do not want NLS this does not affect you + - Workspace::placeWindow() cleanups. Also a speed bump from reducing the + use of iterator->current() and changing the delta from 1 to 8 + - cleanups to compile with g++ 3.0 + - make distclean actually removes Translation.m and blackbox-nls.hh. + Also fixed Makefile.am to pass --foreign instead of --gnu when calling + the autotools. + - fixed a desciptor leak in BScreen::parseMenuFile, seems opendir + lacked a matching closedir. + - fix transient window handling code in Workspace::removeWindow() so + transients give focus back to their parents properly. The code originally + handled sloppy focus then transient windows, so we just flopped the + if/elsif. This is immediately noticable with web browsers and their open + location windows. + - plugged a small leak in ~Toolbar + - fixed list::insert so you really can insert at item number 2. While there + I cleaned up the code a bit. + - added decoration to the atom state stored in a window + - fixed a typo in bsetroot.cc: 'on of' -> 'one of'. + - fixed the window menu gets left open when another window button is pressed + issue with a call to windowmenu->hide() in window->maximize() + - applied xOr's patch for decoration handling + - applied xOr's patch for the maximize, shade, unmaximize bug + - applied Kennis' patch for sending incorrect Slit configure notices + - BlackboxWindow's flags have been moved into a flags structure + - applied xOr's patch for border handling + - resizing a window turns off its maximized flag. Before a resized window + thought it was still maximized and maximizing a double action + - BlackboxWindow::withdraw no longet sets the state to Withdrawn. + This confused some X clients. + - updated the manpages and added Dutch NLS support (thanks Wilbert) + - added it_IT nls files, thanks Luca Marrazzo + - the menu file mentioned in the manpage is now based on DEFAULT_MENU + - configure script found basename in -lgen, but did not set HAVE_BASENAME + causing compilation problems on irix and possibly others. Added a call + to AC_DEFINE in AC_CHECK_LIB to fix this. + - menu is no longer installed, you need to copy it yourself + - cleaned up i18n code a little. Several member functions were declared + but never used and getMessage() had a default argument which was also + never used. + - i18n will now compile cleanly on machines without nl_types.h + - the lock modifiers no longer stop blackbox! + - maximize a window via bbkeys and the maximize button is not redrawn, fixed + - now exit with an error code if an unknown option is passed + - autoraise and multiple dialog windows yields segv bug fixed + also lengthened the default auto raise delay from 250 to 400 + - another iteration of autoraise and dialog box handling, this time we + noticed that nothing ever reset blackbox.focused_window to 0 when a window + was removed + - check if the window is visible before changeBlackboxHints() calls maximize + - placeWindow no longer takes edgeSnapThreshhold into account + - ignore style files ending in ~ + - support locale specifiers with @euro in them + - added Slovenian man pages and nls, thanks Ales Kosir + - Toolbar name editing buffer reduced to 128 chars, logic added to make sure + this buffer is not overrun + - added German nls files, thanks Jan Schaumann + - added my name to the code, updated the version output + + +Changes from 0.61.0 to 0.61.1: + - fixed some of the code to explicitly use colormaps so that when + blackbox decides to use a non-default visual everything will + still work (although it may look darn ugly) + - optimizations to the deiconify/raising code to (hopefully) deal + with a rather nasty bug, plus make things a little more efficient + - changed the code so that the close button is always redrawn on + button release events, just in case the client decides not to + close in response to the message (see Acroread) + - tinkered with the Makefiles again to make sure Blackbox + completely cleans up after itself during an uninstall + - fixed a glitch in window placement that was making Blackbox + place some larger windows at coordinates near 2**31 + - merged in a patch from nyz which fixed a bug with not sending + configure events when a window is both moved and resized (eg + when the left resize grip is used) as well as optimized some + of the show/hide code to use the stacking order + - fixed a bug in blackbox's support of the X shape extension... + it wasn't correctly resetting the bounding region after a window + was resized + - fixed a glitch with the geometry window where it would persist + if the client was unmapped while in motion + - tweaked the code for decorating transient windows so that it + is possible to use MOD1+Mouse3 to resize transients as long as + there is not some other reason to disable functions.resize + + +Changes from 0.60.3 to 0.61.0: + - added slightly updated copies of the blackbox/bsetroot manpages. + - reworked the Windowmenu code so that using the second mouse + button on the Send To menu moves you along with the window + - merged in bsd-snprintf.(h|c) from openssh so that Blackbox can + compile on older boxes without (v)snprintf in their standard lib. + - fixed a pair of problems where blackbox was not returning icons + and slit apps to a useable state at shutdown + - fixed a problem with menus not getting layered correctly after + a reconfigure or menu reload + - changed the behavior of the various MOD1+ButtonPresses on windows... + they should now be more consistent with the button behavior on the + decorations : + . MOD1+Button1 raises and moves the window (unchanged) + . MOD1+Button2 lowers the window (used to resize the window) + . MOD1+Button3 resizes the window (new button combo) + - fixed a small but _extremely_ annoying bug exposed by cvsup + - styled frames are now a thing of the past... the textures formerly + known as window.frame.(un)focus have been replaced by solid colors + window.frame.(un)focusColor... the thickness of the frame is now + determined by frameWidth, which will default to bevelWidth if not + specified + - middle clicking on a window in a workspace's window list now moves + the window to the current workspace + - fixed a minor glitch with the appearance of window labels for + certain newly-started apps (i.e. rxvt) + - added a new configure option for both the toolbar and the slit -- + autohide. Hopefully this should help quell the demands for the + removal of the toolbar... + - added code to better handle apps that change the window focus + - changed the command execution code (used to handle rootCommands + and executable menu items) to be more robust... compound commands + should now work + - a new-and-slightly-improved implementation of unstyled frames should + mean slightly better performance than previously + - fixed a couple of stupid bugs in the new code for handling + Solid Flat textures more efficiently + - fixed the nls makefiles so that they respect DESTDIR, behave better + if you reinstall over an existing installation, and actually remove + their files on a make uninstall + - added cthulhain's bsetbg script to the util directory... see the + file README.bsetbg for more information + - added Estonian, French and Danish translations + + +Changes from 0.60.2 to 0.60.3: + - put in a (temporary?) fix for a bug with the new way icons are + handled. Previously an icon was created only for non-transient + windows, which means that 1) minimized transient windows were + not getting cleaned up at shutdown, and that 2) one could + conceivably lose access to a minimized transient if there were + a break in the transient chain. + + For the time being, every iconified window gets an icon. In + order to make this a little nicer, if a window doesn't provide + an icon title, the window title is used in the icon menu, rather + than 'Unnamed'. + - fixed a bug in handling the destruction of intermediate + transient windows. The code was leaving the transient of a + destroyed window with a reference to the now non-existent + window. This can lead to all sorts of problems. + - fixed a slight positioning error when the slit is on the right + side of the screen + - included a new style, Minimal, which is designed for use on 8-bit + displays. It tries to use a bare minimum of colors, and with the + new code regarding Flat Solid, should consume very little memory. + - made yet another alteration to the way focus changes after a window + closes under ClickToFocus. Blackbox now tracks the stacking order of + all windows and uses this information to give the focus to the topmost + window. + - new configure option : + --enable-styled-frames include support for fully-styled window + frames -- these are the decorations which + are affected by the window.frame* theme + entries. This option is turned on by + default. + + Because of the way they are implemented, + these are typically the most memory and + render intensive of the various blackbox + decorations, even if they are typically + only a pixel or so wide. Disabling this + feature can result in a substantial + decrease in X memory usage, but it's + enabled by default to remain compatible + with previous versions. + + - added a whole mess of logic so that blackbox will use + XSetWindowBackground for Flat Solid textures instead generating + a pixmap (which would be subsequently cached)... should help cut + down some on the X memory usage + - altered the behavior of the BImageControl timer... now it will + fire every cacheLife minutes, regardless of when anything has + been removed from the cache + - modified the NLS build code yet again... at this point we've + hopefully hit the least common denominator and it should work + for everyone + - dealt with a possible problem in the BlackboxWindow constructor + where we referred to a member after deletion + - removed a last lingering bit of the allocate()/deallocate() code + - fixed a pair of string formatting problems + + +Changes from 0.60.1 to 0.60.2: + - updated README.bbtools, since bbpager and bbkeys were updated to work with + 0.60.x (also removed the .diffs from the source tree) + - fix for compiling with NLS support on Solaris + - added Turkish, Russian and Swedish translations + - applied patch for more correct Spanish translations + - added completed pt_BR (Brazillian Porteguese) translation + - removed mem.h and the allocate()/deallocate() calls throughout blackbox + these have been unused for a long time, and needed to go away :) + - compile fixes for --enable-debug + - changed the font loading/drawing code... XFontSets are only used if + the locale is set properly. So you can still compile with nls support, + but do not set your LANG environment variable, and your fonts will be + loaded and drawn the old way + - smarter Basemenu::drawItem() code added, i noticed alot of flicker when + moving menus, because of code constantly redrawing menus items... this + has been significatly modified and sped up quite a bit + - fixed a bug where iconified windows wouldn't remove themselves from the + icon menu when they unmapped/closed themselves (which would result in a + crash if you selected this dead item) + - fixed a potential crash in Workspace::removeWindow() that had relation + to focus last window on workspace... one person experience gibberish being + displayed, another experienced a crash + - fixed a flicker problem when changing focus between windows rapidly + (the toolbar's window label was getting redrawn twice per focus, not + optimum behavior) + - fixed the infamous bsetroot segfault... this was quite a feat... took 3 + people in excess of 8 hours to find... and it was a simple one line change + + +Changes from 0.51.3.1 to 0.60.1: (note: 0.60.1 is 0.60.0 non-alpha) + - changed licensing for Blackbox from GNU GPL to more open BSD license + see the file LICENSE + - removed alot of empty files that did nothing but passify automake/autoconf + Blackbox now passes --foreign to automake to lessen the requirements for + files like NEWS,AUTHORS,COPYING,README,etc. + - new configure options: + --enable-ordered-pseudo this enables a new algorithm for dithering + on pseudocolor (8 bit) displays... a noticable + pattern is visible when using this. you may or + may not like it... just something different + if you want it, but is turned off by default. + + --enable-debug turn on verbose debugging output... this + isn't very complete or really very helpful... + right now it just describes memory usage and + tracks a few X event handlers... this is turned + off by default + + --enable-nls turn on natural language support... this option + will turn on the use of catgets(3) to read + native language text from any of the supported + locales (see the nls/ directory for current + translations)... + + This option also turns on the use of XFontSets, + which allows the display of multibyte + characters, like Japanese or Korean. + This option is turned on by default. + + --enable-timed-cache turn on/off the new timed pixmap cache... this + differs from the old pixmap cache in that + instead of releasing unused pixmaps + immediately, it waits for minutes, where + is set with session.cacheLife in your + ~/.blackboxrc... this option is turned on + by default. + + - changed the default menu to include a listing of workspaces (and their + window lists) and the new configuration menu (see below) + - included new default styles, contributed by regulars on + irc.openproject.net's #blackbox + - generated default "translation" catalog for the C/POSIX locale... the + same catalog is used for English (en_US for now, will add others + as necessary) + - included translation for Spanish (es_ES) and Brazilian + Portuguese (pt_BR)... if you are interested in doing a + translation, email me at blackbox@alug.org + - properties and hints added for communication with bbpager and bbkeys, the + two most common "blackbox addons" + - KDE 1.x support has been completely removed, pending approval of the new + window manager specification to be used by KDE2 and GNOME + - a (broken!) base for the new window manager spec was put in place, but + using --enable-newspec will result in code that will not compile + - added a timer class to handle internal timeouts without using + getitimer/setitimer/SIGARLM... this will enable other things to be done, + as any number of timers with any timeout can be used + - Blackbox will search for the highest depth supported by each visual on + each screen... basically this means that blackbox will try to use + TrueColor if a TrueColor visual exists (but it's not the default visual) + - menu hilite changed from being just a color to being a texture and new + window decoration layout... as a result the style file syntax has changed, + old styles for 0.5x.x will not work. See the included styles for examples, + and browse by http://bb.themes.org/ + - added support for enabled/disabled and selectable menuitems, this is for + use in the configmenu mostly (but is used in the windowmenu) + - added the Configmenu, which is insertable into your menu by using: + + [config] (Catchy Label) + + changes made in the configmenu take effect immediately, and are saved in + your ~/.blackbxrc... current tunable settings: + + Focus model + Window placement + Image dithering + Opaque window moving + Full Maximization + Focus New Windows + Focus Last Window on Workspace + + the window placement and focus model options will be discussed below + - added texture type "ParentRelative" which causes the decoration to display + the contents of it's parent... this is a sort of pseudo-transparent option + and doesn't work for all decorations... see the included style named + "Operation" for an example of ParentRelative + - added support for solid interlacing... for example: + + toolbar: raised interlaced solid bevel1 + toolbar.color: grey + toolbar.colorTo: darkgrey + + will cause the toolbar base to be draw with solid lines, one line grey, + the next darkgrey, the next grey, the next darkgrey, ... + - changed dithering algorithm for TrueColor displays from Floyd-Steinberg to + an ordered dither... dithering at 8bpp (Pseudocolor) can be either FS or + ordered, but must be selected at compile time... + + NOTE: when using ordered pseudocolor (8bpp) dithering, your + session.colorsPerChannel ***MUST*** be 4, otherwise your display will + not display *any* correct colors + - fixed TrueColor rendering to do aligned writes (suppresses warnings on + Alpha Linux machines) + - added support for GrayScale/StaticGray displays (completely untested) + - made linked lists smarter, they can now have as many iterators assigned to + them as you want... no more FATAL errors + - added the Netizen class, which is a client that has + _BLACKBOX_STRUCTURE_MESSAGES listed in their WM_PROTOCOLS... these clients + get notified of window add, remove, focus, shade, iconify, maximize, + resize, etc. + + the two most common Netizens are bbpager and bbkeys + - when loading an incomplete style, blackbox now uses default colors to + draw decorations (instead of the annoying "see-through" effect) + - added menu tag [config]... which inserts the Configmenu into your rootmenu + - made [include] handling smarter, it will only read regular files (it + won't read a directory in case you ever accidentally put one there) + - the slit and toolbar menus now include a placement option, which will place + them in various positions on the screen + - included a slit menu option to choose it's direction (horizontal or + vertical) + - added options to the slit and toolbar menus to have them always stacked + above other windows + - right clicking on the workspace label no longer initiates a workspacename + edit... right clicking anywhere on the toolbar brings up the toolbar menu, + which has an entry that lets you change the workspace name + - iconified windows no longer show up in the window list for the current + workspace... just in the icon submenu + - ClickToFocus now works like one would think, clicking anywhere in a window + will focus it + - overall... this version of blackbox has and does alot more than previously + just take it for a test drive and see how well you like it + + +Changes from 0.50.5 to 0.51.0: + - new default theme, shows off new gradients (see below) + - many themes updated to show off new menu bullet configuration + - added new source file Display.cc... it offers an easy way to connect to + an X display and setup screen info, this was done to make life easier + for John Kennis, the author of the bbtools. Image.cc and Image.hh have + been modified to use classes from this abstraction, so that drop in + replacements are all that is necessary to update the bbtools image code. + - configurable menu bullet... 2 new resources for in your style file: + + menu.bulletStyle: (round|triangle|square|diamond|empty) + menu.bulletPosition: (left|right) + + - new style resource for setting the borderWidth on menus, client windows and + the buttons/frame/handle/titlebar... the default theme uses a borderWidth + of zero... it's pretty neat + - udpated Image code... blackbox now supports 8 types of gradients (thanks + to mosfet@kde.org... in exchange for helping him get the diagonal gradient + code from blackbox into kde, kde gave me the source to their new gradients) + the 8 gradients are: + + diagonal, vertical, horizontal, crossdiagonal, pipecross, elliptic, + pyramid, rectangle + + use them just like you would normally (ie. raised elliptic gradient bevel1) + - merged John Kennis' patch for notifying KDE modules of windows that are + raised/lowered/activated(focused) + - new geometry window that is displayed when a window is moved/resized + - cleaned up code for detecting slit apps + - window stacking code changed to keep menus above windows, and to keep the + slit raised when the toolbar is raised + - fixed compiler error from gcc 2.95 about frame.frame in several places + - fixed some bugs with shaped windows that set decorations via MWM hints, + and also fixed bugs with such windows changing their shape + - more complete ICCCM compliance, default window gravity is now NorthWest + instead of Static... + - focus code revamped... window focusing is alot faster and simpler, i + mimicked the way TWM does it's focusing... proved much faster + - the window menu always has "Kill Client" as an option now + - fixed window stacking for windows that have multiple transients (like + netscape) + - smartplacement from 0.50.4 has been reinstated... i quickly grew tired of + waiting on windows to be placed with the old version (if you like the way + 0.50.5 did it... send me an email and i'll consider making it an option) + - added some new signal handling code (using sigaction, if available on your + system)... + - fixed some bugs with KDE support... this makes bbpager behave properly + - workspace editing via the toolbar has been made a little nicer with the + new focus code... right clicking on the workspace label will put you into + edit mode, but no windows can be focused until you leave edit mode... + ALSO... the window that had focus when you entered edit mode will have the + focus returned to it after editing is finished + - added new option to blackbox... -rc will read instead + of .blackboxrc for it's base configuration + - the option for opaque window moves has been moved from the stylefile into + .blackboxrc... set the session.opaqueMove: resource to True or False, + depending on what you want + - general namespace cleanups... just stuff to make maintaining the code a + little easier... + - any form of "beta" has been removed from the version number for 0.51.x + i am declaring this series as "stable" so that i can begin a major overhaul + of blackbox, which will be done with John Kennis and Jason Kasper, two + very sharp guys that think the same way i do ;) + + +Changes from 0.50.4. to 0.50.5: + - modified and merged some patches from several contributors. added their + names to AUTHORS + - major documentation updates + - added a few more platform success reports. changed development platform + again :) + - added new texture option: Interlaced... it is an extension to the gradient + texture that looks really neat... it is compiled in by default but may + be removed with --disable-interlace + - let's see... where do i begin... the code for 0.51.x has been GREATLY + enhanced over 0.50.4 (and the stupid little compile error for KDE has been + fixed ;)) Blackbox has undergone major renovation... and i can proudly + say that this release is rock solid. Also, i reinstated ccmalloc's tour + of duty, and spent several days with it stomping memory leaks in blackbox. + i can proudly say that there are no major memory leaks present in 0.51.x + - the toolbar has changed it appearance a little bit... the menu button has + been removed and the labels and buttons are now symmetrically placed on the + toolbar... oh no!? how do you get to your icons/workspaces now? the + middle click patch from Greg Barlow has been modified, enhanced and merged + with 0.51.x... the workspace menu now behaves just like the root menu... + and it can be pinned to the root window (just move it) + - the image code has once again been worked over... this time a local LUG + friend and i have hashed it out many times and into the wee hours of the + morning... this stuff is FAST now... before i added interlacing... we + had doubled the speed of the dgradient function... yes... *doubled* + - the code to generate error tables, color tables and other tables that are + used in image dithering has been rewritten, which severs the last tie to + window maker's wrlib that blackbox had. i now understand why and how all + the code that i "borrowed" works... and it's been improved... because of + this change... dithering is a lot cleaner... and dithering on 8bpp displays + is less grainy and less obtrusive... + - the linked list code has also been rewritten... blackbox has been using + a doubly linked list, and not taking advantage of all the list's + capabilities (because it doesnt need them)... so the linked lists are now + single-link and much quicker at inserting, removing, searching... + - once again... the menu parsing code has been rewritten... this code is + very efficient and very extensible... so extensible infact that after + implementing the current menu syntax... i added a new tag! you can now + insert the workspaces list into your root menu with this: + + [workspaces] (descriptive label) + + - the slit menu is now spacially correct... if you want the slit in the top + right corner of the root menu... click the top right corner of the slit + menu... i think this is a little more user friendly + - window gravity should be better supported now... restarts and what not + shouldn't produce all those one pixel shifts or moves anymore... + - the modifiers for the keygrabs in blackbox are now configurable... + the "keys" are still hard wired (left/right for workspace changing, tab + for window cycling)... but you may now configure which modifiers to use + with the key combos... this introduces two new resources into your + .blackboxrc: + + session.workspaceChangeModifier + + and + + session.windowCycleModifier + + these resources may be set to any combination of the following: + + Control Mod1 Mod2 Mod3 Mod4 Mod5 Lock Shift + + also... for convenience... "Alt" is parsed as "Mod1"... + session.workspaceChangeModifier defaults to "Control" and + session.windowCycleModifier defaults to "Mod1" + - smart placement has been made smarter thanks to Dyon Balding's smarter + placement patch... this patch has been modified from the original slightly + (mostly speed concerns) + - signal handling has been made more robust... this allows it to compile on + more platforms and now prefers to use sigaction() over signal() + - over all... many code clean ups were made and old commented code was + purged... this is a very clean very stable release... enjoy people :) + + +Changes from 0.50.3 to 0.50.4: + - changed some Copyright information to include the current year + - added a number of platforms to the Supported Platforms section of the + README + - added the Slit... the Slit is a window maker dockapp util that lets users + use all of applications with Blackbox, and allows users to easily switch + between Window Maker and Blackbox more easily... it is included by default, + but you can remove it from the source with --disable-slit on your configure + command line + - large Brueghel styles and images removed from the base distribution + - merged a patch from Benjamin Stewart for very robust menu parsing... this + patch allows for parenthesis in menu files, and works well for + automatically generating menus from shellscripts and programs... the menu + syntax has not changed... it just is understood better :) + - added shell style tilde-slash (~/) home directory expansion for the + [include] and [style] tags in menu files + - added some sanity to window position/gravity code to for GTK applications + - added Window Maker style Mod1+MouseButton1+Motion window moving (for those + few braindead apps that like to be positioned where no decorations are + visible) + - added a SIGCHLD handler to clean up processes started by a startup script + that then exec's blackbox (gets rid of all those zombie processes) + - added a new resource to .blackboxrc which tells Blackbox where to put the + Slit... editing your .blackboxrc to change this is discouraged and + discarded, as the Slit has a menu that lets you select where to put it + (click any mouse button on the slit and see for yourself) + - fixed a bug in the workspace renaming feature that ate all Shift keypresses + + +Changes from 0.50.2 to 0.50.3: + - few documentation updates + - fixes to let -lgen actually get linked with the executable (fixes compile + errors on some platforms, most notably, IRIX 6.5) + - a new series of styles has been added to the distribution (this accounts + for the increased size) + - fix to let 16 color servers run blackbox (colormap reduction) + - various bug fixes... numerous strncpy's changed to sprintfs... + - default font set internally to "fixed" (to let it run on servers that don't + have any fonts installed) + - fixed bug to let blackbox remove all but the last workspace (instead of the + last two) + - window gravity offset changes + - the default key grabs have changed... there are now 4: alt-tab, + shift-alt-tab, ctrl-alt-right, ctrl-alt-left... these keys perform + as would be expected + - fixed wire move bug for transient windows + - passified error handing for the main window class + - fixed gravity restore for restart/exit purposes + + +Changes from 0.50.1 to 0.50.2: + - minimal KDE integration (configure/compile time option, turned off by + default). This is unfinished and i can't really say if i ever will finish + it, but there is enough there to integrate the panel and other modules + with Blackbox. + - changed the regexp in building menus to use a comma (,) as the separator, + instead of a period + - various bug fixen (like the one where the window list would stay put after + the workspace menu went away) + - some hacks to improve speed in the LinkedList routines + - new stacking method (to better integrate with the KDE support)... windows + are no longer in different "levels", raising windows brings them ALL the + way to the front (so it's possible to obscure override redirect windows + like image splashes etc.) and lowering throws them ALL the way to the + back (even under kfm's icons)... however, the rootmenu and the toolbar + (if configured to be ontop) will be placed above raised windows + - sticky windows have changed due to the new stack implementation, they can + be anywhere in the stack (and not always ontop or onbottom) + - session.screenNUM.toolbarRaised resource has changed to + session.screenNum.toolbarOnTop + - the workspace label in the toolbar is sized a little more sanely now + (i found that it looks the best when the workspace label width == clock + label width) + - colormap focus now has it's own resource, session.colormapFocusModel, which + is set to "Click" by default, which means you have to click a window's + decorations or the root window to (un)install a colormap... setting this + resource to "FollowsMouse" will work just as it says... the window under + the pointer will have it's colormap installed + + +Changes from 0.50.0 to 0.50.1: + - eliminated the need for XConvertCase... workspace editing should now print + any and all characters correctly + - added check for libgen.h (which provides the prototype for basename() on + some systems, like OpenBSD) + - some code obfuscation (i've been removing comments, as some of them don't + relate to some of the code below them... i plan on recommenting the code + some time soon) + - clicking button 3 will hide ANY menu now, and in the case of the workspace + and or client menus, any other menus and/or buttons associated will be + closed as well + - added a patch for multi-screen which sets the DISPLAY env variable so that + items selected from one screen don't show up on another... many thanks to + F Harvell for this + - fixed a clock bug... again thanks to F Harvell for this one + - complete and proper window placement and window restore has been + implemented... windows that are partially off screen will be placed in the + center of the root window + - the toolbar's workspace label is now dynamically sized according to the + length of the workspace names + - as stated above... workspace name editing has been completely redone, i + discovered XLookupString() this weekend and have deemed it the function of + the week... any and all characters should be printed properly now + - window placement now has it's own resource... + session.screen.windowPlacement which may be set to SmartPlacement + (which has been implemented) or anything else to default back to cascade + placement + - a new resource, session.screen.toolbarWidthPercent has been added, and + should be set to an integer representing what percentage of the root window + width the toolbar should occupy (default has been changed back to 67) + + +Changes from 0.40.14 to 0.50.0: + - added util/ subdirectory to place small, utility programs to use in + conjunction with blackbox. + - updated the README... it's still vague and useless, but gives a better + view of whats going on + - the configure script now checks for a few more headers, setlocale and + strftime in addition to basename functions to better include support for + multiple arch/langs/etc. + - updated default menu file... made it a little more general... and made + the default style menu [include]'d instead of explicitly included... + this break off of the style menu allows for custom menus to include the + default style menu for a create selection of styles + - changed all the default styles to use bsetroot instead of xsetroot + - menu handling has been improved... no more than one menu at a time may be + visible on the desktop (save for the root menu and it's tear off menus) + this means that you can't have multiple window menus and the workspace menu + open all at once... which saves screen space and reduces clutter + - much of the code has been reorganzied and reformatted for better + readability... this consists of function name changes and function + "ownership" (which basically means workspaces aren't managed by the toolbar + itself anymore, but by a general screen class on which the toolbar can + operate) + - the workspacemenu now autohides when selecting a window from one of the + window lists + - removed many empty destructors for Basemenu subclasses to improve code + readability + - two new files, Screen.cc and Screen.hh, have been added to the distribution + they add the new class BScreen which was needed for the biggest change of + the Blackbox code base, the addition of multiple screen (i.e. multihead) + support. A separate BScreen is created for each screen, and all screens + work inconjunction with the other... windows can't be passed between + screens, because the X server doesn't allow this (more investigation on + this later) + - the toolbar's clock format is now controlled by the strftime() function... + if configure can't find this function on your system, the old date/time + format is used... with strftime, clicking on the clock doesn't display the + date... as the date may now be part of the clock display... read the man + page for the strftime function to write a format string for your clock, + and place it in .blackboxrc (i.e. + session.strftimeFormat: %I:%M %p on %a, %b %d is my strftime format + string) + - the toolbar has been stripped of it's workspace responsibilities, but this + change has no effect on the end user. + - common code interspersed through out the code has been consolodated into + small functions and called multiple times instead of having the same or + similar code repeated in the same class + - the window startup code has been improved upon again so that shaded windows + are restored between restarts + - some ICCCM code has been updated to properly reflect the state of windows + while shaded or on different workspaces... this state code change should + also fix the JX toolkit problem of deiconifying and nothing being redrawn + - the main Blackbox class has been changed to purely handle X events... it + doesn't manage resources (save for those necessary for proper event + handling, like the focus model for each screen) + - the format of .blackboxrc has changed slightly, the session.menuFile, + session.doubleClickInterval, session.imageDither, session.styleFile, + and session.colorsPerChannel resources are unchanged. However, the + following resources are screen dependant: + + session.screen.strftimeFormat + session.screen.workspaces + session.screen.workspaceNames + session.screen.toolbarRaised + session.screen.focusModel + + where is the screen number (zero being default and all that would be + present on a single screen/monitor setup). + - a utility named bsetroot (mentioned above) has been included in the + blackbox distribution, to aid in setting root window patterns (ala + xsetroot). the only different between xsetroot and bsetroot is that + bsetroot doesn't redefine cursors, and doesn't restore defaults if no + arguments are given. bsetroot does support multiple screens, and is ideal + for those setups (instead of running xsetroot for each screen) + + +Changes from 0.40.12 to 0.40.13: + - added some compile time parameters to allow for clean compiling + - added support for vertical/horizontal maximization (i did this by + hand, but kudos to John Martin for the idea ;) + - added basename() to the distribution... it will only be compiled in + if basename is not present in standard libraries + - window focus code has changed yet again... i've decided to completely + rewrite the focus handling code, instead of trying to fix it... let + me know how this does + - a new resource has been added to the style loader... a resource of + the form: rootCommand: will execute this + command when the style is loaded, suitable for setting the root + window background to an image/pattern/color... this should make + style integration more seamless + + +Changes from 0.40.11 to 0.40.12: + - more migration to autoconf/automake/autoheader etc. + - changed the default installation prefix... /usr/local is now the + default... all default config files will be stored in + ${prefix}/share/Blackbox... any old files will not be used, and + should be removed + - a small internal rework has made the "Inverted" option for + pressed button textures obsolete... please update your configs + - Makefile.generic has been removed + - Laurie's tear off menu patch has been adapted into the source tree... + sorry Laurie, but i had to rework your patch to make it completely + bullet proof ;) + - rework of Image code... resizes and maximizations should be much + faster now + - existance of XConvertCase is checked by configure... if it is NOT + found, then when editing the workspace name, pressing shift will + not print capital letters... sorry... get an uptodate X distribution + (R6.3 or higher) so that XConvertCase exists... + - the date format on the clock is controlled by a new .blackboxrc + resource... session.dateFormat... accepted values are: + American ( mm/dd/yy ) and + European ( dd.mm.yy ) + the default is american... if any other string is entered for the + resource, blackbox defaults again to american... + - changed some window positioning code so that windows aren't thrown + to the middle of the screen unless they are completely hidden when + shown + - time bugs have been fixed... this is too detailed to go into... so + read the source if you are curious, otherwise just hit Reconfigure + when ever you change the system time, and blackbox will update and + continue to monitor/display the correct time (also... wrt y2k... + blackbox is y2k compliant is your libc's localtime() is y2k + compliant) + - this release has a major internals rework... let me know of any + problems... i would also love to hear about improved/degraded + performance... enjoy people... + + +Changes from 0.40.10 to 0.40.11: + - changed the blackbox distribution to use autoconf instead of + imake... let me know how this works + - removed all the Imakefiles and Imakeconfig in favor of autoconf... + - added necessary files for automake and autoconf + - fixed a bug that would automatically shift focus to the workspace + label after switching to an empty workspace which would edit the + workspace name if pressing ctrl-arrow... + - fixed a bug that wouldn't focus any windows with alt-tab after + switching workspaces + - new feature: click button 1 on the clock to display today's date + releasing the mouse button redraws the current time + - implemented double-click window shading by adapting David Edwards' + shade patch + - added new .blackboxrc resource - session.doubleClickInterval - which + controls the time between double clicks... used by the double-click + shade feature... defaults to 250ms is not specified + + +Changes from 0.40.9 to 0.40.10: + - fixed the broken menu highlights - they are now a dot in front of + the menu label + - enhanced the image rendering code to prebuild dithering lookup + tables... this saves some multiply and divide instructions during the + rendering loop... it makes a noticable difference on my lowly p133 ;) + - just for completeness... i've added some error output for various + things that could (but rarely do) go awry + - the focus code has been updated yet again... but this time it's for + the better ;) the ctrl arrow keys continue working after a window + has been closed etc. etc... this should be the final change... unless + i find more bugs in it + + +Changes from 0.40.8 to 0.40.9: + - fixed a menu bug to keep as much of the menu on screen as possible + - added a patch from Peter Kovacs to raise the + current focused window when the user clicks on the window label on + the toolbar + - changed some window gravity defaults... nothing major here + - focus handling code has been spruced up... and majorly tested... + 0.40.8's focus code was about as good as a full tank of gas but + no corvette... let me know how the focus handles in 0.40.9 + + +Changes from 0.40.7 to 0.40.8: + - more menu fixes... highlights are handled as normal... constant + highlights are draw differently... the rounded edges minus the + highlighted bar... + - hand strength reduction in the BImage::renderXImage() method... + this doesn't offer much of a speed up... but every little bit + counts + - stuck clients that open transients now have their transients stuck + by default + - changed some input focus code to better handle the sloppy focus + model... the little annoyances like two focused windows should now + be fixed... + - removed gcc specific code... changed use of strsep to strtok (which + is defined by ANSI C) + - this is strictly a maintainence release... no new features have + been introduced + + +Changes from 0.40.6 to 0.40.7: + - changed bhughes@arn.net to bhughes@tcac.net throughout the source + tree + - menu sanity fixes... like unmapping a submenu when an item is removed + - image code fixes... no memory is allocated during the rendering... + only when the BImage is created... thanks to lee.salzman@lvdi.net for + the frame work for these changes + - fewer floating point division in gradient rendering routines... again + thanks to lee.salzman@lvdi.net for the basis of these changes + - reading workspace names is now a little more robust, but probably not + bullet proof... events are handled normally while reading the + workspace name... instead of blocking them all... the label changes + color... and reverts back to normal when enter is pressed (which + applies the new workspace name) + - the window geometry label drawn during window resizing has moved to + inside the window frame, this allows us to see what size windows are + being resized to when the right edge is close to the edge of root + - a lock system has been implemented for the blackbox objects... this + fixes a nasty little problem of stale windows (decorations with no + client window) because of on object grabbing the server and another + unlocking it... the current system works similar to XLockDisplay + (which is used in threaded X programs). + - icccm code enhancements for XWMHints and NormalHints + - window maximizing now properly returns the maximized client to its + previous location (this is a bug fix... maximize netscape, then + maximize an xterm... unmaximizing netscape will put it where the + xterm was previously) + + +Changes from 0.40.5 to 0.40.6: + - the workspace and client menus now keep the current workspace and + focus window highlighted so that we know which window is in focus + (especially useful with multiple xterms in the same workspace) + - image dithering code has been updated slightly to hopefully squeeze + every last drop of performance out of it + - pixel computation has been simplified + - gradient code has been changed to use less floating point division + this breaks Jon Denardis' gradient hack, but the option has been + left in place in case Jon wants to re-implement it :) + - more ICCCM compliance code added... window colormap focus has a + click-to-focus policy... any window that wants to use it's own + colormap (i.e. netscape -install) will have it's colormap installed + when button1 is pressed anywhere on the decorations (like when + raising) the default root colormap is reinstalled when pressing + button1 on the root window + - workspace names can now be changed on the fly... they are stored in + the users ~/.blackboxrc file, and may be edited from there, although + any changes made to the file will be over written when blackbox is + shutdown or restarted... + - workspace names can be edited *while blackbox is running* by pressing + button3 on the workspace label on the toolbar... pressing enter ends + the edit and normal event processing resumes... these names are saved + on exit/restart for convienence + - support for window gravity has been added... this is addition is + another step closer to complete ICCCM compliance + - window resizing is a bit more sane now... a bug once pointed out long + ago that i never noticed plagued me the other day... when resizing a + window to a large size... blackbox can delay a bit while it renders + the new decorations... if the user tries to move the window before + these decorations are finished... the window is resized again... this + has been fixed + + +Changes from 0.40.4 to 0.40.5: + - updated the default style to reflect the button resource change in + 0.40.4 + - added internal menu alignment + - added internal linked list insertion at a certain point, used in + menus + - submenus now update their parent menu to reflect that the submenu + is no longer open + - right clicking anywhere on the rootmenu or window menus will now + unmap them... NOTE: this doesn't work on submenus or the rootmenu + or on the SendToWorkspaceMenu + - cleaned up some of the image rendering code to use less comparisons + while rendering an image... also removed alot of + multiplication/division use in beveling loops to increase speed + - changed dithering error distribution to make images smoother at + 15 and 8bpp (8bpp got the most benefit from this change) + - changed the toolbar appearance... removed the raise/lower button, + changing the level of the toolbar isn't possible as of yet... a new + button has been added on the left of the toolbar, pressing it will + map the workspace menu, which has a few changes + - the workspace menu now conatins submenus of all the window lists of + all workspaces... it is now possible to see which window is on which + workspace... also... the icon button has been removed from the + toolbar and the iconmenu is now a submenu of the workspace menu + - window placement has been slightly modified... if clients request a + certain position, the request is honored, otherwise the client is + cascaded... if either the cascade or requested position obscures part + of the window when the window is created, the window is centered in + the root window... + - window state updated... when blackbox is restarted, all client + windows are placed on the workspace they were previously occupying... + this is only between restarts... not when X is restarted... + however... applications may be coded specifically for blackbox to + start on a certain workspace... for more information on this, email + me + - window menu placement has been made a little more sane + + +Changes from 0.40.3 to 0.40.4: + - removed the window.handle{.color,.colorTo} resources... the handle + is now treated as a button, and uses the button resources + - added window.focus.button and window.unfocus.button resources to the + style file... this allows colors to be set different from the + titlebar... the colors are controlled with window.focus.button.color, + window.focus.button.colorTo, window.unfocus.button.color and + window.unfocus.button.colorTo + - transient focus policy has changed... if any window has an open + transient window... focus is awarded to the trasient instead of the + parent window, even if the mouse doesn't occupy the trasient window + - cleaned up some namespace in Basemenu.cc and Basemenu.hh + - changed dithering error diffusion + - fixed Bevel2 so that it doesn't sig11 anymore + - changed stacking code slightly... "stuck" windows now are placed + in relation to the toolbar... i.e. if the toolbar is on top... stuck + windows are on top of any other client windows... if the toolbar + is underneath client windows... stuck windows are also stacked + underneath the client windows + - major reworking of Window.cc and Window.hh to fully support the + _MOTIF_WM_HINTS on client windows... if this hint is present... then + the window is decorated according to those hints... all the move/ + resize/configure code had to be updated because of this... one step + closer to gnome compliance + - window menus now contain different items based on the functions + available to the client window... if a window cannot be maximized... + then no maximize item is present in the window menu... also, "Close" + and "Kill Client" are no longer present at the same time... if the + client supports the WM_DELETE_WINDOW Protocol, then "Close" is + present, "Kill Client" is only present for clients that do not + support the protocol + - windows may now be moved by the titlebar, handle or thin border + around the window... window menus are also accessible by pressing + button 3 on any of these 3 windows + - a new focus model has been added... it works... but is mostly + untested... session.focusModel: AutoRaiseSloppyFocus in .blackboxrc + will retain the sloppy focus model... but raise windows to the + top when focused... + + +Changes from 0.40.2 to 0.40.3: + - fixed a bug in Blackbox::nextFocus that would put blackbox into an + infinite loop when 2 windows where open, window 0 was iconified and + window 1 had focus and pressing alt-tab or the next window button + on the toolbar + - completely recoded all the graphics stuffs to support all visual + classes and color depths, also the image code is more compact and + faster than previous releases + - removed graphics.cc and graphics.hh from the distribution and added + Image.cc and Image.hh for the new graphics implementation. a new + class called BImageControl is now in charge of all pixmap caching + and color allocation on displays that don't run/support TrueColor... + this takes the job away from the Blackbox class... whose job is now + to manage all it's children and disperse events read from the display + - fixed bug that didn't handle windows created before blackbox is + running (again :/) + + +Changes from 0.40.1 to 0.40.2: + - added a variable initialize line of code to keep blackbox from + splattering from a sigsegv on startup + + +Changes from 0.35.0 to 0.40.1: + - cosmetic menu rendering fixes, changed the way the submenu dot is + sized; changed an off by one error in drawing the rounded edges; + fixed the text to be draw in the center of the item instead of at the + bottom + - major changes to the toolbar (formerly the workspace manager) to + change the way it looks and works. The large blank space is gone, + and the toolbar is now half the height it used to be (roughly). the + workspace label displays the current workspace, with the workspace + menu accessible by clicking button 1 on the label. the two buttons + directly to the right of the workspace label change the workspace + when pressed. the window label displays the current focused window, + which makes it easier to identify which window has input focus (for + some people like me that have very dark or very closely colored + decorations). the window menu is accessible by pressing button + one on the window label, and selecting an item from the window menu + will set input focus to that window (if it can receive focus). the + two buttons to the right of the window label circulate focus (up and + down, respectively) through the window list, skipping windows that + cannot receive focus. the icon button displays a menu of all + iconified applications. both the icon menu and the window menu will + not become visible if they are empty. the next button on the toolbar + is a raise/lower button for the workspace manager. the toolbar is + stacked on startup according to the resource set in ~/.blackboxrc, + but this button will raise and lower the workspace to the users + desire, saving the stack order when blackbox is exited or restarted. + the clock is still the same, but editing the session.clockFormat + will change it from normal time (session.clockFormat: 12) to 24hour + format (session.clockFormat: 24) + - a pixmap cache has been implemented. a linked list stores all images + rendered, removing them from the list and freeing them with the X + server when all applications have removed references to them. for + those who start man instances of the same applications will benefit + greatly from this, as the same decorations are not redraw for each + and every window. this greatly reduces the load on the X server + (my X server went from taking 20-28mb of memory to 8-11mb, a dramatic + improvement, especially on this 32mb machine). as a result of this, + reconfiguring is faster, as is startup and restarting. + - click to focus has been implemented, with some restrictions. other + window managers allow the user to click anywhere on the decorations + OR the client itself to set focus. i have not found an elegant way + to do this yet, so focus can only be set by pressing button 1 on + the decorations (like the titlebar, handle, buttons, border, etc.) + just not on the client itself. i am looking more into this, but + don't expect anymore than what is in place now. to use + click-to-focus, put session.focusModel: ClickToFocus in ~/.blackboxrc + - 2 new commands have been added to the menu syntax, [include] and + [style]... the [reconfig] command still has the option to reconfigure + after a command has been run, but probably will be faded out... + [include] (/path/to/file) includes the file inline with the current + menu, meaning that a submenu isnot created for the separate file, + if a submenu is desired, the file should include the [submenu] and + [end] tags explicitly. + [style] is a new addition for the style file support. syntax is: + [style] (label here) {/path/to/style/file} which will read the new + style file and reconfigure when selected. + - style files have been added to allow for easier switching between + configurations. the style file resources are dramtically different + from those in 0.3x.x, see app-defaults/Blackbox-style.ad for an + example... + - with the addition of style files, menus have been given their own + justification resource, allowing (for example) menus to be left + justified while titles are center or right justified. + - please read the sample configuration files in app-defaults/ for the + new and improved configuration system. NOTE: Blackbox.ad is a + sample ~/.blackboxrc, but you shouldn't copy this file to + ~/.blackboxrc, as Blackbox will store the resources it needs + automatically + - an unofficial release numbered 0.40.0 was given out to some + testers, and even this release needs the same treatment as 0.35.0 + with respect to the new config system (0.40.0 only implemented the + pixmap cache, the new toolbar and *part* of the new config system, + but not the style files or automatic generation of ~/.blackboxrc) + + +Changes from 0.34.5 to 0.35.0: + - changed the way menus are draw to round both end of the highlight... + - cosmetic enhancements for the various justifications... + - this is the first stable release of blackbox + + +Changes from 0.34.4 to 0.34.5: + - hopefully... this will be the last bug fix... so i can begin working + on new features... i fixed event mask selection on client windows + after reparenting them to the decoration frame... this should get + xv working again... + - changed the signal hander to core on sigsegv and sigfpe... sigint and + sigterm will just exit blackbox cleanly... sighup will cause blackbox + to reconfigure itself + - changed the way the version string is printed... + + +Changes from 0.34.3 to 0.34.4: + - changed the window stacking code to stack windows and their menus + more sanely... window menus are stacked directly ontop of the client + windows... instead of on top of every other client window... the + workspace manager is now by default stacked above client windows... + - reworked alot of code in Window.cc, blackbox.cc, Workspace.cc and + WorkspaceManager.cc to properly handle ICCCM state hints... the + startup and shutdown code has been completely reworked as a result of + this + +Changes from 0.34.2 to 0.34.3: + - this was a small change in the code... but a BIG change for the user + base... the X error handler is now non fatal... yes... this means if + blackbox encounters an X error (like a bad window or a bad match) it + will fprintf() the error and continue running... the quick window bug + has been mostly fixed... i have a small app that i wrote that quickly + maps a window, calls XSync()... then destroys the window and exits... + the first time i ran this little beauty... blackbox died a horrible + death... blackbox now handles this app nicely... but does + occasionally report an error (during the decoration creation... which + is promptly destroyed from the destroy notify event placed in the + queue by the X server... thus... no memory leaks... no memory + corruption... blackbox just keeps chugging along nicely + + +Changes from 0.34.1 to 0.34.2 (unreleased): + - fixed MSBFirst byte order image rendering at 32bpp (24bpp pending) + (for machines better than this intel machine of mine) + - changed BImage to allocate dithering space when the image is created + and to delete it when the image is destroyed... instead of allocating + the space and deleting the space each time the image is rendered to + an XImage... hopefully this will provide a speed increase (albeit a + small one) + - changed blackbox to call XListPixmapFormats once at startup... + instead of each time an image is rendered... this should afford some + speed increase (a small one at best :) + - fixed a bug in Window.cc that re-reads the window name... + Jon Denardis discovered this bug while playing with netscape 4.5... + the validation call is now directly before the XFetchName call... + instead of before an if() { } block that calls strcmp and XFree() + - edit Window.cc to change the way buttons are decorated and sized + the associatedWindow.button.color(To) resources have been removed, + but the associatedWindow.button texture resource is still there + + +Changes from 0.34.0 to 0.34.1: + - fixed the unmanaged rxvt/xconsole/whatever problem that didn't + decorate windows at start up... just a little logic error that was + fixed with a few braces + - fixed the shutdown code so that X and blackbox don't die a gruesome + death while reparenting the small applets on the workspace manager + toolbar... the above bug fixed also fixed a bug that didn't reparent + any existing app windows... + - updated libBox code to allow for flaws in it's design (forgotten from + 0.34.0) + - removed #include from blackbox.cc so that it compiles + on any platform (since select is supposed to be defined in unistd.h) + - removed the NEED_STRNCASECMP block in blackbox.cc until i can get + a working posix like routine to work (needed for OS2 platforms) + - edited the Imakefile scheme to have the the toplevel Imakefile and + Imakefiles in app-defaults/ lib/ and src/... there now is Imakeconfig + which includes all the options in one file... so that editing all + the Imakefiles is no longer necessary + + +Changes from 0.33.6 to 0.34.0: + - edited some Imakefiles so that rpm creaters have an easier time + - added stuff to lib/ which contains a small (VERY small) library for + letting applications open a window on the workspace manager toolbar + this is very very new... restarting will cause the app to crash + (at best) or take X with it (the worst)... play with it an let me + know how it works + - further revised window.cc and blackbox.cc to provide better error + checking... window.cc received the most updates... validating a + window is now done in the statement before the window is used... not + at the beginning of the function the window is used in... + - fixed the stacking order bug when changing workspaces... the windows + will now be restored in the order that you left them... not in the + order they were created in... + - updated the README... a little bit anyway :) + - updated BlackboxWindow::maximizeWindow() in window.cc to properly + maximize windows that have specified size increments + - fixed BlackboxWindow::configureWindow so that shaded windows that re + size themselves only resize the titlebar + - added ccmalloc 0.2.3 to the main source tree to aid in debugging... + this is NOT maintained by myself, see the source tree for details + - eliminated a double delete call with the aid of ccmalloc!@#! + + +Changes from 0.33.5 to 0.33.6: + - added Makefile.generic for those of you with foobared imake configs. + the use of xmkmf -a (i.e. imake) is still prefered... but this should + work on any system... with a little editing + - added static int handleXErrors(Display *, XErrorEvent *) in + blackbox.cc to handle any and all X lib errors while blackbox is + running... this should produce a coredump and thus the -moron + community should be able to flood my inbox with stack trace upon + stack trace :) + - added some sub directories and moved the sources around, this allows + for easier inclusion of the library for blackbox specific programs + (which will run in the dock) + - hopefully fixed the "disappearing-rxvt-trick"... since i can't + reproduce it i don't know for sure + - removed the use of alloca in graphics.cc... i was noticing very odd + behaviour from malloc() and free()... where blackbox would sig11 + when exiting because of XCloseDisplay doing something naughty... + and this seems to have done the trick... no more sig11's from malloc + or new... everything i've thrown at blackbox is gently but firmly + beaten into submission... + - added docboy's curved gradient hack as a compile time option... see + src/Imakefile and src/graphics.cc + + +Changes from 0.33.4 to 0.33.5: + - added a small test to cascade windows that start out partially hidden + (like netscape, Xnest, xv, etc.) + - changed icon handling to include a menu of icons accessible from the + workspace manager toolbar + - deiconifying a window now takes it to the top of the stack + - clicking on a menuitem that has a submenu no longer hides the submenu + - added resource "workspaceManager.24hourClock", a value of True turns + on the 24hour clock on the toolbar + - removed icon pixmap/window/mask support/handling from window.cc and + window.hh... since icons are now handled in a menu, this is no + longer needed + - added session.handleWidth and session.bevelWidth + to control window sizes (instead of hardcoded defaults) + - changed parts of Basemenu.cc and WorkspaceManager.cc to follow the + sizes set by session.bevelWidth + - fixed Alt-Tab window switching... also fixed some focus handling bugs + which let two windows become focused at the same time (which is bad + mojo) + + +Changes from 0.33.3 to 0.33.4: + - corrected a typo in the sample Blackbox.ad file to correctly show + which resource to set for the menu file + - added moderate window group support for programs like netscape and + other motif applications... modified window stacking code and + internal list code to support window groups (this makes transients + behave properly... another step towards more complete ICCCM + compliance) + - modified focus event handlers to stop applications from focusing out + when pressing menubars... also window focus is returned to root if + the focus window is closed... if another window is under the focus + window when it is closed... that window is awarded input focus + - fixed tiny little bug that didn't move the close button when resizing + a window + + +Changes from 0.33.2 to 0.33.3: + - changed some of the menu code ("updated" in 0.33.1) back to the + original 0.33.0, which seems to perform better. Reason behind it? - + blackbox died too often with 0.33.1/2 + - added "Kill Client" option to window menus... for those applications + that don't accept the WM_DELETE_WINDOW atom + - menus that are not partially moved off the root window are shifted to + a visible position when the pointer enters the frame... it is also + shifted back to it's original position when left (this is new... let + me know how it works) + + +Changes from 0.33.1 to 0.33.2: (unreleased) + - changed BlackboxIcon to not try and read its config when it was + created. This was forgotten from the 0.31.0 -> 0.33.0 move :/ + + +Changes from 0.33.0 to 0.33.1: (unreleased) + - improved menu handling, less possibilty for SIGSEGV + - menus now make copies of all label, exec strings and titles, to + make less loose pointers + - fixed typo to allow submenus of submenus of submenus (...) + - fixed workspace menu and window list menu placements + + +Changes from 0.31.0 to 0.33.0: + - added #ifdef statements so the C preprocessor doesn't complain about + _GNU_SOURCE being redefined. + - changed internal resource data structures + - added Sticky windows functionality + - remove old animation code bound with #ifdef ANIMATIONS + - fixed a silly little bug that sometimes mapped a submenu when its + parent was unmapping itself + - added ExecReconfigure option to execute a shell statement before + performing reconfiguration + - rearranged window config code to reduce wait time while resizing + - added internal macro BImageNoDitherSolid to make window frame + rendering faster (dithering a solid image is silly anyway) + - added new menu file format + - added Blackbox::validateWindow to provide a stabler environment for + Blackbox. This gives blackbox more error checking and greater + stability. For me, random crashes have (nearly) disappeared. + - removed window name/class dependant frame texture/color + - with 0.31.0, each entity read it's configuration from the rc database + loaded at start. this has changed back to the old behaviour of + reading all configuration parameters at start, no database reads are + performed after the initial setup (save for reconfiguring). + - configuration has changed to be a little cleaner, and a little more + thorough. See the Blackbox.ad and BlackboxMenu.ad for exmaples. + diff --git a/ChangeLog.bsetbg b/ChangeLog.bsetbg new file mode 100644 index 00000000..6502d336 --- /dev/null +++ b/ChangeLog.bsetbg @@ -0,0 +1,59 @@ +1.12 +* fixed a bug with the bsetroot code that prevented compound commands from + being executed properly. + +1.11 +* various bugfixes. +* bsetbg now uses the bsd license. + +1.10 +* bsetbg is now completely sh compliant, and no longer uses bash. +* removed internal default configuration in favor of: +* added the ability to generate a config file on the fly if one doesn't already exist. +* added support for -display to be passed to bsetroot. bsetbg now fully supports + all of bsetroot's options. +* made the error messages smart. +* if one of the variables in the configuration file contains an error, bsetbg + will still work perfectly unless it is required to use the faulty variable (in + which case it tells you what you did wrong). +* bsetbg will check for the existence of the specified image application in each + of its config variables. +* massive cleanup and optimization. + +1.00 +* rewrote most of the script to handle seperate apps for each config value. +* configuration file is consequently in a different format. +* fixed stupid bugs. + +0.09 +* fixed a bug that caused a crash when bsetbg tried to read a filename + containing spaces. + +0.08 +* rewrote info function to make it even smarter. + +0.07 +* the end user hath spoken. bsetbg shall hereafter read configuration values + from one file and one file only, ~/.bsetbgrc. +* more error handling. +* fixed a bug that caused a crash when an image was specified without any + arguments. + +0.06 +* bsetbg no longer checks for a configuration file when passing arguments to + bsetroot. +* fixed up the -app stuff so that you can specify what the fallback action will + be (-center, -tile, or -full). +* added values for qiv to the sample.config. +* made -info a lot smarter than it used to be. +* no more support for ~/.bsetbgrc. it caused uneeded complication. + +0.05 +* added support for bsetroot. +* added the -app flag. +* fixed up the error checking. +* added -info flag to display current configuration values. +* added external configuration files. + +0.04 +* i don't remember back that far diff --git a/INSTALL b/INSTALL new file mode 100644 index 00000000..b44a1bcb --- /dev/null +++ b/INSTALL @@ -0,0 +1,94 @@ +Installation instructions for Openbox: + +Compilation and Installation: +-------------------------------- + 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 in the +Openbox source tree. + +Finally, it creates a shell script `config.status' that you can run +in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile Openbox, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to bhughes@tcac.net so they can be considered +for the next release. If at some point `config.cache' contains +results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' 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. Type `make install' to install the programs and any data files and + documentation. + + 4. 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'. + + +Compilers and Options: +---------------------- + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + + +Optional Features: +------------------ +Openbox supports the XShape extension of X11R6. This support is enabled by +default, but may be overridden by specifying `--disable-shape' on the configure +script's command line. + +Openbox supports Window Maker dockapps (warning: restarts from wmaker to +Openbox don't always handle dockapps correctly) with a gadget called the Slit. +The Slit is compiled into Openbox by default, but may be overridden by +specifying `--disable-slit' on the configure script's command line. + +Openbox supports a rendering effect called "faked interlacing" which darkens +every other line in rendered images. This support works only for gradient +images. It is compiled in by default, but may be overridden by specifying +`--disable-interlace' on the configure script's command line. + +Openbox provides an alternative rendering algorithm for dithering on +pseudocolor (8 bit) displays. A noticeable pattern is visible when using +this; it's a matter of taste whether this looks better than the default +algorithm. It is disabled by default, but may be overridden by specifying +'--enable-ordered-pseudo' on the configure script's command line. + +Openbox uses a timer which allows it to periodically flush its pixmap +cache. It is enabled by default, but may be overridden by specifying +'--disable-timed-cache' on the configure script's command line. + +Also, `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. + + +Please read the README file also. + diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..84eb472a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2002 - 2002 Ben Jansens +Copyright (c) 2001 - 2002 Sean 'Shaleh' Perry +Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) + +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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 00000000..bf0473bb --- /dev/null +++ b/Makefile.am @@ -0,0 +1,12 @@ +# Makefile.am for Openbox + +AUTOMAKE_OPTIONS = foreign + +SUBDIRS = data doc nls src util +MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in + +uninstall-local: + -rmdir $(pkgdatadir) + +distclean-local: + rm -f *\~ gmon.out diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 00000000..e1ddc32e --- /dev/null +++ b/Makefile.in @@ -0,0 +1,381 @@ +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# Makefile.am for Openbox + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = . + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CLOBBER = @CLOBBER@ +CXX = @CXX@ +DEBUG = @DEBUG@ +INTERLACE = @INTERLACE@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +NEWWMSPEC = @NEWWMSPEC@ +NLS = @NLS@ +ORDEREDPSEUDO = @ORDEREDPSEUDO@ +PACKAGE = @PACKAGE@ +SHAPE = @SHAPE@ +SLIT = @SLIT@ +TIMEDCACHE = @TIMEDCACHE@ +VERSION = @VERSION@ +gencat_cmd = @gencat_cmd@ +regex_cmd = @regex_cmd@ + +AUTOMAKE_OPTIONS = foreign + +SUBDIRS = data doc nls src util +MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = version.h +DIST_COMMON = README ./stamp-h.in AUTHORS ChangeLog INSTALL Makefile.am \ +Makefile.in TODO aclocal.m4 config.h.in configure configure.in \ +install-sh missing mkinstalldirs version.h.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +config.h: stamp-h + @if test ! -f $@; then \ + rm -f stamp-h; \ + $(MAKE) stamp-h; \ + else :; fi +stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=config.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h 2> /dev/null +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi +$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h + +maintainer-clean-hdr: +version.h: $(top_builddir)/config.status version.h.in + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" != "." || dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --srcdir=.. --prefix=$$dc_install_base \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: uninstall-local +uninstall: uninstall-recursive +all-am: Makefile config.h +all-redirect: all-recursive-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-hdr clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-hdr distclean-tags distclean-generic clean-am \ + distclean-local + +distclean: distclean-recursive + -rm -f config.status + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +install-data-recursive uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +install-exec-am install-exec install-data-am install-data install-am \ +install uninstall-local uninstall-am uninstall all-redirect all-am all \ +installdirs-am installdirs mostlyclean-generic distclean-generic \ +clean-generic maintainer-clean-generic clean mostlyclean distclean \ +maintainer-clean + + +uninstall-local: + -rmdir $(pkgdatadir) + +distclean-local: + rm -f *\~ gmon.out + +# 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: diff --git a/README b/README new file mode 100644 index 00000000..b84707a8 --- /dev/null +++ b/README @@ -0,0 +1,99 @@ +README for Openbox: + +The source tree for Openbox is comprised of five subdirectories: + + data/ - this holds the default data files that Openbox + requires for proper operation + + doc/ - this holds the documentation files that explain + the various aspects of Openbox + + nls/ - this holds the message files used to generate + message catalogs for different languages + + src/ - this holds the actual C++ source code for the window + manager. + + util/ - this holds source code for small utility programs + that help Openbox do what it does best. + + +Quick Start: +------------ +The quickest and easiest way to get Openbox up and running is to run the +following commands: + +# cd openbox-x.x.x +# ./configure +# make +# su -c 'make install' + +This will configure, compile and install Openbox the quickest. For those +who like to spend the extra 15 seconds reading ./configure --help, some +compile time options can be turned on and off before the build. + +For general information on GNU's ./configure, see the file INSTALL. + + +Configuring Openbox: +--------------------- +The next thing most users want to do after installing Openbox is to configure +the colors, fonts, menus, etc. to their liking. This is covered by the files +data/README, data/README.menu and data/README.style. These files give +detailed information on how to customize your new window manager. + + +Included utilities: +------------------- +Currently, the only included utilities are a program named bsetroot and a +script called bsetbg. bsetroot is a replacement for xsetroot, minus a few +options. The difference between xsetroot and bsetroot is that bsetroot has +been coded for multiple screens (e.g. multi-headed displays), where as the +stock xsetroot is not. The bsetbg script acts as a wrapper for most of the +popular programs used to set background pixmaps, making it possible +for styles to provide a machine-independent rootCommand. + + +Third-party utilities: +---------------------- +Openbox does not handle any keyboard shortcuts; instead it supports a +communication protocol which allows other programs to handle these and related +tasks. If you'd like to be able to use keyboard shortcuts with Openbox, +bbkeys (available at http://bbkeys.sourceforge.net) can provide you with this +functionality. +If you're looking for a GUI with which to configure your Openbox menu and/or +styles, check out http://bbconf.sourceforge.net. bbconf is a QT program that +does just that, as well as providing a GUI for editing your keybindings for the +above mentioned bbkeys. + +Supported Platforms: +-------------------- +ix86-Linux 2.0.x (libc5 and glibc2) +ix86-Linux 2.1.x (libc5 and glibc2) +ix86-Linux 2.2.x (libc5 and glibc2) +ix86-Linux 2.3.x (glibc2.1) +ix86-Linux 2.4.x (glibc2.2) +ix86-FreeBSD 4.0-current +ix86-FreeBSD 3.3-{stable,release} +ix86-FreeBSD 3.2-{stable,release} +ix86-FreeBSD 3.1-{stable,release} +ix86-FreeBSD 2.2.x-stable +ix86-NetBSD 1.3.3 +ix86-NetBSD 1.4.1 +ix86-OpenBSD 2.6 +ix86-BSDi 4.0 +PPC-mkLinux (version?) +ix86-Solaris 2.6 +Sparc-Solaris 2.6 (2.5 anyone?) +Sparc-Solaris 2.7 +ix86-Solaris 7 (== 2.7?) +Alpha-Digital UNIX 4.0D +Alpha-Linux 2.2.x +rs6k-AIX 4.1.3 +rs6k-AIX 4.3.2 +MIPS-IRIX 6.5 (requires gcc, MIPSpro didn't like some of the template-fu) +ix86-OS/2 (version? recent successes?) +hp9000/715-HP/UX 10.20 (with egcs 1.1.1) + +Please email ben@orodu.net for other success reports. + diff --git a/README.bbtools b/README.bbtools new file mode 100644 index 00000000..16a2ae7a --- /dev/null +++ b/README.bbtools @@ -0,0 +1,14 @@ +If you use either bbpager or bbkeys, then you will need to have AT LEAST +these versions: + +bbpager 0.3.0 from http://bbtools.windsofstorm.net/ +bbkeys 0.8.3 from http://bbkeys.sourceforge.net/ + +If you use anything older than that, they will not work with Openbox. Why? +The old "Blackbox protocol" used by Blackbox 0.60.0-alpha had messages, +properties and the like prefixed with _NET, which is to be used by +the new KDE2+/GNOME2 window manager specification. It was decided to keep from +polluting the namespace and everything changed to _BLACKBOX. When the change +was made, bbpager and bbkeys (as well as other tools, I believe) had to be +updated to understand the new protocol. + diff --git a/README.bsetbg b/README.bsetbg new file mode 100644 index 00000000..eba84a48 --- /dev/null +++ b/README.bsetbg @@ -0,0 +1,183 @@ +README for bsetbg 1.xx + +#### +### introduction ### + +bsetbg is a shell script that is intended to provide a standard root image +application for the Openbox window manager (although it will work under any +other window manager as well). bsetbg acts as a wrapper both to bsetroot and to +whatever application(s) you prefer to use for setting images on the root window. + +#### +### installation ### + +(o) copy the script to a directory in your path. +(o) chmod it to make it executable (chmod 755 /path/to/bsetbg). + +if you're lazy, do nothing. bsetbg will work out of the box for 99% of the +population. + +if you're at least vaguely curious, run bsetbg in an xterm without any arguments. +this way, you can watch what it does. + +if you're a "power user", read the 'configuration' section below. + +#### +### configuration ### + +bsetbg reads it's configuration from ~/.bsetbgrc . if it can't find this file, it +will search for a list of applications in the system path and use the positive +matches to create it. if you would prefer for this not to happen, you can create +your own config file using the included sample.config . +~/.bsetbgrc should contain the following variables: + +CENTER= application and arguments for centering an image on the root window +FULL= application and arguemnts for stretching/contracting an image to fill the root window +TILE= application and arguments to tile the root window +DEFAULT= action to take place by default if none of the above have been specified. + +if you let bsetbg create the configuration file, the only applications that will +be included in it are the ones that were found in your path. bsetbg will choose +one of them to be the default and comment out the rest, so if you don't like what +it chooses, edit the file and change the default values to whatever you like. + +#### +### usage ### + +** normal usage: + + bsetbg -full|-tile|-center + +running bsetbg without any arguments except the name of the image will cause it to +set the image with the default values, which will vary from person to person. for +the ultimate control over your theme, always tell bsetbg what you want it to do. + + +** advanced usage: +if you use a certain program or set of arguments to achieve a particular effect +that goes beyond the scope of bsetbg's normal functionality, you can include the +application and its neccessary command line options after the -app flag: + + bsetbg -app <"command line options"> + +here is an example in which bsetbg will try to run xv to center the image against +a coloured background: + + bsetbg -app xv "-rbg rgb:27/40/8b -root -rmode 5 -quit" + +note that you MUST enclose the application's options in double quotes. if you +don't, bsetbg will bail out and give you an error message. + +before bsetbg runs the command, it will check to make sure that the application +(xv in our example) is present on the target system. if it's not, bsetbg will fall +back to setting the image using the default values from the configuration. if you +want to control what the fallback option will be, use either -center, -tile, or +-full after the options for the application: + + bsetbg -app xv "-rbg rgb:20/2b/32 -root -rmode 5 -quit" -center + +in the above example, bsetbg will fall back to setting the image in centered mode +if xv isn't available. + + +** other usage: +bsetbg can also be used in place of bsetroot. just give bsetbg the same arguments +that you would normally pass to bsetroot. example: + + rootCommand: bsetbg -gradient flatinterlaced -from rgb:46/51/5c -to rgb:34/3c/45 + + rootCommand: bsetbg -solid SteelBlue + + +** informational usage: +'bsetbg -help' does what you'd expect it to. + +'bsetbg -info' will output information about bsetbg's current configuration +values. use this when you're debugging an incorrect configuration. + +#### +### troubleshooting ### + +this section is sort of an faq. + +(o) help! my background is messed up when i try to use a png image! + +if you are using xv, your version probably hasn't been patched to include png +support. you have two options: 1), you can download the source and the patches and +compile xv yourself (see the url at the end of this document), or 2), you can try +to hunt down a binary version of xv that was compiled with the png patch. + +if you aren't using xv, then whatever it is that you are using is having a problem +with png images. consult the documentation on it. + + +(o) when i switch to a new Openbox style, the background doesn't change. + +most likely, there's an error with bsetbg. if you alt+f[1-5] to go back to your +console, you can see bsetbg's error message. alternatively, run bsetbg from an +xterm and look at its output. + +in most instances, there will be a problem with your config file. you can either +try to fix it yourself, or you can rename your ~/.bsetbgrc to something else and +then run bsetbg without any arguments in order to force the creation of a new +configuration file. + + +(o) when i try to set an image in full/tiled/centered mode, the image is not + full/tiled/centered. + +you've probably given the values in the config file the wrong arguments for what +they are meant to do. either let bsetbg create a new file (see above), or else +read the "configuration" section if this document. + + +(o) i'm a moron who can't be bothered to read your fine and well-written README. + can i email you with my stupid questions? + +don't even think about it. + +#### +### other stuff ### + +xv can be found at: + http://www.trilon.com/xv/downloads.html + +qiv lives at: + http://www.klografx.de/software/qiv.shtml + +xli can be found at: + http://pantransit.reptiles.org/prog/#xli + +display (part of ImageMagick) can be found at: + http://www.imagemagick.org/ + +wmsetbg is a part of the Window Maker window manager. Window Maker can be found at: + http://windowmaker.org/ + +Esetroot is a part of the Enlightenment window manager: + http://enlightenment.org/ + +openbox homepage: + http://FILLMEINNOW/ + +and lastly, bsetbg: + http://lordzork.com/blackbox/ + + +#### +### more other stuff ### + +many thanks are due to: +youngjun han, for the inspiration to do it in the first place +zak johnson, for invaluable suggestions +brad hughes, for help in debugging (not to mention, creating a smashing window +manager) +and last but not least, mycat, mr. man. + +send all comments/suggestions/constructive criticism/blueprints for futuristic +weapons/etc to lordzork@lordzork.com + +bsetbg has only been tested under linux. if it doesn't work on your system, email +me the details and i'll try to fix it. + +copyright (C) 2000 by lordzork industries. diff --git a/TODO b/TODO new file mode 100644 index 00000000..90deacec --- /dev/null +++ b/TODO @@ -0,0 +1,54 @@ +Openbox TODO list: + +* add asserts all throughout the code to catch bugs. + +* new configuration class which handles the X db, with better functionality. + i.e. make changes in the configuraiton save instantly, and stop saving over + the config file on shutdown/reconfig. + +* convert char *'s to stl's std::string. + +* make the toolbar a compile-time option so it can be disabled entirely. + +* make it possible to cuycle workspaces by moving the mouse past the edge of + the desktop? + +* make the wheel mouse functionality optional? + +* add a modifer key which will scroll workspaces with the mousewheel even when + not on the root window? + +* NETWM support (see http://www.freedesktop.org/standards/wm-spec/). + +* handle keyboard input natively instead of relying on an external program? + +* remappable bindings for keyboard input and for mouse input. + +* snap to edges, all edges, including window edges + +* port bbconf to Openbox. + +* add a close button to root/pinned menus? + +* add atoms for most everything in the window manager + e.g. add _BLACKBOX_STYLE and _BLACKBOX_MENU atoms so that bbtools, bbconf, + etc. can get the current path to the style in use and menu. + +* when workspace name is greater than the width of its text area the toolbar + gets very ugly. I think waht's really needed is a new toolbar entirely, which + can let apps dock in it (these would, of course then, be very tiny apps). + +* get translations of Openbox into more languages. + +* window stacking layers (i.e. always on top/bottom). + +* draw non-opaque move/resize frames using the style's borderWidth. + +* better support for window groups. + +* support for Xft, to anti-alias text. + +* suppert for XRENDER, and use it for making window decorations/menus/etc + translucent. + +* fix any existant memory leaks, this is on-going forever. diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 00000000..29290472 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,160 @@ +dnl aclocal.m4 generated automatically by aclocal 1.4-p5 + +dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# Do all the work for Automake. This macro actually does too much -- +# some checks are only needed if your package does certain things. +# But this isn't really a big deal. + +# serial 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_REQUIRE([AC_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "[$]2" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN([AM_MISSING_PROG], +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) + +# Add --enable-maintainer-mode option to configure. +# From Jim Meyering + +# serial 1 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT($USE_MAINTAINER_MODE) + AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +# Define a conditional. + +AC_DEFUN([AM_CONDITIONAL], +[AC_SUBST($1_TRUE) +AC_SUBST($1_FALSE) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi]) + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN([AM_CONFIG_HEADER], +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0 new file mode 100644 index 00000000..2278bbf1 --- /dev/null +++ b/autom4te.cache/output.0 @@ -0,0 +1,6539 @@ +@%:@! /bin/sh +@%:@ Guess values for system-dependent variables and create Makefiles. +@%:@ Generated by GNU Autoconf 2.53. +@%:@ +@%:@ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +@%:@ Free Software Foundation, Inc. +@%:@ This configure script is free software; the Free Software Foundation +@%:@ gives unlimited permission to copy, distribute and modify it. + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + +# Name of the executable. +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + 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 + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + 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=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # 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 before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, 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 + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + + +# 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` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="src/openbox.cc" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +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 + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -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 | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -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 ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + 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 ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# 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 its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +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] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --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] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-shape enable support of the XShape extension default=yes + --enable-slit include code for the Slit default=yes + --enable-newspec include code for the new WM Spec (DOES NOTHING) + default=no + --enable-interlace include code for image interlacing default=yes + --enable-ordered-pseudo include code for ordered pseudocolor (8bpp) + dithering default=no + --enable-clobber intercept mouse events to clients when num lock + or scroll lock are on default=yes + --enable-debug include verbose debugging code default=no + --enable-nls include natural language support default=yes + --enable-timed-cache use new timed pixmap cache default=yes + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-x use the X Window System + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style 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 + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +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 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.53. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +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` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&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. +# Also quote any args containing shell meta-characters. +ac_configure_args= +ac_sep= +for ac_arg +do + case $ac_arg in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n ) continue ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# 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: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +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, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + if test -s confdefs.h; then + cat <<\_ASBOX +@%:@@%:@ ----------- @%:@@%:@ +@%:@@%:@ confdefs.h. @%:@@%:@ +@%:@@%:@ ----------- @%:@@%:@ +_ASBOX + echo + sed "/^$/d" confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf 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 -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# 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" +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +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. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f conftest* +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="${MAKE}"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=openbox + +VERSION=0.99.0 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + + + +missing_dir=`cd $ac_aux_dir && pwd` +echo "$as_me:$LINENO: checking for working aclocal" >&5 +echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + +echo "$as_me:$LINENO: checking for working autoconf" >&5 +echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + +echo "$as_me:$LINENO: checking for working automake" >&5 +echo $ECHO_N "checking for working automake... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + +echo "$as_me:$LINENO: checking for working autoheader" >&5 +echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + +echo "$as_me:$LINENO: checking for working makeinfo" >&5 +echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + + + +test x$prefix = "xNONE" && prefix="$ac_default_prefix" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +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 + set dummy "$as_dir/$ac_word" ${1+"$@"} + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; + ls a.out conftest 2>/dev/null; + ls a.* conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 +echo "$as_me: error: C compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +@%:@ifndef __cplusplus + choke me +@%:@endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +@%:@include +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cxx_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +@%:@include +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +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 + +# 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" +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +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. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +for ac_prog in sed +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_regex_cmd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$regex_cmd"; then + ac_cv_prog_regex_cmd="$regex_cmd" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_regex_cmd="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +regex_cmd=$ac_cv_prog_regex_cmd +if test -n "$regex_cmd"; then + echo "$as_me:$LINENO: result: $regex_cmd" >&5 +echo "${ECHO_T}$regex_cmd" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$regex_cmd" && break +done + +if test x$regex_cmd = "x"; then + { { echo "$as_me:$LINENO: error: error. sed is required to build the default menu file." >&5 +echo "$as_me: error: error. sed is required to build the default menu file." >&2;} + { (exit 1); exit 1; }; } +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # 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 +#line $LINENO "configure" +#include "confdefs.h" +@%:@include + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat 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 non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +@%:@include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # 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 +#line $LINENO "configure" +#include "confdefs.h" +@%:@include + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat 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 non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +@%:@include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include +#include + +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err 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 +#line $LINENO "configure" +#include "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 +#line $LINENO "configure" +#include "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 +#line $LINENO "configure" +#include "confdefs.h" +#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)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default + +@%:@include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + +for ac_header in ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +@%:@include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +@%:@include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_time=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +@%:@define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + + + +for ac_func in basename +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + echo "$as_me:$LINENO: checking for basename in -lgen" >&5 +echo $ECHO_N "checking for basename in -lgen... $ECHO_C" >&6 +if test "${ac_cv_lib_gen_basename+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgen $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char basename (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +basename (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gen_basename=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_gen_basename=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_gen_basename" >&5 +echo "${ECHO_T}$ac_cv_lib_gen_basename" >&6 +if test $ac_cv_lib_gen_basename = yes; then + cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_BASENAME 1 +_ACEOF + LIBS="$LIBS -lgen" +fi + +fi +done + + + + + + + + + + + +for ac_func in getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +@%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 +echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_t_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char t_open (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +t_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_t_open=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_t_open=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6 +if test $ac_cv_lib_nsl_t_open = yes; then + LIBS="$LIBS -lnsl" +fi + +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +socket (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_socket=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_socket=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +if test $ac_cv_lib_socket_socket = yes; then + LIBS="$LIBS -lsocket" +fi + + +echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6 + + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + +fi; +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else + if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -fr conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat >Imakefile <<'_ACEOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +_ACEOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -fr conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Intrinsic.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +@%:@include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Intrinsic.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lXt $LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +@%:@include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +XtMalloc (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r $ac_dir/libXt.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi +fi + + fi + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6 + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +cat >>confdefs.h <<\_ACEOF +@%:@define X_DISPLAY_MISSING 1 +_ACEOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_R_nospace=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_R_nospace=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test $ac_R_nospace = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_R_space=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_R_space=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test $ac_R_space = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6 + fi + fi + LIBS=$ac_xsave_LIBS + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XOpenDisplay (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dnet_dnet_ntoa=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dnet_stub_dnet_ntoa=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +f = gethostbyname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_gethostbyname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 + + if test $ac_cv_func_gethostbyname = no; then + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_gethostbyname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_bsd_gethostbyname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the nameserver (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_connect) || defined (__stub___connect) +choke me +#else +f = connect; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 + + if test $ac_cv_func_connect = no; then + echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6 +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_remove) || defined (__stub___remove) +choke me +#else +f = remove; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_remove=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6 + + if test $ac_cv_func_remove = no; then + echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_posix_remove=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 +if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6 +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_shmat) || defined (__stub___shmat) +choke me +#else +f = shmat; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_shmat=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6 + + if test $ac_cv_func_shmat = no; then + echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_ipc_shmat=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 +if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char IceConnectionNumber (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +IceConnectionNumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_ICE_IceConnectionNumber=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + + +test x$no_x = "xyes" && { { echo "$as_me:$LINENO: error: Openbox requires the X Window System libraries and headers." >&5 +echo "$as_me: error: Openbox requires the X Window System libraries and headers." >&2;} + { (exit 1); exit 1; }; } + +test x$x_includes = "x" && x_includes="/usr/include" +test x$x_libraries = "x" && x_libraries="/usr/lib" + +CFLAGS="$CFLAGS $X_CFLAGS" +CXXFLAGS="$CXXFLAGS $X_CFLAGS" +LIBS="$LIBS $X_LIBS" +LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" + +echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 +echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 +if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lX11 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XOpenDisplay (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_X11_XOpenDisplay=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_X11_XOpenDisplay=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 +if test $ac_cv_lib_X11_XOpenDisplay = yes; then + LIBS="$LIBS -lX11" +else + { { echo "$as_me:$LINENO: error: Could not find XOpenDisplay in -lX11." >&5 +echo "$as_me: error: Could not find XOpenDisplay in -lX11." >&2;} + { (exit 1); exit 1; }; } + +fi + + +LIBS="$LIBS $X_EXTRA_LIBS" + +Xext_lib="" + +SHAPE="" +echo "$as_me:$LINENO: checking whether to build support for the XShape extension" >&5 +echo $ECHO_N "checking whether to build support for the XShape extension... $ECHO_C" >&6 +# Check whether --enable-shape or --disable-shape was given. +if test "${enable_shape+set}" = set; then + enableval="$enable_shape" + +fi; + +: ${enableval="yes"} +if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + echo "$as_me:$LINENO: checking for XShapeCombineShape in -lXext" >&5 +echo $ECHO_N "checking for XShapeCombineShape in -lXext... $ECHO_C" >&6 +if test "${ac_cv_lib_Xext_XShapeCombineShape+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXext $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XShapeCombineShape (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +XShapeCombineShape (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_Xext_XShapeCombineShape=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_Xext_XShapeCombineShape=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeCombineShape" >&5 +echo "${ECHO_T}$ac_cv_lib_Xext_XShapeCombineShape" >&6 +if test $ac_cv_lib_Xext_XShapeCombineShape = yes; then + echo "$as_me:$LINENO: checking for X11/extensions/shape.h" >&5 +echo $ECHO_N "checking for X11/extensions/shape.h... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +long foo = ShapeSet + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SHAPE="-DSHAPE"; Xext_lib="-lXext" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +LIBS="$LIBS $Xext_lib" + +SLIT="" +echo "$as_me:$LINENO: checking whether to include the Slit" >&5 +echo $ECHO_N "checking whether to include the Slit... $ECHO_C" >&6 +# Check whether --enable-slit or --disable-slit was given. +if test "${enable_slit+set}" = set; then + enableval="$enable_slit" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SLIT="-DSLIT" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SLIT="-DSLIT" + +fi; + + +NEWWMSPEC="" +echo "$as_me:$LINENO: checking whether to include the new WM Spec (DOES NOTHING)" >&5 +echo $ECHO_N "checking whether to include the new WM Spec (DOES NOTHING)... $ECHO_C" >&6 +# Check whether --enable-newspec or --disable-newspec was given. +if test "${enable_newspec+set}" = set; then + enableval="$enable_newspec" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + NEWWMSPEC="-DNEWWMSPEC" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + + +INTERLACE="" +echo "$as_me:$LINENO: checking whether to include interlacing image code" >&5 +echo $ECHO_N "checking whether to include interlacing image code... $ECHO_C" >&6 +# Check whether --enable-interlace or --disable-interlace was given. +if test "${enable_interlace+set}" = set; then + enableval="$enable_interlace" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + INTERLACE="-DINTERLACE" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + INTERLACE="-DINTERLACE" + +fi; + + +ORDEREDPSEUDO="" +echo "$as_me:$LINENO: checking whether to include Pseudocolor ordered dithering code" >&5 +echo $ECHO_N "checking whether to include Pseudocolor ordered dithering code... $ECHO_C" >&6 +# Check whether --enable-ordered-pseudo or --disable-ordered-pseudo was given. +if test "${enable_ordered_pseudo+set}" = set; then + enableval="$enable_ordered_pseudo" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ORDEREDPSEUDO="-DORDEREDPSEUDO" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + +CLOBBER="" +echo "$as_me:$LINENO: checking whether to intercept mouse events to clients" >&5 +echo $ECHO_N "checking whether to intercept mouse events to clients... $ECHO_C" >&6 +# Check whether --enable-clobber or --disable-clobber was given. +if test "${enable_clobber+set}" = set; then + enableval="$enable_clobber" + if test x$enableval = "xno"; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + CLOBBER="-DNOCLOBBER" + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + +DEBUG="" +echo "$as_me:$LINENO: checking whether to include verbose debugging code" >&5 +echo $ECHO_N "checking whether to include verbose debugging code... $ECHO_C" >&6 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + DEBUG="-DDEBUG" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + +NLS="" +echo "$as_me:$LINENO: checking whether to include NLS support" >&5 +echo $ECHO_N "checking whether to include NLS support... $ECHO_C" >&6 +# Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + NLS="-DNLS" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + NLS="-DNLS" + +fi; + + +echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5 +echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6 +if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxpg4 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char setlocale (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +setlocale (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_xpg4_setlocale=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_xpg4_setlocale=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4_setlocale" >&5 +echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6 +if test $ac_cv_lib_xpg4_setlocale = yes; then + LIBS="$LIBS -lxpg4" +fi + + +for ac_prog in gencat +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_gencat_cmd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$gencat_cmd"; then + ac_cv_prog_gencat_cmd="$gencat_cmd" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_gencat_cmd="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +gencat_cmd=$ac_cv_prog_gencat_cmd +if test -n "$gencat_cmd"; then + echo "$as_me:$LINENO: result: $gencat_cmd" >&5 +echo "${ECHO_T}$gencat_cmd" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$gencat_cmd" && break +done + +if test x$gencat_cmd = "x"; then + NLS="" +fi + + +TIMEDCACHE="" +echo "$as_me:$LINENO: checking whether to use the new timed pixmap cache" >&5 +echo $ECHO_N "checking whether to use the new timed pixmap cache... $ECHO_C" >&6 +# Check whether --enable-timed-cache or --disable-timed-cache was given. +if test "${enable_timed_cache+set}" = set; then + enableval="$enable_timed_cache" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + TIMEDCACHE="-DTIMEDCACHE" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + TIMEDCACHE="-DTIMEDCACHE" + +fi; + + +echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifdef signal +# undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_signal=void +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_signal=int +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 + +cat >>confdefs.h <<_ACEOF +@%:@define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + MAINT=$MAINTAINER_MODE_TRUE + + + +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 +echo "$as_me:$LINENO: result: $PACKAGE version $VERSION configured successfully." >&5 +echo "${ECHO_T} $PACKAGE version $VERSION configured successfully." >&6 +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 +echo "$as_me:$LINENO: result: Using '$prefix' for installation." >&5 +echo "${ECHO_T}Using '$prefix' for installation." >&6 +echo "$as_me:$LINENO: result: Using '$CXX' for C++ compiler." >&5 +echo "${ECHO_T}Using '$CXX' for C++ compiler." >&6 +echo "$as_me:$LINENO: result: Building with '$CXXFLAGS' for C++ compiler flags." >&5 +echo "${ECHO_T}Building with '$CXXFLAGS' for C++ compiler flags." >&6 +echo "$as_me:$LINENO: result: Building with '$LIBS' for linker flags." >&5 +echo "${ECHO_T}Building with '$LIBS' for linker flags." >&6 +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 + + +ac_config_headers="$ac_config_headers config.h" + +ac_config_commands="$ac_config_commands default-1" + +ac_config_files="$ac_config_files Makefile src/Makefile util/Makefile data/Makefile data/styles/Makefile doc/Makefile nls/Makefile nls/C/Makefile nls/da_DK/Makefile nls/de_DE/Makefile nls/es_ES/Makefile nls/et_EE/Makefile nls/fr_FR/Makefile nls/it_IT/Makefile nls/ja_JP/Makefile nls/nl_NL/Makefile nls/pt_BR/Makefile nls/ru_RU/Makefile nls/sl_SI/Makefile nls/sv_SE/Makefile nls/tr_TR/Makefile nls/zh_CN/Makefile version.h" +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 overriden 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, don't put newlines in cache variables' values. +# 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. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *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 \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + 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}' + +# 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 + +DEFS=-DHAVE_CONFIG_H + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + +# Name of the executable. +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + 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 + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + 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=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # 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 before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, 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 + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +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 sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX +@%:@@%:@ Running $as_me. @%:@@%:@ +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.53. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.53, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; + esac + + case $1 in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" + exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +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" ;; + + esac + shift +done + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + + + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "util/Makefile" ) CONFIG_FILES="$CONFIG_FILES util/Makefile" ;; + "data/Makefile" ) CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "data/styles/Makefile" ) CONFIG_FILES="$CONFIG_FILES data/styles/Makefile" ;; + "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "nls/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/Makefile" ;; + "nls/C/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/C/Makefile" ;; + "nls/da_DK/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/da_DK/Makefile" ;; + "nls/de_DE/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/de_DE/Makefile" ;; + "nls/es_ES/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/es_ES/Makefile" ;; + "nls/et_EE/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/et_EE/Makefile" ;; + "nls/fr_FR/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/fr_FR/Makefile" ;; + "nls/it_IT/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/it_IT/Makefile" ;; + "nls/ja_JP/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/ja_JP/Makefile" ;; + "nls/nl_NL/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/nl_NL/Makefile" ;; + "nls/pt_BR/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/pt_BR/Makefile" ;; + "nls/ru_RU/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/ru_RU/Makefile" ;; + "nls/sl_SI/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/sl_SI/Makefile" ;; + "nls/sv_SE/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/sv_SE/Makefile" ;; + "nls/tr_TR/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/tr_TR/Makefile" ;; + "nls/zh_CN/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/zh_CN/Makefile" ;; + "version.h" ) CONFIG_FILES="$CONFIG_FILES version.h" ;; + "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@regex_cmd@,$regex_cmd,;t t +s,@CPP@,$CPP,;t t +s,@X_CFLAGS@,$X_CFLAGS,;t t +s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t +s,@X_LIBS@,$X_LIBS,;t t +s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t +s,@SHAPE@,$SHAPE,;t t +s,@SLIT@,$SLIT,;t t +s,@NEWWMSPEC@,$NEWWMSPEC,;t t +s,@INTERLACE@,$INTERLACE,;t t +s,@ORDEREDPSEUDO@,$ORDEREDPSEUDO,;t t +s,@CLOBBER@,$CLOBBER,;t t +s,@DEBUG@,$DEBUG,;t t +s,@NLS@,$NLS,;t t +s,@gencat_cmd@,$gencat_cmd,;t t +s,@TIMEDCACHE@,$TIMEDCACHE,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +done; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # 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. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@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,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #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. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # egrep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # 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. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +done; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || 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 + diff --git a/autom4te.cache/requests b/autom4te.cache/requests new file mode 100644 index 00000000..b14da9fd --- /dev/null +++ b/autom4te.cache/requests @@ -0,0 +1,94 @@ +# This file was created by autom4te. +# It contains the lists of macros which have been traced. +# It can be safely removed. + +@request = ( + bless( [ + '0', + 1, + [ + '/usr/share/autoconf' + ], + [ + '--reload-state=/usr/share/autoconf/autoconf/autoconf.m4f', + 'aclocal.m4', + 'configure.in' + ], + { + 'AC_HEADER_STAT' => 1, + 'AC_FUNC_STRFTIME' => 1, + 'AC_PROG_RANLIB' => 1, + 'AC_FUNC_WAIT3' => 1, + 'AC_FUNC_SETPGRP' => 1, + 'AC_HEADER_TIME' => 1, + 'AC_FUNC_SETVBUF_REVERSED' => 1, + 'AC_HEADER_SYS_WAIT' => 1, + 'AC_TYPE_UID_T' => 1, + 'AM_CONDITIONAL' => 1, + 'AC_CHECK_LIB' => 1, + 'AC_PROG_LN_S' => 1, + 'AC_FUNC_MEMCMP' => 1, + 'AC_FUNC_FORK' => 1, + 'AC_FUNC_GETGROUPS' => 1, + 'AC_HEADER_MAJOR' => 1, + 'AC_FUNC_STRTOD' => 1, + 'AC_HEADER_DIRENT' => 1, + 'AC_FUNC_UTIME_NULL' => 1, + 'AC_CONFIG_FILES' => 1, + 'AC_FUNC_ALLOCA' => 1, + 'AC_C_CONST' => 1, + 'include' => 1, + 'AC_FUNC_OBSTACK' => 1, + 'AC_FUNC_LSTAT' => 1, + 'AC_STRUCT_TIMEZONE' => 1, + 'AC_FUNC_GETPGRP' => 1, + 'AC_DEFINE_TRACE_LITERAL' => 1, + 'AC_CHECK_HEADERS' => 1, + 'AC_TYPE_MODE_T' => 1, + 'AC_CHECK_TYPES' => 1, + 'AC_PROG_YACC' => 1, + 'AC_TYPE_PID_T' => 1, + 'AC_FUNC_STRERROR_R' => 1, + 'AC_STRUCT_ST_BLOCKS' => 1, + 'AC_PROG_GCC_TRADITIONAL' => 1, + 'AC_TYPE_SIGNAL' => 1, + 'AC_FUNC_FNMATCH' => 1, + 'AC_PROG_CPP' => 1, + 'AM_PROG_LIBTOOL' => 1, + 'AC_FUNC_STAT' => 1, + 'AC_PROG_INSTALL' => 1, + 'AM_GNU_GETTEXT' => 1, + 'AC_FUNC_STRCOLL' => 1, + 'AC_LIBSOURCE' => 1, + 'AC_C_INLINE' => 1, + 'AC_FUNC_CHOWN' => 1, + 'AC_PROG_LEX' => 1, + 'AH_OUTPUT' => 1, + 'AC_HEADER_STDC' => 1, + 'AC_FUNC_GETLOADAVG' => 1, + 'AC_CHECK_FUNCS' => 1, + 'AC_TYPE_SIZE_T' => 1, + 'AC_DECL_SYS_SIGLIST' => 1, + 'AC_FUNC_MKTIME' => 1, + 'AC_PROG_MAKE_SET' => 1, + 'AC_PROG_CXX' => 1, + 'm4_pattern_allow' => 1, + 'm4_include' => 1, + 'm4_pattern_forbid' => 1, + 'AC_PROG_AWK' => 1, + 'AC_FUNC_VPRINTF' => 1, + 'AC_CONFIG_HEADERS' => 1, + 'AC_PATH_X' => 1, + 'AC_TYPE_OFF_T' => 1, + 'AC_FUNC_MALLOC' => 1, + 'AC_FUNC_ERROR_AT_LINE' => 1, + 'AC_FUNC_FSEEKO' => 1, + 'AC_FUNC_MMAP' => 1, + 'AC_STRUCT_TM' => 1, + 'AC_SUBST' => 1, + 'AC_PROG_CC' => 1, + 'AC_PROG_LIBTOOL' => 1 + } + ], 'Request' ) + ); + diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0 new file mode 100644 index 00000000..a729f18c --- /dev/null +++ b/autom4te.cache/traces.0 @@ -0,0 +1,370 @@ +m4trace:configure.in:3: -1- m4_pattern_forbid([^_?A[CHUM]_]) +m4trace:configure.in:3: -1- m4_pattern_forbid([_AC_]) +m4trace:configure.in:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs. LIBOBJS']) +m4trace:configure.in:3: -1- m4_pattern_allow([^AS_FLAGS$]) +m4trace:configure.in:3: -1- m4_pattern_forbid([^_?m4_]) +m4trace:configure.in:3: -1- m4_pattern_forbid([^dnl$]) +m4trace:configure.in:3: -1- m4_pattern_forbid([^_?AS_]) +m4trace:configure.in:3: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) +m4trace:configure.in:3: -1- AC_SUBST([PATH_SEPARATOR]) +m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) +m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) +m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) +m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) +m4trace:configure.in:3: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) +m4trace:configure.in:3: -1- AC_SUBST([exec_prefix], [NONE]) +m4trace:configure.in:3: -1- AC_SUBST([prefix], [NONE]) +m4trace:configure.in:3: -1- AC_SUBST([program_transform_name], [s,x,x,]) +m4trace:configure.in:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) +m4trace:configure.in:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) +m4trace:configure.in:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) +m4trace:configure.in:3: -1- AC_SUBST([datadir], ['${prefix}/share']) +m4trace:configure.in:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) +m4trace:configure.in:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) +m4trace:configure.in:3: -1- AC_SUBST([localstatedir], ['${prefix}/var']) +m4trace:configure.in:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) +m4trace:configure.in:3: -1- AC_SUBST([includedir], ['${prefix}/include']) +m4trace:configure.in:3: -1- AC_SUBST([oldincludedir], ['/usr/include']) +m4trace:configure.in:3: -1- AC_SUBST([infodir], ['${prefix}/info']) +m4trace:configure.in:3: -1- AC_SUBST([mandir], ['${prefix}/man']) +m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) +m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ +#undef PACKAGE_NAME]) +m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) +m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME]) +m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) +m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ +#undef PACKAGE_VERSION]) +m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) +m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING]) +m4trace:configure.in:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) +m4trace:configure.in:3: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT]) +m4trace:configure.in:3: -1- AC_SUBST([build_alias]) +m4trace:configure.in:3: -1- AC_SUBST([host_alias]) +m4trace:configure.in:3: -1- AC_SUBST([target_alias]) +m4trace:configure.in:3: -1- AC_SUBST([DEFS]) +m4trace:configure.in:3: -1- AC_SUBST([ECHO_C]) +m4trace:configure.in:3: -1- AC_SUBST([ECHO_N]) +m4trace:configure.in:3: -1- AC_SUBST([ECHO_T]) +m4trace:configure.in:3: -1- AC_SUBST([LIBS]) +m4trace:configure.in:4: -1- AC_PROG_INSTALL +m4trace:configure.in:4: -1- AC_SUBST([INSTALL_PROGRAM]) +m4trace:configure.in:4: -1- AC_SUBST([INSTALL_SCRIPT]) +m4trace:configure.in:4: -1- AC_SUBST([INSTALL_DATA]) +m4trace:configure.in:4: -1- AC_SUBST([PACKAGE]) +m4trace:configure.in:4: -1- AC_SUBST([VERSION]) +m4trace:configure.in:4: -2- AC_DEFINE_TRACE_LITERAL([PACKAGE]) +m4trace:configure.in:4: -2- AH_OUTPUT([PACKAGE], [/* Name of package */ +#undef PACKAGE]) +m4trace:configure.in:4: -2- AC_DEFINE_TRACE_LITERAL([VERSION]) +m4trace:configure.in:4: -2- AH_OUTPUT([VERSION], [/* Version number of package */ +#undef VERSION]) +m4trace:configure.in:4: -1- AC_SUBST([ACLOCAL]) +m4trace:configure.in:4: -1- AC_SUBST([AUTOCONF]) +m4trace:configure.in:4: -1- AC_SUBST([AUTOMAKE]) +m4trace:configure.in:4: -1- AC_SUBST([AUTOHEADER]) +m4trace:configure.in:4: -1- AC_SUBST([MAKEINFO]) +m4trace:configure.in:4: -1- AC_PROG_MAKE_SET +m4trace:configure.in:4: -1- AC_SUBST([SET_MAKE]) +m4trace:configure.in:14: -1- AC_PROG_CC +m4trace:configure.in:14: -1- AC_SUBST([CC]) +m4trace:configure.in:14: -1- AC_SUBST([CFLAGS]) +m4trace:configure.in:14: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.in:14: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.in:14: -1- AC_SUBST([CC]) +m4trace:configure.in:14: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.in:14: -1- AC_SUBST([CC]) +m4trace:configure.in:14: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.in:14: -1- AC_SUBST([CC]) +m4trace:configure.in:14: -1- AC_SUBST([CC]) +m4trace:configure.in:14: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.in:14: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) +m4trace:configure.in:14: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) +m4trace:configure.in:15: -1- AC_PROG_CXX +m4trace:configure.in:15: -1- AC_SUBST([CXX]) +m4trace:configure.in:15: -1- AC_SUBST([CXXFLAGS]) +m4trace:configure.in:15: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.in:15: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.in:15: -1- AC_SUBST([CXX]) +m4trace:configure.in:15: -1- AC_SUBST([ac_ct_CXX]) +m4trace:configure.in:16: -1- AC_PROG_INSTALL +m4trace:configure.in:16: -1- AC_SUBST([INSTALL_PROGRAM]) +m4trace:configure.in:16: -1- AC_SUBST([INSTALL_SCRIPT]) +m4trace:configure.in:16: -1- AC_SUBST([INSTALL_DATA]) +m4trace:configure.in:18: -1- AC_SUBST([regex_cmd]) +m4trace:configure.in:24: -1- AC_HEADER_STDC +m4trace:configure.in:24: -1- AC_PROG_CPP +m4trace:configure.in:24: -1- AC_SUBST([CPP]) +m4trace:configure.in:24: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.in:24: -1- AC_SUBST([CPP]) +m4trace:configure.in:24: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) +m4trace:configure.in:24: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS]) +m4trace:configure.in:25: -1- AC_CHECK_HEADERS([ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_CTYPE_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_CTYPE_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_LIBGEN_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_LIBGEN_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_LOCALE_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_LOCALE_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_NL_TYPES_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_NL_TYPES_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_PROCESS_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_PROCESS_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SIGNAL_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STDARG_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_STDIO_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_TIME_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_SIGNAL_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SIGNAL_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_WAIT_H]) +m4trace:configure.in:25: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H]) +m4trace:configure.in:25: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H]) +m4trace:configure.in:26: -1- AC_HEADER_TIME +m4trace:configure.in:26: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) +m4trace:configure.in:26: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME]) +m4trace:configure.in:30: -3- AC_DEFINE_TRACE_LITERAL([HAVE_BASENAME]) +m4trace:configure.in:30: -2- AC_CHECK_LIB([gen], [basename], [cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_BASENAME 1 +_ACEOF + LIBS="$LIBS -lgen"]) +m4trace:configure.in:30: -1- AC_CHECK_FUNCS([basename], [], [echo "$as_me:$LINENO: checking for basename in -lgen" >&5 +echo $ECHO_N "checking for basename in -lgen... $ECHO_C" >&6 +if test "${ac_cv_lib_gen_basename+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgen $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char basename (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +basename (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gen_basename=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_gen_basename=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_gen_basename" >&5 +echo "${ECHO_T}$ac_cv_lib_gen_basename" >&6 +if test $ac_cv_lib_gen_basename = yes; then + cat >>confdefs.h <<\_ACEOF +@%:@define HAVE_BASENAME 1 +_ACEOF + LIBS="$LIBS -lgen" +fi +]) +m4trace:configure.in:30: -1- AH_OUTPUT([HAVE_BASENAME], [/* Define to 1 if you have the \`basename' function. */ +#undef HAVE_BASENAME]) +m4trace:configure.in:31: -1- AC_CHECK_FUNCS([getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_GETPID], [/* Define to 1 if you have the \`getpid' function. */ +#undef HAVE_GETPID]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_SETLOCALE], [/* Define to 1 if you have the \`setlocale' function. */ +#undef HAVE_SETLOCALE]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the \`sigaction' function. */ +#undef HAVE_SIGACTION]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the \`strftime' function. */ +#undef HAVE_STRFTIME]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_STRCASESTR], [/* Define to 1 if you have the \`strcasestr' function. */ +#undef HAVE_STRCASESTR]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the \`snprintf' function. */ +#undef HAVE_SNPRINTF]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_VSNPRINTF], [/* Define to 1 if you have the \`vsnprintf' function. */ +#undef HAVE_VSNPRINTF]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_CATOPEN], [/* Define to 1 if you have the \`catopen' function. */ +#undef HAVE_CATOPEN]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_CATGETS], [/* Define to 1 if you have the \`catgets' function. */ +#undef HAVE_CATGETS]) +m4trace:configure.in:31: -1- AH_OUTPUT([HAVE_CATCLOSE], [/* Define to 1 if you have the \`catclose' function. */ +#undef HAVE_CATCLOSE]) +m4trace:configure.in:32: -1- AC_CHECK_LIB([nsl], [t_open], [LIBS="$LIBS -lnsl"]) +m4trace:configure.in:33: -1- AC_CHECK_LIB([socket], [socket], [LIBS="$LIBS -lsocket"]) +m4trace:configure.in:36: -1- AC_PATH_X +m4trace:configure.in:37: -1- AC_DEFINE_TRACE_LITERAL([X_DISPLAY_MISSING]) +m4trace:configure.in:37: -1- AH_OUTPUT([X_DISPLAY_MISSING], [/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING]) +m4trace:configure.in:37: -1- AC_CHECK_LIB([dnet], [dnet_ntoa], [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) +m4trace:configure.in:37: -1- AC_CHECK_LIB([dnet_stub], [dnet_ntoa], [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) +m4trace:configure.in:37: -1- AC_CHECK_LIB([nsl], [gethostbyname], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"]) +m4trace:configure.in:37: -1- AC_CHECK_LIB([bsd], [gethostbyname], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"]) +m4trace:configure.in:37: -1- AC_CHECK_LIB([socket], [connect], [X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"], [], [$X_EXTRA_LIBS]) +m4trace:configure.in:37: -1- AC_CHECK_LIB([posix], [remove], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"]) +m4trace:configure.in:37: -1- AC_CHECK_LIB([ipc], [shmat], [X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"]) +m4trace:configure.in:37: -1- AC_CHECK_LIB([ICE], [IceConnectionNumber], [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], [], [$X_EXTRA_LIBS]) +m4trace:configure.in:37: -1- AC_SUBST([X_CFLAGS]) +m4trace:configure.in:37: -1- AC_SUBST([X_PRE_LIBS]) +m4trace:configure.in:37: -1- AC_SUBST([X_LIBS]) +m4trace:configure.in:37: -1- AC_SUBST([X_EXTRA_LIBS]) +m4trace:configure.in:53: -1- AC_CHECK_LIB([X11], [XOpenDisplay], [LIBS="$LIBS -lX11"], [{ { echo "$as_me:$LINENO: error: Could not find XOpenDisplay in -lX11." >&5 +echo "$as_me: error: Could not find XOpenDisplay in -lX11." >&2;} + { (exit 1); exit 1; }; } +]) +m4trace:configure.in:79: -1- AC_CHECK_LIB([Xext], [XShapeCombineShape], [echo "$as_me:$LINENO: checking for X11/extensions/shape.h" >&5 +echo $ECHO_N "checking for X11/extensions/shape.h... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +long foo = ShapeSet + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SHAPE="-DSHAPE"; Xext_lib="-lXext" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + ]) +m4trace:configure.in:83: -1- AC_SUBST([SHAPE]) +m4trace:configure.in:101: -1- AC_SUBST([SLIT]) +m4trace:configure.in:118: -1- AC_SUBST([NEWWMSPEC]) +m4trace:configure.in:135: -1- AC_SUBST([INTERLACE]) +m4trace:configure.in:151: -1- AC_SUBST([ORDEREDPSEUDO]) +m4trace:configure.in:167: -1- AC_SUBST([CLOBBER]) +m4trace:configure.in:182: -1- AC_SUBST([DEBUG]) +m4trace:configure.in:198: -1- AC_SUBST([NLS]) +m4trace:configure.in:200: -1- AC_CHECK_LIB([xpg4], [setlocale], [LIBS="$LIBS -lxpg4"]) +m4trace:configure.in:202: -1- AC_SUBST([gencat_cmd]) +m4trace:configure.in:223: -1- AC_SUBST([TIMEDCACHE]) +m4trace:configure.in:226: -1- AC_TYPE_SIGNAL +m4trace:configure.in:226: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) +m4trace:configure.in:226: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (\`int' or \`void'). */ +#undef RETSIGTYPE]) +m4trace:configure.in:229: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) +m4trace:configure.in:229: -1- AC_SUBST([MAINTAINER_MODE_TRUE]) +m4trace:configure.in:229: -1- AC_SUBST([MAINTAINER_MODE_FALSE]) +m4trace:configure.in:229: -1- AC_SUBST([MAINT]) +m4trace:configure.in:242: -1- AC_CONFIG_HEADERS([config.h]) +m4trace:configure.in:268: -1- AC_CONFIG_FILES([Makefile +src/Makefile +util/Makefile +data/Makefile +data/styles/Makefile +doc/Makefile +nls/Makefile +nls/C/Makefile +nls/da_DK/Makefile +nls/de_DE/Makefile +nls/es_ES/Makefile +nls/et_EE/Makefile +nls/fr_FR/Makefile +nls/it_IT/Makefile +nls/ja_JP/Makefile +nls/nl_NL/Makefile +nls/pt_BR/Makefile +nls/ru_RU/Makefile +nls/sl_SI/Makefile +nls/sv_SE/Makefile +nls/tr_TR/Makefile +nls/zh_CN/Makefile +version.h]) diff --git a/config.h.in b/config.h.in new file mode 100644 index 00000000..b4f73d3f --- /dev/null +++ b/config.h.in @@ -0,0 +1,142 @@ +/* config.h.in. Generated from configure.in by autoheader. */ + +/* Define to 1 if you have the `basename' function. */ +#undef HAVE_BASENAME + +/* Define to 1 if you have the `catclose' function. */ +#undef HAVE_CATCLOSE + +/* Define to 1 if you have the `catgets' function. */ +#undef HAVE_CATGETS + +/* Define to 1 if you have the `catopen' function. */ +#undef HAVE_CATOPEN + +/* Define to 1 if you have the header file. */ +#undef HAVE_CTYPE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_DIRENT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getpid' function. */ +#undef HAVE_GETPID + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBGEN_H + +/* 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_NL_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_PROCESS_H + +/* Define to 1 if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define to 1 if you have the `sigaction' function. */ +#undef HAVE_SIGACTION + +/* Define to 1 if you have the header file. */ +#undef HAVE_SIGNAL_H + +/* Define to 1 if you have the `snprintf' function. */ +#undef HAVE_SNPRINTF + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDARG_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasestr' function. */ +#undef HAVE_STRCASESTR + +/* Define to 1 if you have the `strftime' function. */ +#undef HAVE_STRFTIME + +/* 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_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SIGNAL_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_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_WAIT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the `vsnprintf' function. */ +#undef HAVE_VSNPRINTF + +/* 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 as the return type of signal handlers (`int' or `void'). */ +#undef RETSIGTYPE + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Version number of package */ +#undef VERSION + +/* Define to 1 if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING diff --git a/configure b/configure new file mode 100644 index 00000000..6c1c5dd7 --- /dev/null +++ b/configure @@ -0,0 +1,6539 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.53. +# +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + +# Name of the executable. +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + 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 + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + 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=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # 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 before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, 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 + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + + +# 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` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="src/openbox.cc" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +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 + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -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 | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -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 ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + 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 ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# 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 its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +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] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --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] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +X features: + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-shape enable support of the XShape extension default=yes + --enable-slit include code for the Slit default=yes + --enable-newspec include code for the new WM Spec (DOES NOTHING) + default=no + --enable-interlace include code for image interlacing default=yes + --enable-ordered-pseudo include code for ordered pseudocolor (8bpp) + dithering default=no + --enable-clobber intercept mouse events to clients when num lock + or scroll lock are on default=yes + --enable-debug include verbose debugging code default=no + --enable-nls include natural language support default=yes + --enable-timed-cache use new timed pixmap cache default=yes + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-x use the X Window System + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style 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 + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +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 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.53. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +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` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&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. +# Also quote any args containing shell meta-characters. +ac_configure_args= +ac_sep= +for ac_arg +do + case $ac_arg in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n ) continue ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + ac_sep=" " ;; + esac + # Get rid of the leading space. +done + +# 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: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +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, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core core.* *.core && + rm -rf 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 -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# 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" +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +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. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +rm -f conftest* +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="${MAKE}"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=openbox + +VERSION=0.99.0 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + + + +missing_dir=`cd $ac_aux_dir && pwd` +echo "$as_me:$LINENO: checking for working aclocal" >&5 +echo $ECHO_N "checking for working aclocal... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + +echo "$as_me:$LINENO: checking for working autoconf" >&5 +echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + +echo "$as_me:$LINENO: checking for working automake" >&5 +echo $ECHO_N "checking for working automake... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + +echo "$as_me:$LINENO: checking for working autoheader" >&5 +echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + +echo "$as_me:$LINENO: checking for working makeinfo" >&5 +echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$as_me:$LINENO: result: found" >&5 +echo "${ECHO_T}found" >&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$as_me:$LINENO: result: missing" >&5 +echo "${ECHO_T}missing" >&6 +fi + + + +test x$prefix = "xNONE" && prefix="$ac_default_prefix" + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +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 + set dummy "$as_dir/$ac_word" ${1+"$@"} + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output" >&5 +echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; + ls a.out conftest 2>/dev/null; + ls a.* conftest.* 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;; + a.out ) # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool --akim. + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5 +echo "$as_me: error: C compiler cannot create executables" >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cc_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_compiler_gnu=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_prog_cxx_g=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +continue +fi +rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_declaration +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +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 + +# 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" +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +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. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +for ac_prog in sed +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_regex_cmd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$regex_cmd"; then + ac_cv_prog_regex_cmd="$regex_cmd" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_regex_cmd="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +regex_cmd=$ac_cv_prog_regex_cmd +if test -n "$regex_cmd"; then + echo "$as_me:$LINENO: result: $regex_cmd" >&5 +echo "${ECHO_T}$regex_cmd" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$regex_cmd" && break +done + +if test x$regex_cmd = "x"; then + { { echo "$as_me:$LINENO: error: error. sed is required to build the default menu file." >&5 +echo "$as_me: error: error. sed is required to build the default menu file." >&2;} + { (exit 1); exit 1; }; } +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # 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 +#line $LINENO "configure" +#include "confdefs.h" +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat 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 non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # 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 +#line $LINENO "configure" +#include "confdefs.h" +#include + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 + cat 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 non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include +#include + +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_header_stdc=no +fi +rm -f conftest.err 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 +#line $LINENO "configure" +#include "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 +#line $LINENO "configure" +#include "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 +#line $LINENO "configure" +#include "confdefs.h" +#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)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_Header=no" +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + + + + + + + + + + + + + + + + + + + +for ac_header in ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; + no:yes ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_header_time=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + + + +for ac_func in basename +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + echo "$as_me:$LINENO: checking for basename in -lgen" >&5 +echo $ECHO_N "checking for basename in -lgen... $ECHO_C" >&6 +if test "${ac_cv_lib_gen_basename+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lgen $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char basename (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +basename (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_gen_basename=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_gen_basename=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_gen_basename" >&5 +echo "${ECHO_T}$ac_cv_lib_gen_basename" >&6 +if test $ac_cv_lib_gen_basename = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_BASENAME 1 +_ACEOF + LIBS="$LIBS -lgen" +fi + +fi +done + + + + + + + + + + + +for ac_func in getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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 +#else +f = $ac_func; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5 +echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_t_open+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char t_open (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +t_open (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_t_open=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_t_open=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6 +if test $ac_cv_lib_nsl_t_open = yes; then + LIBS="$LIBS -lnsl" +fi + +echo "$as_me:$LINENO: checking for socket in -lsocket" >&5 +echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_socket+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char socket (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +socket (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_socket=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_socket=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6 +if test $ac_cv_lib_socket_socket = yes; then + LIBS="$LIBS -lsocket" +fi + + +echo "$as_me:$LINENO: checking for X" >&5 +echo $ECHO_N "checking for X... $ECHO_C" >&6 + + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + +fi; +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else + if test "${ac_cv_have_x+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=no ac_x_libraries=no +rm -fr conftest.dir +if mkdir conftest.dir; then + cd conftest.dir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat >Imakefile <<'_ACEOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +_ACEOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case $ac_im_incroot in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; + esac + case $ac_im_usrlibdir in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; + esac + fi + cd .. + rm -fr conftest.dir +fi + +# Standard set of common directories for X headers. +# Check X11 before X11Rn because it is often a symlink to the current release. +ac_x_header_dirs=' +/usr/X11/include +/usr/X11R6/include +/usr/X11R5/include +/usr/X11R4/include + +/usr/include/X11 +/usr/include/X11R6 +/usr/include/X11R5 +/usr/include/X11R4 + +/usr/local/X11/include +/usr/local/X11R6/include +/usr/local/X11R5/include +/usr/local/X11R4/include + +/usr/local/include/X11 +/usr/local/include/X11R6 +/usr/local/include/X11R5 +/usr/local/include/X11R4 + +/usr/X386/include +/usr/x386/include +/usr/XFree86/include/X11 + +/usr/include +/usr/local/include +/usr/unsupported/include +/usr/athena/include +/usr/local/x11r5/include +/usr/lpp/Xamples/include + +/usr/openwin/include +/usr/openwin/share/include' + +if test "$ac_x_includes" = no; then + # Guess where to find include files, by looking for Intrinsic.h. + # First, try using that file with no special directory specified. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + egrep -v '^ *\+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + for ac_dir in $ac_x_header_dirs; do + if test -r "$ac_dir/X11/Intrinsic.h"; then + ac_x_includes=$ac_dir + break + fi +done +fi +rm -f conftest.err conftest.$ac_ext +fi # $ac_x_includes = no + +if test "$ac_x_libraries" = no; then + # Check for the libraries. + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS=$LIBS + LIBS="-lXt $LIBS" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +XtMalloc (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + LIBS=$ac_save_LIBS +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +LIBS=$ac_save_LIBS +for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +do + # Don't even attempt the hair of trying to link an X program! + for ac_extension in a so sl; do + if test -r $ac_dir/libXt.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi # $ac_x_libraries = no + +if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi +fi + + fi + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + echo "$as_me:$LINENO: result: $have_x" >&5 +echo "${ECHO_T}$have_x" >&6 + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 +echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + +cat >>confdefs.h <<\_ACEOF +#define X_DISPLAY_MISSING 1 +_ACEOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case `(uname -sr) 2>/dev/null` in + "SunOS 5"*) + echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 +echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6 + ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_R_nospace=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_R_nospace=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test $ac_R_nospace = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_R_space=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_R_space=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test $ac_R_space = yes; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$as_me:$LINENO: result: neither works" >&5 +echo "${ECHO_T}neither works" >&6 + fi + fi + LIBS=$ac_xsave_LIBS + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn Johnson says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And Karl Berry says + # the Alpha needs dnet_stub (dnet does not exist). + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XOpenDisplay (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6 +if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dnet_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dnet_dnet_ntoa=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 +echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6 +if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldnet_stub $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dnet_ntoa (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +dnet_ntoa (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dnet_stub_dnet_ntoa=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_dnet_stub_dnet_ntoa=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6 +if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +fi + + fi +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS="$ac_xsave_LIBS" + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to T.E. Dickey. + # The functions gethostbyname, getservbyname, and inet_addr are + # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. + echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +f = gethostbyname; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_gethostbyname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 + + if test $ac_cv_func_gethostbyname = no; then + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_nsl_gethostbyname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +fi + + if test $ac_cv_lib_nsl_gethostbyname = no; then + echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 +echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6 +if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lbsd $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_bsd_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_bsd_gethostbyname=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6 +if test $ac_cv_lib_bsd_gethostbyname = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +fi + + fi + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says Simon Leinen: it contains gethostby* + # variants that don't use the nameserver (or something). -lsocket + # must be given before -lnsl if both are needed. We assume that + # if connect needs -lnsl, so does gethostbyname. + echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_connect) || defined (__stub___connect) +choke me +#else +f = connect; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 + + if test $ac_cv_func_connect = no; then + echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_socket_connect=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +fi + + fi + + # Guillermo Gomez says -lposix is necessary on A/UX. + echo "$as_me:$LINENO: checking for remove" >&5 +echo $ECHO_N "checking for remove... $ECHO_C" >&6 +if test "${ac_cv_func_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char remove (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_remove) || defined (__stub___remove) +choke me +#else +f = remove; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_remove=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_remove=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 +echo "${ECHO_T}$ac_cv_func_remove" >&6 + + if test $ac_cv_func_remove = no; then + echo "$as_me:$LINENO: checking for remove in -lposix" >&5 +echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6 +if test "${ac_cv_lib_posix_remove+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +remove (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_posix_remove=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_posix_remove=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 +echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6 +if test $ac_cv_lib_posix_remove = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo "$as_me:$LINENO: checking for shmat" >&5 +echo $ECHO_N "checking for shmat... $ECHO_C" >&6 +if test "${ac_cv_func_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shmat (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* 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_shmat) || defined (__stub___shmat) +choke me +#else +f = shmat; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shmat=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_shmat=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 +echo "${ECHO_T}$ac_cv_func_shmat" >&6 + + if test $ac_cv_func_shmat = no; then + echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 +echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6 +if test "${ac_cv_lib_ipc_shmat+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lipc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +shmat (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ipc_shmat=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_ipc_shmat=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 +echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6 +if test $ac_cv_lib_ipc_shmat = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS=$LDFLAGS + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # John Interrante, Karl Berry + echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 +echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6 +if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char IceConnectionNumber (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +IceConnectionNumber (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ICE_IceConnectionNumber=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_ICE_IceConnectionNumber=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6 +if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +fi + + LDFLAGS=$ac_save_LDFLAGS + +fi + + +test x$no_x = "xyes" && { { echo "$as_me:$LINENO: error: Openbox requires the X Window System libraries and headers." >&5 +echo "$as_me: error: Openbox requires the X Window System libraries and headers." >&2;} + { (exit 1); exit 1; }; } + +test x$x_includes = "x" && x_includes="/usr/include" +test x$x_libraries = "x" && x_libraries="/usr/lib" + +CFLAGS="$CFLAGS $X_CFLAGS" +CXXFLAGS="$CXXFLAGS $X_CFLAGS" +LIBS="$LIBS $X_LIBS" +LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" + +echo "$as_me:$LINENO: checking for XOpenDisplay in -lX11" >&5 +echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6 +if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lX11 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XOpenDisplay (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +XOpenDisplay (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_X11_XOpenDisplay=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_X11_XOpenDisplay=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_X11_XOpenDisplay" >&5 +echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6 +if test $ac_cv_lib_X11_XOpenDisplay = yes; then + LIBS="$LIBS -lX11" +else + { { echo "$as_me:$LINENO: error: Could not find XOpenDisplay in -lX11." >&5 +echo "$as_me: error: Could not find XOpenDisplay in -lX11." >&2;} + { (exit 1); exit 1; }; } + +fi + + +LIBS="$LIBS $X_EXTRA_LIBS" + +Xext_lib="" + +SHAPE="" +echo "$as_me:$LINENO: checking whether to build support for the XShape extension" >&5 +echo $ECHO_N "checking whether to build support for the XShape extension... $ECHO_C" >&6 +# Check whether --enable-shape or --disable-shape was given. +if test "${enable_shape+set}" = set; then + enableval="$enable_shape" + +fi; + +: ${enableval="yes"} +if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + echo "$as_me:$LINENO: checking for XShapeCombineShape in -lXext" >&5 +echo $ECHO_N "checking for XShapeCombineShape in -lXext... $ECHO_C" >&6 +if test "${ac_cv_lib_Xext_XShapeCombineShape+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXext $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XShapeCombineShape (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +XShapeCombineShape (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_Xext_XShapeCombineShape=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_Xext_XShapeCombineShape=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeCombineShape" >&5 +echo "${ECHO_T}$ac_cv_lib_Xext_XShapeCombineShape" >&6 +if test $ac_cv_lib_Xext_XShapeCombineShape = yes; then + echo "$as_me:$LINENO: checking for X11/extensions/shape.h" >&5 +echo $ECHO_N "checking for X11/extensions/shape.h... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#include + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +long foo = ShapeSet + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SHAPE="-DSHAPE"; Xext_lib="-lXext" +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +LIBS="$LIBS $Xext_lib" + +SLIT="" +echo "$as_me:$LINENO: checking whether to include the Slit" >&5 +echo $ECHO_N "checking whether to include the Slit... $ECHO_C" >&6 +# Check whether --enable-slit or --disable-slit was given. +if test "${enable_slit+set}" = set; then + enableval="$enable_slit" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SLIT="-DSLIT" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SLIT="-DSLIT" + +fi; + + +NEWWMSPEC="" +echo "$as_me:$LINENO: checking whether to include the new WM Spec (DOES NOTHING)" >&5 +echo $ECHO_N "checking whether to include the new WM Spec (DOES NOTHING)... $ECHO_C" >&6 +# Check whether --enable-newspec or --disable-newspec was given. +if test "${enable_newspec+set}" = set; then + enableval="$enable_newspec" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + NEWWMSPEC="-DNEWWMSPEC" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + + +INTERLACE="" +echo "$as_me:$LINENO: checking whether to include interlacing image code" >&5 +echo $ECHO_N "checking whether to include interlacing image code... $ECHO_C" >&6 +# Check whether --enable-interlace or --disable-interlace was given. +if test "${enable_interlace+set}" = set; then + enableval="$enable_interlace" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + INTERLACE="-DINTERLACE" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + INTERLACE="-DINTERLACE" + +fi; + + +ORDEREDPSEUDO="" +echo "$as_me:$LINENO: checking whether to include Pseudocolor ordered dithering code" >&5 +echo $ECHO_N "checking whether to include Pseudocolor ordered dithering code... $ECHO_C" >&6 +# Check whether --enable-ordered-pseudo or --disable-ordered-pseudo was given. +if test "${enable_ordered_pseudo+set}" = set; then + enableval="$enable_ordered_pseudo" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ORDEREDPSEUDO="-DORDEREDPSEUDO" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + +CLOBBER="" +echo "$as_me:$LINENO: checking whether to intercept mouse events to clients" >&5 +echo $ECHO_N "checking whether to intercept mouse events to clients... $ECHO_C" >&6 +# Check whether --enable-clobber or --disable-clobber was given. +if test "${enable_clobber+set}" = set; then + enableval="$enable_clobber" + if test x$enableval = "xno"; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + CLOBBER="-DNOCLOBBER" + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + +DEBUG="" +echo "$as_me:$LINENO: checking whether to include verbose debugging code" >&5 +echo $ECHO_N "checking whether to include verbose debugging code... $ECHO_C" >&6 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + DEBUG="-DDEBUG" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + +NLS="" +echo "$as_me:$LINENO: checking whether to include NLS support" >&5 +echo $ECHO_N "checking whether to include NLS support... $ECHO_C" >&6 +# Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + NLS="-DNLS" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + NLS="-DNLS" + +fi; + + +echo "$as_me:$LINENO: checking for setlocale in -lxpg4" >&5 +echo $ECHO_N "checking for setlocale in -lxpg4... $ECHO_C" >&6 +if test "${ac_cv_lib_xpg4_setlocale+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lxpg4 $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char setlocale (); +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +setlocale (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_xpg4_setlocale=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_lib_xpg4_setlocale=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_xpg4_setlocale" >&5 +echo "${ECHO_T}$ac_cv_lib_xpg4_setlocale" >&6 +if test $ac_cv_lib_xpg4_setlocale = yes; then + LIBS="$LIBS -lxpg4" +fi + + +for ac_prog in gencat +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_gencat_cmd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$gencat_cmd"; then + ac_cv_prog_gencat_cmd="$gencat_cmd" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_gencat_cmd="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +gencat_cmd=$ac_cv_prog_gencat_cmd +if test -n "$gencat_cmd"; then + echo "$as_me:$LINENO: result: $gencat_cmd" >&5 +echo "${ECHO_T}$gencat_cmd" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$gencat_cmd" && break +done + +if test x$gencat_cmd = "x"; then + NLS="" +fi + + +TIMEDCACHE="" +echo "$as_me:$LINENO: checking whether to use the new timed pixmap cache" >&5 +echo $ECHO_N "checking whether to use the new timed pixmap cache... $ECHO_C" >&6 +# Check whether --enable-timed-cache or --disable-timed-cache was given. +if test "${enable_timed_cache+set}" = set; then + enableval="$enable_timed_cache" + if test x$enableval = "xyes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + TIMEDCACHE="-DTIMEDCACHE" + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + TIMEDCACHE="-DTIMEDCACHE" + +fi; + + +echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#include +#ifdef signal +# undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_signal=void +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_type_signal=int +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + MAINT=$MAINTAINER_MODE_TRUE + + + +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 +echo "$as_me:$LINENO: result: $PACKAGE version $VERSION configured successfully." >&5 +echo "${ECHO_T} $PACKAGE version $VERSION configured successfully." >&6 +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 +echo "$as_me:$LINENO: result: Using '$prefix' for installation." >&5 +echo "${ECHO_T}Using '$prefix' for installation." >&6 +echo "$as_me:$LINENO: result: Using '$CXX' for C++ compiler." >&5 +echo "${ECHO_T}Using '$CXX' for C++ compiler." >&6 +echo "$as_me:$LINENO: result: Building with '$CXXFLAGS' for C++ compiler flags." >&5 +echo "${ECHO_T}Building with '$CXXFLAGS' for C++ compiler flags." >&6 +echo "$as_me:$LINENO: result: Building with '$LIBS' for linker flags." >&5 +echo "${ECHO_T}Building with '$LIBS' for linker flags." >&6 +echo "$as_me:$LINENO: result: " >&5 +echo "${ECHO_T}" >&6 + + +ac_config_headers="$ac_config_headers config.h" + +ac_config_commands="$ac_config_commands default-1" + +ac_config_files="$ac_config_files Makefile src/Makefile util/Makefile data/Makefile data/styles/Makefile doc/Makefile nls/Makefile nls/C/Makefile nls/da_DK/Makefile nls/de_DE/Makefile nls/es_ES/Makefile nls/et_EE/Makefile nls/fr_FR/Makefile nls/it_IT/Makefile nls/ja_JP/Makefile nls/nl_NL/Makefile nls/pt_BR/Makefile nls/ru_RU/Makefile nls/sl_SI/Makefile nls/sv_SE/Makefile nls/tr_TR/Makefile nls/zh_CN/Makefile version.h" +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 overriden 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, don't put newlines in cache variables' values. +# 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. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *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 \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if cmp -s $cache_file confcache; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + 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}' + +# 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 + +DEFS=-DHAVE_CONFIG_H + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi + +# NLS nuisances. +# Support unset when possible. +if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + +(set +x; test -n "`(LANG=C; export LANG) 2>&1`") && + { $as_unset LANG || test "${LANG+set}" != set; } || + { LANG=C; export LANG; } +(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") && + { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } || + { LC_ALL=C; export LC_ALL; } +(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") && + { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } || + { LC_TIME=C; export LC_TIME; } +(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") && + { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } || + { LC_CTYPE=C; export LC_CTYPE; } +(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") && + { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } || + { LANGUAGE=C; export LANGUAGE; } +(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") && + { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } || + { LC_COLLATE=C; export LC_COLLATE; } +(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") && + { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } || + { LC_NUMERIC=C; export LC_NUMERIC; } +(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") && + { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } || + { LC_MESSAGES=C; export LC_MESSAGES; } + + +# Name of the executable. +as_me=`(basename "$0") 2>/dev/null || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conftest.sh + echo "exit 0" >>conftest.sh + chmod +x conftest.sh + if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conftest.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + 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 + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + 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=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # 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 before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, 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 + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +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 sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; } + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by $as_me, which was +generated by GNU Autoconf 2.53. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.53, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + shift + set dummy "$ac_option" "$ac_optarg" ${1+"$@"} + shift + ;; + -*);; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_need_defaults=false;; + esac + + case $1 in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" + exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + shift + CONFIG_FILES="$CONFIG_FILES $1" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + shift + CONFIG_HEADERS="$CONFIG_HEADERS $1" + ac_need_defaults=false;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +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" ;; + + esac + shift +done + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + + + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "util/Makefile" ) CONFIG_FILES="$CONFIG_FILES util/Makefile" ;; + "data/Makefile" ) CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; + "data/styles/Makefile" ) CONFIG_FILES="$CONFIG_FILES data/styles/Makefile" ;; + "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "nls/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/Makefile" ;; + "nls/C/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/C/Makefile" ;; + "nls/da_DK/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/da_DK/Makefile" ;; + "nls/de_DE/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/de_DE/Makefile" ;; + "nls/es_ES/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/es_ES/Makefile" ;; + "nls/et_EE/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/et_EE/Makefile" ;; + "nls/fr_FR/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/fr_FR/Makefile" ;; + "nls/it_IT/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/it_IT/Makefile" ;; + "nls/ja_JP/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/ja_JP/Makefile" ;; + "nls/nl_NL/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/nl_NL/Makefile" ;; + "nls/pt_BR/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/pt_BR/Makefile" ;; + "nls/ru_RU/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/ru_RU/Makefile" ;; + "nls/sl_SI/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/sl_SI/Makefile" ;; + "nls/sv_SE/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/sv_SE/Makefile" ;; + "nls/tr_TR/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/tr_TR/Makefile" ;; + "nls/zh_CN/Makefile" ) CONFIG_FILES="$CONFIG_FILES nls/zh_CN/Makefile" ;; + "version.h" ) CONFIG_FILES="$CONFIG_FILES version.h" ;; + "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; + "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. +: ${TMPDIR=/tmp} +{ + tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=$TMPDIR/cs$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in $TMPDIR" >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@regex_cmd@,$regex_cmd,;t t +s,@CPP@,$CPP,;t t +s,@X_CFLAGS@,$X_CFLAGS,;t t +s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t +s,@X_LIBS@,$X_LIBS,;t t +s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t +s,@SHAPE@,$SHAPE,;t t +s,@SLIT@,$SLIT,;t t +s,@NEWWMSPEC@,$NEWWMSPEC,;t t +s,@INTERLACE@,$INTERLACE,;t t +s,@ORDEREDPSEUDO@,$ORDEREDPSEUDO,;t t +s,@CLOBBER@,$CLOBBER,;t t +s,@DEBUG@,$DEBUG,;t t +s,@NLS@,$NLS,;t t +s,@gencat_cmd@,$gencat_cmd,;t t +s,@TIMEDCACHE@,$TIMEDCACHE,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +done; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # 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. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@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,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo $f;; + *) # Relative + if test -f "$f"; then + # Build tree + echo $f + elif test -f "$srcdir/$f"; then + # Source tree + echo $srcdir/$f + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #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. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # egrep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # 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. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if cmp -s $ac_file $tmp/config.h 2>/dev/null; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { case "$ac_dir" in + [\\/]* | ?:[\\/]* ) as_incr_dir=;; + *) as_incr_dir=.;; +esac +as_dummy="$ac_dir" +for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do + case $as_mkdir_dir in + # Skip DOS drivespec + ?:) as_incr_dir=$as_mkdir_dir ;; + *) + as_incr_dir=$as_incr_dir/$as_mkdir_dir + test -d "$as_incr_dir" || + mkdir "$as_incr_dir" || + { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; } + ;; + esac +done; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + exec 5>/dev/null + $SHELL $CONFIG_STATUS || 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 + diff --git a/configure.in b/configure.in new file mode 100644 index 00000000..65699008 --- /dev/null +++ b/configure.in @@ -0,0 +1,268 @@ +dnl configure.in for Openbox +dnl Initialize autoconf and automake +AC_INIT(src/openbox.cc) +AM_INIT_AUTOMAKE(openbox,0.99.0,no-define) + +dnl Determine default prefix +test x$prefix = "xNONE" && prefix="$ac_default_prefix" + +dnl Check for various flavors of UNIX(r) +dnl AC_AIX +dnl AC_ISC_POSIX + +dnl Locate required external software +AC_PROG_CC +AC_PROG_CXX +AC_PROG_INSTALL + +AC_CHECK_PROGS(regex_cmd, sed) +if test x$regex_cmd = "x"; then + AC_MSG_ERROR([error. sed is required to build the default menu file.]) +fi + +dnl Check for system header files +AC_HEADER_STDC +AC_CHECK_HEADERS(ctype.h dirent.h fcntl.h libgen.h locale.h nl_types.h process.h signal.h stdarg.h stdio.h time.h unistd.h sys/param.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h) +AC_HEADER_TIME + +dnl Check for existance of basename(), setlocale() and strftime() +AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, + AC_DEFINE(HAVE_BASENAME) LIBS="$LIBS -lgen")) +AC_CHECK_FUNCS(getpid setlocale sigaction strftime strcasestr snprintf vsnprintf catopen catgets catclose) +AC_CHECK_LIB(nsl, t_open, LIBS="$LIBS -lnsl") +AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") + +dnl Check for X headers and libraries +AC_PATH_X +AC_PATH_XTRA + +test x$no_x = "xyes" && AC_MSG_ERROR([Openbox requires the X Window System libraries and headers.]) + +test x$x_includes = "x" && x_includes="/usr/include" +test x$x_libraries = "x" && x_libraries="/usr/lib" + +CFLAGS="$CFLAGS $X_CFLAGS" +CXXFLAGS="$CXXFLAGS $X_CFLAGS" +LIBS="$LIBS $X_LIBS" +LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" + +dnl Check for required functions in -lX11 +AC_CHECK_LIB(X11, XOpenDisplay, + LIBS="$LIBS -lX11", + AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.]) +) + +LIBS="$LIBS $X_EXTRA_LIBS" + +Xext_lib="" + +dnl Check for XShape extension support and proper library files. +SHAPE="" +AC_MSG_CHECKING([whether to build support for the XShape extension]) +AC_ARG_ENABLE( + shape, [ --enable-shape enable support of the XShape extension [default=yes]]) + +: ${enableval="yes"} +if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + AC_CHECK_LIB(Xext, XShapeCombineShape, + AC_MSG_CHECKING([for X11/extensions/shape.h]) + AC_TRY_LINK( +#include +#include +#include +, long foo = ShapeSet, + AC_MSG_RESULT([yes]) + SHAPE="-DSHAPE"; Xext_lib="-lXext", + AC_MSG_RESULT([no]) + ) + ) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST(SHAPE) + +LIBS="$LIBS $Xext_lib" + +dnl Check for the Slit +SLIT="" +AC_MSG_CHECKING([whether to include the Slit]) +AC_ARG_ENABLE( + slit, [ --enable-slit include code for the Slit [default=yes]], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + SLIT="-DSLIT" + else + AC_MSG_RESULT([no]) + fi, + AC_MSG_RESULT([yes]) + SLIT="-DSLIT" +) +AC_SUBST(SLIT) + +dnl Check for the new WM Spec +NEWWMSPEC="" +AC_MSG_CHECKING([whether to include the new WM Spec (DOES NOTHING)]) +AC_ARG_ENABLE( + newspec, +[ --enable-newspec include code for the new WM Spec (DOES NOTHING) + [default=no]], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + NEWWMSPEC="-DNEWWMSPEC" + else + AC_MSG_RESULT([no]) + fi, + AC_MSG_RESULT([no]) +) +AC_SUBST(NEWWMSPEC) + + +dnl Check for Interlacing +INTERLACE="" +AC_MSG_CHECKING([whether to include interlacing image code]) +AC_ARG_ENABLE( + interlace, [ --enable-interlace include code for image interlacing [default=yes]], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + INTERLACE="-DINTERLACE" + else + AC_MSG_RESULT([no]) + fi, + AC_MSG_RESULT([yes]) + INTERLACE="-DINTERLACE" +) +AC_SUBST(INTERLACE) + +dnl Check for ordered 8bpp dithering +ORDEREDPSEUDO="" +AC_MSG_CHECKING([whether to include Pseudocolor ordered dithering code]) +AC_ARG_ENABLE(ordered-pseudo, +[ --enable-ordered-pseudo include code for ordered pseudocolor (8bpp) + dithering [default=no]], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + ORDEREDPSEUDO="-DORDEREDPSEUDO" + else + AC_MSG_RESULT([no]) + fi, + AC_MSG_RESULT([no]) +) +AC_SUBST(ORDEREDPSEUDO) + +dnl Check for event clobbering +CLOBBER="" +AC_MSG_CHECKING([whether to intercept mouse events to clients]) +AC_ARG_ENABLE(clobber, +[ --enable-clobber intercept mouse events to clients when num lock + or scroll lock are on [default=yes]], + if test x$enableval = "xno"; then + AC_MSG_RESULT([no]) + CLOBBER="-DNOCLOBBER" + else + AC_MSG_RESULT([yes]) + fi, + AC_MSG_RESULT([no]) +) +AC_SUBST(CLOBBER) + +dnl Check whether to include debugging code +DEBUG="" +AC_MSG_CHECKING([whether to include verbose debugging code]) +AC_ARG_ENABLE(debug, + [ --enable-debug include verbose debugging code [default=no]], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + DEBUG="-DDEBUG" + else + AC_MSG_RESULT([no]) + fi, + AC_MSG_RESULT([no]) +) +AC_SUBST(DEBUG) + +dnl Check whether to include natural language support (i18n) +NLS="" +AC_MSG_CHECKING([whether to include NLS support]) +AC_ARG_ENABLE(nls, + [ --enable-nls include natural language support [default=yes]], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + NLS="-DNLS" + else + AC_MSG_RESULT([no]) + fi, + AC_MSG_RESULT([yes]) + NLS="-DNLS" +) +AC_SUBST(NLS) + +AC_CHECK_LIB(xpg4, setlocale, LIBS="$LIBS -lxpg4") + +AC_CHECK_PROGS(gencat_cmd, gencat) +if test x$gencat_cmd = "x"; then + NLS="" +fi + + +dnl Check for new timed pixmap cache +TIMEDCACHE="" +AC_MSG_CHECKING([whether to use the new timed pixmap cache]) +AC_ARG_ENABLE( + timed-cache, +[ --enable-timed-cache use new timed pixmap cache [default=yes]], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + TIMEDCACHE="-DTIMEDCACHE" + else + AC_MSG_RESULT([no]) + fi, + AC_MSG_RESULT([yes]) + TIMEDCACHE="-DTIMEDCACHE" +) +AC_SUBST(TIMEDCACHE) + +dnl Determine the return type of signal handlers +AC_TYPE_SIGNAL + +dnl Determine if maintainer portions of the Makefiles should be included. +AM_MAINTAINER_MODE + +dnl Print results +AC_MSG_RESULT([]) +AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.]) +AC_MSG_RESULT([]) +AC_MSG_RESULT([Using '$prefix' for installation.]) +AC_MSG_RESULT([Using '$CXX' for C++ compiler.]) +AC_MSG_RESULT([Building with '$CXXFLAGS' for C++ compiler flags.]) +AC_MSG_RESULT([Building with '$LIBS' for linker flags.]) +AC_MSG_RESULT([]) + +dnl Output files +AM_CONFIG_HEADER(config.h) +AC_OUTPUT(Makefile +src/Makefile +util/Makefile +data/Makefile +data/styles/Makefile +doc/Makefile +dnl doc/ja_JP/Makefile +dnl doc/nl_NL/Makefile +dnl doc/sl_SI/Makefile +nls/Makefile +nls/C/Makefile +nls/da_DK/Makefile +nls/de_DE/Makefile +nls/es_ES/Makefile +nls/et_EE/Makefile +nls/fr_FR/Makefile +nls/it_IT/Makefile +nls/ja_JP/Makefile +nls/nl_NL/Makefile +nls/pt_BR/Makefile +nls/ru_RU/Makefile +nls/sl_SI/Makefile +nls/sv_SE/Makefile +nls/tr_TR/Makefile +nls/zh_CN/Makefile +version.h) diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 00000000..3fdf19d2 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,17 @@ +# data/Makefile.am for Openbox + +SUBDIRS = styles +CLEANFILES = menu +MAINTAINERCLEANFILES = Makefile.in + +all-local: menu + +distclean-local: + rm -f *\~ + +menu: menu.in + @regex_cmd@ -e "s,@pkgdatadir@,$(pkgdatadir)," @srcdir@/menu.in > menu + +install-data-local: menu + test -f $(DESTDIR)$(pkgdatadir)/menu || \ + $(INSTALL_DATA) menu $(DESTDIR)$(pkgdatadir) diff --git a/data/Makefile.in b/data/Makefile.in new file mode 100644 index 00000000..a7e35d44 --- /dev/null +++ b/data/Makefile.in @@ -0,0 +1,308 @@ +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# data/Makefile.am for Openbox + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CLOBBER = @CLOBBER@ +CXX = @CXX@ +DEBUG = @DEBUG@ +INTERLACE = @INTERLACE@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +NEWWMSPEC = @NEWWMSPEC@ +NLS = @NLS@ +ORDEREDPSEUDO = @ORDEREDPSEUDO@ +PACKAGE = @PACKAGE@ +SHAPE = @SHAPE@ +SLIT = @SLIT@ +TIMEDCACHE = @TIMEDCACHE@ +VERSION = @VERSION@ +gencat_cmd = @gencat_cmd@ +regex_cmd = @regex_cmd@ + +SUBDIRS = styles +CLEANFILES = menu +MAINTAINERCLEANFILES = Makefile.in +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +DIST_COMMON = README Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu data/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" != "." || dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = data + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu data/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: install-data-local +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: +uninstall: uninstall-recursive +all-am: Makefile all-local +all-redirect: all-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + + +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +mostlyclean-am: mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-tags distclean-generic clean-am distclean-local + +distclean: distclean-recursive + +maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + +.PHONY: install-data-recursive uninstall-data-recursive \ +install-exec-recursive uninstall-exec-recursive installdirs-recursive \ +uninstalldirs-recursive all-recursive check-recursive \ +installcheck-recursive info-recursive dvi-recursive \ +mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-local install-data-am install-data install-am \ +install uninstall-am uninstall all-local all-redirect all-am all \ +installdirs-am installdirs mostlyclean-generic distclean-generic \ +clean-generic maintainer-clean-generic clean mostlyclean distclean \ +maintainer-clean + + +all-local: menu + +distclean-local: + rm -f *\~ + +menu: menu.in + @regex_cmd@ -e "s,@pkgdatadir@,$(pkgdatadir)," @srcdir@/menu.in > menu + +install-data-local: menu + test -f $(DESTDIR)$(pkgdatadir)/menu || \ + $(INSTALL_DATA) menu $(DESTDIR)$(pkgdatadir) + +# 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: diff --git a/data/README b/data/README new file mode 100644 index 00000000..dd19795f --- /dev/null +++ b/data/README @@ -0,0 +1,20 @@ +The data/ directory holds some menu and style (or theme) examples for Openbox. + +The styles are installed as system defaults, and are ALWAYS overwritten when +upgrading or otherwise re-installing Openbox. Changes to them are +discouraged, because of this reason. + +In the data/ directory, you will find a directory named `styles.' These are +the system defaults that are installed when Openbox is built, and they are +intended as examples on how to customize and control the appearance of Openbox. +In the event that a user does not have a defined style, Openbox falls back on +the example styles included here. + +Also in the data/ directory is a file named `menu'. This is meant as an +example but is also installed if make install detects that no menu exists. +If openbox is ever started without a valid menu the user will get a backup +menu which gives the ability to launch and xterm and exit the window manager. + +For information on creating/editing a menu, see the file README.menu. + +For information on creating/editing a style, see the file README.style. diff --git a/data/README.menu b/data/README.menu new file mode 100644 index 00000000..fcb94f34 --- /dev/null +++ b/data/README.menu @@ -0,0 +1,369 @@ +Creating a user defined menu: +----------------------------- +Creating a menu for Openbox requires a text editor of some sort. Familiarity +with your choice of text editor is assumed, since editor preference differs +as much (if not more than) window manager preference. + +First, we need to decide on a location for our custom menu. Your home +directory is the most logical solution, since you will most likely not have +write access anywhere else. You place the menu file in any directory, and +give it any name you choose, as we will later tell Openbox the path or +location for this file. + +As an example, let's assume that my home directory is `/home/bhughes' (which it +is). I've decided to keep all my Openbox related files in a directory named +`openbox.' After creating the directory, I now have two options for creating +my new menu. I can either copy the system default (usually in +`/usr/local/share/Openbox/menu') to this directory, or I can create a new +one from scratch. Let's do the latter, for the sake of completeness. + +I've decided to name the file `rootmenu.' I fire up my favorite text editor +and now have a clean file. So let's begin. + + +Menu syntax: +------------ +The menu syntax is very simple and very effective. There are upto three +fields in a menu line. They are of the form: + + [tag] (label or filename) {command or filename} + +The supported tags are as follows: + +[begin] (label for root menu) + + This tells Openbox to start parsing the menu file. This tag is + required for Openbox to parse your menu file. If it cannot find it, + the system default menu is used instead. + +[end] + + This tells Openbox that it is at the end of a menu. This can either + be a submenu or the main root menu. There must be at least one + of these tags in your menu to correspond to the required [begin] tag. + +[exec] (label for command) {shell command} + + This tells Openbox to insert a command item into the menu. When you + select the menu item from the menu, Openbox runs `shell command.' + +[exit] (label for exit) + + This tells Openbox to insert an item that shuts down and exits + Openbox. Any open windows are reparented to the root window before + Openbox exits. + +[include] (filename) + + This tells Openbox to parse the file specified by `filename' inline + with the current menu. `filename' can be the full path to a file + (such as /usr/local/share/Openbox/brueghel/stylesmenu) or it can + begin with `~/', which will be expanded into your home directory + (e.g. [include] (~/.openbox/stylesmenu) will include + /home/bhughes/.openbox/stylesmenu in my menu) + +[nop] (label - optional) + + This tells Openbox to insert a non-operational item into the current + menu. This can be used to help format the menu into blocks or sections + if so desired (e.g. you could put all your ssh accounts together, add + a [nop] and then add all your telnet accounts together). [nop] does + accept a label, but it is not required, and a blank item will be used + if none is supplied. + +[style] (label) {filename} + + This tells Openbox to read `filename' and apply the new textures, + colors and fonts to the current running session. The filename is + just like the [include] tag, it can be the full path to the file, + or it can be of the form `~/path/from/home/dir.' Openbox also + re-reads the entire menu structure from disk, incase the menu has + changed. + +[submenu] (label) {title for menu - optional} + + This tells Openbox to create and parse a new menu. This menu is + inserted as a submenu into the parent menu. These menus are parsed + recursively, so there is no limit to the number of levels or nested + submenus you can have. The title for the new menu is optional, if + none is supplied, the new menu's title is the same as the item label. + +[reconfig] (label) + + This tells Openbox to reread the current style and menu files and + apply any changes. This is useful for creating a new style or theme, + as you don't have to constantly restart Openbox every time you save + your style. + +[restart] (label) {shell command - optional} + + This tells Openbox to restart. If `shell command' is supplied, it + shuts down and runs the command (which is commonly the name of another + window manager). If the command is omitted, Openbox restarts itself. + +[workspaces] (label) + + This tells Openbox to insert a "link" to the workspaces menu directly + into your menu. This is handy for those users who can't access the + workspace menu directly (e.g. if you don't have a 3 button mouse, it's + rather hard to middle click to show the workspace menu). This is a + "link" to the systems workspace menu, so multiple [workspaces] tags + will display the same workspace menu, so expect it to move around if + you do so. ;) + +[config] (label) + + This tells Openbox to insert the ConfigMenu into your menu. From + this menu you can configure several options stored in your + ~/.openbox/rc, and the changes take effect immediately. + +Comments may be inserted on any line of the file, as long as the first +character on the line is a `#.' + +Also, in the labels/commands/filenames fields, you can escape any character +like so: + + [exec] (\(my cool\) \{XTERM\}) {\(xterm -T \\\"cool XTERM\\\"\)} + +Using `\\' inserts a literal back-slash into the label/command/filename field. + + +Putting it all together: +------------------------ +Alrighty, so let's see if we can understand the arcane incantation above. It +says we have to have a [begin] and an [end] tag, which create our menu and +give it a title. Let's do that first: + + + [begin] (Example \[Menu\]) + + [end] + +Simple enough. Now let's add some items to the list. We always want to have +access to a terminal emulator, be it a regular xterm or something else. +So we add the item to our menu, and it now looks like this: + +... +[begin] (Example \[Menu\]) +[exec] (xterm) {xterm -ls} +[end] +... + +Great! Now let's add us some items to run an irc client, a web browser and +some other common programs. This gives up this: + +... +[begin] (Example \[Menu\]) +[exec] (xterm) {xterm -ls} +[exec] (efnet irc) {xterm -e irc fnord irc.efnet.net} +[exec] (Mozilla Navigator) {mozilla} +[exec] (XEmacs) {xemacs} +[exec] (The GIMP) {gimp} +[exec] (Video Tune) {xvidtune} +[end] +... + +Whoa, wait a second. This menu file is beginning to look a little cluttered. +Not a problem, just like programmers indent and space their code, we can +do this with our menu file, so let's clean it up a bit: + +... +[begin] (Example \[Menu\]) + [exec] (xterm) {xterm -ls} + [exec] (efnet irc) {xterm -e irc fnord irc.efnet.net} + + [exec] (Mozilla Navigator) {mozilla} + [exec] (XEmacs) {xemacs} + + [exec] (Konqueror) {konqueror} + [exec] (The GIMP) {gimp} + + [exec] (Video Tune) {xvidtune} +[end] +... + +Ahh... now that looks a little better. Now we decide that we kind of like the +spacing in the file, and decide we want to apply it to the menu itself. Now +we take advantage of the [nop] tag: + +... +[begin] (Example \[Menu\]) + [exec] (xterm) {xterm -ls} + [exec] (efnet irc) {xterm -e irc fnord irc.efnet.net} + + [nop] + + [exec] (Mozilla Navigator) {mozilla} + [exec] (XEmacs) {xemacs} + + [nop] + + [exec] (Konqueror) {konqueror} + [exec] (The GIMP) {gimp} + + [nop] + + [exec] (Video Tune) {xvidtune} +[end] +... + +Now, let's create a submenu to put some items to change between all these +themes we downloaded from http://bb.classic.themes.org/. Let's assume we +untarred the themes into the ~/.openbox directory like the documentation on +the themes.org site recommends. + +... +[begin] (Example \[Menu\]) + [exec] (xterm) {xterm -ls} + [exec] (efnet irc) {xterm -e irc fnord irc.efnet.net} + + [nop] + + [exec] (Mozilla Navigator) {mozilla} + [exec] (XEmacs) {xemacs} + + [nop] + + [exec] (Konqueror) {konqueror} + [exec] (The GIMP) {gimp} + + [nop] + + [exec] (Video Tune) {xvidtune} + + [submenu] (Themes) {Themes from bb.classic.themes.org} + [style] (Openbox) {~/.openbox/styles/blackbox} + [style] (Openbox II) {~/.openbox/styles/blackbox2} + [style] (Hardware) {~/.openbox/styles/hardware} + [style] (Nova) {~/.openbox/styles/nova} + [style] (Orbital) {~/.openbox/styles/orbital} + [style] (Orbital II) {~/.openbox/styles/orbital2} + [style] (Seething) {~/.openbox/styles/seething} + [style] (Zero) {~/.openbox/styles/zero} + [style] (Cold Fusion) {~/.openbox/styles/coldfusion} + [end] +[end] +... + +Even better. Now hold on a second, if we have our themes and styles in +~/.openbox why do we have to have our menu in ~/openbox? Answer: WE DON'T! +This is where the choice comes. Do we keep our stuff in two separate +directories? Do we put it all in one directory? That is up to you to decide. +I personally prefer to keep everything in one directory (but, I use ~/.openbox +and have been for a long, long time; long before bb.classic.themes.org was +even thought of... and again that is *personal* preference, not a hard-fast +rule). + +Now that we've gotten a feel for the menu syntax, we decide to finish off our +menu. In addition to the styles we downloaded, we decide we also want to +keep a submenu for the default styles that came with Openbox. All we need +to do is [include] the styles file from the share directory for Openbox. +After putting everything together, we have: + + +... +# custom menu file for Openbox + +[begin] (Example \[Menu\]) + [exec] (xterm) {xterm -ls} + [exec] (efnet irc) {xterm -e irc fnord irc.efnet.net} + + [nop] + + [exec] (Mozilla Browser) {mozilla} + [exec] (Konqueror) {konqueror} + [exec] (XEmacs) {xemacs} + + [nop] + + [exec] (The GIMP) {gimp} + + [nop] + + [exec] (Video Tune) {xvidtune} + + [nop] (...) + + [submenu] (Themes) {Themes from bb.classic.themes.org} + [style] (Openbox) {~/.openbox/styles/blackbox} + [style] (Openbox II) {~/.openbox/styles/blackbox2} + [style] (Hardware) {~/.openbox/styles/hardware} + [style] (Nova) {~/.openbox/styles/nova} + [style] (Orbital) {~/.openbox/styles/orbital} + [style] (Orbital II) {~/.openbox/styles/orbital2} + [style] (Seething) {~/.openbox/styles/seething} + [style] (Zero) {~/.openbox/styles/zero} + [style] (Cold Fusion) {~/.openbox/styles/coldfusion} + +# include the default style menu... this is assuming Openbox was installed +# into /usr/local + + [nop] + + [include] (/usr/local/share/Openbox/styles/stylesmenu) + [end] + + [workspaces] (Workspace list) + + [submenu] (Restart) {Restart which?} + [restart] (Openbox) + +# let's also give us access to some other window managers + + [restart] (Window Maker) {wmaker} + [restart] (Enlightenment) {enlightenment} + [restart] (KWM) {kwm} + [restart] (TWM) {twm} + [end] + + [nop] (...) + + [reconfig] (Reconfigure) + [exit] (Quit!) +[end] +... + +And voila! our menu file is finished. Now we need to tell Openbox to read +this menu file. We do this by editing the file ~/.openbox/rc. + +NOTE: your ~/.openbox/rc is auotmatically updated every time Openbox restarts, +reconfigures, changes styles or exits. Changes to dynamic data like workspace +count, names, etc. is lost. About the only thing you can change and have it +preserved is the menu filename, which is what we are about to change. + +The format of ~/.openbox/rc is in the X resource database format (just like +~/.Xdefaults). Since the file is updated automatically, it may be full of +stuff or it may not even exist (especially if this is the first time we've +ran Openbox). Don't worry if you have to create ~/.openbox/rc, Openbox will +see the file the next time it starts. + +What we need to do is change the resource for the menu's filename. This is +done by changing (or adding) the line that looks like so: + +... +session.menuFile: /path/to/some/file +... + +If this resource exists, we change it. If it does not, we add it. Depending +on where we put the menu file, our new resource could look like this: + +... +session.menuFile: /home/bhughes/.openbox/rootmenu +... + +We save ~/.openbox/rc and then restart Openbox (reconfiguring doesn't work, +we need Openbox to completely shutdown and reread ALL of it's configuration +files, not just the ones that control colors/fonts/etc.) + +If we've done everything correctly, Openbox restarts itself and our new menu +is now ready for use. If something doesn't work, read over the above example +again to make sure you didn't forget a step or leave out the necessary tags. + +Now that Openbox has been told where to find it's menu, it does a little more. +Openbox 0.51.x introduced automagic menu updates. As long as you never +change session.menuFile, you will never have to restart or reconfigure Openbox +whenever you change your menu. Openbox watches the timestamps on all the +files it reads to build your menu. If any of them change, they are reread and +your menu updated. This check is done everytime you open the root menu. Like +I said... it is a check, it doesn't reread the menu everytime, it just looks +at the modification time and rereads when it changes. diff --git a/data/README.style b/data/README.style new file mode 100644 index 00000000..c2e816ef --- /dev/null +++ b/data/README.style @@ -0,0 +1,326 @@ +Creating a new style (aka "theme"): +----------------------------------- +After getting Openbox up and running, the next thing you want to do is change +the colors/fonts/etc. on the screen. Openbox uses a "style" to read its +configuration information. A style in Openbox consists of X resources placed +in a file. Just like the menu file (see README.menu), the style file can be +put anywhere on the filesystem; as long as you have read access to the file, +Openbox can use it. + +First, we need to decide where to put our style file, and what to name it. +I recommend using the naming scheme described on http://bb.classic.themes.org/ +when creating styles. + +Let's get started. Let's put our new style into a file named `results.' +Following the themes.org naming scheme, this file will go into +.openbox/styles. Same as with the menu file, we use our favorite text editor +to create the new style. + +X resources consist of a key and a value. The key is constructed of several +smaller keys, delimited by a period (`.'). Keys may also contain a star (`*') +to serve as a wildcard, which means that one line of typed text will match +several keys. This is useful for styles that are based on one or two colors. + +Openbox allows you to configure it's three main components: the toolbar, the +menus and the window decorations. Lets begin by creating a style for our +toolbar. + +First we need to define a "texture" for the toolbar and it's components. +Textures tell Openbox how to mold or shape the colors we supply. + +A texture is comprised of the following elements: + + Raised / Sunken / Flat give the component a raised, sunken + or flat appearance (respectively) + + Solid / Gradient tell Openbox whether to draw a solid + or gradiented texture + + Interlaced tells Openbox to interlace a + gradient (and gradient ONLY) texture + + Bevel1 / Bevel2 tells Openbox which type of bevel + to use. + +NOTE on Bevel1 / Bevel2: + +Bevel1 is the default bevel. The shading is placed on the edge of the image. +Bevel2 is an alternative. The shading is placed one pixel in from the edge +of the image. + +Now that we understand that, let's define the textures for the toolbar. The +toolbar has a main frame, buttons, two labels and a clock label. The buttons +have 2 states, so we provide textures for both the normal and the pressed +state. + +... +toolbar: Raised Diagonal Gradient Bevel1 +toolbar.button: Raised Diagonal Gradient Bevel1 +toolbar.button.pressed: Sunken Diagonal Interlaced Gradient Bevel1 +toolbar.clock: Flat Interlaced Gradient +toolbar.label: Flat Interlaced Gradient +... + +NOTE: the texture strings don't have to be capitalized like they did in +previous versions. They are still placed in capitals here, because things like +the bbtools still use the old method. + +Next we define colors for the textures. Colors can be any valid X colorname +(from the RGB database) or it can be a color specifier, as described by +'man 1 X.' + +Let's see how our file looks after adding colors: + +... +toolbar: Raised Diagonal Gradient Bevel1 +toolbar.button: Raised Diagonal Gradient Bevel1 +toolbar.button.pressed: Sunken Diagonal Interlaced Gradient Bevel1 +toolbar.clock: Flat Interlaced Gradient +toolbar.label: Flat Interlaced Gradient + +toolbar.color: rgb:8/8/7 +toolbar.colorTo: grey20 +toolbar.button.color: grey +toolbar.button.colorTo: grey20 +toolbar.button.pressed.color: rgb:4/4/38 +toolbar.button.pressed.colorTo: rgb:f/f/d +toolbar.clock.color: grey20 +toolbar.clock.colorTo: rgb:8/8/7 +toolbar.label.color: grey20 +toolbar.label.colorTo: rgb:8/8/7 +toolbar.textColor: grey85 +... + +As you have noticed, all textures have a color and a colorTo key. These keys +are required for gradient images. For solids, only color is needed. You will +also notice that we have supplied the color for the text on the toolbar. Not +all textures have a text color, just certain base textures. + +Next, let's move onto the menus. Since Openbox was written in C++, all of +the menus used in it are subclasses of one generic base class. Openbox reads +the style for the configuration for that base class, which applies to all +the menus used in Openbox. + +The menu has two main parts, the title and the frame. There is nothing +visible under them, so we only configure these two components. The menu frame +and menu title BOTH have a configurable text color, and the menu frame has a +highlight color and the corresponding highlighted text color key. Let's assign +some textures and colors to our menu, and see what our style file looks like +so far: + +... +toolbar: Raised Diagonal Gradient Bevel1 +toolbar.button: Raised Diagonal Gradient Bevel1 +toolbar.button.pressed: Sunken Diagonal Interlaced Gradient Bevel1 +toolbar.clock: Flat Interlaced Gradient +toolbar.label: Flat Interlaced Gradient + +toolbar.color: rgb:8/8/7 +toolbar.colorTo: grey20 +toolbar.button.color: grey +toolbar.button.colorTo: grey20 +toolbar.button.pressed.color: rgb:4/4/38 +toolbar.button.pressed.colorTo: rgb:f/f/d +toolbar.clock.color: grey20 +toolbar.clock.colorTo: rgb:8/8/7 +toolbar.label.color: grey20 +toolbar.label.colorTo: rgb:8/8/7 +toolbar.textColor: grey85 + +menu.title: Raised Diagonal Interlaced Gradient Bevel1 +menu.frame: Raised Diagonal Gradient Bevel1 + +menu.title.color: grey20 +menu.title.colorTo: rgb:8/8/7 +menu.title.textColor: grey85 +menu.frame.color: rgb:8/8/7 +menu.frame.colorTo: grey10 +menu.frame.textColor: white +menu.frame.highlightColor: grey85 +menu.frame.hiTextColor: grey20 +... + +Next, we need to configure our windows. Windows are like buttons, they have +two states, focused and unfocused. There for we define a separate texture +for unfocused windows and focused windows. The buttons on the titlebar +are focus dependant also, so we need to configure them as well. The buttons +only have one "pressed" state, so we only have to define that once, instead of +having a focus.pressed state and an unfocus.pressed state. The window frame +is the thin border around the client window. Let's be sure to catch it as well. + +After adding the window config, our style now looks like this: + +... + +toolbar: Raised Diagonal Gradient Bevel1 +toolbar.button: Raised Diagonal Gradient Bevel1 +toolbar.button.pressed: Sunken Diagonal Interlaced Gradient Bevel1 +toolbar.clock: Flat Interlaced Gradient +toolbar.label: Flat Interlaced Gradient + +toolbar.color: rgb:8/8/7 +toolbar.colorTo: grey20 +toolbar.button.color: grey +toolbar.button.colorTo: grey20 +toolbar.button.pressed.color: rgb:4/4/38 +toolbar.button.pressed.colorTo: rgb:f/f/d +toolbar.clock.color: grey20 +toolbar.clock.colorTo: rgb:8/8/7 +toolbar.label.color: grey20 +toolbar.label.colorTo: rgb:8/8/7 +toolbar.textColor: grey85 + +menu.title: Raised Diagonal Interlaced Gradient Bevel1 +menu.frame: Raised Diagonal Gradient Bevel1 + +menu.title.color: grey20 +menu.title.colorTo: rgb:8/8/7 +menu.title.textColor: grey85 +menu.frame.color: rgb:8/8/7 +menu.frame.colorTo: grey10 +menu.frame.textColor: white +menu.frame.highlightColor: grey85 +menu.frame.hiTextColor: grey20 + +window.focus: Raised Diagonal Interlaced Gradient Bevel1 +window.focus.button: Raised Diagonal Gradient Bevel1 +window.unfocus: Raised Diagonal Gradient Bevel1 +window.unfocus.button: Sunken Diagonal Gradient Bevel1 +window.button.pressed: Flat Diagonal Interlaced Gradient +window.frame: Raised Solid Bevel1 + +window.focus.color: grey +window.focus.colorTo: grey20 +window.focus.textColor: grey85 +window.focus.button.color: grey +window.focus.button.colorTo: grey20 +window.unfocus.color: rgb:8/8/7 +window.unfocus.colorTo: grey20 +window.unfocus.textColor: grey +window.unfocus.button.color: grey20 +window.unfocus.button.colorTo: grey +window.button.pressed.color: rgb:4/4/38 +window.button.pressed.colorTo: rgb:f/f/d +window.frame.color: grey85 +... + +Now all we have to do is finish off the style with a few miscellanous options. +These include the title and menu fonts/justification, border color, bevel and +handle widths, window move style and the root command. + +Fonts must be a valid X11 font screen, or a valid font alias. Use a utility +like `xfontsel' (and others) to preview fonts. Also use the utility +`xlsfonts' to spit out all the current X font names and aliases stored in +the X server. + +Justification can be one of three things: LeftJustify, CenterJustify or +RightJustify. + +The border color is the color applied to the 1 pixel border around the menu +frame/title and the window titlebar/buttons/handle/etc. Setting this color +can have drastic effects on your style, so don't just leave it set to `black' +all the time. ;) + +The bevel and handle widths control the size and spacing of decorations in +Openbox. The larger the number, the more space Openbox takes up. + +The window move style tells Openbox how to move windows when you drag them +with your mouse. There are two options for it: Opaque or Wire. + +The root command is the command run every time the style is loaded (either at +startup or after a reconfigure/style-change). It is used to run a program +like xv, Esetroot, wmsetbg, etc. to set an image/color/pattern on the root +window. Just supply a command and it will be run. + +Also, as a note, an X resource file can have comments. Precede the line with +and exclamation mark `!' and the rest of the line will be ignored. + +Let's finish off the details and take a look at our finished style: + +... +! Results - theme for Openbox +! by Brad Hughes bhughes@tcac.net + +toolbar: Raised Diagonal Gradient Bevel1 +toolbar.button: Raised Diagonal Gradient Bevel1 +toolbar.button.pressed: Sunken Diagonal Interlaced Gradient Bevel1 +toolbar.clock: Flat Interlaced Gradient +toolbar.label: Flat Interlaced Gradient + +! toolbar colors +toolbar.color: rgb:8/8/7 +toolbar.colorTo: grey20 +toolbar.button.color: grey +toolbar.button.colorTo: grey20 +toolbar.button.pressed.color: rgb:4/4/38 +toolbar.button.pressed.colorTo: rgb:f/f/d +toolbar.clock.color: grey20 +toolbar.clock.colorTo: rgb:8/8/7 +toolbar.label.color: grey20 +toolbar.label.colorTo: rgb:8/8/7 +toolbar.textColor: grey85 + +! menu textures +menu.title: Raised Diagonal Interlaced Gradient Bevel1 +menu.frame: Raised Diagonal Gradient Bevel1 + +! menu colors +menu.title.color: grey20 +menu.title.colorTo: rgb:8/8/7 +menu.title.textColor: grey85 +menu.frame.color: rgb:8/8/7 +menu.frame.colorTo: grey10 +menu.frame.textColor: white +menu.frame.highlightColor: grey85 +menu.frame.hiTextColor: grey20 + +! window textures +window.focus: Raised Diagonal Interlaced Gradient Bevel1 +window.focus.button: Raised Diagonal Gradient Bevel1 +window.unfocus: Raised Diagonal Gradient Bevel1 +window.unfocus.button: Sunken Diagonal Gradient Bevel1 +window.button.pressed: Flat Diagonal Interlaced Gradient +window.frame: Raised Solid Bevel1 + +! window colors +window.focus.color: grey +window.focus.colorTo: grey20 +window.focus.textColor: grey85 +window.focus.button.color: grey +window.focus.button.colorTo: grey20 +window.unfocus.color: rgb:8/8/7 +window.unfocus.colorTo: grey20 +window.unfocus.textColor: grey +window.unfocus.button.color: grey20 +window.unfocus.button.colorTo: grey +window.button.pressed.color: rgb:4/4/38 +window.button.pressed.colorTo: rgb:f/f/d +window.frame.color: grey85 + +! misc... +borderColor: rgb:2/2/1c + +moveStyle: Opaque + +menuJustify: CenterJustify +titleJustify: CenterJustify + +bevelWidth: 2 +handleWidth: 4 + +menuFont: lucidasans-10 +titleFont: lucidasans-bold-10 + +rootCommand: bsetroot -mod 4 4 -fg rgb:6/6/5c -bg grey20 +... + +Alright! Our style is finished. Let's see how the sucker looks. First we +need to tell Openbox to use the new style. The way to do that is to edit +your menu (refer to README.menu for this) and add: + +[style] (Results) {~/.openbox/styles/results} + +somewhere in our menu. Taking advantage of Openbox' automagic menu updates, +all we have to do is close and reopen the root menu and our new style entry +will be visible. Select it and Openbox will apply the new style we just +created. diff --git a/data/menu.in b/data/menu.in new file mode 100644 index 00000000..d3ab23bf --- /dev/null +++ b/data/menu.in @@ -0,0 +1,107 @@ +# This is the default menu file for Openbox +# +# Lines beginning with the '#' character are ignored. +# +# The new syntax is simpler than the old X resource format... +# Each menu item consists of 2 or 3 fields: +# +# [command] (label) {data} +# +# where [command] is one of: +# +# [begin] [end] [exec] [exit] [reconfig] [restart] +# [submenu] [style] [include] [workspaces] [config] +# +# [begin] is used for the top level menu +# [submenu] is used for submenus +# [end] must be used with BOTH [begin] and [submenu] to tell the parser to stop +# reading from the file. +# +# [exec] (label) {string} +# This will insert an item that runs a program. +# +# [exit] (label) +# This will insert an item that exits the window manager. +# +# [reconfig] (label) {string} +# This will insert an item that tells Openbox to re-read it's configuration +# files. {string} is optional, and if supplied, will execute the string with +# /bin/sh -c before the reconfiguration is performed. (this is helpful for +# writing multiple config files and switching between them) +# +# [restart] (label) {string} +# This will insert an item to restart the window manager. {string} is +# optional, and if omitted, Openbox will restart itself. If {string} is +# specified, then a different window manager will be started. +# +# [style] (filename) +# This will insert an item to reconfigure Openbox with the new style. This +# change is saved when Openbox exits or restarts. +# +# [include] (filename) +# This will read more menu items from the file "filename". The file cannot +# contain a [begin] or [end], except for the [end] needed for submenus. +# +# [workspaces] (label) +# This tells Openbox to insert a "link" to the workspaces menu directly +# into your menu. +# +# [config] (label) +# This tells Openbox to insert the ConfigMenu into your menu. The ConfigMenu +# allows you to change several options found in your ~/.openbox/rc file on the +# fly. +# +# example: + +[begin] (Openbox) + [exec] (xterm) {xterm -ls} + [exec] (rxvt) {rxvt} + + [exec] (StarOffice) {soffice} + [exec] (XEmacs) {xemacs} + [exec] (Acroread) {acroread} + + [submenu] (Graphics) + [exec] (The GIMP) {gimp} + [exec] (Image Magick) {display} + [end] + + [submenu] (Mozilla) + [exec] (Mozilla Navigator) {mozilla} + [submenu] (More...) + [exec] (Mozilla Mail) {mozilla -mail} + [exec] (Mozilla News) {mozilla -news} + [exec] (Mozilla Composer) {mozilla -edit} + [end] + [end] + + [submenu] (X Utilities) + [exec] (Xfontsel) {xfontsel} + [exec] (Xman) {xman} + [exec] (Xcalc) {xcalc} + [exec] (Xload) {xload} + [end] + + [submenu] (Styles) {Choose a style...} + [stylesdir] (@pkgdatadir@/styles) + [end] + + [workspaces] (Workspace List) + [config] (Configuration) + + [reconfig] (Reconfigure) + [restart] (Restart) + [submenu] (Others) {Other Window Managers} + [restart] (Start FVWM) {fvwm} + [restart] (Start WindowMaker) {wmaker} + [restart] (Start Afterstep) {afterstep} + [restart] (Start Enlightenment) {enlightenment} + [restart] (Start TWM) {twm} + [restart] (Start KWM) {kwm} + [end] + + [exit] (Exit) +[end] + +# End of example menu. + diff --git a/data/styles/Makefile.am b/data/styles/Makefile.am new file mode 100644 index 00000000..38053588 --- /dev/null +++ b/data/styles/Makefile.am @@ -0,0 +1,8 @@ +# data/styles/Makefile.am for Openbox + +styledir = $(pkgdatadir)/styles +MAINTAINERCLEANFILES = Makefile.in +style_DATA = artwiz bluebox cthulhain flux nyz nyzclone operation outcomes shade the_orange trisb twice frobozz frobust steelblue steelblue2 + +distclean-local: + rm -f *\~ diff --git a/data/styles/Makefile.in b/data/styles/Makefile.in new file mode 100644 index 00000000..6df1f4b0 --- /dev/null +++ b/data/styles/Makefile.in @@ -0,0 +1,215 @@ +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# data/styles/Makefile.am for Openbox + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = ../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CLOBBER = @CLOBBER@ +CXX = @CXX@ +DEBUG = @DEBUG@ +INTERLACE = @INTERLACE@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +NEWWMSPEC = @NEWWMSPEC@ +NLS = @NLS@ +ORDEREDPSEUDO = @ORDEREDPSEUDO@ +PACKAGE = @PACKAGE@ +SHAPE = @SHAPE@ +SLIT = @SLIT@ +TIMEDCACHE = @TIMEDCACHE@ +VERSION = @VERSION@ +gencat_cmd = @gencat_cmd@ +regex_cmd = @regex_cmd@ + +styledir = $(pkgdatadir)/styles +MAINTAINERCLEANFILES = Makefile.in +style_DATA = artwiz bluebox cthulhain flux nyz nyzclone operation outcomes shade the_orange trisb twice frobozz frobust steelblue steelblue2 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../../config.h +CONFIG_CLEAN_FILES = +DATA = $(style_DATA) + +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu data/styles/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +install-styleDATA: $(style_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(styledir) + @list='$(style_DATA)'; for p in $$list; do \ + if test -f $(srcdir)/$$p; then \ + echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(styledir)/$$p"; \ + $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(styledir)/$$p; \ + else if test -f $$p; then \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(styledir)/$$p"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(styledir)/$$p; \ + fi; fi; \ + done + +uninstall-styleDATA: + @$(NORMAL_UNINSTALL) + list='$(style_DATA)'; for p in $$list; do \ + rm -f $(DESTDIR)$(styledir)/$$p; \ + done +tags: TAGS +TAGS: + + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = data/styles + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu data/styles/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: install-styleDATA +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-styleDATA +uninstall: uninstall-am +all-am: Makefile $(DATA) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + $(mkinstalldirs) $(DESTDIR)$(styledir) + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +mostlyclean-am: mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-generic clean-am distclean-local + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: uninstall-styleDATA install-styleDATA tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +distclean-local: + rm -f *\~ + +# 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: diff --git a/data/styles/artwiz b/data/styles/artwiz new file mode 100644 index 00000000..c08b5eae --- /dev/null +++ b/data/styles/artwiz @@ -0,0 +1,109 @@ +toolbar: raised gradient vertical +toolbar.color: rgb:80/84/88 +toolbar.colorTo: rgb:30/34/38 + +toolbar.button: raised gradient diagonal +toolbar.button.color: rgb:90/94/98 +toolbar.button.colorTo: rgb:20/24/28 +toolbar.button.picColor: white + +toolbar.button.pressed: sunken gradient diagonal +toolbar.button.pressed.color: black +toolbar.button.pressed.colorTo: rgb:80/98/d0 + +toolbar.clock: sunken gradient diagonal +toolbar.clock.color: rgb:10/20/30 +toolbar.clock.colorTo: rgb:70/80/90 +toolbar.clock.textColor: white + +toolbar.label: sunken gradient diagonal +toolbar.label.color: rgb:10/20/30 +toolbar.label.colorTo: rgb:70/80/90 +toolbar.label.textColor: white + +toolbar.windowLabel: sunken gradient diagonal +toolbar.windowLabel.color: rgb:10/20/30 +toolbar.windowLabel.colorTo: rgb:70/80/90 +toolbar.windowLabel.textColor: white + +toolbar.justify: center + + +menu.title: raised gradient diagonal +menu.title.color: rgb:90/94/98 +menu.title.colorTo: rgb:20/24/28 +menu.title.textColor: white +menu.title.justify: center + +menu.frame: sunken gradient diagonal +menu.frame.color: rgb:10/20/30 +menu.frame.colorTo: rgb:70/80/90 +menu.frame.textColor: rgb:90/a0/b0 +menu.frame.justify: center + +menu.hilite: raised gradient diagonal +menu.hilite.color: rgb:90/94/98 +menu.hilite.colorTo: rgb:20/24/28 +menu.hilite.textColor: white + +menu.bullet: empty +menu.bullet.position: right + + +window.title.focus: raised gradient vertical +window.title.focus.color: rgb:80/84/88 +window.title.focus.colorTo: rgb:30/34/38 +window.title.unfocus: raised vertical gradient +window.title.unfocus.color: rgb:50/54/58 +window.title.unfocus.colorTo: black + +window.label.focus: sunken diagonal gradient +window.label.focus.color: rgb:10/20/30 +window.label.focus.colorTo: rgb:70/80/90 +window.label.focus.textColor: white +window.label.unfocus: sunken gradient diagonal +window.label.unfocus.color: black +window.label.unfocus.colorTo: rgb:40/50/60 +window.label.unfocus.textColor: rgb:60/64/68 + +window.button.focus: raised gradient diagonal +window.button.focus.color: rgb:90/94/98 +window.button.focus.colorTo: rgb:20/24/28 +window.button.focus.picColor: white +window.button.unfocus: raised gradient diagonal +window.button.unfocus.color: rgb:50/54/58 +window.button.unfocus.colorTo: black +window.button.unfocus.picColor: rgb:70/74/78 +window.button.pressed: sunken gradient diagonal +window.button.pressed.color: rgb:20/40/50 +window.button.pressed.colorTo: rgb:60/70/80 + +window.frame.focusColor: rgb:40/44/48 +window.frame.unfocusColor: rgb:20/24/28 + +window.handle.focus: raised gradient diagonal +window.handle.focus.color: rgb:70/74/78 +window.handle.focus.colorTo: rgb:40/44/48 +window.handle.unfocus: raised gradient diagonal +window.handle.unfocus.color: rgb:50/54/58 +window.handle.unfocus.colorTo: black + +window.grip.focus: sunken diagonal gradient +window.grip.focus.color: rgb:20/30/40 +window.grip.focus.colorTo: rgb:60/70/80 +window.grip.unfocus: sunken diagonal gradient +window.grip.unfocus.color: black +window.grip.unfocus.colorTo: rgb:30/40/50 + +window.justify: center + + +borderColor: black + +bevelWidth: 2 +borderWidth: 1 +handleWidth: 5 + +rootCommand: bsetroot -mod 4 4 -bg rgb:10/18/20 -fg rgb:30/38/40 + +*Font: -*-lucidatypewriter-medium-r-*-*-*-100-*-*-*-*-*-* diff --git a/data/styles/bluebox b/data/styles/bluebox new file mode 100644 index 00000000..30cf3473 --- /dev/null +++ b/data/styles/bluebox @@ -0,0 +1,155 @@ +! Miscellaneous settings... +style.name: bluebox +style.author: miklos +style.date: Thu, Mar 21, 2002 +style.credits: +style.comments: + + +rootCommand: bsetbg -solid "#414b57" + +! Toolbar settings... +toolbar.button: Flat Gradient Vertical +toolbar.button.color: #46505d +toolbar.button.colorTo: #67788b +toolbar.button.picColor: #d7e0ee + +toolbar.button.pressed: Sunken Bevel1 Gradient Diagonal +toolbar.button.pressed.color: #6a7482 +toolbar.button.pressed.colorTo: #73787e + +toolbar.label: Flat Gradient Vertical +toolbar.label.color: #414b57 +toolbar.label.colorTo: #6a7b8f +toolbar.label.textColor: #d7e0ee + +toolbar.windowLabel: Sunken Bevel1 Gradient Vertical +toolbar.windowLabel.color: #21354a +toolbar.windowLabel.colorTo: #406285 +toolbar.windowLabel.textColor: #d7e0ee + +toolbar.clock: Flat Gradient Vertical +toolbar.clock.color: #414b57 +toolbar.clock.colorTo: #6a7b8f +toolbar.clock.textColor: #d7e0ee + +toolbar: Raised Bevel1 Gradient Vertical +toolbar.color: #414b57 +toolbar.colorTo: #6a7b8f +toolbar.textColor: #d7e0ee +!toolbar.font: gelly +toolbar.font: -*-lucida-medium-r-*-*-*-100-*-*-*-*-*-* +toolbar.justify: Center + + +! Menu settings... +menu.frame: Flat Gradient Horizontal +menu.frame.color: #2c333b +menu.frame.colorTo: #6a7b8f +menu.frame.textColor: #becad4 +!menu.frame.font: gelly +menu.frame.font: -*-lucida-medium-r-*-*-*-100-*-*-*-*-*-* +menu.frame.justify: Left + +menu.title: Raised Gradient Vertical +menu.title.color: #414b57 +menu.title.colorTo: #67788b +menu.title.textColor: #8998ab +!menu.title.font: gelly +menu.title.font: -*-lucida-medium-r-*-*-*-100-*-*-*-*-*-* +menu.title.justify: Center + +menu.hilite: Sunken Bevel1 Gradient Horizontal +menu.hilite.color: #21354a +menu.hilite.colorTo: #406285 +menu.hilite.textColor: #a8bed6 + +menu.bullet: Triangle +menu.bullet.position: Right +menu.frame.disableColor: #ffffff + +! Window settings... +window.button.focus: Flat Gradient Vertical +window.button.focus.color: #46505d +window.button.focus.colorTo: #67788b +window.button.focus.picColor: #d8e0ee + +window.button.unfocus: Flat Gradient Vertical +window.button.unfocus.color: #46505d +window.button.unfocus.colorTo: #67788b +window.button.unfocus.picColor: #7e8c9d + +window.grip.focus: Raised Bevel1 Solid Vertical +window.grip.focus.color: #46505d +window.grip.focus.colorTo: #ffffff + +window.grip.unfocus: Raised Bevel1 Solid Horizontal +window.grip.unfocus.color: #3c4550 +window.grip.unfocus.colorTo: #ffffff + +window.handle.focus: Raised Bevel1 Solid Vertical +window.handle.focus.color: #46505d +window.handle.focus.colorTo: #ffffff + +window.handle.unfocus: Raised Bevel1 Solid Horizontal +window.handle.unfocus.color: #3c4550 +window.handle.unfocus.colorTo: #ffffff + +window.label.focus: Sunken Bevel1 Gradient Vertical +window.label.focus.color: #21354a +window.label.focus.colorTo: #406285 +window.label.focus.textColor: #d7e0ee +!window.label.focus.font: gelly +window.label.focus.font: -*-lucida-medium-r-*-*-*-100-*-*-*-*-*-* +window.label.focus.justify: Center + +!window.font: gelly +window.font: -*-lucida-medium-r-*-*-*-100-*-*-*-*-*-* +window.justify: Center +window.label.unfocus: Flat Gradient Vertical +window.label.unfocus.color: #414b57 +window.label.unfocus.colorTo: #6a7b8f +window.label.unfocus.textColor: #7e8c9d + +window.title.focus: Raised Bevel1 Gradient Vertical +window.title.focus.color: #414b57 +window.title.focus.colorTo: #6a7b8f + +window.title.unfocus: Raised Bevel1 Gradient Vertical +window.title.unfocus.color: #414b57 +window.title.unfocus.colorTo: #6a7b8f + +window.button.pressed: Sunken Bevel1 Gradient Diagonal +window.button.pressed.color: #6a7482 +window.button.pressed.colorTo: #73787e + +window.frame.focusColor: #73787e +window.frame.unfocusColor: #62666b +handleWidth: 1 +frameWidth: 0 +bevelWidth: 1 +borderWidth: 1 +borderColor: #000000 + +bbpager.frame: raised solid + bbpager.frame.color: #515b67 + +bbpager.desktop: sunken solid + bbpager.desktop.color: #414b57 + +bbpager.desktop.focus: raised solid + bbpager.desktop.focus.color: #ffffff + +bbpager.window.focus: raised gradient vertical + bbpager.window.focus.color: #21354a + bbpager.window.focus.colorTo: #406285 + +bbpager.window: flat gradient vertical + bbpager.window.color: #414b57 + bbpager.window.colorTo: #6a7b8f + +bbpager.desktop.focusStyle: border +bbpager.active.window.borderColor: #202020 +bbpager.inactive.window.borderColor: #000000 +bbpager.active.desktop.borderColor: #73787e + diff --git a/data/styles/cthulhain b/data/styles/cthulhain new file mode 100644 index 00000000..028662eb --- /dev/null +++ b/data/styles/cthulhain @@ -0,0 +1,140 @@ +! Title: cthulhain +! By: cthulhain (http://lordzork.com/blackbox/ +! Email: cthulhain@lordzork.com +! Comment: no comment + +! ***** toolbar ***** +toolbar: raised gradient vertical + toolbar.color: #585858 + toolbar.colorTo: #0f1319 + +toolbar.label: parentrelative + toolbar.label.textColor: #cccccc + +toolbar.windowLabel: sunken gradient crossdiagonal + toolbar.windowLabel.color: #151a22 + toolbar.windowLabel.colorTo: #7a8290 + toolbar.windowLabel.textColor: #ffffff + +toolbar.clock: parentrelative + toolbar.clock.textColor: #cccccc + +toolbar.button: parentrelative + toolbar.button.picColor: #cccccc + +toolbar.button.pressed: flat gradient vertical + toolbar.button.pressed.color: #0f1319 + toolbar.button.pressed.colorTo: #7a8290 + + +! ***** menu ***** +menu.title: raised gradient crossdiagonal + menu.title.color: #151a22 + menu.title.colorTo: #7a8290 + menu.title.textColor: #ffffff + +menu.frame: sunken gradient crossdiagonal + menu.frame.color: #0f1319 + menu.frame.colorTo: gray40 + menu.frame.textColor: #cccccc + +menu.hilite: sunken gradient crossdiagonal + menu.hilite.color: #151a22 + menu.hilite.colorTo: #7a8290 + menu.hilite.textColor: #ffffff + +menu.bullet: triangle + menu.bullet.position: right + + +! ***** window focused ***** +window.title.focus: raised gradient diagonal + window.title.focus.color: gray40 + window.title.focus.colorTo: #0f1319 + +window.label.focus: sunken gradient crossdiagonal + window.label.focus.color: #151a22 + window.label.focus.colorTo: #7a8290 + window.label.focus.textColor: gray90 + +window.button.focus: parentrelative + window.button.focus.picColor: #cccccc + +window.button.pressed: flat gradient vertical + window.button.pressed.color: #0f1319 + window.button.pressed.colorTo: #7a8290 + +window.handle.focus: raised gradient diagonal + window.handle.focus.color: gray50 + window.handle.focus.colorTo: #0f1319 + +window.grip.focus: raised gradient diagonal + window.grip.focus.color: #7a8290 + window.grip.focus.colorTo: #151a22 + +window.frame.focusColor: #858585 +window.frame.focus.color: #858585 + + +! ***** window unfocused ***** +window.title.unfocus: raised gradient diagonal + window.title.unfocus.color: gray40 + window.title.unfocus.colorTo: #0f1319 + +window.label.unfocus: parentrelative + window.label.unfocus.textColor: #808080 + +window.button.unfocus: parentrelative + window.button.unfocus.picColor: #727272 + +window.handle.unfocus: raised gradient diagonal + window.handle.unfocus.color: gray50 + window.handle.unfocus.colorTo: #0f1319 + +window.grip.unfocus: raised gradient diagonal + window.grip.unfocus.color: gray50 + window.grip.unfocus.colorTo: #0f1319 + +window.frame.unfocusColor: #5e6166 +window.frame.unfocus.color: #5e6166 + + +! ***** fonts ***** +*.font: -*-lucida-medium-r-*-*-*-100-*-*-*-*-* + toolbar.justify: center + window.justify: right + menu.title.justify: center + menu.frame.justify: right + +! ***** the rest ***** +borderColor: #202020 +borderWidth: 1 +bevelWidth: 2 +handleWidth: 4 +frameWidth: 0 + +rootCommand: bsetbg -solid "#3a404b" + +! ***** bbpager ***** +bbpager.frame: sunken gradient crossdiagonal + bbpager.frame.color: #151a22 + bbpager.frame.colorTo: #7a8290 + +bbpager.desktop: parentrelative + +bbpager.desktop.focus: flat gradient vertical + bbpager.desktop.focus.color: #0f1319 + bbpager.desktop.focus.colorTo: gray40 + +bbpager.window: raised gradient vertical + bbpager.window.color: gray40 + bbpager.window.colorTo: #0f1319 + +bbpager.window.focus: raised gradient crossdiagonal + bbpager.window.focus.color: #151a22 + bbpager.window.focus.colorTo: #7a8290 + +bbpager.desktop.focusStyle: border +bbpager.active.window.borderColor: #202020 +bbpager.inactive.window.borderColor: #202020 +bbpager.active.desktop.borderColor: #0f1319 diff --git a/data/styles/flux b/data/styles/flux new file mode 100644 index 00000000..5bdca879 --- /dev/null +++ b/data/styles/flux @@ -0,0 +1,91 @@ +toolbar: flat solid +toolbar.color: rgb:6/6/54 +toolbar.button: flat solid +toolbar.button.color: rgb:6/6/54 +toolbar.button.picColor: rgb:2/2/1c +toolbar.label: flat crossdiagonal gradient +toolbar.label.color: rgb:8/8/7 +toolbar.label.colorTo: rgb:f/f/d +toolbar.label.textColor: rgb:2/2/1c +toolbar.windowLabel: flat crossdiagonal gradient +toolbar.windowLabel.color: rgb:8/8/7 +toolbar.windowLabel.colorTo: rgb:f/f/d +toolbar.windowLabel.textColor: rgb:2/2/1c +toolbar.clock: flat crossdiagonal gradient +toolbar.clock.color: rgb:8/8/7 +toolbar.clock.colorTo: rgb:f/f/d +toolbar.clock.textColor: rgb:2/2/1c +toolbar.justify: right +toolbar.font: lucidasans-10 + +menu.title: flat crossdiagonal gradient +menu.title.color: rgb:8/8/7 +menu.title.colorTo: rgb:f/f/d +menu.title.textColor: rgb:2/2/1c +menu.title.font: lucidasans-10 +menu.title.justify: right + +menu.frame: flat solid +menu.frame.color: rgb:6/6/54 +menu.frame.textColor: grey85 +menu.frame.disableColor: rgb:4/4/38 +menu.frame.font: lucidasans-10 +menu.frame.justify: center + +menu.bullet.position: right +menu.bullet: triangle + +menu.hilite: flat solid +menu.hilite.color: rgb:4/4/38 +menu.hilite.textColor: white + +window.title.focus: flat solid +window.title.focus.color: rgb:6/6/54 +window.title.unfocus: flat solid +window.title.unfocus.color: rgb:4/4/38 + +window.label.focus: flat crossdiagonal gradient +window.label.focus.color: rgb:8/8/7 +window.label.focus.colorTo: rgb:f/f/d +window.label.focus.textColor: rgb:2/2/1c +window.label.unfocus: flat solid +window.label.unfocus.color: rgb:4/4/38 +window.label.unfocus.textColor: rgb:2/2/1c + +window.button.focus: flat solid +window.button.focus.color: rgb:6/6/54 +window.button.focus.picColor: rgb:2/2/1c +window.button.unfocus: flat solid +window.button.unfocus.color: rgb:4/4/38 +window.button.unfocus.picColor: rgb:2/2/1c + +window.handle.focus: flat crossdiagonal gradient +window.handle.focus.color: rgb:8/8/7 +window.handle.focus.colorTo: rgb:f/f/d +window.handle.unfocus: flat solid +window.handle.unfocus.color: rgb:4/4/38 + +window.grip.focus: flat solid +window.grip.focus.color: rgb:8/8/7 +window.grip.unfocus: flat solid +window.grip.unfocus.color: rgb:4/4/38 + +window.frame.focusColor: rgb:f/f/d +window.frame.unfocusColor: rgb:6/6/54 + +window.font: lucidasans-10 +window.justify: right + +*button.pressed: flat solid +*button.pressed.color: rgb:a/a/8c + +borderColor: rgb:2/2/1c + +bevelWidth: 2 +borderWidth: 2 +handleWidth: 3 + +*textColor: grey20 +*Font: lucidasans-10 + +rootCommand: bsetroot -solid rgb:4/4/38 diff --git a/data/styles/frobozz b/data/styles/frobozz new file mode 100644 index 00000000..e7e8f238 --- /dev/null +++ b/data/styles/frobozz @@ -0,0 +1,137 @@ +! frobozz for blackbox. +! Automagically generated by bbconf. + + +! Miscellaneous settings... +style.name: Untitled +style.author: Unnamed +style.date: Wed Jan 23 2002 +style.credits: +style.comments: + + +rootCommand: bsetbg -solid "#484848" + +! Toolbar settings... +toolbar.button: Flat Solid PipeCross +toolbar.button.color: #484848 +toolbar.button.colorTo: #ffffff +toolbar.button.picColor: #303030 + +toolbar.button.pressed: Sunken Bevel1 Solid Diagonal +toolbar.button.pressed.color: #484848 +toolbar.button.pressed.colorTo: #ffffff + +toolbar.label: parentrelative +toolbar.label.color: #ffffff +toolbar.label.colorTo: #ffffff +toolbar.label.textColor: #bcc3ce + +toolbar.windowLabel: Sunken Bevel1 Solid Pyramid +toolbar.windowLabel.color: #263340 +toolbar.windowLabel.colorTo: #ffffff +toolbar.windowLabel.textColor: #d7e0ee + +toolbar.clock: parentrelative +toolbar.clock.color: #ffffff +toolbar.clock.colorTo: #ffffff +toolbar.clock.textColor: #bcc3ce + +toolbar: Raised Bevel1 Solid Horizontal +toolbar.color: #484848 +toolbar.colorTo: #ffffff +toolbar.textColor: #ffffff +!toolbar.font: lime +toolbar.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +toolbar.justify: Center + + +! Menu settings... +menu.frame: Raised Bevel1 Solid Elliptic +menu.frame.color: #484848 +menu.frame.colorTo: #ffffff +menu.frame.textColor: #bcc3ce +!menu.frame.font: lime +menu.frame.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +menu.frame.justify: Right + +menu.title: Raised Bevel1 Solid PipeCross +menu.title.color: #263340 +menu.title.colorTo: #ffffff +menu.title.textColor: #d7e0ee +!menu.title.font: lime +menu.title.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +menu.title.justify: Center + +menu.hilite: Sunken Bevel1 Solid CrossDiagonal +menu.hilite.color: #263340 +menu.hilite.colorTo: #ffffff +menu.hilite.textColor: #d7e0ee + +menu.bullet: Triangle +menu.bullet.position: Right +menu.frame.disableColor: #ffffff + +! Window settings... +window.button.focus: Flat Solid PipeCross +window.button.focus.color: #484848 +window.button.focus.colorTo: #ffffff +window.button.focus.picColor: #303030 + +window.button.unfocus: Flat Solid Pyramid +window.button.unfocus.color: #484848 +window.button.unfocus.colorTo: #ffffff +window.button.unfocus.picColor: #404040 + +window.grip.focus: Raised Bevel1 Solid PipeCross +window.grip.focus.color: #485561 +window.grip.focus.colorTo: #ffffff + +window.grip.unfocus: Sunken Bevel1 Solid Pyramid +window.grip.unfocus.color: #484848 +window.grip.unfocus.colorTo: #ffffff + +window.handle.focus: Raised Bevel1 Solid Pyramid +window.handle.focus.color: #485561 +window.handle.focus.colorTo: #ffffff + +window.handle.unfocus: Raised Bevel1 Solid Pyramid +window.handle.unfocus.color: #484848 +window.handle.unfocus.colorTo: #ffffff + +window.label.focus: Sunken Bevel1 Solid Pyramid +window.label.focus.color: #263340 +window.label.focus.colorTo: #ffffff +window.label.focus.textColor: #d7e0ee +!window.label.focus.font: lime +window.label.focus.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +window.label.focus.justify: Left + +!window.font: lime +window.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +window.justify: Left +window.label.unfocus: parentrelative +window.label.unfocus.color: #ffffff +window.label.unfocus.colorTo: #ffffff +window.label.unfocus.textColor: #909090 + +window.title.focus: Raised Bevel1 Solid Diagonal +window.title.focus.color: #484848 +window.title.focus.colorTo: #ffffff + +window.title.unfocus: Raised Bevel1 Solid Diagonal +window.title.unfocus.color: #484848 +window.title.unfocus.colorTo: #ffffff + +window.button.pressed: Sunken Bevel1 Solid Diagonal +window.button.pressed.color: #484848 +window.button.pressed.colorTo: #ffffff + +window.frame.focusColor: #63707f +window.frame.unfocusColor: #5e6166 +handleWidth: 4 +frameWidth: 0 +bevelWidth: 0 +borderWidth: 1 +borderColor: #000000 + diff --git a/data/styles/frobust b/data/styles/frobust new file mode 100644 index 00000000..46a3ae1f --- /dev/null +++ b/data/styles/frobust @@ -0,0 +1,152 @@ + +style.name: frobust +style.author: miklos +style.date: Tue, 03.05.02 +style.credits: +style.comments: frobust! + + +rootCommand: bsetroot -mod 4 4 -bg "#4c4c4c" -fg "#3c3c3c" + +! Toolbar settings... +toolbar.button: Flat Gradient Vertical +toolbar.button.color: #4c4c4c +toolbar.button.colorTo: #414141 +toolbar.button.picColor: #d7e0ee + +toolbar.button.pressed: Sunken Bevel1 Gradient Diagonal +toolbar.button.pressed.color: #484848 +toolbar.button.pressed.colorTo: #73787e + +toolbar.label: Flat Gradient Vertical +toolbar.label.color: #4c4c4c +toolbar.label.colorTo: #414141 +toolbar.label.textColor: #d7e0ee + +toolbar.windowLabel: Sunken Bevel1 Gradient Vertical +toolbar.windowLabel.color: #aab0b9 +toolbar.windowLabel.colorTo: #73787e +toolbar.windowLabel.textColor: #000000 + +toolbar.clock: Flat Gradient Vertical +toolbar.clock.color: #4c4c4c +toolbar.clock.colorTo: #414141 +toolbar.clock.textColor: #d7e0ee + +toolbar: Raised Bevel1 Gradient Vertical +toolbar.color: #4c4c4c +toolbar.colorTo: #414141 +toolbar.textColor: #d7e0ee +!toolbar.font: creep +toolbar.font: -Adobe-Helvetica-Medium-R-Normal--10-100-75-75-P-56-ISO8859-2 +toolbar.justify: Center + + +! Menu settings... +menu.frame: Raised Solid +menu.frame.color: #4c4c4c +menu.frame.textColor: #d7e0ee +!menu.frame.font: creep +menu.frame.font: -Adobe-Helvetica-Medium-R-Normal--10-100-75-75-P-56-ISO8859-2 +menu.frame.justify: Right + +menu.title: Raised Bevel1 Solid PipeCross +menu.title.color: #8d929a +menu.title.colorTo: #73787e +menu.title.textColor: #000000 +!menu.title.font: creep +menu.title.font: -Adobe-Helvetica-Medium-R-Normal--10-100-75-75-P-56-ISO8859-2 +menu.title.justify: Center + +menu.hilite: Sunken Solid +menu.hilite.color: #73787e +menu.hilite.colorTo: #ffffff +menu.hilite.textColor: #d7e0ee + +menu.bullet: Triangle +menu.bullet.position: Right +menu.frame.disableColor: #ffffff + +! Window settings... +window.button.focus: Flat Gradient Vertical +window.button.focus.color: #4c4c4c +window.button.focus.colorTo: #414141 +window.button.focus.picColor: #d8e0ee + +window.button.unfocus: Flat Gradient Vertical +window.button.unfocus.color: #4c4c4c +window.button.unfocus.colorTo: #414141 +window.button.unfocus.picColor: #686868 + +window.grip.focus: Raised Bevel1 Solid Vertical +window.grip.focus.color: #aab0b9 + +window.grip.unfocus: Raised Bevel1 Solid Horizontal +window.grip.unfocus.color: #4c4c4c +window.grip.unfocus.colorTo: #ffffff + +window.handle.focus: Raised Bevel1 Solid Vertical +window.handle.focus.color: #8a8f96 + +window.handle.unfocus: Raised Bevel1 Solid Horizontal +window.handle.unfocus.color: #4c4c4c +window.handle.unfocus.colorTo: #ffffff + +window.label.focus: Sunken Bevel1 Gradient Vertical +window.label.focus.color: #aab0b9 +window.label.focus.colorTo: #73787e +window.label.focus.textColor: #000000 +window.label.focus.justify: Center + +!window.font: creep +window.font: -Adobe-Helvetica-Medium-R-Normal--10-100-75-75-P-56-ISO8859-2 +window.justify: Center +window.label.unfocus: Flat Gradient Vertical +window.label.unfocus.color: #4c4c4c +window.label.unfocus.colorTo: #414141 +window.label.unfocus.textColor: #686868 + +window.title.focus: Raised Bevel1 Gradient Vertical +window.title.focus.color: #4c4c4c +window.title.focus.colorTo: #414141 + +window.title.unfocus: Raised Bevel1 Gradient Vertical +window.title.unfocus.color: #4c4c4c +window.title.unfocus.colorTo: #414141 + +window.button.pressed: Sunken Bevel1 Gradient Diagonal +window.button.pressed.color: #484848 +window.button.pressed.colorTo: #73787e + +window.frame.focusColor: #73787e +window.frame.unfocusColor: #62666b +handleWidth: 4 +frameWidth: 1 +bevelWidth: 1 +borderWidth: 1 +borderColor: #000000 + +! ***** bbpager ***** +bbpager.frame: raised solid + bbpager.frame.color: #484848 + +bbpager.desktop: sunken Gradient Vertical bevel1 + bbpager.desktop.color: #4c4c4c + bbpager.desktop.colorTo: #4a4a4a + +bbpager.desktop.focus: raised solid + bbpager.desktop.focus.color: #4c4c4c + +bbpager.window: raised gradient vertical + bbpager.window.color: #4c4c4c + bbpager.window.colorTo: #414141 + +bbpager.window.focus: sunken gradient vertical bevel2 + bbpager.window.focus.color: #aab0b9 + bbpager.window.focus.colorTo: #73787e + +bbpager.desktop.focusStyle: border +bbpager.active.window.borderColor: #202020 +bbpager.inactive.window.borderColor: #000000 +bbpager.active.desktop.borderColor: #73787e + diff --git a/data/styles/nyz b/data/styles/nyz new file mode 100644 index 00000000..97794409 --- /dev/null +++ b/data/styles/nyz @@ -0,0 +1,103 @@ +toolbar: flat diagonal gradient +toolbar.color: rgb:6/9/c +toolbar.colorTo: rgb:4/6/8 +toolbar.button: flat diagonal gradient +toolbar.button.color: rgb:3/48/6 +toolbar.button.colorTo: rgb:5/78/a +toolbar.button.picColor: rgb:1/18/2 +toolbar.button.pressed: flat crossdiagonal gradient +toolbar.button.pressed.color: grey40 +toolbar.button.pressed.colorTo: grey20 +toolbar.label: flat crossdiagonal gradient +toolbar.label.color: grey40 +toolbar.label.colorTo: grey20 +toolbar.label.textColor: grey85 +toolbar.windowLabel: flat crossdiagonal gradient +toolbar.windowLabel.color: grey40 +toolbar.windowLabel.colorTo: grey20 +toolbar.windowLabel.textColor: grey85 +toolbar.clock: flat crossdiagonal gradient +toolbar.clock.color: grey40 +toolbar.clock.colorTo: grey20 +toolbar.clock.textColor: grey85 +toolbar.justify: right +toolbar.font: lucidasans-10 + +menu.title: flat crossdiagonal gradient +menu.title.color: rgb:6/9/c +menu.title.colorTo: rgb:3/48/6 +menu.title.textColor: white +menu.title.font: lucidasans-10 +menu.title.justify: right + +menu.frame: flat crossdiagonal gradient +menu.frame.color: grey40 +menu.frame.colorTo: grey20 +menu.frame.textColor: grey85 +menu.frame.disableColor: rgb:4/4/38 +menu.frame.font: lucidasans-10 +menu.frame.justify: center + +menu.bullet.position: right +menu.bullet: triangle + +menu.hilite: flat crossdiagonal gradient +menu.hilite.color: rgb:6/9/c +menu.hilite.colorTo: rgb:3/48/6 +menu.hilite.textColor: white + +window.title.focus: flat diagonal gradient +window.title.focus.color: rgb:6/9/c +window.title.focus.colorTo: rgb:4/6/8 +window.title.unfocus: flat solid +window.title.unfocus.color: grey30 + +window.label.focus: flat crossdiagonal gradient +window.label.focus.color: grey40 +window.label.focus.colorTo: grey20 +window.label.focus.textColor: white +window.label.unfocus: flat crossdiagonal gradient +window.label.unfocus.color: grey30 +window.label.unfocus.colorTo: grey20 +window.label.unfocus.textColor: grey60 + +window.button.focus: flat diagonal gradient +window.button.focus.color: rgb:4/6/8 +window.button.focus.colorTo: rgb:5/78/a +window.button.focus.picColor: rgb:1/18/2 +window.button.unfocus: flat solid +window.button.unfocus.color: grey30 +window.button.unfocus.picColor: grey20 +window.button.pressed: flat crossdiagonal gradient +window.button.pressed.color: grey40 +window.button.pressed.colorTo: grey20 + +window.handle.focus: flat crossdiagonal gradient +window.handle.focus.color: rgb:6/9/c +window.handle.focus.colorTo: rgb:3/48/6 +window.handle.unfocus: flat solid +window.handle.unfocus.color: grey30 + +window.grip.focus: flat crossdiagonal gradient +window.grip.focus.color: grey40 +window.grip.focus.colorTo: grey20 +window.grip.unfocus: flat crossdiagonal gradient +window.grip.unfocus.color: grey30 +window.grip.unfocus.colorTo: grey20 + +window.frame.focusColor: rgb:6/9/c +window.frame.unfocusColor: grey30 + +window.font: lucidasans-10 +window.justify: right + +borderColor: grey10 + +bevelWidth: 1 +borderWidth: 2 +handleWidth: 4 + +*textColor: grey85 +*Font: lucidasans-10 + +rootCommand: bsetroot -solid grey20 diff --git a/data/styles/nyzclone b/data/styles/nyzclone new file mode 100644 index 00000000..e590c503 --- /dev/null +++ b/data/styles/nyzclone @@ -0,0 +1,136 @@ +! Miscellaneous settings... +style.name: nyzclone +style.author: miklos +style.date: March 3, 2002 +style.credits: nyz's moving_targets.png +style.comments: (kyle) miklos, clone nyz's theme for me.\ + \ + + + +rootCommand: bsetbg -solid '#385070' + +! Toolbar settings... +toolbar.button: Flat Solid +toolbar.button.color: #c8c8c8 +toolbar.button.picColor: #000000 + +toolbar.button.pressed: Sunken Bevel1 Solid +toolbar.button.pressed.color: #c8c8c8 + +toolbar.label: Flat Solid +toolbar.label.color: #c8c8c8 +toolbar.label.textColor: #000000 + +toolbar.windowLabel: Flat Solid +toolbar.windowLabel.color: #506c90 +toolbar.windowLabel.textColor: #ffffff + +toolbar.clock: Flat Solid +toolbar.clock.color: #c8c8c8 +toolbar.clock.textColor: #000000 + +toolbar: Raised Bevel1 Solid +toolbar.color: #c8c8c8 +toolbar.textColor: #ffffff +!toolbar.font: lime +toolbar.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +toolbar.justify: Center + + +! Menu settings... +menu.frame: Raised Bevel1 Solid +menu.frame.color: #c8c8c8 +menu.frame.textColor: #000000 +!menu.frame.font: lime +menu.frame.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +menu.frame.justify: Center + +menu.title: Raised Bevel1 Solid +menu.title.color: #506c90 +menu.title.textColor: #ffffff +!menu.title.font: lime +menu.title.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +menu.title.justify: Center + +menu.hilite: Flat Solid +menu.hilite.color: #506890 +menu.hilite.textColor: #ffffff + +menu.bullet: Empty +menu.bullet.position: Right +menu.frame.disableColor: #ffffff + +! Window settings... +window.button.focus: Flat Solid +window.button.focus.color: #506c90 +window.button.focus.picColor: #ffffff + +window.button.unfocus: Flat Solid +window.button.unfocus.color: #c8c8c8 +window.button.unfocus.picColor: #787c78 + +window.grip.focus: Raised Bevel1 Solid +window.grip.focus.color: #506890 + +window.grip.unfocus: Raised Bevel1 Solid +window.grip.unfocus.color: #c8c8c8 + +window.handle.focus: Raised Bevel1 Solid +window.handle.focus.color: #506890 + +window.handle.unfocus: Raised Bevel1 Solid +window.handle.unfocus.color: #c8c8c8 + +window.label.focus: Flat Solid +window.label.focus.color: #506890 +window.label.focus.textColor: #ffffff +!window.label.focus.font: lime +window.label.focus.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +window.label.focus.justify: Center + +!window.font: lime +window.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +window.justify: Center +window.label.unfocus: Flat Solid +window.label.unfocus.color: #c8c8c8 +window.label.unfocus.textColor: #787c78 + +window.title.focus: Raised Bevel1 Solid +window.title.focus.color: #506890 + +window.title.unfocus: Raised Bevel1 Solid +window.title.unfocus.color: #c8c8c8 + +window.button.pressed: Sunken Bevel1 Gradient Diagonal +window.button.pressed.color: #506890 +window.button.pressed.colorTo: #a0a0a0 + +window.frame.focusColor: #ffffff +window.frame.unfocusColor: #202428 +handleWidth: 5 +frameWidth: 0 +bevelWidth: 1 +borderWidth: 1 +borderColor: #000000 +! ***** bbpager ***** +bbpager.frame: raised solid bevel1 + bbpager.frame.color: #c8c8c8 + +bbpager.desktop: sunken solid bevel1 + bbpager.desktop.color: #385070 + +bbpager.desktop.focus: raised solid + bbpager.desktop.focus.color: #486890 + +bbpager.window: raised solid + bbpager.window.color: #c8c8c8 + +bbpager.window.focus: raised solid + bbpager.window.focus.color: #486890 + +bbpager.desktop.focusStyle: border +bbpager.active.window.borderColor: #202020 +bbpager.inactive.window.borderColor: #202020 +bbpager.active.desktop.borderColor: #ffffff + diff --git a/data/styles/operation b/data/styles/operation new file mode 100644 index 00000000..03d16ec6 --- /dev/null +++ b/data/styles/operation @@ -0,0 +1,91 @@ +toolbar: flat crossdiagonal gradient +toolbar.color: rgb:6/9/c +toolbar.colorTo: rgb:4/6/8 +toolbar.button: parentrelative +toolbar.button.picColor: grey85 +toolbar.button.pressed: flat crossdiagonal gradient +toolbar.button.pressed.color: grey50 +toolbar.button.pressed.colorTo: grey80 +toolbar.label: parentrelative +toolbar.label.textColor: grey85 +toolbar.windowLabel: parentrelative +toolbar.windowLabel.textColor: grey85 +toolbar.clock: parentrelative +toolbar.clock.textColor: grey85 +toolbar.justify: right +toolbar.font: lucidasans-10 + +menu.title: flat crossdiagonal gradient +menu.title.color: rgb:6/9/c +menu.title.colorTo: rgb:3/48/6 +menu.title.textColor: white +menu.title.font: lucidasans-10 +menu.title.justify: right + +menu.frame: flat crossdiagonal gradient +menu.frame.color: grey50 +menu.frame.colorTo: grey80 +menu.frame.textColor: grey20 +menu.frame.disableColor: grey40 +menu.frame.font: lucidasans-10 +menu.frame.justify: center + +menu.bullet.position: right +menu.bullet: triangle + +menu.hilite: flat crossdiagonal gradient +menu.hilite.color: rgb:6/9/c +menu.hilite.colorTo: rgb:3/48/6 +menu.hilite.textColor: white + +window.title.focus: flat crossdiagonal gradient +window.title.focus.color: rgb:6/9/c +window.title.focus.colorTo: rgb:3/48/6 +window.title.unfocus: flat diagonal gradient +window.title.unfocus.color: grey50 +window.title.unfocus.colorTo: grey20 + +window.label.focus: parentrelative +window.label.focus.textColor: white +window.label.unfocus: parentrelative +window.label.unfocus.textColor: grey60 + +window.button.focus: parentrelative +window.button.focus.picColor: grey85 +window.button.unfocus: parentrelative +window.button.unfocus.picColor: grey60 +window.button.pressed: flat crossdiagonal gradient +window.button.pressed.color: grey50 +window.button.pressed.colorTo: grey80 + +window.handle.focus: flat crossdiagonal gradient +window.handle.focus.color: rgb:6/9/c +window.handle.focus.colorTo: rgb:3/48/6 +window.handle.unfocus: flat diagonal gradient +window.handle.unfocus.color: grey50 +window.handle.unfocus.colorTo: grey20 + +window.grip.focus: parentrelative +window.grip.unfocus: parentrelative + +window.frame.focusColor: rgb:6/9/c +window.frame.unfocusColor: grey50 + +window.font: lucidasans-10 +window.justify: right + +borderColor: rgb:2/3/4 + +bevelWidth: 1 +borderWidth: 1 +handleWidth: 4 + +*textColor: grey85 +*Font: lucidasans-10 + +rootCommand: bsetroot -gradient flatcrossdiagonalgradient -from rgb:4/6/8 -to rgb:3/48/6 + +bbpager.desktop.focus: flat interlaced crossdiagonal gradient +bbpager.desktop.focus.color: rgb:6/9/c +bbpager.desktop.focus.colorTo: rgb:3/48/6 + diff --git a/data/styles/outcomes b/data/styles/outcomes new file mode 100644 index 00000000..94838148 --- /dev/null +++ b/data/styles/outcomes @@ -0,0 +1,114 @@ +toolbar: raised diagonal gradient bevel1 +toolbar.color: rgb:7/8/8 +toolbar.colorTo: grey20 + +toolbar.button: raised diagonal gradient bevel1 +toolbar.button.color: grey +toolbar.button.colorTo: grey20 +toolbar.button.picColor: black +toolbar.button.pressed: sunken diagonal interlaced gradient bevel1 +toolbar.button.pressed.color: rgb:38/4/4 +toolbar.button.pressed.colorTo: rgb:d/f/f + +toolbar.label: flat interlaced diagonal gradient +toolbar.label.color: grey20 +toolbar.label.colorTo: rgb:7/8/8 +toolbar.label.textColor: grey85 + +toolbar.windowLabel: flat interlaced diagonal gradient +toolbar.windowLabel.color: grey20 +toolbar.windowLabel.colorTo: rgb:7/8/8 +toolbar.windowLabel.textColor: grey85 + +toolbar.clock: flat interlaced diagonal gradient +toolbar.clock.color: grey20 +toolbar.clock.colorTo: rgb:7/8/8 +toolbar.clock.textColor: grey85 + +toolbar.justify: center +toolbar.font: lucidasans-bold-10 + +menu.title: raised diagonal interlaced gradient bevel1 +menu.title.color: grey20 +menu.title.colorTo: rgb:7/8/8 +menu.title.textColor: grey85 +menu.title.font: lucidasans-bold-10 +menu.title.justify: center + +menu.frame: raised diagonal gradient bevel1 +menu.frame.color: rgb:7/8/8 +menu.frame.colorTo: grey10 +menu.frame.textColor: white +menu.frame.disableColor: rgb:38/4/4 +menu.frame.font: lucidasans-10 +menu.frame.justify: center + +menu.bullet: triangle +menu.bullet.position: right + +menu.hilite: raised diagonal gradient bevel1 +menu.hilite.color: grey60 +menu.hilite.colorTo: white +menu.hilite.textColor: grey20 + +window.title.focus: raised diagonal gradient bevel1 +window.title.focus.color: rgb:7/8/8 +window.title.focus.colorTo: grey20 +window.title.unfocus: raised diagonal gradient bevel1 +window.title.unfocus.color: rgb:54/6/6 +window.title.unfocus.colorTo: grey20 + +window.label.focus: interlaced sunken diagonal gradient bevel1 +window.label.focus.color: grey20 +window.label.focus.colorTo: grey +window.label.focus.textColor: white +window.label.unfocus: interlaced flat gradient +window.label.unfocus.color: grey20 +window.label.unfocus.colorTo: rgb:54/6/6 +window.label.unfocus.textColor: grey + +window.handle.focus: raised diagonal gradient bevel1 +window.handle.focus.color: rgb:7/8/8 +window.handle.focus.colorTo: grey20 +window.handle.unfocus: raised diagonal gradient bevel1 +window.handle.unfocus.color: rgb:54/6/6 +window.handle.unfocus.colorTo: grey20 + +window.grip.focus: raised diagonal gradient bevel1 +window.grip.focus.color: grey +window.grip.focus.colorTo: grey20 +window.grip.unfocus: sunken diagonal gradient bevel1 +window.grip.unfocus.color: grey20 +window.grip.unfocus.colorTo: grey + + +window.button.focus: raised diagonal gradient bevel1 +window.button.focus.color: grey +window.button.focus.colorTo: grey20 +window.button.focus.picColor: black +window.button.unfocus: sunken diagonal gradient bevel1 +window.button.unfocus.color: grey20 +window.button.unfocus.colorTo: grey +window.button.unfocus.picColor: grey40 +window.button.pressed: flat diagonal interlaced gradient +window.button.pressed.color: rgb:38/4/4 +window.button.pressed.colorTo: rgb:d/f/f + +window.frame.focusColor: grey85 +window.frame.unfocusColor: rgb:54/6/6 + +window.font: lucidasans-bold-10 +window.justify: center + +! misc... +borderColor: rgb:1c/2/2 + +borderWidth: 1 +bevelWidth: 2 +handleWidth: 4 + +rootCommand: bsetroot -mod 4 4 -fg rgb:54/6/6 -bg grey20 + +! for the bbtools +menuFont: lucidasans-10 +titleFont: lucidasans-bold-10 diff --git a/data/styles/shade b/data/styles/shade new file mode 100644 index 00000000..36e39f56 --- /dev/null +++ b/data/styles/shade @@ -0,0 +1,91 @@ +toolbar: flat solid +toolbar.color: rgb:6/6/6 +toolbar.button: flat solid +toolbar.button.color: rgb:6/6/6 +toolbar.button.picColor: rgb:2/2/2 +toolbar.label: flat crossdiagonal gradient +toolbar.label.color: rgb:8/8/7 +toolbar.label.colorTo: rgb:f/f/d +toolbar.label.textColor: rgb:2/2/1c +toolbar.windowLabel: flat crossdiagonal gradient +toolbar.windowLabel.color: rgb:8/8/7 +toolbar.windowLabel.colorTo: rgb:f/f/d +toolbar.windowLabel.textColor: rgb:2/2/1c +toolbar.clock: flat crossdiagonal gradient +toolbar.clock.color: rgb:8/8/7 +toolbar.clock.colorTo: rgb:f/f/d +toolbar.clock.textColor: rgb:2/2/1c +toolbar.justify: right +toolbar.font: lucidasans-10 + +menu.title: flat crossdiagonal gradient +menu.title.color: rgb:8/8/7 +menu.title.colorTo: rgb:f/f/d +menu.title.textColor: rgb:2/2/1c +menu.title.font: lucidasans-10 +menu.title.justify: right + +menu.frame: flat solid +menu.frame.color: rgb:6/6/6 +menu.frame.textColor: grey85 +menu.frame.disableColor: rgb:4/4/4 +menu.frame.font: lucidasans-10 +menu.frame.justify: center + +menu.bullet.position: right +menu.bullet: triangle + +menu.hilite: flat solid +menu.hilite.color: rgb:4/4/4 +menu.hilite.textColor: white + +window.title.focus: flat solid +window.title.focus.color: rgb:6/6/6 +window.title.unfocus: flat solid +window.title.unfocus.color: rgb:4/4/4 + +window.label.focus: flat crossdiagonal gradient +window.label.focus.color: rgb:8/8/7 +window.label.focus.colorTo: rgb:f/f/d +window.label.focus.textColor: rgb:2/2/1c +window.label.unfocus: flat solid +window.label.unfocus.color: rgb:4/4/4 +window.label.unfocus.textColor: rgb:2/2/2 + +window.button.focus: flat solid +window.button.focus.color: rgb:6/6/6 +window.button.focus.picColor: rgb:2/2/2 +window.button.unfocus: flat solid +window.button.unfocus.color: rgb:4/4/4 +window.button.unfocus.picColor: rgb:2/2/2 + +window.handle.focus: flat crossdiagonal gradient +window.handle.focus.color: rgb:8/8/7 +window.handle.focus.colorTo: rgb:f/f/d +window.handle.unfocus: flat solid +window.handle.unfocus.color: rgb:4/4/4 + +window.grip.focus: flat solid +window.grip.focus.color: rgb:8/8/8 +window.grip.unfocus: flat solid +window.grip.unfocus.color: rgb:4/4/4 + +window.frame.focusColor: rgb:f/f/d +window.frame.unfocusColor: rgb:6/6/6 + +window.font: lucidasans-10 +window.justify: right + +*button.pressed: flat solid +*button.pressed.color: rgb:a/a/8c + +borderColor: rgb:2/2/2 + +bevelWidth: 2 +borderWidth: 2 +handleWidth: 3 + +*textColor: grey20 +*Font: lucidasans-10 + +rootCommand: bsetroot -solid rgb:4/4/4 diff --git a/data/styles/steelblue b/data/styles/steelblue new file mode 100644 index 00000000..21912e38 --- /dev/null +++ b/data/styles/steelblue @@ -0,0 +1,134 @@ +! Miscellaneous settings... +style.name: steelblue +style.author: miklos +style.date: Feb 3, 2002 +style.credits: +style.comments: I prefer the font "luxus.pcf" to be used with this style. + + +!rootCommand: bsetbg -solid "#3c5979" +rootCommand: bsetbg -mod 4 4 -to "#44668a" -from "#7788bb" + +! Toolbar settings... +toolbar.button: Flat Solid PipeCross +toolbar.button.color: #44668a +toolbar.button.colorTo: #ffffff +toolbar.button.picColor: #ffffff + +toolbar.button.pressed: Sunken Bevel1 Solid Diagonal +toolbar.button.pressed.color: #3c5979 +toolbar.button.pressed.colorTo: #ffffff + +toolbar.label: Sunken Bevel1 Gradient Rectangle +toolbar.label.color: #44668a +toolbar.label.colorTo: #3c5979 +toolbar.label.textColor: #d1d9e5 + +toolbar.windowLabel: Sunken Bevel1 Gradient Rectangle +toolbar.windowLabel.color: #5e8dbf +toolbar.windowLabel.colorTo: #3c5979 +toolbar.windowLabel.textColor: #e9f2ff + +toolbar.clock: Sunken Bevel1 Gradient Rectangle +toolbar.clock.color: #44668a +toolbar.clock.colorTo: #3c5979 +toolbar.clock.textColor: #d1d9e5 + +toolbar: Raised Bevel1 Solid Horizontal +toolbar.color: #44668a +toolbar.colorTo: #ffffff +toolbar.textColor: #ffffff +!toolbar.font: luxus* +toolbar.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +toolbar.justify: Center + + +! Menu settings... +menu.frame: Raised Bevel1 Gradient Elliptic +menu.frame.color: #44668a +menu.frame.colorTo: #44668a +menu.frame.textColor: #d1d9e5 +!menu.frame.font: luxus +menu.frame.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +menu.frame.justify: Right + +menu.title: Sunken Bevel2 Gradient Elliptic +menu.title.color: #5e8dbf +menu.title.colorTo: #3c5979 +menu.title.textColor: #d7e0ee +!menu.title.font: luxus +menu.title.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +menu.title.justify: Center + +menu.hilite: Sunken Bevel1 Gradient Elliptic +menu.hilite.color: #3c5979 +menu.hilite.colorTo: #5e8dbf +menu.hilite.textColor: #ffffff + +menu.bullet: Triangle +menu.bullet.position: Right +menu.frame.disableColor: #ffffff + +! Window settings... +window.button.focus: Flat Solid Horizontal +window.button.focus.color: #44668a +window.button.focus.colorTo: #ffffff +window.button.focus.picColor: #ffffff + +window.button.unfocus: Flat Solid Horizontal +window.button.unfocus.color: #3c5979 +window.button.unfocus.colorTo: #ffffff +window.button.unfocus.picColor: #44668a + +window.grip.focus: Raised Bevel1 Solid PipeCross +window.grip.focus.color: #5e8dbf +window.grip.focus.colorTo: #ffffff + +window.grip.unfocus: Raised Bevel1 Solid Pyramid +window.grip.unfocus.color: #3c5979 +window.grip.unfocus.colorTo: #ffffff + +window.handle.focus: Raised Bevel1 Solid Pyramid +window.handle.focus.color: #44668a +window.handle.focus.colorTo: #ffffff + +window.handle.unfocus: Raised Bevel1 Solid Pyramid +window.handle.unfocus.color: #3c5979 +window.handle.unfocus.colorTo: #ffffff + +window.label.focus: Sunken Bevel1 Gradient Rectangle +window.label.focus.color: #5e8dbf +window.label.focus.colorTo: #3c5979 +window.label.focus.textColor: #e6f0ff +!window.label.focus.font: luxus +window.label.focus.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +window.label.focus.justify: Center + +!window.font: luxus +window.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +window.justify: Center +window.label.unfocus: Sunken Bevel1 Gradient Rectangle +window.label.unfocus.color: #44668a +window.label.unfocus.colorTo: #3c5979 +window.label.unfocus.textColor: #5077a1 + +window.title.focus: Raised Bevel1 Solid Diagonal +window.title.focus.color: #44668a +window.title.focus.colorTo: #ffffff + +window.title.unfocus: Raised Bevel1 Solid Diagonal +window.title.unfocus.color: #3c5979 +window.title.unfocus.colorTo: #ffffff + +window.button.pressed: Sunken Bevel1 Solid Diagonal +window.button.pressed.color: #484848 +window.button.pressed.colorTo: #ffffff + +window.frame.focusColor: #63707f +window.frame.unfocusColor: #5e6166 +handleWidth: 4 +frameWidth: 0 +bevelWidth: 0 +borderWidth: 1 +borderColor: #000000 + diff --git a/data/styles/steelblue2 b/data/styles/steelblue2 new file mode 100644 index 00000000..14a48142 --- /dev/null +++ b/data/styles/steelblue2 @@ -0,0 +1,133 @@ +style.name: steelblue2 +style.author: miklos +style.date: Feb 28, 2002 +style.credits: +style.comments: The return of \ + steelblue + + +rootCommand: bsetbg -solid "#6e7a8a" + +! Toolbar settings... +toolbar.button: Flat Gradient Vertical +toolbar.button.color: #6e7a8a +toolbar.button.colorTo: #555f6b +toolbar.button.picColor: #ffffff + +toolbar.button.pressed: Sunken Bevel1 Gradient Diagonal +toolbar.button.pressed.color: #6e7b8b +toolbar.button.pressed.colorTo: #8fa0b5 + +toolbar.label: Sunken Bevel1 Gradient Diagonal +toolbar.label.color: #6e7b8b +toolbar.label.colorTo: #555f6b +toolbar.label.textColor: #d1d9e5 + +toolbar.windowLabel: Sunken Bevel1 Gradient Diagonal +toolbar.windowLabel.color: #8fa0b5 +toolbar.windowLabel.colorTo: #555f6b +toolbar.windowLabel.textColor: #e9f2ff + +toolbar.clock: Sunken Bevel1 Gradient Diagonal +toolbar.clock.color: #6e7b8b +toolbar.clock.colorTo: #555f6b +toolbar.clock.textColor: #d1d9e5 + +toolbar: Raised Bevel1 Gradient Vertical +toolbar.color: #6e7b8b +toolbar.colorTo: #555f6b +toolbar.textColor: #ffffff +!toolbar.font: lime +toolbar.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +toolbar.justify: Left + + +! Menu settings... +menu.frame: Sunken Bevel2 Gradient Diagonal +menu.frame.color: #8fa0b5 +menu.frame.colorTo: #6e7b8b +menu.frame.textColor: #ffffff +!menu.frame.font: lime +menu.frame.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +menu.frame.justify: Right + +menu.title: Raised Bevel1 Gradient Diagonal +menu.title.color: #6e7b8b +menu.title.colorTo: #555f6b +menu.title.textColor: #d7e0ee +!menu.title.font: lime +menu.title.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +menu.title.justify: Center + +menu.hilite: Raised Bevel1 Gradient Diagonal +menu.hilite.color: #6e7b8b +menu.hilite.colorTo: #555f6b +menu.hilite.textColor: #ffffff + +menu.bullet: Empty +menu.bullet.position: Right +menu.frame.disableColor: #ffffff + +! Window settings... +window.button.focus: Flat Gradient CrossDiagonal +window.button.focus.color: #6e7b8b +window.button.focus.colorTo: #555f6b +window.button.focus.picColor: #ddeeff + +window.button.unfocus: Flat Gradient Vertical +window.button.unfocus.color: #6e7b8b +window.button.unfocus.colorTo: #555f6b +window.button.unfocus.picColor: #748293 + +window.grip.focus: Raised Bevel1 Gradient Diagonal +window.grip.focus.color: #8fa0b5 +window.grip.focus.colorTo: #6e7b8b + +window.grip.unfocus: Raised Bevel1 Gradient Diagonal +window.grip.unfocus.color: #6e7b8b +window.grip.unfocus.colorTo: #555f6b + +window.handle.focus: Raised Bevel1 Gradient Diagonal +window.handle.focus.color: #6e7b8b +window.handle.focus.colorTo: #555f6b + +window.handle.unfocus: Raised Bevel1 Gradient Diagonal +window.handle.unfocus.color: #6e7b8b +window.handle.unfocus.colorTo: #555f6b + +window.label.focus: Sunken Bevel1 Gradient Diagonal +window.label.focus.color: #8fa0b5 +window.label.focus.colorTo: #555f6b +window.label.focus.textColor: #e6f0ff +!window.label.focus.font: lime +window.label.focus.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +window.label.focus.justify: Left + +!window.font: lime +window.font: -schumacher-clean-medium-r-*-*-*-100-*-*-*-*-*-* +window.justify: Left +window.label.unfocus: Sunken Bevel1 Gradient Diagonal +window.label.unfocus.color: #6e7b8b +window.label.unfocus.colorTo: #555f6b +window.label.unfocus.textColor: #748293 + +window.title.focus: Raised Bevel1 Gradient Vertical +window.title.focus.color: #6e7b8b +window.title.focus.colorTo: #555f6b + +window.title.unfocus: Raised Bevel1 Gradient Vertical +window.title.unfocus.color: #6e7b8b +window.title.unfocus.colorTo: #555f6b + +window.button.pressed: Sunken Bevel1 Gradient Diagonal +window.button.pressed.color: #6e7b8b +window.button.pressed.colorTo: #8fa0b5 + +window.frame.focusColor: #ffffff +window.frame.unfocusColor: #555f6b +handleWidth: 4 +frameWidth: 0 +bevelWidth: 1 +borderWidth: 1 +borderColor: #000000 + diff --git a/data/styles/the_orange b/data/styles/the_orange new file mode 100644 index 00000000..109551ed --- /dev/null +++ b/data/styles/the_orange @@ -0,0 +1,98 @@ +! Title: the_orange +! By: thread +! Email: thread@threadbox.net +! Website: http://www.threadbox.net/ +! Comment: AAAAHAHAHAHAHAHHAHAHHAHAAHAHHH!!#%#!$ + + +toolbar.button: parentrelative +toolbar.button.pressed: flat horizontal gradient +toolbar.button.pressed.color: #636363 +toolbar.button.pressed.colorTo: #898989 +toolbar.label: parentrelative +toolbar.label.textColor: #000000 +toolbar.windowLabel: parentrelative +toolbar.windowLabel.textColor: #000000 +toolbar.clock: parentrelative +toolbar.clock.textColor: #000000 +toolbar: Flat Gradient Vertical +toolbar.color: #898989 +toolbar.colorTo: #6d6d6d +toolbar.textColor: #000000 +toolbar.justify: Center + + +menu.title: flat gradient diagonal + menu.title.color: #d6753d + menu.title.colorTo: #8b3d10 + menu.title.textColor: black + +menu.frame: flat gradient diagonal + menu.frame.color: #898989 + menu.frame.colorTo: #6d6d6d + menu.frame.textColor: black + +menu.hilite: flat gradient diagonal + menu.hilite.color: #8b3d10 + menu.hilite.colorTo: #d6753d + menu.hilite.textColor: #000000 + +menu.bullet: empty + menu.bullet.position: left + + + +window.title.focus: flat gradient vertical + window.title.focus.color: #d6753d + window.title.focus.colorTo: #8b3d10 +window.title.unfocus: flat gradient vertical + window.title.unfocus.color: #898989 + window.title.unfocus.colorTo: #6d6d6d + +window.label.focus: parentrelative + window.label.focus.textColor: black +window.label.unfocus: parentrelative + window.label.unfocus.textColor: black + +window.button.focus: parentrelative + window.button.focus.picColor: black +window.button.unfocus: parentrelative + window.button.unfocus.picColor: black +window.button.pressed: flat gradient vertical + window.button.pressed.color: #8b3d10 + window.button.pressed.colorTo: #d6753d + +window.handle.focus: flat gradient vertical + window.handle.focus.color: #606060 + window.handle.focus.colorTo: #303030 +window.handle.unfocus: flat gradient vertical + window.handle.unfocus.color: #505050 + window.handle.unfocus.colorTo: #202020 + +window.grip.focus: flat gradient vertical + window.grip.focus.color: #d6753d + window.grip.focus.colorTo: #8b3d10 +window.grip.unfocus: flat gradient vertical + window.grip.unfocus.color: #898989 + window.grip.unfocus.colorTo: #6d6d6d + + +borderColor: black + +frameWidth: 0 +bevelWidth: 1 +borderWidth: 1 +handleWidth: 4 + +*justify: center + + + +rootCommand: bsetroot -solid rgb:40/40/40 +!more readable, doesn't as well +!*Font: mints-mild + +!less readable, fits more +!*Font: mints-strong + +*Font: -b&h-lucidatypewriter-medium-r-*-*-*-100-*-*-*-*-*-* diff --git a/data/styles/trisb b/data/styles/trisb new file mode 100644 index 00000000..c054f4b2 --- /dev/null +++ b/data/styles/trisb @@ -0,0 +1,153 @@ +style.name: trisb +style.author: miklos +style.date: March 25, 2002 +style.credits: +style.comments: + + +rootCommand: bsetbg -solid "#4b4b4b" + +! Toolbar settings... +toolbar.button: Flat Gradient Vertical +toolbar.button.color: #d5d5d5 +toolbar.button.colorTo: #b4b4b4 +toolbar.button.picColor: #343434 + +toolbar.button.pressed: Sunken Bevel1 Solid Vertical +toolbar.button.pressed.color: #c8c8c8 +toolbar.button.pressed.colorTo: #ffffff + +toolbar.label: Flat Gradient Vertical +toolbar.label.color: #d5d5d5 +toolbar.label.colorTo: #b4b4b4 +toolbar.label.textColor: #343434 + +toolbar.windowLabel: Flat Gradient Vertical +toolbar.windowLabel.color: #d5d5d5 +toolbar.windowLabel.colorTo: #b4b4b4 +toolbar.windowLabel.textColor: #343434 + +toolbar.clock: Flat Gradient Vertical +toolbar.clock.color: #d5d5d5 +toolbar.clock.colorTo: #b4b4b4 +toolbar.clock.textColor: #343434 + +toolbar: Flat Gradient Vertical +toolbar.color: #d5d5d5 +toolbar.colorTo: #b4b4b4 +toolbar.textColor: #ffffff +!toolbar.font: mints-strong +toolbar.font: -adobe-helvetica-medium-r-*-*-*-100-*-*-*-*-*-* +toolbar.justify: Center + + +! Menu settings... +menu.frame: Flat Gradient CrossDiagonal +menu.frame.color: #d5d5d5 +menu.frame.colorTo: #b4b4b4 +menu.frame.textColor: #343434 +!menu.frame.font: mints-strong +menu.frame.font: -adobe-helvetica-medium-r-*-*-*-100-*-*-*-*-*-* +menu.frame.justify: Right + +menu.title: Flat Gradient Vertical +menu.title.color: #8e8e8e +menu.title.colorTo: #5f5f5f +menu.title.textColor: #c8c8c8 +!menu.title.font: mints-strong +menu.title.font: -adobe-helvetica-medium-r-*-*-*-100-*-*-*-*-*-* +menu.title.justify: Center + +menu.hilite: Flat Gradient Vertical +menu.hilite.color: #3b90dc +menu.hilite.colorTo: #2c5f8c +menu.hilite.textColor: #8efdff + +menu.bullet: Triangle +menu.bullet.position: Right +menu.frame.disableColor: #ffffff + +! Window settings... +window.button.focus: Flat Gradient Vertical +window.button.focus.color: #3b90dc +window.button.focus.colorTo: #2c5f8c +window.button.focus.picColor: #8efdff + +window.button.unfocus: Flat Gradient Vertical +window.button.unfocus.color: #8e8e8e +window.button.unfocus.colorTo: #5f5f5f +window.button.unfocus.picColor: #aaaaaa + +window.grip.focus: Flat Solid Vertical +window.grip.focus.color: #3b90dc +window.grip.focus.colorto: #2c5f8c + +window.grip.unfocus: Flat Gradient Vertical +window.grip.unfocus.color: #8e8e8e +window.grip.unfocus.colorTo: #5f5f5f + +window.handle.focus: Flat Gradient Vertical +window.handle.focus.color: #3b90dc +window.handle.focus.colorTo: #2c5f8c + +window.handle.unfocus: Flat Gradient Vertical +window.handle.unfocus.color: #7a7a7a +window.handle.unfocus.colorTo: #555555 + +window.label.focus: Flat Gradient Vertical +window.label.focus.color: #3b90dc +window.label.focus.colorTo: #2c5f8c +window.label.focus.textColor: #8efdff +!window.label.focus.font: mints-strong +window.label.focus.font: -adobe-helvetica-medium-r-*-*-*-100-*-*-*-*-*-* +window.label.focus.justify: Center + +!window.font: mints-strong +window.font: -adobe-helvetica-medium-r-*-*-*-100-*-*-*-*-*-* +window.justify: Center +window.label.unfocus: Flat Gradient Vertical +window.label.unfocus.color: #8e8e8e +window.label.unfocus.colorTo: #5f5f5f +window.label.unfocus.textColor: #aaaaaa + +window.title.focus: Flat Gradient Vertical +window.title.focus.color: #3b90dc +window.title.focus.colorTo: #2c5f8c + +window.title.unfocus: Flat Gradient Vertical +window.title.unfocus.color: #8e8e8e +window.title.unfocus.colorTo: #5f5f5f + +window.button.pressed: Sunken Bevel1 Solid Vertical +window.button.pressed.color: #3b90dc + +window.frame.focusColor: #343434 +window.frame.unfocusColor: #000000 +handleWidth: 3 +frameWidth: 0 +bevelWidth: 1 +borderWidth: 1 +borderColor: #121212 + +bbpager.frame: flat solid + bbpager.frame.color: #4b4b4b + +bbpager.desktop: sunken solid + bbpager.desktop.color: #4b4b4b + +bbpager.desktop.focus: raised solid + bbpager.desktop.focus.color: #ffffff + +bbpager.window.focus: raised gradient vertical + bbpager.window.focus.color: #3b90dc + bbpager.window.focus.colorTo: #2c5f8c + +bbpager.window: flat gradient vertical + bbpager.window.color: #8e8e8e + bbpager.window.colorTo: #5f5f5f + +bbpager.desktop.focusStyle: border +bbpager.active.window.borderColor: #202020 +bbpager.inactive.window.borderColor: #000000 +bbpager.active.desktop.borderColor: #73787e + diff --git a/data/styles/twice b/data/styles/twice new file mode 100644 index 00000000..bbc58be9 --- /dev/null +++ b/data/styles/twice @@ -0,0 +1,103 @@ +toolbar: flat diagonal gradient +toolbar.color: rgb:c/6/6 +toolbar.colorTo: rgb:8/4/4 +toolbar.button: flat diagonal gradient +toolbar.button.color: rgb:6/3/3 +toolbar.button.colorTo: rgb:a/5/5 +toolbar.button.picColor: rgb:4/2/2 +toolbar.button.pressed: flat crossdiagonal gradient +toolbar.button.pressed.color: grey40 +toolbar.button.pressed.colorTo: grey20 +toolbar.label: flat crossdiagonal gradient +toolbar.label.color: grey40 +toolbar.label.colorTo: grey20 +toolbar.label.textColor: grey85 +toolbar.windowLabel: flat crossdiagonal gradient +toolbar.windowLabel.color: grey40 +toolbar.windowLabel.colorTo: grey20 +toolbar.windowLabel.textColor: grey85 +toolbar.clock: flat crossdiagonal gradient +toolbar.clock.color: grey40 +toolbar.clock.colorTo: grey20 +toolbar.clock.textColor: grey85 +toolbar.justify: right +toolbar.font: lucidasans-10 + +menu.title: flat crossdiagonal gradient +menu.title.color: rgb:c/6/6 +menu.title.colorTo: rgb:6/3/3 +menu.title.textColor: white +menu.title.font: lucidasans-10 +menu.title.justify: right + +menu.frame: flat crossdiagonal gradient +menu.frame.color: grey40 +menu.frame.colorTo: grey20 +menu.frame.textColor: grey85 +menu.frame.disableColor: rgb:4/2/2 +menu.frame.font: lucidasans-10 +menu.frame.justify: center + +menu.bullet.position: right +menu.bullet: triangle + +menu.hilite: flat crossdiagonal gradient +menu.hilite.color: rgb:c/6/6 +menu.hilite.colorTo: rgb:6/3/3 +menu.hilite.textColor: white + +window.title.focus: flat diagonal gradient +window.title.focus.color: rgb:c/6/6 +window.title.focus.colorTo: rgb:8/4/4 +window.title.unfocus: flat solid +window.title.unfocus.color: grey30 + +window.label.focus: flat crossdiagonal gradient +window.label.focus.color: grey40 +window.label.focus.colorTo: grey20 +window.label.focus.textColor: white +window.label.unfocus: flat crossdiagonal gradient +window.label.unfocus.color: grey30 +window.label.unfocus.colorTo: grey20 +window.label.unfocus.textColor: grey60 + +window.button.focus: flat diagonal gradient +window.button.focus.color: rgb:8/4/4 +window.button.focus.colorTo: rgb:a/5/5 +window.button.focus.picColor: rgb:4/2/2 +window.button.unfocus: flat solid +window.button.unfocus.color: grey30 +window.button.unfocus.picColor: grey20 +window.button.pressed: flat crossdiagonal gradient +window.button.pressed.color: grey40 +window.button.pressed.colorTo: grey20 + +window.handle.focus: flat crossdiagonal gradient +window.handle.focus.color: rgb:c/6/6 +window.handle.focus.colorTo: rgb:6/3/3 +window.handle.unfocus: flat solid +window.handle.unfocus.color: grey30 + +window.grip.focus: flat crossdiagonal gradient +window.grip.focus.color: grey40 +window.grip.focus.colorTo: grey20 +window.grip.unfocus: flat crossdiagonal gradient +window.grip.unfocus.color: grey30 +window.grip.unfocus.colorTo: grey20 + +window.frame.focusColor: rgb:c/6/6 +window.frame.unfocusColor: grey30 + +window.font: lucidasans-10 +window.justify: right + +borderColor: grey10 + +bevelWidth: 1 +borderWidth: 2 +handleWidth: 4 + +*textColor: grey85 +*Font: lucidasans-10 + +rootCommand: bsetroot -solid grey20 diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000..194a31d5 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,17 @@ +# doc/Makefile.am for Openbox + +CLEANFILES = openbox.1 +MAINTAINERCLEANFILES = Makefile.in +man_MANS = openbox.1 bsetroot.1 +SUBDIRS = + +DEFAULT_MENU=$(pkgdatadir)/menu + +distclean-local: + rm -f *\~ + +openbox.1: openbox.1.in + @regex_cmd@ -e "s,@defaultmenu@,$(DEFAULT_MENU)," \ + -e "s,@pkgdatadir@,$(pkgdatadir)," \ + -e "s,@version@,$(VERSION)," \ + @srcdir@/openbox.1.in > openbox.1 diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 00000000..191f9ce5 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,351 @@ +# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# doc/Makefile.am for Openbox + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +CC = @CC@ +CLOBBER = @CLOBBER@ +CXX = @CXX@ +DEBUG = @DEBUG@ +INTERLACE = @INTERLACE@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +NEWWMSPEC = @NEWWMSPEC@ +NLS = @NLS@ +ORDEREDPSEUDO = @ORDEREDPSEUDO@ +PACKAGE = @PACKAGE@ +SHAPE = @SHAPE@ +SLIT = @SLIT@ +TIMEDCACHE = @TIMEDCACHE@ +VERSION = @VERSION@ +gencat_cmd = @gencat_cmd@ +regex_cmd = @regex_cmd@ + +CLEANFILES = openbox.1 +MAINTAINERCLEANFILES = Makefile.in +man_MANS = openbox.1 bsetroot.1 +SUBDIRS = + +DEFAULT_MENU = $(pkgdatadir)/menu +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h +CONFIG_CLEAN_FILES = +man1dir = $(mandir)/man1 +MANS = $(man_MANS) + +NROFF = nroff +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done + +uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man1 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" != "." || dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = doc + +distdir: $(DISTFILES) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(top_distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu doc/Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: install-man +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: uninstall-man +uninstall: uninstall-recursive +all-am: Makefile $(MANS) +all-redirect: all-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 + + +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +mostlyclean-am: mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-tags distclean-generic clean-am distclean-local + +distclean: distclean-recursive + +maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + +.PHONY: install-man1 uninstall-man1 install-man uninstall-man \ +install-data-recursive uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs-am \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +distclean-local: + rm -f *\~ + +openbox.1: openbox.1.in + @regex_cmd@ -e "s,@defaultmenu@,$(DEFAULT_MENU)," \ + -e "s,@pkgdatadir@,$(pkgdatadir)," \ + -e "s,@version@,$(VERSION)," \ + @srcdir@/openbox.1.in > openbox.1 + +# 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: diff --git a/doc/bsetroot.1 b/doc/bsetroot.1 new file mode 100644 index 00000000..9445c0d4 --- /dev/null +++ b/doc/bsetroot.1 @@ -0,0 +1,89 @@ +.\" +.\" Man page for Bsetroot +.\" +.\" Copyright (c) 2000 by Wilbert Berendsen +.\" +.TH bsetroot 1 "June 16th, 2000" "0.60.3" +.SH NAME +bsetroot \- Openbox utility to change root window appearance +.SH SYNOPSIS +.BR bsetroot " \-help" +.br +.B bsetroot +.RI "[ \-display " display " ] \-solid " color +.br +.B bsetroot +.RI "[ \-display " display " ] \-mod " "x y" " \-fg " color " \-bg " color +.br +.B bsetroot +.RI "[ \-display " display " ] \-gradient " texture " \-from " color " \-to " color +.SH DESCRIPTION +Bsetroot is a utility that can control the appearance of the root window in +three ways: Either give it a solid color, or write a two color modula pattern +to it, or render a gradient texture, based on two different colors. +.PP +Bsetroot resembles +.IR xsetroot (1) +in this functionality but it supports multiple screen displays, and gradient +textures the same way as Openbox does. +It doesn't handle cursors etc. +Bsetroot is part of the Openbox package. +.SH OPTIONS +Bsetroot operates in three ways, you must choose one of the first 3 options: +.TP +.BI \-solid " color" +Sets the root window to specified color. +.TP +.BI \-mod " x y" +Creates a modula pattern. You must specify +.BR \-bg " and " \-fg +colors. +.TP +.BI \-gradient " texturestring" +Renders the specified texture string to the root window. +For possible texture strings, please refer to +.IR openbox (1). +You must also specify both a +.BR \-from " and a " \-to +color. +.TP +.BI \-display " display" +Tells Bsetroot to connect to the specified display. +.TP +.BI "\-bg, \-background " color +Background color. +Needed for +.B \-mod +patterns. +.TP +.BI "\-fg, \-foreground " color +Foreground color. +Needed for +.B \-mod +patterns. +.TP +.BI \-from " color" +Start color for rendering textures. +Needed for +.B \-gradient +operation mode. +.TP +.BI \-to " color" +Ending color for rendering textures. +Needed for +.B \-gradient +operation mode. +.TP +.B \-help +Prints version info and short help text. +.SH AUTHOR +Bsetroot was written and maintained by Brad Hughes +.nh \" hyphenation off +(blackbox@alug.org) +.hy \" on again +and Jeff Raven +.nh +(jraven@psu.edu). +.hy +.SH SEE ALSO +.IR openbox (1) diff --git a/doc/openbox.1.in b/doc/openbox.1.in new file mode 100644 index 00000000..f2eeb53b --- /dev/null +++ b/doc/openbox.1.in @@ -0,0 +1,813 @@ +.\" +.\" Man page for Openbox +.\" +.\" Copyright (c) 2000 by Wilbert Berendsen +.\" +.\" This manual page may be freely distributed and modified. +.\" Parts of the text are taken from website and several README's +.\" by His Great Hughesness himself. Why reinvent wheels? +.\" +.\" Created with NEdit, tested with ``man'' and ``tkman.'' +.\" This manpage uses only standard groff and tmac.an macros. +.\" To all translators who didn't do manpages earlier (like me ;-): +.\" Read the Man-Page-Mini-HOWTO and the LDP manpage ``man 7 man'' +.\" There's all I needed to know about these macros. +.\" +.\" Updated for bb 0.61 at Sat Sep 9 06:56:04 CEST 2000 +.\" +.\" ..define sort of
 macro
+.de EX
+.ne 5
+.if n .sp 1
+.if t .sp .5
+.nf
+.in +.5i
+..
+.de EE
+.fi
+.in -.5i
+.if n .sp 1
+.if t .sp .5
+..
+.TH openbox 1 "April 8th, 2002" "@VERSION@"
+.SH NAME
+openbox \- a window manager for X11
+.SH SYNOPSIS
+.BR openbox " \-help | \-version"
+.br
+.B openbox 
+.RI "[ \-rc" " rcfile " "] [ \-display" " display " ]
+.SH DESCRIPTION
+.\"
+.\" First few Paragraphs taken from FILLMEINNOW
+.\"
+.\"Openbox is yet another addition to the list of window managers for the Open
+.\"Group's X Window System, Version 11 Release 6 and above.
+.\"Openbox is built with C++, sharing no common code with any other window
+.\"manager (even though the graphics implementation is similar to that of Window
+.\"Maker).
+.\".PP
+.\"From the time the first line of code was written, Openbox has evolved around
+.\"one premise, minimalism.
+.\"It's not meant to be Eye Candy, nor the most Featureful, nor the most Adorned
+.\"for modelling the Widely acclaimed NeXT interface.
+.\"It is just meant to be
+.\".BR fast .
+.\".PP
+.\"Openbox provides configurable window decorations, a root menu to launch
+.\"applications, and a toolbar that shows the current workspace name, the focused
+.\"application name, and the current time.
+.\"There is also a workspace menu to add or remove workspaces. The `slit' can be
+.\"used to dock small applications, e.g. most of the bbtools can use the slit.
+.\".PP
+.\"Openbox features a special kind of icon handling: When you minimize a window,
+.\"no icon appears; instead, you can view all minimized applications in the `Icons'
+.\"submenu of the workspace menu.
+.\"Your desktop will never get cluttered with icons. As an alternative to icons,
+.\"shaded windows are provided: A double click on the titlebar of a window will
+.\"shade it (i.e. the window will disappear; only the titlebar stays visible).
+.\".PP
+.\"Openbox uses its own graphics class to render its images on the fly.
+.\"By using style files, you can determine at a great level how your desktop looks.
+.\"Openbox currently uses its own protocol to communicate with other clients such
+.\"as the pager.  Work is underway to support the new window manager specification
+.\"that both GNOME and KDE use.
+.SH OPTIONS
+Openbox supports the following command line options:
+.TP
+.B \-help
+Display command line options and compiled-in features, then exit.
+.TP
+.B \-version
+Display version info and exit.
+.TP
+.BI \-rc \ rcfile
+Use another rcfile than the default
+.IR  "~/.openbox/rc" .
+.TP
+.BI \-display \ display
+Start Openbox on the specified display.
+Programs started by Openbox will have the
+.B DISPLAY
+environment variable set to this value, too.
+.SH RUNNING BLACKBOX
+This program is usually started by the user's startup script, most times called
+.IR ~/.xinitrc .
+To run openbox, modify the script by adding
+.EX 0
+exec openbox
+.EE
+as the last executed command of the script.
+When Openbox terminates, the X session will terminate too.
+.PP
+When started, Openbox will try to find a default menu file in
+.IR @defaultmenu@ .
+You can provide a system-wide menu for your users here.
+.PP
+On exit or restart, Openbox will save user defaults in the file
+.I ~/.openbox/rc
+in the user's home directory.
+Some resources in this file can be edited by hand.
+.SH USING BLACKBOX
+From version 0.60.x, Openbox does no keyboard handling by itself; instead, it
+relies on an external program
+.IR bbkeys (1)
+for this.
+So, in this section, we will discuss all mouse commands.
+.SS Root window (background):
+A right click (button 3) will pop up the root menu.
+With this, you can launch your applications.
+You can also customize this menu for your needs.  See above for its location.
+A middle click (button 2) will pop up the workspace menu.
+You can add or remove a workspace, view
+applications running on all workspace, inspect your iconified applications,
+and jump directly to any workspace or application.
+.PP
+Left clicking (button 1) on an application in the Workspaces menu will bring
+you to that workspace and raise/focus that application;
+middle clicking (button 2) will warp the application to the current workspace.
+.SS Toolbar:
+The toolbar consists of three fields: a workspace name, the name of the
+window that currently has focus, and a clock.
+A left click on the toolbar will bring it to the foreground, a
+middle click will hide it behind other windows (if AlwaysOnTop is not set), and
+the right button will bring up a little menu.
+.PP
+Using this menu, you can enter a name for the current workspace (when finished,
+press Enter).
+Also, you can choose the toolbar's position, whether or not it
+should be always on top (i.e. it cannot be obscured by other windows),
+and whether it should hide itself when the mouse moves away.
+.PP
+Note: In Openbox versions below 0.60.0, a right click on the toolbar
+immediately entered workspace name edit mode.
+.SS Window Titlebar and Borders:
+A left click on any part of the window's border will raise it.
+Dragging then moves the window.
+Dragging the resize grips at the bottom left and bottom right
+corners resizes the window.
+Middle clicking will immediately lower the window.
+Right clicking on the border or titlebar pops up the window menu,
+containing these commands:
+.TP
+.B Send To...
+Send window to another workspace.
+When you select the workspace with the middle button, Openbox will
+send you, along with the application, to the selected workspace.
+.TP
+.B Shade
+Shade window (display titlebar only).
+.TP
+.B Iconify
+Iconify window.
+The `icon' can be found in the `Icons' submenu of the workspace menu.  It will
+*NOT* appear on screen otherwise.
+.TP
+.B Maximize
+(Un)Maximize window.
+When you click the middle button on this item, the
+window will maximize only vertically.
+.TP
+.B Raise
+Raise window.
+.TP
+.B Lower
+Lower window.
+.TP
+.B Stick
+(Un)Stick window.
+A stuck window will always be displayed in the current workspace.
+.TP
+.B Kill Client
+Kill (-SIGKILL) owner of window.  Only use this if the client refuses to close.
+.TP
+.B Close
+Close the application cleanly.
+.PP
+When you double click on the titlebar of a window, it will `shade', so
+that only the titlebar stays visible.
+Another double click will redisplay the window contents.
+.SS Window Buttons:
+The button at the left upper corner of a window is the Minimize button.
+Clicking with any button causes the window to be iconified.
+The rightmost button (with the X) closes the application.
+The other button on the right (if present) maximizes the window in three ways:
+Button 1 causes full screen maximization, button 2 maximizes the window only
+vertically, and button 3 only horizontally.
+.SS Any menu:
+Clicking button 3 in a menu will popdown the menu.
+Clicking button 1 on the titlebar of any (sub)menu and then dragging it somewhere
+else will cause the menu to stay visible, and not disappear when you click on
+a menu item.
+.SS Miscellaneous:
+When you want to drag a window, but cannot see either the bottom handle or its
+titlebar, you can press Alt + button 1 anywhere in the window and then
+drag it around.
+You can also use Alt + button 1 to raise a partially visible window.
+Finally, Alt + button 2 lowers a window, and Alt + button 3 resizes the window.
+.SH MENU FILE
+A default menu file is installed in
+.IR @defaultmenu@ .
+Of course, this system-wide menu can be customized for all users at once.
+But it is also possible to create a personal menu.
+It is a convention to use the directory
+.IR "~/.openbox/"
+in your home directory, and to create a menu file, e.g.
+.I menu
+in this directory, or copy the system-wide menu file to this location.
+Next, we have to tell Openbox to load our menu file instead of the default.
+This is accomplished by adding (or changing) a resource value in the
+.I ~/.openbox/rc
+file, e.g.:
+.EX
+session.menuFile:       ~/.openbox/menu
+.EE
+For this change to take effect, Openbox has to be restarted.
+Be sure that your menu is usable, then choose `Restart' from the default
+Openbox root menu.
+.SS Menu syntax
+The menu syntax is very simple and very effective.
+There are up to three fields in a menu line.
+They are of the form:
+.EX
+[tag] (label or filename) {command or filename}
+.EE
+The supported tags are as follows:
+.TP
+.B [begin] (label for root menu)
+This tells Openbox to start parsing the menu file.
+This tag is required for Openbox to parse your menu file.
+If it cannot find it, the system default menu is used instead.
+.TP
+.B [end]
+This tells Openbox that it is at the end of a menu.
+This can either be a submenu or the main root menu.
+There must be at least one of these tags in your menu to correspond to the
+required [begin] tag.
+.TP
+.B [exec] (label for command) {shell command}
+Inserts a command item into the menu.
+When you select the menu item from the menu, Openbox runs `shell command.'
+.TP
+.B [exit] (label for exit)
+Inserts an item that shuts down and exits Openbox.
+Any running programs are not closed.
+.TP
+.B [include] (filename)
+Parses the file specified by
+.I filename
+and includes it with the current menu. The filename can be the full path to a
+ file, or it can begin with
+.IR ~/ ,
+which will be expanded into your home directory (e.g.
+.EX
+[include] (~/.openbox/stylesmenu)
+.EE
+will include
+.I /home/bhughes/.openbox/stylesmenu
+in my menu).
+.TP
+.B [nop] (label - optional)
+Insert a non-operational item into the current menu.
+This can be used to help format the menu into blocks or sections
+if so desired.
+.B [nop]
+does accept a label, but it is not required, and a blank item will be used
+if none is supplied.
+.TP 
+.B [style] (label) {filename}
+This tells Openbox to insert an item that, when selected, reads the style file
+named
+.I filename
+and applies the new textures, colors, and fonts to the current
+running session.
+.TP
+.B [stylesdir] (directory name)
+Reads all filenames (directories are ignored) from the specified directory and
+ creates menu items in the current menu for every filename.  Openbox assumes
+ that each file is a valid style file.  When selected by the user, Openbox 
+applies the selected style file to the current session.
+The labels that are created in the menu are the filenames of the style files.
+.TP
+.B [stylesmenu] (label) {directory name}
+Creates a submenu entry with
+.I label 
+(that is also the title of the new submenu), and inserts in that submenu all
+filenames in the specified directory, in the same way as the
+.B [stylesdir]
+command does.
+.IP
+.RB Both\  [stylesdir] \ and\  [stylesmenu]
+commands make it possible to install style files without editing your menu file.
+.TP
+.B [submenu] (label) {title for menu - optional}
+This tells Openbox to create and parse a new menu.
+This menu is inserted as a submenu into the parent menu.
+These menus are parsed recursively, so there is no limit to the number of levels
+or nested submenus you can have.
+The title for the new menu is optional; if none is supplied,
+the new menu's title is the same as the item label.
+An
+.B [end]
+tag is required to end the submenu.
+.TP
+.B [reconfig] (label)
+When selected, this item rereads the current style and menu files and
+applies any changes.
+This is useful for creating a new style or theme, as you don't have to
+constantly restart Openbox every time you save your style.
+However, Openbox automagically rereads the menu whenever it changes.
+.TP
+.B [restart] (label) {shell command - optional}
+This tells Openbox to restart.
+If `shell command' is supplied, it shuts down and runs the command (which is
+commonly the name of another window manager).
+If the command is omitted, Openbox restarts itself.
+.TP
+.B [config] (label)
+Inserts a Openbox generated submenu item containing numerous configuration
+options concerning window placement, focus style, window moving style, etc.
+.TP
+.B [workspaces] (label)
+This tells Openbox to insert a link to the workspaces menu directly
+into your menu.
+This is handy for those users who can't access the
+workspace menu directly (e.g. if you don't have a 3 button mouse).
+.PP
+Any line that starts with a `#' is considered a comment and ignored by Openbox.
+Also, in the labels/commands/filenames fields,
+you can escape any character like so:
+.EX
+[exec] (\\(my cool\\) \\{XTERM\\}) {xterm -T \\"cool XTERM\\"}
+.EE
+Using `\\\\' inserts a literal back-slash into the label/command/filename field.
+.SS Menu example
+Now let's put together some things.
+Here is a short example of a menu file:
+.PP
+.nf
+# Openbox menu file
+[begin] (Openbox @version@)
+  [exec] (rxvt) {rxvt -ls}
+  [exec] (Mozilla) {mozilla}
+  [exec] (The GIMP) {gimp}
+  [submenu] (Window Manager)
+    [exec] (Edit Menus) {nedit .openbox/Menu}
+    [submenu] (Style) {Which Style?}
+      [stylesdir] (~/.openbox/styles)
+      [stylesmenu] (Openbox Styles) {@pkgdatadir@/styles}
+    [end]
+    [config] (Config Options)
+    [reconfig] (Reconfigure)
+    [restart] (Restart)
+  [end]
+  [exit] (Log Out)
+[end]
+# end of menu file
+.fi
+.SH STYLES
+Openbox enables you to use specialized files that contain
+.IR X (1)
+resources to specify colors, textures, and fonts and therefore
+the overall look of your window borders, menus, and the toolbar.
+.PP
+The default installation of Openbox provides some of these style files.
+Usually they are put in
+.IR @pkgdatadir@/styles .
+You can study or edit these files to grasp how the Openbox style mechanism
+works.
+You can use the
+.BR [style] ", " [stylesdir] " and " [stylesmenu]
+menu commands in your menu file to be able to select and change between styles
+on the fly.
+.PP
+You can also create a directory in your home directory (usually named
+.I ~/.openbox/styles)
+and put your own style files there.
+Of course, you may choose any name for this directory, but many downloadable
+themes will rely on the name
+.I styles
+(following the bb.themes.org naming scheme).
+.PP
+To understand how the style mechanism works, you should have a little knowledge
+of how X resources work.
+.PP
+X resources consist of a key and a value.
+The key is constructed of several smaller keys (sometimes referred to as
+children), delimited by a period (`.').
+Keys may also contain a star (`*') to serve as a wildcard, which means that one
+line of typed text will match several keys.
+This is useful for styles that are based on one or two colors.
+.PP
+Openbox allows you to configure its four main components: the toolbar, the
+slit, the menus, and the window decorations.
+.PP
+The little window that shows the x-y position while dragging windows borrows
+its style from the window's titlebar.
+.PP
+Here are some quick examples:
+.EX
+toolbar.clock.color:	green
+.EE
+This sets the color resource of the toolbar clock to `green'. Another example:
+.EX
+menu*color:	rgb:3/4/5
+.EE
+This sets the color resource of the menu
+.I and all of its `children'
+to `rgb:3/4/5'.
+(For a description of color names, see
+.IR X (1).)
+So this one also applies to
+.IR menu.title.color " and " menu.frame.color .
+And with
+.EX
+*font:	-b&h-lucida-medium-r-normal-*-*-140-*
+.EE
+you set the font resource for all keys to this font name all at once.
+(For information about the fonts installed on your system, you can use a program like
+.IR xfontsel "(1), " gtkfontsel ", or " xlsfonts "(1).)"
+.PP
+Now what makes Openbox just so spectacular is its ability to render textures
+on the fly.
+Texture descriptions are specified in a similar way to the colors shown above
+e.g.:
+.ta \w'toolbar.clock.colorTo:\ 'u
+.EX
+toolbar.clock:	Raised Gradient Diagonal Bevel1
+toolbar.clock.color:	rgb:8/6/4
+toolbar.clock.colorTo:	rgb:4/3/2
+.EE
+Don't worry; we will explain right now!
+A texture description consists of up to five fields, which are as follows:
+.TP
+.B Flat / Raised / Sunken
+gives the component either a flat, raised, or sunken appearance.
+.TP
+.B Gradient / Solid
+tells Openbox to draw either a solid color or a texture with gradient.
+.TP
+.B Horizontal / Vertical / Diagonal / Crossdiagonal / Pipecross / Elliptic / Rectangle / Pyramid
+Select one of these texture types. They only work when
+.B Gradient
+is also specified!
+.TP
+.B Interlaced
+tells Openbox to interlace the texture (darken every other line).
+This option is most commonly used with gradiented textures, but, from Openbox
+version 0.60.3 on, it also works in solid textures.
+.TP
+.B Bevel1 / Bevel2
+tells Openbox which type of bevel to use.
+Bevel1 is the default bevel.
+The shading is placed on the edge of the image.
+Bevel2 is an alternative.
+The shading is placed one pixel in from the edge of the image.
+.PP
+Instead of a texture description, the option
+.B ParentRelative
+is also available, which makes the component appear as a part of its parent, i.e.
+totally transparent.
+.PP
+All gradient textures are composed of two color values: the
+.IR color " and " colorTo " resources."
+color represents the initial color, colorTo represents the final color of the
+gradient.
+When
+.B Interlaced 
+is used in
+.B Solid
+mode, the
+.I colorTo
+resource is used to specify the interlacing color.
+.PP
+Well, here is the complete component list; also, all components together with
+which kind of value they can contain.
+Comments are preceded with an exclamation sign (!), which is also used for
+comments in Openbox style c.q. X resource files.
+.PP
+.ta \w'window.button.unfocus.picColor:\ 'u 
+.nf
+.\"
+.\" The comments also to be translated!
+.\"
+! The toolbar itself.
+toolbar:	Texture
+toolbar.color:	Color
+toolbar.colorTo:	Color
+
+! The buttons on the toolbar.
+toolbar.button:	Texture or \fIParentRelative\fR
+toolbar.button.color:	Color
+toolbar.button.colorTo:	Color
+
+! Color of the button arrows.
+toolbar.button.picColor:	Color
+
+! Buttons in pressed state.
+toolbar.button.pressed:	Texture \fI(e.g. Sunken)\fR or \fIParentRelative\fR
+toolbar.button.pressed.color:	Color
+toolbar.button.pressed.colorTo:	Color
+
+! Color of pressed button arrows.
+toolbar.button.pressed.picColor:	Color
+
+! The toolbar workspace label.
+toolbar.label:	Texture or \fIParentRelative\fR
+toolbar.label.color:	Color
+toolbar.label.colorTo:	Color
+toolbar.label.textColor:	Color
+
+! The toolbar window label.
+toolbar.windowLabel:	Texture or \fIParentRelative\fR
+toolbar.windowLabel.color:	Color
+toolbar.windowLabel.colorTo:	Color
+toolbar.windowLabel.textColor:	Color
+
+! The toolbar clock.
+toolbar.clock:	Texture or \fIParentRelative\fR
+toolbar.clock.color:	Color
+toolbar.clock.colorTo:	Color
+toolbar.clock.textColor:	Color
+
+! How the toolbar's text should be justified.
+toolbar.justify:	\fIcenter\fR, \fIleft\fR, or \fIright\fR
+
+! Font to be used for all toolbar components.
+toolbar.font:	Font \fI(e.g. -*-helvetica-medium-r-normal-*-*-100-*)\fR
+
+! The menu titlebar.
+menu.title:	Texture
+menu.title.color:	Color
+menu.title.colorTo:	Color
+menu.title.textColor:	Color
+menu.title.font:	Font
+menu.title.justify:	\fIcenter\fR, \fIleft\fR, or \fIright\fR
+
+! The menu frame.
+menu.frame:	Texture
+menu.frame.color:	Color
+menu.frame.colorTo:	Color
+menu.frame.textColor:	Color
+menu.frame.disableColor:	Color
+menu.frame.font:	Font
+menu.frame.justify:	\fIcenter\fR, \fIleft\fR, or \fIright\fR
+
+! Bullets for submenu items.
+menu.bullet:	\fIempty\fR, \fItriangle\fR, \fIsquare\fR, or \fIdiamond\fR
+menu.bullet.position:	\fIright\fR or \fIleft\fR
+
+! The highlighted menu item.
+menu.hilite:	Texture (e.g. \fIRaised\fR)
+menu.hilite.color:	Color
+menu.hilite.colorTo:	Color
+menu.hilite.textColor:	Color
+
+! A focused window.
+window.title.focus:	Texture
+window.title.focus.color:	Color
+window.title.focus.colorTo:	Color
+
+! An unfocused window.
+window.title.unfocus:	Texture
+window.title.unfocus.color:	Color
+window.title.unfocus.colorTo:	Color
+
+! Window label.
+window.label.focus:	Texture or \fIParentRelative\fR
+window.label.focus.color:	Color
+window.label.focus.colorTo:	Color
+window.label.focus.textColor:	Color
+
+window.label.unfocus:	Texture or \fIParentRelative\fR
+window.label.unfocus.color:	Color
+window.label.unfocus.colorTo:	Color
+window.label.unfocus.textColor:	Color
+
+! Handlebar.
+window.handle.focus:	Texture
+window.handle.focus.color:	Color
+window.handle.focus.colorTo:	Color
+
+window.handle.unfocus:	Texture
+window.handle.unfocus.color:	Color
+window.handle.unfocus.colorTo:	Color
+
+! Resize grips.
+window.grip.focus:	Texture
+window.grip.focus.color:	Color
+window.grip.focus.colorTo:	Color
+
+window.grip.unfocus:	Texture
+window.grip.unfocus.color:	Color
+window.grip.unfocus.colorTo:	Color
+
+! Window buttons.
+window.button.focus:	Texture or \fIParentRelative\fR
+window.button.focus.color:	Color
+window.button.focus.colorTo:	Color
+window.button.focus.picColor:	Color
+
+window.button.unfocus:	Texture or \fIParentRelative\fR
+window.button.unfocus.color:	Color
+window.button.unfocus.colorTo:	Color
+window.button.unfocus.picColor:	Color
+
+window.button.pressed:	Texture (e.g. \fISunken\fR)
+window.button.pressed.color:	Color
+window.button.pressed.colorTo:	Color
+
+! Frame around window.
+window.frame.focusColor:	Color
+window.frame.unfocusColor:	Color
+
+! Font and justification for window labels.
+window.font:	Font
+window.justify:	\fIcenter\fR, \fIleft\fR, or \fIright\fR
+
+! Miscellaneous resources.
+
+! A border can be drawn around all components.
+borderWidth:	a number of pixels, e.g. \fI1\fR
+borderColor:	Color
+
+bevelWidth:	a number of pixels > 0
+handleWidth:	a number of pixels > 0
+
+! Width of the window frame (from version 0.61 on).
+! When not specified, frameWidth defaults to the value of bevelWidth.
+frameWidth:	a number of pixels >= 0
+
+
+! This command is executed whenever this style is selected.
+! Typically it sets the root window to a nice picture.
+rootCommand:	Shell command, e.g. \fIbsetroot -mod 4 4 -fg rgb:	5/6/6 -bg grey20\fR
+
+! Some of the bbtools read these old 0.51 resources.
+menuFont:	Font
+titleFont:	Font
+.fi
+.PP
+Now, this seems a long list, but, remember, when you create your own style, you
+can easily set lots of keys with a single command, e.g.
+.EX
+.ta \w'*unfocus.textColor:\ 'u
+*color:	slategrey
+*colorTo:	darkslategrey
+*unfocus.color:	darkslategrey
+*unfocus.colorTo:	black
+*textColor:	white
+*unfocus.textColor:	lightgrey
+*font:	lucidasans-10
+.EE
+This sets already nice defaults for many components.
+.SH THE SLIT
+The slit is a special Openbox window frame that can contain dockable
+applications, e.g. the `bbtools' or WindowMaker's dockapps.
+When applications are run in the slit, they have no window borders of their own;
+instead, they are framed in the slit, and they are always visible in the current
+workspace.
+You can click button 3 on the edge of the slit window to get a menu to
+determine its position, whether its contained applications should be grouped
+horizontally or vertically and whether it should hide itself when the
+mouse moves away.
+.PP
+Most dockable applications use the
+.B -w
+option to run in the slit.
+For example, you could put in your
+.IR ~/.xinitrc :
+.EX
+bbmail -w &
+bbpager -w &
+exec openbox
+.EE
+Of course, to use the slit, you must have slit support compiled in (this is
+the default).
+.SH RESOURCE FILE
+Usually the
+.I ~/.openbox/rc
+resource file is created and maintained by Openbox itself.
+All options from the
+.B [config]
+menu (from 0.60.x on), the last selected style file, your workspace names and
+so on are saved automatically in this file.
+However, there are some resources in it you might want to edit yourself:
+.TP
+.B session.menuFile:
+This tells Openbox where to look for its menu file.
+.TP
+.B session.screen0.toolbar.widthPercent:
+This determines the amount (in %) of space the toolbar will take.
+Default value is:
+.IR 66 .
+.TP
+.B session.screen0.strftimeFormat:
+This adjusts the way the current time is displayed in the toolbar.
+The
+.IR strftime (3)
+format is used.
+Default value is:
+.IR "%I:%M %p" .
+.TP
+.B session.autoRaiseDelay:
+This adjusts the delay (in ms) before focused windows will raise when using the
+Auto Raise option.
+Default value is:
+.IR 250 .
+.TP
+.B session.doubleClickInterval:
+This adjusts the delay (in ms) between mouse clicks for Openbox to consider a double click.
+Default value is:
+.IR 250 .
+.TP
+.B session.screen0.edgeSnapThreshold:
+When moving a window across your screen, Openbox is able to have it `snap' to
+the edges of the screen for easy placement.
+This variable tells Openbox the distance (in pixels) at which the window will
+jump to the edge.
+Default value is:
+.IR 0 .
+.TP
+.B session.cacheMax:
+This tells Openbox how much memory (in Kb) it may use to store cached pixmaps on
+the X server.
+If your machine runs short of memory, you may lower this value.
+Default value is:
+.IR 200 .
+.TP
+.B session.cacheLife:
+This tells Openbox how long (in minutes) unused pixmaps may stay in the X
+server's memory.
+Default value is:
+.IR 5 .
+.TP
+.B session.colorsPerChannel:
+This tells Openbox how many colors to take from the X server on pseudocolor
+displays.  A channel would be red, green, or blue.
+Openbox will allocate this variable ^ 3 colors and make them always available.
+This value must be between 2 and 6.
+When you run Openbox on an 8-bit display, you must set this resource to 4.
+Default value is:
+.IR 4.
+.PP
+When running Openbox in a multiple desktop environment, the
+.B screen0
+key can also be
+.B screen1, 2
+etc. for any appropriate desktop.
+.SH ENVIRONMENT
+.TP
+.B HOME
+Openbox uses
+.RB $ HOME
+to find its
+.I .openbox/rc
+file, and to resolve style file and directory names.
+.TP
+.B DISPLAY
+When no other display was given on the command line, Openbox will start on the
+display specified by this variable.
+.SH AUTHOR and CREDITS
+All of the code was initially written and maintained as Blackbox by Brad Hughes
+.nh \" hyphenation off
+(blackbox@alug.org)
+.hy \" on again
+and then Jeff Raven
+.nh
+(jraven@psu.edu),
+.hy
+and then Sean 'Shaleh' Perry
+.nh
+(shaleh@debian.org)
+.hy
+.hy
+and is now maintained as Openbox by Ben Jansens
+.nh
+(ben@orodu.net)
+.hy
+with contributions and patches merged from
+many individuals around the world.
+.PP
+The official Openbox website:
+.nh
+.B http://FILLMEINNOW/
+.hy
+.br
+The bug and feature request page, as well as current releases can be found at:
+.nh
+.B http://FILLMEINNOW/
+.hy
+.br
+Many themes and other contributions:
+.nh
+.B http://bb.themes.org/
+.hy
+.PP
+This manpage was put together by Wilbert Berendsen
+.nh
+(wbsoft@xs4all.nl).
+.hy
+Numerous other languages will be available.
+.SH SEE ALSO
+.IR bsetroot (1), \ bbkeys (1)  \" not there, yet ;-(
diff --git a/install-sh b/install-sh
new file mode 100644
index 00000000..e8436696
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,250 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	true
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+	else
+		instcmd=mkdir
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f $src -o -d $src ]
+	then
+		true
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		true
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		true
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='	
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		true
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		true
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/missing b/missing
new file mode 100644
index 00000000..cbe2b0ef
--- /dev/null
+++ b/missing
@@ -0,0 +1,188 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard , 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing - GNU libit 0.0"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`configure.in'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`configure.in'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`configure.in'.  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.in`
+    if test -z "$files"; then
+      files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
+      test -z "$files" || files="$files.in"
+    else
+      files=`echo "$files" | sed -e 's/:/ /g'`
+    fi
+    test -z "$files" && files="config.h.in"
+    touch $files
+    ;;
+
+  automake)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+         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$/touch \1.in/' \
+      | sh
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/mkinstalldirs b/mkinstalldirs
new file mode 100644
index 00000000..d0fd194f
--- /dev/null
+++ b/mkinstalldirs
@@ -0,0 +1,40 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman 
+# Created: 1993-05-16
+# Public domain
+
+# $Id$
+
+errstatus=0
+
+for file
+do
+   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+   shift
+
+   pathcomp=
+   for d
+   do
+     pathcomp="$pathcomp$d"
+     case "$pathcomp" in
+       -* ) pathcomp=./$pathcomp ;;
+     esac
+
+     if test ! -d "$pathcomp"; then
+        echo "mkdir $pathcomp" 1>&2
+
+        mkdir "$pathcomp" || lasterr=$?
+
+        if test ! -d "$pathcomp"; then
+  	  errstatus=$lasterr
+        fi
+     fi
+
+     pathcomp="$pathcomp/"
+   done
+done
+
+exit $errstatus
+
+# mkinstalldirs ends here
diff --git a/nls/C/BaseDisplay.m b/nls/C/BaseDisplay.m
new file mode 100644
index 00000000..f7f3d9b4
--- /dev/null
+++ b/nls/C/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X error: %s(%d) opcodes %d/%d\n  resource 0x%lx\n
+$ #SignalCaught
+# %s: signal %d caught\n
+$ #ShuttingDown
+# shutting down\n
+$ #Aborting
+# aborting... dumping core\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: connection to X server failed.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: couldn't mark display connection as close-on-exec\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): removing bad window from event queue\n
diff --git a/nls/C/Basemenu.m b/nls/C/Basemenu.m
new file mode 100644
index 00000000..e7867249
--- /dev/null
+++ b/nls/C/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox Menu
diff --git a/nls/C/Configmenu.m b/nls/C/Configmenu.m
new file mode 100644
index 00000000..d01e3c15
--- /dev/null
+++ b/nls/C/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Config Options
+$ #FocusModel
+# Focus Model
+$ #WindowPlacement
+# Window Placement
+$ #ImageDithering
+# Image Dithering
+$ #OpaqueMove
+# Opaque Window Moving
+$ #FullMax
+# Full Maximization
+$ #FocusNew
+# Focus New Windows
+$ #FocusLast
+# Focus Window on Workspace Change
+$ #ClickToFocus
+# Click to Focus
+$ #SloppyFocus
+# Sloppy Focus
+$ #AutoRaise
+# Auto Raise
+$ #SmartRows
+# Smart Placement (Rows)
+$ #SmartCols
+# Smart Placement (Columns)
+$ #Cascade
+# Cascade Placement
+$ #LeftRight
+# Left to Right
+$ #RightLeft
+# Right to Left
+$ #TopBottom
+# Top to Bottom
+$ #BottomTop
+# Bottom to Top
diff --git a/nls/C/Icon.m b/nls/C/Icon.m
new file mode 100644
index 00000000..54b96a63
--- /dev/null
+++ b/nls/C/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Icons
diff --git a/nls/C/Image.m b/nls/C/Image.m
new file mode 100644
index 00000000..5dd251a6
--- /dev/null
+++ b/nls/C/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: error creating pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: error creating XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: unsupported visual\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: error creating pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: invalid colormap size %d (%d/%d/%d) - reducing\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: error allocating colormap\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: failed to alloc color %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: pixmap cache - releasing %d pixmaps\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: cache is large, forcing cleanout\n
+$ #ColorParseError
+# BImageControl::getColor: color parse error: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: color alloc error: '%s'\n
diff --git a/nls/C/Makefile.am b/nls/C/Makefile.am
new file mode 100644
index 00000000..36ccd676
--- /dev/null
+++ b/nls/C/Makefile.am
@@ -0,0 +1,48 @@
+# nls/C/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: Translation.m openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/C"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/C; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/C; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
+		ln -f -ss C $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
+		ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
+		ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_US; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
+		ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/C/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/C; \
+	fi
+
+# note... when adding new catalogs... you do not need the
+# header=../openbox-nls.h which is passed to awk... we
+# only need to generate it once.
+
+Translation.m: $(MFILES)
+	awk -f @srcdir@/../convert.awk header=../openbox-nls.h \
+		output=Translation.m $(MFILES)
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/C/Makefile.in b/nls/C/Makefile.in
new file mode 100644
index 00000000..51a61954
--- /dev/null
+++ b/nls/C/Makefile.in
@@ -0,0 +1,235 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/C/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/C/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/C
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/C/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: Translation.m openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/C"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/C; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/C; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
+		ln -f -ss C $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
+		ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
+		ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en_US; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
+		ln -f -s C $(DESTDIR)$(pkgdatadir)/nls/en; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/C/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/US_ASCII; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/POSIX; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/en_US; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/en; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/C; \
+	fi
+
+# note... when adding new catalogs... you do not need the
+# header=../openbox-nls.h which is passed to awk... we
+# only need to generate it once.
+
+Translation.m: $(MFILES)
+	awk -f @srcdir@/../convert.awk header=../openbox-nls.h \
+		output=Translation.m $(MFILES)
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/C/Screen.m b/nls/C/Screen.m
new file mode 100644
index 00000000..128c06e7
--- /dev/null
+++ b/nls/C/Screen.m
@@ -0,0 +1,54 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: an error occured while querying the X server.\n  \
+another window manager is already running on display %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: managing screen %d using visual 0x%lx, depth %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): couldn't load font '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): couldn't load default font.\n
+$ #EmptyMenuFile
+# %s: empty menu file\n
+$ #xterm
+# xterm
+$ #Restart
+# Restart
+$ #Exit
+# Exit
+$ #EXECError
+# BScreen::parseMenuFile: [exec] error, no menu label and/or command defined\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] error, no menu label defined\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] error, no menu label and/or filename \
+defined\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] error, no menu label defined\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] error, no filename defined\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] error, '%s' is not a regular file\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] error, no menu label defined\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] error, no menu label defined\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] error, no menu label defined\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, no directory defined\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' is not a \
+directory\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' does not exist\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] error, no menu label defined\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/C/Slit.m b/nls/C/Slit.m
new file mode 100644
index 00000000..0e5e3a4f
--- /dev/null
+++ b/nls/C/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Slit Direction
+$ #SlitPlacement
+# Slit Placement
diff --git a/nls/C/Toolbar.m b/nls/C/Toolbar.m
new file mode 100644
index 00000000..93e26453
--- /dev/null
+++ b/nls/C/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Toolbar
+$ #EditWkspcName
+# Edit current workspace name
+$ #ToolbarPlacement
+# Toolbar Placement
diff --git a/nls/C/Window.m b/nls/C/Window.m
new file mode 100644
index 00000000..057593a3
--- /dev/null
+++ b/nls/C/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: creating 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres failed\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: cannot find screen for root window 0x%lx\n
+$ #Unnamed
+# Unnamed
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() for 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() for 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
diff --git a/nls/C/Windowmenu.m b/nls/C/Windowmenu.m
new file mode 100644
index 00000000..4bf90cf4
--- /dev/null
+++ b/nls/C/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Send To ...
+$ #Shade
+# Shade
+$ #Iconify
+# Iconify
+$ #Maximize
+# Maximize
+$ #Raise
+# Raise
+$ #Lower
+# Lower
+$ #Stick
+# Stick
+$ #KillClient
+# Kill Client
+$ #Close
+# Close
diff --git a/nls/C/Workspace.m b/nls/C/Workspace.m
new file mode 100644
index 00000000..315460a0
--- /dev/null
+++ b/nls/C/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Workspace %d
diff --git a/nls/C/Workspacemenu.m b/nls/C/Workspacemenu.m
new file mode 100644
index 00000000..5423a191
--- /dev/null
+++ b/nls/C/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Workspaces
+$ #NewWorkspace
+# New Workspace
+$ #RemoveLast
+# Remove Last
diff --git a/nls/C/bsetroot.m b/nls/C/bsetroot.m
new file mode 100644
index 00000000..ddd7be6a
--- /dev/null
+++ b/nls/C/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: error: must specify one of: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         display connection\n\
+  -mod               modula pattern\n\
+  -foreground, -fg  modula foreground color\n\
+  -background, -bg  modula background color\n\n\
+  -gradient       gradient texture\n\
+  -from             gradient start color\n\
+  -to               gradient end color\n\n\
+  -solid            solid color\n\n\
+  -help                    print this help text and exit\n
+
diff --git a/nls/C/common.m b/nls/C/common.m
new file mode 100644
index 00000000..53217029
--- /dev/null
+++ b/nls/C/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# Yes
+$ #No
+# No
+
+$ #DirectionTitle
+# Direction
+$ #DirectionHoriz
+# Horizontal
+$ #DirectionVert
+# Vertical
+
+$ #AlwaysOnTop
+# Always on top
+
+$ #PlacementTitle
+# Placement
+$ #PlacementTopLeft
+# Top Left
+$ #PlacementCenterLeft
+# Center Left
+$ #PlacementBottomLeft
+# Bottom Left
+$ #PlacementTopCenter
+# Top Center
+$ #PlacementBottomCenter
+# BottomCenter
+$ #PlacementTopRight
+# Top Right
+$ #PlacementCenterRight
+# Center Right
+$ #PlacementBottomRight
+# Bottom Right
+
+$ #AutoHide
+# Auto hide
diff --git a/nls/C/main.m b/nls/C/main.m
new file mode 100644
index 00000000..e7d9f157
--- /dev/null
+++ b/nls/C/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# error: '-rc' requires an argument\n
+$ #DISPLAYRequiresArg
+# error: '-display' requires an argument\n
+$ #WarnDisplaySet
+# warning: could not set environment variable 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tuse display connection.\n\
+  -rc \t\t\tuse alternate resource file.\n\
+  -version\t\t\tdisplay version and exit.\n\
+  -help\t\t\t\tdisplay this help text and exit.\n\n
+$ #CompileOptions
+# Compile time options:\n\
+  Debugging\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Shape:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Ordered Dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/C/openbox.m b/nls/C/openbox.m
new file mode 100644
index 00000000..006d12b7
--- /dev/null
+++ b/nls/C/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: no managable screens found, aborting\n
+$ #MapRequest
+# Openbox::process_event: MapRequest for 0x%lx\n
diff --git a/nls/Makefile.am b/nls/Makefile.am
new file mode 100644
index 00000000..08d3ac74
--- /dev/null
+++ b/nls/Makefile.am
@@ -0,0 +1,14 @@
+# nls/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+SUBDIRS = C da_DK de_DE es_ES et_EE fr_FR it_IT ja_JP nl_NL pt_BR ru_RU \
+	sl_SI sv_SE tr_TR zh_CN
+MAINTAINERCLEANFILES = Makefile.in openbox-nls.h
+DISTCLEANFILES = openbox-nls.h
+
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls; \
+	fi
+distclean-local:
+	rm -f *\~
diff --git a/nls/Makefile.in b/nls/Makefile.in
new file mode 100644
index 00000000..d8e81ccf
--- /dev/null
+++ b/nls/Makefile.in
@@ -0,0 +1,305 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+SUBDIRS = C da_DK de_DE es_ES et_EE fr_FR it_IT ja_JP nl_NL pt_BR ru_RU 	sl_SI sv_SE tr_TR zh_CN
+
+MAINTAINERCLEANFILES = Makefile.in openbox-nls.h
+DISTCLEANFILES = openbox-nls.h
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive  \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+	  rev="$$subdir $$rev"; \
+	  test "$$subdir" != "." || dot_seen=yes; \
+	done; \
+	test "$$dot_seen" = "no" && rev=". $$rev"; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+   if test "$$subdir" = .; then :; else \
+	    test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+   fi; \
+	done; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    chmod 777 $(distdir)/$$subdir; \
+	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am: uninstall-local
+uninstall: uninstall-recursive
+all-am: Makefile
+all-redirect: all-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am:  clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am:  distclean-tags distclean-generic clean-am distclean-local
+
+distclean: distclean-recursive
+
+maintainer-clean-am:  maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+
+.PHONY: install-data-recursive uninstall-data-recursive \
+install-exec-recursive uninstall-exec-recursive installdirs-recursive \
+uninstalldirs-recursive all-recursive check-recursive \
+installcheck-recursive info-recursive dvi-recursive \
+mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-redirect all-am all \
+installdirs-am installdirs mostlyclean-generic distclean-generic \
+clean-generic maintainer-clean-generic clean mostlyclean distclean \
+maintainer-clean
+
+
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls; \
+	fi
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/convert.awk b/nls/convert.awk
new file mode 100644
index 00000000..744179c7
--- /dev/null
+++ b/nls/convert.awk
@@ -0,0 +1,32 @@
+/^\$set/ {
+  major++
+  minor = 0
+
+  if (major > 1)
+    printf "\n" > output
+  printf "$set %d %s\n", major, $3 > output
+
+  if (header) {
+    majorName = substr($3, 2)
+    if (major > 1)
+      printf "\n" > header
+    printf "#define %sSet %#x\n", majorName, major > header
+  }
+}
+
+/^\$ #/ {
+  minor++
+
+  if (header) {
+    minorName = substr($2, 2)
+    printf "#define %s%s %#x\n", majorName, minorName, minor > header
+  }
+}
+
+/^#/ {
+  text = substr($0, 3)  
+  printf "%d %s\n", minor, text > output
+}
+  
+! /^(\$|#)/ { print > output }
+
diff --git a/nls/da_DK/BaseDisplay.m b/nls/da_DK/BaseDisplay.m
new file mode 100644
index 00000000..584e771b
--- /dev/null
+++ b/nls/da_DK/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X fejl: %s(%d) kode %d/%d\n  resource 0x%lx\n
+$ #SignalCaught
+# %s: signal %d fanget\n
+$ #ShuttingDown
+# lukker ned\n
+$ #Aborting
+# Avbryder... dumper kernen\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: tilslutning til X server mislykkedes.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: kunne ikke markere skærmtilslutning som luk-ved-afslut\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): fjerner dårligt vindue fra hændelseskøen\n
diff --git a/nls/da_DK/Basemenu.m b/nls/da_DK/Basemenu.m
new file mode 100644
index 00000000..2cea9195
--- /dev/null
+++ b/nls/da_DK/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openboxmenu
diff --git a/nls/da_DK/Configmenu.m b/nls/da_DK/Configmenu.m
new file mode 100644
index 00000000..a590d709
--- /dev/null
+++ b/nls/da_DK/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Indstillinger
+$ #FocusModel
+# Fokus Model
+$ #WindowPlacement
+# Vindueplacering
+$ #ImageDithering
+# Billede Dithering
+$ #OpaqueMove
+# Uklar vinduesflytning
+$ #FullMax
+# Fuld maximering
+$ #FocusNew
+# Fokus nyt vindue
+$ #FocusLast
+# Fokus vindue ved skrivebords ændring
+$ #ClickToFocus
+# Klik for fokus
+$ #SloppyFocus
+# Dovent fokus
+$ #AutoRaise
+# Hæv automatisk
+$ #SmartRows
+# Intelligent placering (Rækker)
+$ #SmartCols
+# Intelligent placering (Søjler)
+$ #Cascade
+# Kaskade placering
+$ #LeftRight
+# Fra venstre mod højre
+$ #RightLeft
+# Fra højre mod venstre
+$ #TopBottom
+# Oppefra
+$ #BottomTop
+# Nedefra
diff --git a/nls/da_DK/Icon.m b/nls/da_DK/Icon.m
new file mode 100644
index 00000000..e3630b47
--- /dev/null
+++ b/nls/da_DK/Icon.m
@@ -0,0 +1,6 @@
+$set 4 #Icon
+
+$ #Icons
+# Ikoner
+$ #Unnamed
+# Intet navn
diff --git a/nls/da_DK/Image.m b/nls/da_DK/Image.m
new file mode 100644
index 00000000..57562eb7
--- /dev/null
+++ b/nls/da_DK/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: fejl ved skabelse af pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: fejl ved skabelse af XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: ikke support for farvedybden\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: fejl ved skabelse af pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: ugyldigt farvekort størrelse %d (%d/%d/%d) - reducing\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: fejl ved allokering af farvekort\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: fejl ved allokering af farve %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: pixmap cache - sletter %d pixmaps\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: cache er for stor, gennemtvinger rensning\n
+$ #ColorParseError
+# BImageControl::getColor: farvefejl: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: farveallokeringsfejl: '%s'\n
diff --git a/nls/da_DK/Makefile.am b/nls/da_DK/Makefile.am
new file mode 100644
index 00000000..b072b0b1
--- /dev/null
+++ b/nls/da_DK/Makefile.am
@@ -0,0 +1,33 @@
+# nls/da_DK/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/da_DK"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/da_DK; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/da_DK; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/da_DK/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/da_DK; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/da_DK/Makefile.in b/nls/da_DK/Makefile.in
new file mode 100644
index 00000000..a4a68cc5
--- /dev/null
+++ b/nls/da_DK/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/da_DK/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/da_DK/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/da_DK
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/da_DK/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/da_DK"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/da_DK; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/da_DK; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/da_DK/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/da_DK; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/da_DK/Screen.m b/nls/da_DK/Screen.m
new file mode 100644
index 00000000..00adb005
--- /dev/null
+++ b/nls/da_DK/Screen.m
@@ -0,0 +1,53 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: fejl ved forespørgsel til X server.\n  \
+en anden window manager er allerede kørende på display %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: håndterer skærm %d med visuel 0x%lx, farvedybde %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): kunne ikke hente font '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): kunne ikke hente standardfonten.\n
+$ #EmptyMenuFile
+# %s: tom menu fil\n
+$ #xterm
+# xterm
+$ #Restart
+# Genstart
+$ #Exit
+# Afslut
+$ #EXECError
+# BScreen::parseMenuFile: [exec] fejl, ingen menu etikette og/eller kommando defineret\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] fejl, ingen menu etikette defineret\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] fejl, ingen menu etikette og/eller filnavn \
+defineret\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] fejl, ingen menu etikette defineret\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] fejl, intet filnavn defineret\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] fejl, '%s' er ikke en normal fil\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] fejl, ingen menu etikette defineret\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] fejl, ingen menu etikette defineret\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] fejl, ingen menu etikette defineret\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fejl, intet katalog defineret\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fejl, '%s' er ikke et katalog\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fejl, '%s' eksisterer ikke\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] fejl, ingen menu etikette defineret\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/da_DK/Slit.m b/nls/da_DK/Slit.m
new file mode 100644
index 00000000..e207e29d
--- /dev/null
+++ b/nls/da_DK/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Slit retning
+$ #SlitPlacement
+# Slit placering
diff --git a/nls/da_DK/Toolbar.m b/nls/da_DK/Toolbar.m
new file mode 100644
index 00000000..c889c94d
--- /dev/null
+++ b/nls/da_DK/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Værktøjsbjælke
+$ #EditWkspcName
+# Andring af skrivebordets navn
+$ #ToolbarPlacement
+# Værktøjsbjælkens placering
diff --git a/nls/da_DK/Window.m b/nls/da_DK/Window.m
new file mode 100644
index 00000000..5ba7ab6b
--- /dev/null
+++ b/nls/da_DK/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: skaber 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres fejlede\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: kunne ikke finde skærm til hovedvinduet 0x%lx\n
+$ #Unnamed
+# Intet navn
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() for 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() for 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: sætter 0x%lx til hovedvinduet\n
diff --git a/nls/da_DK/Windowmenu.m b/nls/da_DK/Windowmenu.m
new file mode 100644
index 00000000..ebbf0adb
--- /dev/null
+++ b/nls/da_DK/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Send til ...
+$ #Shade
+# Skygge
+$ #Iconify
+# Iconificeret
+$ #Maximize
+# Maksimer
+$ #Raise
+# Hæv
+$ #Lower
+# Sænk
+$ #Stick
+# Klæbrig
+$ #KillClient
+# Dræb klient
+$ #Close
+# Luk
diff --git a/nls/da_DK/Workspace.m b/nls/da_DK/Workspace.m
new file mode 100644
index 00000000..1093dda5
--- /dev/null
+++ b/nls/da_DK/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Skrivebord %d
diff --git a/nls/da_DK/Workspacemenu.m b/nls/da_DK/Workspacemenu.m
new file mode 100644
index 00000000..94317b85
--- /dev/null
+++ b/nls/da_DK/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Skriveborde
+$ #NewWorkspace
+# Nyt skrivebord
+$ #RemoveLast
+# Fjern sidste
diff --git a/nls/da_DK/bsetroot.m b/nls/da_DK/bsetroot.m
new file mode 100644
index 00000000..cd869ad6
--- /dev/null
+++ b/nls/da_DK/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: fejl: specificér en af følgende: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         skærmtilslutning\n\
+  -mod               modula mønster\n\
+  -foreground, -fg  modula foregrundsfarve\n\
+  -background, -bg  modula baggrundsfarve\n\n\
+  -gradient       gradient tekstur\n\
+  -from             gradient start farve\n\
+  -to               gradient slut farve\n\n\
+  -solid            fast farve\n\n\
+  -help                    hvis denne hjælp og afslut\n
+
diff --git a/nls/da_DK/common.m b/nls/da_DK/common.m
new file mode 100644
index 00000000..6b545558
--- /dev/null
+++ b/nls/da_DK/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# Ja
+$ #No
+# Nej
+
+$ #DirectionTitle
+# Retning
+$ #DirectionHoriz
+# Horisontal
+$ #DirectionVert
+# Vertikal
+
+$ #AlwaysOnTop
+# Altid øverst
+
+$ #PlacementTitle
+# Placering
+$ #PlacementTopLeft
+# Øverste venstre hjørne
+$ #PlacementCenterLeft
+# Venstre i midten
+$ #PlacementBottomLeft
+# Bunden til venstre
+$ #PlacementTopCenter
+# Toppen i midten
+$ #PlacementBottomCenter
+# Bunden i midten
+$ #PlacementTopRight
+# Øverst til højre
+$ #PlacementCenterRight
+# Til højre i midten
+$ #PlacementBottomRight
+# Til højre i bunden
+
+$ #AutoHide
+# Gem automatisk
diff --git a/nls/da_DK/main.m b/nls/da_DK/main.m
new file mode 100644
index 00000000..84926a6d
--- /dev/null
+++ b/nls/da_DK/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# fejl: '-rc' kræver et argument\n
+$ #DISPLAYRequiresArg
+# fjel: '-display' kræver et argument\n
+$ #WarnDisplaySet
+# advarsel: kunne ikke sætte variablen 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tbrug skærm tilslutning.\n\
+  -rc \t\t\tbrug alternativ resource fil.\n\
+  -version\t\t\tvis versionsnummer og afslut.\n\
+  -help\t\t\t\tvis denne hjælp og afslut.\n\n
+$ #CompileOptions
+# Kompileret med:\n\
+  Debugging\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Shape:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Ordered Dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/da_DK/openbox.m b/nls/da_DK/openbox.m
new file mode 100644
index 00000000..d0f7c184
--- /dev/null
+++ b/nls/da_DK/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: ingen håndterbare skærme fundet, afslutter\n
+$ #MapRequest
+# Openbox::process_event: MapRequest for 0x%lx\n
diff --git a/nls/de_DE/BaseDisplay.m b/nls/de_DE/BaseDisplay.m
new file mode 100644
index 00000000..45d6574b
--- /dev/null
+++ b/nls/de_DE/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X Fehler: %s(%d) opcodes %d/%d\n  resource 0x%lx\n
+$ #SignalCaught
+# %s: Signal %d erhalten\n
+$ #ShuttingDown
+# Shutdown\n
+$ #Aborting
+# Abbruch... dumping core\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: Verbindung mit X Server versagt.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: kann die Display Verbindung nicht als 'close-on-exec' markieren\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): Entfernung des inkorrekten Fensters aus der 'Event Queue'\n
diff --git a/nls/de_DE/Basemenu.m b/nls/de_DE/Basemenu.m
new file mode 100644
index 00000000..e7867249
--- /dev/null
+++ b/nls/de_DE/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox Menu
diff --git a/nls/de_DE/Configmenu.m b/nls/de_DE/Configmenu.m
new file mode 100644
index 00000000..2961dc0e
--- /dev/null
+++ b/nls/de_DE/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Einstellungen
+$ #FocusModel
+# Fokus Model
+$ #WindowPlacement
+# Fenster Plazierung
+$ #ImageDithering
+# Image Dithering
+$ #OpaqueMove
+# Fenster beim Verschieben durchsichtig
+$ #FullMax
+# Vollständige Vergrößerung
+$ #FocusNew
+# Fokus auf Neue Fenster
+$ #FocusLast
+# Fokus auf letztes Fenster bei Arbeitsplatz Wechsel
+$ #ClickToFocus
+# Fokus durch Mausklick
+$ #SloppyFocus
+# Fokus folgt Maus
+$ #AutoRaise
+# Fenster automatisch in Vordergrund
+$ #SmartRows
+# Optimale Plazierung (Reihen)
+$ #SmartCols
+# Optimale Plazierung (Spalten)
+$ #Cascade
+# Verschobene Plazierung
+$ #LeftRight
+# Von links nach rechts
+$ #RightLeft
+# Von rechts nach links
+$ #TopBottom
+# Von oben nach unten
+$ #BottomTop
+# Von unten nach oben
diff --git a/nls/de_DE/Icon.m b/nls/de_DE/Icon.m
new file mode 100644
index 00000000..54b96a63
--- /dev/null
+++ b/nls/de_DE/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Icons
diff --git a/nls/de_DE/Image.m b/nls/de_DE/Image.m
new file mode 100644
index 00000000..7eacff14
--- /dev/null
+++ b/nls/de_DE/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: Fehler bei der Erstellung der Pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: Fehler bei der Erstellung des XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: nicht unterstütztes Visual\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: Fehler bei der Erstellung der Pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: Ungültige Colormap Größe %d (%d/%d/%d) - verkleinere\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: Fehler bei der Anlegung der Colormap\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: Fehler bei der Auswertung der Farbe %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: Pixmap Cache - Freigabe von %d Pixmaps\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: Cache zu groß, Ausleerung erfordert\n
+$ #ColorParseError
+# BImageControl::getColor: Color Parse Fehler: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: Color Alloc Fehler: '%s'\n
diff --git a/nls/de_DE/Makefile.am b/nls/de_DE/Makefile.am
new file mode 100644
index 00000000..b83873b7
--- /dev/null
+++ b/nls/de_DE/Makefile.am
@@ -0,0 +1,36 @@
+# nls/de_DE/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/de_DE"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/de_DE; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/de_DE; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/de; \
+		ln -f -s de_DE $(DESTDIR)$(pkgdatadir)/nls/de; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/de_DE/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/de; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/de_DE; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/de_DE/Makefile.in b/nls/de_DE/Makefile.in
new file mode 100644
index 00000000..0cc0e92f
--- /dev/null
+++ b/nls/de_DE/Makefile.in
@@ -0,0 +1,223 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/de_DE/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/de_DE/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/de_DE
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/de_DE/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/de_DE"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/de_DE; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/de_DE; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/de; \
+		ln -f -s de_DE $(DESTDIR)$(pkgdatadir)/nls/de; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/de_DE/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/de; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/de_DE; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/de_DE/Screen.m b/nls/de_DE/Screen.m
new file mode 100644
index 00000000..6c451155
--- /dev/null
+++ b/nls/de_DE/Screen.m
@@ -0,0 +1,52 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: Fehler bei der Abfrage des X Servers.\n \
+ein anderer Windowmanager benutzt Display %s bereits.\n
+$ #ManagingScreen
+# BScreen::BScreen: Verwaltung von Bildschirm %d mit Visual 0x%lx, Tiefe %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): Kann Font '%s' nicht finden\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): Kann Standard Font nicht finden.\n
+$ #EmptyMenuFile
+# %s: leere Menu Datei\n
+$ #xterm
+# xterm
+$ #Restart
+# Neustart
+$ #Exit
+# Beenden
+$ #EXECError
+# BScreen::parseMenuFile: [exec] Fehler, kein Menu Eintrag und/oder Befehl definiert.\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] Fehler, kein Menu Eintrag definiert\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] Fehler, kein Menu Eintrag und/oder Datei definiert\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] Fehler, kein Menu Eintrag definiert\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] Fehler, kein Dateiname definiert\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] Fehler, '%s' ist keine normale Datei\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] Fehler, kein Menu Eintrag definiert\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] Fehler, kein Menu Eintrag definiert\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] Fehler, kein Menu Eintrag definiert\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] Fehler, kein Verzeichnis definiert\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] Fehler, '%s' ist kein Verzeichnis\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] Fehler, '%s' existiert nicht\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] Fehler, kein Menu Eintrag definiert\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/de_DE/Slit.m b/nls/de_DE/Slit.m
new file mode 100644
index 00000000..469d5a55
--- /dev/null
+++ b/nls/de_DE/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Slit Ausrichtung 
+$ #SlitPlacement
+# Slit Platzierung
diff --git a/nls/de_DE/Toolbar.m b/nls/de_DE/Toolbar.m
new file mode 100644
index 00000000..e5537247
--- /dev/null
+++ b/nls/de_DE/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Toolbar
+$ #EditWkspcName
+# Arbeitsplatzname ändern
+$ #ToolbarPlacement
+# Toolbar Platzierung
diff --git a/nls/de_DE/Window.m b/nls/de_DE/Window.m
new file mode 100644
index 00000000..8f85f2ca
--- /dev/null
+++ b/nls/de_DE/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: Erstelle 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres versagt\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: kann keinen Bildschirm für root window 0x%lx finden\n
+$ #Unnamed
+# Ohne Titel
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() von 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() von  0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: 0x%lx nun Child des root window\n
diff --git a/nls/de_DE/Windowmenu.m b/nls/de_DE/Windowmenu.m
new file mode 100644
index 00000000..0166d456
--- /dev/null
+++ b/nls/de_DE/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Senden an...
+$ #Shade
+# Aufrollen
+$ #Iconify
+# Verkleinern
+$ #Maximize
+# Vergrößern
+$ #Raise
+# In den Vordergrund
+$ #Lower
+# In den Hintergrund
+$ #Stick
+# Immer sichtbar
+$ #KillClient
+# Abbrechen
+$ #Close
+# Schliessen
diff --git a/nls/de_DE/Workspace.m b/nls/de_DE/Workspace.m
new file mode 100644
index 00000000..00b6ff90
--- /dev/null
+++ b/nls/de_DE/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Arbeitsplatz %d
diff --git a/nls/de_DE/Workspacemenu.m b/nls/de_DE/Workspacemenu.m
new file mode 100644
index 00000000..941d90e7
--- /dev/null
+++ b/nls/de_DE/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Arbeitsplätze
+$ #NewWorkspace
+# Neuer Arbeitsplatz
+$ #RemoveLast
+# Letzten Arbeitsplatz löschen
diff --git a/nls/de_DE/bsetroot.m b/nls/de_DE/bsetroot.m
new file mode 100644
index 00000000..a692511b
--- /dev/null
+++ b/nls/de_DE/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: error: must specify one of: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         Display Verbindung\n\
+  -mod               Modula Muster\n\
+  -foreground, -fg  Modula Vordergrund Farbe\n\
+  -background, -bg  Modula Hintergrund Farbe\n\n\
+  -gradient       steigernde Beschaffenheit\n\
+  -from             Anfangsfarbe\n\
+  -to               Endfarbe\n\n\
+  -solid            volle Farbe\n\n\
+  -help                    Anzeige dieser Hilfe und Beendung\n
+
diff --git a/nls/de_DE/common.m b/nls/de_DE/common.m
new file mode 100644
index 00000000..6eba2787
--- /dev/null
+++ b/nls/de_DE/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# Ja
+$ #No
+# Nein
+
+$ #DirectionTitle
+# Ausrichtung
+$ #DirectionHoriz
+# Horizontal
+$ #DirectionVert
+# Vertikal
+
+$ #AlwaysOnTop
+# Immer im Vorgrund
+
+$ #PlacementTitle
+# Platzierung
+$ #PlacementTopLeft
+# Oben Links
+$ #PlacementCenterLeft
+# Mitte Links
+$ #PlacementBottomLeft
+# Unten Links
+$ #PlacementTopCenter
+# Oben Mitte
+$ #PlacementBottomCenter
+# Unten Mitte
+$ #PlacementTopRight
+# Oben Rechts
+$ #PlacementCenterRight
+# Mitte Rechts
+$ #PlacementBottomRight
+# Unten Rechts
+
+$ #AutoHide
+# Automatisch Verbergen
diff --git a/nls/de_DE/main.m b/nls/de_DE/main.m
new file mode 100644
index 00000000..d20d1fde
--- /dev/null
+++ b/nls/de_DE/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# Fehler: '-rc' benötigt einen Parameter\n
+$ #DISPLAYRequiresArg
+# Fehler: '-display' benötigt einen Parameter\n
+$ #WarnDisplaySet
+# Achtung: konnte die Umgebungsvariable 'DISPLAY' nicht setzen\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tDisplay Verbindung.\n\
+  -rc \t\t\talternative Konfigurationsdatei.\n\
+  -version\t\t\tzeige Versionsnummer und Beendung.\n\
+  -help\t\t\t\tzeige diesen Hilfstext und Beendung.\n\n
+$ #CompileOptions
+# Optionen zum Kompilationszeitpunkt:\n\
+  Debugging\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Shape:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Ordered Dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/de_DE/openbox.m b/nls/de_DE/openbox.m
new file mode 100644
index 00000000..3b561926
--- /dev/null
+++ b/nls/de_DE/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: keine verwaltbaren Bildschirme gefunden, Abbruch\n
+$ #MapRequest
+# Openbox::process_event: MapRequest von 0x%lx\n
diff --git a/nls/es_ES/BaseDisplay.m b/nls/es_ES/BaseDisplay.m
new file mode 100644
index 00000000..07e42282
--- /dev/null
+++ b/nls/es_ES/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  Un error de X: %s(%d) clave de operación %d/%d\n  recurso 0x%lx\n
+$ #SignalCaught
+# %s: señal %d capturada\n
+$ #ShuttingDown
+# cerrando\n
+$ #Aborting
+# cancelando... generando 'core'\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: la conexión al servidor de X falló.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: no se pude marcar la conexión de despliegue como close-on-exec\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): quitando la ventana errónea de la cola de eventos\n
diff --git a/nls/es_ES/Basemenu.m b/nls/es_ES/Basemenu.m
new file mode 100644
index 00000000..3e69c6c6
--- /dev/null
+++ b/nls/es_ES/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Menú de Openbox
diff --git a/nls/es_ES/Configmenu.m b/nls/es_ES/Configmenu.m
new file mode 100644
index 00000000..8bc45048
--- /dev/null
+++ b/nls/es_ES/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Opciones de configuración
+$ #FocusModel
+# Modelo de enfoque
+$ #WindowPlacement
+# Ubicación de ventanas
+$ #ImageDithering
+# Simulación de colores en imágenes
+$ #OpaqueMove
+# Movimiento opaco de ventanas
+$ #FullMax
+# Maximización total
+$ #FocusNew
+# Enfocar ventanas nuevas
+$ #FocusLast
+# Enfocar la última ventana en el escritorio
+$ #ClickToFocus
+# Seleccionar para enfocar
+$ #SloppyFocus
+# Enfocar sin forma estricta
+$ #AutoRaise
+# Elevar automáticamente las ventanas
+$ #SmartRows
+# Ubicación inteligente (filas)
+$ #SmartCols
+# Ubicación inteligente (columnas)
+$ #Cascade
+# Ubicación en cascada
+$ #LeftRight
+# De izquierda a derecha
+$ #RightLeft
+# De derecha a izquierda
+$ #TopBottom
+# De arriba hacia abajo
+$ #BottomTop
+# De abajo hacia arriba
diff --git a/nls/es_ES/Icon.m b/nls/es_ES/Icon.m
new file mode 100644
index 00000000..4d576de3
--- /dev/null
+++ b/nls/es_ES/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Iconos
diff --git a/nls/es_ES/Image.m b/nls/es_ES/Image.m
new file mode 100644
index 00000000..f7e85e9f
--- /dev/null
+++ b/nls/es_ES/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: error creando el pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: error creando el XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: visual no soportado\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: error creando el pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: mapa no válido de colores tamaño %d (%d/%d/%d) - reduciendo\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: error en la asignación del mapa de colores\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: no se puede asignar el color %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: reserva de pixmaps - liberando %d pixmaps\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: reserva de pixmaps grande, forzando limpieza\n
+$ #ColorParseError
+# BImageControl::getColor: error evaluando el color: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: error asignando el color: '%s'\n
diff --git a/nls/es_ES/Makefile.am b/nls/es_ES/Makefile.am
new file mode 100644
index 00000000..d2988c66
--- /dev/null
+++ b/nls/es_ES/Makefile.am
@@ -0,0 +1,36 @@
+# nls/es_ES/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/es_ES"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/es_ES; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/es_ES; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/es; \
+		ln -f -s es_ES $(DESTDIR)$(pkgdatadir)/nls/es; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/es_ES/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/es; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/es_ES; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/es_ES/Makefile.in b/nls/es_ES/Makefile.in
new file mode 100644
index 00000000..5c57f6cd
--- /dev/null
+++ b/nls/es_ES/Makefile.in
@@ -0,0 +1,223 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/es_ES/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/es_ES/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/es_ES
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/es_ES/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/es_ES"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/es_ES; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/es_ES; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/es; \
+		ln -f -s es_ES $(DESTDIR)$(pkgdatadir)/nls/es; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/es_ES/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/es; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/es_ES; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/es_ES/Screen.m b/nls/es_ES/Screen.m
new file mode 100644
index 00000000..25841263
--- /dev/null
+++ b/nls/es_ES/Screen.m
@@ -0,0 +1,51 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: un error ocurrió mientras cuestionaba el servidor X.\n  otro gestor de ventanas se está ejecutando en conexión de despliegue %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: gestionando la pantalla %d usando visual 0x%lx, profundidad %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): no se puede cargar el tipo de letra '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): no se puede cargar el tipo de letra por omisión.\n
+$ #EmptyMenuFile
+# %s: archivo de menú vacío\n
+$ #xterm
+# xterm
+$ #Restart
+# Reiniciar
+$ #Exit
+# Salir
+$ #EXECError
+# BScreen::parseMenuFile: [exec] error, no hay etiqueta de menú ni comando definido\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] error, no hay etiqueta de menú definida\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] error, no hay etiqueta de menú ni archivo \
+definido\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] error, no hay etiqueta de menú definida\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] error, no hay nombre de archivo definido\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] error, '%s' no es un archivo regular\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] error, no hay etiqueta de menú definida\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] error, no hay etiqueta de menú definida\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] error, no hay etiqueta de menú definida\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, no hay directorio definido\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' no es un directorio\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] error, '%s' no existe\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] error, no hay etiqueta de menú definida\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
diff --git a/nls/es_ES/Slit.m b/nls/es_ES/Slit.m
new file mode 100644
index 00000000..9af9a6af
--- /dev/null
+++ b/nls/es_ES/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Dirección de slit
+$ #SlitPlacement
+# Ubicación de slit
diff --git a/nls/es_ES/Toolbar.m b/nls/es_ES/Toolbar.m
new file mode 100644
index 00000000..36be026a
--- /dev/null
+++ b/nls/es_ES/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+# %02d:%02d
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Escritorio
+$ #EditWkspcName
+# Cambiar el nombre del escritorio actual
+$ #ToolbarPlacement
+# Ubicación de la barra de herramientas
diff --git a/nls/es_ES/Window.m b/nls/es_ES/Window.m
new file mode 100644
index 00000000..6d0505d8
--- /dev/null
+++ b/nls/es_ES/Window.m
@@ -0,0 +1,18 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: creando 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres falló\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: no se puede encontrar la pantalla para la ventana \
+  raíz 0x%lx\n
+$ #Unnamed
+# Sin nombre
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() para 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() para 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: el padre nuevo para 0x%lx es la raíz\n
diff --git a/nls/es_ES/Windowmenu.m b/nls/es_ES/Windowmenu.m
new file mode 100644
index 00000000..b2e0c540
--- /dev/null
+++ b/nls/es_ES/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Enviar a ...
+$ #Shade
+# Enrollar
+$ #Iconify
+# Convertir en icono
+$ #Maximize
+# Maximizar
+$ #Raise
+# Elevar
+$ #Lower
+# Bajar
+$ #Stick
+# Fijar
+$ #KillClient
+# Matar al cliente
+$ #Close
+# Cerrar
diff --git a/nls/es_ES/Workspace.m b/nls/es_ES/Workspace.m
new file mode 100644
index 00000000..234e310c
--- /dev/null
+++ b/nls/es_ES/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Escritorio %d
diff --git a/nls/es_ES/Workspacemenu.m b/nls/es_ES/Workspacemenu.m
new file mode 100644
index 00000000..64fb4606
--- /dev/null
+++ b/nls/es_ES/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Escritorios
+$ #NewWorkspace
+# Escritorio nuevo
+$ #RemoveLast
+# Quitar el último escritorio
diff --git a/nls/es_ES/bsetroot.m b/nls/es_ES/bsetroot.m
new file mode 100644
index 00000000..0692e9e4
--- /dev/null
+++ b/nls/es_ES/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: error: es necesario especifiar uno de: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         conexión de despliegue\n\
+  -mod               diseño de modula \n\
+  -foreground, -fg  color del primer plano de modula\n\
+  -background, -bg  color del fondo de modula\n\n\
+  -gradient       textura de la pendiente\n\
+  -from             color inicial de la pendiente\n\
+  -to               color final de la pendiente\n\n\
+  -solid            color sólido\n\n\
+  -help                    mostrar este texto de ayuda y salir\n
+
diff --git a/nls/es_ES/common.m b/nls/es_ES/common.m
new file mode 100644
index 00000000..2fde0c0d
--- /dev/null
+++ b/nls/es_ES/common.m
@@ -0,0 +1,35 @@
+$set 15 #Common
+
+$ #Yes
+# Sí
+$ #No
+# No
+
+$ #DirectionTitle
+# Dirección
+$ #DirectionHoriz
+# Horizontal
+$ #DirectionVert
+# Vertical
+
+$ #AlwaysOnTop
+# Siempre encima/arriba
+
+$ #PlacementTitle
+# Ubicación 
+$ #PlacementTopLeft
+# Arriba a la izquierda
+$ #PlacementCenterLeft
+# Centro a la izquierda
+$ #PlacementBottomLeft
+# Abajo a la izquierda
+$ #PlacementTopCenter
+# Arriba al centro
+$ #PlacementBottomCenter
+# Abajo al centro
+$ #PlacementTopRight
+# Arriba a la derecha
+$ #PlacementCenterRight
+# Centro a la derecha
+$ #PlacementBottomRight
+# Abajo a la derecha
diff --git a/nls/es_ES/main.m b/nls/es_ES/main.m
new file mode 100644
index 00000000..d80cf938
--- /dev/null
+++ b/nls/es_ES/main.m
@@ -0,0 +1,23 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# error: '-rc' requiere un argumento
+$ #DISPLAYRequiresArg
+# error: '-display' requiere un argumento
+$ #WarnDisplaySet
+# cuidado: no se puede establecer la variable de ambiente 'DISPLAY'
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display  conexión de despliegue.\n\
+  -rc       archivo alternativo de recuros.\n\
+  -version          mostrar la versión y cerrar.\n\
+  -help             mostrar este texto de ayuda y cerrar.\n\n
+$ #CompileOptions
+# Opciones durante la compilación:\n\
+  Información extra para depuración:               %s\n\
+  Entrelazado:                                     %s\n\
+  Forma:                                           %s\n\
+  Slit:                                            %s\n\
+  8bpp simulación ordenada de colores en imágenes: %s\n\n
diff --git a/nls/es_ES/openbox.m b/nls/es_ES/openbox.m
new file mode 100644
index 00000000..5b9d98ef
--- /dev/null
+++ b/nls/es_ES/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: no encontré pantallas manejables, cerrando\n
+$ #MapRequest
+# Openbox::process_event: MapRequest para 0x%lx\n
diff --git a/nls/et_EE/BaseDisplay.m b/nls/et_EE/BaseDisplay.m
new file mode 100644
index 00000000..b27c26be
--- /dev/null
+++ b/nls/et_EE/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X'i viga: %s(%d) opkood %d/%d\n  resurss 0x%lx\n
+$ #SignalCaught
+# %s: signaal %d püütud\n
+$ #ShuttingDown
+# lõpetame\n
+$ #Aborting
+# katkestame... mälupilt tehtud\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: ühenduse saamine X serveriga ebaõnnestus.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: ühenduse märgistamine 'close-on-exec' ebaõnnestus\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): eemaldame vigase akna tominigute reast\n
diff --git a/nls/et_EE/Basemenu.m b/nls/et_EE/Basemenu.m
new file mode 100644
index 00000000..3e385fe6
--- /dev/null
+++ b/nls/et_EE/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox'i Menüü
diff --git a/nls/et_EE/Configmenu.m b/nls/et_EE/Configmenu.m
new file mode 100644
index 00000000..758d3647
--- /dev/null
+++ b/nls/et_EE/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Konfiguratsioon
+$ #FocusModel
+# Fookusmood
+$ #WindowPlacement
+# Akende paigutamine
+$ #ImageDithering
+# Piltide teravustamine
+$ #OpaqueMove
+# Nähtav akende liigutamine
+$ #FullMax
+# Üle-ekraani suurendus
+$ #FocusNew
+# Fookus uutele akendele
+$ #FocusLast
+# Fokusseeri viimane aken
+$ #ClickToFocus
+# Klikka fookuse saamiseks
+$ #SloppyFocus
+# Kaasaskäiv fookus
+$ #AutoRaise
+# Akende esiletoomine
+$ #SmartRows
+# Arukas paigutus (read)
+$ #SmartCols
+# Arukas paigutus (tulbad)
+$ #Cascade
+# Kaskaadis
+$ #LeftRight
+# Vasakult paremale
+$ #RightLeft
+# Paremalt vasakule
+$ #TopBottom
+# Ülevalt alla
+$ #BottomTop
+# Alt ülesse
diff --git a/nls/et_EE/Icon.m b/nls/et_EE/Icon.m
new file mode 100644
index 00000000..5f42f625
--- /dev/null
+++ b/nls/et_EE/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Ikoonid
diff --git a/nls/et_EE/Image.m b/nls/et_EE/Image.m
new file mode 100644
index 00000000..8700c4d9
--- /dev/null
+++ b/nls/et_EE/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: viga pixmapi loomisel\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: viga XImage loomisel\n
+$ #UnsupVisual
+# BImage::renderXImage: toeta visuaal\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: viga pixmapi loomisel\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: vale värvipaletti suurus %d (%d/%d/%d) - vähendame\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: viga värvipaletti määramisel \n
+$ #ColorAllocFail
+# BImageControl::BImageControl: ei õnnestunud värvi määrata %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: pixmap cache - vabastame %d pixmappi\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: cache on liiga suur, sundpuhastus\n
+$ #ColorParseError
+# BImageControl::getColor: viga värvi analüüsimisel: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: viga värvi määramisel: '%s'\n
diff --git a/nls/et_EE/Makefile.am b/nls/et_EE/Makefile.am
new file mode 100644
index 00000000..d8d05b46
--- /dev/null
+++ b/nls/et_EE/Makefile.am
@@ -0,0 +1,33 @@
+# nls/et_EE/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/et_EE"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/et_EE ; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/et_EE; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/et_EE/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/et_EE; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/et_EE/Makefile.in b/nls/et_EE/Makefile.in
new file mode 100644
index 00000000..34f1f4e9
--- /dev/null
+++ b/nls/et_EE/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/et_EE/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/et_EE/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/et_EE
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/et_EE/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/et_EE"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/et_EE ; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/et_EE; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/et_EE/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/et_EE; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/et_EE/Screen.m b/nls/et_EE/Screen.m
new file mode 100644
index 00000000..f8a15c81
--- /dev/null
+++ b/nls/et_EE/Screen.m
@@ -0,0 +1,53 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: viga X serveri küsitlemisel.\n  \
+teine akahaldur juba töötab displeil %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: haldame displeid %d reolutsioonis 0x%lx, vörvisügavusel %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): ei saanud laadida fonti '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): ei saanud laadida vaikimisi määratud fonti.\n
+$ #EmptyMenuFile
+# %s: tühi menüüfail\n
+$ #xterm
+# xterm
+$ #Restart
+# Restart
+$ #Exit
+# Välju
+$ #EXECError
+# BScreen::parseMenuFile: [exec] viga, menüü pealkirja ja/või käsku pole määratud\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] viga, menüü pealkirja pole määratud\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] viga, menüü pealkirja ja/või failinime \
+pole määratud\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] viga, menüü pealkirja pole määratud\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] viga, failinime pole määratud\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] viga, '%s' ei ole tavaline fail\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] viga, menüü pealkirja pole määratud\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] viga, menüü pealkirja pole määratud\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] viga, menüü pealkirja pole määratud\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] viga, kataloogi pole määratud\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] viga, '%s' pole kataloog\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] viga, '%s' pole olemas\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] viga, menüü pealkirja pole määratud\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/et_EE/Slit.m b/nls/et_EE/Slit.m
new file mode 100644
index 00000000..798b4490
--- /dev/null
+++ b/nls/et_EE/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Pragu
+$ #SlitDirection
+# Prao suund
+$ #SlitPlacement
+# Prao asukoht
diff --git a/nls/et_EE/Toolbar.m b/nls/et_EE/Toolbar.m
new file mode 100644
index 00000000..e1879f97
--- /dev/null
+++ b/nls/et_EE/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Tegumiriba
+$ #EditWkspcName
+# Muuda töölaua nime
+$ #ToolbarPlacement
+# Tegumiriba asukoht
diff --git a/nls/et_EE/Window.m b/nls/et_EE/Window.m
new file mode 100644
index 00000000..7d142d13
--- /dev/null
+++ b/nls/et_EE/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: loome 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres ebaõnnestus\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: ei leidnud displeid juuraknale 0x%lx\n
+$ #Unnamed
+# Nimeta
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() 0x%lx'le\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() 0x%lx'le\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: 0x%lx juurele\n
diff --git a/nls/et_EE/Windowmenu.m b/nls/et_EE/Windowmenu.m
new file mode 100644
index 00000000..863a9453
--- /dev/null
+++ b/nls/et_EE/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Saada...
+$ #Shade
+# Varjuta
+$ #Iconify
+# Ikoniseeri
+$ #Maximize
+# Suurenda
+$ #Raise
+# Esiplaanile
+$ #Lower
+# Tahaplaanile
+$ #Stick
+# Kleebi
+$ #KillClient
+# Killi klient
+$ #Close
+# Sulge
diff --git a/nls/et_EE/Workspace.m b/nls/et_EE/Workspace.m
new file mode 100644
index 00000000..c12bfb23
--- /dev/null
+++ b/nls/et_EE/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Töölaud %d
diff --git a/nls/et_EE/Workspacemenu.m b/nls/et_EE/Workspacemenu.m
new file mode 100644
index 00000000..62747192
--- /dev/null
+++ b/nls/et_EE/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Töölauad
+$ #NewWorkspace
+# Uus töölaud
+$ #RemoveLast
+# Eemalda viimane
diff --git a/nls/et_EE/bsetroot.m b/nls/et_EE/bsetroot.m
new file mode 100644
index 00000000..110176c8
--- /dev/null
+++ b/nls/et_EE/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: viga: pead määratlema ühe järgnevaist: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         displei ühendus\n\
+  -mod               moodula tapeet\n\
+  -foreground, -fg  esiplaani värvi moodula\n\
+  -background, -bg  tausta värvi moodula\n\n\
+  -gradient       gradientne tekstuur\n\
+  -from             gradiendi algusvärv\n\
+  -to               gradiendi lõpuvärv\n\n\
+  -solid            ühtne värv\n\n\
+  -help                    näida seda abiteksti ja välju\n
+
diff --git a/nls/et_EE/common.m b/nls/et_EE/common.m
new file mode 100644
index 00000000..05202dba
--- /dev/null
+++ b/nls/et_EE/common.m
@@ -0,0 +1,35 @@
+$set 15 #Common
+
+$ #Yes
+# Jah
+$ #No
+# Ei
+
+$ #DirectionTitle
+# Suund
+$ #DirectionHoriz
+# Horisontaalne
+$ #DirectionVert
+# Vertikaalne
+
+$ #AlwaysOnTop
+# Alati esiplaanil
+
+$ #PlacementTitle
+# Asetus
+$ #PlacementTopLeft
+# Üleval vasakul
+$ #PlacementCenterLeft
+# Keskel vasakul
+$ #PlacementBottomLeft
+# All vasakul
+$ #PlacementTopCenter
+# Üleval keskel
+$ #PlacementBottomCenter
+# All keskel
+$ #PlacementTopRight
+# Üleval paremal
+$ #PlacementCenterRight
+# Keskel paremal
+$ #PlacementBottomRight
+# All paremal
diff --git a/nls/et_EE/main.m b/nls/et_EE/main.m
new file mode 100644
index 00000000..984b5565
--- /dev/null
+++ b/nls/et_EE/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# viga: '-rc' vajab argumenti\n
+$ #DISPLAYRequiresArg
+# viga: '-display' vajab argumenti\n
+$ #WarnDisplaySet
+# hoiatus: ei saanud määrata keskonna muutujat 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tkasuta displei ühendust.\n\
+  -rc \t\t\tkasuta alternatiivseid resursse.\n\
+  -version\t\t\tnäita versiooninumber ja välju.\n\
+  -help\t\t\t\tnäita seda abiteksti ja välju.\n\n
+$ #CompileOptions
+# Kompileerimisoptsioonid:\n\
+  Debuggimine\t\t\t%s\n\
+  Põimimine:\t\t\t%s\n\
+  Kuju:\t\t\t%s\n\
+  Pragu:\t\t\t\t%s\n\
+  8bpp määratud teravustamine:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/et_EE/openbox.m b/nls/et_EE/openbox.m
new file mode 100644
index 00000000..c79125f1
--- /dev/null
+++ b/nls/et_EE/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: ei leidnud hallatavaid displeisid, katkestame\n
+$ #MapRequest
+# Openbox::process_event: MapRequest 0x%lx'le\n
diff --git a/nls/fr_FR/BaseDisplay.m b/nls/fr_FR/BaseDisplay.m
new file mode 100644
index 00000000..a3bf54f3
--- /dev/null
+++ b/nls/fr_FR/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  Erreur de X %s(%d) opcodes %d/%d\n  ressource 0x%lx\n
+$ #SignalCaught
+# %s: signal %d capturé\n
+$ #ShuttingDown
+# arrêt du programme\n
+$ #Aborting
+# annulation... ponte du fichier core\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: échec de la connexion à X\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: impossible d'attribuer close-on-exec à l'affichage\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): suppression d'une mauvaise fenêtre de la queue\n
diff --git a/nls/fr_FR/Basemenu.m b/nls/fr_FR/Basemenu.m
new file mode 100644
index 00000000..eb70e079
--- /dev/null
+++ b/nls/fr_FR/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Menu de Openbox
diff --git a/nls/fr_FR/Configmenu.m b/nls/fr_FR/Configmenu.m
new file mode 100644
index 00000000..529ef1e7
--- /dev/null
+++ b/nls/fr_FR/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Options de configuration
+$ #FocusModel
+# Mode de convergence
+$ #WindowPlacement
+# Disposition des fenêtres
+$ #ImageDithering
+# Lissage d'images
+$ #OpaqueMove
+# Déplacement opaque des fenêtres
+$ #FullMax
+# Maximization complète
+$ #FocusNew
+# Convergence de la nouvelle fenêtre
+$ #FocusLast
+# Convergence de la dernière fenêtre
+$ #ClickToFocus
+# Cliquer pour converger
+$ #SloppyFocus
+# Convergence souple
+$ #AutoRaise
+# Premier plan automatique
+$ #SmartRows
+# Disposition futée (Lignes)
+$ #SmartCols
+# Disposition futée (Colonnes)
+$ #Cascade
+# Disposition en cascade
+$ #LeftRight
+# De gauche à droite
+$ #RightLeft
+# De droite à gauche
+$ #TopBottom
+# De haut en bas
+$ #BottomTop
+# De bas en haut
diff --git a/nls/fr_FR/Icon.m b/nls/fr_FR/Icon.m
new file mode 100644
index 00000000..2e350970
--- /dev/null
+++ b/nls/fr_FR/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Icones
diff --git a/nls/fr_FR/Image.m b/nls/fr_FR/Image.m
new file mode 100644
index 00000000..d8642e70
--- /dev/null
+++ b/nls/fr_FR/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: Erreur de création de pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: Erreur de création de XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: Image non endossée\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: Erreur de création de pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: Taille des couleurs parentes invalide%d (%d/%d/%d) - coupe\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: Erreur d'allocation des couleurs parentes\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: Echec d'allocation de couleur %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: Cache pixmap - abandon %d pixmaps\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: Cache important, nettoyage conséquent\n
+$ #ColorParseError
+# BImageControl::getColor: Erreur de lecture de couleur: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: Erreur d'allocation,couleur: '%s'\n
diff --git a/nls/fr_FR/Makefile.am b/nls/fr_FR/Makefile.am
new file mode 100644
index 00000000..44109553
--- /dev/null
+++ b/nls/fr_FR/Makefile.am
@@ -0,0 +1,36 @@
+# nls/fr_FR/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/fr_FR"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/fr_FR; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/fr_FR; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/fr; \
+		ln -f -s fr_FR $(DESTDIR)$(pkgdatadir)/nls/fr; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/fr_FR/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/fr; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/fr_FR; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/fr_FR/Makefile.in b/nls/fr_FR/Makefile.in
new file mode 100644
index 00000000..97c725c0
--- /dev/null
+++ b/nls/fr_FR/Makefile.in
@@ -0,0 +1,223 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/fr_FR/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/fr_FR/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/fr_FR
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/fr_FR/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/fr_FR"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/fr_FR; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/fr_FR; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/fr; \
+		ln -f -s fr_FR $(DESTDIR)$(pkgdatadir)/nls/fr; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/fr_FR/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/fr; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/fr_FR; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/fr_FR/Screen.m b/nls/fr_FR/Screen.m
new file mode 100644
index 00000000..40296a8a
--- /dev/null
+++ b/nls/fr_FR/Screen.m
@@ -0,0 +1,54 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: Occurence d'une erreur pendant une requête vers X.\n  \
+Un autre gestionnaire de fenêtres est déjà lancé %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: Gestion de l'écran %d avec le visuel 0x%lx, profondeur %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): Impossible de charger la police de caractère '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): Impossible de charger la police de caractère initiale.\n
+$ #EmptyMenuFile
+# %s: Fichier de menu vide\n
+$ #xterm
+# xterm
+$ #Restart
+# Redémarrer
+$ #Exit
+# Sortie
+$ #EXECError
+# BScreen::parseMenuFile: [exec] Erreur, pas d'indication de menu &/ou de commande definie\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] Erreur, aucune indication de menu définie\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] Erreur, pas d'indication de menu &/ou de nom de fichier\
+defini\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] Erreur, aucune indication de menu définie\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] Erreur, aucun nom de fichier défini\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] Erreur, '%s' est un fichier invalide\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] Erreur, aucune indication de menu définie\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] Erreur, aucune indication de menu définie\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] Erreur, aucune indication de menu définie\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] Erreur, aucun répertoire défini\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] Erreur, '%s' est un répertoire \
+invalide\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] Erreur, '%s' est inexistant\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] Erreur, aucune indication de menu définie\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# L: %4d x H: %4d
+
diff --git a/nls/fr_FR/Slit.m b/nls/fr_FR/Slit.m
new file mode 100644
index 00000000..95f05957
--- /dev/null
+++ b/nls/fr_FR/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Orientation du Slit
+$ #SlitPlacement
+# Disposition du Slit
diff --git a/nls/fr_FR/Toolbar.m b/nls/fr_FR/Toolbar.m
new file mode 100644
index 00000000..8d9808fb
--- /dev/null
+++ b/nls/fr_FR/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Barre d'outils
+$ #EditWkspcName
+# Bâptème du bureau courant
+$ #ToolbarPlacement
+# Disposition de la barre d'outils
diff --git a/nls/fr_FR/Window.m b/nls/fr_FR/Window.m
new file mode 100644
index 00000000..de1ed57d
--- /dev/null
+++ b/nls/fr_FR/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: Génération 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: Echec de XGetWindowAttributres\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: Impossible de trouver l'écran de la fenêtre racine0x%lx\n
+$ #Unnamed
+# Inconnu
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() pour 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() pour 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: réattribue 0x%lx à la fenêtre principale\n
diff --git a/nls/fr_FR/Windowmenu.m b/nls/fr_FR/Windowmenu.m
new file mode 100644
index 00000000..c7696965
--- /dev/null
+++ b/nls/fr_FR/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Redirige vers...
+$ #Shade
+# Ombrage
+$ #Iconify
+# Iconifie
+$ #Maximize
+# Maximize
+$ #Raise
+# Résurrection
+$ #Lower
+# Réduit
+$ #Stick
+# Epingle
+$ #KillClient
+# Massacre
+$ #Close
+# Ferme
diff --git a/nls/fr_FR/Workspace.m b/nls/fr_FR/Workspace.m
new file mode 100644
index 00000000..505e670c
--- /dev/null
+++ b/nls/fr_FR/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Bureau %d
diff --git a/nls/fr_FR/Workspacemenu.m b/nls/fr_FR/Workspacemenu.m
new file mode 100644
index 00000000..48293941
--- /dev/null
+++ b/nls/fr_FR/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Bureaux
+$ #NewWorkspace
+# Nouveau bureau
+$ #RemoveLast
+# Supprimer le dernier
diff --git a/nls/fr_FR/bsetroot.m b/nls/fr_FR/bsetroot.m
new file mode 100644
index 00000000..4d34a543
--- /dev/null
+++ b/nls/fr_FR/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: Erreur: il faut préciser: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         	connexion à l'écran\n\
+  -mod               	schéma\n\
+  -foreground, -fg  	couleur au premier plan\n\
+  -background, -bg  	couleur au second plan\n\n\
+  -gradient       	texture du dégradé\n\
+  -from             	couleur de départ du dégradé\n\
+  -to               	couleur d'arrivé du dégradé\n\n\
+  -solid            	couleur pleine\n\n\
+  -help                    	affiche ce texte d'aide et quitte\n
+
diff --git a/nls/fr_FR/common.m b/nls/fr_FR/common.m
new file mode 100644
index 00000000..bd7faac9
--- /dev/null
+++ b/nls/fr_FR/common.m
@@ -0,0 +1,35 @@
+$set 15 #Common
+
+$ #Yes
+# Oui
+$ #No
+# Non
+
+$ #DirectionTitle
+# Orientation
+$ #DirectionHoriz
+# Horizontal
+$ #DirectionVert
+# Vertical
+
+$ #AlwaysOnTop
+# Toujours au-dessus
+
+$ #PlacementTitle
+# Disposition
+$ #PlacementTopLeft
+# En haut à gauche
+$ #PlacementCenterLeft
+# Au centre à gauche
+$ #PlacementBottomLeft
+# En bas à gauche
+$ #PlacementTopCenter
+# En haut au centre
+$ #PlacementBottomCenter
+# En bas au centre
+$ #PlacementTopRight
+# En haut à droite
+$ #PlacementCenterRight
+# Au centre à droite
+$ #PlacementBottomRight
+# En bas à droite
diff --git a/nls/fr_FR/main.m b/nls/fr_FR/main.m
new file mode 100644
index 00000000..5963b7c8
--- /dev/null
+++ b/nls/fr_FR/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# Erreur: '-rc' nécessite un argument\n
+$ #DISPLAYRequiresArg
+# Erreur: '-display' nécessite un argument\n
+$ #WarnDisplaySet
+# Attention: impossible d'attribuer la variable d'environnement 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tutilise la connexion à l'affichage.\n\
+  -rc \t\t\tutilise un autre fichier de configuration.\n\
+  -version\t\t\taffiche la version et quitte.\n\
+  -help\t\t\t\taffiche ce texte d'aide et quitte.\n\n
+$ #CompileOptions
+# Options de compilation:\n\
+  Debugging\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Shape:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Ordered Dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/fr_FR/openbox.m b/nls/fr_FR/openbox.m
new file mode 100644
index 00000000..1040ed0e
--- /dev/null
+++ b/nls/fr_FR/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: Aucun écran exploitable n'a été trouvé, annulation\n
+$ #MapRequest
+# Openbox::process_event: MapRequest pour 0x%lx\n
diff --git a/nls/it_IT/BaseDisplay.m b/nls/it_IT/BaseDisplay.m
new file mode 100644
index 00000000..11cd0de9
--- /dev/null
+++ b/nls/it_IT/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s: errore di X: %s(%d) opcodes %d/%d\n  risorsa 0x%lx\n
+$ #SignalCaught
+# %s: segnale %d intercettato\n
+$ #ShuttingDown
+# arresto del programma\n
+$ #Aborting
+# Annullamento...generazione file core\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: connessione al server X fallita.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: non e' possibile contrassegnare la connessione al display come close-on-exec\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): rimozione finestra difettosa dalla coda degli eventi\n
diff --git a/nls/it_IT/Basemenu.m b/nls/it_IT/Basemenu.m
new file mode 100644
index 00000000..e7867249
--- /dev/null
+++ b/nls/it_IT/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox Menu
diff --git a/nls/it_IT/Configmenu.m b/nls/it_IT/Configmenu.m
new file mode 100644
index 00000000..a8a93895
--- /dev/null
+++ b/nls/it_IT/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Opzioni di Configurazione
+$ #FocusModel
+# Modalita' Focus
+$ #WindowPlacement
+# Posizionamento Finestra
+$ #ImageDithering
+# Dithering dell'immagine
+$ #OpaqueMove
+# Movimento Opaco della finestra
+$ #FullMax
+# Massimo Ingrandimento
+$ #FocusNew
+# Attiva Focus alle nuove Finestre
+$ #FocusLast
+# Attiva Focus al cambio dell'Area di Lavoro
+$ #ClickToFocus
+# Clicca per il Focus
+$ #SloppyFocus
+# Focus Intelligente (Sloppy)
+$ #AutoRaise
+# Sollevamento Finestra Automatico
+$ #SmartRows
+# Posizionamento Intelligente (Righe)
+$ #SmartCols
+# Posizionamento Intelligente (Colonne)
+$ #Cascade
+# Posizionamento a Cascata
+$ #LeftRight
+# da Sinistra a Destra
+$ #RightLeft
+# da Destra a Sinistra
+$ #TopBottom
+# dall'Alto in Basso
+$ #BottomTop
+# dal Basso in Alto
diff --git a/nls/it_IT/Icon.m b/nls/it_IT/Icon.m
new file mode 100644
index 00000000..b5af81c5
--- /dev/null
+++ b/nls/it_IT/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Icone
diff --git a/nls/it_IT/Image.m b/nls/it_IT/Image.m
new file mode 100644
index 00000000..e98de00e
--- /dev/null
+++ b/nls/it_IT/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: errore creando la pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: errore creando XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: visuale non supportata\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: errore creando la pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: grandezza della mappa di colori non valida %d (%d/%d/%d) - riduzione\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: errore di assegnazione mappa di colori\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: fallita l'assegnazione del colore %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: pixmap cache - rilascio %d pixmaps\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: la cache e' larga, forzo la pulitura\n
+$ #ColorParseError
+# BImageControl::getColor: errore di analisi del colore: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: errore di assegnazione del colore: '%s'\n
diff --git a/nls/it_IT/Makefile.am b/nls/it_IT/Makefile.am
new file mode 100644
index 00000000..aac327e3
--- /dev/null
+++ b/nls/it_IT/Makefile.am
@@ -0,0 +1,36 @@
+# nls/it_IT/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/it_IT"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/it_IT; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/it_IT; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \
+		ln -f -s it_IT $(DESTDIR)$(pkgdatadir)/nls/it; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/it_IT/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/it_IT; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/it_IT/Makefile.in b/nls/it_IT/Makefile.in
new file mode 100644
index 00000000..75fca323
--- /dev/null
+++ b/nls/it_IT/Makefile.in
@@ -0,0 +1,223 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/it_IT/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/it_IT/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/it_IT
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/it_IT/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/it_IT"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/it_IT; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/it_IT; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \
+		ln -f -s it_IT $(DESTDIR)$(pkgdatadir)/nls/it; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/it_IT/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/it; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/it_IT; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/it_IT/Screen.m b/nls/it_IT/Screen.m
new file mode 100644
index 00000000..ecd6b6f9
--- /dev/null
+++ b/nls/it_IT/Screen.m
@@ -0,0 +1,54 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: e' accaduto un errore mentre si interrogava il server X.\n  \
+un'altro gestore di finestre e' attualmente in esecuzione sul display %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: gestendo schermo %d usando visuale 0x%lx, depth %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): impossibile caricare il font '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): impossibile caricare il font di default.\n
+$ #EmptyMenuFile
+# %s: file menu vuoto\n
+$ #xterm
+# xterm
+$ #Restart
+# Riavvia
+$ #Exit
+# Esci
+$ #EXECError
+# BScreen::parseMenuFile: [exec] errore, nessuna voce nel menu e/o comando definito\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] errore, nessuna voce nel menu definita\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] errore, nessuna voce nel menu e/o file\
+definto\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] errore, nessuna voce nel menu definta\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] errore, nessun file definito\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] errore, '%s' non è un file regolare\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] errore, nessuna voce nel menu definta\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] errore, nessuna voce nel menu definta\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] errore, nessuna voce nel menu definta\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] errore, nessuna cartella definita\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] errore, '%s' non e' una \
+cartella\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] errore, '%s' non esiste\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] errore, nessuna voce nel menu definita\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/it_IT/Slit.m b/nls/it_IT/Slit.m
new file mode 100644
index 00000000..38e66ec7
--- /dev/null
+++ b/nls/it_IT/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Direzione Slit
+$ #SlitPlacement
+# Posizionamento Slit
diff --git a/nls/it_IT/Toolbar.m b/nls/it_IT/Toolbar.m
new file mode 100644
index 00000000..ef28cb7e
--- /dev/null
+++ b/nls/it_IT/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Barra degli Strumenti
+$ #EditWkspcName
+# Modifica nome Area di Lavoro corrente
+$ #ToolbarPlacement
+# Posizionamento Barra
diff --git a/nls/it_IT/Window.m b/nls/it_IT/Window.m
new file mode 100644
index 00000000..401fc9ef
--- /dev/null
+++ b/nls/it_IT/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: creazione 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres fallito\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: impossibile trovare schermo per finestra principale 0x%lx\n
+$ #Unnamed
+# Senza Nome
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() per 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() per 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: reparent 0x%lx a root\n
diff --git a/nls/it_IT/Windowmenu.m b/nls/it_IT/Windowmenu.m
new file mode 100644
index 00000000..8820a5fa
--- /dev/null
+++ b/nls/it_IT/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Manda in ...
+$ #Shade
+# Arrotola
+$ #Iconify
+# Riduci a Icona
+$ #Maximize
+# Ingrandisci
+$ #Raise
+# Alza
+$ #Lower
+# Abbassa
+$ #Stick
+# Fissa
+$ #KillClient
+# Uccidi Programma
+$ #Close
+# Chiudi
diff --git a/nls/it_IT/Workspace.m b/nls/it_IT/Workspace.m
new file mode 100644
index 00000000..2edf94a7
--- /dev/null
+++ b/nls/it_IT/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Area di Lavoro %d
diff --git a/nls/it_IT/Workspacemenu.m b/nls/it_IT/Workspacemenu.m
new file mode 100644
index 00000000..28f768bd
--- /dev/null
+++ b/nls/it_IT/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Aree di Lavoro
+$ #NewWorkspace
+# Nuova Area di Lavoro
+$ #RemoveLast
+# Rimuovi Ultima
diff --git a/nls/it_IT/bsetroot.m b/nls/it_IT/bsetroot.m
new file mode 100644
index 00000000..3beadcfc
--- /dev/null
+++ b/nls/it_IT/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: errore: deve essere specificato uno dei seguenti: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         connessione display\n\
+  -mod               modello di modula\n\
+  -foreground, -fg  colore di primo piano di modula\n\
+  -background, -bg  colore di secondo piano di modula\n\n\
+  -gradient       trama sfumatura\n\
+  -from             colore d'inizio sfumatura\n\
+  -to               colore di fine sfumatura\n\n\
+  -solid            colore pieno\n\n\
+  -help                    mostra questo aiuto e esci\n
+
diff --git a/nls/it_IT/common.m b/nls/it_IT/common.m
new file mode 100644
index 00000000..fe736f4c
--- /dev/null
+++ b/nls/it_IT/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# Si
+$ #No
+# No
+
+$ #DirectionTitle
+# Direzione
+$ #DirectionHoriz
+# Orizzontale
+$ #DirectionVert
+# Verticale
+
+$ #AlwaysOnTop
+# Sempre in primo piano
+
+$ #PlacementTitle
+# Posizionamento
+$ #PlacementTopLeft
+# in Alto a Sinistra
+$ #PlacementCenterLeft
+# al Centro a Sinistra
+$ #PlacementBottomLeft
+# in Basso a Sinistra
+$ #PlacementTopCenter
+# in Alto al Centro
+$ #PlacementBottomCenter
+# in Basso al Centro
+$ #PlacementTopRight
+# in Alto a Destra
+$ #PlacementCenterRight
+# al Centro a Destra
+$ #PlacementBottomRight
+# in Basso a Destra
+
+$ #AutoHide
+# Nascondi Automaticamente
diff --git a/nls/it_IT/main.m b/nls/it_IT/main.m
new file mode 100644
index 00000000..0d8507de
--- /dev/null
+++ b/nls/it_IT/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# errore: '-rc' richiede un argomento\n
+$ #DISPLAYRequiresArg
+# errore: '-display' richiede an argomento\n
+$ #WarnDisplaySet
+# attenzione: impossibile impostare la variabile d'ambiente 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tusa connessione display.\n\
+  -rc \t\t\tusa un file risorsa alternativo.\n\
+  -version\t\t\tmostra la versione e esci.\n\
+  -help\t\t\t\tmostra questo aiuto e esci.\n\n
+$ #CompileOptions
+# Opzioni in fase di compilazione:\n\
+  Debugging\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Shape:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Ordered Dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/it_IT/openbox.m b/nls/it_IT/openbox.m
new file mode 100644
index 00000000..217d0af1
--- /dev/null
+++ b/nls/it_IT/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: nessuno schermo gestibile trovatono, annullamento\n
+$ #MapRequest
+# Openbox::process_event: MapRequest per 0x%lx\n
diff --git a/nls/ja_JP/BaseDisplay.m b/nls/ja_JP/BaseDisplay.m
new file mode 100644
index 00000000..a87fca5a
--- /dev/null
+++ b/nls/ja_JP/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X ¥¨¥é¡¼: %s(%d) opcodes %d/%d\n  resource 0x%lx\n
+$ #SignalCaught
+# %s: ¥·¥°¥Ê¥ë %d ȯÀ¸\n
+$ #ShuttingDown
+# ½ªÎ»\n
+$ #Aborting
+# Ãæ»ß ... ¥³¥¢¥À¥ó¥×¤·¤Þ¤¹\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: X ¥µ¡¼¥Ð¤Ø¤ÎÀܳ¤Ë¼ºÇÔ\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: couldn't mark display connection as close-on-exec\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): ¥¤¥Ù¥ó¥È¥­¥å¡¼¤«¤éÉÔÀµ¤Ê¥¦¥£¥ó¥É¥¦¤ò¾Ã¤·¤Þ¤¹\n
diff --git a/nls/ja_JP/Basemenu.m b/nls/ja_JP/Basemenu.m
new file mode 100644
index 00000000..a949482c
--- /dev/null
+++ b/nls/ja_JP/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox ¥á¥Ë¥å¡¼
diff --git a/nls/ja_JP/Configmenu.m b/nls/ja_JP/Configmenu.m
new file mode 100644
index 00000000..80297194
--- /dev/null
+++ b/nls/ja_JP/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# ÀßÄꥪ¥×¥·¥ç¥ó
+$ #FocusModel
+# ¥Õ¥©¡¼¥«¥¹¥â¥Ç¥ë
+$ #WindowPlacement
+# ¥¦¥£¥ó¥É¥¦ÇÛÃÖ
+$ #ImageDithering
+# ²èÁü¥Ç¥£¥¶
+$ #OpaqueMove
+# ¥¦¥£¥ó¥É¥¦ÉÔÆ©ÌÀ°ÜÆ°
+$ #FullMax
+# ´°Á´ºÇÂç²½
+$ #FocusNew
+# ¿·µ¬¥¦¥£¥ó¥É¥¦¤Ë¥Õ¥©¡¼¥«¥¹
+$ #FocusLast
+# ¥ï¡¼¥¯¥¹¥Ú¡¼¥¹Êѹ¹»þ¤Ë¥¦¥£¥ó¥É¥¦¤Ë¥Õ¥©¡¼¥«¥¹
+$ #ClickToFocus
+# Click to Focus
+$ #SloppyFocus
+# Sloppy Focus
+$ #AutoRaise
+# ¼«Æ°Åª¤ËÁ°Ì̤˽Ф¹
+$ #SmartRows
+# ¸­¤¯ÇÛÃÖ (¹Ô)
+$ #SmartCols
+# ¸­¤¯ÇÛÃÖ (Îó)
+$ #Cascade
+# ¤º¤é¤·¤ÆÇÛÃÖ
+$ #LeftRight
+# º¸¤«¤é±¦¤Ø
+$ #RightLeft
+# ±¦¤«¤éº¸¤Ø
+$ #TopBottom
+# ¾å¤«¤é²¼¤Ø
+$ #BottomTop
+# ²¼¤«¤é¾å¤Ø
diff --git a/nls/ja_JP/Icon.m b/nls/ja_JP/Icon.m
new file mode 100644
index 00000000..5d7e8d32
--- /dev/null
+++ b/nls/ja_JP/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# ¥¢¥¤¥³¥ó
diff --git a/nls/ja_JP/Image.m b/nls/ja_JP/Image.m
new file mode 100644
index 00000000..6322b2a7
--- /dev/null
+++ b/nls/ja_JP/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: ¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×À¸À®¥¨¥é¡¼\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: XImage À¸À®¥¨¥é¡¼\n
+$ #UnsupVisual
+# BImage::renderXImage: ̤¥µ¥Ý¡¼¥È¤Î»ë³Ð¸ú²Ì\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: ¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×À¸À®¥¨¥é¡¼\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: ÉÔÀµ¤Ê¥«¥é¡¼¥Þ¥Ã¥×¥µ¥¤¥º %d (%d/%d/%d) - ¸º¿§Ãæ\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: ¥«¥é¡¼¥Þ¥Ã¥×³ÎÊÝ¥¨¥é¡¼\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: ¥«¥é¡¼ %d/%d/%d ¤Î³ÎÊݤ˼ºÇÔ\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: ¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×¥­¥ã¥Ã¥·¥å -  %d ¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×¤ò²òÊü\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: ¥­¥ã¥Ã¥·¥å¤¬Â礭¤¹¤®¤ë¤Î¤Ç¶¯À©Åª¤ËÁݽü\n
+$ #ColorParseError
+# BImageControl::getColor: ¥«¥é¡¼²òÀÏ¥¨¥é¡¼: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: ¥«¥é¡¼³ÎÊÝ¥¨¥é¡¼: '%s'\n
diff --git a/nls/ja_JP/Makefile.am b/nls/ja_JP/Makefile.am
new file mode 100644
index 00000000..6c1c8020
--- /dev/null
+++ b/nls/ja_JP/Makefile.am
@@ -0,0 +1,33 @@
+# nls/ja_JP/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/ja_JP"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/ja_JP; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/ja_JP; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/ja_JP/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/ja_JP; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/ja_JP/Makefile.in b/nls/ja_JP/Makefile.in
new file mode 100644
index 00000000..157e34fe
--- /dev/null
+++ b/nls/ja_JP/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/ja_JP/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/ja_JP/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/ja_JP
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/ja_JP/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/ja_JP"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/ja_JP; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/ja_JP; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/ja_JP/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/ja_JP; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/ja_JP/Screen.m b/nls/ja_JP/Screen.m
new file mode 100644
index 00000000..098857d4
--- /dev/null
+++ b/nls/ja_JP/Screen.m
@@ -0,0 +1,53 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: X ¥µ¡¼¥ÐÌä¹ç¤»Ãæ¤Ë¥¨¥é¡¼È¯À¸\n  \
+another window manager is already running on display %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: ¥¹¥¯¥ê¡¼¥ó %d ¤ò»ë³Ð¸ú²Ì 0x%lx, ¿¼¤µ %d ¤ÇÀ©¸æ\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): ¥Õ¥©¥ó¥È '%s' ¤òÆɤ߹þ¤á¤Þ¤»¤ó¤Ç¤·¤¿\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): ¥Ç¥Õ¥©¥ë¥È¥Õ¥©¥ó¥È¤òÆɤ߹þ¤á¤Þ¤»¤ó¤Ç¤·¤¿\n
+$ #EmptyMenuFile
+# %s: ¶õ¤Î¥á¥Ë¥å¡¼¥Õ¥¡¥¤¥ë\n
+$ #xterm
+# xterm
+$ #Restart
+# ºÆµ¯Æ°
+$ #Exit
+# ½ªÎ»
+$ #EXECError
+# BScreen::parseMenuFile: [exec] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë¤È(¤¢¤ë¤¤¤Ï)¥³¥Þ¥ó¥É̤ÄêµÁ\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë¤È(¤¢¤ë¤¤¤Ï)¥Õ¥¡¥¤¥ë̤̾ÄêµÁ\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] ¥¨¥é¡¼¡¢¥Õ¥¡¥¤¥ë̤̾ÄêµÁ\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] ¥¨¥é¡¼¡¢'%s' ¤Ï¥ì¥®¥å¥é¡¼¥Õ¥¡¥¤¥ë¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] ¥¨¥é¡¼¡¢¥Ç¥£¥ì¥¯¥È¥ê̤̾ÄêµÁ\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] ¥¨¥é¡¼¡¢'%s' ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï\
+¤¢¤ê¤Þ¤»¤ó\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] ¥¨¥é¡¼¡¢'%s' ¤Ï¸ºß¤·¤Þ¤»¤ó\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] ¥¨¥é¡¼¡¢¥á¥Ë¥å¡¼¥é¥Ù¥ë̤ÄêµÁ\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# Éý: %4d x ¹â¤µ: %4d
+
diff --git a/nls/ja_JP/Slit.m b/nls/ja_JP/Slit.m
new file mode 100644
index 00000000..8e3d65ab
--- /dev/null
+++ b/nls/ja_JP/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Slit ¤ÎÊý¸þ
+$ #SlitPlacement
+# Slit ¤ÎÇÛÃÖ
diff --git a/nls/ja_JP/Toolbar.m b/nls/ja_JP/Toolbar.m
new file mode 100644
index 00000000..14c3bb3b
--- /dev/null
+++ b/nls/ja_JP/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# ¥Ä¡¼¥ë¥Ð¡¼
+$ #EditWkspcName
+# º£¤Î¥ï¡¼¥¯¥¹¥Ú¡¼¥¹Ì¾¤òÊÔ½¸
+$ #ToolbarPlacement
+# ¥Ä¡¼¥ë¥Ð¡¼¤Î°ÌÃÖ
diff --git a/nls/ja_JP/Window.m b/nls/ja_JP/Window.m
new file mode 100644
index 00000000..cafcdde1
--- /dev/null
+++ b/nls/ja_JP/Window.m
@@ -0,0 +1,18 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: 0x%lx ¤òÀ¸À®Ãæ\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres ¼ºÇÔ\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: ¥ë¡¼¥È¥¦¥£¥ó¥É¥¦ 0x%lx ¤ËÂФ¹¤ë¥¹¥¯¥ê¡¼¥ó¤¬\
+¤ß¤Ä¤«¤ê¤Þ¤»¤ó\n
+$ #Unnamed
+# ̾Á°¤Ê¤·
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() (0x%lx ¤ËÂФ·¤Æ)\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() (0x%lx ¤ËÂФ·¤Æ)\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
diff --git a/nls/ja_JP/Windowmenu.m b/nls/ja_JP/Windowmenu.m
new file mode 100644
index 00000000..deebbb13
--- /dev/null
+++ b/nls/ja_JP/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Á÷¤êÀè ...
+$ #Shade
+# ¥·¥§¡¼¥É
+$ #Iconify
+# ¥¢¥¤¥³¥ó²½
+$ #Maximize
+# ºÇÂç²½
+$ #Raise
+# Á°Ì̤˽Ф¹
+$ #Lower
+# ÇØÌ̤˲¼¤²¤ë
+$ #Stick
+# µïºÂ¤ê
+$ #KillClient
+# ¶¯À©½ªÎ»
+$ #Close
+# ½ªÎ»
diff --git a/nls/ja_JP/Workspace.m b/nls/ja_JP/Workspace.m
new file mode 100644
index 00000000..c1608291
--- /dev/null
+++ b/nls/ja_JP/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# ¥ï¡¼¥¯¥¹¥Ú¡¼¥¹ %d
diff --git a/nls/ja_JP/Workspacemenu.m b/nls/ja_JP/Workspacemenu.m
new file mode 100644
index 00000000..244dca2b
--- /dev/null
+++ b/nls/ja_JP/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# ¥ï¡¼¥¯¥¹¥Ú¡¼¥¹
+$ #NewWorkspace
+# ¿·µ¬¥ï¡¼¥¯¥¹¥Ú¡¼¥¹
+$ #RemoveLast
+# ËöÈø¤Î¥ï¡¼¥¯¥¹¥Ú¡¼¥¹¤ò¾Ã¤¹
diff --git a/nls/ja_JP/bsetroot.m b/nls/ja_JP/bsetroot.m
new file mode 100644
index 00000000..a0cb8ea1
--- /dev/null
+++ b/nls/ja_JP/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: ¥¨¥é¡¼: ¼¡¤ÎÃ椫¤é°ì¤Ä¤òÁªÂò¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         »ØÄê¥Ç¥£¥¹¥×¥ì¥¤¤ËÀܳ\n\
+  -mod               ¥â¥¸¥å¡¼¥é¥Ñ¥¿¡¼¥ó\n\
+  -foreground, -fg  ¥â¥¸¥å¡¼¥éÁ°·Ê¿§\n\
+  -background, -bg  ¥â¥¸¥å¡¼¥éÇØ·Ê¿§\n\n\
+  -gradient       ¥°¥é¥Ç¥£¥¨¥ó¥È¥Æ¥¯¥¹¥Á¥ã\n\
+  -from             ¥°¥é¥Ç¥£¥¨¥ó¥È³«»Ï¿§\n\
+  -to               ¥°¥é¥Ç¥£¥¨¥ó¥È½ªÃ¼¿§\n\n\
+  -solid            ñ¿§\n\n\
+  -help                    ¤³¤Î¥Ø¥ë¥×¤òɽ¼¨¤·¡¢½ªÎ»\n
+
diff --git a/nls/ja_JP/common.m b/nls/ja_JP/common.m
new file mode 100644
index 00000000..4344e769
--- /dev/null
+++ b/nls/ja_JP/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# ¤Ï¤¤
+$ #No
+# ¤¤¤¤¤¨
+
+$ #DirectionTitle
+# Êý¸þ
+$ #DirectionHoriz
+# ¿åÊ¿
+$ #DirectionVert
+# ¿âľ
+
+$ #AlwaysOnTop
+# ¾ï¤ËºÇÁ°Ì̤Ë
+
+$ #PlacementTitle
+# ÇÛÃÖ
+$ #PlacementTopLeft
+# º¸¾å
+$ #PlacementCenterLeft
+# º¸Ãæ±û
+$ #PlacementBottomLeft
+# º¸²¼
+$ #PlacementTopCenter
+# Ãæ±û¾å
+$ #PlacementBottomCenter
+# Ãæ±û²¼
+$ #PlacementTopRight
+# ±¦¾å
+$ #PlacementCenterRight
+# ±¦Ãæ±û
+$ #PlacementBottomRight
+# ±¦²¼
+
+$ #AutoHide
+# ¼«Æ°Åª¤Ë±£¤¹
diff --git a/nls/ja_JP/main.m b/nls/ja_JP/main.m
new file mode 100644
index 00000000..5aa8b23d
--- /dev/null
+++ b/nls/ja_JP/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# ¥¨¥é¡¼: '-rc' ¥ª¥×¥·¥ç¥ó¤Ï°ú¿ô¤òɬÍפȤ·¤Þ¤¹\n
+$ #DISPLAYRequiresArg
+# ¥¨¥é¡¼: '-display' ¥ª¥×¥·¥ç¥ó¤Ï°ú¿ô¤òɬÍפȤ·¤Þ¤¹\n
+$ #WarnDisplaySet
+# ·Ù¹ð: ´Ä¶­ÊÑ¿ô 'DISPLAY' ¤òÀßÄê¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\t»ØÄê¥Ç¥£¥¹¥×¥ì¥¤¤ËÀܳ\n\
+  -rc \t\t\tÂå¤ê¤Î¥ê¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò»ÈÍÑ\n\
+  -version\t\t\t¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤òɽ¼¨¤·¡¢½ªÎ»\n\
+  -help\t\t\t\t¤³¤Î¥Ø¥ë¥×¤òɽ¼¨¤·¡¢½ªÎ»\n\n
+$ #CompileOptions
+# ¥³¥ó¥Ñ¥¤¥ë»þ¥ª¥×¥·¥ç¥ó:\n\
+  Debugging\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Shape:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Ordered Dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/ja_JP/openbox.m b/nls/ja_JP/openbox.m
new file mode 100644
index 00000000..ea9fc3cf
--- /dev/null
+++ b/nls/ja_JP/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: Áàºî²Äǽ¤Ê¥¹¥¯¥ê¡¼¥ó¤¬¤¢¤ê¤Þ¤»¤ó¡¢Ãæ»ß¤·¤Þ¤¹\n
+$ #MapRequest
+# Openbox::process_event: MapRequest (0x%lx ¤ËÂФ·¤Æ)\n
diff --git a/nls/nl_NL/BaseDisplay.m b/nls/nl_NL/BaseDisplay.m
new file mode 100644
index 00000000..36512a32
--- /dev/null
+++ b/nls/nl_NL/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X fout: %s(%d) opcodes %d/%d\n  resource 0x%lx\n
+$ #SignalCaught
+# %s: signaal %d gekregen\n
+$ #ShuttingDown
+# bezig af te sluiten\n
+$ #Aborting
+# afgebroken... core bestand gedumpt\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: verbinding met X server mislukt\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: kan display verbinding niet markeren als 'close-on-exec'\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): verwijder 'bad window' van gebeurtenis wachtrij\n
diff --git a/nls/nl_NL/Basemenu.m b/nls/nl_NL/Basemenu.m
new file mode 100644
index 00000000..11cd3eed
--- /dev/null
+++ b/nls/nl_NL/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox menu
diff --git a/nls/nl_NL/Configmenu.m b/nls/nl_NL/Configmenu.m
new file mode 100644
index 00000000..d7655ed0
--- /dev/null
+++ b/nls/nl_NL/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Instellingen
+$ #FocusModel
+# Toetsenbord focusmodel
+$ #WindowPlacement
+# Plaatsing van vensters
+$ #ImageDithering
+# Kleurbenadering
+$ #OpaqueMove
+# Inhoud vensters zichtbaar tijdens slepen
+$ #FullMax
+# Volledig maximaliseren
+$ #FocusNew
+# Geef nieuwe vensters direct focus
+$ #FocusLast
+# Focus laatste venster bij wisselen van werkblad
+$ #ClickToFocus
+# Geef focus na muisklik in venster
+$ #SloppyFocus
+# Geef focus zodra muis in venster komt
+$ #AutoRaise
+# Vensters automatisch naar voorgrond
+$ #SmartRows
+# Optimale plaatsing (rijen)
+$ #SmartCols
+# Optimale plaatsing (kolommen)
+$ #Cascade
+# Trapsgewijs
+$ #LeftRight
+# Van links naar rechts
+$ #RightLeft
+# Van rechts naar links
+$ #TopBottom
+# Van boven naar beneden
+$ #BottomTop
+# Van beneden naar boven
diff --git a/nls/nl_NL/Icon.m b/nls/nl_NL/Icon.m
new file mode 100644
index 00000000..0b372bef
--- /dev/null
+++ b/nls/nl_NL/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Iconen
diff --git a/nls/nl_NL/Image.m b/nls/nl_NL/Image.m
new file mode 100644
index 00000000..4ce790fc
--- /dev/null
+++ b/nls/nl_NL/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: kan pixmap niet aanmaken\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: kan XImage niet aanmaken\n
+$ #UnsupVisual
+# BImage::renderXImage: niet ondersteunde visual\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: kan pixmap niet aanmaken\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: ongeldige grootte kleurenmap %d (%d/%d/%d) - verkleind\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: kan geen kleurenmap aanmaken\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: kan kleur %d/%d/%d niet aanmaken\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: pixmap cache - %d pixmaps verwijderd\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: cache is te groot, leeggemaakt\n
+$ #ColorParseError
+# BImageControl::getColor: fout bij lezen kleur: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: fout bij aanmaken kleur: '%s'\n
diff --git a/nls/nl_NL/Makefile.am b/nls/nl_NL/Makefile.am
new file mode 100644
index 00000000..d367c011
--- /dev/null
+++ b/nls/nl_NL/Makefile.am
@@ -0,0 +1,36 @@
+# nls/nl_NL/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/nl_NL"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/nl_NL; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/nl_NL; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \
+		ln -f -s nl_NL $(DESTDIR)$(pkgdatadir)/nls/nl; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/nl_NL/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/nl_NL; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/nl_NL/Makefile.in b/nls/nl_NL/Makefile.in
new file mode 100644
index 00000000..daee5edd
--- /dev/null
+++ b/nls/nl_NL/Makefile.in
@@ -0,0 +1,223 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/nl_NL/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/nl_NL/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/nl_NL
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/nl_NL/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/nl_NL"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/nl_NL; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/nl_NL; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \
+		ln -f -s nl_NL $(DESTDIR)$(pkgdatadir)/nls/nl; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/nl_NL/openbox.cat; \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/nl; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/nl_NL; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/nl_NL/Screen.m b/nls/nl_NL/Screen.m
new file mode 100644
index 00000000..571b51dd
--- /dev/null
+++ b/nls/nl_NL/Screen.m
@@ -0,0 +1,52 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: er is een fout opgetreden bij het verbinden met de X server.\n  \
+er werkt al een andere window manager op display %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: manager op scherm %d met visual 0x%lx, kleurdiepte %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): kan lettertype '%s' niet laden\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): kan standaardlettertype niet laden\n
+$ #EmptyMenuFile
+# %s: leeg menu bestand\n
+$ #xterm
+# xterm
+$ #Restart
+# Herstarten
+$ #Exit
+# Afsluiten
+$ #EXECError
+# BScreen::parseMenuFile: [exec] fout, geen label en/of commando aangegeven\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] fout, geen label aangegeven\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] fout, geen label en/of bestandsnaam aangegeven\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] fout, geen label aangegeven\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] fout, geen bestandsnaam aangegeven\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] fout, '%s' is geen leesbaar bestand\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] fout, geen label aangegeven\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] fout, geen label aangegeven\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] fout, geen label aangegeven\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fout, geen directory aangegeven\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fout, '%s' is geen directory\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fout, '%s' bestaat niet\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] fout, geen label aangegeven\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# B: %4d x H: %4d
+
diff --git a/nls/nl_NL/Slit.m b/nls/nl_NL/Slit.m
new file mode 100644
index 00000000..60eeae2e
--- /dev/null
+++ b/nls/nl_NL/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Richting
+$ #SlitPlacement
+# Plaats
diff --git a/nls/nl_NL/Toolbar.m b/nls/nl_NL/Toolbar.m
new file mode 100644
index 00000000..64eca2af
--- /dev/null
+++ b/nls/nl_NL/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Werkbalk
+$ #EditWkspcName
+# Wijzig naam van huidig werkblad
+$ #ToolbarPlacement
+# Plaats van werkbalk
diff --git a/nls/nl_NL/Window.m b/nls/nl_NL/Window.m
new file mode 100644
index 00000000..581a5f0e
--- /dev/null
+++ b/nls/nl_NL/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: maak window aan 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres mislukt\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: kan scherm voor root window 0x%lx niet vinden\n
+$ #Unnamed
+# Zonder titel
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() voor 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() voor 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: reparent 0x%lx naar root window\n
diff --git a/nls/nl_NL/Windowmenu.m b/nls/nl_NL/Windowmenu.m
new file mode 100644
index 00000000..c09e4b28
--- /dev/null
+++ b/nls/nl_NL/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Verplaatsen naar ...
+$ #Shade
+# Alleen titel
+$ #Iconify
+# Minimaliseren
+$ #Maximize
+# Maximaliseren
+$ #Raise
+# Voorgrond
+$ #Lower
+# Achtergrond
+$ #Stick
+# Altijd zichtbaar
+$ #KillClient
+# Afbreken
+$ #Close
+# Sluiten
diff --git a/nls/nl_NL/Workspace.m b/nls/nl_NL/Workspace.m
new file mode 100644
index 00000000..5bff9757
--- /dev/null
+++ b/nls/nl_NL/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Werkblad %d
diff --git a/nls/nl_NL/Workspacemenu.m b/nls/nl_NL/Workspacemenu.m
new file mode 100644
index 00000000..311fb1f1
--- /dev/null
+++ b/nls/nl_NL/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Werkbladen
+$ #NewWorkspace
+# Nieuw werkblad
+$ #RemoveLast
+# Verwijder laatste werkblad
diff --git a/nls/nl_NL/bsetroot.m b/nls/nl_NL/bsetroot.m
new file mode 100644
index 00000000..accb793d
--- /dev/null
+++ b/nls/nl_NL/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: fout: een van -solid, -mod, -gradient moet aangegeven worden\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display    display verbinding\n\
+  -mod               modula patroon\n\
+  -foreground, -fg  modula voorgrondkleur\n\
+  -background, -bg  modula achtergrondkleur\n\n\
+  -gradient       gradiënt textuur\n\
+  -from             gradiënt beginkleur\n\
+  -to               gradiënt eindkleur\n\n\
+  -solid            effen kleur\n\n\
+  -help                    toon deze hulp tekst en stop\n
+
diff --git a/nls/nl_NL/common.m b/nls/nl_NL/common.m
new file mode 100644
index 00000000..66c95c03
--- /dev/null
+++ b/nls/nl_NL/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# Ja
+$ #No
+# Nee
+
+$ #DirectionTitle
+# Richting
+$ #DirectionHoriz
+# Horizontaal
+$ #DirectionVert
+# Vertikaal
+
+$ #AlwaysOnTop
+# Altijd op voorgrond
+
+$ #PlacementTitle
+# Plaatsing
+$ #PlacementTopLeft
+# Linksboven
+$ #PlacementCenterLeft
+# Links
+$ #PlacementBottomLeft
+# Linksonder
+$ #PlacementTopCenter
+# Middenboven
+$ #PlacementBottomCenter
+# Middenonder
+$ #PlacementTopRight
+# Rechtsboven
+$ #PlacementCenterRight
+# Rechts
+$ #PlacementBottomRight
+# Rechtsonder
+
+$ #AutoHide
+# Automatisch verbergen
diff --git a/nls/nl_NL/main.m b/nls/nl_NL/main.m
new file mode 100644
index 00000000..8cab5381
--- /dev/null
+++ b/nls/nl_NL/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# fout: '-rc' heeft een argument nodig (bestandsnaam)\n
+$ #DISPLAYRequiresArg
+# fout: '-display' heeft een argument nodig (displaynaam)\n
+$ #WarnDisplaySet
+# waarschuwing: kan omgevingsvariabele 'DISPLAY' niet instellen\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display    gebruik aangegeven display.\n\
+  -rc        gebruik alternatief resource bestand.\n\
+  -version                 toon versie en stop.\n\
+  -help                    toon deze hulp tekst en stop.\n\n
+$ #CompileOptions
+# Gecompileerd met instellingen:\n\
+  Debugging:               %s\n\
+  Interlacing:             %s\n\
+  Shape:                   %s\n\
+  Slit:                    %s\n\
+  8bpp Ordered Dithering:  %s\n\
+  Event Clobbering:        %s\n\n
diff --git a/nls/nl_NL/openbox.m b/nls/nl_NL/openbox.m
new file mode 100644
index 00000000..95149125
--- /dev/null
+++ b/nls/nl_NL/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: geen schermen gevonden om te managen, afgesloten\n
+$ #MapRequest
+# Openbox::process_event: MapRequest voor 0x%lx\n
diff --git a/nls/pt_BR/BaseDisplay.m b/nls/pt_BR/BaseDisplay.m
new file mode 100644
index 00000000..fbd626ee
--- /dev/null
+++ b/nls/pt_BR/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X erro: %s(%d) opcodes %d/%d\n  recurso 0x%lx\n
+$ #SignalCaught
+# %s: recebeido sinal %d\n
+$ #ShuttingDown
+# desligando\n
+$ #Aborting
+# abortando... gerando arquivo core\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: conecção ao servidor X falhou.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: impossivel marcar a conexão ao display como close-on-exec\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): removendo má janela da trilha de eventos\n
diff --git a/nls/pt_BR/Basemenu.m b/nls/pt_BR/Basemenu.m
new file mode 100644
index 00000000..917d0f2f
--- /dev/null
+++ b/nls/pt_BR/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Menu Openbox
diff --git a/nls/pt_BR/Configmenu.m b/nls/pt_BR/Configmenu.m
new file mode 100644
index 00000000..482fac78
--- /dev/null
+++ b/nls/pt_BR/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Configurações
+$ #FocusModel
+# Modelo de Foco
+$ #WindowPlacement
+# Posicionamento das Janelas
+$ #ImageDithering
+# Simulação de Cores em Imagens
+$ #OpaqueMove
+# Movimento Opaco de Janelas
+$ #FullMax
+# Maximização Total
+$ #FocusNew
+# Foco em Novas Janelas
+$ #FocusLast
+# Foco na Ultima Janela Da Area de Trabalho
+$ #ClickToFocus
+# Foco na Janela Quando Clicada
+$ #SloppyFocus
+# Foco na Janela Quando Apontada
+$ #AutoRaise
+# Sobrepor Janela Quando Ativa
+$ #SmartRows
+# Posicionamento em Fila
+$ #SmartCols
+# Posicionamento em Coluna
+$ #Cascade
+# Posicionamento em Cascata
+$ #LeftRight
+# Esquerda para Direita
+$ #RightLeft
+# Direita para Esquerda
+$ #TopBottom
+# Cima para Baixo
+$ #BottomTop
+# Baixo para Cima
diff --git a/nls/pt_BR/Icon.m b/nls/pt_BR/Icon.m
new file mode 100644
index 00000000..2e350970
--- /dev/null
+++ b/nls/pt_BR/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Icones
diff --git a/nls/pt_BR/Image.m b/nls/pt_BR/Image.m
new file mode 100644
index 00000000..596f097b
--- /dev/null
+++ b/nls/pt_BR/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: erro criando pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: erro criando XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: visual não suportado\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: erro criando pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: mapa de cores de tamanho invalido %d (%d/%d/%d) - reduzindo\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: erro localizando mapa de cores\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: falha localizando cor %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: reserva de pixmap cheia - liberando %d pixmaps\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: reserva cheia, forçando limpeza\n
+$ #ColorParseError
+# BImageControl::getColor: color parse error: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: erro localizando cor: '%s'\n
diff --git a/nls/pt_BR/Makefile.am b/nls/pt_BR/Makefile.am
new file mode 100644
index 00000000..75f8fd40
--- /dev/null
+++ b/nls/pt_BR/Makefile.am
@@ -0,0 +1,33 @@
+# nls/pt_BR/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/pr_BR"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/pt_BR; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/pt_BR; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/pt_BR/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/pt_BR; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/pt_BR/Makefile.in b/nls/pt_BR/Makefile.in
new file mode 100644
index 00000000..4fc147bc
--- /dev/null
+++ b/nls/pt_BR/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/pt_BR/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/pt_BR/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/pt_BR
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/pt_BR/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/pr_BR"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/pt_BR; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/pt_BR; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/pt_BR/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/pt_BR; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/pt_BR/Screen.m b/nls/pt_BR/Screen.m
new file mode 100644
index 00000000..6c6c06d8
--- /dev/null
+++ b/nls/pt_BR/Screen.m
@@ -0,0 +1,52 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: um erro occorreu enquanto chamando o servidor X.\n  \
+existe outro window menager rodando no display. %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: managing screen %d using visual 0x%lx, depth %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): impossivel carregar fonte '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): impossivel carregar fonte padrão.\n
+$ #EmptyMenuFile
+# %s: arquivo de menu vazio\n
+$ #xterm
+# xterm
+$ #Restart
+# Reiniciar
+$ #Exit
+# Sair
+$ #EXECError
+# BScreen::parseMenuFile: [exec] erro, não há indicação definida no menu e/ou comando definido\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] erro, não há indicação definida no menu\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] erro, não há indicação de menu e/ou nome de arquivo difinido\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] erro, não há indicação definida no menu\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] erro, nome de arquivo não definido\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] error, '%s' não é um arquivo regular\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] erro, não há indicação definida no menu\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] erro, não há indicação definida no menu\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] erro, não há indicação definida no menu\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] erro, não há diretorio difinido\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] erro, '%s' não é um diretorio\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] erro, '%s' não existe\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] erro, não há indicação definida no menu\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/pt_BR/Slit.m b/nls/pt_BR/Slit.m
new file mode 100644
index 00000000..73cff228
--- /dev/null
+++ b/nls/pt_BR/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Direção
+$ #SlitPlacement
+# Posicionamento
diff --git a/nls/pt_BR/Toolbar.m b/nls/pt_BR/Toolbar.m
new file mode 100644
index 00000000..bf1a77be
--- /dev/null
+++ b/nls/pt_BR/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Toolbar
+$ #EditWkspcName
+# Renomear Area de Trabalho
+$ #ToolbarPlacement
+# Posicionamento
diff --git a/nls/pt_BR/Window.m b/nls/pt_BR/Window.m
new file mode 100644
index 00000000..427f3f5b
--- /dev/null
+++ b/nls/pt_BR/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: criando 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres falhou\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: impossivel encontrar tela para janela 0x%lx\n
+$ #Unnamed
+# Sem Nome
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() para 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() para 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
diff --git a/nls/pt_BR/Windowmenu.m b/nls/pt_BR/Windowmenu.m
new file mode 100644
index 00000000..fe81d4f9
--- /dev/null
+++ b/nls/pt_BR/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Enviar Para ...
+$ #Shade
+# Encolher
+$ #Iconify
+# Minimizar
+$ #Maximize
+# Maximizar
+$ #Raise
+# Focalizar
+$ #Lower
+# Desfocalizar
+$ #Stick
+# Sempre Visivel
+$ #KillClient
+# Kill Cliente
+$ #Close
+# Fechar
diff --git a/nls/pt_BR/Workspace.m b/nls/pt_BR/Workspace.m
new file mode 100644
index 00000000..e9516f16
--- /dev/null
+++ b/nls/pt_BR/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Area de Trabalho %d
diff --git a/nls/pt_BR/Workspacemenu.m b/nls/pt_BR/Workspacemenu.m
new file mode 100644
index 00000000..64ab9d0f
--- /dev/null
+++ b/nls/pt_BR/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Areas de Trabalho
+$ #NewWorkspace
+# Nova Area de Trabalho
+$ #RemoveLast
+# Remover Ultima
diff --git a/nls/pt_BR/bsetroot.m b/nls/pt_BR/bsetroot.m
new file mode 100644
index 00000000..c63f994d
--- /dev/null
+++ b/nls/pt_BR/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: erro: necessario especificar um dos seguintes argumentos: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         conexão com display\n\
+  -mod               modula pattern\n\
+  -foreground, -fg  modula foreground color\n\
+  -background, -bg  modula background color\n\n\
+  -gradient       textura gradiente\n\
+  -from             cor de inicio do gradiente\n\
+  -to               com do fim do gradiente\n\n\
+  -solid            cor solida\n\n\
+  -help                    mostra essa ajuda e sai\n
+
diff --git a/nls/pt_BR/common.m b/nls/pt_BR/common.m
new file mode 100644
index 00000000..45dcd20d
--- /dev/null
+++ b/nls/pt_BR/common.m
@@ -0,0 +1,35 @@
+$set 15 #Common
+
+$ #Yes
+# Sim
+$ #No
+# Não
+
+$ #DirectionTitle
+# Direção
+$ #DirectionHoriz
+# Horizontal
+$ #DirectionVert
+# Vertical
+
+$ #AlwaysOnTop
+# Sempre Visivel
+
+$ #PlacementTitle
+# Posicionamento
+$ #PlacementTopLeft
+# No Alto a Esquerda
+$ #PlacementCenterLeft
+# No Centro a Esquerda
+$ #PlacementBottomLeft
+# Em Baixo a Esquerda
+$ #PlacementTopCenter
+# No Alto e no Centro
+$ #PlacementBottomCenter
+# Em Baixo e no Centro
+$ #PlacementTopRight
+# No Alto a Direita
+$ #PlacementCenterRight
+# No Meio a Direita
+$ #PlacementBottomRight
+# Em Baixo a Direita
diff --git a/nls/pt_BR/main.m b/nls/pt_BR/main.m
new file mode 100644
index 00000000..a01d01aa
--- /dev/null
+++ b/nls/pt_BR/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# erro: '-rc' requer um argumento\n
+$ #DISPLAYRequiresArg
+# erro: '-display' requer um argumento\n
+$ #WarnDisplaySet
+# aviso: não foi possivel setar a variavel de ambiente 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tusar conexão com o display.\n\
+  -rc \t\t\tusar arquivo alternativo de recursos.\n\
+  -version\t\t\tmostrar versao e sair.\n\
+  -help\t\t\t\tmostrar esta ajuda e sair.\n\n
+$ #CompileOptions
+# Opções em tempo de compilação:\n\
+  Informações extras para problemas:\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Forma:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Simulação ordenada de cores em imagens:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/pt_BR/openbox.m b/nls/pt_BR/openbox.m
new file mode 100644
index 00000000..5292124a
--- /dev/null
+++ b/nls/pt_BR/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: não foram encontradas telas administraveis, abortando..\n
+$ #MapRequest
+# Openbox::process_event: MapRequest para 0x%lx\n
diff --git a/nls/ru_RU/BaseDisplay.m b/nls/ru_RU/BaseDisplay.m
new file mode 100644
index 00000000..809dc92c
--- /dev/null
+++ b/nls/ru_RU/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  ÏÛÉÂËÁ X ÓÅÒ×ÅÒÁ: %s(%d) ÚÎÁÞÅÎÉÑ %d/%d\n ÒÅÓÕÒÓ 0x%lx\n
+$ #SignalCaught
+# %s: ÐÏÌÕÞÅÎ ÓÉÇÎÁÌ %d \n
+$ #ShuttingDown
+# ÏÔËÌÀÞÅÎÉÅ\n
+$ #Aborting
+# ïÔÍÅÎÁ... ÓÏÚÄÁÅÔÓÑ ÄÁÍÐ core\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: ÓÏÅÄÉÎÅÎÉÅ Ó X ÓÅÒ×ÅÒÏÍ ÐÒÏ×ÁÌÅÎÏ.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: ÎÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÐÏÍÅÔÉÔØ ÁËÔÉ×ÎÙÊ ÄÉÓÐÌÅÊ ËÁË "ÚÁËÒÙÔÙÊ-ÎÁ-ÉÓÐÏÌÎÅÎÉÅ"\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): ÐÌÏÈÏÅ ÏËÎÏ ÕÄÁÌÑÅÔÓÑ ÉÚ ÏÞÅÒÅÄÉ ÓÏÂÙÔÉÊ\n
diff --git a/nls/ru_RU/Basemenu.m b/nls/ru_RU/Basemenu.m
new file mode 100644
index 00000000..7fa03578
--- /dev/null
+++ b/nls/ru_RU/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# íÅÎÀ Openbox
diff --git a/nls/ru_RU/Configmenu.m b/nls/ru_RU/Configmenu.m
new file mode 100644
index 00000000..27fddc3e
--- /dev/null
+++ b/nls/ru_RU/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# ëÏÎÆÉÇÕÒÁÃÉÑ
+$ #FocusModel
+# íÏÄÅÌØ ÆÏËÕÓÉÒÏ×ËÉ
+$ #WindowPlacement
+# ðÏÌÏÖÅÎÉÅ ÏËÎÁ
+$ #ImageDithering
+# Image Dithering
+$ #OpaqueMove
+# ðÅÒÅÍÅÝÅÎÉÅ ÚÁÐÏÌÎÅÎÎÙÈ ÏËÏÎ
+$ #FullMax
+# ðÏÌÎÁÑ ÍÁËÓÉÍÉÚÁÃÉÑ
+$ #FocusNew
+# ðÅÒÅÍÅÝÁÔØ ÆÏËÕÓ ÎÁ ÎÏ×ÙÅ ÏËÎÁ
+$ #FocusLast
+# æÏËÕÓ ÎÁ ÐÏÓÌÅÄÎÅÅ ÏËÎÏ ÒÁÂÏÞÅÇÏ ÓÔÏÌÁ
+$ #ClickToFocus
+# æÏËÕÓ ÐÏ ÝÅÌÞËÕ
+$ #SloppyFocus
+# æÏËÕÓ ÐÏ ÐÅÒÅÍÅÝÅÎÉÀ
+$ #AutoRaise
+# á×ÔÏ×ÓÐÌÙÔÉÅ
+$ #SmartRows
+# "õÍÎÏÅ" ÒÁÓÐÏÌÏÖÅÎÉÅ (ÐÏ ÇÏÒÉÚÏÎÔÁÌÉ)
+$ #SmartCols
+# "õÍÎÏÅ" ÒÁÓÐÏÌÏÖÅÎÉÅ (ÐÏ ×ÅÒÔÉËÁÌÉ)
+$ #Cascade
+# ëÁÓËÁÄÏÍ
+$ #LeftRight
+# óÌÅ×Á ÎÁÐÒÁ×Ï
+$ #RightLeft
+# óÐÒÁ×Á ÎÁÌÅ×Ï
+$ #TopBottom
+# ó×ÅÒÈÕ ×ÎÉÚ
+$ #BottomTop
+# óÎÉÚÕ ××ÅÒÈ
diff --git a/nls/ru_RU/Icon.m b/nls/ru_RU/Icon.m
new file mode 100644
index 00000000..401f66cf
--- /dev/null
+++ b/nls/ru_RU/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# ó×ÅÒÎÕÔÙÅ\nÏËÎÁ
diff --git a/nls/ru_RU/Image.m b/nls/ru_RU/Image.m
new file mode 100644
index 00000000..ea6b32bc
--- /dev/null
+++ b/nls/ru_RU/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: ÏÛÉÂËÁ ÓÏÚÄÁÎÉÑ pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: ÏÛÉÂËÁ ÓÏÚÄÁÎÉÑ XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: ÎÅÐÏÄÄÅÒÖÉ×ÁÅÍÙÊ ÔÉÐ ×ÉÚÕÁÌÉÚÁÃÉÉ\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: ÏÛÉÂËÁ ÓÏÚÄÁÎÉÑ pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: ÎÅ×ÅÒÎÙÊ ÒÁÚÍÅÒ ÔÁÂÌÉÃÙ Ã×ÅÔÏ× %d (%d/%d/%d) - ÕÄÁÌÑÅÔÓÑ\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: ÏÛÉÂËÁ ÒÁÚÍÅÝÅÎÉÑ ÔÁÂÌÉÃÙ Ã×ÅÔÏ×\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: ÎÅ×ÏÚÍÏÖÎÏ ÒÁÚÍÅÓÔÉÔØ Ã×ÅÔ %d/%d/%d × ÐÁÍÑÔÉ\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: ËÜÛ ÔÏÞÅÞÎÙÈ ÉÚÏÂÒÁÖÅÎÉÊ - ÏÓ×ÏÂÏÖÄÁÅÔÓÑ %d ÂÌÏËÏ×\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: ÐÅÒÅÐÏÌÎÅÎÉÅ ËÜÛÁ, ÐÒÏÉÚ×ÏÄÉÔÓÑ ÂÙÓÔÒÁÑ ÏÞÉÓÔËÁ\n
+$ #ColorParseError
+# BImageControl::getColor: ÏÛÉÂËÁ ÒÁÚÂÏÒÁ ÓÔÒÏËÉ, ÏÐÉÓÙ×ÁÀÝÅÊ Ã×ÅÔ: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: ÏÛÉÂËÁ ÒÁÚÍÅÝÅÎÉÑ Ã×ÅÔÁ × ÐÁÍÑÔÉ: '%s'\n
diff --git a/nls/ru_RU/Makefile.am b/nls/ru_RU/Makefile.am
new file mode 100644
index 00000000..5a129a19
--- /dev/null
+++ b/nls/ru_RU/Makefile.am
@@ -0,0 +1,33 @@
+# nls/ru_RU/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/ru_RU"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/ru_RU; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/ru_RU; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/ru_RU/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/ru_RU; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/ru_RU/Makefile.in b/nls/ru_RU/Makefile.in
new file mode 100644
index 00000000..e5ca4ac4
--- /dev/null
+++ b/nls/ru_RU/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/ru_RU/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/ru_RU/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/ru_RU
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/ru_RU/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/ru_RU"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/ru_RU; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/ru_RU; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/ru_RU/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/ru_RU; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/ru_RU/Screen.m b/nls/ru_RU/Screen.m
new file mode 100644
index 00000000..10add528
--- /dev/null
+++ b/nls/ru_RU/Screen.m
@@ -0,0 +1,52 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: ÐÒÏÉÚÏÛÌÁ ÏÛÉÂËÁ ÐÒÉ ÏÂÒÁÝÅÎÉÉ Ë X ÓÅÒ×ÅÒÕ.\n  \
+ÄÒÕÇÏÊ ÍÅÎÅÄÖÅÒ ÏËÏÎ ÕÖÅ ÚÁÐÕÝÅÎ ÎÁ ÄÉÓÐÌÅÅ %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: ÏÂÓÌÕÖÉ×ÁÅÔÓÑ ÜËÒÁÎ %d, ÉÓÐÏÌØÚÕÅÍÙÊ ÔÉÐ ×ÉÚÕÁÌÉÚÁÃÉÉ 0x%lx, ÇÌÕÂÉÎÁ Ã×ÅÔÁ %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): ÎÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÚÁÇÒÕÚÉÔØ ÛÒÉÆÔ '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): ÎÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÚÁÇÒÕÚÉÔØ ÐÒÅÄÏÐÒÅÄÅÌÅÎÎÙÊ ÛÒÉÆÔ.\n
+$ #EmptyMenuFile
+# %s: ÐÕÓÔÏÊ ÆÁÊÌ ÍÅÎÀ\n
+$ #xterm
+# Xterm
+$ #Restart
+# ðÅÒÅÚÁÐÕÓË
+$ #Exit
+# ÷ÙÈÏÄ
+$ #EXECError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [exec], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ É/ÉÌÉ ÎÁÚ×ÁÎÉÅ ËÏÍÍÁÎÄÙ\n
+$ #EXITError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [exit], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n
+$ #STYLEError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [style], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ É/ÉÌÉ ÉÍÑ ÆÁÊÌÁ\n
+$ #CONFIGError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [config], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [include], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÉÍÑ ÆÁÊÌÁ\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [include], '%s' ÎÅ ÏÂÙÞÎÙÊ ÆÁÊÌ\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [submenu], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n
+$ #RESTARTError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [restart], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [reconfig], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [stylesdir/stylesmenu], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÉÍÑ ÄÉÒÅËÔÏÒÉÉ\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [stylesdir/stylesmenu], '%s' ÎÅ ÄÉÒÅËÔÏÒÉÑ\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [stylesdir/stylesmenu], '%s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: ÏÛÉÂËÁ [workspaces], ÎÅ ÏÐÒÅÄÅÌÅÎÏ ÎÁÚ×ÁÎÉÅ ÐÕÎËÔÁ ÍÅÎÀ\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/ru_RU/Slit.m b/nls/ru_RU/Slit.m
new file mode 100644
index 00000000..d06d296f
--- /dev/null
+++ b/nls/ru_RU/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# äÏËÅÒ
+$ #SlitDirection
+# ïÒÉÅÎÔÁÃÉÑ ÄÏËÅÒÁ
+$ #SlitPlacement
+# íÅÓÔÏÐÏÌÏÖÅÎÉÑ ÄÏËÅÒÁ
diff --git a/nls/ru_RU/Toolbar.m b/nls/ru_RU/Toolbar.m
new file mode 100644
index 00000000..f84495f0
--- /dev/null
+++ b/nls/ru_RU/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# ÐÐ
+$ #NoStrftimeTimeFormatA
+# ÄÐ
+$ #ToolbarTitle
+# ôÕÌÂÁÒ
+$ #EditWkspcName
+# òÅÄÁËÔÉÒÏ×ÁÔØ ÉÍÑ ÔÅËÕÝÅÇÏ ÒÁÂÏÞÅÇÏ ÓÔÏÌÁ
+$ #ToolbarPlacement
+# íÅÓÔÏÐÏÌÏÖÅÎÉÅ ÔÕÌÂÁÒÁ
diff --git a/nls/ru_RU/Window.m b/nls/ru_RU/Window.m
new file mode 100644
index 00000000..8a7533f8
--- /dev/null
+++ b/nls/ru_RU/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: ÓÏÚÄÁÅÔÓÑ 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: ÐÒÏ×ÁÌÅÎ ÐÒÏÃÅÓÓ XGetWindowAttributres\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: ÎÅÔ ×ÏÚÍÏÖÎÏÓÔÉ ÎÁÊÔÉ ÜËÒÁÎ ÄÌÑ ËÏÒÎÅ×ÏÇÏ ÏËÎÁ 0x%lx\n
+$ #Unnamed
+# âÅÚÙÍÑÎÎÏÅ
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() ÄÌÑ 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() ÄÌÑ 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
diff --git a/nls/ru_RU/Windowmenu.m b/nls/ru_RU/Windowmenu.m
new file mode 100644
index 00000000..0883c255
--- /dev/null
+++ b/nls/ru_RU/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# ïÔÐÒÁ×ÉÔØ ÎÁ ...
+$ #Shade
+# ó×ÅÒÎÕÔØ × ÚÁÇÏÌÏ×ÏË
+$ #Iconify
+# ó×ÅÒÎÕÔØ × ÉËÏÎËÕ
+$ #Maximize
+# íÁËÓÉÍÉÚÉÒÏ×ÁÔØ
+$ #Raise
+# ðÏÄÎÑÔØ ÎÁ×ÅÒÈ
+$ #Lower
+# ïÐÕÓÔÉÔØ ×ÎÉÚ
+$ #Stick
+# ðÒÉËÌÅÉÔØ
+$ #KillClient
+# õÂÉÔØ ËÌÉÅÎÔÓËÏÅ ÐÒÉÌÏÖÅÎÉÅ
+$ #Close
+# úÁËÒÙÔØ
diff --git a/nls/ru_RU/Workspace.m b/nls/ru_RU/Workspace.m
new file mode 100644
index 00000000..47cfcc5d
--- /dev/null
+++ b/nls/ru_RU/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# òÁÂÏÞÉÊ ÓÔÏÌ %d
diff --git a/nls/ru_RU/Workspacemenu.m b/nls/ru_RU/Workspacemenu.m
new file mode 100644
index 00000000..1b9b7770
--- /dev/null
+++ b/nls/ru_RU/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# òÁÂÏÞÉÅ ÓÔÏÌÙ
+$ #NewWorkspace
+# îÏ×ÙÊ ÒÁÂÏÞÉÊ ÓÔÏÌ
+$ #RemoveLast
+# õÄÁÌÉÔØ ÐÏÓÌÅÄÎÉÊ
diff --git a/nls/ru_RU/bsetroot.m b/nls/ru_RU/bsetroot.m
new file mode 100644
index 00000000..5a659802
--- /dev/null
+++ b/nls/ru_RU/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: ÏÛÉÂËÁ: ÎÅÏÂÈÏÄÉÍÏ ÚÁÄÁÔØ ÏÄÉÎ ÉÚ ÓÌÅÄÕÀÝÉÈ ËÌÀÞÅÊ: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         ÓÏÅÄÉÎÅÎÉÅ Ó ÄÉÓÐÌÅÅÍ\n\
+  -mod               ÍÁËÅÔ ËÌÅÔËÉ\n\
+  -foreground, -fg  Ã×ÅÔ ÐÅÒÅÄÎÅÇÏ ÐÌÁÎÁ ËÌÅÔËÉ\n\
+  -background, -bg  Ã×ÅÔ ÆÏÎÁ ËÌÅÔËÉ\n\n\
+  -gradient       ÇÒÁÄÉÅÎÔ\n\
+  -from             ÎÁÞÁÌØÎÙÊ Ã×ÅÔ ÇÒÁÄÉÅÎÔÁ\n\
+  -to               ËÏÎÅÞÎÙÊ Ã×ÅÔ ÇÒÁÄÉÅÎÔÁ\n\n\
+  -solid            ÓÐÌÏÛÎÏÊ Ã×ÅÔ\n\n\
+  -help                    ×Ù×ÅÓÔÉ ÜÔÕ ÐÏÄÓËÁÚËÕ É ×ÙÊÔÉ\n
+
diff --git a/nls/ru_RU/common.m b/nls/ru_RU/common.m
new file mode 100644
index 00000000..f164afcf
--- /dev/null
+++ b/nls/ru_RU/common.m
@@ -0,0 +1,35 @@
+$set 15 #Common
+
+$ #Yes
+# äÁ
+$ #No
+# îÅÔ
+
+$ #DirectionTitle
+# îÁÐÒÁ×ÌÅÎÉÅ
+$ #DirectionHoriz
+# ðÏ ÇÏÒÉÚÏÎÔÁÌÉ
+$ #DirectionVert
+# ðÏ ×ÅÒÔÉËÁÌÉ
+
+$ #AlwaysOnTop
+# ÷ÓÅÇÄÁ ÎÁ×ÅÒÈÕ
+
+$ #PlacementTitle
+# íÅÓÔÏÐÏÌÏÖÅÎÉÅ
+$ #PlacementTopLeft
+# óÌÅ×Á ××ÅÒÈÕ
+$ #PlacementCenterLeft
+# óÌÅ×Á ÐÏ ÃÅÎÔÒÕ
+$ #PlacementBottomLeft
+# óÌÅ×Á ×ÎÉÚÕ
+$ #PlacementTopCenter
+# ó×ÅÒÈÕ ÐÏ ÃÅÎÔÒÕ
+$ #PlacementBottomCenter
+# óÎÉÚÕ ÐÏ ÃÅÎÔÒÕ
+$ #PlacementTopRight
+# óÐÒÁ×Á Ó×ÅÒÈÕ
+$ #PlacementCenterRight
+# óÐÒÁ×Á ÐÏ ÃÅÎÔÒÕ
+$ #PlacementBottomRight
+# óÐÒÁ×Á ×ÎÉÚÕ
diff --git a/nls/ru_RU/main.m b/nls/ru_RU/main.m
new file mode 100644
index 00000000..a91c112e
--- /dev/null
+++ b/nls/ru_RU/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# ÏÛÉÂËÁ: '-rc' ÔÒÅÂÕÅÔ ÎÁÌÉÞÉÅ ÁÒÇÕÍÅÎÔÁ\n
+$ #DISPLAYRequiresArg
+# ÏÛÉÂËÁ: '-display' ÔÒÅÂÕÅÔ ÎÁÌÉÞÉÅ ÁÒÇÕÍÅÎÔÁ\n
+$ #WarnDisplaySet
+# ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ: ÎÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÐÅÒÅÍÅÎÎÕÀ ÏËÒÕÖÅÎÉÑ 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tÉÓÐÏÌØÚÏ×ÁÔØ ÚÁÄÁÎÎÙÊ ÄÉÓÐÌÅÊ.\n\
+  -rc \t\t\tÉÓÐÏÌØÚÏ×ÁÔØ ÁÌØÔÅÒÎÁÔÉ×ÎÙÊ ÆÁÊÌ ÒÅÓÕÒÓÏ×.\n\
+  -version\t\t\t×Ù×ÅÓÔÉ ÎÏÍÅÒ ×ÅÒÓÉÉ É ×ÙÊÔÉ.\n\
+  -help\t\t\t\t×Ù×ÅÓÔÉ ÜÔÕ ÐÏÄÓËÁÚËÕ É ×ÙÊÔÉ.\n\n
+$ #CompileOptions
+# Compile time options:\n\
+  Debugging\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Shape:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Ordered Dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/ru_RU/openbox.m b/nls/ru_RU/openbox.m
new file mode 100644
index 00000000..9d9226cb
--- /dev/null
+++ b/nls/ru_RU/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: ÎÅ ÎÁÊÄÅÎÏ ÜËÒÁÎÏ× ÄÌÑ ÏÂÓÌÕÖÉ×ÁÎÉÑ, ÏÔÍÅÎÁ...\n
+$ #MapRequest
+# Openbox::process_event: MapRequest for 0x%lx\n
diff --git a/nls/sl_SI/BaseDisplay.m b/nls/sl_SI/BaseDisplay.m
new file mode 100644
index 00000000..01facb99
--- /dev/null
+++ b/nls/sl_SI/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  Napaka v sistemu oken X: %s(%d) operacijska koda %d/%d\n  vir 0x%lx\n
+$ #SignalCaught
+# %s: prejet signal %d\n
+$ #ShuttingDown
+# zaustavitev\n
+$ #Aborting
+# prekinitev... izmet posmrtnih ostankov core\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: neuspe¹na povezava do stre¾nika X.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: povezave do prikazovalnika ni moè pripraviti do samodejne prekinitve ob zaustavitvi\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): pokvarjeno okno je odstranjeno iz dogodkovne vrste\n
diff --git a/nls/sl_SI/Basemenu.m b/nls/sl_SI/Basemenu.m
new file mode 100644
index 00000000..e7867249
--- /dev/null
+++ b/nls/sl_SI/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox Menu
diff --git a/nls/sl_SI/Configmenu.m b/nls/sl_SI/Configmenu.m
new file mode 100644
index 00000000..ea76c6bf
--- /dev/null
+++ b/nls/sl_SI/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Nastavitvene izbire
+$ #FocusModel
+# Naèin fokusiranja
+$ #WindowPlacement
+# Postavitev oken
+$ #ImageDithering
+# Prelivanje slik
+$ #OpaqueMove
+# Premikanje prosojnih oken
+$ #FullMax
+# Najveèje okno
+$ #FocusNew
+# Novo okno dobi fokus
+$ #FocusLast
+# Spremenjeni fokus okna na namizju
+$ #ClickToFocus
+# Za fokus kliknite
+$ #SloppyFocus
+# Povr¹ni fokus
+$ #AutoRaise
+# Samodejno odkrivanje
+$ #SmartRows
+# Pametno postavljanje (vrstice)
+$ #SmartCols
+# Pametno postavljanje (stolpci)
+$ #Cascade
+# Kaskadno postavljanje
+$ #LeftRight
+# Od leve proti desni
+$ #RightLeft
+# Od desne proti levi
+$ #TopBottom
+# Od zgoraj navzdol
+$ #BottomTop
+# Od spodaj navzgor
diff --git a/nls/sl_SI/Icon.m b/nls/sl_SI/Icon.m
new file mode 100644
index 00000000..84007590
--- /dev/null
+++ b/nls/sl_SI/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Ikone
diff --git a/nls/sl_SI/Image.m b/nls/sl_SI/Image.m
new file mode 100644
index 00000000..310939b7
--- /dev/null
+++ b/nls/sl_SI/Image.m
@@ -0,0 +1,25 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: napaka pri izdelavi slike (pixmap)\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: napaka pri izdelavi slike (XImage)\n
+$ #UnsupVisual
+# BImage::renderXImage: nepodprt videz\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: napaka pri izdelavi slike (pixmap)\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: prevelika barvna paleta %d (%d/%d/%d) - krèim\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: napaka pri dodeljevanju palete\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: napaka pri dodeljevanju barve %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: medpomnilnik slik - zavr¾enih je %d slik\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: medpomnilnik je zrasel, prisilno èi¹èenje\n
+$ #ColorParseError
+# BImageControl::getColor: napaka pri branju barve: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: napaka pri dodeljevanju barve: '%s'\n
+
diff --git a/nls/sl_SI/Makefile.am b/nls/sl_SI/Makefile.am
new file mode 100644
index 00000000..c89f95ed
--- /dev/null
+++ b/nls/sl_SI/Makefile.am
@@ -0,0 +1,33 @@
+# nls/sl_SI/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/sl_SI"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/sl_SI; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/sl_SI; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/sl_SI/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/sl_SI; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/sl_SI/Makefile.in b/nls/sl_SI/Makefile.in
new file mode 100644
index 00000000..a4ca149b
--- /dev/null
+++ b/nls/sl_SI/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/sl_SI/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/sl_SI/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/sl_SI
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/sl_SI/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/sl_SI"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/sl_SI; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/sl_SI; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/sl_SI/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/sl_SI; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/sl_SI/Screen.m b/nls/sl_SI/Screen.m
new file mode 100644
index 00000000..44286a9f
--- /dev/null
+++ b/nls/sl_SI/Screen.m
@@ -0,0 +1,52 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: napaka pri poizvedovanju stre¾nika za X.\n  \
+nek upravljalnik oken ¾e teèe v prikazovalniku %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: upravljenje zaslona %d z videzem 0x%lx globine %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): pisave '%s' ni moè nalo¾iti\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): privzete pisave ni moè nalo¾iti.\n
+$ #EmptyMenuFile
+# %s: prazna menujska datoteka\n
+$ #xterm
+# xterm
+$ #Restart
+# Ponovni zagon
+$ #Exit
+# Izhod
+$ #EXECError
+# BScreen::parseMenuFile: [exec] napaka: oznaki menuja ali ukaza nista doloèeni\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] napaka: oznaka menuja ni doloèena\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] napaka: oznaki menuja ali datoteke nista doloèeni\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] napaka: oznaka menuja ni doloèena\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] napaka: ime datoteke ni doloèeno\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] napaka: '%s' ni prava datoteka\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] napaka: oznaka menuja ni doloèena\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] napaka: oznaka menuja ni doloèena\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] napaka: oznaka menuja ni doloèena\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] napaka: imenik ni doloèen\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] napaka: '%s' ni imenik\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] napaka:, '%s' ne obstaja\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] napaka: oznaka menuja ni doloèena\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/sl_SI/Slit.m b/nls/sl_SI/Slit.m
new file mode 100644
index 00000000..065fa4cf
--- /dev/null
+++ b/nls/sl_SI/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Re¾a
+$ #SlitDirection
+# Smer re¾e
+$ #SlitPlacement
+# Lega re¾e
diff --git a/nls/sl_SI/Toolbar.m b/nls/sl_SI/Toolbar.m
new file mode 100644
index 00000000..4f80cd76
--- /dev/null
+++ b/nls/sl_SI/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Orodna letev
+$ #EditWkspcName
+# Uredi ime trenutnega namizja
+$ #ToolbarPlacement
+# Lega orodne letve
diff --git a/nls/sl_SI/Window.m b/nls/sl_SI/Window.m
new file mode 100644
index 00000000..877542fb
--- /dev/null
+++ b/nls/sl_SI/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: izdelujem 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: neuspe¹en XGetWindowAttributres\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: zaslona za korensko okno 0x%lx ni moè najti\n
+$ #Unnamed
+# Neimenovano
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() za 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() za 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: ponovno prikljuèeno 0x%lx korenskemu oknu\n
diff --git a/nls/sl_SI/Windowmenu.m b/nls/sl_SI/Windowmenu.m
new file mode 100644
index 00000000..5de13ba0
--- /dev/null
+++ b/nls/sl_SI/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Na delovno povr¹ino...
+$ #Shade
+# Zastri
+$ #Iconify
+# Pomanj¹aj
+$ #Maximize
+# Poveèaj
+$ #Raise
+# Prika¾i
+$ #Lower
+# Zakrij
+$ #Stick
+# Prilepi
+$ #KillClient
+# Zaustavi 
+$ #Close
+# Zapusti
diff --git a/nls/sl_SI/Workspace.m b/nls/sl_SI/Workspace.m
new file mode 100644
index 00000000..c29870b3
--- /dev/null
+++ b/nls/sl_SI/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Delovna povr¹ina %d
diff --git a/nls/sl_SI/Workspacemenu.m b/nls/sl_SI/Workspacemenu.m
new file mode 100644
index 00000000..8aaa7be4
--- /dev/null
+++ b/nls/sl_SI/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Delovne povr¹ine
+$ #NewWorkspace
+# Nova delovna povr¹ina
+$ #RemoveLast
+# Odstrani zadnjo 
diff --git a/nls/sl_SI/bsetroot.m b/nls/sl_SI/bsetroot.m
new file mode 100644
index 00000000..3778a51d
--- /dev/null
+++ b/nls/sl_SI/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: napaka: doloèiti je treba eno: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         prika¾i povezavo\n\
+  -mod               vzorec\n\
+  -foreground, -fg  barva ospredja\n\
+  -background, -bg  barva ozadja\n\n\
+  -gradient       prelivna tekstura\n\
+  -from             zaèetna barva preliva\n\
+  -to               konèna barva preliva\n\n\
+  -solid            enotna barva\n\n\
+  -help                    prika¾i ta navodila in konèaj\n
+
diff --git a/nls/sl_SI/common.m b/nls/sl_SI/common.m
new file mode 100644
index 00000000..8014df4a
--- /dev/null
+++ b/nls/sl_SI/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# Da
+$ #No
+# Ne
+
+$ #DirectionTitle
+# Smer
+$ #DirectionHoriz
+# Vodoravno
+$ #DirectionVert
+# Navpièno
+
+$ #AlwaysOnTop
+# Vselej na vrhu
+
+$ #PlacementTitle
+# Lega
+$ #PlacementTopLeft
+# Na vrhu in levo poravnano
+$ #PlacementCenterLeft
+# Navpièno osredninjeno in levo poravnano
+$ #PlacementBottomLeft
+# Na dnu in levo poravnano
+$ #PlacementTopCenter
+# Na vrhu in osredinjeno
+$ #PlacementBottomCenter
+# Na dnu in osredinjeno
+$ #PlacementTopRight
+# Na vrhu in desno poravnano
+$ #PlacementCenterRight
+# Navpièno osredinjeno in desno poravnano
+$ #PlacementBottomRight
+# Na dnu in desno poravnano
+
+$ #AutoHide
+# Samodejno skrivanje
diff --git a/nls/sl_SI/main.m b/nls/sl_SI/main.m
new file mode 100644
index 00000000..c6d04725
--- /dev/null
+++ b/nls/sl_SI/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# napaka: '-rc' zahteva argument\n
+$ #DISPLAYRequiresArg
+# napaka: '-display' zahteva argument\n
+$ #WarnDisplaySet
+# opozorilo: spremenljivke okolja 'DISPLAY' ni moè nastaviti\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tuporabi prikazovalnik.\n\
+  -rc \t\t\tuporabi nadomestno datoteko z viri.\n\
+  -version\t\t\tprika¾i oznako razlièice in konèaj.\n\
+  -help\t\t\t\prika¾i ta navodila in konèaj.\n\n
+$ #CompileOptions
+# Izbire pri prevajanju:\n\
+  Razhro¹èevanje\t\t\t%s\n\
+  Prepletanje:\t\t\t%s\n\
+  Oblika:\t\t\t%s\n\
+  Re¾a:\t\t\t\t%s\n\
+  Osembitno stresanje barv:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/sl_SI/openbox.m b/nls/sl_SI/openbox.m
new file mode 100644
index 00000000..58d293f6
--- /dev/null
+++ b/nls/sl_SI/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: ni moè najti upravljivih zaslonov, prekinitev\n
+$ #MapRequest
+# Openbox::process_event: MapRequest za 0x%lx\n
diff --git a/nls/sv_SE/BaseDisplay.m b/nls/sv_SE/BaseDisplay.m
new file mode 100644
index 00000000..9516b41b
--- /dev/null
+++ b/nls/sv_SE/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X-fel: %s(%d) opkod %d/%d\n  resurs 0x%lx\n
+$ #SignalCaught
+# %s: signal %d fångad\n
+$ #ShuttingDown
+# stänger ner\n
+$ #Aborting
+# avbryter... dumpar kärna\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: anslutning till X server misslyckades.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: kunde inte markera skärmanslutning som stäng-vid-exekvering\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): tar bort dåligt fönster från händelsekön\n
diff --git a/nls/sv_SE/Basemenu.m b/nls/sv_SE/Basemenu.m
new file mode 100644
index 00000000..1fdbb958
--- /dev/null
+++ b/nls/sv_SE/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openboxmeny
diff --git a/nls/sv_SE/Configmenu.m b/nls/sv_SE/Configmenu.m
new file mode 100644
index 00000000..e7606cda
--- /dev/null
+++ b/nls/sv_SE/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Inställningar
+$ #FocusModel
+# Fokusmodell
+$ #WindowPlacement
+# Fönsterplacering
+$ #ImageDithering
+# Bilddithering
+$ #OpaqueMove
+# Ogenomskinlig fönsterförflyttning
+$ #FullMax
+# Full maximering
+$ #FocusNew
+# Fokus på nya fönster
+$ #FocusLast
+# Fokusera fönster vid skrivbordsbyte
+$ #ClickToFocus
+# Klicka för fokus
+$ #SloppyFocus
+# Hafsig fokus
+$ #AutoRaise
+# Höj automatiskt
+$ #SmartRows
+# Smart placering (Rader)
+$ #SmartCols
+# Smart placering (Kolumner)
+$ #Cascade
+# Kaskadplacering
+$ #LeftRight
+# Från vänster
+$ #RightLeft
+# Från höger
+$ #TopBottom
+# Uppifrån
+$ #BottomTop
+# Nerifrån
diff --git a/nls/sv_SE/Icon.m b/nls/sv_SE/Icon.m
new file mode 100644
index 00000000..32b247e6
--- /dev/null
+++ b/nls/sv_SE/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Ikoner
diff --git a/nls/sv_SE/Image.m b/nls/sv_SE/Image.m
new file mode 100644
index 00000000..1099d50b
--- /dev/null
+++ b/nls/sv_SE/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: fel under skapande av pixmap\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: fel under skapande av XImage\n
+$ #UnsupVisual
+# BImage::renderXImage: ej stöd för färgdjup\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: fel under skapande av pixmap\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: ogiltig färgkarta storlek %d (%d/%d/%d) - reducerar\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: fel under allokering av färgkarta\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: misslyckades att allokera färg %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: pixmap cache - släpper %d pixmappar\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: stor cache, tvingar upprensning\n
+$ #ColorParseError
+# BImageControl::getColor: färgfel: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: färgallokeringsfel: '%s'\n
diff --git a/nls/sv_SE/Makefile.am b/nls/sv_SE/Makefile.am
new file mode 100644
index 00000000..beb5414d
--- /dev/null
+++ b/nls/sv_SE/Makefile.am
@@ -0,0 +1,33 @@
+# nls/sv_SE/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/sv_SE"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/sv_SE; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/sv_SE; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/sv_SE/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/sv_SE; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/sv_SE/Makefile.in b/nls/sv_SE/Makefile.in
new file mode 100644
index 00000000..94fbf4cf
--- /dev/null
+++ b/nls/sv_SE/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/sv_SE/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/sv_SE/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/sv_SE
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/sv_SE/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/sv_SE"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/sv_SE; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/sv_SE; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/sv_SE/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/sv_SE; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/sv_SE/Screen.m b/nls/sv_SE/Screen.m
new file mode 100644
index 00000000..20cba274
--- /dev/null
+++ b/nls/sv_SE/Screen.m
@@ -0,0 +1,52 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: ett fel inträffade under en förfrågan till X servern.\n  \
+en annan fönsterhanterare körs redan på skärmen %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: hanterar skärm %d med visuell 0x%lx, färgdjup %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): kunde inte ladda font '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): kunde inte ladda standardfont.\n
+$ #EmptyMenuFile
+# %s: tom menyfil\n
+$ #xterm
+# xterm
+$ #Restart
+# Starta om
+$ #Exit
+# Avsluta
+$ #EXECError
+# BScreen::parseMenuFile: [exec] fel, ingen menyetikett och/eller kommando definierat\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] fel, ingen menyetikett definierad\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] fel, ingen menyetikett och/eller filnamn definierat\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] fel, ingen menyetikett definierad\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] fel, inget filnamn definierat\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] fel, '%s' är inte en vanlig fil\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] fel, ingen menyetikett definierad\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] fel, ingen menyetikett definiera\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] fel, ingen menyetikett definierad\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fel, ingen katalog definierad\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fel, '%s' är inte en katalog\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] fel, '%s' existerar inte\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] fel, ingen menyetikett definierad\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# W: %4d x H: %4d
+
diff --git a/nls/sv_SE/Slit.m b/nls/sv_SE/Slit.m
new file mode 100644
index 00000000..807c13ff
--- /dev/null
+++ b/nls/sv_SE/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Slitriktning
+$ #SlitPlacement
+# Slitplacering
diff --git a/nls/sv_SE/Toolbar.m b/nls/sv_SE/Toolbar.m
new file mode 100644
index 00000000..341d8607
--- /dev/null
+++ b/nls/sv_SE/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Verktygslist
+$ #EditWkspcName
+# Ändra namn på skrivbordet
+$ #ToolbarPlacement
+# Verktygslistens placering
diff --git a/nls/sv_SE/Window.m b/nls/sv_SE/Window.m
new file mode 100644
index 00000000..090d96e4
--- /dev/null
+++ b/nls/sv_SE/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: skapar 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributes misslyckades\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: kan inte hitta skärm för rootfönster 0x%lx\n
+$ #Unnamed
+# Inget namn
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() för 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() för 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: återför 0x%lx till root\n
diff --git a/nls/sv_SE/Windowmenu.m b/nls/sv_SE/Windowmenu.m
new file mode 100644
index 00000000..6addc2b1
--- /dev/null
+++ b/nls/sv_SE/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Skicka till...
+$ #Shade
+# Skugga
+$ #Iconify
+# Ikonifiera
+$ #Maximize
+# Maximera
+$ #Raise
+# Höj
+$ #Lower
+# Sänk
+$ #Stick
+# Klibbig
+$ #KillClient
+# Döda klient
+$ #Close
+# Stäng
diff --git a/nls/sv_SE/Workspace.m b/nls/sv_SE/Workspace.m
new file mode 100644
index 00000000..bc40d71d
--- /dev/null
+++ b/nls/sv_SE/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Skrivbord %d
diff --git a/nls/sv_SE/Workspacemenu.m b/nls/sv_SE/Workspacemenu.m
new file mode 100644
index 00000000..544c91aa
--- /dev/null
+++ b/nls/sv_SE/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Skrivbord
+$ #NewWorkspace
+# Nytt skrivbord
+$ #RemoveLast
+# Ta bort sista
diff --git a/nls/sv_SE/bsetroot.m b/nls/sv_SE/bsetroot.m
new file mode 100644
index 00000000..3ed67be9
--- /dev/null
+++ b/nls/sv_SE/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: fel: måste specifiera en av: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         skärmanslutning\n\
+  -mod               modulamönster\n\
+  -foreground, -fg  förgrundsfärg för modulamönster\n\
+  -background, -bg  bakgrundsfärg för modulamönster\n\n\
+  -gradient       texturlutning\n\
+  -from             startfärg\n\
+  -to               slutfärg\n\n\
+  -solid            solid färg\n\n\
+  -help                    visa denna hjälptext och avsluta\n
+
diff --git a/nls/sv_SE/common.m b/nls/sv_SE/common.m
new file mode 100644
index 00000000..0fc0db3c
--- /dev/null
+++ b/nls/sv_SE/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# Ja
+$ #No
+# Nej
+
+$ #DirectionTitle
+# Riktning
+$ #DirectionHoriz
+# Horisontell
+$ #DirectionVert
+# Vertikal
+
+$ #AlwaysOnTop
+# Alltid överst
+
+$ #PlacementTitle
+# Placering
+$ #PlacementTopLeft
+# Uppe till vänster
+$ #PlacementCenterLeft
+# Mitten till vänster
+$ #PlacementBottomLeft
+# Nere till vänster
+$ #PlacementTopCenter
+# Uppe i mitten
+$ #PlacementBottomCenter
+# Nere i mitten
+$ #PlacementTopRight
+# Uppe till höger
+$ #PlacementCenterRight
+# Mitten till höger
+$ #PlacementBottomRight
+# Nere till höger
+
+$ #AutoHide
+# Göm automatiskt
diff --git a/nls/sv_SE/main.m b/nls/sv_SE/main.m
new file mode 100644
index 00000000..6cfcfb5f
--- /dev/null
+++ b/nls/sv_SE/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# fel: '-rc' kräver ett argument\n
+$ #DISPLAYRequiresArg
+# fel: '-display' kräver ett argument\n
+$ #WarnDisplaySet
+# varning: kunde inte sätta variabeln 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tanvänd skärmanslutning.\n\
+  -rc \t\t\tanvänd alternativ resursfil.\n\
+  -version\t\t\tvisa version och avsluta.\n\
+  -help\t\t\t\tvisa denna hjälptext och avsluta.\n\n
+$ #CompileOptions
+# Kompilerad med:\n\
+  Avlusning\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Form:\t\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp ordnad dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/sv_SE/openbox.m b/nls/sv_SE/openbox.m
new file mode 100644
index 00000000..70a028e6
--- /dev/null
+++ b/nls/sv_SE/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: inga hanterbara skärmar hittades, avslutar\n
+$ #MapRequest
+# Openbox::process_event: MapRequest för 0x%lx\n
diff --git a/nls/tr_TR/BaseDisplay.m b/nls/tr_TR/BaseDisplay.m
new file mode 100644
index 00000000..8a307066
--- /dev/null
+++ b/nls/tr_TR/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s : X hatasý : %s ( %d ) opkodlar %d/%d\n  kaynak 0x%lx\n
+$ #SignalCaught
+# %s : %d sinyali alýndý \n
+$ #ShuttingDown
+# kapatýlýyorum\n
+$ #Aborting
+# kapatýlýyorum ... çöküntüyü býrakýyorum\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay : X sunucusuna baðlanýlýnamadý .\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay : çalýþtýrýrken kapatmada ekrana baðlanýlýnamadý \n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop() : eylem kuyruðundaki 'kötü' pencereyi siliyorum \n
diff --git a/nls/tr_TR/Basemenu.m b/nls/tr_TR/Basemenu.m
new file mode 100644
index 00000000..34190fa7
--- /dev/null
+++ b/nls/tr_TR/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox mönüsü
diff --git a/nls/tr_TR/Configmenu.m b/nls/tr_TR/Configmenu.m
new file mode 100644
index 00000000..4b625dda
--- /dev/null
+++ b/nls/tr_TR/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# Ayarlar
+$ #FocusModel
+# Foküsleme
+$ #WindowPlacement
+# Pencere yerleþimi
+$ #ImageDithering
+# Resim oluþturmasý
+$ #OpaqueMove
+# Ekraný içerikli taþý
+$ #FullMax
+# Tam ekranla, vallahi
+$ #FocusNew
+# Yeni pencereleri foküsle
+$ #FocusLast
+# Masaüstündeki son pencereyi foküsle
+$ #ClickToFocus
+# Týklayarak foküsle
+$ #SloppyFocus
+# Aðýr foküsle
+$ #AutoRaise
+# Otomatikman yükselt
+$ #SmartRows
+# Akýllý yerleþim( Sýralar )
+$ #SmartCols
+# Akýllý yerleþim( Sütunlar )
+$ #Cascade
+# Cascade Placement
+$ #LeftRight
+# Soldan saða
+$ #RightLeft
+# Saðdan sola
+$ #TopBottom
+# Üstten aþaða
+$ #BottomTop
+# Alttan üste
diff --git a/nls/tr_TR/Icon.m b/nls/tr_TR/Icon.m
new file mode 100644
index 00000000..74a344d1
--- /dev/null
+++ b/nls/tr_TR/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# Ikonalar
diff --git a/nls/tr_TR/Image.m b/nls/tr_TR/Image.m
new file mode 100644
index 00000000..30a46f57
--- /dev/null
+++ b/nls/tr_TR/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid : resmi yaratamadým\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage : XImage'i yaratamadým\n
+$ #UnsupVisual
+# BImage::renderXImage : desteklenmeyen görünüþ( renk derinliði )\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap : resmi yaratamadým\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl : geçersiz renk haritasý büyüklüðü %d (%d/%d/%d) - azaltýyorum\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl : renk haritasý ayrýlanamadý\n
+$ #ColorAllocFail
+# BImageControl::BImageControl : rengi ayrýrken hata oldu : %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl : resim arabelleði - %d resim temizlendi\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage : arabellek büyük, temizlemeye baþlýyorum\n
+$ #ColorParseError
+# BImageControl::getColor : renk tarama hatasý : '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor : renk ayýrma hatasý : '%s'\n
diff --git a/nls/tr_TR/Makefile.am b/nls/tr_TR/Makefile.am
new file mode 100644
index 00000000..3114ca3c
--- /dev/null
+++ b/nls/tr_TR/Makefile.am
@@ -0,0 +1,37 @@
+# nls/tr_TR/Makefile.am for Openbox
+# 
+# -- Türkce tercüme dizini için bir yapim-dosya-tabaný
+# 	kabalak -- kabalak@gmx.net
+#
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/tr_TR"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/tr_TR; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/tr_TR; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/tr_TR/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/tr_TR; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/tr_TR/Makefile.in b/nls/tr_TR/Makefile.in
new file mode 100644
index 00000000..0f91733a
--- /dev/null
+++ b/nls/tr_TR/Makefile.in
@@ -0,0 +1,224 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/tr_TR/Makefile.am for Openbox
+# 
+# -- Türkce tercüme dizini için bir yapim-dosya-tabaný
+# 	kabalak -- kabalak@gmx.net
+#
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/tr_TR/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/tr_TR
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/tr_TR/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/tr_TR"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/tr_TR; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/tr_TR; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/tr_TR/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/tr_TR; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/tr_TR/Screen.m b/nls/tr_TR/Screen.m
new file mode 100644
index 00000000..54d3cf57
--- /dev/null
+++ b/nls/tr_TR/Screen.m
@@ -0,0 +1,52 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen : X sunucusunu sorgularken hata oldu.\n  \
+%s ekranýnda baþka bir pencere yöneticisi çalýþýyor gibi.\n
+$ #ManagingScreen
+# BScreen::BScreen : %d ekraný, 0x%lx görünümüyle , %d derinliðiyle\n
+$ #FontLoadFail
+# BScreen::LoadStyle() : '%s' yazý tipi yüklenemedi.\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): önayarlý yazý tipi yüklenemedi.\n
+$ #EmptyMenuFile
+# %s : boþ mönü dosyasý\n
+$ #xterm
+# X komutasý
+$ #Restart
+# Yeniden baþla
+$ #Exit
+# Çýk
+$ #EXECError
+# BScreen::parseMenuFile : [exec] hatasý, mönü yaftasý ve/yada komuta belirlenmedi\n
+$ #EXITError
+# BScreen::parseMenuFile : [exit] hatasý, mönü yaftasý belirlenmedi\n
+$ #STYLEError
+# BScreen::parseMenuFile : [style] hatasý, mönü yaftasý ve/yada dosya adý belirlenmedi\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] hatasý, mönü yaftasý belirlenmedi\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] hatasý, dosya adý belirlenmedi\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] hatasý, '%s' vasat bir dosya deðil\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] hatasý, mönü yaftasý belirlenmedi\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] hatasý, mönü yaftasý belirlenmedi\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] hatasý, mönü yaftasý belirlenmedi\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] hatasý, dizin adý belirlenmedi\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] hatasý, '%s' bir dizin \
+deðildir\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] hatasý, '%s' var deðil\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] hatasý, mönü yaftasý belirlenmedi\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# X: %4d x Y: %4d
+$ #GeometryFormat
+# Y: %4d x E: %4d
diff --git a/nls/tr_TR/Slit.m b/nls/tr_TR/Slit.m
new file mode 100644
index 00000000..454086aa
--- /dev/null
+++ b/nls/tr_TR/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Slit yönü
+$ #SlitPlacement
+# Slit yerleþimi
diff --git a/nls/tr_TR/Toolbar.m b/nls/tr_TR/Toolbar.m
new file mode 100644
index 00000000..ba1a7cbb
--- /dev/null
+++ b/nls/tr_TR/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# Openbox çubuðu
+$ #EditWkspcName
+# Geçerli masaüstü ismini deðiþtir
+$ #ToolbarPlacement
+# Openbox çubuðunun yerleþimi
diff --git a/nls/tr_TR/Window.m b/nls/tr_TR/Window.m
new file mode 100644
index 00000000..b336a37d
--- /dev/null
+++ b/nls/tr_TR/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow : 0x%lx'i yarat#_yorum\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow : XGetWindowAttributres baþarýsýz oldu\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow : 0x%lx ana penceresi için ekraný belirleyemedim\n
+$ #Unnamed
+# Isimsiz
+$ #MapRequest
+# 0x%lx için OpenboxWindow::mapRequestEvent()\n
+$ #UnmapNotify
+# 0x%lx için OpenboxWindow::unmapNotifyEvent()\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: 0x%lx'i ana pencereyi boya\n
diff --git a/nls/tr_TR/Windowmenu.m b/nls/tr_TR/Windowmenu.m
new file mode 100644
index 00000000..c8b384c3
--- /dev/null
+++ b/nls/tr_TR/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# Gönder ...
+$ #Shade
+# Topla
+$ #Iconify
+# Ikonalaþtýr
+$ #Maximize
+# Azamileþtir
+$ #Raise
+# Alçalt
+$ #Lower
+# Yükselt
+$ #Stick
+# Yapýþýk
+$ #KillClient
+# Öldür
+$ #Close
+# Kapat
diff --git a/nls/tr_TR/Workspace.m b/nls/tr_TR/Workspace.m
new file mode 100644
index 00000000..3025f1bb
--- /dev/null
+++ b/nls/tr_TR/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# Masaüstü %d
diff --git a/nls/tr_TR/Workspacemenu.m b/nls/tr_TR/Workspacemenu.m
new file mode 100644
index 00000000..93c98454
--- /dev/null
+++ b/nls/tr_TR/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# Masaüstleri
+$ #NewWorkspace
+# Yeni bir masaüstü
+$ #RemoveLast
+# Son masaüstünü sil
diff --git a/nls/tr_TR/bsetroot.m b/nls/tr_TR/bsetroot.m
new file mode 100644
index 00000000..bdfe020d
--- /dev/null
+++ b/nls/tr_TR/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s : hata : -solid, -mod yada -gradient'den birisini belirlemek zorundasýn\n
+$ #Usage
+# %s 2.0 : Tel'if hakký (c) 1997-2000 Brad Hughes\n\n\
+  -display          ekran belirlemesi\n\
+  -mod               bölüþüm iþlemi\n\
+  -foreground, -fg   bölüþüm önalaný\n\
+  -background, -bg   bölüþüm ardalaný\n\n\
+  -gradient        geçiþim kaplamý\n\
+  -from              geçiþim baþlama rengi\n\
+  -to                geçiþim bitiþ rengi\n\n\
+  -solid             tek renk\n\n\
+  -help                    bu yardým iletisini göster ve çýk\n
+
diff --git a/nls/tr_TR/common.m b/nls/tr_TR/common.m
new file mode 100644
index 00000000..cae93184
--- /dev/null
+++ b/nls/tr_TR/common.m
@@ -0,0 +1,35 @@
+$set 15 #Common
+
+$ #Yes
+# Evet
+$ #No
+# Hayýr
+
+$ #DirectionTitle
+# Yön
+$ #DirectionHoriz
+# Ufki
+$ #DirectionVert
+# Dikey
+
+$ #AlwaysOnTop
+# Her zaman üstte
+
+$ #PlacementTitle
+# Yerleþim
+$ #PlacementTopLeft
+# Sol üst
+$ #PlacementCenterLeft
+# Sol orta 
+$ #PlacementBottomLeft
+# Sol alt
+$ #PlacementTopCenter
+# Üst orta
+$ #PlacementBottomCenter
+# Alt orta
+$ #PlacementTopRight
+# Sað üst
+$ #PlacementCenterRight
+# Sað orta
+$ #PlacementBottomRight
+# Sað üst
diff --git a/nls/tr_TR/main.m b/nls/tr_TR/main.m
new file mode 100644
index 00000000..d8f40ae2
--- /dev/null
+++ b/nls/tr_TR/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# hata : '-rc' bir argüman bekler\n
+$ #DISPLAYRequiresArg
+# hata : '-display' bir argüman bekler\n
+$ #WarnDisplaySet
+# ikaz : 'DISPLAY' verisini oturtamadým\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tekraný kullan.\n\
+  -rc \t\t\tbaþka bir ayarlama dosyasýný kullan.\n\
+  -version\t\t\tnesil bilgisini gösterir ve çýkar.\n\
+  -help\t\t\t\tbu yardým iletisini gösterir ve çýkar.\n\n
+$ #CompileOptions
+# Denetleme seçenekleri :\n\
+  Bilgilendirme\t\t\t%s\n\
+  Týzlama:\t\t\t%s\n\
+  Gölgeleme:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  R8b'e göre týzla:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/tr_TR/openbox.m b/nls/tr_TR/openbox.m
new file mode 100644
index 00000000..2a0da0bf
--- /dev/null
+++ b/nls/tr_TR/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: yönetebilinen ekran bulunamadý, bitiriliyorum\n
+$ #MapRequest
+# Openbox::process_event: 0x%lx için MapRequest\n
diff --git a/nls/zh_CN/BaseDisplay.m b/nls/zh_CN/BaseDisplay.m
new file mode 100644
index 00000000..dcdd194b
--- /dev/null
+++ b/nls/zh_CN/BaseDisplay.m
@@ -0,0 +1,16 @@
+$set 1 #BaseDisplay
+
+$ #XError
+# %s:  X ´íÎó: %s(%d) opcodes %d/%d\n  resource 0x%lx\n
+$ #SignalCaught
+# %s: ²¶»ñÐźŠ%d \n
+$ #ShuttingDown
+# ¹Ø±Õ\n
+$ #Aborting
+# ÕýÔÚÍ˳ö... ´æ´¢ºËÐÄÊý¾Ý\n
+$ #XConnectFail
+# BaseDisplay::BaseDisplay: Á¬½Ó X ·þÎñÆ÷ʧ°Ü.\n
+$ #CloseOnExecFail
+# BaseDisplay::BaseDisplay: couldn't mark display connection as close-on-exec\n
+$ #BadWindowRemove
+# BaseDisplay::eventLoop(): ÕýÔÚ´Óʼþ¶ÓÁÐÖÐɾ³ý»µ´°¿Ú\n
diff --git a/nls/zh_CN/Basemenu.m b/nls/zh_CN/Basemenu.m
new file mode 100644
index 00000000..f57a5fe7
--- /dev/null
+++ b/nls/zh_CN/Basemenu.m
@@ -0,0 +1,4 @@
+$set 2 #Basemenu
+
+$ #OpenboxMenu
+# Openbox ²Ëµ¥
diff --git a/nls/zh_CN/Configmenu.m b/nls/zh_CN/Configmenu.m
new file mode 100644
index 00000000..a296eced
--- /dev/null
+++ b/nls/zh_CN/Configmenu.m
@@ -0,0 +1,38 @@
+$set 3 #Configmenu
+
+$ #ConfigOptions
+# ÅäÖÃÑ¡Ïî
+$ #FocusModel
+# ¾Û½¹Ä£Ê½
+$ #WindowPlacement
+# ´°¿Ú·ÅÖÃ
+$ #ImageDithering
+# ͼÏñµ÷г
+$ #OpaqueMove
+# ÏÔʾÒƶ¯´°¿ÚÄÚÈÝ
+$ #FullMax
+# ÍêÈ«×î´ó»¯
+$ #FocusNew
+# ¾Û½¹Ð´°¿Ú
+$ #FocusLast
+# ×ÀÃæ¸Ä±äʱ¾Û½¹´°¿Ú
+$ #ClickToFocus
+# µã»÷¾Û½¹
+$ #SloppyFocus
+# ×Ô¶¯¾Û½¹
+$ #AutoRaise
+# ×Ô¶¯·ÅÇ°
+$ #SmartRows
+# ×Ô¶¯·ÅÖÃ(ÐÐ)
+$ #SmartCols
+# ×Ô¶¯·ÅÖÃ(ÁÐ)
+$ #Cascade
+# ²ãµþ·ÅÖÃ
+$ #LeftRight
+# ´Ó×óµ½ÓÒ
+$ #RightLeft
+# ´ÓÓÒµ½×ó
+$ #TopBottom
+# ´ÓÉϵ½ÏÂ
+$ #BottomTop
+# ´Óϵ½ÉÏ
diff --git a/nls/zh_CN/Icon.m b/nls/zh_CN/Icon.m
new file mode 100644
index 00000000..06ebc54e
--- /dev/null
+++ b/nls/zh_CN/Icon.m
@@ -0,0 +1,4 @@
+$set 4 #Icon
+
+$ #Icons
+# ͼ±ê
diff --git a/nls/zh_CN/Image.m b/nls/zh_CN/Image.m
new file mode 100644
index 00000000..fcb973ed
--- /dev/null
+++ b/nls/zh_CN/Image.m
@@ -0,0 +1,24 @@
+$set 5 #Image
+
+$ #ErrorCreatingSolidPixmap
+# BImage::render_solid: ´´½¨pixmap³ö´í\n
+$ #ErrorCreatingXImage
+# BImage::renderXImage: ´´½¨XImage³ö´í\n
+$ #UnsupVisual
+# BImage::renderXImage: unsupported visual\n
+$ #ErrorCreatingPixmap
+# BImage::renderPixmap: ´´½¨pixmap³ö´í\n
+$ #InvalidColormapSize
+# BImageControl::BImageControl: invalid colormap size %d (%d/%d/%d) - reducing\n
+$ #ErrorAllocatingColormap
+# BImageControl::BImageControl: error allocating colormap\n
+$ #ColorAllocFail
+# BImageControl::BImageControl: failed to alloc color %d/%d/%d\n
+$ #PixmapRelease
+# BImageControl::~BImageControl: pixmap cache - releasing %d pixmaps\n
+$ #PixmapCacheLarge
+# BImageControl::renderImage: cache is large, forcing cleanout\n
+$ #ColorParseError
+# BImageControl::getColor: color parse error: '%s'\n
+$ #ColorAllocError
+# BImageControl::getColor: color alloc error: '%s'\n
diff --git a/nls/zh_CN/Makefile.am b/nls/zh_CN/Makefile.am
new file mode 100644
index 00000000..7779fbc9
--- /dev/null
+++ b/nls/zh_CN/Makefile.am
@@ -0,0 +1,33 @@
+# nls/zh_CN/Makefile.am for Openbox
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/zh_CN"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/zh_CN; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/zh_CN; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/zh_CN/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/zh_CN; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
diff --git a/nls/zh_CN/Makefile.in b/nls/zh_CN/Makefile.in
new file mode 100644
index 00000000..96ed28d3
--- /dev/null
+++ b/nls/zh_CN/Makefile.in
@@ -0,0 +1,220 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# nls/zh_CN/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+NLSTEST = @NLS@
+CLEANFILES = openbox.cat
+MAINTAINERCLEANFILES = Makefile.in Translation.m
+DISTCLEANFILES = Translation.m
+MFILES = @srcdir@/BaseDisplay.m @srcdir@/Basemenu.m @srcdir@/Configmenu.m @srcdir@/Icon.m @srcdir@/Image.m @srcdir@/Screen.m @srcdir@/Slit.m @srcdir@/Toolbar.m @srcdir@/Window.m @srcdir@/Windowmenu.m @srcdir@/Workspace.m @srcdir@/Workspacemenu.m @srcdir@/openbox.m @srcdir@/common.m @srcdir@/main.m @srcdir@/bsetroot.m
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu nls/zh_CN/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = nls/zh_CN
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu nls/zh_CN/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-local
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-local install-data-am install-data install-am install \
+uninstall-local uninstall-am uninstall all-local all-redirect all-am \
+all installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+all-local: openbox.cat
+install-data-local: openbox.cat
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		echo "Installing catalog in $(DESTDIR)$(pkgdatadir)/nls/zh_CN"; \
+		$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/nls/zh_CN; \
+		$(INSTALL_DATA) openbox.cat $(DESTDIR)$(pkgdatadir)/nls/zh_CN; \
+	fi
+uninstall-local:
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		rm -f $(DESTDIR)$(pkgdatadir)/nls/zh_CN/openbox.cat; \
+		rmdir $(DESTDIR)$(pkgdatadir)/nls/zh_CN; \
+	fi
+
+Translation.m: $(MFILES)
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		awk -f @srcdir@/../convert.awk output=Translation.m $(MFILES); \
+	fi
+
+openbox.cat: Translation.m
+	@if test x$(NLSTEST) = "x-DNLS"; then \
+		$(gencat_cmd) openbox.cat Translation.m; \
+	fi
+
+distclean-local:
+	rm -f *\~
+
+# 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:
diff --git a/nls/zh_CN/Screen.m b/nls/zh_CN/Screen.m
new file mode 100644
index 00000000..3baba996
--- /dev/null
+++ b/nls/zh_CN/Screen.m
@@ -0,0 +1,52 @@
+$set 6 #Screen
+
+$ #AnotherWMRunning
+# BScreen::BScreen: ²éѯX·þÎñÆ÷ʱ³ö´í.\n  \
+ÒѾ­ÓÐÁíÒ»¸ö´°¿Ú¹ÜÀíÆ÷ÔÚÔËÐÐ %s.\n
+$ #ManagingScreen
+# BScreen::BScreen: ¶ÔÆÁÄ» %d ʹÓÃÊÓ 0x%lx, Éî¶È %d\n
+$ #FontLoadFail
+# BScreen::LoadStyle(): ÎÞ·¨ÔØÈë×ÖÌå '%s'\n
+$ #DefaultFontLoadFail
+# BScreen::LoadStyle(): ÎÞ·¨ÔØÈëĬÈÏ×ÖÌå.\n
+$ #EmptyMenuFile
+# %s: Çå¿Õ²Ëµ¥Îļþ\n
+$ #xterm
+# xterm
+$ #Restart
+# ÖØпªÊ¼
+$ #Exit
+# Í˳ö
+$ #EXECError
+# BScreen::parseMenuFile: [exec] ´íÎó, ûÓв˵¥µÄ±êÌâ»òÃüÁî\n
+$ #EXITError
+# BScreen::parseMenuFile: [exit] ´íÎó, ûÓв˵¥µÄ±êÌâ\n
+$ #STYLEError
+# BScreen::parseMenuFile: [style] ´íÎó, ûÓв˵¥±êÌâ»òÎļþÃû\n
+$ #CONFIGError
+# BScreen::parseMenuFile: [config] ´íÎó, ûÓв˵¥±êÌâ\n
+$ #INCLUDEError
+# BScreen::parseMenuFile: [include] ´íÎó, ûÓÐÎļþÃû\n
+$ #INCLUDEErrorReg
+# BScreen::parseMenuFile: [include] ´íÎó, '%s' ²»ÊÇÒ»¸öÆÕͨÎļþ\n
+$ #SUBMENUError
+# BScreen::parseMenuFile: [submenu] ´íÎó, ûÓв˵¥±êÌâ\n
+$ #RESTARTError
+# BScreen::parseMenuFile: [restart] ´íÎó, ûÓв˵¥±êÌâ\n
+$ #RECONFIGError
+# BScreen::parseMenuFile: [reconfig] ´íÎó, ûÓв˵¥±êÌâ\n
+$ #STYLESDIRError
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] ´íÎó, ûÓÐÖ¸ÃûĿ¼\n
+$ #STYLESDIRErrorNotDir
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] ´íÎó, '%s' ²»ÊÇĿ¼\n
+$ #STYLESDIRErrorNoExist
+# BScreen::parseMenuFile: [stylesdir/stylesmenu] ´íÎó, '%s' ²»´æÔÚ\n
+$ #WORKSPACESError
+# BScreen::parseMenuFile: [workspaces] ´íÎó, ûÓв˵¥±êÌâ\n
+$ #PositionLength
+# 0: 0000 x 0: 0000
+$ #PositionFormat
+# ×ó: %4d x ÉÏ: %4d
+$ #GeometryFormat
+# ¿í: %4d x ¸ß: %4d
+
diff --git a/nls/zh_CN/Slit.m b/nls/zh_CN/Slit.m
new file mode 100644
index 00000000..5bc50ff8
--- /dev/null
+++ b/nls/zh_CN/Slit.m
@@ -0,0 +1,8 @@
+$set 7 #Slit
+
+$ #SlitTitle
+# Slit
+$ #SlitDirection
+# Slit ·½Ïò
+$ #SlitPlacement
+# Slit ·ÅÖÃ
diff --git a/nls/zh_CN/Toolbar.m b/nls/zh_CN/Toolbar.m
new file mode 100644
index 00000000..4115eeee
--- /dev/null
+++ b/nls/zh_CN/Toolbar.m
@@ -0,0 +1,22 @@
+$set 8 #Toolbar
+
+$ #NoStrftimeLength
+# 00:00000
+$ #NoStrftimeDateFormat
+# %02d/%02d/%02d
+$ #NoStrftimeDateFormatEu
+# %02d.%02d.%02d
+$ #NoStrftimeTimeFormat24
+#  %02d:%02d 
+$ #NoStrftimeTimeFormat12
+# %02d:%02d %sm
+$ #NoStrftimeTimeFormatP
+# p
+$ #NoStrftimeTimeFormatA
+# a
+$ #ToolbarTitle
+# ¹¤¾ßÌõ
+$ #EditWkspcName
+# ±à¼­×ÀÃæÃû
+$ #ToolbarPlacement
+# ¹¤¾ßÌõ·ÅÖÃ
diff --git a/nls/zh_CN/Window.m b/nls/zh_CN/Window.m
new file mode 100644
index 00000000..d68368c8
--- /dev/null
+++ b/nls/zh_CN/Window.m
@@ -0,0 +1,17 @@
+$set 9 #Window
+
+
+$ #Creating
+# OpenboxWindow::OpenboxWindow: ÕýÔÚ´´½¨ 0x%lx\n
+$ #XGetWindowAttributesFail
+# OpenboxWindow::OpenboxWindow: XGetWindowAttributres ʧ°Ü\n
+$ #CannotFindScreen
+# OpenboxWindow::OpenboxWindow: cannot find screen for root window 0x%lx\n
+$ #Unnamed
+# ÎÞÃüÃû
+$ #MapRequest
+# OpenboxWindow::mapRequestEvent() for 0x%lx\n
+$ #UnmapNotify
+# OpenboxWindow::unmapNotifyEvent() for 0x%lx\n
+$ #UnmapNotifyReparent
+# OpenboxWindow::unmapnotifyEvent: reparent 0x%lx to root\n
diff --git a/nls/zh_CN/Windowmenu.m b/nls/zh_CN/Windowmenu.m
new file mode 100644
index 00000000..a98d39d9
--- /dev/null
+++ b/nls/zh_CN/Windowmenu.m
@@ -0,0 +1,20 @@
+$set 10 #Windowmenu
+
+$ #SendTo
+# ·¢Ë͵½...
+$ #Shade
+# ¾íÁ±
+$ #Iconify
+# ͼ±ê»¯
+$ #Maximize
+# ×î´ó»¯
+$ #Raise
+# ·ÅÇ°
+$ #Lower
+# ·Åºó
+$ #Stick
+# ¶¤×¡
+$ #KillClient
+# ɱËÀ
+$ #Close
+# ¹Ø±Õ
diff --git a/nls/zh_CN/Workspace.m b/nls/zh_CN/Workspace.m
new file mode 100644
index 00000000..b04efed7
--- /dev/null
+++ b/nls/zh_CN/Workspace.m
@@ -0,0 +1,4 @@
+$set 11 #Workspace
+
+$ #DefaultNameFormat
+# ×ÀÃæ %d
diff --git a/nls/zh_CN/Workspacemenu.m b/nls/zh_CN/Workspacemenu.m
new file mode 100644
index 00000000..0c41e6d2
--- /dev/null
+++ b/nls/zh_CN/Workspacemenu.m
@@ -0,0 +1,8 @@
+$set 12 #Workspacemenu
+
+$ #WorkspacesTitle
+# ×ÀÃæ
+$ #NewWorkspace
+# н¨×ÀÃæ
+$ #RemoveLast
+# ɾ³ý×ÀÃæ
diff --git a/nls/zh_CN/bsetroot.m b/nls/zh_CN/bsetroot.m
new file mode 100644
index 00000000..8d313863
--- /dev/null
+++ b/nls/zh_CN/bsetroot.m
@@ -0,0 +1,16 @@
+$set 16 #bsetroot
+
+$ #MustSpecify
+# %s: ´íÎó: ±ØÐë´ÓÖÐÖ¸¶¨Ò»¸ö: -solid, -mod, -gradient\n
+$ #Usage
+# %s 2.0: (c) 1997-2000 Brad Hughes\n\n\
+  -display         ÏÔʾÁ¬½Ó\n\
+  -mod               ģʽ\n\
+  -foreground, -fg  Ç°¾°É«\n\
+  -background, -bg  ±³¾°É«\n\n\
+  -gradient       ½¥½øÎÆÀí\n\
+  -from             ½¥½ø¿ªÊ¼É«\n\
+  -to               ½¥½ø½áÊøÉ«\n\n\
+  -solid            µ¥Ò»É«\n\n\
+  -help                    ÏÔʾÕâ¸ö°ïÖú\n
+
diff --git a/nls/zh_CN/common.m b/nls/zh_CN/common.m
new file mode 100644
index 00000000..5eca4c99
--- /dev/null
+++ b/nls/zh_CN/common.m
@@ -0,0 +1,38 @@
+$set 15 #Common
+
+$ #Yes
+# ÊÇ
+$ #No
+# ·ñ
+
+$ #DirectionTitle
+# ·½Ïò
+$ #DirectionHoriz
+# ˮƽ
+$ #DirectionVert
+# ´¹Ö±
+
+$ #AlwaysOnTop
+# ×ÜÔÚ×îÉÏÃæ
+
+$ #PlacementTitle
+# ·ÅÖÃ
+$ #PlacementTopLeft
+# ÉÏ×ó
+$ #PlacementCenterLeft
+# ÖÐ×ó
+$ #PlacementBottomLeft
+# ÏÂ×ó
+$ #PlacementTopCenter
+# ÉÏÖÐ
+$ #PlacementBottomCenter
+# ÏÂÖÐ
+$ #PlacementTopRight
+# ÉÏÓÒ
+$ #PlacementCenterRight
+# ÖÐÓÒ
+$ #PlacementBottomRight
+# ÏÂÓÒ
+
+$ #AutoHide
+# ×Ô¶¯Òþ²Ø
diff --git a/nls/zh_CN/main.m b/nls/zh_CN/main.m
new file mode 100644
index 00000000..15a4b9e7
--- /dev/null
+++ b/nls/zh_CN/main.m
@@ -0,0 +1,24 @@
+$set 14 #main
+
+$ #RCRequiresArg
+# ´íÎó: '-rc' ÐèÒª²ÎÊý\n
+$ #DISPLAYRequiresArg
+# ´íÎó: '-display' ÐèÒª²ÎÊý\n
+$ #WarnDisplaySet
+# ¾¯¸æ: ²»ÄÜÉèÖû·¾³±äÁ¿ 'DISPLAY'\n
+$ #Usage
+# Openbox %s: (c) 2002 - 2002 Ben Jansens\n\
+  \t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\
+  \t\t\t  1997 - 2000 Brad Hughes\n\n\
+  -display \t\tʹÓÃÏÔʾÁ¬½Ó.\n\
+  -rc \t\t\tʹÓÃÆäËûµÄ×ÊÔ´Îļþ.\n\
+  -version\t\t\tÏÔʾ°æ±¾.\n\
+  -help\t\t\t\tÏÔʾÕâ¸ö°ïÖú.\n\n
+$ #CompileOptions
+# ±àÒëÑ¡Ïî:\n\
+  Debugging\t\t\t%s\n\
+  Interlacing:\t\t\t%s\n\
+  Shape:\t\t\t%s\n\
+  Slit:\t\t\t\t%s\n\
+  8bpp Ordered Dithering:\t%s\n\
+  Event Clobbering:\t\t%s\n\n
diff --git a/nls/zh_CN/openbox.m b/nls/zh_CN/openbox.m
new file mode 100644
index 00000000..a69b0b39
--- /dev/null
+++ b/nls/zh_CN/openbox.m
@@ -0,0 +1,6 @@
+$set 13 #openbox
+
+$ #NoManagableScreens
+# Openbox::Openbox: ûÓÐÕÒµ½¿É¿ØÖƵÄÆÁÄ»£¬Í˳ö...\n
+$ #MapRequest
+# Openbox::process_event: MapRequest for 0x%lx\n
diff --git a/src/BaseDisplay.cc b/src/BaseDisplay.cc
new file mode 100644
index 00000000..258e3eab
--- /dev/null
+++ b/src/BaseDisplay.cc
@@ -0,0 +1,617 @@
+// BaseDisplay.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef    SHAPE
+#  include 
+#endif // SHAPE
+
+#ifdef    HAVE_FCNTL_H
+#  include 
+#endif // HAVE_FCNTL_H
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_UNISTD_H
+#  include 
+#  include 
+#endif // HAVE_UNISTD_H
+
+#ifdef    HAVE_SYS_SELECT_H
+#  include 
+#endif // HAVE_SYS_SELECT_H
+
+#ifdef    HAVE_SIGNAL_H
+#  include 
+#endif // HAVE_SIGNAL_H
+
+#ifndef   SA_NODEFER
+#  ifdef   SA_INTERRUPT
+#    define SA_NODEFER SA_INTERRUPT
+#  else // !SA_INTERRUPT
+#    define SA_NODEFER (0)
+#  endif // SA_INTERRUPT
+#endif // SA_NODEFER
+
+#ifdef    HAVE_SYS_WAIT_H
+#  include 
+#  include 
+#endif // HAVE_SYS_WAIT_H
+
+#if defined(HAVE_PROCESS_H) && defined(__EMX__)
+#  include 
+#endif //   HAVE_PROCESS_H             __EMX__
+
+#include "i18n.h"
+#include "BaseDisplay.h"
+#include "LinkedList.h"
+#include "Timer.h"
+
+// X error handler to handle any and all X errors while the application is
+// running
+static Bool internal_error = False;
+static Window last_bad_window = None;
+
+BaseDisplay *base_display;
+
+static int handleXErrors(Display *d, XErrorEvent *e) {
+#ifdef    DEBUG
+  char errtxt[128];
+
+  XGetErrorText(d, e->error_code, errtxt, 128);
+  fprintf(stderr, i18n->getMessage(BaseDisplaySet, BaseDisplayXError,
+		     "%s:  X error: %s(%d) opcodes %d/%d\n  resource 0x%lx\n"),
+          base_display->getApplicationName(), errtxt, e->error_code,
+          e->request_code, e->minor_code, e->resourceid);
+#endif // DEBUG
+
+  if (e->error_code == BadWindow) last_bad_window = e->resourceid;
+  if (internal_error) abort();
+
+  return(False);
+}
+
+
+// signal handler to allow for proper and gentle shutdown
+
+#ifndef   HAVE_SIGACTION
+static RETSIGTYPE signalhandler(int sig) {
+#else //  HAVE_SIGACTION
+static void signalhandler(int sig) {
+#endif // HAVE_SIGACTION
+
+  static int re_enter = 0;
+
+  switch (sig) {
+  case SIGCHLD:
+    int status;
+    waitpid(-1, &status, WNOHANG | WUNTRACED);
+
+#ifndef   HAVE_SIGACTION
+    // assume broken, braindead sysv signal semantics
+    signal(SIGCHLD, (RETSIGTYPE (*)(int)) signalhandler);
+#endif // HAVE_SIGACTION
+
+    break;
+
+  default:
+    if (base_display->handleSignal(sig)) {
+
+#ifndef   HAVE_SIGACTION
+      // assume broken, braindead sysv signal semantics
+      signal(sig, (RETSIGTYPE (*)(int)) signalhandler);
+#endif // HAVE_SIGACTION
+
+      return;
+    }
+
+    fprintf(stderr, i18n->getMessage(BaseDisplaySet, BaseDisplaySignalCaught,
+				     "%s:  signal %d caught\n"),
+	    base_display->getApplicationName(), sig);
+
+    if (! base_display->isStartup() && ! re_enter) {
+      internal_error = True;
+
+      re_enter = 1;
+      fprintf(stderr, i18n->getMessage(BaseDisplaySet, BaseDisplayShuttingDown,
+				       "shutting down\n"));
+      base_display->shutdown();
+    }
+
+    if (sig != SIGTERM && sig != SIGINT) {
+      fprintf(stderr, i18n->getMessage(BaseDisplaySet, BaseDisplayAborting,
+				       "aborting... dumping core\n"));
+      abort();
+    }
+
+    exit(0);
+
+    break;
+  }
+}
+
+
+// convenience functions
+#ifndef    __EMX__
+void bexec(const char *command, char* displaystring) {
+  if (! fork()) {
+    setsid();
+    putenv(displaystring);
+    execl("/bin/sh", "/bin/sh", "-c", command, NULL);
+    exit(0);
+  }
+}
+#endif // !__EMX__
+
+char *bstrdup(const char *s) {
+  const int l = strlen(s) + 1;
+  char *n = new char[l];
+  strncpy(n, s, l);
+  return n;
+}
+
+BaseDisplay::BaseDisplay(char *app_name, char *dpy_name) {
+  application_name = app_name;
+
+  _startup = True;
+  _shutdown = False;
+  server_grabs = 0;
+  last_bad_window = None;
+
+  ::base_display = this;
+
+#ifdef    HAVE_SIGACTION
+  struct sigaction action;
+
+  action.sa_handler = signalhandler;
+  action.sa_mask = sigset_t();
+  action.sa_flags = SA_NOCLDSTOP | SA_NODEFER;
+
+  sigaction(SIGPIPE, &action, NULL);
+  sigaction(SIGSEGV, &action, NULL);
+  sigaction(SIGFPE, &action, NULL);
+  sigaction(SIGTERM, &action, NULL);
+  sigaction(SIGINT, &action, NULL);
+  sigaction(SIGCHLD, &action, NULL);
+  sigaction(SIGHUP, &action, NULL);
+  sigaction(SIGUSR1, &action, NULL);
+  sigaction(SIGUSR2, &action, NULL);
+#else // !HAVE_SIGACTION
+  signal(SIGPIPE, (RETSIGTYPE (*)(int)) signalhandler);
+  signal(SIGSEGV, (RETSIGTYPE (*)(int)) signalhandler);
+  signal(SIGFPE, (RETSIGTYPE (*)(int)) signalhandler);
+  signal(SIGTERM, (RETSIGTYPE (*)(int)) signalhandler);
+  signal(SIGINT, (RETSIGTYPE (*)(int)) signalhandler);
+  signal(SIGUSR1, (RETSIGTYPE (*)(int)) signalhandler);
+  signal(SIGUSR2, (RETSIGTYPE (*)(int)) signalhandler);
+  signal(SIGHUP, (RETSIGTYPE (*)(int)) signalhandler);
+  signal(SIGCHLD, (RETSIGTYPE (*)(int)) signalhandler);
+#endif // HAVE_SIGACTION
+
+  if (! (display = XOpenDisplay(dpy_name))) {
+    fprintf(stderr, i18n->getMessage(BaseDisplaySet, BaseDisplayXConnectFail,
+	       "BaseDisplay::BaseDisplay: connection to X server failed.\n"));
+    ::exit(2);
+  } else if (fcntl(ConnectionNumber(display), F_SETFD, 1) == -1) {
+    fprintf(stderr,
+	    i18n->getMessage(BaseDisplaySet, BaseDisplayCloseOnExecFail,
+	       "BaseDisplay::BaseDisplay: couldn't mark display connection "
+	       "as close-on-exec\n"));
+    ::exit(2);
+  }
+
+  number_of_screens = ScreenCount(display);
+  display_name = XDisplayName(dpy_name);
+
+#ifdef    SHAPE
+  shape.extensions = XShapeQueryExtension(display, &shape.event_basep,
+                                          &shape.error_basep);
+#else // !SHAPE
+  shape.extensions = False;
+#endif // SHAPE
+
+  xa_wm_colormap_windows =
+    XInternAtom(display, "WM_COLORMAP_WINDOWS", False);
+  xa_wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False);
+  xa_wm_state = XInternAtom(display, "WM_STATE", False);
+  xa_wm_change_state = XInternAtom(display, "WM_CHANGE_STATE", False);
+  xa_wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False);
+  xa_wm_take_focus = XInternAtom(display, "WM_TAKE_FOCUS", False);
+  motif_wm_hints = XInternAtom(display, "_MOTIF_WM_HINTS", False);
+
+  openbox_hints = XInternAtom(display, "_BLACKBOX_HINTS", False);
+  openbox_attributes = XInternAtom(display, "_BLACKBOX_ATTRIBUTES", False);
+  openbox_change_attributes =
+    XInternAtom(display, "_BLACKBOX_CHANGE_ATTRIBUTES", False);
+
+  openbox_structure_messages =
+    XInternAtom(display, "_BLACKBOX_STRUCTURE_MESSAGES", False);
+  openbox_notify_startup =
+    XInternAtom(display, "_BLACKBOX_NOTIFY_STARTUP", False);
+  openbox_notify_window_add =
+    XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_ADD", False);
+  openbox_notify_window_del =
+    XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_DEL", False);
+  openbox_notify_current_workspace =
+    XInternAtom(display, "_BLACKBOX_NOTIFY_CURRENT_WORKSPACE", False);
+  openbox_notify_workspace_count =
+    XInternAtom(display, "_BLACKBOX_NOTIFY_WORKSPACE_COUNT", False);
+  openbox_notify_window_focus =
+    XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_FOCUS", False);
+  openbox_notify_window_raise =
+    XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_RAISE", False);
+  openbox_notify_window_lower =
+    XInternAtom(display, "_BLACKBOX_NOTIFY_WINDOW_LOWER", False);
+
+  openbox_change_workspace =
+    XInternAtom(display, "_BLACKBOX_CHANGE_WORKSPACE", False);
+  openbox_change_window_focus =
+    XInternAtom(display, "_BLACKBOX_CHANGE_WINDOW_FOCUS", False);
+  openbox_cycle_window_focus =
+    XInternAtom(display, "_BLACKBOX_CYCLE_WINDOW_FOCUS", False);
+
+#ifdef    NEWWMSPEC
+
+  net_supported = XInternAtom(display, "_NET_SUPPORTED", False);
+  net_client_list = XInternAtom(display, "_NET_CLIENT_LIST", False);
+  net_client_list_stacking = XInternAtom(display, "_NET_CLIENT_LIST_STACKING", False);
+  net_number_of_desktops = XInternAtom(display, "_NET_NUMBER_OF_DESKTOPS", False);
+  net_desktop_geometry = XInternAtom(display, "_NET_DESKTOP_GEOMETRY", False);
+  net_desktop_viewport = XInternAtom(display, "_NET_DESKTOP_VIEWPORT", False);
+  net_current_desktop = XInternAtom(display, "_NET_CURRENT_DESKTOP", False);
+  net_desktop_names = XInternAtom(display, "_NET_DESKTOP_NAMES", False);
+  net_active_window = XInternAtom(display, "_NET_ACTIVE_WINDOW", False);
+  net_workarea = XInternAtom(display, "_NET_WORKAREA", False);
+  net_supporting_wm_check = XInternAtom(display, "_NET_SUPPORTING_WM_CHECK", False);
+  net_virtual_roots = XInternAtom(display, "_NET_VIRTUAL_ROOTS", False);
+
+  net_close_window = XInternAtom(display, "_NET_CLOSE_WINDOW", False);
+  net_wm_moveresize = XInternAtom(display, "_NET_WM_MOVERESIZE", False);
+
+  net_properties = XInternAtom(display, "_NET_PROPERTIES", False);
+  net_wm_name = XInternAtom(display, "_NET_WM_NAME", False);
+  net_wm_desktop = XInternAtom(display, "_NET_WM_DESKTOP", False);
+  net_wm_window_type = XInternAtom(display, "_NET_WM_WINDOW_TYPE", False);
+  net_wm_state = XInternAtom(display, "_NET_WM_STATE", False);
+  net_wm_strut = XInternAtom(display, "_NET_WM_STRUT", False);
+  net_wm_icon_geometry = XInternAtom(display, "_NET_WM_ICON_GEOMETRY", False);
+  net_wm_icon = XInternAtom(display, "_NET_WM_ICON", False);
+  net_wm_pid = XInternAtom(display, "_NET_WM_PID", False);
+  net_wm_handled_icons = XInternAtom(display, "_NET_WM_HANDLED_ICONS", False);
+
+  net_wm_ping = XInternAtom(display, "_NET_WM_PING", False);
+
+#endif // NEWWMSPEC
+
+  cursor.session = XCreateFontCursor(display, XC_left_ptr);
+  cursor.move = XCreateFontCursor(display, XC_fleur);
+  cursor.ll_angle = XCreateFontCursor(display, XC_ll_angle);
+  cursor.lr_angle = XCreateFontCursor(display, XC_lr_angle);
+  cursor.ul_angle = XCreateFontCursor(display, XC_ul_angle);
+  cursor.ur_angle = XCreateFontCursor(display, XC_ur_angle);
+
+  XSetErrorHandler((XErrorHandler) handleXErrors);
+
+  timerList = new LinkedList;
+
+  screenInfoList = new LinkedList;
+  for (int i = 0; i < number_of_screens; i++) {
+    ScreenInfo *screeninfo = new ScreenInfo(this, i);
+    screenInfoList->insert(screeninfo);
+  }
+
+#ifndef   NOCLOBBER
+  NumLockMask = ScrollLockMask = 0;
+
+  const XModifierKeymap* const modmap = XGetModifierMapping(display);
+  if (modmap && modmap->max_keypermod > 0) {
+    const int mask_table[] = {
+      ShiftMask, LockMask, ControlMask, Mod1Mask,
+      Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask
+    };
+    const size_t size = (sizeof(mask_table) / sizeof(mask_table[0])) *
+      modmap->max_keypermod;
+    // get the values of the keyboard lock modifiers
+    // Note: Caps lock is not retrieved the same way as Scroll and Num lock
+    // since it doesn't need to be.
+    const KeyCode num_lock_code = XKeysymToKeycode(display, XK_Num_Lock);
+    const KeyCode scroll_lock_code = XKeysymToKeycode(display, XK_Scroll_Lock);
+    
+    for (size_t cnt = 0; cnt < size; ++cnt) {
+      if (! modmap->modifiermap[cnt]) continue;
+
+      if (num_lock_code == modmap->modifiermap[cnt])
+	NumLockMask = mask_table[cnt / modmap->max_keypermod];
+      if (scroll_lock_code == modmap->modifiermap[cnt])
+	ScrollLockMask = mask_table[cnt / modmap->max_keypermod];
+    }
+  }
+
+  MaskList[0] = 0;
+  MaskList[1] = LockMask;
+  MaskList[2] = NumLockMask;
+  MaskList[3] = ScrollLockMask;
+  MaskList[4] = LockMask | NumLockMask;
+  MaskList[5] = NumLockMask  | ScrollLockMask;
+  MaskList[6] = LockMask | ScrollLockMask;
+  MaskList[7] = LockMask | NumLockMask | ScrollLockMask;
+  MaskListLength = sizeof(MaskList) / sizeof(MaskList[0]);
+  
+  if (modmap) XFreeModifiermap(const_cast(modmap));
+#endif // NOCLOBBER
+}
+
+
+BaseDisplay::~BaseDisplay(void) {
+  while (screenInfoList->count()) {
+    ScreenInfo *si = screenInfoList->first();
+
+    screenInfoList->remove(si);
+    delete si;
+  }
+
+  delete screenInfoList;
+
+  // we don't create the BTimers, we don't delete them
+  while (timerList->count())
+    timerList->remove(0);
+
+  delete timerList;
+
+  XCloseDisplay(display);
+}
+
+
+void BaseDisplay::eventLoop(void) {
+  run();
+
+  int xfd = ConnectionNumber(display);
+
+  while ((! _shutdown) && (! internal_error)) {
+    if (XPending(display)) {
+      XEvent e;
+      XNextEvent(display, &e);
+
+      if (last_bad_window != None && e.xany.window == last_bad_window) {
+#ifdef    DEBUG
+      fprintf(stderr, i18n->getMessage(BaseDisplaySet,
+				       BaseDisplayBadWindowRemove,
+			 "BaseDisplay::eventLoop(): removing bad window "
+			 "from event queue\n"));
+#endif // DEBUG
+      } else {
+	last_bad_window = None;
+        process_event(&e);
+      }
+    } else {
+      fd_set rfds;
+      timeval now, tm, *timeout = (timeval *) 0;
+
+      FD_ZERO(&rfds);
+      FD_SET(xfd, &rfds);
+
+      if (timerList->count()) {
+        gettimeofday(&now, 0);
+
+        tm.tv_sec = tm.tv_usec = 0l;
+
+        BTimer *timer = timerList->first();
+
+        tm.tv_sec = timer->getStartTime().tv_sec +
+          timer->getTimeout().tv_sec - now.tv_sec;
+        tm.tv_usec = timer->getStartTime().tv_usec +
+          timer->getTimeout().tv_usec - now.tv_usec;
+
+        while (tm.tv_usec >= 1000000) {
+          tm.tv_sec++;
+          tm.tv_usec -= 1000000;
+        }
+
+        while (tm.tv_usec < 0) {
+          if (tm.tv_sec > 0) {
+            tm.tv_sec--;
+            tm.tv_usec += 1000000;
+          } else {
+            tm.tv_usec = 0;
+            break;
+          }
+        }
+
+        timeout = &tm;
+      }
+
+      select(xfd + 1, &rfds, 0, 0, timeout);
+
+      // check for timer timeout
+      gettimeofday(&now, 0);
+
+      LinkedListIterator it(timerList);
+      for(BTimer *timer = it.current(); timer; it++, timer = it.current()) {
+        tm.tv_sec = timer->getStartTime().tv_sec +
+          timer->getTimeout().tv_sec;
+        tm.tv_usec = timer->getStartTime().tv_usec +
+          timer->getTimeout().tv_usec;
+
+        if ((now.tv_sec < tm.tv_sec) ||
+            (now.tv_sec == tm.tv_sec && now.tv_usec < tm.tv_usec))
+          break;
+
+        timer->fireTimeout();
+
+        // restart the current timer so that the start time is updated
+        if (! timer->doOnce()) timer->start();
+        else timer->stop();
+      }
+    }
+  }
+}
+
+
+const Bool BaseDisplay::validateWindow(Window window) {
+  XEvent event;
+  if (XCheckTypedWindowEvent(display, window, DestroyNotify, &event)) {
+    XPutBackEvent(display, &event);
+
+    return False;
+  }
+
+  return True;
+}
+
+
+void BaseDisplay::grab(void) {
+  if (! server_grabs++)
+    XGrabServer(display);
+}
+
+
+void BaseDisplay::ungrab(void) {
+  if (! --server_grabs)
+    XUngrabServer(display);
+
+  if (server_grabs < 0) server_grabs = 0;
+}
+
+
+void BaseDisplay::addTimer(BTimer *timer) {
+  if (! timer) return;
+
+  LinkedListIterator it(timerList);
+  int index = 0;
+  for (BTimer *tmp = it.current(); tmp; it++, index++, tmp = it.current())
+    if ((tmp->getTimeout().tv_sec > timer->getTimeout().tv_sec) ||
+        ((tmp->getTimeout().tv_sec == timer->getTimeout().tv_sec) &&
+         (tmp->getTimeout().tv_usec >= timer->getTimeout().tv_usec)))
+      break;
+
+  timerList->insert(timer, index);
+}
+
+
+void BaseDisplay::removeTimer(BTimer *timer) {
+  timerList->remove(timer);
+}
+
+
+/*
+ * Grabs a button, but also grabs the button in every possible combination with
+ * the keyboard lock keys, so that they do not cancel out the event.
+ */
+void BaseDisplay::grabButton(unsigned int button, unsigned int modifiers,
+			     Window grab_window, Bool owner_events,
+			     unsigned int event_mask, int pointer_mode,
+			     int keybaord_mode, Window confine_to,
+			     Cursor cursor) const
+{
+#ifndef   NOCLOBBER
+  for (size_t cnt = 0; cnt < MaskListLength; ++cnt)
+    XGrabButton(display, button, modifiers | MaskList[cnt], grab_window,
+                owner_events, event_mask, pointer_mode, keybaord_mode,
+                confine_to, cursor);
+#else  // NOCLOBBER
+    XGrabButton(display, button, modifiers, grab_window,
+                owner_events, event_mask, pointer_mode, keybaord_mode,
+                confine_to, cursor);
+#endif // NOCLOBBER
+}
+
+/*
+ * Releases the grab on a button, and ungrabs all possible combinations of the
+ * keyboard lock keys.
+ */
+void BaseDisplay::ungrabButton(unsigned int button, unsigned int modifiers,
+			       Window grab_window) const {
+#ifndef   NOCLOBBER
+  for (size_t cnt = 0; cnt < MaskListLength; ++cnt)
+    XUngrabButton(display, button, modifiers | MaskList[cnt], grab_window);
+#else  // NOCLOBBER
+    XUngrabButton(display, button, modifiers, grab_window);
+#endif // NOCLOBBER
+}
+
+
+ScreenInfo::ScreenInfo(BaseDisplay *d, int num) {
+  basedisplay = d;
+  screen_number = num;
+
+  root_window = RootWindow(basedisplay->getXDisplay(), screen_number);
+  depth = DefaultDepth(basedisplay->getXDisplay(), screen_number);
+
+  width =
+    WidthOfScreen(ScreenOfDisplay(basedisplay->getXDisplay(), screen_number));
+  height =
+    HeightOfScreen(ScreenOfDisplay(basedisplay->getXDisplay(), screen_number));
+
+  // search for a TrueColor Visual... if we can't find one... we will use the
+  // default visual for the screen
+  XVisualInfo vinfo_template, *vinfo_return;
+  int vinfo_nitems;
+
+  vinfo_template.screen = screen_number;
+  vinfo_template.c_class = TrueColor;
+
+  visual = (Visual *) 0;
+
+  if ((vinfo_return = XGetVisualInfo(basedisplay->getXDisplay(),
+                                     VisualScreenMask | VisualClassMask,
+                                     &vinfo_template, &vinfo_nitems)) &&
+      vinfo_nitems > 0) {
+    for (int i = 0; i < vinfo_nitems; i++) {
+      if (depth < (vinfo_return + i)->depth) {
+        depth = (vinfo_return + i)->depth;
+        visual = (vinfo_return + i)->visual;
+      }
+    }
+
+    XFree(vinfo_return);
+  }
+
+  if (visual) {
+    colormap = XCreateColormap(basedisplay->getXDisplay(), root_window,
+			       visual, AllocNone);
+  } else {
+    visual = DefaultVisual(basedisplay->getXDisplay(), screen_number);
+    colormap = DefaultColormap(basedisplay->getXDisplay(), screen_number);
+  }
+}
diff --git a/src/BaseDisplay.h b/src/BaseDisplay.h
new file mode 100644
index 00000000..2aa82d76
--- /dev/null
+++ b/src/BaseDisplay.h
@@ -0,0 +1,357 @@
+// BaseDisplay.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __BaseDisplay_hh
+#define   __BaseDisplay_hh
+
+#include 
+#include 
+
+// forward declaration
+class BaseDisplay;
+class ScreenInfo;
+
+#include "LinkedList.h"
+#include "Timer.h"
+
+#define AttribShaded      (1l << 0)
+#define AttribMaxHoriz    (1l << 1)
+#define AttribMaxVert     (1l << 2)
+#define AttribOmnipresent (1l << 3)
+#define AttribWorkspace   (1l << 4)
+#define AttribStack       (1l << 5)
+#define AttribDecoration  (1l << 6)
+
+#define StackTop          (0)
+#define StackNormal       (1)
+#define StackBottom       (2)
+
+#define DecorNone         (0)
+#define DecorNormal       (1)
+#define DecorTiny         (2)
+#define DecorTool         (3)
+
+typedef struct _openbox_hints {
+  unsigned long flags, attrib, workspace, stack, decoration;
+} OpenboxHints;
+
+typedef struct _openbox_attributes {
+  unsigned long flags, attrib, workspace, stack, decoration;
+  int premax_x, premax_y;
+  unsigned int premax_w, premax_h;
+} OpenboxAttributes;
+
+#define PropOpenboxHintsElements      (5)
+#define PropOpenboxAttributesElements (9)
+
+#ifndef    __EMX__
+void bexec(const char *, char *);
+#endif // !__EMX__
+
+char *bstrdup(const char *);
+
+class BaseDisplay {
+private:
+  struct cursor {
+    Cursor session, move, ll_angle, lr_angle, ul_angle, ur_angle;
+  } cursor;
+
+  struct shape {
+    Bool extensions;
+    int event_basep, error_basep;
+  } shape;
+
+#ifndef   NOCLOBBER
+  unsigned int MaskList[8];
+  size_t MaskListLength;
+#endif // NOCLOBBER
+  
+  Atom xa_wm_colormap_windows, xa_wm_protocols, xa_wm_state,
+    xa_wm_delete_window, xa_wm_take_focus, xa_wm_change_state,
+    motif_wm_hints;
+
+  // NETAttributes
+  Atom openbox_attributes, openbox_change_attributes, openbox_hints;
+
+  // NETStructureMessages
+  Atom openbox_structure_messages, openbox_notify_startup,
+    openbox_notify_window_add, openbox_notify_window_del,
+    openbox_notify_window_focus, openbox_notify_current_workspace,
+    openbox_notify_workspace_count, openbox_notify_window_raise,
+    openbox_notify_window_lower;
+
+  // message_types for client -> wm messages
+  Atom openbox_change_workspace, openbox_change_window_focus,
+    openbox_cycle_window_focus;
+
+#ifdef    NEWWMSPEC
+
+  // root window properties
+  Atom net_supported, net_client_list, net_client_list_stacking,
+    net_number_of_desktops, net_desktop_geometry, net_desktop_viewport,
+    net_current_desktop, net_desktop_names, net_active_window, net_workarea,
+    net_supporting_wm_check, net_virtual_roots;
+
+  // root window messages
+  Atom net_close_window, net_wm_moveresize;
+
+  // application window properties
+  Atom net_properties, net_wm_name, net_wm_desktop, net_wm_window_type,
+    net_wm_state, net_wm_strut, net_wm_icon_geometry, net_wm_icon, net_wm_pid,
+    net_wm_handled_icons;
+
+  // application protocols
+  Atom net_wm_ping;
+
+#endif // NEWWMSPEC
+
+  Bool _startup, _shutdown;
+  Display *display;
+  LinkedList *screenInfoList;
+  LinkedList *timerList;
+
+  char *display_name, *application_name;
+  int number_of_screens, server_grabs, colors_per_channel;
+
+
+protected:
+  // pure virtual function... you must override this
+  virtual void process_event(XEvent *) = 0;
+
+  // the masks of the modifiers which are ignored in button events.
+  int NumLockMask, ScrollLockMask;
+
+
+public:
+  BaseDisplay(char *, char * = 0);
+  virtual ~BaseDisplay(void);
+
+  inline const Atom &getWMChangeStateAtom(void) const
+    { return xa_wm_change_state; }
+  inline const Atom &getWMStateAtom(void) const
+    { return xa_wm_state; }
+  inline const Atom &getWMDeleteAtom(void) const
+    { return xa_wm_delete_window; }
+  inline const Atom &getWMProtocolsAtom(void) const
+    { return xa_wm_protocols; }
+  inline const Atom &getWMTakeFocusAtom(void) const
+    { return xa_wm_take_focus; }
+  inline const Atom &getWMColormapAtom(void) const
+    { return xa_wm_colormap_windows; }
+  inline const Atom &getMotifWMHintsAtom(void) const
+    { return motif_wm_hints; }
+
+  // this atom is for normal app->WM hints about decorations, stacking,
+  // starting workspace etc...
+  inline const Atom &getOpenboxHintsAtom(void) const
+    { return openbox_hints;}
+
+  // these atoms are for normal app->WM interaction beyond the scope of the
+  // ICCCM...
+  inline const Atom &getOpenboxAttributesAtom(void) const
+    { return openbox_attributes; }
+  inline const Atom &getOpenboxChangeAttributesAtom(void) const
+    { return openbox_change_attributes; }
+
+  // these atoms are for window->WM interaction, with more control and
+  // information on window "structure"... common examples are
+  // notifying apps when windows are raised/lowered... when the user changes
+  // workspaces... i.e. "pager talk"
+  inline const Atom &getOpenboxStructureMessagesAtom(void) const
+    { return openbox_structure_messages; }
+
+  // *Notify* portions of the NETStructureMessages protocol
+  inline const Atom &getOpenboxNotifyStartupAtom(void) const
+    { return openbox_notify_startup; }
+  inline const Atom &getOpenboxNotifyWindowAddAtom(void) const
+    { return openbox_notify_window_add; }
+  inline const Atom &getOpenboxNotifyWindowDelAtom(void) const
+    { return openbox_notify_window_del; }
+  inline const Atom &getOpenboxNotifyWindowFocusAtom(void) const
+    { return openbox_notify_window_focus; }
+  inline const Atom &getOpenboxNotifyCurrentWorkspaceAtom(void) const
+    { return openbox_notify_current_workspace; }
+  inline const Atom &getOpenboxNotifyWorkspaceCountAtom(void) const
+    { return openbox_notify_workspace_count; }
+  inline const Atom &getOpenboxNotifyWindowRaiseAtom(void) const
+    { return openbox_notify_window_raise; }
+  inline const Atom &getOpenboxNotifyWindowLowerAtom(void) const
+    { return openbox_notify_window_lower; }
+
+  // atoms to change that request changes to the desktop environment during
+  // runtime... these messages can be sent by any client... as the sending
+  // client window id is not included in the ClientMessage event...
+  inline const Atom &getOpenboxChangeWorkspaceAtom(void) const
+    { return openbox_change_workspace; }
+  inline const Atom &getOpenboxChangeWindowFocusAtom(void) const
+    { return openbox_change_window_focus; }
+  inline const Atom &getOpenboxCycleWindowFocusAtom(void) const
+    { return openbox_cycle_window_focus; }
+
+#ifdef    NEWWMSPEC
+
+  // root window properties
+  inline const Atom &getNETSupportedAtom(void) const
+    { return net_supported; }
+  inline const Atom &getNETClientListAtom(void) const
+    { return net_client_list; }
+  inline const Atom &getNETClientListStackingAtom(void) const
+    { return net_client_list_stacking; }
+  inline const Atom &getNETNumberOfDesktopsAtom(void) const
+    { return net_number_of_desktops; }
+  inline const Atom &getNETDesktopGeometryAtom(void) const
+    { return net_desktop_geometry; }
+  inline const Atom &getNETDesktopViewportAtom(void) const
+    { return net_desktop_viewport; }
+  inline const Atom &getNETCurrentDesktopAtom(void) const
+    { return net_current_desktop; }
+  inline const Atom &getNETDesktopNamesAtom(void) const
+    { return net_desktop_names; }
+  inline const Atom &getNETActiveWindowAtom(void) const
+    { return net_active_window; }
+  inline const Atom &getNETWorkareaAtom(void) const
+    { return net_workarea; }
+  inline const Atom &getNETSupportingWMCheckAtom(void) const
+    { return net_supporting_wm_check; }
+  inline const Atom &getNETVirtualRootsAtom(void) const
+    { return net_virtual_roots; }
+
+  // root window messages
+  inline const Atom &getNETCloseWindowAtom(void) const
+    { return net_close_window; }
+  inline const Atom &getNETWMMoveResizeAtom(void) const
+    { return net_wm_moveresize; }
+
+  // application window properties
+  inline const Atom &getNETPropertiesAtom(void) const
+    { return net_properties; }
+  inline const Atom &getNETWMNameAtom(void) const
+    { return net_wm_name; }
+  inline const Atom &getNETWMDesktopAtom(void) const
+    { return net_wm_desktop; }
+  inline const Atom &getNETWMWindowTypeAtom(void) const
+    { return net_wm_window_type; }
+  inline const Atom &getNETWMStateAtom(void) const
+    { return net_wm_state; }
+  inline const Atom &getNETWMStrutAtom(void) const
+    { return net_wm_strut; }
+  inline const Atom &getNETWMIconGeometryAtom(void) const
+    { return net_wm_icon_geometry; }
+  inline const Atom &getNETWMIconAtom(void) const
+    { return net_wm_icon; }
+  inline const Atom &getNETWMPidAtom(void) const
+    { return net_wm_pid; }
+  inline const Atom &getNETWMHandledIconsAtom(void) const
+    { return net_wm_handled_icons; }
+
+  // application protocols
+  inline const Atom &getNETWMPingAtom(void) const
+    { return net_wm_ping; }
+
+#endif // NEWWMSPEC
+
+  inline ScreenInfo *getScreenInfo(int s)
+    { return (ScreenInfo *) screenInfoList->find(s); }
+
+  inline const Bool &hasShapeExtensions(void) const
+    { return shape.extensions; }
+  inline const Bool &doShutdown(void) const
+    { return _shutdown; }
+  inline const Bool &isStartup(void) const
+    { return _startup; }
+
+  inline const Cursor &getSessionCursor(void) const
+    { return cursor.session; }
+  inline const Cursor &getMoveCursor(void) const
+    { return cursor.move; }
+  inline const Cursor &getLowerLeftAngleCursor(void) const
+    { return cursor.ll_angle; }
+  inline const Cursor &getLowerRightAngleCursor(void) const
+    { return cursor.lr_angle; }
+  inline const Cursor &getUpperLeftAngleCursor(void) const
+    { return cursor.ul_angle; }
+  inline const Cursor &getUpperRightAngleCursor(void) const
+    { return cursor.ur_angle; }
+
+  inline Display *getXDisplay(void) { return display; }
+
+  inline const char *getXDisplayName(void) const
+    { return (const char *) display_name; }
+  inline const char *getApplicationName(void) const
+    { return (const char *) application_name; }
+
+  inline const int &getNumberOfScreens(void) const
+    { return number_of_screens; }
+  inline const int &getShapeEventBase(void) const
+    { return shape.event_basep; }
+
+  inline void shutdown(void) { _shutdown = True; }
+  inline void run(void) { _startup = _shutdown = False; }
+
+  const Bool validateWindow(Window);
+
+  void grabButton(unsigned int, unsigned int, Window, Bool, unsigned int, int,
+      int, Window, Cursor) const;
+  void ungrabButton(unsigned int button, unsigned int modifiers,
+      Window grab_window) const;
+  
+  void grab(void);
+  void ungrab(void);
+  void eventLoop(void);
+  void addTimer(BTimer *);
+  void removeTimer(BTimer *);
+
+  // another pure virtual... this is used to handle signals that BaseDisplay
+  // doesn't understand itself
+  virtual Bool handleSignal(int) = 0;
+};
+
+
+class ScreenInfo {
+private:
+  BaseDisplay *basedisplay;
+  Visual *visual;
+  Window root_window;
+  Colormap colormap;
+
+  int depth, screen_number;
+  unsigned int width, height;
+
+
+public:
+  ScreenInfo(BaseDisplay *, int);
+
+  inline BaseDisplay *getBaseDisplay(void) { return basedisplay; }
+
+  inline Visual *getVisual(void) { return visual; }
+  inline const Window &getRootWindow(void) const { return root_window; }
+  inline const Colormap &getColormap(void) const { return colormap; }
+
+  inline const int &getDepth(void) const { return depth; }
+  inline const int &getScreenNumber(void) const { return screen_number; }
+
+  inline const unsigned int &getWidth(void) const { return width; }
+  inline const unsigned int &getHeight(void) const { return height; }
+};
+
+
+#endif // __BaseDisplay_hh
diff --git a/src/Basemenu.cc b/src/Basemenu.cc
new file mode 100644
index 00000000..b0e97606
--- /dev/null
+++ b/src/Basemenu.cc
@@ -0,0 +1,1036 @@
+// Basemenu.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#include 
+using namespace std;
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Basemenu.h"
+#include "Screen.h"
+
+static Basemenu *shown = (Basemenu *) 0;
+
+Basemenu::Basemenu(BScreen *scrn) {
+  screen = scrn;
+  openbox = screen->getOpenbox();
+  image_ctrl = screen->getImageControl();
+  display = openbox->getXDisplay();
+  parent = (Basemenu *) 0;
+  alignment = AlignDontCare;
+
+  title_vis =
+    movable =
+    hide_tree = True;
+
+  shifted =
+    internal_menu =
+    moving =
+    torn =
+    visible = False;
+
+  menu.x =
+    menu.y =
+    menu.x_shift =
+    menu.y_shift =
+    menu.x_move =
+    menu.y_move = 0;
+
+  which_sub =
+    which_press =
+    which_sbl = -1;
+
+  menu.frame_pixmap =
+    menu.title_pixmap =
+    menu.hilite_pixmap =
+    menu.sel_pixmap = None;
+
+  menu.bevel_w = screen->getBevelWidth();
+
+  if (i18n->multibyte())
+    menu.width = menu.title_h = menu.item_w = menu.frame_h =
+      screen->getMenuStyle()->t_fontset_extents->max_ink_extent.height +
+	(menu.bevel_w  * 2);
+  else
+    menu.width = menu.title_h = menu.item_w = menu.frame_h =
+      screen->getMenuStyle()->t_font->ascent +
+        screen->getMenuStyle()->t_font->descent + (menu.bevel_w * 2);
+  
+  menu.label = 0;
+  
+  menu.sublevels =
+    menu.persub =
+    menu.minsub = 0;
+  
+  MenuStyle *style = screen->getMenuStyle();
+  if (i18n->multibyte()) {
+    menu.item_h = style->f_fontset_extents->max_ink_extent.height +
+      (menu.bevel_w);
+  } else {
+    menu.item_h = style->f_font->ascent + style->f_font->descent +
+		  (menu.bevel_w);
+  }
+  
+  menu.height = menu.title_h + screen->getBorderWidth() + menu.frame_h;
+  
+  unsigned long attrib_mask = CWBackPixmap | CWBackPixel | CWBorderPixel |
+			      CWColormap | CWOverrideRedirect | CWEventMask;
+  XSetWindowAttributes attrib;
+  attrib.background_pixmap = None;
+  attrib.background_pixel = attrib.border_pixel =
+			    screen->getBorderColor()->getPixel();
+  attrib.colormap = screen->getColormap();
+  attrib.override_redirect = True;
+  attrib.event_mask = ButtonPressMask | ButtonReleaseMask |
+                      ButtonMotionMask | ExposureMask;
+
+  menu.window =
+    XCreateWindow(display, screen->getRootWindow(), menu.x, menu.y, menu.width,
+		  menu.height, screen->getBorderWidth(), screen->getDepth(),
+                  InputOutput, screen->getVisual(), attrib_mask, &attrib);
+  openbox->saveMenuSearch(menu.window, this);
+
+  attrib_mask = CWBackPixmap | CWBackPixel | CWBorderPixel | CWEventMask;
+  attrib.background_pixel = screen->getBorderColor()->getPixel();
+  attrib.event_mask |= EnterWindowMask | LeaveWindowMask;
+
+  menu.title =
+    XCreateWindow(display, menu.window, 0, 0, menu.width, menu.height, 0,
+		  screen->getDepth(), InputOutput, screen->getVisual(),
+		  attrib_mask, &attrib);
+  openbox->saveMenuSearch(menu.title, this);
+
+  attrib.event_mask |= PointerMotionMask;
+  menu.frame = XCreateWindow(display, menu.window, 0,
+			     menu.title_h + screen->getBorderWidth(),
+			     menu.width, menu.frame_h, 0,
+			     screen->getDepth(), InputOutput,
+			     screen->getVisual(), attrib_mask, &attrib);
+  openbox->saveMenuSearch(menu.frame, this);
+
+  menuitems = new LinkedList;
+
+  // even though this is the end of the constructor the menu is still not
+  // completely created.  items must be inserted and it must be update()'d
+}
+
+
+Basemenu::~Basemenu(void) {
+  XUnmapWindow(display, menu.window);
+
+  if (shown && shown->getWindowID() == getWindowID())
+    shown = (Basemenu *) 0;
+
+  int n = menuitems->count();
+  for (int i = 0; i < n; ++i)
+    remove(0);
+
+  delete menuitems;
+
+  if (menu.label)
+    delete [] menu.label;
+
+  if (menu.title_pixmap)
+    image_ctrl->removeImage(menu.title_pixmap);
+
+  if (menu.frame_pixmap)
+    image_ctrl->removeImage(menu.frame_pixmap);
+
+  if (menu.hilite_pixmap)
+    image_ctrl->removeImage(menu.hilite_pixmap);
+
+  if (menu.sel_pixmap)
+    image_ctrl->removeImage(menu.sel_pixmap);
+
+  openbox->removeMenuSearch(menu.title);
+  XDestroyWindow(display, menu.title);
+
+  openbox->removeMenuSearch(menu.frame);
+  XDestroyWindow(display, menu.frame);
+
+  openbox->removeMenuSearch(menu.window);
+  XDestroyWindow(display, menu.window);
+}
+
+
+int Basemenu::insert(const char *l, int function, const char *e, int pos) {
+  char *label = 0, *exec = 0;
+
+  if (l) label = bstrdup(l);
+  if (e) exec = bstrdup(e);
+
+  BasemenuItem *item = new BasemenuItem(label, function, exec);
+  menuitems->insert(item, pos);
+
+  return menuitems->count();
+}
+
+
+int Basemenu::insert(const char *l, Basemenu *submenu, int pos) {
+  char *label = 0;
+
+  if (l) label = bstrdup(l);
+
+  BasemenuItem *item = new BasemenuItem(label, submenu);
+  menuitems->insert(item, pos);
+
+  submenu->parent = this;
+
+  return menuitems->count();
+}
+
+
+int Basemenu::insert(const char **ulabel, int pos, int function) {
+  BasemenuItem *item = new BasemenuItem(ulabel, function);
+  menuitems->insert(item, pos);
+
+  return menuitems->count();
+}
+
+
+int Basemenu::remove(int index) {
+  if (index < 0 || index > menuitems->count()) return -1;
+
+  BasemenuItem *item = menuitems->remove(index);
+
+  if (item) {
+    if ((! internal_menu) && (item->submenu())) {
+      Basemenu *tmp = (Basemenu *) item->submenu();
+
+      if (! tmp->internal_menu) {
+	delete tmp;
+      } else {
+	tmp->internal_hide();
+      }
+    }
+
+    if (item->label())
+      delete [] item->label();
+    
+    if (item->exec())
+      delete [] item->exec();
+
+    delete item;
+  }
+
+  if (which_sub == index)
+    which_sub = -1;
+  else if (which_sub > index)
+    which_sub--;
+
+  return menuitems->count();
+}
+
+
+void Basemenu::update(void) {
+  MenuStyle *style = screen->getMenuStyle();
+  if (i18n->multibyte()) {
+    menu.item_h = style->f_fontset_extents->max_ink_extent.height +
+		  menu.bevel_w;
+    menu.title_h = style->t_fontset_extents->max_ink_extent.height +
+                   (menu.bevel_w * 2);
+  } else {
+    menu.item_h = style->f_font->ascent + style->f_font->descent +
+		  menu.bevel_w;
+    menu.title_h = style->t_font->ascent + style->t_font->descent +
+		   (menu.bevel_w * 2);
+  }
+    
+  if (title_vis) {
+    const char *s = (menu.label) ? menu.label :
+		    i18n->getMessage(BasemenuSet, BasemenuOpenboxMenu,
+				     "Openbox Menu");
+    int l = strlen(s);
+    
+
+    if (i18n->multibyte()) {
+      XRectangle ink, logical;
+      XmbTextExtents(screen->getMenuStyle()->t_fontset, s, l, &ink, &logical);
+      menu.item_w = logical.width;
+    } else {
+      menu.item_w = XTextWidth(screen->getMenuStyle()->t_font, s, l);
+    }
+    
+    menu.item_w += (menu.bevel_w * 2);
+  }  else {
+    menu.item_w = 1;
+  }
+
+  int ii = 0;
+  LinkedListIterator it(menuitems);
+  for (BasemenuItem *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    const char *s = ((tmp->u && *tmp->u) ? *tmp->u :
+		     ((tmp->l) ? tmp->l : (const char *) 0));
+    int l = strlen(s);
+
+    if (i18n->multibyte()) {
+      XRectangle ink, logical;
+      XmbTextExtents(screen->getMenuStyle()->f_fontset, s, l, &ink, &logical);
+      ii = logical.width;
+    } else
+      ii = XTextWidth(screen->getMenuStyle()->f_font, s, l);
+
+    ii += (menu.bevel_w * 2) + (menu.item_h * 2);
+
+    menu.item_w = ((menu.item_w < (unsigned int) ii) ? ii : menu.item_w);
+  }
+
+  if (menuitems->count()) {
+    menu.sublevels = 1;
+
+    while (((menu.item_h * (menuitems->count() + 1) / menu.sublevels)
+	    + menu.title_h + screen->getBorderWidth()) >
+	   screen->getHeight())
+      menu.sublevels++;
+
+    if (menu.sublevels < menu.minsub) menu.sublevels = menu.minsub;
+
+    menu.persub = menuitems->count() / menu.sublevels;
+    if (menuitems->count() % menu.sublevels) menu.persub++;
+  } else {
+    menu.sublevels = 0;
+    menu.persub = 0;
+  }
+
+  menu.width = (menu.sublevels * (menu.item_w));
+  if (! menu.width) menu.width = menu.item_w;
+
+  menu.frame_h = (menu.item_h * menu.persub);
+  menu.height = ((title_vis) ? menu.title_h + screen->getBorderWidth() : 0) +
+		menu.frame_h;
+  if (! menu.frame_h) menu.frame_h = 1;
+  if (menu.height < 1) menu.height = 1;
+
+  Pixmap tmp;
+  BTexture *texture;
+  if (title_vis) {
+    tmp = menu.title_pixmap;
+    texture = &(screen->getMenuStyle()->title);
+    if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+      menu.title_pixmap = None;
+      XSetWindowBackground(display, menu.title,
+			   texture->getColor()->getPixel());
+    } else {
+      menu.title_pixmap =
+        image_ctrl->renderImage(menu.width, menu.title_h, texture);
+      XSetWindowBackgroundPixmap(display, menu.title, menu.title_pixmap);
+    }
+    if (tmp) image_ctrl->removeImage(tmp);
+    XClearWindow(display, menu.title);
+  }
+
+  tmp = menu.frame_pixmap;
+  texture = &(screen->getMenuStyle()->frame);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    menu.frame_pixmap = None;
+    XSetWindowBackground(display, menu.frame,
+			 texture->getColor()->getPixel());
+  } else {
+    menu.frame_pixmap =
+      image_ctrl->renderImage(menu.width, menu.frame_h, texture);
+    XSetWindowBackgroundPixmap(display, menu.frame, menu.frame_pixmap);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = menu.hilite_pixmap;
+  texture = &(screen->getMenuStyle()->hilite);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    menu.hilite_pixmap = None;
+  } else {
+    menu.hilite_pixmap =
+      image_ctrl->renderImage(menu.item_w, menu.item_h, texture);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = menu.sel_pixmap;
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    menu.sel_pixmap = None;
+  } else {
+    int hw = menu.item_h / 2;
+    menu.sel_pixmap =
+      image_ctrl->renderImage(hw, hw, texture);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  XResizeWindow(display, menu.window, menu.width, menu.height);
+
+  if (title_vis)
+    XResizeWindow(display, menu.title, menu.width, menu.title_h);
+
+  XMoveResizeWindow(display, menu.frame, 0,
+		    ((title_vis) ? menu.title_h +
+		     screen->getBorderWidth() : 0), menu.width,
+		    menu.frame_h);
+
+  XClearWindow(display, menu.window);
+  XClearWindow(display, menu.title);
+  XClearWindow(display, menu.frame);
+
+  if (title_vis && visible) redrawTitle();
+
+  for (int i = 0; visible && i < menuitems->count(); i++) {
+    if (i == which_sub) {
+      drawItem(i, True, 0);
+      drawSubmenu(i);
+    } else {
+      drawItem(i, False, 0);
+    }
+  }
+
+  if (parent && visible)
+    parent->drawSubmenu(parent->which_sub);
+
+  XMapSubwindows(display, menu.window);
+}
+
+
+void Basemenu::show(void) {
+  XMapSubwindows(display, menu.window);
+  XMapWindow(display, menu.window);
+  visible = True;
+
+  if (! parent) {
+    if (shown && (! shown->torn))
+       shown->hide();
+
+    shown = this;
+  }
+}
+
+
+void Basemenu::hide(void) {
+  if ((! torn) && hide_tree && parent && parent->isVisible()) {
+    Basemenu *p = parent;
+
+    while (p->isVisible() && (! p->torn) && p->parent) p = p->parent;
+    p->internal_hide();
+  } else {
+    internal_hide();
+  }
+}
+
+
+void Basemenu::internal_hide(void) {
+  if (which_sub != -1) {
+    BasemenuItem *tmp = menuitems->find(which_sub);
+    tmp->submenu()->internal_hide();
+  }
+
+  if (parent && (! torn)) {
+    parent->drawItem(parent->which_sub, False, True);
+
+    parent->which_sub = -1;
+  } else if (shown && shown->menu.window == menu.window) {
+    shown = (Basemenu *) 0;
+  }
+
+  torn = visible = False;
+  which_sub = which_press = which_sub = -1;
+
+  XUnmapWindow(display, menu.window);
+}
+
+
+void Basemenu::move(int x, int y) {
+  menu.x = x;
+  menu.y = y;
+  XMoveWindow(display, menu.window, x, y);
+  if (which_sub != -1)
+    drawSubmenu(which_sub);
+}
+
+
+void Basemenu::redrawTitle(void) {
+  char *text = (char *) ((menu.label) ? menu.label :
+			 i18n->getMessage(BasemenuSet, BasemenuOpenboxMenu,
+					  "Openbox Menu"));
+  int dx = menu.bevel_w, len = strlen(text);
+  unsigned int l;
+
+  if (i18n->multibyte()) {
+    XRectangle ink, logical;
+    XmbTextExtents(screen->getMenuStyle()->t_fontset, text, len, &ink, &logical);
+    l = logical.width;
+  } else {
+    l = XTextWidth(screen->getMenuStyle()->t_font, text, len);
+  }
+
+  l +=  (menu.bevel_w * 2);
+
+  switch (screen->getMenuStyle()->t_justify) {
+  case BScreen::RightJustify:
+    dx += menu.width - l;
+    break;
+
+  case BScreen::CenterJustify:
+    dx += (menu.width - l) / 2;
+    break;
+  }
+
+  MenuStyle *style = screen->getMenuStyle();
+  if (i18n->multibyte())
+    XmbDrawString(display, menu.title, style->t_fontset, style->t_text_gc, dx,
+		  (menu.bevel_w - style->t_fontset_extents->max_ink_extent.y),
+		  text, len);
+  else
+    XDrawString(display, menu.title, style->t_text_gc, dx,
+		(style->t_font->ascent + menu.bevel_w), text, len);
+}
+
+
+void Basemenu::drawSubmenu(int index) {
+  if (which_sub != -1 && which_sub != index) {
+    BasemenuItem *itmp = menuitems->find(which_sub);
+
+    if (! itmp->submenu()->isTorn())
+      itmp->submenu()->internal_hide();
+  }
+
+  if (index >= 0 && index < menuitems->count()) {
+    BasemenuItem *item = menuitems->find(index);
+    if (item->submenu() && visible && (! item->submenu()->isTorn()) &&
+	item->isEnabled()) {
+      if (item->submenu()->parent != this) item->submenu()->parent = this;
+      int sbl = index / menu.persub, i = index - (sbl * menu.persub),
+	    x = menu.x +
+		((menu.item_w * (sbl + 1)) + screen->getBorderWidth()), y;
+    
+      if (alignment == AlignTop)
+	y = (((shifted) ? menu.y_shift : menu.y) +
+	     ((title_vis) ? menu.title_h + screen->getBorderWidth() : 0) -
+	     ((item->submenu()->title_vis) ?
+	      item->submenu()->menu.title_h + screen->getBorderWidth() : 0));
+      else
+	y = (((shifted) ? menu.y_shift : menu.y) +
+	     (menu.item_h * i) +
+	     ((title_vis) ? menu.title_h + screen->getBorderWidth() : 0) -
+	     ((item->submenu()->title_vis) ?
+	      item->submenu()->menu.title_h + screen->getBorderWidth() : 0));
+
+      if (alignment == AlignBottom &&
+	  (y + item->submenu()->menu.height) > ((shifted) ? menu.y_shift :
+						menu.y) + menu.height)
+	y = (((shifted) ? menu.y_shift : menu.y) +
+	     menu.height - item->submenu()->menu.height);
+
+      if ((x + item->submenu()->getWidth()) > screen->getWidth()) {
+	x = ((shifted) ? menu.x_shift : menu.x) -
+	    item->submenu()->getWidth() - screen->getBorderWidth();
+      }
+      
+      if (x < 0) x = 0;
+
+      if ((y + item->submenu()->getHeight()) > screen->getHeight())
+	y = screen->getHeight() - item->submenu()->getHeight() -
+	    (screen->getBorderWidth() * 2);
+      if (y < 0) y = 0;
+      
+      item->submenu()->move(x, y);
+      if (! moving) drawItem(index, True);
+    
+      if (! item->submenu()->isVisible())
+	item->submenu()->show();
+      item->submenu()->moving = moving;
+      which_sub = index;
+    } else {
+      which_sub = -1;
+    }
+  }
+}
+
+
+Bool Basemenu::hasSubmenu(int index) {
+  if ((index >= 0) && (index < menuitems->count()))
+    if (menuitems->find(index)->submenu())
+      return True;
+
+  return False;
+}
+
+
+void Basemenu::drawItem(int index, Bool highlight, Bool clear,
+			int x, int y, unsigned int w, unsigned int h)
+{
+  if (index < 0 || index > menuitems->count()) return;
+
+  BasemenuItem *item = menuitems->find(index);
+  if (! item) return;
+  
+  Bool dotext = True, dohilite = True, dosel = True;
+  const char *text = (item->ulabel()) ? *item->ulabel() : item->label();
+  int sbl = index / menu.persub, i = index - (sbl * menu.persub);
+  int item_x = (sbl * menu.item_w), item_y = (i * menu.item_h);
+  int hilite_x = item_x, hilite_y = item_y, hoff_x = 0, hoff_y = 0;
+  int text_x = 0, text_y = 0, len = strlen(text), sel_x = 0, sel_y = 0;
+  unsigned int hilite_w = menu.item_w, hilite_h = menu.item_h, text_w = 0,
+    text_h = 0;
+  unsigned int half_w = menu.item_h / 2, quarter_w = menu.item_h / 4;
+  
+  if (text) {
+    if (i18n->multibyte()) {
+      XRectangle ink, logical;
+      XmbTextExtents(screen->getMenuStyle()->f_fontset,
+		     text, len, &ink, &logical);
+      text_w = logical.width;
+      text_y = item_y + (menu.bevel_w / 2) -
+	       screen->getMenuStyle()->f_fontset_extents->max_ink_extent.y;
+    } else {
+      text_w = XTextWidth(screen->getMenuStyle()->f_font, text, len);
+      text_y =  item_y +
+		screen->getMenuStyle()->f_font->ascent +
+		(menu.bevel_w / 2);
+    }
+    
+    switch(screen->getMenuStyle()->f_justify) {
+    case BScreen::LeftJustify:
+      text_x = item_x + menu.bevel_w + menu.item_h + 1;
+      break;
+      
+    case BScreen::RightJustify:
+      text_x = item_x + menu.item_w - (menu.item_h + menu.bevel_w + text_w);
+      break;
+      
+    case BScreen::CenterJustify:
+      text_x = item_x + ((menu.item_w + 1 - text_w) / 2);
+      break;
+    }
+    
+    text_h = menu.item_h - menu.bevel_w;
+  }
+  
+  GC gc =
+    ((highlight || item->isSelected()) ? screen->getMenuStyle()->h_text_gc :
+     screen->getMenuStyle()->f_text_gc),
+    tgc =
+    ((highlight) ? screen->getMenuStyle()->h_text_gc :
+     ((item->isEnabled()) ? screen->getMenuStyle()->f_text_gc :
+      screen->getMenuStyle()->d_text_gc));
+  
+  sel_x = item_x;
+  if (screen->getMenuStyle()->bullet_pos == Right)
+    sel_x += (menu.item_w - menu.item_h - menu.bevel_w);
+  sel_x += quarter_w;
+  sel_y = item_y + quarter_w;
+  
+  if (clear) {
+    XClearArea(display, menu.frame, item_x, item_y, menu.item_w, menu.item_h,
+	       False);
+  } else if (! (x == y && y == -1 && w == h && h == 0)) {
+    // calculate the which part of the hilite to redraw
+    if (! (max(item_x, x) <= (signed) min(item_x + menu.item_w, x + w) &&
+	   max(item_y, y) <= (signed) min(item_y + menu.item_h, y + h))) {
+      dohilite = False;
+    } else {
+      hilite_x = max(item_x, x);
+      hilite_y = max(item_y, y);
+      hilite_w = min(item_x + menu.item_w, x + w) - hilite_x;
+      hilite_h = min(item_y + menu.item_h, y + h) - hilite_y;
+      hoff_x = hilite_x % menu.item_w;
+      hoff_y = hilite_y % menu.item_h;
+    }
+    
+    // check if we need to redraw the text    
+    int text_ry = item_y + (menu.bevel_w / 2);
+    if (! (max(text_x, x) <= (signed) min(text_x + text_w, x + w) &&
+	   max(text_ry, y) <= (signed) min(text_ry + text_h, y + h)))
+      dotext = False;
+    
+    // check if we need to redraw the select pixmap/menu bullet
+    if (! (max(sel_x, x) <= (signed) min(sel_x + half_w, x + w) &&
+	   max(sel_y, y) <= (signed) min(sel_y + half_w, y + h)))
+      dosel = False;
+  }
+  
+  if (dohilite && highlight && (menu.hilite_pixmap != ParentRelative)) {
+    if (menu.hilite_pixmap)
+      XCopyArea(display, menu.hilite_pixmap, menu.frame,
+		screen->getMenuStyle()->hilite_gc, hoff_x, hoff_y,
+		hilite_w, hilite_h, hilite_x, hilite_y);
+    else
+      XFillRectangle(display, menu.frame,
+		     screen->getMenuStyle()->hilite_gc,
+		     hilite_x, hilite_y, hilite_w, hilite_h);
+  } else if (dosel && item->isSelected() &&
+	                 (menu.sel_pixmap != ParentRelative)) {
+    if (menu.sel_pixmap)
+      XCopyArea(display, menu.sel_pixmap, menu.frame,
+		screen->getMenuStyle()->hilite_gc, 0, 0,
+		half_w, half_w, sel_x, sel_y);
+    else
+      XFillRectangle(display, menu.frame,
+		     screen->getMenuStyle()->hilite_gc,
+		     sel_x, sel_y, half_w, half_w);
+  }
+  
+  if (dotext && text) {
+    if (i18n->multibyte())
+      XmbDrawString(display, menu.frame, screen->getMenuStyle()->f_fontset,
+		    tgc, text_x, text_y, text, len);
+    else
+      XDrawString(display, menu.frame, tgc, text_x, text_y, text, len);
+  }
+
+  if (dosel && item->submenu()) {
+    switch (screen->getMenuStyle()->bullet) {
+    case Square:
+      XDrawRectangle(display, menu.frame, gc, sel_x, sel_y, half_w, half_w);
+      break;
+
+    case Triangle:
+      XPoint tri[3];
+
+      if (screen->getMenuStyle()->bullet_pos == Right) {
+        tri[0].x = sel_x + quarter_w - 2;
+	tri[0].y = sel_y + quarter_w - 2;
+        tri[1].x = 4;
+	tri[1].y = 2;
+        tri[2].x = -4;
+	tri[2].y = 2;
+      } else {
+        tri[0].x = sel_x + quarter_w - 2;
+	tri[0].y = item_y + half_w;
+        tri[1].x = 4;
+	tri[1].y = 2;
+        tri[2].x = 0;
+	tri[2].y = -4;
+      }
+      
+      XFillPolygon(display, menu.frame, gc, tri, 3, Convex,
+                   CoordModePrevious);
+      break;
+      
+    case Diamond:
+      XPoint dia[4];
+
+      dia[0].x = sel_x + quarter_w - 3;
+      dia[0].y = item_y + half_w;
+      dia[1].x = 3;
+      dia[1].y = -3;
+      dia[2].x = 3;
+      dia[2].y = 3;
+      dia[3].x = -3;
+      dia[3].y = 3;
+
+      XFillPolygon(display, menu.frame, gc, dia, 4, Convex,
+                   CoordModePrevious);
+      break;
+    }
+  }
+}
+
+
+void Basemenu::setLabel(const char *l) {
+  if (menu.label)
+    delete [] menu.label;
+
+  if (l) menu.label = bstrdup(l);
+  else menu.label = 0;
+}
+
+
+void Basemenu::setItemSelected(int index, Bool sel) {
+  if (index < 0 || index >= menuitems->count()) return;
+
+  BasemenuItem *item = find(index);
+  if (! item) return;
+
+  item->setSelected(sel);
+  if (visible) drawItem(index, (index == which_sub), True);
+}
+
+
+Bool Basemenu::isItemSelected(int index) {
+  if (index < 0 || index >= menuitems->count()) return False;
+
+  BasemenuItem *item = find(index);
+  if (! item) return False;
+
+  return item->isSelected();
+}
+
+
+void Basemenu::setItemEnabled(int index, Bool enable) {
+  if (index < 0 || index >= menuitems->count()) return;
+
+  BasemenuItem *item = find(index);
+  if (! item) return;
+
+  item->setEnabled(enable);
+  if (visible) drawItem(index, (index == which_sub), True);
+}
+
+
+Bool Basemenu::isItemEnabled(int index) {
+  if (index < 0 || index >= menuitems->count()) return False;
+
+  BasemenuItem *item = find(index);
+  if (! item) return False;
+
+  return item->isEnabled();
+}
+
+
+void Basemenu::buttonPressEvent(XButtonEvent *be) {
+  if (be->window == menu.frame) {
+    int sbl = (be->x / menu.item_w), i = (be->y / menu.item_h);
+    int w = (sbl * menu.persub) + i;
+
+    if (w < menuitems->count() && w >= 0) {
+      which_press = i;
+      which_sbl = sbl;
+
+      BasemenuItem *item = menuitems->find(w);
+
+      if (item->submenu())
+	drawSubmenu(w);
+      else
+	drawItem(w, (item->isEnabled()), True);
+    }
+  } else {
+    menu.x_move = be->x_root - menu.x;
+    menu.y_move = be->y_root - menu.y;
+  }
+}
+
+
+void Basemenu::buttonReleaseEvent(XButtonEvent *re) {
+  if (re->window == menu.title) {
+    if (moving) {
+      moving = False;
+      
+      if (which_sub != -1)
+	drawSubmenu(which_sub);
+    }
+    
+    if (re->x >= 0 && re->x <= (signed) menu.width &&
+	re->y >= 0 && re->y <= (signed) menu.title_h)
+      if (re->button == 3)
+	hide();
+  } else if (re->window == menu.frame &&
+	     re->x >= 0 && re->x < (signed) menu.width &&
+	     re->y >= 0 && re->y < (signed) menu.frame_h) {
+    if (re->button == 3) {
+      hide();
+    } else {
+      int sbl = (re->x / menu.item_w), i = (re->y / menu.item_h),
+	   ix = sbl * menu.item_w, iy = i * menu.item_h,
+	    w = (sbl * menu.persub) + i,
+	    p = (which_sbl * menu.persub) + which_press;
+
+      if (w < menuitems->count() && w >= 0) {
+	drawItem(p, (p == which_sub), True);
+
+        if  (p == w && isItemEnabled(w)) {
+	  if (re->x > ix && re->x < (signed) (ix + menu.item_w) &&
+	      re->y > iy && re->y < (signed) (iy + menu.item_h)) {
+	    itemSelected(re->button, w);
+	  }
+        }
+      } else
+        drawItem(p, False, True);
+    }
+  }
+}
+
+
+void Basemenu::motionNotifyEvent(XMotionEvent *me) {
+  if (me->window == menu.title && (me->state & Button1Mask)) {
+    if (movable) {
+      if (! moving) {
+	if (parent && (! torn)) {
+	  parent->drawItem(parent->which_sub, False, True);
+	  parent->which_sub = -1;
+	}
+
+        moving = torn = True;
+
+	if (which_sub != -1)
+	  drawSubmenu(which_sub);
+      } else {
+	menu.x = me->x_root - menu.x_move,
+	menu.y = me->y_root - menu.y_move;
+	
+	XMoveWindow(display, menu.window, menu.x, menu.y);
+	  
+	if (which_sub != -1)
+	  drawSubmenu(which_sub);
+      }
+    }
+  } else if ((! (me->state & Button1Mask)) && me->window == menu.frame &&
+	     me->x >= 0 && me->x < (signed) menu.width &&
+	     me->y >= 0 && me->y < (signed) menu.frame_h) {
+    int sbl = (me->x / menu.item_w), i = (me->y / menu.item_h),
+	  w = (sbl * menu.persub) + i;
+
+    if ((i != which_press || sbl != which_sbl) &&
+	(w < menuitems->count() && w >= 0)) {
+      if (which_press != -1 && which_sbl != -1) {
+	int p = (which_sbl * menu.persub) + which_press;
+	BasemenuItem *item = menuitems->find(p);
+
+	drawItem(p, False, True);
+	if (item->submenu())
+	  if (item->submenu()->isVisible() &&
+	      (! item->submenu()->isTorn())) {
+	    item->submenu()->internal_hide();
+	    which_sub = -1;
+	  }
+      }
+
+      which_press = i;
+      which_sbl = sbl;
+
+      BasemenuItem *itmp = menuitems->find(w);
+
+      if (itmp->submenu())
+	drawSubmenu(w);
+      else
+	drawItem(w, (itmp->isEnabled()), True);
+    }
+  }
+}
+
+
+void Basemenu::exposeEvent(XExposeEvent *ee) {
+  if (ee->window == menu.title) {
+    redrawTitle();
+  } else if (ee->window == menu.frame) {
+    // this is a compilicated algorithm... lets do it step by step...
+    // first... we see in which sub level the expose starts... and how many
+    // items down in that sublevel
+
+    int sbl = (ee->x / menu.item_w), id = (ee->y / menu.item_h),
+      // next... figure out how many sublevels over the redraw spans
+      sbl_d = ((ee->x + ee->width) / menu.item_w),
+      // then we see how many items down to redraw
+      id_d = ((ee->y + ee->height) / menu.item_h);
+
+    if (id_d > menu.persub) id_d = menu.persub;
+
+    // draw the sublevels and the number of items the exposure spans
+    LinkedListIterator it(menuitems);
+    int i, ii;
+    for (i = sbl; i <= sbl_d; i++) {
+      // set the iterator to the first item in the sublevel needing redrawing
+      it.set(id + (i * menu.persub));
+      for (ii = id; ii <= id_d && it.current(); it++, ii++) {
+	int index = ii + (i * menu.persub);
+	// redraw the item
+	drawItem(index, (which_sub == index), False,
+		 ee->x, ee->y, ee->width, ee->height);
+      }
+    }
+  }
+}
+
+
+void Basemenu::enterNotifyEvent(XCrossingEvent *ce) {
+  if (ce->window == menu.frame) {
+    menu.x_shift = menu.x, menu.y_shift = menu.y;
+    if (menu.x + menu.width > screen->getWidth()) {
+      menu.x_shift = screen->getWidth() - menu.width -
+        screen->getBorderWidth();
+      shifted = True;
+    } else if (menu.x < 0) {
+      menu.x_shift = -screen->getBorderWidth();
+      shifted = True;
+    }
+
+    if (menu.y + menu.height > screen->getHeight()) {
+      menu.y_shift = screen->getHeight() - menu.height -
+        screen->getBorderWidth();
+      shifted = True;
+    } else if (menu.y + (signed) menu.title_h < 0) {
+      menu.y_shift = -screen->getBorderWidth();
+      shifted = True;
+    }
+
+    if (shifted)
+      XMoveWindow(display, menu.window, menu.x_shift, menu.y_shift);
+
+    if (which_sub != -1) {
+      BasemenuItem *tmp = menuitems->find(which_sub);
+      if (tmp->submenu()->isVisible()) {
+	int sbl = (ce->x / menu.item_w), i = (ce->y / menu.item_h),
+	  w = (sbl * menu.persub) + i;
+
+	if (w != which_sub && (! tmp->submenu()->isTorn())) {
+	  tmp->submenu()->internal_hide();
+
+	  drawItem(which_sub, False, True);
+	  which_sub = -1;
+	}
+      }
+    }
+  }
+}
+
+
+void Basemenu::leaveNotifyEvent(XCrossingEvent *ce) {
+  if (ce->window == menu.frame) {
+    if (which_press != -1 && which_sbl != -1 && menuitems->count() > 0) {
+      int p = (which_sbl * menu.persub) + which_press;
+
+      drawItem(p, (p == which_sub), True);
+
+      which_sbl = which_press = -1;
+    }
+
+    if (shifted) {
+      XMoveWindow(display, menu.window, menu.x, menu.y);
+      shifted = False;
+
+      if (which_sub != -1) drawSubmenu(which_sub);
+    }
+  }
+}
+
+
+void Basemenu::reconfigure(void) {
+  XSetWindowBackground(display, menu.window,
+		       screen->getBorderColor()->getPixel());
+  XSetWindowBorder(display, menu.window,
+		   screen->getBorderColor()->getPixel());
+  XSetWindowBorderWidth(display, menu.window, screen->getBorderWidth());
+
+  menu.bevel_w = screen->getBevelWidth();
+  update();
+}
diff --git a/src/Basemenu.h b/src/Basemenu.h
new file mode 100644
index 00000000..ba28404c
--- /dev/null
+++ b/src/Basemenu.h
@@ -0,0 +1,170 @@
+// Basemenu.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Basemenu_hh
+#define   __Basemenu_hh
+
+#include 
+
+class Openbox;
+class BImageControl;
+class BScreen;
+class Basemenu;
+class BasemenuItem;
+#include "LinkedList.h"
+
+
+class Basemenu {
+private:
+  LinkedList *menuitems;
+  Openbox *openbox;
+  Basemenu *parent;
+  BImageControl *image_ctrl;
+  BScreen *screen;
+
+  Bool moving, visible, movable, torn, internal_menu, title_vis, shifted,
+    hide_tree;
+  Display *display;
+  int which_sub, which_press, which_sbl, alignment;
+
+  struct _menu {
+    Pixmap frame_pixmap, title_pixmap, hilite_pixmap, sel_pixmap;
+    Window window, frame, title;
+
+    char *label;
+    int x, y, x_move, y_move, x_shift, y_shift, sublevels, persub, minsub,
+      grab_x, grab_y;
+    unsigned int width, height, title_h, frame_h, item_w, item_h, bevel_w,
+      bevel_h;
+  } menu;
+
+
+protected:
+  inline BasemenuItem *find(int index) { return menuitems->find(index); }
+  inline void setTitleVisibility(Bool b) { title_vis = b; }
+  inline void setMovable(Bool b) { movable = b; }
+  inline void setHideTree(Bool h) { hide_tree = h; }
+  inline void setMinimumSublevels(int m) { menu.minsub = m; }
+
+  virtual void itemSelected(int, int) = 0;
+  virtual void drawItem(int, Bool = False, Bool = False,
+			int = -1, int = -1, unsigned int = 0,
+			unsigned int = 0);
+  virtual void redrawTitle();
+  virtual void internal_hide(void);
+
+
+public:
+  Basemenu(BScreen *);
+  virtual ~Basemenu(void);
+
+  inline const Bool &isTorn(void) const { return torn; }
+  inline const Bool &isVisible(void) const { return visible; }
+
+  inline BScreen *getScreen(void) { return screen; }
+
+  inline const Window &getWindowID(void) const { return menu.window; }
+
+  inline const char *getLabel(void) const { return menu.label; }
+
+  int insert(const char *, int = 0, const char * = (const char *) 0, int = -1);
+  int insert(const char **, int = -1, int = 0);
+  int insert(const char *, Basemenu *, int = -1);
+  int remove(int);
+
+  inline const int &getX(void) const { return menu.x; }
+  inline const int &getY(void) const { return menu.y; }
+  inline int getCount(void) { return menuitems->count(); }
+  inline const int &getCurrentSubmenu(void) const { return which_sub; }
+
+  inline const unsigned int &getWidth(void) const { return menu.width; }
+  inline const unsigned int &getHeight(void) const { return menu.height; }
+  inline const unsigned int &getTitleHeight(void) const
+  { return menu.title_h; }
+
+  inline void setInternalMenu(void) { internal_menu = True; }
+  inline void setAlignment(int a) { alignment = a; }
+  inline void setTorn(void) { torn = True; }
+  inline void removeParent(void)
+    { if (internal_menu) parent = (Basemenu *) 0; }
+
+  Bool hasSubmenu(int);
+  Bool isItemSelected(int);
+  Bool isItemEnabled(int);
+
+  void buttonPressEvent(XButtonEvent *);
+  void buttonReleaseEvent(XButtonEvent *);
+  void motionNotifyEvent(XMotionEvent *);
+  void enterNotifyEvent(XCrossingEvent *);
+  void leaveNotifyEvent(XCrossingEvent *);
+  void exposeEvent(XExposeEvent *);
+  void reconfigure(void);
+  void setLabel(const char *n);
+  void move(int, int);
+  void update(void);
+  void setItemSelected(int, Bool);
+  void setItemEnabled(int, Bool);
+
+  virtual void drawSubmenu(int);
+  virtual void show(void);
+  virtual void hide(void);
+
+  enum { AlignDontCare = 1, AlignTop, AlignBottom };
+  enum { Right = 1, Left };
+  enum { Empty = 0, Square, Triangle, Diamond };
+};
+
+
+class BasemenuItem {
+private:
+  Basemenu *s;
+  const char **u, *l, *e;
+  int f, enabled, selected;
+
+  friend class Basemenu;
+
+protected:
+
+public:
+  BasemenuItem(const char *lp, int fp, const char *ep = (const char *) 0):
+    s(0), u(0), l(lp), e(ep), f(fp), enabled(1), selected(0) {}
+
+  BasemenuItem(const char *lp, Basemenu *mp): s(mp), u(0), l(lp), e(0), f(0),
+					      enabled(1), selected(0) {}
+
+  BasemenuItem(const char **up, int fp): s(0), u(up), l(0), e(0), f(fp),
+					 enabled(1), selected(0) {}
+
+  inline const char *exec(void) const { return e; }
+  inline const char *label(void) const { return l; }
+  inline const char **ulabel(void) const { return u; }
+  inline const int &function(void) const { return f; }
+  inline Basemenu *submenu(void) { return s; }
+
+  inline const int &isEnabled(void) const { return enabled; }
+  inline void setEnabled(int e) { enabled = e; }
+  inline const int &isSelected(void) const { return selected; }
+  inline void setSelected(int s) { selected = s; }
+};
+
+
+#endif // __Basemenu_hh
diff --git a/src/Clientmenu.cc b/src/Clientmenu.cc
new file mode 100644
index 00000000..2191f2a5
--- /dev/null
+++ b/src/Clientmenu.cc
@@ -0,0 +1,64 @@
+// Clientmenu.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "openbox.h"
+#include "Clientmenu.h"
+#include "Screen.h"
+#include "Window.h"
+#include "Workspace.h"
+#include "Workspacemenu.h"
+
+
+Clientmenu::Clientmenu(Workspace *ws) : Basemenu(ws->getScreen()) {
+  wkspc = ws;
+  screen = wkspc->getScreen();
+
+  setInternalMenu();
+}
+
+
+void Clientmenu::itemSelected(int button, int index) {
+  if (button > 2) return;
+
+  OpenboxWindow *win = wkspc->getWindow(index);
+  if (win) {
+    if (button == 1) {
+      if (! wkspc->isCurrent()) wkspc->setCurrent();
+    } else if (button == 2) {
+      if (! wkspc->isCurrent()) win->deiconify(True, False);
+    }
+    wkspc->raiseWindow(win);
+    win->setInputFocus();
+  }
+
+  if (! (screen->getWorkspacemenu()->isTorn() || isTorn())) hide();
+}
diff --git a/src/Clientmenu.h b/src/Clientmenu.h
new file mode 100644
index 00000000..3b9792e1
--- /dev/null
+++ b/src/Clientmenu.h
@@ -0,0 +1,44 @@
+// Clientmenu.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Clientmenu_hh
+#define   __Clientmenu_hh
+
+#include "Basemenu.h"
+class Workspace;
+class BScreen;
+
+class Clientmenu : public Basemenu {
+private:
+  BScreen *screen;
+  Workspace *wkspc;
+
+protected:
+  virtual void itemSelected(int, int);
+
+public:
+  Clientmenu(Workspace *);
+};
+
+
+#endif // __Clientmenu_hh
+
diff --git a/src/Configmenu.cc b/src/Configmenu.cc
new file mode 100644
index 00000000..97faf779
--- /dev/null
+++ b/src/Configmenu.cc
@@ -0,0 +1,323 @@
+// Configmenu.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#  define _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+# include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "i18n.h"
+#include "Configmenu.h"
+#include "Toolbar.h"
+#include "Window.h"
+#include "Screen.h"
+
+Configmenu::Configmenu(BScreen *scr) : Basemenu(scr) {
+  screen = scr;
+  openbox = screen->getOpenbox();
+  setLabel(i18n->getMessage(ConfigmenuSet, ConfigmenuConfigOptions,
+			    "Config options"));
+  setInternalMenu();
+
+  focusmenu = new Focusmenu(this);
+  placementmenu = new Placementmenu(this);
+
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuFocusModel,
+			  "Focus Model"), focusmenu);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuWindowPlacement,
+			  "Window Placement"), placementmenu);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuImageDithering,
+			  "Image Dithering"), 1);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuOpaqueMove,
+			  "Opaque Window Moving"), 2);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuFullMax,
+			  "Full Maximization"), 3);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuFocusNew,
+			  "Focus New Windows"), 4);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuFocusLast,
+			  "Focus Last Window on Workspace"), 5);
+  update();
+
+  setItemSelected(2, screen->getImageControl()->doDither());
+  setItemSelected(3, screen->doOpaqueMove());
+  setItemSelected(4, screen->doFullMax());
+  setItemSelected(5, screen->doFocusNew());
+  setItemSelected(6, screen->doFocusLast());
+}
+
+Configmenu::~Configmenu(void) {
+  delete focusmenu;
+  delete placementmenu;
+}
+
+void Configmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+
+  if (!item->function())
+    return;
+
+  switch(item->function()) {
+  case 1: { // dither
+    screen->getImageControl()->
+      setDither((! screen->getImageControl()->doDither()));
+
+    setItemSelected(index, screen->getImageControl()->doDither());
+
+    break;
+  }
+
+  case 2: { // opaque move
+    screen->saveOpaqueMove((! screen->doOpaqueMove()));
+
+    setItemSelected(index, screen->doOpaqueMove());
+
+    break;
+  }
+
+  case 3: { // full maximization
+    screen->saveFullMax((! screen->doFullMax()));
+
+    setItemSelected(index, screen->doFullMax());
+
+    break;
+  }
+  case 4: { // focus new windows
+    screen->saveFocusNew((! screen->doFocusNew()));
+
+    setItemSelected(index, screen->doFocusNew());
+    break;
+  }
+
+  case 5: { // focus last window on workspace
+    screen->saveFocusLast((! screen->doFocusLast()));
+    setItemSelected(index, screen->doFocusLast());
+    break;
+  }
+  } // switch
+}
+
+void Configmenu::reconfigure(void) {
+  focusmenu->reconfigure();
+  placementmenu->reconfigure();
+
+  Basemenu::reconfigure();
+}
+
+Configmenu::Focusmenu::Focusmenu(Configmenu *cm) : Basemenu(cm->screen) {
+  configmenu = cm;
+
+  setLabel(i18n->getMessage(ConfigmenuSet, ConfigmenuFocusModel,
+			    "Focus Model"));
+  setInternalMenu();
+
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuClickToFocus,
+			  "Click To Focus"), 1);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuSloppyFocus,
+			  "Sloppy Focus"), 2);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuAutoRaise,
+			  "Auto Raise"), 3);
+  update();
+
+  setItemSelected(0, (! configmenu->screen->isSloppyFocus()));
+  setItemSelected(1, configmenu->screen->isSloppyFocus());
+  setItemEnabled(2, configmenu->screen->isSloppyFocus());
+  setItemSelected(2, configmenu->screen->doAutoRaise());
+}
+
+void Configmenu::Focusmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+
+  if (!item->function())
+    return;
+
+  switch (item->function()) {
+  case 1: // click to focus
+    configmenu->screen->saveSloppyFocus(False);
+    configmenu->screen->saveAutoRaise(False);
+
+    if (! configmenu->screen->getOpenbox()->getFocusedWindow())
+      XSetInputFocus(configmenu->screen->getOpenbox()->getXDisplay(),
+		     configmenu->screen->getToolbar()->getWindowID(),
+		     RevertToParent, CurrentTime);
+    else
+      XSetInputFocus(configmenu->screen->getOpenbox()->getXDisplay(),
+		     configmenu->screen->getOpenbox()->
+		     getFocusedWindow()->getClientWindow(),
+		     RevertToParent, CurrentTime);
+
+    configmenu->screen->reconfigure();
+
+    break;
+
+  case 2: // sloppy focus
+    configmenu->screen->saveSloppyFocus(True);
+
+    configmenu->screen->reconfigure();
+
+    break;
+
+  case 3: // auto raise with sloppy focus
+    Bool change = ((configmenu->screen->doAutoRaise()) ? False : True);
+    configmenu->screen->saveAutoRaise(change);
+
+    break;
+  }
+
+  setItemSelected(0, (! configmenu->screen->isSloppyFocus()));
+  setItemSelected(1, configmenu->screen->isSloppyFocus());
+  setItemEnabled(2, configmenu->screen->isSloppyFocus());
+  setItemSelected(2, configmenu->screen->doAutoRaise());
+}
+
+Configmenu::Placementmenu::Placementmenu(Configmenu *cm) :
+ Basemenu(cm->screen) {
+  configmenu = cm;
+
+  setLabel(i18n->getMessage(ConfigmenuSet, ConfigmenuWindowPlacement,
+			    "Window Placement"));
+  setInternalMenu();
+
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuSmartRows,
+			  "Smart Placement (Rows)"),
+	 BScreen::RowSmartPlacement);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuSmartCols,
+			  "Smart Placement (Columns)"),
+	 BScreen::ColSmartPlacement);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuCascade,
+			  "Cascade Placement"), BScreen::CascadePlacement);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuLeftRight,
+			  "Left to Right"), BScreen::LeftRight);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuRightLeft,
+			  "Right to Left"), BScreen::RightLeft);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuTopBottom,
+			  "Top to Bottom"), BScreen::TopBottom);
+  insert(i18n->getMessage(ConfigmenuSet, ConfigmenuBottomTop,
+			  "Bottom to Top"), BScreen::BottomTop);
+  update();
+
+  switch (configmenu->screen->getPlacementPolicy()) {
+  case BScreen::RowSmartPlacement:
+    setItemSelected(0, True);
+    break;
+
+  case BScreen::ColSmartPlacement:
+    setItemSelected(1, True);
+    break;
+
+  case BScreen::CascadePlacement:
+    setItemSelected(2, True);
+    break;
+  }
+
+  Bool rl = (configmenu->screen->getRowPlacementDirection() ==
+	     BScreen::LeftRight),
+       tb = (configmenu->screen->getColPlacementDirection() ==
+	     BScreen::TopBottom);
+
+  setItemSelected(3, rl);
+  setItemSelected(4, ! rl);
+
+  setItemSelected(5, tb);
+  setItemSelected(6, ! tb);
+}
+
+void Configmenu::Placementmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+
+  if (!item->function())
+    return;
+
+  switch (item->function()) {
+  case BScreen::RowSmartPlacement:
+    configmenu->screen->savePlacementPolicy(item->function());
+
+    setItemSelected(0, True);
+    setItemSelected(1, False);
+    setItemSelected(2, False);
+
+    break;
+
+  case BScreen::ColSmartPlacement:
+    configmenu->screen->savePlacementPolicy(item->function());
+
+    setItemSelected(0, False);
+    setItemSelected(1, True);
+    setItemSelected(2, False);
+
+    break;
+
+  case BScreen::CascadePlacement:
+    configmenu->screen->savePlacementPolicy(item->function());
+
+    setItemSelected(0, False);
+    setItemSelected(1, False);
+    setItemSelected(2, True);
+
+    break;
+
+  case BScreen::LeftRight:
+    configmenu->screen->saveRowPlacementDirection(BScreen::LeftRight);
+
+    setItemSelected(3, True);
+    setItemSelected(4, False);
+
+    break;
+
+  case BScreen::RightLeft:
+    configmenu->screen->saveRowPlacementDirection(BScreen::RightLeft);
+
+    setItemSelected(3, False);
+    setItemSelected(4, True);
+
+    break;
+
+  case BScreen::TopBottom:
+    configmenu->screen->saveColPlacementDirection(BScreen::TopBottom);
+
+    setItemSelected(5, True);
+    setItemSelected(6, False);
+
+    break;
+
+  case BScreen::BottomTop:
+    configmenu->screen->saveColPlacementDirection(BScreen::BottomTop);
+
+    setItemSelected(5, False);
+    setItemSelected(6, True);
+
+    break;
+  }
+}
diff --git a/src/Configmenu.h b/src/Configmenu.h
new file mode 100644
index 00000000..c9d8f805
--- /dev/null
+++ b/src/Configmenu.h
@@ -0,0 +1,78 @@
+// Configmenu.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Configmenu_hh
+#define   __Configmenu_hh
+
+#include "Basemenu.h"
+
+// forward declaration
+class Openbox;
+class BScreen;
+class Configmenu;
+
+class Configmenu : public Basemenu {
+private:
+  class Focusmenu : public Basemenu {
+  private:
+    Configmenu *configmenu;
+
+  protected:
+    virtual void itemSelected(int, int);
+
+  public:
+    Focusmenu(Configmenu *);
+  };
+
+  class Placementmenu : public Basemenu {
+  private:
+    Configmenu *configmenu;
+
+  protected:
+    virtual void itemSelected(int, int);
+
+  public:
+    Placementmenu(Configmenu *);
+  };
+
+  Openbox *openbox;
+  BScreen *screen;
+  Focusmenu *focusmenu;
+  Placementmenu *placementmenu;
+
+  friend class Focusmenu;
+  friend class Placementmenu;
+
+protected:
+  virtual void itemSelected(int, int);
+
+public:
+  Configmenu(BScreen *);
+  virtual ~Configmenu(void);
+
+  inline Basemenu *getFocusmenu(void) { return focusmenu; }
+  inline Basemenu *getPlacementmenu(void) { return placementmenu; }
+
+  void reconfigure(void);
+};
+
+#endif // __Configmenu_hh
diff --git a/src/Iconmenu.cc b/src/Iconmenu.cc
new file mode 100644
index 00000000..32ae67a4
--- /dev/null
+++ b/src/Iconmenu.cc
@@ -0,0 +1,64 @@
+// Icon.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "i18n.h"
+#include "Iconmenu.h"
+#include "Screen.h"
+#include "Window.h"
+
+
+Iconmenu::Iconmenu(BScreen *scrn) : Basemenu(scrn) {
+  setInternalMenu();
+
+  screen = scrn;
+
+  setLabel(i18n->getMessage(IconSet, IconIcons, "Icons"));
+  update();
+}
+
+
+void Iconmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  if (index >= 0 && index < screen->getIconCount()) {
+    OpenboxWindow *win = screen->getIcon(index);
+
+    if (win) {
+      win->deiconify();
+      win->setInputFocus();
+    }
+  }
+
+  if (! (screen->getWorkspacemenu()->isTorn() || isTorn()))
+    hide();
+}
diff --git a/src/Iconmenu.h b/src/Iconmenu.h
new file mode 100644
index 00000000..ca1b103d
--- /dev/null
+++ b/src/Iconmenu.h
@@ -0,0 +1,44 @@
+// Icon.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Icon_hh
+#define   __Icon_hh
+
+#include "Basemenu.h"
+
+// forward declaration
+class Iconmenu;
+class BScreen;
+
+class Iconmenu : public Basemenu {
+private:
+  BScreen *screen;
+
+protected:
+  virtual void itemSelected(int, int);
+
+public:
+  Iconmenu(BScreen *);
+};
+
+
+#endif // __Icon_hh
diff --git a/src/Image.cc b/src/Image.cc
new file mode 100644
index 00000000..d42d1d12
--- /dev/null
+++ b/src/Image.cc
@@ -0,0 +1,2444 @@
+// Image.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "i18n.h"
+#include "BaseDisplay.h"
+#include "Image.h"
+
+#ifdef    HAVE_SYS_TYPES_H
+#  include 
+#endif // HAVE_SYS_TYPES_H
+
+#ifndef u_int32_t
+#  ifdef uint_32_t
+typedef uint32_t u_int32_t;
+#  else
+#    ifdef __uint32_t
+typedef __uint32_t u_int32_t;
+#    else
+typedef unsigned int u_int32_t;
+#    endif
+#  endif
+#endif
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#ifdef    HAVE_CTYPE_H
+#  include 
+#endif // HAVE_CTYPE_H
+
+#include 
+using namespace std;
+
+static unsigned long bsqrt(unsigned long x) {
+  if (x <= 0) return 0;
+  if (x == 1) return 1;
+
+  unsigned long r = x >> 1;
+  unsigned long q;
+
+  while (1) {
+    q = x / r;
+    if (q >= r) return r;
+    r = (r + q) >> 1;
+  }
+}
+
+
+BImage::BImage(BImageControl *c, unsigned int w, unsigned int h) {
+  control = c;
+
+  width = ((signed) w > 0) ? w : 1;
+  height = ((signed) h > 0) ? h : 1;
+
+  red = new unsigned char[width * height];
+  green = new unsigned char[width * height];
+  blue = new unsigned char[width * height];
+
+  xtable = ytable = (unsigned int *) 0;
+
+  cpc = control->getColorsPerChannel();
+  cpccpc = cpc * cpc;
+
+  control->getColorTables(&red_table, &green_table, &blue_table,
+                          &red_offset, &green_offset, &blue_offset,
+                          &red_bits, &green_bits, &blue_bits);
+
+  if (control->getVisual()->c_class != TrueColor)
+    control->getXColorTable(&colors, &ncolors);
+}
+
+
+BImage::~BImage(void) {
+  if (red) delete [] red;
+  if (green) delete [] green;
+  if (blue) delete [] blue;
+}
+
+
+Pixmap BImage::render(BTexture *texture) {
+  if (texture->getTexture() & BImage_ParentRelative)
+    return ParentRelative;
+  else if (texture->getTexture() & BImage_Solid)
+    return render_solid(texture);
+  else if (texture->getTexture() & BImage_Gradient)
+    return render_gradient(texture);
+
+  return None;
+}
+
+
+Pixmap BImage::render_solid(BTexture *texture) {
+  Pixmap pixmap = XCreatePixmap(control->getBaseDisplay()->getXDisplay(),
+				control->getDrawable(), width,
+				height, control->getDepth());
+  if (pixmap == None) {
+    fprintf(stderr, i18n->getMessage(ImageSet, ImageErrorCreatingSolidPixmap,
+		       "BImage::render_solid: error creating pixmap\n"));
+    return None;
+  }
+
+  XGCValues gcv;
+  GC gc, hgc, lgc;
+
+  gcv.foreground = texture->getColor()->getPixel();
+  gcv.fill_style = FillSolid;
+  gc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap,
+		 GCForeground | GCFillStyle, &gcv);
+
+  gcv.foreground = texture->getHiColor()->getPixel();
+  hgc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap,
+		  GCForeground, &gcv);
+
+  gcv.foreground = texture->getLoColor()->getPixel();
+  lgc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap,
+		  GCForeground, &gcv);
+
+  XFillRectangle(control->getBaseDisplay()->getXDisplay(), pixmap, gc, 0, 0,
+		 width, height);
+
+#ifdef    INTERLACE
+  if (texture->getTexture() & BImage_Interlaced) {
+    gcv.foreground = texture->getColorTo()->getPixel();
+    GC igc = XCreateGC(control->getBaseDisplay()->getXDisplay(), pixmap,
+		       GCForeground, &gcv);
+
+    register unsigned int i = 0;
+    for (; i < height; i += 2)
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, igc,
+		0, i, width, i);
+
+    XFreeGC(control->getBaseDisplay()->getXDisplay(), igc);
+  }
+#endif // INTERLACE
+
+
+  if (texture->getTexture() & BImage_Bevel1) {
+    if (texture->getTexture() & BImage_Raised) {
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc,
+                0, height - 1, width - 1, height - 1);
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc,
+                width - 1, height - 1, width - 1, 0);
+
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc,
+                0, 0, width - 1, 0);
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc,
+                0, height - 1, 0, 0);
+    } else if (texture->getTexture() & BImage_Sunken) {
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc,
+                0, height - 1, width - 1, height - 1);
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc,
+                width - 1, height - 1, width - 1, 0);
+
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc,
+                0, 0, width - 1, 0);
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc,
+                0, height - 1, 0, 0);
+    }
+  } else if (texture->getTexture() & BImage_Bevel2) {
+    if (texture->getTexture() & BImage_Raised) {
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc,
+                1, height - 3, width - 3, height - 3);
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc,
+                width - 3, height - 3, width - 3, 1);
+
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc,
+                1, 1, width - 3, 1);
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc,
+                1, height - 3, 1, 1);
+    } else if (texture->getTexture() & BImage_Sunken) {
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc,
+                1, height - 3, width - 3, height - 3);
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, hgc,
+                width - 3, height - 3, width - 3, 1);
+
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc,
+                1, 1, width - 3, 1);
+      XDrawLine(control->getBaseDisplay()->getXDisplay(), pixmap, lgc,
+                1, height - 3, 1, 1);
+    }
+  }
+
+  XFreeGC(control->getBaseDisplay()->getXDisplay(), gc);
+  XFreeGC(control->getBaseDisplay()->getXDisplay(), hgc);
+  XFreeGC(control->getBaseDisplay()->getXDisplay(), lgc);
+
+  return pixmap;
+}
+
+
+Pixmap BImage::render_gradient(BTexture *texture) {
+ int inverted = 0;
+
+#ifdef    INTERLACE
+  interlaced = texture->getTexture() & BImage_Interlaced;
+#endif // INTERLACE
+
+  if (texture->getTexture() & BImage_Sunken) {
+    from = texture->getColorTo();
+    to = texture->getColor();
+
+    if (! (texture->getTexture() & BImage_Invert)) inverted = 1;
+  } else {
+    from = texture->getColor();
+    to = texture->getColorTo();
+
+    if (texture->getTexture() & BImage_Invert) inverted = 1;
+  }
+
+  control->getGradientBuffers(width, height, &xtable, &ytable);
+
+  if (texture->getTexture() & BImage_Diagonal) dgradient();
+  else if (texture->getTexture() & BImage_Elliptic) egradient();
+  else if (texture->getTexture() & BImage_Horizontal) hgradient();
+  else if (texture->getTexture() & BImage_Pyramid) pgradient();
+  else if (texture->getTexture() & BImage_Rectangle) rgradient();
+  else if (texture->getTexture() & BImage_Vertical) vgradient();
+  else if (texture->getTexture() & BImage_CrossDiagonal) cdgradient();
+  else if (texture->getTexture() & BImage_PipeCross) pcgradient();
+
+  if (texture->getTexture() & BImage_Bevel1) bevel1();
+  else if (texture->getTexture() & BImage_Bevel2) bevel2();
+
+  if (inverted) invert();
+
+  Pixmap pixmap = renderPixmap();
+
+  return pixmap;
+
+}
+
+
+XImage *BImage::renderXImage(void) {
+  XImage *image =
+    XCreateImage(control->getBaseDisplay()->getXDisplay(),
+                 control->getVisual(), control->getDepth(), ZPixmap, 0, 0,
+                 width, height, 32, 0);
+
+  if (! image) {
+    fprintf(stderr, i18n->getMessage(ImageSet, ImageErrorCreatingXImage,
+		       "BImage::renderXImage: error creating XImage\n"));
+    return (XImage *) 0;
+  }
+
+  // insurance policy
+  image->data = (char *) 0;
+
+  unsigned char *d = new unsigned char[image->bytes_per_line * (height + 1)];
+  register unsigned int x, y, dithx, dithy, r, g, b, o, er, eg, eb, offset;
+
+  unsigned char *pixel_data = d, *ppixel_data = d;
+  unsigned long pixel;
+
+  o = image->bits_per_pixel + ((image->byte_order == MSBFirst) ? 1 : 0);
+
+  if (control->doDither() && width > 1 && height > 1) {
+    unsigned char dither4[4][4] = { {0, 4, 1, 5},
+                                    {6, 2, 7, 3},
+                                    {1, 5, 0, 4},
+                                    {7, 3, 6, 2} };
+
+#ifdef    ORDEREDPSEUDO
+    unsigned char dither8[8][8] = { { 0,  32, 8,  40, 2,  34, 10, 42 },
+                                    { 48, 16, 56, 24, 50, 18, 58, 26 },
+                                    { 12, 44, 4,  36, 14, 46, 6,  38 },
+                                    { 60, 28, 52, 20, 62, 30, 54, 22 },
+                                    { 3,  35, 11, 43, 1,  33, 9,  41 },
+                                    { 51, 19, 59, 27, 49, 17, 57, 25 },
+                                    { 15, 47, 7,  39, 13, 45, 5,  37 },
+                                    { 63, 31, 55, 23, 61, 29, 53, 21 } };
+#endif // ORDEREDPSEUDO
+
+    switch (control->getVisual()->c_class) {
+    case TrueColor:
+      // algorithm: ordered dithering... many many thanks to rasterman
+      // (raster@rasterman.com) for telling me about this... portions of this
+      // code is based off of his code in Imlib
+      for (y = 0, offset = 0; y < height; y++) {
+	dithy = y & 0x3;
+
+	for (x = 0; x < width; x++, offset++) {
+          dithx = x & 0x3;
+          r = red[offset];
+          g = green[offset];
+          b = blue[offset];
+
+          er = r & (red_bits - 1);
+          eg = g & (green_bits - 1);
+          eb = b & (blue_bits - 1);
+
+          r = red_table[r];
+          g = green_table[g];
+          b = blue_table[b];
+
+          if ((dither4[dithy][dithx] < er) && (r < red_table[255])) r++;
+          if ((dither4[dithy][dithx] < eg) && (g < green_table[255])) g++;
+          if ((dither4[dithy][dithx] < eb) && (b < blue_table[255])) b++;
+
+	  pixel = (r << red_offset) | (g << green_offset) | (b << blue_offset);
+
+          switch (o) {
+	  case  8: //  8bpp
+	    *pixel_data++ = pixel;
+	    break;
+
+          case 16: // 16bpp LSB
+            *pixel_data++ = pixel;
+	    *pixel_data++ = pixel >> 8;
+            break;
+
+          case 17: // 16bpp MSB
+	    *pixel_data++ = pixel >> 8;
+	    *pixel_data++ = pixel;
+            break;
+
+	  case 24: // 24bpp LSB
+	    *pixel_data++ = pixel;
+	    *pixel_data++ = pixel >> 8;
+	    *pixel_data++ = pixel >> 16;
+	    break;
+
+          case 25: // 24bpp MSB
+            *pixel_data++ = pixel >> 16;
+            *pixel_data++ = pixel >> 8;
+            *pixel_data++ = pixel;
+            break;
+
+          case 32: // 32bpp LSB
+            *pixel_data++ = pixel;
+            *pixel_data++ = pixel >> 8;
+            *pixel_data++ = pixel >> 16;
+            *pixel_data++ = pixel >> 24;
+            break;
+
+          case 33: // 32bpp MSB
+            *pixel_data++ = pixel >> 24;
+            *pixel_data++ = pixel >> 16;
+            *pixel_data++ = pixel >> 8;
+            *pixel_data++ = pixel;
+            break;
+          }
+	}
+
+	pixel_data = (ppixel_data += image->bytes_per_line);
+      }
+
+      break;
+
+    case StaticColor:
+    case PseudoColor: {
+#ifndef   ORDEREDPSEUDO
+      short *terr,
+	*rerr = new short[width + 2],
+	*gerr = new short[width + 2],
+	*berr = new short[width + 2],
+	*nrerr = new short[width + 2],
+	*ngerr = new short[width + 2],
+	*nberr = new short[width + 2];
+      int rr, gg, bb, rer, ger, ber;
+      int dd = 255 / control->getColorsPerChannel();
+
+      for (x = 0; x < width; x++) {
+	*(rerr + x) = *(red + x);
+	*(gerr + x) = *(green + x);
+	*(berr + x) = *(blue + x);
+      }
+
+      *(rerr + x) = *(gerr + x) = *(berr + x) = 0;
+#endif // ORDEREDPSEUDO
+
+      for (y = 0, offset = 0; y < height; y++) {
+#ifdef    ORDEREDPSEUDO
+        dithy = y & 7;
+
+        for (x = 0; x < width; x++, offset++) {
+          dithx = x & 7;
+
+          r = red[offset];
+          g = green[offset];
+          b = blue[offset];
+
+          er = r & (red_bits - 1);
+          eg = g & (green_bits - 1);
+          eb = b & (blue_bits - 1);
+
+          r = red_table[r];
+          g = green_table[g];
+          b = blue_table[b];
+
+          if ((dither8[dithy][dithx] < er) && (r < red_table[255])) r++;
+          if ((dither8[dithy][dithx] < eg) && (g < green_table[255])) g++;
+          if ((dither8[dithy][dithx] < eb) && (b < blue_table[255])) b++;
+
+          pixel = (r * cpccpc) + (g * cpc) + b;
+          *(pixel_data++) = colors[pixel].pixel;
+        }
+
+        pixel_data = (ppixel_data += image->bytes_per_line);
+      }
+#else // !ORDEREDPSEUDO
+      if (y < (height - 1)) {
+	int i = offset + width;
+	for (x = 0; x < width; x++, i++) {
+	  *(nrerr + x) = *(red + i);
+	  *(ngerr + x) = *(green + i);
+	  *(nberr + x) = *(blue + i);
+	}
+
+	*(nrerr + x) = *(red + (--i));
+	*(ngerr + x) = *(green + i);
+	*(nberr + x) = *(blue + i);
+      }
+
+      for (x = 0; x < width; x++) {
+	rr = rerr[x];
+	gg = gerr[x];
+	bb = berr[x];
+
+	if (rr > 255) rr = 255; else if (rr < 0) rr = 0;
+	if (gg > 255) gg = 255; else if (gg < 0) gg = 0;
+	if (bb > 255) bb = 255; else if (bb < 0) bb = 0;
+
+	r = red_table[rr];
+	g = green_table[gg];
+	b = blue_table[bb];
+
+	rer = rerr[x] - r*dd;
+	ger = gerr[x] - g*dd;
+	ber = berr[x] - b*dd;
+
+	pixel = (r * cpccpc) + (g * cpc) + b;
+	*pixel_data++ = colors[pixel].pixel;
+
+	r = rer >> 1;
+	g = ger >> 1;
+	b = ber >> 1;
+	rerr[x+1] += r;
+	gerr[x+1] += g;
+	berr[x+1] += b;
+	nrerr[x] += r;
+	ngerr[x] += g;
+	nberr[x] += b;
+      }
+
+      offset += width;
+
+      pixel_data = (ppixel_data += image->bytes_per_line);
+
+      terr = rerr;
+      rerr = nrerr;
+      nrerr = terr;
+
+      terr = gerr;
+      gerr = ngerr;
+      ngerr = terr;
+
+      terr = berr;
+      berr = nberr;
+      nberr = terr;
+    }
+
+    delete [] rerr;
+    delete [] gerr;
+    delete [] berr;
+    delete [] nrerr;
+    delete [] ngerr;
+    delete [] nberr;
+#endif // ORDEREDPSUEDO
+
+    break; }
+
+    default:
+      fprintf(stderr, i18n->getMessage(ImageSet, ImageUnsupVisual,
+			 "BImage::renderXImage: unsupported visual\n"));
+      delete [] d;
+      XDestroyImage(image);
+      return (XImage *) 0;
+    }
+  } else {
+    switch (control->getVisual()->c_class) {
+    case StaticColor:
+    case PseudoColor:
+      for (y = 0, offset = 0; y < height; y++) {
+        for (x = 0; x < width; x++, offset++) {
+  	  r = red_table[red[offset]];
+          g = green_table[green[offset]];
+	  b = blue_table[blue[offset]];
+
+	  pixel = (r * cpccpc) + (g * cpc) + b;
+	  *pixel_data++ = colors[pixel].pixel;
+        }
+
+        pixel_data = (ppixel_data += image->bytes_per_line);
+      }
+
+      break;
+
+  case TrueColor:
+    for (y = 0, offset = 0; y < height; y++) {
+      for (x = 0; x < width; x++, offset++) {
+	r = red_table[red[offset]];
+	g = green_table[green[offset]];
+	b = blue_table[blue[offset]];
+
+	pixel = (r << red_offset) | (g << green_offset) | (b << blue_offset);
+
+        switch (o) {
+	case  8: //  8bpp
+	  *pixel_data++ = pixel;
+	  break;
+
+        case 16: // 16bpp LSB
+          *pixel_data++ = pixel;
+          *pixel_data++ = pixel >> 8;
+          break;
+
+        case 17: // 16bpp MSB
+          *pixel_data++ = pixel >> 8;
+          *pixel_data++ = pixel;
+          break;
+
+        case 24: // 24bpp LSB
+          *pixel_data++ = pixel;
+          *pixel_data++ = pixel >> 8;
+          *pixel_data++ = pixel >> 16;
+          break;
+
+        case 25: // 24bpp MSB
+          *pixel_data++ = pixel >> 16;
+          *pixel_data++ = pixel >> 8;
+          *pixel_data++ = pixel;
+          break;
+
+        case 32: // 32bpp LSB
+          *pixel_data++ = pixel;
+          *pixel_data++ = pixel >> 8;
+          *pixel_data++ = pixel >> 16;
+          *pixel_data++ = pixel >> 24;
+          break;
+
+        case 33: // 32bpp MSB
+          *pixel_data++ = pixel >> 24;
+          *pixel_data++ = pixel >> 16;
+          *pixel_data++ = pixel >> 8;
+          *pixel_data++ = pixel;
+          break;
+        }
+      }
+
+      pixel_data = (ppixel_data += image->bytes_per_line);
+    }
+
+    break;
+
+  case StaticGray:
+  case GrayScale:
+    for (y = 0, offset = 0; y < height; y++) {
+      for (x = 0; x < width; x++, offset++) {
+	r = *(red_table + *(red + offset));
+	g = *(green_table + *(green + offset));
+	b = *(blue_table + *(blue + offset));
+
+	g = ((r * 30) + (g * 59) + (b * 11)) / 100;
+	*pixel_data++ = colors[g].pixel;
+      }
+
+      pixel_data = (ppixel_data += image->bytes_per_line);
+    }
+
+    break;
+
+  default:
+    fprintf(stderr, i18n->getMessage(ImageSet, ImageUnsupVisual,
+		       "BImage::renderXImage: unsupported visual\n"));
+    delete [] d;
+    XDestroyImage(image);
+    return (XImage *) 0;
+  }
+}
+
+  image->data = (char *) d;
+  return image;
+}
+
+
+Pixmap BImage::renderPixmap(void) {
+  Pixmap pixmap =
+    XCreatePixmap(control->getBaseDisplay()->getXDisplay(),
+                  control->getDrawable(), width, height, control->getDepth());
+
+  if (pixmap == None) {
+    fprintf(stderr, i18n->getMessage(ImageSet, ImageErrorCreatingPixmap,
+	                     "BImage::renderPixmap: error creating pixmap\n"));
+    return None;
+  }
+
+  XImage *image = renderXImage();
+
+  if (! image) {
+    XFreePixmap(control->getBaseDisplay()->getXDisplay(), pixmap);
+    return None;
+  } else if (! image->data) {
+    XDestroyImage(image);
+    XFreePixmap(control->getBaseDisplay()->getXDisplay(), pixmap);
+    return None;
+  }
+
+  XPutImage(control->getBaseDisplay()->getXDisplay(), pixmap,
+	    DefaultGC(control->getBaseDisplay()->getXDisplay(),
+		      control->getScreenInfo()->getScreenNumber()),
+            image, 0, 0, 0, 0, width, height);
+
+  if (image->data) {
+    delete [] image->data;
+    image->data = NULL;
+  }
+
+  XDestroyImage(image);
+
+  return pixmap;
+}
+
+
+void BImage::bevel1(void) {
+  if (width > 2 && height > 2) {
+    unsigned char *pr = red, *pg = green, *pb = blue;
+
+    register unsigned char r, g, b, rr ,gg ,bb;
+    register unsigned int w = width, h = height - 1, wh = w * h;
+
+    while (--w) {
+      r = *pr;
+      rr = r + (r >> 1);
+      if (rr < r) rr = ~0;
+      g = *pg;
+      gg = g + (g >> 1);
+      if (gg < g) gg = ~0;
+      b = *pb;
+      bb = b + (b >> 1);
+      if (bb < b) bb = ~0;
+
+      *pr = rr;
+      *pg = gg;
+      *pb = bb;
+
+      r = *(pr + wh);
+      rr = (r >> 2) + (r >> 1);
+      if (rr > r) rr = 0;
+      g = *(pg + wh);
+      gg = (g >> 2) + (g >> 1);
+      if (gg > g) gg = 0;
+      b = *(pb + wh);
+      bb = (b >> 2) + (b >> 1);
+      if (bb > b) bb = 0;
+
+      *((pr++) + wh) = rr;
+      *((pg++) + wh) = gg;
+      *((pb++) + wh) = bb;
+    }
+
+    r = *pr;
+    rr = r + (r >> 1);
+    if (rr < r) rr = ~0;
+    g = *pg;
+    gg = g + (g >> 1);
+    if (gg < g) gg = ~0;
+    b = *pb;
+    bb = b + (b >> 1);
+    if (bb < b) bb = ~0;
+
+    *pr = rr;
+    *pg = gg;
+    *pb = bb;
+
+    r = *(pr + wh);
+    rr = (r >> 2) + (r >> 1);
+    if (rr > r) rr = 0;
+    g = *(pg + wh);
+    gg = (g >> 2) + (g >> 1);
+    if (gg > g) gg = 0;
+    b = *(pb + wh);
+    bb = (b >> 2) + (b >> 1);
+    if (bb > b) bb = 0;
+
+    *(pr + wh) = rr;
+    *(pg + wh) = gg;
+    *(pb + wh) = bb;
+
+    pr = red + width;
+    pg = green + width;
+    pb = blue + width;
+
+    while (--h) {
+      r = *pr;
+      rr = r + (r >> 1);
+      if (rr < r) rr = ~0;
+      g = *pg;
+      gg = g + (g >> 1);
+      if (gg < g) gg = ~0;
+      b = *pb;
+      bb = b + (b >> 1);
+      if (bb < b) bb = ~0;
+
+      *pr = rr;
+      *pg = gg;
+      *pb = bb;
+
+      pr += width - 1;
+      pg += width - 1;
+      pb += width - 1;
+
+      r = *pr;
+      rr = (r >> 2) + (r >> 1);
+      if (rr > r) rr = 0;
+      g = *pg;
+      gg = (g >> 2) + (g >> 1);
+      if (gg > g) gg = 0;
+      b = *pb;
+      bb = (b >> 2) + (b >> 1);
+      if (bb > b) bb = 0;
+
+      *(pr++) = rr;
+      *(pg++) = gg;
+      *(pb++) = bb;
+    }
+
+    r = *pr;
+    rr = r + (r >> 1);
+    if (rr < r) rr = ~0;
+    g = *pg;
+    gg = g + (g >> 1);
+    if (gg < g) gg = ~0;
+    b = *pb;
+    bb = b + (b >> 1);
+    if (bb < b) bb = ~0;
+
+    *pr = rr;
+    *pg = gg;
+    *pb = bb;
+
+    pr += width - 1;
+    pg += width - 1;
+    pb += width - 1;
+
+    r = *pr;
+    rr = (r >> 2) + (r >> 1);
+    if (rr > r) rr = 0;
+    g = *pg;
+    gg = (g >> 2) + (g >> 1);
+    if (gg > g) gg = 0;
+    b = *pb;
+    bb = (b >> 2) + (b >> 1);
+    if (bb > b) bb = 0;
+
+    *pr = rr;
+    *pg = gg;
+    *pb = bb;
+  }
+}
+
+
+void BImage::bevel2(void) {
+  if (width > 4 && height > 4) {
+    unsigned char r, g, b, rr ,gg ,bb, *pr = red + width + 1,
+      *pg = green + width + 1, *pb = blue + width + 1;
+    unsigned int w = width - 2, h = height - 1, wh = width * (height - 3);
+
+    while (--w) {
+      r = *pr;
+      rr = r + (r >> 1);
+      if (rr < r) rr = ~0;
+      g = *pg;
+      gg = g + (g >> 1);
+      if (gg < g) gg = ~0;
+      b = *pb;
+      bb = b + (b >> 1);
+      if (bb < b) bb = ~0;
+
+      *pr = rr;
+      *pg = gg;
+      *pb = bb;
+
+      r = *(pr + wh);
+      rr = (r >> 2) + (r >> 1);
+      if (rr > r) rr = 0;
+      g = *(pg + wh);
+      gg = (g >> 2) + (g >> 1);
+      if (gg > g) gg = 0;
+      b = *(pb + wh);
+      bb = (b >> 2) + (b >> 1);
+      if (bb > b) bb = 0;
+
+      *((pr++) + wh) = rr;
+      *((pg++) + wh) = gg;
+      *((pb++) + wh) = bb;
+    }
+
+    pr = red + width;
+    pg = green + width;
+    pb = blue + width;
+
+    while (--h) {
+      r = *pr;
+      rr = r + (r >> 1);
+      if (rr < r) rr = ~0;
+      g = *pg;
+      gg = g + (g >> 1);
+      if (gg < g) gg = ~0;
+      b = *pb;
+      bb = b + (b >> 1);
+      if (bb < b) bb = ~0;
+
+      *(++pr) = rr;
+      *(++pg) = gg;
+      *(++pb) = bb;
+
+      pr += width - 3;
+      pg += width - 3;
+      pb += width - 3;
+
+      r = *pr;
+      rr = (r >> 2) + (r >> 1);
+      if (rr > r) rr = 0;
+      g = *pg;
+      gg = (g >> 2) + (g >> 1);
+      if (gg > g) gg = 0;
+      b = *pb;
+      bb = (b >> 2) + (b >> 1);
+      if (bb > b) bb = 0;
+
+      *(pr++) = rr;
+      *(pg++) = gg;
+      *(pb++) = bb;
+
+      pr++; pg++; pb++;
+    }
+  }
+}
+
+
+void BImage::invert(void) {
+  register unsigned int i, j, wh = (width * height) - 1;
+  unsigned char tmp;
+
+  for (i = 0, j = wh; j > i; j--, i++) {
+    tmp = *(red + j);
+    *(red + j) = *(red + i);
+    *(red + i) = tmp;
+
+    tmp = *(green + j);
+    *(green + j) = *(green + i);
+    *(green + i) = tmp;
+
+    tmp = *(blue + j);
+    *(blue + j) = *(blue + i);
+    *(blue + i) = tmp;
+  }
+}
+
+
+void BImage::dgradient(void) {
+  // diagonal gradient code was written by Mike Cole 
+  // modified for interlacing by Brad Hughes
+
+  float drx, dgx, dbx, dry, dgy, dby, yr = 0.0, yg = 0.0, yb = 0.0,
+    xr = (float) from->getRed(),
+    xg = (float) from->getGreen(),
+    xb = (float) from->getBlue();
+  unsigned char *pr = red, *pg = green, *pb = blue;
+  unsigned int w = width * 2, h = height * 2, *xt = xtable, *yt = ytable;
+
+  register unsigned int x, y;
+
+  dry = drx = (float) (to->getRed() - from->getRed());
+  dgy = dgx = (float) (to->getGreen() - from->getGreen());
+  dby = dbx = (float) (to->getBlue() - from->getBlue());
+
+  // Create X table
+  drx /= w;
+  dgx /= w;
+  dbx /= w;
+
+  for (x = 0; x < width; x++) {
+    *(xt++) = (unsigned char) (xr);
+    *(xt++) = (unsigned char) (xg);
+    *(xt++) = (unsigned char) (xb);
+
+    xr += drx;
+    xg += dgx;
+    xb += dbx;
+  }
+
+  // Create Y table
+  dry /= h;
+  dgy /= h;
+  dby /= h;
+
+  for (y = 0; y < height; y++) {
+    *(yt++) = ((unsigned char) yr);
+    *(yt++) = ((unsigned char) yg);
+    *(yt++) = ((unsigned char) yb);
+
+    yr += dry;
+    yg += dgy;
+    yb += dby;
+  }
+
+  // Combine tables to create gradient
+
+#ifdef    INTERLACE
+  if (! interlaced) {
+#endif // INTERLACE
+
+    // normal dgradient
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        *(pr++) = *(xt++) + *(yt);
+        *(pg++) = *(xt++) + *(yt + 1);
+        *(pb++) = *(xt++) + *(yt + 2);
+      }
+    }
+
+#ifdef    INTERLACE
+  } else {
+    // faked interlacing effect
+    unsigned char channel, channel2;
+
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        if (y & 1) {
+          channel = *(xt++) + *(yt);
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pr++) = channel2;
+
+          channel = *(xt++) + *(yt + 1);
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pg++) = channel2;
+
+          channel = *(xt++) + *(yt + 2);
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pb++) = channel2;
+        } else {
+          channel = *(xt++) + *(yt);
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pr++) = channel2;
+
+          channel = *(xt++) + *(yt + 1);
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pg++) = channel2;
+
+          channel = *(xt++) + *(yt + 2);
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pb++) = channel2;
+        }
+      }
+    }
+  }
+#endif // INTERLACE
+
+}
+
+
+void BImage::hgradient(void) {
+  float drx, dgx, dbx,
+    xr = (float) from->getRed(),
+    xg = (float) from->getGreen(),
+    xb = (float) from->getBlue();
+  unsigned char *pr = red, *pg = green, *pb = blue;
+
+  register unsigned int x, y;
+
+  drx = (float) (to->getRed() - from->getRed());
+  dgx = (float) (to->getGreen() - from->getGreen());
+  dbx = (float) (to->getBlue() - from->getBlue());
+
+  drx /= width;
+  dgx /= width;
+  dbx /= width;
+
+#ifdef    INTERLACE
+  if (interlaced && height > 2) {
+    // faked interlacing effect
+    unsigned char channel, channel2;
+
+    for (x = 0; x < width; x++, pr++, pg++, pb++) {
+      channel = (unsigned char) xr;
+      channel2 = (channel >> 1) + (channel >> 2);
+      if (channel2 > channel) channel2 = 0;
+      *pr = channel2;
+
+      channel = (unsigned char) xg;
+      channel2 = (channel >> 1) + (channel >> 2);
+      if (channel2 > channel) channel2 = 0;
+      *pg = channel2;
+
+      channel = (unsigned char) xb;
+      channel2 = (channel >> 1) + (channel >> 2);
+      if (channel2 > channel) channel2 = 0;
+      *pb = channel2;
+
+
+      channel = (unsigned char) xr;
+      channel2 = channel + (channel >> 3);
+      if (channel2 < channel) channel2 = ~0;
+      *(pr + width) = channel2;
+
+      channel = (unsigned char) xg;
+      channel2 = channel + (channel >> 3);
+      if (channel2 < channel) channel2 = ~0;
+      *(pg + width) = channel2;
+
+      channel = (unsigned char) xb;
+      channel2 = channel + (channel >> 3);
+      if (channel2 < channel) channel2 = ~0;
+      *(pb + width) = channel2;
+
+      xr += drx;
+      xg += dgx;
+      xb += dbx;
+    }
+
+    pr += width;
+    pg += width;
+    pb += width;
+
+    int offset;
+
+    for (y = 2; y < height; y++, pr += width, pg += width, pb += width) {
+      if (y & 1) offset = width; else offset = 0;
+
+      memcpy(pr, (red + offset), width);
+      memcpy(pg, (green + offset), width);
+      memcpy(pb, (blue + offset), width);
+    }
+  } else {
+#endif // INTERLACE
+
+    // normal hgradient
+    for (x = 0; x < width; x++) {
+      *(pr++) = (unsigned char) (xr);
+      *(pg++) = (unsigned char) (xg);
+      *(pb++) = (unsigned char) (xb);
+
+      xr += drx;
+      xg += dgx;
+      xb += dbx;
+    }
+
+    for (y = 1; y < height; y++, pr += width, pg += width, pb += width) {
+      memcpy(pr, red, width);
+      memcpy(pg, green, width);
+      memcpy(pb, blue, width);
+    }
+
+#ifdef    INTERLACE
+  }
+#endif // INTERLACE
+
+}
+
+
+void BImage::vgradient(void) {
+  float dry, dgy, dby,
+    yr = (float) from->getRed(),
+    yg = (float) from->getGreen(),
+    yb = (float) from->getBlue();
+  unsigned char *pr = red, *pg = green, *pb = blue;
+
+  register unsigned int y;
+
+  dry = (float) (to->getRed() - from->getRed());
+  dgy = (float) (to->getGreen() - from->getGreen());
+  dby = (float) (to->getBlue() - from->getBlue());
+
+  dry /= height;
+  dgy /= height;
+  dby /= height;
+
+#ifdef    INTERLACE
+  if (interlaced) {
+    // faked interlacing effect
+    unsigned char channel, channel2;
+
+    for (y = 0; y < height; y++, pr += width, pg += width, pb += width) {
+      if (y & 1) {
+        channel = (unsigned char) yr;
+        channel2 = (channel >> 1) + (channel >> 2);
+        if (channel2 > channel) channel2 = 0;
+        memset(pr, channel2, width);
+
+        channel = (unsigned char) yg;
+        channel2 = (channel >> 1) + (channel >> 2);
+        if (channel2 > channel) channel2 = 0;
+        memset(pg, channel2, width);
+
+        channel = (unsigned char) yb;
+        channel2 = (channel >> 1) + (channel >> 2);
+        if (channel2 > channel) channel2 = 0;
+        memset(pb, channel2, width);
+      } else {
+        channel = (unsigned char) yr;
+        channel2 = channel + (channel >> 3);
+        if (channel2 < channel) channel2 = ~0;
+        memset(pr, channel2, width);
+
+        channel = (unsigned char) yg;
+        channel2 = channel + (channel >> 3);
+        if (channel2 < channel) channel2 = ~0;
+        memset(pg, channel2, width);
+
+        channel = (unsigned char) yb;
+        channel2 = channel + (channel >> 3);
+        if (channel2 < channel) channel2 = ~0;
+        memset(pb, channel2, width);
+      }
+
+      yr += dry;
+      yg += dgy;
+      yb += dby;
+    }
+  } else {
+#endif // INTERLACE
+
+    // normal vgradient
+    for (y = 0; y < height; y++, pr += width, pg += width, pb += width) {
+      memset(pr, (unsigned char) yr, width);
+      memset(pg, (unsigned char) yg, width);
+      memset(pb, (unsigned char) yb, width);
+
+      yr += dry;
+      yg += dgy;
+      yb += dby;
+    }
+
+#ifdef    INTERLACE
+  }
+#endif // INTERLACE
+
+}
+
+
+void BImage::pgradient(void) {
+  // pyramid gradient -  based on original dgradient, written by
+  // Mosfet (mosfet@kde.org)
+  // adapted from kde sources for Openbox by Brad Hughes
+
+  float yr, yg, yb, drx, dgx, dbx, dry, dgy, dby,
+    xr, xg, xb;
+  int rsign, gsign, bsign;
+  unsigned char *pr = red, *pg = green, *pb = blue;
+  unsigned int tr = to->getRed(), tg = to->getGreen(), tb = to->getBlue(),
+    *xt = xtable, *yt = ytable;
+
+  register unsigned int x, y;
+
+  dry = drx = (float) (to->getRed() - from->getRed());
+  dgy = dgx = (float) (to->getGreen() - from->getGreen());
+  dby = dbx = (float) (to->getBlue() - from->getBlue());
+
+  rsign = (drx < 0) ? -1 : 1;
+  gsign = (dgx < 0) ? -1 : 1;
+  bsign = (dbx < 0) ? -1 : 1;
+
+  xr = yr = (drx / 2);
+  xg = yg = (dgx / 2);
+  xb = yb = (dbx / 2);
+
+  // Create X table
+  drx /= width;
+  dgx /= width;
+  dbx /= width;
+
+  for (x = 0; x < width; x++) {
+    *(xt++) = (unsigned char) ((xr < 0) ? -xr : xr);
+    *(xt++) = (unsigned char) ((xg < 0) ? -xg : xg);
+    *(xt++) = (unsigned char) ((xb < 0) ? -xb : xb);
+
+    xr -= drx;
+    xg -= dgx;
+    xb -= dbx;
+  }
+
+  // Create Y table
+  dry /= height;
+  dgy /= height;
+  dby /= height;
+
+  for (y = 0; y < height; y++) {
+    *(yt++) = ((unsigned char) ((yr < 0) ? -yr : yr));
+    *(yt++) = ((unsigned char) ((yg < 0) ? -yg : yg));
+    *(yt++) = ((unsigned char) ((yb < 0) ? -yb : yb));
+
+    yr -= dry;
+    yg -= dgy;
+    yb -= dby;
+  }
+
+  // Combine tables to create gradient
+
+#ifdef    INTERLACE
+  if (! interlaced) {
+#endif // INTERLACE
+
+    // normal pgradient
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        *(pr++) = (unsigned char) (tr - (rsign * (*(xt++) + *(yt))));
+        *(pg++) = (unsigned char) (tg - (gsign * (*(xt++) + *(yt + 1))));
+        *(pb++) = (unsigned char) (tb - (bsign * (*(xt++) + *(yt + 2))));
+      }
+    }
+
+#ifdef    INTERLACE
+  } else {
+    // faked interlacing effect
+    unsigned char channel, channel2;
+
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        if (y & 1) {
+          channel = (unsigned char) (tr - (rsign * (*(xt++) + *(yt))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pr++) = channel2;
+
+          channel = (unsigned char) (tg - (gsign * (*(xt++) + *(yt + 1))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pg++) = channel2;
+
+          channel = (unsigned char) (tb - (bsign * (*(xt++) + *(yt + 2))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pb++) = channel2;
+        } else {
+          channel = (unsigned char) (tr - (rsign * (*(xt++) + *(yt))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pr++) = channel2;
+
+          channel = (unsigned char) (tg - (gsign * (*(xt++) + *(yt + 1))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pg++) = channel2;
+
+          channel = (unsigned char) (tb - (bsign * (*(xt++) + *(yt + 2))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pb++) = channel2;
+        }
+      }
+    }
+  }
+#endif // INTERLACE
+}
+
+
+void BImage::rgradient(void) {
+  // rectangle gradient -  based on original dgradient, written by
+  // Mosfet (mosfet@kde.org)
+  // adapted from kde sources for Openbox by Brad Hughes
+
+  float drx, dgx, dbx, dry, dgy, dby, xr, xg, xb, yr, yg, yb;
+  int rsign, gsign, bsign;
+  unsigned char *pr = red, *pg = green, *pb = blue;
+  unsigned int tr = to->getRed(), tg = to->getGreen(), tb = to->getBlue(),
+    *xt = xtable, *yt = ytable;
+
+  register unsigned int x, y;
+
+  dry = drx = (float) (to->getRed() - from->getRed());
+  dgy = dgx = (float) (to->getGreen() - from->getGreen());
+  dby = dbx = (float) (to->getBlue() - from->getBlue());
+
+  rsign = (drx < 0) ? -2 : 2;
+  gsign = (dgx < 0) ? -2 : 2;
+  bsign = (dbx < 0) ? -2 : 2;
+
+  xr = yr = (drx / 2);
+  xg = yg = (dgx / 2);
+  xb = yb = (dbx / 2);
+
+  // Create X table
+  drx /= width;
+  dgx /= width;
+  dbx /= width;
+
+  for (x = 0; x < width; x++) {
+    *(xt++) = (unsigned char) ((xr < 0) ? -xr : xr);
+    *(xt++) = (unsigned char) ((xg < 0) ? -xg : xg);
+    *(xt++) = (unsigned char) ((xb < 0) ? -xb : xb);
+
+    xr -= drx;
+    xg -= dgx;
+    xb -= dbx;
+  }
+
+  // Create Y table
+  dry /= height;
+  dgy /= height;
+  dby /= height;
+
+  for (y = 0; y < height; y++) {
+    *(yt++) = ((unsigned char) ((yr < 0) ? -yr : yr));
+    *(yt++) = ((unsigned char) ((yg < 0) ? -yg : yg));
+    *(yt++) = ((unsigned char) ((yb < 0) ? -yb : yb));
+
+    yr -= dry;
+    yg -= dgy;
+    yb -= dby;
+  }
+
+  // Combine tables to create gradient
+
+#ifdef    INTERLACE
+  if (! interlaced) {
+#endif // INTERLACE
+
+    // normal rgradient
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        *(pr++) = (unsigned char) (tr - (rsign * max(*(xt++), *(yt))));
+        *(pg++) = (unsigned char) (tg - (gsign * max(*(xt++), *(yt + 1))));
+        *(pb++) = (unsigned char) (tb - (bsign * max(*(xt++), *(yt + 2))));
+      }
+    }
+
+#ifdef    INTERLACE
+  } else {
+    // faked interlacing effect
+    unsigned char channel, channel2;
+
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        if (y & 1) {
+          channel = (unsigned char) (tr - (rsign * max(*(xt++), *(yt))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pr++) = channel2;
+
+          channel = (unsigned char) (tg - (gsign * max(*(xt++), *(yt + 1))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pg++) = channel2;
+
+          channel = (unsigned char) (tb - (bsign * max(*(xt++), *(yt + 2))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pb++) = channel2;
+        } else {
+          channel = (unsigned char) (tr - (rsign * max(*(xt++), *(yt))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pr++) = channel2;
+
+          channel = (unsigned char) (tg - (gsign * max(*(xt++), *(yt + 1))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pg++) = channel2;
+
+          channel = (unsigned char) (tb - (bsign * max(*(xt++), *(yt + 2))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pb++) = channel2;
+        }
+      }
+    }
+  }
+#endif // INTERLACE
+}
+
+
+void BImage::egradient(void) {
+  // elliptic gradient -  based on original dgradient, written by
+  // Mosfet (mosfet@kde.org)
+  // adapted from kde sources for Openbox by Brad Hughes
+
+  float drx, dgx, dbx, dry, dgy, dby, yr, yg, yb, xr, xg, xb;
+  int rsign, gsign, bsign;
+  unsigned char *pr = red, *pg = green, *pb = blue;
+  unsigned int *xt = xtable, *yt = ytable,
+    tr = (unsigned long) to->getRed(),
+    tg = (unsigned long) to->getGreen(),
+    tb = (unsigned long) to->getBlue();
+
+  register unsigned int x, y;
+
+  dry = drx = (float) (to->getRed() - from->getRed());
+  dgy = dgx = (float) (to->getGreen() - from->getGreen());
+  dby = dbx = (float) (to->getBlue() - from->getBlue());
+
+  rsign = (drx < 0) ? -1 : 1;
+  gsign = (dgx < 0) ? -1 : 1;
+  bsign = (dbx < 0) ? -1 : 1;
+
+  xr = yr = (drx / 2);
+  xg = yg = (dgx / 2);
+  xb = yb = (dbx / 2);
+
+  // Create X table
+  drx /= width;
+  dgx /= width;
+  dbx /= width;
+
+  for (x = 0; x < width; x++) {
+    *(xt++) = (unsigned long) (xr * xr);
+    *(xt++) = (unsigned long) (xg * xg);
+    *(xt++) = (unsigned long) (xb * xb);
+
+    xr -= drx;
+    xg -= dgx;
+    xb -= dbx;
+  }
+
+  // Create Y table
+  dry /= height;
+  dgy /= height;
+  dby /= height;
+
+  for (y = 0; y < height; y++) {
+    *(yt++) = (unsigned long) (yr * yr);
+    *(yt++) = (unsigned long) (yg * yg);
+    *(yt++) = (unsigned long) (yb * yb);
+
+    yr -= dry;
+    yg -= dgy;
+    yb -= dby;
+  }
+
+  // Combine tables to create gradient
+
+#ifdef    INTERLACE
+  if (! interlaced) {
+#endif // INTERLACE
+
+    // normal egradient
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        *(pr++) = (unsigned char)
+          (tr - (rsign * control->getSqrt(*(xt++) + *(yt))));
+        *(pg++) = (unsigned char)
+          (tg - (gsign * control->getSqrt(*(xt++) + *(yt + 1))));
+        *(pb++) = (unsigned char)
+          (tb - (bsign * control->getSqrt(*(xt++) + *(yt + 2))));
+      }
+    }
+
+#ifdef    INTERLACE
+  } else {
+    // faked interlacing effect
+    unsigned char channel, channel2;
+
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        if (y & 1) {
+          channel = (unsigned char)
+            (tr - (rsign * control->getSqrt(*(xt++) + *(yt))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pr++) = channel2;
+
+          channel = (unsigned char)
+            (tg - (gsign * control->getSqrt(*(xt++) + *(yt + 1))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pg++) = channel2;
+
+          channel = (unsigned char)
+            (tb - (bsign * control->getSqrt(*(xt++) + *(yt + 2))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pb++) = channel2;
+        } else {
+          channel = (unsigned char)
+            (tr - (rsign * control->getSqrt(*(xt++) + *(yt))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pr++) = channel2;
+
+          channel = (unsigned char)
+          (tg - (gsign * control->getSqrt(*(xt++) + *(yt + 1))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pg++) = channel2;
+
+          channel = (unsigned char)
+            (tb - (bsign * control->getSqrt(*(xt++) + *(yt + 2))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pb++) = channel2;
+        }
+      }
+    }
+  }
+#endif // INTERLACE
+}
+
+
+void BImage::pcgradient(void) {
+  // pipe cross gradient -  based on original dgradient, written by
+  // Mosfet (mosfet@kde.org)
+  // adapted from kde sources for Openbox by Brad Hughes
+
+  float drx, dgx, dbx, dry, dgy, dby, xr, xg, xb, yr, yg, yb;
+  int rsign, gsign, bsign;
+  unsigned char *pr = red, *pg = green, *pb = blue;
+  unsigned int *xt = xtable, *yt = ytable,
+    tr = to->getRed(),
+    tg = to->getGreen(),
+    tb = to->getBlue();
+
+  register unsigned int x, y;
+
+  dry = drx = (float) (to->getRed() - from->getRed());
+  dgy = dgx = (float) (to->getGreen() - from->getGreen());
+  dby = dbx = (float) (to->getBlue() - from->getBlue());
+
+  rsign = (drx < 0) ? -2 : 2;
+  gsign = (dgx < 0) ? -2 : 2;
+  bsign = (dbx < 0) ? -2 : 2;
+
+  xr = yr = (drx / 2);
+  xg = yg = (dgx / 2);
+  xb = yb = (dbx / 2);
+
+  // Create X table
+  drx /= width;
+  dgx /= width;
+  dbx /= width;
+
+  for (x = 0; x < width; x++) {
+    *(xt++) = (unsigned char) ((xr < 0) ? -xr : xr);
+    *(xt++) = (unsigned char) ((xg < 0) ? -xg : xg);
+    *(xt++) = (unsigned char) ((xb < 0) ? -xb : xb);
+
+    xr -= drx;
+    xg -= dgx;
+    xb -= dbx;
+  }
+
+  // Create Y table
+  dry /= height;
+  dgy /= height;
+  dby /= height;
+
+  for (y = 0; y < height; y++) {
+    *(yt++) = ((unsigned char) ((yr < 0) ? -yr : yr));
+    *(yt++) = ((unsigned char) ((yg < 0) ? -yg : yg));
+    *(yt++) = ((unsigned char) ((yb < 0) ? -yb : yb));
+
+    yr -= dry;
+    yg -= dgy;
+    yb -= dby;
+  }
+
+  // Combine tables to create gradient
+
+#ifdef    INTERLACE
+  if (! interlaced) {
+#endif // INTERLACE
+
+    // normal pcgradient
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        *(pr++) = (unsigned char) (tr - (rsign * min(*(xt++), *(yt))));
+        *(pg++) = (unsigned char) (tg - (gsign * min(*(xt++), *(yt + 1))));
+        *(pb++) = (unsigned char) (tb - (bsign * min(*(xt++), *(yt + 2))));
+      }
+    }
+
+#ifdef    INTERLACE
+  } else {
+    // faked interlacing effect
+    unsigned char channel, channel2;
+
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        if (y & 1) {
+          channel = (unsigned char) (tr - (rsign * min(*(xt++), *(yt))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pr++) = channel2;
+
+          channel = (unsigned char) (tg - (bsign * min(*(xt++), *(yt + 1))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pg++) = channel2;
+
+          channel = (unsigned char) (tb - (gsign * min(*(xt++), *(yt + 2))));
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pb++) = channel2;
+        } else {
+          channel = (unsigned char) (tr - (rsign * min(*(xt++), *(yt))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pr++) = channel2;
+
+          channel = (unsigned char) (tg - (gsign * min(*(xt++), *(yt + 1))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pg++) = channel2;
+
+          channel = (unsigned char) (tb - (bsign * min(*(xt++), *(yt + 2))));
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pb++) = channel2;
+        }
+      }
+    }
+  }
+#endif // INTERLACE
+}
+
+
+void BImage::cdgradient(void) {
+  // cross diagonal gradient -  based on original dgradient, written by
+  // Mosfet (mosfet@kde.org)
+  // adapted from kde sources for Openbox by Brad Hughes
+
+  float drx, dgx, dbx, dry, dgy, dby, yr = 0.0, yg = 0.0, yb = 0.0,
+    xr = (float) from->getRed(),
+    xg = (float) from->getGreen(),
+    xb = (float) from->getBlue();
+  unsigned char *pr = red, *pg = green, *pb = blue;
+  unsigned int w = width * 2, h = height * 2, *xt, *yt;
+
+  register unsigned int x, y;
+
+  dry = drx = (float) (to->getRed() - from->getRed());
+  dgy = dgx = (float) (to->getGreen() - from->getGreen());
+  dby = dbx = (float) (to->getBlue() - from->getBlue());
+
+  // Create X table
+  drx /= w;
+  dgx /= w;
+  dbx /= w;
+
+  for (xt = (xtable + (width * 3) - 1), x = 0; x < width; x++) {
+    *(xt--) = (unsigned char) xb;
+    *(xt--) = (unsigned char) xg;
+    *(xt--) = (unsigned char) xr;
+
+    xr += drx;
+    xg += dgx;
+    xb += dbx;
+  }
+
+  // Create Y table
+  dry /= h;
+  dgy /= h;
+  dby /= h;
+
+  for (yt = ytable, y = 0; y < height; y++) {
+    *(yt++) = (unsigned char) yr;
+    *(yt++) = (unsigned char) yg;
+    *(yt++) = (unsigned char) yb;
+
+    yr += dry;
+    yg += dgy;
+    yb += dby;
+  }
+
+  // Combine tables to create gradient
+
+#ifdef    INTERLACE
+  if (! interlaced) {
+#endif // INTERLACE
+
+    // normal cdgradient
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        *(pr++) = *(xt++) + *(yt);
+        *(pg++) = *(xt++) + *(yt + 1);
+        *(pb++) = *(xt++) + *(yt + 2);
+      }
+    }
+
+#ifdef    INTERLACE
+  } else {
+    // faked interlacing effect
+    unsigned char channel, channel2;
+
+    for (yt = ytable, y = 0; y < height; y++, yt += 3) {
+      for (xt = xtable, x = 0; x < width; x++) {
+        if (y & 1) {
+          channel = *(xt++) + *(yt);
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pr++) = channel2;
+
+          channel = *(xt++) + *(yt + 1);
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pg++) = channel2;
+
+          channel = *(xt++) + *(yt + 2);
+          channel2 = (channel >> 1) + (channel >> 2);
+          if (channel2 > channel) channel2 = 0;
+          *(pb++) = channel2;
+        } else {
+          channel = *(xt++) + *(yt);
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pr++) = channel2;
+
+          channel = *(xt++) + *(yt + 1);
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pg++) = channel2;
+
+          channel = *(xt++) + *(yt + 2);
+          channel2 = channel + (channel >> 3);
+          if (channel2 < channel) channel2 = ~0;
+          *(pb++) = channel2;
+        }
+      }
+    }
+  }
+#endif // INTERLACE
+}
+
+
+BImageControl::BImageControl(BaseDisplay *dpy, ScreenInfo *scrn, Bool _dither,
+                             int _cpc, unsigned long cache_timeout,
+                             unsigned long cmax)
+{
+  basedisplay = dpy;
+  screeninfo = scrn;
+  setDither(_dither);
+  setColorsPerChannel(_cpc);
+
+  cache_max = cmax;
+#ifdef    TIMEDCACHE
+  if (cache_timeout) {
+    timer = new BTimer(basedisplay, this);
+    timer->setTimeout(cache_timeout);
+    timer->start();
+  } else
+    timer = (BTimer *) 0;
+#endif // TIMEDCACHE
+
+  colors = (XColor *) 0;
+  ncolors = 0;
+
+  grad_xbuffer = grad_ybuffer = (unsigned int *) 0;
+  grad_buffer_width = grad_buffer_height = 0;
+
+  sqrt_table = (unsigned long *) 0;
+
+  screen_depth = screeninfo->getDepth();
+  window = screeninfo->getRootWindow();
+  screen_number = screeninfo->getScreenNumber();
+
+  int count;
+  XPixmapFormatValues *pmv = XListPixmapFormats(basedisplay->getXDisplay(),
+                                                &count);
+  colormap = screeninfo->getColormap();
+
+  if (pmv) {
+    bits_per_pixel = 0;
+    for (int i = 0; i < count; i++)
+      if (pmv[i].depth == screen_depth) {
+	bits_per_pixel = pmv[i].bits_per_pixel;
+	break;
+      }
+
+    XFree(pmv);
+  }
+
+  if (bits_per_pixel == 0) bits_per_pixel = screen_depth;
+  if (bits_per_pixel >= 24) setDither(False);
+
+  red_offset = green_offset = blue_offset = 0;
+
+  switch (getVisual()->c_class) {
+  case TrueColor:
+    {
+      int i;
+
+      // compute color tables
+      unsigned long red_mask = getVisual()->red_mask,
+        green_mask = getVisual()->green_mask,
+        blue_mask = getVisual()->blue_mask;
+
+      while (! (red_mask & 1)) { red_offset++; red_mask >>= 1; }
+      while (! (green_mask & 1)) { green_offset++; green_mask >>= 1; }
+      while (! (blue_mask & 1)) { blue_offset++; blue_mask >>= 1; }
+
+      red_bits = 255 / red_mask;
+      green_bits = 255 / green_mask;
+      blue_bits = 255 / blue_mask;
+
+      for (i = 0; i < 256; i++) {
+	red_color_table[i] = i / red_bits;
+        green_color_table[i] = i / green_bits;
+        blue_color_table[i] = i / blue_bits;
+      }
+    }
+
+    break;
+
+  case PseudoColor:
+  case StaticColor:
+    {
+      ncolors = colors_per_channel * colors_per_channel * colors_per_channel;
+
+      if (ncolors > (1 << screen_depth)) {
+	colors_per_channel = (1 << screen_depth) / 3;
+	ncolors = colors_per_channel * colors_per_channel * colors_per_channel;
+      }
+
+      if (colors_per_channel < 2 || ncolors > (1 << screen_depth)) {
+	fprintf(stderr, i18n->getMessage(ImageSet, ImageInvalidColormapSize,
+                      "BImageControl::BImageControl: invalid colormap size %d "
+		           "(%d/%d/%d) - reducing"),
+                ncolors, colors_per_channel, colors_per_channel,
+                colors_per_channel);
+
+        colors_per_channel = (1 << screen_depth) / 3;
+      }
+
+      colors = new XColor[ncolors];
+      if (! colors) {
+	fprintf(stderr, i18n->getMessage(ImageSet,
+	                                 ImageErrorAllocatingColormap,
+	        	   "BImageControl::BImageControl: error allocating "
+		           "colormap\n"));
+	exit(1);
+      }
+
+      int i = 0, ii, p, r, g, b,
+
+#ifdef    ORDEREDPSEUDO
+        bits = 256 / colors_per_channel;
+#else // !ORDEREDPSEUDO
+        bits = 255 / (colors_per_channel - 1);
+#endif // ORDEREDPSEUDO
+
+      red_bits = green_bits = blue_bits = bits;
+
+      for (i = 0; i < 256; i++)
+	red_color_table[i] = green_color_table[i] = blue_color_table[i] =
+	  i / bits;
+
+      for (r = 0, i = 0; r < colors_per_channel; r++)
+	for (g = 0; g < colors_per_channel; g++)
+	  for (b = 0; b < colors_per_channel; b++, i++) {
+	    colors[i].red = (r * 0xffff) / (colors_per_channel - 1);
+	    colors[i].green = (g * 0xffff) / (colors_per_channel - 1);
+	    colors[i].blue = (b * 0xffff) / (colors_per_channel - 1);;
+	    colors[i].flags = DoRed|DoGreen|DoBlue;
+	  }
+
+      basedisplay->grab();
+
+      for (i = 0; i < ncolors; i++)
+	if (! XAllocColor(basedisplay->getXDisplay(), colormap, &colors[i])) {
+	  fprintf(stderr, i18n->getMessage(ImageSet, ImageColorAllocFail,
+		                   "couldn't alloc color %i %i %i\n"),
+		  colors[i].red, colors[i].green, colors[i].blue);
+	  colors[i].flags = 0;
+	} else
+	  colors[i].flags = DoRed|DoGreen|DoBlue;
+
+      basedisplay->ungrab();
+
+      XColor icolors[256];
+      int incolors = (((1 << screen_depth) > 256) ? 256 : (1 << screen_depth));
+
+      for (i = 0; i < incolors; i++)
+	icolors[i].pixel = i;
+
+      XQueryColors(basedisplay->getXDisplay(), colormap, icolors, incolors);
+      for (i = 0; i < ncolors; i++) {
+	if (! colors[i].flags) {
+	  unsigned long chk = 0xffffffff, pixel, close = 0;
+
+	  p = 2;
+	  while (p--) {
+	    for (ii = 0; ii < incolors; ii++) {
+	      r = (colors[i].red - icolors[i].red) >> 8;
+	      g = (colors[i].green - icolors[i].green) >> 8;
+	      b = (colors[i].blue - icolors[i].blue) >> 8;
+	      pixel = (r * r) + (g * g) + (b * b);
+
+	      if (pixel < chk) {
+		chk = pixel;
+		close = ii;
+	      }
+
+	      colors[i].red = icolors[close].red;
+	      colors[i].green = icolors[close].green;
+	      colors[i].blue = icolors[close].blue;
+
+	      if (XAllocColor(basedisplay->getXDisplay(), colormap,
+			      &colors[i])) {
+		colors[i].flags = DoRed|DoGreen|DoBlue;
+		break;
+	      }
+	    }
+	  }
+	}
+      }
+
+      break;
+    }
+
+  case GrayScale:
+  case StaticGray:
+    {
+
+      if (getVisual()->c_class == StaticGray) {
+	ncolors = 1 << screen_depth;
+      } else {
+	ncolors = colors_per_channel * colors_per_channel * colors_per_channel;
+
+	if (ncolors > (1 << screen_depth)) {
+	  colors_per_channel = (1 << screen_depth) / 3;
+	  ncolors =
+	    colors_per_channel * colors_per_channel * colors_per_channel;
+	}
+      }
+
+      if (colors_per_channel < 2 || ncolors > (1 << screen_depth)) {
+	fprintf(stderr,	i18n->getMessage(ImageSet, ImageInvalidColormapSize,
+                      "BImageControl::BImageControl: invalid colormap size %d "
+		           "(%d/%d/%d) - reducing"),
+		ncolors, colors_per_channel, colors_per_channel,
+		colors_per_channel);
+
+	colors_per_channel = (1 << screen_depth) / 3;
+      }
+
+      colors = new XColor[ncolors];
+      if (! colors) {
+	fprintf(stderr, i18n->getMessage(ImageSet,
+	                                 ImageErrorAllocatingColormap,
+			   "BImageControl::BImageControl: error allocating "
+       	                   "colormap\n"));
+	exit(1);
+      }
+
+      int i = 0, ii, p, bits = 255 / (colors_per_channel - 1);
+      red_bits = green_bits = blue_bits = bits;
+
+      for (i = 0; i < 256; i++)
+	red_color_table[i] = green_color_table[i] = blue_color_table[i] =
+	  i / bits;
+
+      basedisplay->grab();
+      for (i = 0; i < ncolors; i++) {
+	colors[i].red = (i * 0xffff) / (colors_per_channel - 1);
+	colors[i].green = (i * 0xffff) / (colors_per_channel - 1);
+	colors[i].blue = (i * 0xffff) / (colors_per_channel - 1);;
+	colors[i].flags = DoRed|DoGreen|DoBlue;
+
+	if (! XAllocColor(basedisplay->getXDisplay(), colormap,
+			  &colors[i])) {
+	  fprintf(stderr, i18n->getMessage(ImageSet, ImageColorAllocFail,
+		             "couldn't alloc color %i %i %i\n"),
+		  colors[i].red, colors[i].green, colors[i].blue);
+	  colors[i].flags = 0;
+	} else
+	  colors[i].flags = DoRed|DoGreen|DoBlue;
+      }
+
+      basedisplay->ungrab();
+
+      XColor icolors[256];
+      int incolors = (((1 << screen_depth) > 256) ? 256 :
+		      (1 << screen_depth));
+
+      for (i = 0; i < incolors; i++)
+	icolors[i].pixel = i;
+
+      XQueryColors(basedisplay->getXDisplay(), colormap, icolors, incolors);
+      for (i = 0; i < ncolors; i++) {
+	if (! colors[i].flags) {
+	  unsigned long chk = 0xffffffff, pixel, close = 0;
+
+	  p = 2;
+	  while (p--) {
+	    for (ii = 0; ii < incolors; ii++) {
+	      int r = (colors[i].red - icolors[i].red) >> 8;
+	      int g = (colors[i].green - icolors[i].green) >> 8;
+	      int b = (colors[i].blue - icolors[i].blue) >> 8;
+	      pixel = (r * r) + (g * g) + (b * b);
+
+	      if (pixel < chk) {
+		chk = pixel;
+		close = ii;
+	      }
+
+	      colors[i].red = icolors[close].red;
+	      colors[i].green = icolors[close].green;
+  	      colors[i].blue = icolors[close].blue;
+
+	      if (XAllocColor(basedisplay->getXDisplay(), colormap,
+			      &colors[i])) {
+		colors[i].flags = DoRed|DoGreen|DoBlue;
+		break;
+	      }
+	    }
+	  }
+	}
+      }
+
+      break;
+    }
+
+  default:
+    fprintf(stderr, i18n->getMessage(ImageSet, ImageUnsupVisual,
+               "BImageControl::BImageControl: unsupported visual %d\n"),
+	    getVisual()->c_class);
+    exit(1);
+  }
+
+  cache = new LinkedList;
+}
+
+
+BImageControl::~BImageControl(void) {
+  if (sqrt_table) {
+    delete [] sqrt_table;
+  }
+
+  if (grad_xbuffer) {
+    delete [] grad_xbuffer;
+  }
+
+  if (grad_ybuffer) {
+    delete [] grad_ybuffer;
+  }
+
+  if (colors) {
+    unsigned long *pixels = new unsigned long [ncolors];
+
+    int i;
+    for (i = 0; i < ncolors; i++)
+      *(pixels + i) = (*(colors + i)).pixel;
+
+    XFreeColors(basedisplay->getXDisplay(), colormap, pixels, ncolors, 0);
+
+    delete [] colors;
+  }
+
+  if (cache->count()) {
+    int i, n = cache->count();
+    fprintf(stderr, i18n->getMessage(ImageSet, ImagePixmapRelease,
+		       "BImageContol::~BImageControl: pixmap cache - "
+	               "releasing %d pixmaps\n"), n);
+
+    for (i = 0; i < n; i++) {
+      Cache *tmp = cache->first();
+      XFreePixmap(basedisplay->getXDisplay(), tmp->pixmap);
+      cache->remove(tmp);
+      delete tmp;
+    }
+
+#ifdef    TIMEDCACHE
+    if (timer) {
+      timer->stop();
+      delete timer;
+    }
+#endif // TIMEDCACHE
+  }
+
+  delete cache;
+}
+
+
+Pixmap BImageControl::searchCache(unsigned int width, unsigned int height,
+		  unsigned long texture,
+		  BColor *c1, BColor *c2) {
+  if (cache->count()) {
+    LinkedListIterator it(cache);
+
+    for (Cache *tmp = it.current(); tmp; it++, tmp = it.current()) {
+      if ((tmp->width == width) && (tmp->height == height) &&
+          (tmp->texture == texture) && (tmp->pixel1 == c1->getPixel()))
+          if (texture & BImage_Gradient) {
+            if (tmp->pixel2 == c2->getPixel()) {
+              tmp->count++;
+              return tmp->pixmap;
+            }
+          } else {
+            tmp->count++;
+            return tmp->pixmap;
+          }
+        }
+  }
+
+  return None;
+}
+
+
+Pixmap BImageControl::renderImage(unsigned int width, unsigned int height,
+      BTexture *texture) {
+  if (texture->getTexture() & BImage_ParentRelative) return ParentRelative;
+
+  Pixmap pixmap = searchCache(width, height, texture->getTexture(),
+			      texture->getColor(), texture->getColorTo());
+  if (pixmap) return pixmap;
+
+  BImage image(this, width, height);
+  pixmap = image.render(texture);
+
+  if (pixmap) {
+    Cache *tmp = new Cache;
+
+    tmp->pixmap = pixmap;
+    tmp->width = width;
+    tmp->height = height;
+    tmp->count = 1;
+    tmp->texture = texture->getTexture();
+    tmp->pixel1 = texture->getColor()->getPixel();
+
+    if (texture->getTexture() & BImage_Gradient)
+      tmp->pixel2 = texture->getColorTo()->getPixel();
+    else
+      tmp->pixel2 = 0l;
+
+    cache->insert(tmp);
+
+    if ((unsigned) cache->count() > cache_max) {
+#ifdef    DEBUG
+      fprintf(stderr, i18n->getMessage(ImageSet, ImagePixmapCacheLarge,
+                         "BImageControl::renderImage: cache is large, "
+                         "forcing cleanout\n"));
+#endif // DEBUG
+
+      timeout();
+    }
+
+    return pixmap;
+  }
+
+  return None;
+}
+
+
+void BImageControl::removeImage(Pixmap pixmap) {
+  if (pixmap) {
+    LinkedListIterator it(cache);
+    for (Cache *tmp = it.current(); tmp; it++, tmp = it.current()) {
+      if (tmp->pixmap == pixmap) {
+        if (tmp->count) {
+	  tmp->count--;
+
+#ifdef    TIMEDCACHE
+	   if (! timer) timeout();
+#else // !TIMEDCACHE
+	   if (! tmp->count) timeout();
+#endif // TIMEDCACHE
+        }
+
+	return;
+      }
+    }
+  }
+}
+
+
+unsigned long BImageControl::getColor(const char *colorname,
+				      unsigned char *r, unsigned char *g,
+				      unsigned char *b)
+{
+  XColor color;
+  color.pixel = 0;
+
+  if (! XParseColor(basedisplay->getXDisplay(), colormap, colorname, &color))
+    fprintf(stderr, "BImageControl::getColor: color parse error: \"%s\"\n",
+	    colorname);
+  else if (! XAllocColor(basedisplay->getXDisplay(), colormap, &color))
+    fprintf(stderr, "BImageControl::getColor: color alloc error: \"%s\"\n",
+	    colorname);
+
+  if (color.red == 65535) *r = 0xff;
+  else *r = (unsigned char) (color.red / 0xff);
+  if (color.green == 65535) *g = 0xff;
+  else *g = (unsigned char) (color.green / 0xff);
+  if (color.blue == 65535) *b = 0xff;
+  else *b = (unsigned char) (color.blue / 0xff);
+
+  return color.pixel;
+}
+
+
+unsigned long BImageControl::getColor(const char *colorname) {
+  XColor color;
+  color.pixel = 0;
+
+  if (! XParseColor(basedisplay->getXDisplay(), colormap, colorname, &color))
+    fprintf(stderr, "BImageControl::getColor: color parse error: \"%s\"\n",
+	    colorname);
+  else if (! XAllocColor(basedisplay->getXDisplay(), colormap, &color))
+    fprintf(stderr, "BImageControl::getColor: color alloc error: \"%s\"\n",
+	    colorname);
+
+  return color.pixel;
+}
+
+
+void BImageControl::getColorTables(unsigned char **rmt, unsigned char **gmt,
+				   unsigned char **bmt,
+				   int *roff, int *goff, int *boff,
+                                   int *rbit, int *gbit, int *bbit) {
+  if (rmt) *rmt = red_color_table;
+  if (gmt) *gmt = green_color_table;
+  if (bmt) *bmt = blue_color_table;
+
+  if (roff) *roff = red_offset;
+  if (goff) *goff = green_offset;
+  if (boff) *boff = blue_offset;
+
+  if (rbit) *rbit = red_bits;
+  if (gbit) *gbit = green_bits;
+  if (bbit) *bbit = blue_bits;
+}
+
+
+void BImageControl::getXColorTable(XColor **c, int *n) {
+  if (c) *c = colors;
+  if (n) *n = ncolors;
+}
+
+
+void BImageControl::getGradientBuffers(unsigned int w,
+				       unsigned int h,
+				       unsigned int **xbuf,
+				       unsigned int **ybuf)
+{
+  if (w > grad_buffer_width) {
+    if (grad_xbuffer) {
+      delete [] grad_xbuffer;
+    }
+
+    grad_buffer_width = w;
+
+    grad_xbuffer = new unsigned int[grad_buffer_width * 3];
+  }
+
+  if (h > grad_buffer_height) {
+    if (grad_ybuffer) {
+      delete [] grad_ybuffer;
+    }
+
+    grad_buffer_height = h;
+
+    grad_ybuffer = new unsigned int[grad_buffer_height * 3];
+  }
+
+  *xbuf = grad_xbuffer;
+  *ybuf = grad_ybuffer;
+}
+
+
+void BImageControl::installRootColormap(void) {
+  basedisplay->grab();
+
+  Bool install = True;
+  int i = 0, ncmap = 0;
+  Colormap *cmaps =
+    XListInstalledColormaps(basedisplay->getXDisplay(), window, &ncmap);
+
+  if (cmaps) {
+    for (i = 0; i < ncmap; i++)
+      if (*(cmaps + i) == colormap)
+	install = False;
+
+    if (install)
+      XInstallColormap(basedisplay->getXDisplay(), colormap);
+
+    XFree(cmaps);
+  }
+
+  basedisplay->ungrab();
+}
+
+
+void BImageControl::setColorsPerChannel(int cpc) {
+  if (cpc < 2) cpc = 2;
+  if (cpc > 6) cpc = 6;
+
+  colors_per_channel = cpc;
+}
+
+
+unsigned long BImageControl::getSqrt(unsigned int x) {
+  if (! sqrt_table) {
+    // build sqrt table for use with elliptic gradient
+
+    sqrt_table = new unsigned long[(256 * 256 * 2) + 1];
+    int i = 0;
+
+    for (; i < (256 * 256 * 2); i++)
+      *(sqrt_table + i) = bsqrt(i);
+  }
+
+  return (*(sqrt_table + x));
+}
+
+
+void BImageControl::parseTexture(BTexture *texture, char *t) {
+  if ((! texture) || (! t)) return;
+
+  int t_len = strlen(t) + 1, i;
+  char *ts = new char[t_len];
+  if (! ts) return;
+
+  // convert to lower case
+  for (i = 0; i < t_len; i++)
+    *(ts + i) = tolower(*(t + i));
+
+  if (strstr(ts, "parentrelative")) {
+    texture->setTexture(BImage_ParentRelative);
+  } else {
+    texture->setTexture(0);
+
+    if (strstr(ts, "solid"))
+      texture->addTexture(BImage_Solid);
+    else if (strstr(ts, "gradient")) {
+      texture->addTexture(BImage_Gradient);
+      if (strstr(ts, "crossdiagonal"))
+	texture->addTexture(BImage_CrossDiagonal);
+      else if (strstr(ts, "rectangle"))
+	texture->addTexture(BImage_Rectangle);
+      else if (strstr(ts, "pyramid"))
+	texture->addTexture(BImage_Pyramid);
+      else if (strstr(ts, "pipecross"))
+	texture->addTexture(BImage_PipeCross);
+      else if (strstr(ts, "elliptic"))
+	texture->addTexture(BImage_Elliptic);
+      else if (strstr(ts, "diagonal"))
+	texture->addTexture(BImage_Diagonal);
+      else if (strstr(ts, "horizontal"))
+	texture->addTexture(BImage_Horizontal);
+      else if (strstr(ts, "vertical"))
+	texture->addTexture(BImage_Vertical);
+      else
+	texture->addTexture(BImage_Diagonal);
+    } else
+      texture->addTexture(BImage_Solid);
+
+    if (strstr(ts, "raised"))
+      texture->addTexture(BImage_Raised);
+    else if (strstr(ts, "sunken"))
+      texture->addTexture(BImage_Sunken);
+    else if (strstr(ts, "flat"))
+      texture->addTexture(BImage_Flat);
+    else
+      texture->addTexture(BImage_Raised);
+
+    if (! (texture->getTexture() & BImage_Flat))
+      if (strstr(ts, "bevel2"))
+	texture->addTexture(BImage_Bevel2);
+      else
+	texture->addTexture(BImage_Bevel1);
+
+#ifdef    INTERLACE
+    if (strstr(ts, "interlaced"))
+      texture->addTexture(BImage_Interlaced);
+#endif // INTERLACE
+  }
+
+  delete [] ts;
+}
+
+
+void BImageControl::parseColor(BColor *color, char *c) {
+  if (! color) return;
+
+  if (color->isAllocated()) {
+    unsigned long pixel = color->getPixel();
+
+    XFreeColors(basedisplay->getXDisplay(), colormap, &pixel, 1, 0);
+
+    color->setPixel(0l);
+    color->setRGB(0, 0, 0);
+    color->setAllocated(False);
+  }
+
+  if (c) {
+    unsigned char r, g, b;
+
+    color->setPixel(getColor(c, &r, &g, &b));
+    color->setRGB(r, g, b);
+    color->setAllocated(True);
+  }
+}
+
+
+void BImageControl::timeout(void) {
+  LinkedListIterator it(cache);
+  for (Cache *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->count <= 0) {
+      XFreePixmap(basedisplay->getXDisplay(), tmp->pixmap);
+      cache->remove(tmp);
+      delete tmp;
+    }
+  }
+}
diff --git a/src/Image.h b/src/Image.h
new file mode 100644
index 00000000..249f2672
--- /dev/null
+++ b/src/Image.h
@@ -0,0 +1,241 @@
+// Image.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Image_hh
+#define   __Image_hh
+
+#include 
+#include 
+
+#include "LinkedList.h"
+#include "Timer.h"
+
+class ScreenInfo;
+class BImage;
+class BImageControl;
+
+
+// bevel options
+#define BImage_Flat		(1l<<1)
+#define BImage_Sunken		(1l<<2)
+#define BImage_Raised		(1l<<3)
+
+// textures
+#define BImage_Solid		(1l<<4)
+#define BImage_Gradient		(1l<<5)
+
+// gradients
+#define BImage_Horizontal	(1l<<6)
+#define BImage_Vertical		(1l<<7)
+#define BImage_Diagonal		(1l<<8)
+#define BImage_CrossDiagonal	(1l<<9)
+#define BImage_Rectangle	(1l<<10)
+#define BImage_Pyramid		(1l<<11)
+#define BImage_PipeCross	(1l<<12)
+#define BImage_Elliptic		(1l<<13)
+
+// bevel types
+#define BImage_Bevel1		(1l<<14)
+#define BImage_Bevel2		(1l<<15)
+
+// inverted image
+#define BImage_Invert		(1l<<16)
+
+// parent relative image
+#define BImage_ParentRelative   (1l<<17)
+
+#ifdef    INTERLACE
+// fake interlaced image
+#  define BImage_Interlaced	(1l<<18)
+#endif // INTERLACE
+
+class BColor {
+private:
+  int allocated;
+  unsigned char red, green, blue;
+  unsigned long pixel;
+
+public:
+  BColor(char r = 0, char g = 0, char b = 0)
+    { red = r; green = g; blue = b; pixel = 0; allocated = 0; }
+
+  inline const int &isAllocated(void) const { return allocated; }
+
+  inline const unsigned char &getRed(void) const { return red; }
+  inline const unsigned char &getGreen(void) const { return green; }
+  inline const unsigned char &getBlue(void) const { return blue; }
+
+  inline const unsigned long &getPixel(void) const { return pixel; }
+
+  inline void setAllocated(int a) { allocated = a; }
+  inline void setRGB(char r, char g, char b) { red = r; green = g; blue = b; }
+  inline void setPixel(unsigned long p) { pixel = p; }
+};
+
+
+class BTexture {
+private:
+  BColor color, colorTo, hiColor, loColor;
+  unsigned long texture;
+
+public:
+  BTexture(void) { texture = 0; }
+
+  inline BColor *getColor(void) { return &color; }
+  inline BColor *getColorTo(void) { return &colorTo; }
+  inline BColor *getHiColor(void) { return &hiColor; }
+  inline BColor *getLoColor(void) { return &loColor; }
+
+  inline const unsigned long &getTexture(void) const { return texture; }
+
+  inline void setTexture(unsigned long t) { texture = t; }
+  inline void addTexture(unsigned long t) { texture |= t; }
+};
+
+
+class BImage {
+private:
+  BImageControl *control;
+
+#ifdef    INTERLACE
+  Bool interlaced;
+#endif // INTERLACE
+
+  XColor *colors;
+
+  BColor *from, *to;
+  int red_offset, green_offset, blue_offset, red_bits, green_bits, blue_bits,
+    ncolors, cpc, cpccpc;
+  unsigned char *red, *green, *blue, *red_table, *green_table, *blue_table;
+  unsigned int width, height, *xtable, *ytable;
+
+
+protected:
+  Pixmap renderPixmap(void);
+
+  XImage *renderXImage(void);
+
+  void invert(void);
+  void bevel1(void);
+  void bevel2(void);
+  void dgradient(void);
+  void egradient(void);
+  void hgradient(void);
+  void pgradient(void);
+  void rgradient(void);
+  void vgradient(void);
+  void cdgradient(void);
+  void pcgradient(void);
+
+
+public:
+  BImage(BImageControl *, unsigned int, unsigned int);
+  ~BImage(void);
+
+  Pixmap render(BTexture *);
+  Pixmap render_solid(BTexture *);
+  Pixmap render_gradient(BTexture *);
+};
+
+
+class BImageControl : public TimeoutHandler {
+private:
+  Bool dither;
+  BaseDisplay *basedisplay;
+  ScreenInfo *screeninfo;
+#ifdef    TIMEDCACHE
+  BTimer *timer;
+#endif // TIMEDCACHE
+
+  Colormap colormap;
+
+  Window window;
+  XColor *colors;
+  int colors_per_channel, ncolors, screen_number, screen_depth,
+    bits_per_pixel, red_offset, green_offset, blue_offset,
+    red_bits, green_bits, blue_bits;
+  unsigned char red_color_table[256], green_color_table[256],
+    blue_color_table[256];
+  unsigned int *grad_xbuffer, *grad_ybuffer, grad_buffer_width,
+    grad_buffer_height;
+  unsigned long *sqrt_table, cache_max;
+
+  typedef struct Cache {
+    Pixmap pixmap;
+
+    unsigned int count, width, height;
+    unsigned long pixel1, pixel2, texture;
+  } Cache;
+
+  LinkedList *cache;
+
+
+protected:
+  Pixmap searchCache(unsigned int, unsigned int, unsigned long, BColor *,
+                     BColor *);
+
+
+public:
+  BImageControl(BaseDisplay *, ScreenInfo *, Bool = False, int = 4,
+                unsigned long = 300000l, unsigned long = 200l);
+  virtual ~BImageControl(void);
+
+  inline BaseDisplay *getBaseDisplay(void) { return basedisplay; }
+
+  inline const Bool &doDither(void) { return dither; }
+
+  inline ScreenInfo *getScreenInfo(void) { return screeninfo; }
+
+  inline const Window &getDrawable(void) const { return window; }
+
+  inline Visual *getVisual(void) { return screeninfo->getVisual(); }
+
+  inline const int &getBitsPerPixel(void) const { return bits_per_pixel; }
+  inline const int &getDepth(void) const { return screen_depth; }
+  inline const int &getColorsPerChannel(void) const
+    { return colors_per_channel; }
+
+  unsigned long getColor(const char *);
+  unsigned long getColor(const char *, unsigned char *, unsigned char *,
+                         unsigned char *);
+  unsigned long getSqrt(unsigned int);
+
+  Pixmap renderImage(unsigned int, unsigned int, BTexture *);
+
+  void installRootColormap(void);
+  void removeImage(Pixmap);
+  void getColorTables(unsigned char **, unsigned char **, unsigned char **,
+                      int *, int *, int *, int *, int *, int *);
+  void getXColorTable(XColor **, int *);
+  void getGradientBuffers(unsigned int, unsigned int,
+                          unsigned int **, unsigned int **);
+  void setDither(Bool d) { dither = d; }
+  void setColorsPerChannel(int);
+  void parseTexture(BTexture *, char *);
+  void parseColor(BColor *, char * = 0);
+
+  virtual void timeout(void);
+};
+
+
+#endif // __Image_hh
+
diff --git a/src/LinkedList.cc b/src/LinkedList.cc
new file mode 100644
index 00000000..8e066965
--- /dev/null
+++ b/src/LinkedList.cc
@@ -0,0 +1,356 @@
+// LinkedList.cc for Openbox
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+// DEALINGS IN THE SOFTWARE.
+  
+// stupid macros needed to access some functions in version 2 of the GNU C 
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#include "LinkedList.h"
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+
+__llist_iterator::__llist_iterator(__llist *l) {
+  // initialize the iterator...
+  list = l;
+
+  if (list) {
+    if (! list->iterators)
+      list->iterators = new __llist;
+
+    list->iterators->insert(this);
+  }
+
+  reset();
+}
+
+
+__llist_iterator::~__llist_iterator(void) {
+  if (list && list->iterators)
+    list->iterators->remove(this);
+}
+
+
+void *__llist_iterator::current(void) {
+  // return the current node data... if any
+  return ((node) ? node->getData() : 0);
+}
+
+
+void __llist_iterator::reset(void) {
+  // update the iterator's current node to the first node in the linked list
+  if (list)
+    node = list->_first;
+}
+
+
+const int __llist_iterator::set(const int index) {
+  // set the current node to index
+  if (list) {
+    if (index < list->elements && index >= 0 && list->_first) {
+      node = list->_first;
+      
+      for (register int i = 0; i < index; i++)
+	node = node->getNext();
+      
+      return 1;
+    }
+  }
+  
+  node = (__llist_node *) 0;
+  return 0;
+}
+
+
+void __llist_iterator::operator++(void) {
+  // iterate to the next node in the list...
+  node = ((node) ? node->getNext() : 0);
+}     
+
+
+void __llist_iterator::operator++(int) {
+  // iterate to the next node in the list...
+  node = ((node) ? node->getNext() : 0);
+}
+
+
+__llist::__llist(void *d) {
+  // initialize the linked list...
+  _first = (__llist_node *) 0;
+  _last = (__llist_node *) 0;
+  iterators = (__llist *) 0;
+  elements = 0;
+  
+  if (d) insert(d);
+}
+
+
+__llist::~__llist(void) {
+  // remove all the items in the list...
+  for (register int i = 0; i < elements; i++)
+    remove(0);
+
+  if (iterators) {
+    __llist_node *n = iterators->_first;
+
+    while (n) {
+      __llist_iterator *p = (__llist_iterator *) n->getData();
+      p->list = (__llist *) 0;
+      p->node = (__llist_node *) 0;
+
+      n = n->getNext();
+    }
+
+    delete iterators;
+  }
+}
+
+
+const int __llist::insert(void *d, int index) {
+  // insert item into linked list at specified index...
+  
+  __llist_node *nnode = new __llist_node;
+  if (! nnode) return -1;
+
+  if ((! _first) || (! _last)) {
+    // list is empty... insert the item as the first item, regardless of the
+    // index given
+    _first = nnode;
+    _first->setData(d);
+    _first->setNext((__llist_node *) 0);
+    _last = _first;
+  } else {
+    if (index == 0) {
+      // if index is 0... prepend the data on the list
+
+      nnode->setData(d);
+      nnode->setNext(_first);
+      
+      _first = nnode;
+    } else if ((index == -1) || (index == elements)) {
+      // if index is -1... append the data on the list
+      
+      nnode->setData(d);
+      nnode->setNext((__llist_node *) 0);
+      _last->setNext(nnode);
+
+      _last = nnode;
+    } else if (index < elements) {
+      // otherwise... insert the item at the position specified by index
+      __llist_node *inode = _first;
+      
+      for (register int i = 1; i < index; i++) {
+	if (inode) {
+	  inode = inode->getNext();
+	} else {
+	  delete nnode;
+	  return -1;
+	}
+      }
+      
+      nnode->setData(d);
+      
+      if ((! inode) || inode == _last) {
+	nnode->setNext((__llist_node *) 0);
+	_last->setNext(nnode);
+	
+	_last = nnode;
+      } else {
+	nnode->setNext(inode->getNext());
+	inode->setNext(nnode);
+      }
+    }
+  }
+  
+  return ++elements;
+}
+
+
+const int __llist::remove(void *d) {
+  // remove list item whose data pointer address matches the pointer address
+  // given
+
+  if ((! _first) || (! _last))
+    return -1;
+  
+  if (_first->getData() == d) {
+    // remove the first item in the list...
+    __llist_node *node = _first;
+    _first = _first->getNext();
+
+    if (iterators && iterators->_first) {
+      __llist_node *n = iterators->_first;
+      while (n) {
+        ((__llist_iterator *) n->getData())->reset();
+        n = n->getNext();
+      }
+    }
+ 
+    --elements;
+    delete node;
+    return 0;
+  } else {
+    // iterate through the list and remove the first occurance of the item
+    
+    // NOTE: we don't validate _first in this assignment, because it is checked
+    // for validity above...
+    __llist_node *rnode = _first->getNext(), *prev = _first;
+    
+    for (register int i = 1; i < elements; i++) {
+      if (rnode) {
+	if (rnode->getData() == d) {
+	  // we found the item... update the previous node and delete the
+	  // now useless rnode...
+	  prev->setNext(rnode->getNext());
+	  
+	  if (rnode == _last)
+	    _last = prev;
+
+          if (iterators && iterators->_first) {
+            __llist_node *n = iterators->_first;
+            while (n) {
+              ((__llist_iterator *) n->getData())->reset();
+              n = n->getNext();
+            }
+          }
+
+	  --elements;
+	  delete rnode;
+	  return i;
+	} else {
+	  prev = rnode;
+	  rnode = rnode->getNext();
+	}
+      }
+    }
+    
+    return -1;
+  }
+}
+
+
+void *__llist::remove(const int index) {
+  if (index >= elements || index < 0 || (! _first) || (! _last))
+    return (void *) 0;
+
+  // remove list item at specified index within the list
+  if (index == 0) {
+    // remove the first item in the list...
+    __llist_node *node = _first;
+    void *data_return = _first->getData();
+    
+    _first = _first->getNext();
+
+    if (iterators && iterators->_first) {
+      __llist_node *n = iterators->_first;
+      while (n) {
+        ((__llist_iterator *) n->getData())->reset();
+        n = n->getNext();
+      }
+    }
+
+    --elements;
+    delete node;
+
+    return data_return;
+  } else {
+    __llist_node *rnode = _first->getNext(), *prev = _first;
+    void *data_return = (void *) 0;
+    
+    for (register int i = 1; i < index; i++) {
+      if (rnode) {
+	prev = rnode;
+	rnode = rnode->getNext();
+      } else {
+	return (void *) 0;
+      }
+    }
+    
+    if (! rnode) return (void *) 0;
+    
+    prev->setNext(rnode->getNext());
+    data_return = rnode->getData();
+    
+    if (rnode == _last)
+      _last = prev;
+
+    if (iterators && iterators->_first) {
+      __llist_node *n = iterators->_first;
+      while (n) {
+        ((__llist_iterator *) n->getData())->reset();
+        n = n->getNext();
+      }
+    }
+
+    --elements;
+    data_return = rnode->getData();
+    delete rnode;
+    return data_return;
+  }
+  
+  return (void *) 0;
+}
+
+
+void *__llist::find(const int index) {
+  if (index >= elements || index < 0 || (! _first) || (! _last))
+    return (void *) 0;
+
+  if (index == 0)                 // return the first item
+    return first();
+  if (index == (elements - 1))    // return the last item
+    return last();
+
+  __llist_node *fnode = _first->getNext();
+    
+  for (register int i = 1; i < index; i++) {
+    if (fnode)
+      fnode = fnode->getNext();
+    else
+      return (void *) 0;
+  }
+    
+  return fnode->getData();
+}
+
+
+void *__llist::first(void) {
+  if (_first)
+    return _first->getData();
+  
+  return (void *) 0;
+}
+
+
+void *__llist::last(void) {
+  if (_last)
+    return _last->getData();
+  
+  return (void *) 0;
+}
diff --git a/src/LinkedList.h b/src/LinkedList.h
new file mode 100644
index 00000000..ba546163
--- /dev/null
+++ b/src/LinkedList.h
@@ -0,0 +1,130 @@
+// LinkedList.h for Openbox
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+// DEALINGS IN THE SOFTWARE.
+  
+#ifndef   __LinkedList_hh
+#define   __LinkedList_hh
+
+
+class __llist_node {
+private:
+  __llist_node *next;
+  void *data;
+
+protected:
+
+public:
+  __llist_node(void) { next = (__llist_node *) 0; data = (void *) 0; }
+
+  inline __llist_node *getNext(void) { return next; }
+
+  inline void *getData(void) { return data; }
+  inline void setData(void *d) { data = d; }
+  inline void setNext(__llist_node *n) { next = n; }
+};
+
+
+// forward declaration
+class __llist;
+
+
+class __llist_iterator {
+private:
+  __llist *list;
+  __llist_node *node;
+
+  friend class __llist;
+
+
+protected:
+  __llist_iterator(__llist *);
+  ~__llist_iterator(void);
+
+  const int set(const int);
+
+  void *current(void);
+  void reset(void);
+
+  void operator++(void);
+  void operator++(int);
+};
+
+
+class __llist {
+private:
+  int elements;
+  __llist_node *_first, *_last;
+  __llist *iterators;
+
+  friend class __llist_iterator;
+
+
+protected:
+  __llist(void * = 0);
+  ~__llist(void);
+
+  inline const int &count(void) const { return elements; }
+  inline const int empty(void) const { return (elements == 0); }
+
+  const int insert(void *, int = -1);
+  const int remove(void *);
+  
+  void *find(const int);
+  void *remove(const int);
+  void *first(void);
+  void *last(void);
+};
+
+
+template 
+class LinkedListIterator : public __llist_iterator {
+public:
+  LinkedListIterator(__llist *d = 0) : __llist_iterator(d) { return; }
+
+  inline Z *current(void) { return (Z *) __llist_iterator::current(); }
+
+  inline const int set(const int i) { return __llist_iterator::set(i); }
+
+  inline void reset(void) { __llist_iterator::reset(); }
+ 
+  inline void operator++(void) { __llist_iterator::operator++(); } 
+  inline void operator++(int) { __llist_iterator::operator++(0); }
+};
+
+
+template 
+class LinkedList : public __llist {
+public:
+  LinkedList(Z *d = 0) : __llist(d) { return; }
+  
+  inline Z *find(const int i) { return (Z *) __llist::find(i); }
+  inline Z *remove(const int i) { return (Z *) __llist::remove(i); }
+  inline Z *first(void) { return (Z *) __llist::first(); }
+  inline Z *last(void) { return (Z *) __llist::last(); }
+  
+  inline const int count(void) const { return __llist::count(); }
+  inline const int empty(void) const { return __llist::empty(); }
+  
+  inline const int insert(Z *d, int i = -1) { return __llist::insert((void *) d, i); }
+  inline const int remove(Z *d) { return __llist::remove((void *) d); }
+};
+
+
+#endif // __LinkedList_hh
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 00000000..f5b0b09e
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,108 @@
+# src/Makefile.am for Openbox
+# Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+#
+# 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+# DEALINGS IN THE SOFTWARE.
+
+DEFAULT_MENU=$(pkgdatadir)/menu
+DEFAULT_STYLE=$(pkgdatadir)/styles/steelblue
+
+CPPFLAGS= @CPPFLAGS@ @SHAPE@ @SLIT@ @INTERLACE@ @ORDEREDPSEUDO@ \
+@DEBUG@ @NEWWMSPEC@ @NLS@ @TIMEDCACHE@ @CLOBBER@ \
+-DLOCALEPATH=\"$(pkgdatadir)/nls\" \
+-DDEFAULTMENU=\"$(DEFAULT_MENU)\" \
+-DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\"
+
+bin_PROGRAMS= openbox
+
+openbox_SOURCES= BaseDisplay.cc Basemenu.cc Clientmenu.cc Configmenu.cc Iconmenu.cc Image.cc LinkedList.cc Netizen.cc Rootmenu.cc Screen.cc Slit.cc Timer.cc Toolbar.cc Window.cc Windowmenu.cc Workspace.cc Workspacemenu.cc openbox.cc bsd-snprintf.c i18n.cc main.cc
+
+MAINTAINERCLEANFILES= Makefile.in
+
+distclean-local:
+	rm -f *\~ *.orig *.rej
+
+# local dependencies
+
+BaseDisplay.o: BaseDisplay.cc i18n.h BaseDisplay.h LinkedList.h \
+ Timer.h
+Basemenu.o: Basemenu.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Screen.h Configmenu.h Netizen.h Rootmenu.h \
+ Workspace.h Workspacemenu.h
+Clientmenu.o: Clientmenu.cc openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Clientmenu.h Workspace.h Screen.h Configmenu.h Netizen.h \
+ Rootmenu.h Workspacemenu.h
+Configmenu.o: Configmenu.cc i18n.h Configmenu.h Basemenu.h \
+ LinkedList.h Screen.h BaseDisplay.h Timer.h Iconmenu.h Netizen.h \
+ Rootmenu.h Workspace.h Workspacemenu.h openbox.h Image.h \
+ Window.h Windowmenu.h Slit.h Toolbar.h
+Icon.o: Iconmenu.cc i18n.h openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Screen.h Configmenu.h Netizen.h Rootmenu.h Workspace.h \
+ Workspacemenu.h Toolbar.h
+Image.o: Image.cc i18n.h BaseDisplay.h LinkedList.h Timer.h \
+ Image.h
+LinkedList.o: LinkedList.cc LinkedList.h
+Netizen.o: Netizen.cc Netizen.h BaseDisplay.h LinkedList.h Timer.h \
+ Screen.h Configmenu.h Basemenu.h openbox.h Image.h Window.h \
+ Iconmenu.h Windowmenu.h Slit.h Rootmenu.h Workspace.h \
+ Workspacemenu.h
+Rootmenu.o: Rootmenu.cc openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Rootmenu.h Screen.h Configmenu.h Netizen.h Workspace.h \
+ Workspacemenu.h
+Screen.o: Screen.cc i18n.h bsd-snprintf.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Clientmenu.h Workspace.h Screen.h Configmenu.h \
+ Netizen.h Rootmenu.h Workspacemenu.h Toolbar.h
+Slit.o: Slit.cc i18n.h openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Screen.h Configmenu.h Netizen.h Rootmenu.h Workspace.h \
+ Workspacemenu.h Toolbar.h
+Timer.o: Timer.cc BaseDisplay.h LinkedList.h Timer.h
+Toolbar.o: Toolbar.cc i18n.h openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Clientmenu.h Workspace.h Rootmenu.h Screen.h Configmenu.h \
+ Netizen.h Workspacemenu.h Toolbar.h
+Window.o: Window.cc i18n.h openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Screen.h Configmenu.h Netizen.h Rootmenu.h Workspace.h \
+ Workspacemenu.h Toolbar.h
+Windowmenu.o: Windowmenu.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Screen.h Configmenu.h Netizen.h Rootmenu.h \
+ Workspace.h Workspacemenu.h
+Workspace.o: Workspace.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Clientmenu.h Workspace.h Screen.h \
+ Configmenu.h Netizen.h Rootmenu.h Workspacemenu.h Toolbar.h
+Workspacemenu.o: Workspacemenu.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Screen.h Configmenu.h Netizen.h Rootmenu.h \
+ Workspace.h Workspacemenu.h Toolbar.h
+openbox.o: openbox.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Clientmenu.h Workspace.h Rootmenu.h \
+ Screen.h Configmenu.h Netizen.h Workspacemenu.h Toolbar.h
+bsd-snprintf.o: bsd-snprintf.c bsd-snprintf.h
+i18n.o: i18n.cc i18n.h
+main.o: main.cc ../version.h i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 00000000..7b8d140b
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,462 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# src/Makefile.am for Openbox
+# Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+#
+# 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+# DEALINGS IN THE SOFTWARE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+DEFAULT_MENU = $(pkgdatadir)/menu
+DEFAULT_STYLE = $(pkgdatadir)/styles/steelblue
+
+CPPFLAGS = @CPPFLAGS@ @SHAPE@ @SLIT@ @INTERLACE@ @ORDEREDPSEUDO@ @DEBUG@ @NEWWMSPEC@ @NLS@ @TIMEDCACHE@ @CLOBBER@ -DLOCALEPATH=\"$(pkgdatadir)/nls\" -DDEFAULTMENU=\"$(DEFAULT_MENU)\" -DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\"
+
+
+bin_PROGRAMS = openbox
+
+openbox_SOURCES = BaseDisplay.cc Basemenu.cc Clientmenu.cc Configmenu.cc Iconmenu.cc Image.cc LinkedList.cc Netizen.cc Rootmenu.cc Screen.cc Slit.cc Timer.cc Toolbar.cc Window.cc Windowmenu.cc Workspace.cc Workspacemenu.cc openbox.cc bsd-snprintf.c i18n.cc main.cc
+
+MAINTAINERCLEANFILES = Makefile.in
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+PROGRAMS =  $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+openbox_OBJECTS =  BaseDisplay.o Basemenu.o Clientmenu.o Configmenu.o \
+Iconmenu.o Image.o LinkedList.o Netizen.o Rootmenu.o Screen.o Slit.o \
+Timer.o Toolbar.o Window.o Windowmenu.o Workspace.o Workspacemenu.o \
+openbox.o bsd-snprintf.o i18n.o main.o
+openbox_LDADD = $(LDADD)
+openbox_DEPENDENCIES = 
+openbox_LDFLAGS = 
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+DEP_FILES =  .deps/BaseDisplay.P .deps/Basemenu.P .deps/Clientmenu.P \
+.deps/Configmenu.P .deps/Iconmenu.P .deps/Image.P .deps/LinkedList.P \
+.deps/Netizen.P .deps/Rootmenu.P .deps/Screen.P .deps/Slit.P \
+.deps/Timer.P .deps/Toolbar.P .deps/Window.P .deps/Windowmenu.P \
+.deps/Workspace.P .deps/Workspacemenu.P .deps/bsd-snprintf.P \
+.deps/i18n.P .deps/main.P .deps/openbox.P
+SOURCES = $(openbox_SOURCES)
+OBJECTS = $(openbox_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cc .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo "  $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+	     $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	done
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+openbox: $(openbox_OBJECTS) $(openbox_DEPENDENCIES)
+	@rm -f openbox
+	$(CXXLINK) $(openbox_LDFLAGS) $(openbox_OBJECTS) $(openbox_LDADD) $(LIBS)
+.cc.o:
+	$(CXXCOMPILE) -c $<
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu src/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+	-rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+	@echo '$(COMPILE) -c $<'; \
+	$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-cp .deps/$(*F).pp .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	    >> .deps/$(*F).P; \
+	rm .deps/$(*F).pp
+
+%.lo: %.c
+	@echo '$(LTCOMPILE) -c $<'; \
+	$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-sed -e 's/^\([^:]*\)\.o[ 	]*:/\1.lo \1.o :/' \
+	  < .deps/$(*F).pp > .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	    >> .deps/$(*F).P; \
+	rm -f .deps/$(*F).pp
+
+%.o: %.cc
+	@echo '$(CXXCOMPILE) -c $<'; \
+	$(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-cp .deps/$(*F).pp .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	    >> .deps/$(*F).P; \
+	rm .deps/$(*F).pp
+
+%.lo: %.cc
+	@echo '$(LTCXXCOMPILE) -c $<'; \
+	$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-sed -e 's/^\([^:]*\)\.o[ 	]*:/\1.lo \1.o :/' \
+	  < .deps/$(*F).pp > .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	    >> .deps/$(*F).P; \
+	rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-compile \
+		mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-binPROGRAMS clean-compile clean-tags clean-depend \
+		clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-binPROGRAMS distclean-compile distclean-tags \
+		distclean-depend distclean-generic clean-am \
+		distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-binPROGRAMS \
+		maintainer-clean-compile maintainer-clean-tags \
+		maintainer-clean-depend maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir mostlyclean-depend \
+distclean-depend clean-depend maintainer-clean-depend info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+distclean-local:
+	rm -f *\~ *.orig *.rej
+
+# local dependencies
+
+BaseDisplay.o: BaseDisplay.cc i18n.h BaseDisplay.h LinkedList.h \
+ Timer.h
+Basemenu.o: Basemenu.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Screen.h Configmenu.h Netizen.h Rootmenu.h \
+ Workspace.h Workspacemenu.h
+Clientmenu.o: Clientmenu.cc openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Clientmenu.h Workspace.h Screen.h Configmenu.h Netizen.h \
+ Rootmenu.h Workspacemenu.h
+Configmenu.o: Configmenu.cc i18n.h Configmenu.h Basemenu.h \
+ LinkedList.h Screen.h BaseDisplay.h Timer.h Iconmenu.h Netizen.h \
+ Rootmenu.h Workspace.h Workspacemenu.h openbox.h Image.h \
+ Window.h Windowmenu.h Slit.h Toolbar.h
+Icon.o: Iconmenu.cc i18n.h openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Screen.h Configmenu.h Netizen.h Rootmenu.h Workspace.h \
+ Workspacemenu.h Toolbar.h
+Image.o: Image.cc i18n.h BaseDisplay.h LinkedList.h Timer.h \
+ Image.h
+LinkedList.o: LinkedList.cc LinkedList.h
+Netizen.o: Netizen.cc Netizen.h BaseDisplay.h LinkedList.h Timer.h \
+ Screen.h Configmenu.h Basemenu.h openbox.h Image.h Window.h \
+ Iconmenu.h Windowmenu.h Slit.h Rootmenu.h Workspace.h \
+ Workspacemenu.h
+Rootmenu.o: Rootmenu.cc openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Rootmenu.h Screen.h Configmenu.h Netizen.h Workspace.h \
+ Workspacemenu.h
+Screen.o: Screen.cc i18n.h bsd-snprintf.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Clientmenu.h Workspace.h Screen.h Configmenu.h \
+ Netizen.h Rootmenu.h Workspacemenu.h Toolbar.h
+Slit.o: Slit.cc i18n.h openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Screen.h Configmenu.h Netizen.h Rootmenu.h Workspace.h \
+ Workspacemenu.h Toolbar.h
+Timer.o: Timer.cc BaseDisplay.h LinkedList.h Timer.h
+Toolbar.o: Toolbar.cc i18n.h openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Clientmenu.h Workspace.h Rootmenu.h Screen.h Configmenu.h \
+ Netizen.h Workspacemenu.h Toolbar.h
+Window.o: Window.cc i18n.h openbox.h BaseDisplay.h LinkedList.h \
+ Timer.h Image.h Window.h Iconmenu.h Basemenu.h Windowmenu.h Slit.h \
+ Screen.h Configmenu.h Netizen.h Rootmenu.h Workspace.h \
+ Workspacemenu.h Toolbar.h
+Windowmenu.o: Windowmenu.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Screen.h Configmenu.h Netizen.h Rootmenu.h \
+ Workspace.h Workspacemenu.h
+Workspace.o: Workspace.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Clientmenu.h Workspace.h Screen.h \
+ Configmenu.h Netizen.h Rootmenu.h Workspacemenu.h Toolbar.h
+Workspacemenu.o: Workspacemenu.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Screen.h Configmenu.h Netizen.h Rootmenu.h \
+ Workspace.h Workspacemenu.h Toolbar.h
+openbox.o: openbox.cc i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h Clientmenu.h Workspace.h Rootmenu.h \
+ Screen.h Configmenu.h Netizen.h Workspacemenu.h Toolbar.h
+bsd-snprintf.o: bsd-snprintf.c bsd-snprintf.h
+i18n.o: i18n.cc i18n.h
+main.o: main.cc ../version.h i18n.h openbox.h BaseDisplay.h \
+ LinkedList.h Timer.h Image.h Window.h Iconmenu.h Basemenu.h \
+ Windowmenu.h Slit.h
+
+# 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:
diff --git a/src/Netizen.cc b/src/Netizen.cc
new file mode 100644
index 00000000..22d47958
--- /dev/null
+++ b/src/Netizen.cc
@@ -0,0 +1,116 @@
+// Netizen.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "Netizen.h"
+#include "Screen.h"
+
+Netizen::Netizen(BScreen *scr, Window win) {
+  screen = scr;
+  basedisplay = screen->getBaseDisplay();
+  window = win;
+
+  event.type = ClientMessage;
+  event.xclient.message_type = basedisplay->getOpenboxStructureMessagesAtom();
+  event.xclient.display = basedisplay->getXDisplay();
+  event.xclient.window = window;
+  event.xclient.format = 32;
+  event.xclient.data.l[0] = basedisplay->getOpenboxNotifyStartupAtom();
+  event.xclient.data.l[1] = event.xclient.data.l[2] =
+    event.xclient.data.l[3] = event.xclient.data.l[4] = 0l;
+
+  XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event);
+}
+
+
+void Netizen::sendWorkspaceCount(void) {
+  event.xclient.data.l[0] = basedisplay->getOpenboxNotifyWorkspaceCountAtom();
+  event.xclient.data.l[1] = screen->getCount();
+
+  XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event);
+}
+
+
+void Netizen::sendCurrentWorkspace(void) {
+  event.xclient.data.l[0] = basedisplay->getOpenboxNotifyCurrentWorkspaceAtom();
+  event.xclient.data.l[1] = screen->getCurrentWorkspaceID();
+
+  XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event);
+}
+
+
+void Netizen::sendWindowFocus(Window w) {
+  event.xclient.data.l[0] = basedisplay->getOpenboxNotifyWindowFocusAtom();
+  event.xclient.data.l[1] = w;
+
+  XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event);
+}
+
+
+void Netizen::sendWindowAdd(Window w, unsigned long p) {
+  event.xclient.data.l[0] = basedisplay->getOpenboxNotifyWindowAddAtom();
+  event.xclient.data.l[1] = w;
+  event.xclient.data.l[2] = p;
+
+  XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event);
+
+  event.xclient.data.l[2] = 0l;
+}
+
+
+void Netizen::sendWindowDel(Window w) {
+  event.xclient.data.l[0] = basedisplay->getOpenboxNotifyWindowDelAtom();
+  event.xclient.data.l[1] = w;
+
+  XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event);
+}
+
+
+void Netizen::sendWindowRaise(Window w) {
+  event.xclient.data.l[0] = basedisplay->getOpenboxNotifyWindowRaiseAtom();
+  event.xclient.data.l[1] = w;
+
+  XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event);
+}
+
+
+void Netizen::sendWindowLower(Window w) {
+  event.xclient.data.l[0] = basedisplay->getOpenboxNotifyWindowLowerAtom();
+  event.xclient.data.l[1] = w;
+
+  XSendEvent(basedisplay->getXDisplay(), window, False, NoEventMask, &event);
+}
+
+
+void Netizen::sendConfigNotify(XEvent *e) {
+  XSendEvent(basedisplay->getXDisplay(), window, False,
+             StructureNotifyMask, e);
+}
diff --git a/src/Netizen.h b/src/Netizen.h
new file mode 100644
index 00000000..85480f7b
--- /dev/null
+++ b/src/Netizen.h
@@ -0,0 +1,60 @@
+// Netizen.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Netizen_hh
+#define   __Netizen_hh
+
+#include 
+
+// forward declaration
+class BaseDisplay;
+class BScreen;
+class Netizen;
+
+class Netizen {
+private:
+  BaseDisplay *basedisplay;
+  BScreen *screen;
+  Window window;
+  XEvent event;
+
+protected:
+
+public:
+  Netizen(BScreen *, Window);
+
+  inline const Window &getWindowID(void) const { return window; }
+
+  void sendWorkspaceCount(void);
+  void sendCurrentWorkspace(void);
+
+  void sendWindowFocus(Window);
+  void sendWindowAdd(Window, unsigned long);
+  void sendWindowDel(Window);
+  void sendWindowRaise(Window);
+  void sendWindowLower(Window);
+
+  void sendConfigNotify(XEvent *);
+};
+
+
+#endif // __Netizen_hh
diff --git a/src/Rootmenu.cc b/src/Rootmenu.cc
new file mode 100644
index 00000000..ddb29855
--- /dev/null
+++ b/src/Rootmenu.cc
@@ -0,0 +1,113 @@
+// Rootmenu.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "openbox.h"
+#include "Rootmenu.h"
+#include "Screen.h"
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_SYS_PARAM_H
+#  include 
+#endif // HAVE_SYS_PARAM_H
+
+#ifndef   MAXPATHLEN
+#define   MAXPATHLEN 255
+#endif // MAXPATHLEN
+
+
+Rootmenu::Rootmenu(BScreen *scrn) : Basemenu(scrn) {
+  screen = scrn;
+  openbox = screen->getOpenbox();
+}
+
+
+void Rootmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+
+  if (!item->function())
+    return;
+
+  switch (item->function()) {
+  case BScreen::Execute:
+    if (item->exec()) {
+#ifndef    __EMX__
+      char displaystring[MAXPATHLEN];
+      sprintf(displaystring, "DISPLAY=%s",
+	      DisplayString(screen->getBaseDisplay()->getXDisplay()));
+      sprintf(displaystring + strlen(displaystring) - 1, "%d",
+	      screen->getScreenNumber());
+
+      bexec(item->exec(), displaystring);
+#else //   __EMX__
+      spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", item->exec(), NULL);
+#endif // !__EMX__
+    }
+    break;
+
+  case BScreen::Restart:
+    openbox->restart();
+    break;
+
+  case BScreen::RestartOther:
+    if (item->exec())
+      openbox->restart(item->exec());
+    break;
+
+  case BScreen::Exit:
+    openbox->shutdown();
+    break;
+
+  case BScreen::SetStyle:
+    if (item->exec())
+      openbox->saveStyleFilename(item->exec());
+
+  case BScreen::Reconfigure:
+    openbox->reconfigure();
+    return;
+  }
+
+  if (! (screen->getRootmenu()->isTorn() || isTorn()) &&
+      item->function() != BScreen::Reconfigure &&
+      item->function() != BScreen::SetStyle)
+    hide();
+}
diff --git a/src/Rootmenu.h b/src/Rootmenu.h
new file mode 100644
index 00000000..076819f1
--- /dev/null
+++ b/src/Rootmenu.h
@@ -0,0 +1,51 @@
+// Rootmenu.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Rootmenu_hh
+#define   __Rootmenu_hh
+
+// forward declarations
+class Rootmenu;
+
+class Openbox;
+class BScreen;
+
+#include "Basemenu.h"
+
+
+class Rootmenu : public Basemenu {
+private:
+  Openbox *openbox;
+  BScreen *screen;
+
+
+protected:
+  virtual void itemSelected(int, int);
+
+
+public:
+  Rootmenu(BScreen *);
+};
+
+
+#endif // __Rootmenu_hh
+
diff --git a/src/Screen.cc b/src/Screen.cc
new file mode 100644
index 00000000..13c69bfa
--- /dev/null
+++ b/src/Screen.cc
@@ -0,0 +1,2281 @@
+// Screen.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include 
+#include 
+#include 
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Clientmenu.h"
+#include "Iconmenu.h"
+#include "Image.h"
+#include "Screen.h"
+
+#ifdef    SLIT
+#include "Slit.h"
+#endif // SLIT
+
+#include "Rootmenu.h"
+#include "Toolbar.h"
+#include "Window.h"
+#include "Workspace.h"
+#include "Workspacemenu.h"
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_CTYPE_H
+#  include 
+#endif // HAVE_CTYPE_H
+
+#ifdef    HAVE_DIRENT_H
+#  include 
+#endif // HAVE_DIRENT_H
+
+#ifdef    HAVE_LOCALE_H
+#  include 
+#endif // HAVE_LOCALE_H
+
+#ifdef    HAVE_UNISTD_H
+#  include 
+#  include 
+#endif // HAVE_UNISTD_H
+
+#ifdef    HAVE_SYS_STAT_H
+#  include 
+#endif // HAVE_SYS_STAT_H
+
+#ifdef    HAVE_STDARG_H
+#  include 
+#endif // HAVE_STDARG_H
+
+#ifndef    HAVE_SNPRINTF
+#  include "bsd-snprintf.h"
+#endif // !HAVE_SNPRINTF
+
+#ifndef   MAXPATHLEN
+#define   MAXPATHLEN 255
+#endif // MAXPATHLEN
+
+#ifndef   FONT_ELEMENT_SIZE
+#define   FONT_ELEMENT_SIZE 50
+#endif // FONT_ELEMENT_SIZE
+
+#include 
+
+static Bool running = True;
+
+static int anotherWMRunning(Display *display, XErrorEvent *) {
+  fprintf(stderr, i18n->getMessage(ScreenSet, ScreenAnotherWMRunning,
+     "BScreen::BScreen: an error occured while querying the X server.\n"
+	     "  another window manager already running on display %s.\n"),
+          DisplayString(display));
+
+  running = False;
+
+  return(-1);
+}
+
+struct dcmp {
+  bool operator()(const char *one, const char *two) const {
+    return (strcmp(one, two) < 0) ? True : False;
+  }
+};
+
+#ifndef    HAVE_STRCASESTR
+static const char * strcasestr(const char *str, const char *ptn) {
+  const char *s2, *p2;
+  for( ; *str; str++) {
+    for(s2=str,p2=ptn; ; s2++,p2++) {
+      if (!*p2) return str;
+      if (toupper(*s2) != toupper(*p2)) break;
+    }
+  }
+  return NULL;
+}
+#endif // HAVE_STRCASESTR
+
+static const char *getFontElement(const char *pattern, char *buf, int bufsiz, ...) {
+  const char *p, *v;
+  char *p2;
+  va_list va;
+
+  va_start(va, bufsiz);
+  buf[bufsiz-1] = 0;
+  buf[bufsiz-2] = '*';
+  while((v = va_arg(va, char *)) != NULL) {
+    p = strcasestr(pattern, v);
+    if (p) {
+      strncpy(buf, p+1, bufsiz-2);
+      p2 = strchr(buf, '-');
+      if (p2) *p2=0;
+      va_end(va);
+      return p;
+    }
+  }
+  va_end(va);
+  strncpy(buf, "*", bufsiz);
+  return NULL;
+}
+
+static const char *getFontSize(const char *pattern, int *size) {
+  const char *p;
+  const char *p2=NULL;
+  int n=0;
+
+  for (p=pattern; 1; p++) {
+    if (!*p) {
+      if (p2!=NULL && n>1 && n<72) {
+	*size = n; return p2+1;
+      } else {
+	*size = 16; return NULL;
+      }
+    } else if (*p=='-') {
+      if (n>1 && n<72 && p2!=NULL) {
+	*size = n;
+	return p2+1;
+      }
+      p2=p; n=0;
+    } else if (*p>='0' && *p<='9' && p2!=NULL) {
+      n *= 10;
+      n += *p-'0';
+    } else {
+      p2=NULL; n=0;
+    }
+  }
+}
+
+
+BScreen::BScreen(Openbox *bb, int scrn) : ScreenInfo(bb, scrn) {
+  openbox = bb;
+
+  event_mask = ColormapChangeMask | EnterWindowMask | PropertyChangeMask |
+	       SubstructureRedirectMask | KeyPressMask | KeyReleaseMask |
+	       ButtonPressMask | ButtonReleaseMask;
+
+  XErrorHandler old = XSetErrorHandler((XErrorHandler) anotherWMRunning);
+  XSelectInput(getBaseDisplay()->getXDisplay(), getRootWindow(), event_mask);
+  XSync(getBaseDisplay()->getXDisplay(), False);
+  XSetErrorHandler((XErrorHandler) old);
+
+  managed = running;
+  if (! managed) return;
+
+  fprintf(stderr, i18n->getMessage(ScreenSet, ScreenManagingScreen,
+		     "BScreen::BScreen: managing screen %d "
+		     "using visual 0x%lx, depth %d\n"),
+	  getScreenNumber(), XVisualIDFromVisual(getVisual()),
+          getDepth());
+
+  rootmenu = 0;
+  resource.stylerc = 0;
+
+  resource.mstyle.t_fontset = resource.mstyle.f_fontset =
+    resource.tstyle.fontset = resource.wstyle.fontset = (XFontSet) 0;
+  resource.mstyle.t_font = resource.mstyle.f_font = resource.tstyle.font =
+    resource.wstyle.font = (XFontStruct *) 0;
+  resource.root_command = NULL;
+
+#ifdef    HAVE_STRFTIME
+  resource.strftime_format = 0;
+#endif // HAVE_STRFTIME
+
+#ifdef    HAVE_GETPID
+  pid_t bpid = getpid();
+
+  XChangeProperty(getBaseDisplay()->getXDisplay(), getRootWindow(),
+                  openbox->getOpenboxPidAtom(), XA_CARDINAL,
+                  sizeof(pid_t) * 8, PropModeReplace,
+                  (unsigned char *) &bpid, 1);
+#endif // HAVE_GETPID
+
+  XDefineCursor(getBaseDisplay()->getXDisplay(), getRootWindow(),
+                openbox->getSessionCursor());
+
+  workspaceNames = new LinkedList;
+  workspacesList = new LinkedList;
+  rootmenuList = new LinkedList;
+  netizenList = new LinkedList;
+  iconList = new LinkedList;
+
+  image_control =
+    new BImageControl(openbox, this, True, openbox->getColorsPerChannel(),
+                      openbox->getCacheLife(), openbox->getCacheMax());
+  image_control->installRootColormap();
+  root_colormap_installed = True;
+
+  openbox->load_rc(this);
+
+  image_control->setDither(resource.image_dither);
+
+  LoadStyle();
+
+  XGCValues gcv;
+  unsigned long gc_value_mask = GCForeground;
+  if (! i18n->multibyte()) gc_value_mask |= GCFont;
+
+  gcv.foreground = WhitePixel(getBaseDisplay()->getXDisplay(),
+			      getScreenNumber())
+                 ^ BlackPixel(getBaseDisplay()->getXDisplay(),
+			      getScreenNumber());
+  gcv.function = GXxor;
+  gcv.subwindow_mode = IncludeInferiors;
+  opGC = XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+                   GCForeground | GCFunction | GCSubwindowMode, &gcv);
+
+  gcv.foreground = resource.wstyle.l_text_focus.getPixel();
+  if (resource.wstyle.font)
+    gcv.font = resource.wstyle.font->fid;
+  resource.wstyle.l_text_focus_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.wstyle.l_text_unfocus.getPixel();
+  if (resource.wstyle.font)
+    gcv.font = resource.wstyle.font->fid;
+  resource.wstyle.l_text_unfocus_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.wstyle.b_pic_focus.getPixel();
+  resource.wstyle.b_pic_focus_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      GCForeground, &gcv);
+
+  gcv.foreground = resource.wstyle.b_pic_unfocus.getPixel();
+  resource.wstyle.b_pic_unfocus_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      GCForeground, &gcv);
+
+  gcv.foreground = resource.mstyle.t_text.getPixel();
+  if (resource.mstyle.t_font)
+    gcv.font = resource.mstyle.t_font->fid;
+  resource.mstyle.t_text_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.mstyle.f_text.getPixel();
+  if (resource.mstyle.f_font)
+    gcv.font = resource.mstyle.f_font->fid;
+  resource.mstyle.f_text_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.mstyle.h_text.getPixel();
+  resource.mstyle.h_text_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.mstyle.d_text.getPixel();
+  resource.mstyle.d_text_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.mstyle.hilite.getColor()->getPixel();
+  resource.mstyle.hilite_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.tstyle.l_text.getPixel();
+  if (resource.tstyle.font)
+    gcv.font = resource.tstyle.font->fid;
+  resource.tstyle.l_text_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.tstyle.w_text.getPixel();
+  resource.tstyle.w_text_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.tstyle.c_text.getPixel();
+  resource.tstyle.c_text_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  gcv.foreground = resource.tstyle.b_pic.getPixel();
+  resource.tstyle.b_pic_gc =
+    XCreateGC(getBaseDisplay()->getXDisplay(), getRootWindow(),
+	      gc_value_mask, &gcv);
+
+  const char *s =  i18n->getMessage(ScreenSet, ScreenPositionLength,
+				    "0: 0000 x 0: 0000");
+  int l = strlen(s);
+
+  if (i18n->multibyte()) {
+    XRectangle ink, logical;
+    XmbTextExtents(resource.wstyle.fontset, s, l, &ink, &logical);
+    geom_w = logical.width;
+
+    geom_h = resource.wstyle.fontset_extents->max_ink_extent.height;
+  } else {
+    geom_h = resource.wstyle.font->ascent +
+	     resource.wstyle.font->descent;
+
+    geom_w = XTextWidth(resource.wstyle.font, s, l);
+  }
+
+  geom_w += (resource.bevel_width * 2);
+  geom_h += (resource.bevel_width * 2);
+
+  XSetWindowAttributes attrib;
+  unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder;
+  attrib.border_pixel = getBorderColor()->getPixel();
+  attrib.colormap = getColormap();
+  attrib.save_under = True;
+
+  geom_window =
+    XCreateWindow(getBaseDisplay()->getXDisplay(), getRootWindow(),
+                  0, 0, geom_w, geom_h, resource.border_width, getDepth(),
+                  InputOutput, getVisual(), mask, &attrib);
+  geom_visible = False;
+
+  if (resource.wstyle.l_focus.getTexture() & BImage_ParentRelative) {
+    if (resource.wstyle.t_focus.getTexture() ==
+	                              (BImage_Flat | BImage_Solid)) {
+      geom_pixmap = None;
+      XSetWindowBackground(getBaseDisplay()->getXDisplay(), geom_window,
+			   resource.wstyle.t_focus.getColor()->getPixel());
+    } else {
+      geom_pixmap = image_control->renderImage(geom_w, geom_h,
+					       &resource.wstyle.t_focus);
+      XSetWindowBackgroundPixmap(getBaseDisplay()->getXDisplay(),
+				 geom_window, geom_pixmap);
+    }
+  } else {
+    if (resource.wstyle.l_focus.getTexture() ==
+	                              (BImage_Flat | BImage_Solid)) {
+      geom_pixmap = None;
+      XSetWindowBackground(getBaseDisplay()->getXDisplay(), geom_window,
+			   resource.wstyle.l_focus.getColor()->getPixel());
+    } else {
+      geom_pixmap = image_control->renderImage(geom_w, geom_h,
+					       &resource.wstyle.l_focus);
+      XSetWindowBackgroundPixmap(getBaseDisplay()->getXDisplay(),
+				 geom_window, geom_pixmap);
+    }
+  }
+
+  workspacemenu = new Workspacemenu(this);
+  iconmenu = new Iconmenu(this);
+  configmenu = new Configmenu(this);
+
+  Workspace *wkspc = (Workspace *) 0;
+  if (resource.workspaces != 0) {
+    for (int i = 0; i < resource.workspaces; ++i) {
+      wkspc = new Workspace(this, workspacesList->count());
+      workspacesList->insert(wkspc);
+      workspacemenu->insert(wkspc->getName(), wkspc->getMenu());
+    }
+  } else {
+    wkspc = new Workspace(this, workspacesList->count());
+    workspacesList->insert(wkspc);
+    workspacemenu->insert(wkspc->getName(), wkspc->getMenu());
+  }
+
+  workspacemenu->insert(i18n->getMessage(IconSet, IconIcons, "Icons"),
+			iconmenu);
+  workspacemenu->update();
+
+  current_workspace = workspacesList->first();
+  workspacemenu->setItemSelected(2, True);
+
+  toolbar = new Toolbar(this);
+
+#ifdef    SLIT
+  slit = new Slit(this);
+#endif // SLIT
+
+  InitMenu();
+
+  raiseWindows(0, 0);
+  rootmenu->update();
+
+  changeWorkspaceID(0);
+
+  int i;
+  unsigned int nchild;
+  Window r, p, *children;
+  XQueryTree(getBaseDisplay()->getXDisplay(), getRootWindow(), &r, &p,
+	     &children, &nchild);
+
+  // preen the window list of all icon windows... for better dockapp support
+  for (i = 0; i < (int) nchild; i++) {
+    if (children[i] == None) continue;
+
+    XWMHints *wmhints = XGetWMHints(getBaseDisplay()->getXDisplay(),
+				    children[i]);
+
+    if (wmhints) {
+      if ((wmhints->flags & IconWindowHint) &&
+	  (wmhints->icon_window != children[i]))
+        for (int j = 0; j < (int) nchild; j++)
+          if (children[j] == wmhints->icon_window) {
+            children[j] = None;
+
+            break;
+          }
+
+      XFree(wmhints);
+    }
+  }
+
+  // manage shown windows
+  for (i = 0; i < (int) nchild; ++i) {
+    if (children[i] == None || (! openbox->validateWindow(children[i])))
+      continue;
+
+    XWindowAttributes attrib;
+    if (XGetWindowAttributes(getBaseDisplay()->getXDisplay(), children[i],
+                             &attrib)) {
+      if (attrib.override_redirect) continue;
+
+      if (attrib.map_state != IsUnmapped) {
+        new OpenboxWindow(openbox, children[i], this);
+
+        OpenboxWindow *win = openbox->searchWindow(children[i]);
+        if (win) {
+          XMapRequestEvent mre;
+          mre.window = children[i];
+          win->restoreAttributes();
+	  win->mapRequestEvent(&mre);
+        }
+      }
+    }
+  }
+
+  if (! resource.sloppy_focus)
+    XSetInputFocus(getBaseDisplay()->getXDisplay(), toolbar->getWindowID(),
+		   RevertToParent, CurrentTime);
+
+  XFree(children);
+  XFlush(getBaseDisplay()->getXDisplay());
+}
+
+
+BScreen::~BScreen(void) {
+  if (! managed) return;
+
+  if (geom_pixmap != None)
+    image_control->removeImage(geom_pixmap);
+
+  if (geom_window != None)
+    XDestroyWindow(getBaseDisplay()->getXDisplay(), geom_window);
+
+  removeWorkspaceNames();
+
+  while (workspacesList->count())
+    delete workspacesList->remove(0);
+
+  while (rootmenuList->count())
+    rootmenuList->remove(0);
+
+  while (iconList->count())
+    delete iconList->remove(0);
+
+  while (netizenList->count())
+    delete netizenList->remove(0);
+
+#ifdef    HAVE_STRFTIME
+  if (resource.strftime_format)
+    delete [] resource.strftime_format;
+#endif // HAVE_STRFTIME
+
+  delete rootmenu;
+  delete workspacemenu;
+  delete iconmenu;
+  delete configmenu;
+
+#ifdef    SLIT
+  delete slit;
+#endif // SLIT
+
+  delete toolbar;
+  delete image_control;
+
+  delete workspacesList;
+  delete workspaceNames;
+  delete rootmenuList;
+  delete iconList;
+  delete netizenList;
+
+  if (resource.wstyle.fontset)
+    XFreeFontSet(getBaseDisplay()->getXDisplay(), resource.wstyle.fontset);
+  if (resource.mstyle.t_fontset)
+    XFreeFontSet(getBaseDisplay()->getXDisplay(), resource.mstyle.t_fontset);
+  if (resource.mstyle.f_fontset)
+    XFreeFontSet(getBaseDisplay()->getXDisplay(), resource.mstyle.f_fontset);
+  if (resource.tstyle.fontset)
+    XFreeFontSet(getBaseDisplay()->getXDisplay(), resource.tstyle.fontset);
+
+  if (resource.wstyle.font)
+    XFreeFont(getBaseDisplay()->getXDisplay(), resource.wstyle.font);
+  if (resource.mstyle.t_font)
+    XFreeFont(getBaseDisplay()->getXDisplay(), resource.mstyle.t_font);
+  if (resource.mstyle.f_font)
+    XFreeFont(getBaseDisplay()->getXDisplay(), resource.mstyle.f_font);
+  if (resource.tstyle.font)
+    XFreeFont(getBaseDisplay()->getXDisplay(), resource.tstyle.font);
+  if (resource.root_command != NULL)
+    delete [] resource.root_command;
+
+  XFreeGC(getBaseDisplay()->getXDisplay(), opGC);
+
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.wstyle.l_text_focus_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.wstyle.l_text_unfocus_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.wstyle.b_pic_focus_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.wstyle.b_pic_unfocus_gc);
+
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.mstyle.t_text_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.mstyle.f_text_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.mstyle.h_text_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.mstyle.d_text_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.mstyle.hilite_gc);
+
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.tstyle.l_text_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.tstyle.w_text_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.tstyle.c_text_gc);
+  XFreeGC(getBaseDisplay()->getXDisplay(),
+	  resource.tstyle.b_pic_gc);
+}
+
+void BScreen::readDatabaseTexture(char *rname, char *rclass,
+				  BTexture *texture,
+				  unsigned long default_pixel)
+{
+  XrmValue value;
+  char *value_type;
+
+  if (XrmGetResource(resource.stylerc, rname, rclass, &value_type,
+		     &value))
+    image_control->parseTexture(texture, value.addr);
+  else
+    texture->setTexture(BImage_Solid | BImage_Flat);
+
+  if (texture->getTexture() & BImage_Solid) {
+    int clen = strlen(rclass) + 32, nlen = strlen(rname) + 32;
+
+    char *colorclass = new char[clen], *colorname = new char[nlen];
+
+    sprintf(colorclass, "%s.Color", rclass);
+    sprintf(colorname,  "%s.color", rname);
+
+    readDatabaseColor(colorname, colorclass, texture->getColor(),
+		      default_pixel);
+
+#ifdef    INTERLACE
+    sprintf(colorclass, "%s.ColorTo", rclass);
+    sprintf(colorname,  "%s.colorTo", rname);
+
+    readDatabaseColor(colorname, colorclass, texture->getColorTo(),
+                      default_pixel);
+#endif // INTERLACE
+
+    delete [] colorclass;
+    delete [] colorname;
+
+    if ((! texture->getColor()->isAllocated()) ||
+	(texture->getTexture() & BImage_Flat))
+      return;
+
+    XColor xcol;
+
+    xcol.red = (unsigned int) (texture->getColor()->getRed() +
+			       (texture->getColor()->getRed() >> 1));
+    if (xcol.red >= 0xff) xcol.red = 0xffff;
+    else xcol.red *= 0xff;
+    xcol.green = (unsigned int) (texture->getColor()->getGreen() +
+				 (texture->getColor()->getGreen() >> 1));
+    if (xcol.green >= 0xff) xcol.green = 0xffff;
+    else xcol.green *= 0xff;
+    xcol.blue = (unsigned int) (texture->getColor()->getBlue() +
+				(texture->getColor()->getBlue() >> 1));
+    if (xcol.blue >= 0xff) xcol.blue = 0xffff;
+    else xcol.blue *= 0xff;
+
+    if (! XAllocColor(getBaseDisplay()->getXDisplay(),
+		      getColormap(), &xcol))
+      xcol.pixel = 0;
+
+    texture->getHiColor()->setPixel(xcol.pixel);
+
+    xcol.red =
+      (unsigned int) ((texture->getColor()->getRed() >> 2) +
+		      (texture->getColor()->getRed() >> 1)) * 0xff;
+    xcol.green =
+      (unsigned int) ((texture->getColor()->getGreen() >> 2) +
+		      (texture->getColor()->getGreen() >> 1)) * 0xff;
+    xcol.blue =
+      (unsigned int) ((texture->getColor()->getBlue() >> 2) +
+		      (texture->getColor()->getBlue() >> 1)) * 0xff;
+
+    if (! XAllocColor(getBaseDisplay()->getXDisplay(),
+		      getColormap(), &xcol))
+      xcol.pixel = 0;
+
+    texture->getLoColor()->setPixel(xcol.pixel);
+  } else if (texture->getTexture() & BImage_Gradient) {
+    int clen = strlen(rclass) + 10, nlen = strlen(rname) + 10;
+
+    char *colorclass = new char[clen], *colorname = new char[nlen],
+      *colortoclass = new char[clen], *colortoname = new char[nlen];
+
+    sprintf(colorclass, "%s.Color", rclass);
+    sprintf(colorname,  "%s.color", rname);
+
+    sprintf(colortoclass, "%s.ColorTo", rclass);
+    sprintf(colortoname,  "%s.colorTo", rname);
+
+    readDatabaseColor(colorname, colorclass, texture->getColor(),
+		      default_pixel);
+    readDatabaseColor(colortoname, colortoclass, texture->getColorTo(),
+		      default_pixel);
+
+    delete [] colorclass;
+    delete [] colorname;
+    delete [] colortoclass;
+    delete [] colortoname;
+  }
+}
+
+
+void BScreen::readDatabaseColor(char *rname, char *rclass, BColor *color,
+				unsigned long default_pixel)
+{
+  XrmValue value;
+  char *value_type;
+
+  if (XrmGetResource(resource.stylerc, rname, rclass, &value_type,
+		     &value)) {
+    image_control->parseColor(color, value.addr);
+  } else {
+    // parsing with no color string just deallocates the color, if it has
+    // been previously allocated
+    image_control->parseColor(color);
+    color->setPixel(default_pixel);
+  }
+}
+
+
+void BScreen::readDatabaseFontSet(char *rname, char *rclass,
+				  XFontSet *fontset) {
+  if (! fontset) return;
+
+  static char *defaultFont = "fixed";
+
+  Bool load_default = False;
+  XrmValue value;
+  char *value_type;
+
+  if (*fontset)
+    XFreeFontSet(getBaseDisplay()->getXDisplay(), *fontset);
+
+  if (XrmGetResource(resource.stylerc, rname, rclass, &value_type, &value)) {
+    char *fontname = value.addr;
+    if (! (*fontset = createFontSet(fontname)))
+      load_default = True;
+  } else {
+    load_default = True;
+  }
+
+  if (load_default) {
+    *fontset = createFontSet(defaultFont);
+
+    if (! *fontset) {
+      fprintf(stderr, i18n->getMessage(ScreenSet, ScreenDefaultFontLoadFail,
+                       "BScreen::LoadStyle(): couldn't load default font.\n"));
+      exit(2);
+    }
+  }
+}
+
+
+void BScreen::readDatabaseFont(char *rname, char *rclass, XFontStruct **font) {
+  if (! font) return;
+
+  static char *defaultFont = "fixed";
+
+  Bool load_default = False;
+  XrmValue value;
+  char *value_type;
+
+  if (*font)
+    XFreeFont(getBaseDisplay()->getXDisplay(), *font);
+
+  if (XrmGetResource(resource.stylerc, rname, rclass, &value_type, &value)) {
+    if ((*font = XLoadQueryFont(getBaseDisplay()->getXDisplay(),
+				value.addr)) == NULL) {
+      fprintf(stderr, i18n->getMessage(ScreenSet, ScreenFontLoadFail,
+			 "BScreen::LoadStyle(): couldn't load font '%s'\n"),
+	      value.addr);
+
+      load_default = True;
+    }
+  } else {
+    load_default = True;
+  }
+
+  if (load_default) {
+    if ((*font = XLoadQueryFont(getBaseDisplay()->getXDisplay(),
+				defaultFont)) == NULL) {
+      fprintf(stderr, i18n->getMessage(ScreenSet, ScreenDefaultFontLoadFail,
+	         "BScreen::LoadStyle(): couldn't load default font.\n"));
+      exit(2);
+    }
+  }
+}
+
+
+XFontSet BScreen::createFontSet(char *fontname) {
+  XFontSet fs;
+  char **missing, *def = "-";
+  int nmissing, pixel_size = 0, buf_size = 0;
+  char weight[FONT_ELEMENT_SIZE], slant[FONT_ELEMENT_SIZE];
+
+  fs = XCreateFontSet(getBaseDisplay()->getXDisplay(),
+		      fontname, &missing, &nmissing, &def);
+  if (fs && (! nmissing)) return fs;
+
+#ifdef    HAVE_SETLOCALE
+  if (! fs) {
+    if (nmissing) XFreeStringList(missing);
+
+    setlocale(LC_CTYPE, "C");
+    fs = XCreateFontSet(getBaseDisplay()->getXDisplay(), fontname,
+			&missing, &nmissing, &def);
+    setlocale(LC_CTYPE, "");
+  }
+#endif // HAVE_SETLOCALE
+
+  if (fs) {
+    XFontStruct **fontstructs;
+    char **fontnames;
+    XFontsOfFontSet(fs, &fontstructs, &fontnames);
+    fontname = fontnames[0];
+  }
+
+  getFontElement(fontname, weight, FONT_ELEMENT_SIZE,
+		 "-medium-", "-bold-", "-demibold-", "-regular-", NULL);
+  getFontElement(fontname, slant, FONT_ELEMENT_SIZE,
+		 "-r-", "-i-", "-o-", "-ri-", "-ro-", NULL);
+  getFontSize(fontname, &pixel_size);
+
+  if (! strcmp(weight, "*")) strncpy(weight, "medium", FONT_ELEMENT_SIZE);
+  if (! strcmp(slant, "*")) strncpy(slant, "r", FONT_ELEMENT_SIZE);
+  if (pixel_size < 3) pixel_size = 3;
+  else if (pixel_size > 97) pixel_size = 97;
+
+  buf_size = strlen(fontname) + (FONT_ELEMENT_SIZE * 2) + 64;
+  char *pattern2 = new char[buf_size];
+  snprintf(pattern2, buf_size - 1,
+	   "%s,"
+	   "-*-*-%s-%s-*-*-%d-*-*-*-*-*-*-*,"
+	   "-*-*-*-*-*-*-%d-*-*-*-*-*-*-*,*",
+	   fontname, weight, slant, pixel_size, pixel_size);
+  fontname = pattern2;
+
+  if (nmissing) XFreeStringList(missing);
+  if (fs) XFreeFontSet(getBaseDisplay()->getXDisplay(), fs);
+
+  fs = XCreateFontSet(getBaseDisplay()->getXDisplay(), fontname,
+		      &missing, &nmissing, &def);
+  delete [] pattern2;
+
+  return fs;
+}
+
+
+void BScreen::reconfigure(void) {
+  LoadStyle();
+
+  XGCValues gcv;
+  unsigned long gc_value_mask = GCForeground;
+  if (! i18n->multibyte()) gc_value_mask |= GCFont;
+
+  gcv.foreground = WhitePixel(getBaseDisplay()->getXDisplay(),
+			      getScreenNumber());
+  gcv.function = GXinvert;
+  gcv.subwindow_mode = IncludeInferiors;
+  XChangeGC(getBaseDisplay()->getXDisplay(), opGC,
+	    GCForeground | GCFunction | GCSubwindowMode, &gcv);
+
+  gcv.foreground = resource.wstyle.l_text_focus.getPixel();
+  if (resource.wstyle.font)
+    gcv.font = resource.wstyle.font->fid;
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.wstyle.l_text_focus_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.wstyle.l_text_unfocus.getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.wstyle.l_text_unfocus_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.wstyle.b_pic_focus.getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.wstyle.b_pic_focus_gc,
+	    GCForeground, &gcv);
+
+  gcv.foreground = resource.wstyle.b_pic_unfocus.getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.wstyle.b_pic_unfocus_gc,
+	    GCForeground, &gcv);
+
+  gcv.foreground = resource.mstyle.t_text.getPixel();
+  if (resource.mstyle.t_font)
+    gcv.font = resource.mstyle.t_font->fid;
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.mstyle.t_text_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.mstyle.f_text.getPixel();
+  if (resource.mstyle.f_font)
+    gcv.font = resource.mstyle.f_font->fid;
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.mstyle.f_text_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.mstyle.h_text.getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.mstyle.h_text_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.mstyle.d_text.getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.mstyle.d_text_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.mstyle.hilite.getColor()->getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.mstyle.hilite_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.tstyle.l_text.getPixel();
+  if (resource.tstyle.font)
+    gcv.font = resource.tstyle.font->fid;
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.tstyle.l_text_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.tstyle.w_text.getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.tstyle.w_text_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.tstyle.c_text.getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.tstyle.c_text_gc,
+	    gc_value_mask, &gcv);
+
+  gcv.foreground = resource.tstyle.b_pic.getPixel();
+  XChangeGC(getBaseDisplay()->getXDisplay(), resource.tstyle.b_pic_gc,
+	    gc_value_mask, &gcv);
+
+  const char *s = i18n->getMessage(ScreenSet, ScreenPositionLength,
+				   "0: 0000 x 0: 0000");
+  int l = strlen(s);
+
+  if (i18n->multibyte()) {
+    XRectangle ink, logical;
+    XmbTextExtents(resource.wstyle.fontset, s, l, &ink, &logical);
+    geom_w = logical.width;
+
+    geom_h = resource.wstyle.fontset_extents->max_ink_extent.height;
+  } else {
+    geom_w = XTextWidth(resource.wstyle.font, s, l);
+
+    geom_h = resource.wstyle.font->ascent +
+	     resource.wstyle.font->descent; 
+  }
+
+  geom_w += (resource.bevel_width * 2);
+  geom_h += (resource.bevel_width * 2);
+
+  Pixmap tmp = geom_pixmap;
+  if (resource.wstyle.l_focus.getTexture() & BImage_ParentRelative) {
+    if (resource.wstyle.t_focus.getTexture() ==
+	                              (BImage_Flat | BImage_Solid)) {
+      geom_pixmap = None;
+      XSetWindowBackground(getBaseDisplay()->getXDisplay(), geom_window,
+			 resource.wstyle.t_focus.getColor()->getPixel());
+    } else {
+      geom_pixmap = image_control->renderImage(geom_w, geom_h,
+					       &resource.wstyle.t_focus);
+      XSetWindowBackgroundPixmap(getBaseDisplay()->getXDisplay(),
+				 geom_window, geom_pixmap);
+    }
+  } else {
+    if (resource.wstyle.l_focus.getTexture() ==
+	                              (BImage_Flat | BImage_Solid)) {
+      geom_pixmap = None;
+      XSetWindowBackground(getBaseDisplay()->getXDisplay(), geom_window,
+			 resource.wstyle.l_focus.getColor()->getPixel());
+    } else {
+      geom_pixmap = image_control->renderImage(geom_w, geom_h,
+					       &resource.wstyle.l_focus);
+      XSetWindowBackgroundPixmap(getBaseDisplay()->getXDisplay(),
+				 geom_window, geom_pixmap);
+    }
+  }
+  if (tmp) image_control->removeImage(tmp);
+
+  XSetWindowBorderWidth(getBaseDisplay()->getXDisplay(), geom_window,
+                        resource.border_width);
+  XSetWindowBorder(getBaseDisplay()->getXDisplay(), geom_window,
+                   resource.border_color.getPixel());
+
+  workspacemenu->reconfigure();
+  iconmenu->reconfigure();
+
+  {
+    int remember_sub = rootmenu->getCurrentSubmenu();
+    InitMenu();
+    raiseWindows(0, 0);
+    rootmenu->reconfigure();
+    rootmenu->drawSubmenu(remember_sub);
+  }
+
+  configmenu->reconfigure();
+
+  toolbar->reconfigure();
+
+#ifdef    SLIT
+  slit->reconfigure();
+#endif // SLIT
+
+  LinkedListIterator wit(workspacesList);
+  for (Workspace *w = wit.current(); w; wit++, w = wit.current())
+    w->reconfigure();
+
+  LinkedListIterator iit(iconList);
+  for (OpenboxWindow *bw = iit.current(); bw; iit++, bw = iit.current())
+    if (bw->validateClient())
+      bw->reconfigure();
+
+  image_control->timeout();
+}
+
+
+void BScreen::rereadMenu(void) {
+  InitMenu();
+  raiseWindows(0, 0);
+
+  rootmenu->reconfigure();
+}
+
+
+void BScreen::removeWorkspaceNames(void) {
+  while (workspaceNames->count())
+   delete [] workspaceNames->remove(0);
+}
+
+
+void BScreen::LoadStyle(void) {
+  resource.stylerc = XrmGetFileDatabase(openbox->getStyleFilename());
+  if (resource.stylerc == NULL)
+    resource.stylerc = XrmGetFileDatabase(DEFAULTSTYLE);
+  assert(resource.stylerc != NULL);
+
+  XrmValue value;
+  char *value_type;
+
+  // load fonts/fontsets
+
+  if (i18n->multibyte()) {
+    readDatabaseFontSet("window.font", "Window.Font",
+			&resource.wstyle.fontset);
+    readDatabaseFontSet("toolbar.font", "Toolbar.Font",
+			&resource.tstyle.fontset);
+    readDatabaseFontSet("menu.title.font", "Menu.Title.Font",
+			&resource.mstyle.t_fontset);
+    readDatabaseFontSet("menu.frame.font", "Menu.Frame.Font",
+			&resource.mstyle.f_fontset);
+
+    resource.mstyle.t_fontset_extents =
+      XExtentsOfFontSet(resource.mstyle.t_fontset);
+    resource.mstyle.f_fontset_extents =
+      XExtentsOfFontSet(resource.mstyle.f_fontset);
+    resource.tstyle.fontset_extents =
+      XExtentsOfFontSet(resource.tstyle.fontset);
+    resource.wstyle.fontset_extents =
+      XExtentsOfFontSet(resource.wstyle.fontset);
+  } else {
+    readDatabaseFont("window.font", "Window.Font",
+		     &resource.wstyle.font);
+    readDatabaseFont("menu.title.font", "Menu.Title.Font",
+		     &resource.mstyle.t_font);
+    readDatabaseFont("menu.frame.font", "Menu.Frame.Font",
+		     &resource.mstyle.f_font);
+    readDatabaseFont("toolbar.font", "Toolbar.Font",
+		     &resource.tstyle.font);
+  }
+
+  // load window config
+  readDatabaseTexture("window.title.focus", "Window.Title.Focus",
+		      &resource.wstyle.t_focus,
+		      WhitePixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.title.unfocus", "Window.Title.Unfocus",
+		      &resource.wstyle.t_unfocus,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.label.focus", "Window.Label.Focus",
+		      &resource.wstyle.l_focus,
+		      WhitePixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.label.unfocus", "Window.Label.Unfocus",
+		      &resource.wstyle.l_unfocus,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.handle.focus", "Window.Handle.Focus",
+		      &resource.wstyle.h_focus,
+		      WhitePixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.handle.unfocus", "Window.Handle.Unfocus",
+		      &resource.wstyle.h_unfocus,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.grip.focus", "Window.Grip.Focus",
+                      &resource.wstyle.g_focus,
+		      WhitePixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.grip.unfocus", "Window.Grip.Unfocus",
+                      &resource.wstyle.g_unfocus,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.button.focus", "Window.Button.Focus",
+		      &resource.wstyle.b_focus,
+		      WhitePixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.button.unfocus", "Window.Button.Unfocus",
+		      &resource.wstyle.b_unfocus,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("window.button.pressed", "Window.Button.Pressed",
+		      &resource.wstyle.b_pressed,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseColor("window.frame.focusColor",
+		    "Window.Frame.FocusColor",
+		    &resource.wstyle.f_focus,
+		    WhitePixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("window.frame.unfocusColor",
+		    "Window.Frame.UnfocusColor",
+		    &resource.wstyle.f_unfocus,
+		    BlackPixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("window.label.focus.textColor",
+		    "Window.Label.Focus.TextColor",
+		    &resource.wstyle.l_text_focus,
+		    BlackPixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("window.label.unfocus.textColor",
+		    "Window.Label.Unfocus.TextColor",
+		    &resource.wstyle.l_text_unfocus,
+		    WhitePixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("window.button.focus.picColor",
+		    "Window.Button.Focus.PicColor",
+		    &resource.wstyle.b_pic_focus,
+		    BlackPixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("window.button.unfocus.picColor",
+		    "Window.Button.Unfocus.PicColor",
+		    &resource.wstyle.b_pic_unfocus,
+		    WhitePixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+
+  if (XrmGetResource(resource.stylerc, "window.justify", "Window.Justify",
+		     &value_type, &value)) {
+    if (strstr(value.addr, "right") || strstr(value.addr, "Right"))
+      resource.wstyle.justify = BScreen::RightJustify;
+    else if (strstr(value.addr, "center") || strstr(value.addr, "Center"))
+      resource.wstyle.justify = BScreen::CenterJustify;
+    else
+      resource.wstyle.justify = BScreen::LeftJustify;
+  } else {
+    resource.wstyle.justify = BScreen::LeftJustify;
+  }
+  // load toolbar config
+  readDatabaseTexture("toolbar", "Toolbar",
+		      &resource.tstyle.toolbar,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("toolbar.label", "Toolbar.Label",
+		      &resource.tstyle.label,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("toolbar.windowLabel", "Toolbar.WindowLabel",
+		      &resource.tstyle.window,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("toolbar.button", "Toolbar.Button",
+		      &resource.tstyle.button,
+		      WhitePixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("toolbar.button.pressed", "Toolbar.Button.Pressed",
+		      &resource.tstyle.pressed,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("toolbar.clock", "Toolbar.Clock",
+		      &resource.tstyle.clock,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseColor("toolbar.label.textColor", "Toolbar.Label.TextColor",
+		    &resource.tstyle.l_text,
+		    WhitePixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("toolbar.windowLabel.textColor",
+		    "Toolbar.WindowLabel.TextColor",
+		    &resource.tstyle.w_text,
+		    WhitePixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("toolbar.clock.textColor", "Toolbar.Clock.TextColor",
+		    &resource.tstyle.c_text,
+		    WhitePixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("toolbar.button.picColor", "Toolbar.Button.PicColor",
+		    &resource.tstyle.b_pic,
+		    BlackPixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+
+  if (XrmGetResource(resource.stylerc, "toolbar.justify",
+		     "Toolbar.Justify", &value_type, &value)) {
+    if (strstr(value.addr, "right") || strstr(value.addr, "Right"))
+      resource.tstyle.justify = BScreen::RightJustify;
+    else if (strstr(value.addr, "center") || strstr(value.addr, "Center"))
+      resource.tstyle.justify = BScreen::CenterJustify;
+    else
+      resource.tstyle.justify = BScreen::LeftJustify;
+  } else {
+    resource.tstyle.justify = BScreen::LeftJustify;
+  }
+  // load menu config
+  readDatabaseTexture("menu.title", "Menu.Title",
+		      &resource.mstyle.title,
+		      WhitePixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("menu.frame", "Menu.Frame",
+		      &resource.mstyle.frame,
+		      BlackPixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseTexture("menu.hilite", "Menu.Hilite",
+		      &resource.mstyle.hilite,
+		      WhitePixel(getBaseDisplay()->getXDisplay(),
+				 getScreenNumber()));
+  readDatabaseColor("menu.title.textColor", "Menu.Title.TextColor",
+		    &resource.mstyle.t_text,
+		    BlackPixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("menu.frame.textColor", "Menu.Frame.TextColor",
+		    &resource.mstyle.f_text,
+		    WhitePixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("menu.frame.disableColor", "Menu.Frame.DisableColor",
+		    &resource.mstyle.d_text,
+		    BlackPixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+  readDatabaseColor("menu.hilite.textColor", "Menu.Hilite.TextColor",
+		    &resource.mstyle.h_text,
+		    BlackPixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+
+  if (XrmGetResource(resource.stylerc, "menu.title.justify",
+		     "Menu.Title.Justify",
+		     &value_type, &value)) {
+    if (strstr(value.addr, "right") || strstr(value.addr, "Right"))
+      resource.mstyle.t_justify = BScreen::RightJustify;
+    else if (strstr(value.addr, "center") || strstr(value.addr, "Center"))
+      resource.mstyle.t_justify = BScreen::CenterJustify;
+    else
+      resource.mstyle.t_justify = BScreen::LeftJustify;
+  } else {
+    resource.mstyle.t_justify = BScreen::LeftJustify;
+  }
+  if (XrmGetResource(resource.stylerc, "menu.frame.justify",
+		     "Menu.Frame.Justify",
+		     &value_type, &value)) {
+    if (strstr(value.addr, "right") || strstr(value.addr, "Right"))
+      resource.mstyle.f_justify = BScreen::RightJustify;
+    else if (strstr(value.addr, "center") || strstr(value.addr, "Center"))
+      resource.mstyle.f_justify = BScreen::CenterJustify;
+    else
+      resource.mstyle.f_justify = BScreen::LeftJustify;
+  } else {
+    resource.mstyle.f_justify = BScreen::LeftJustify;
+  }
+  if (XrmGetResource(resource.stylerc, "menu.bullet", "Menu.Bullet",
+                     &value_type, &value)) {
+    if (! strncasecmp(value.addr, "empty", value.size))
+      resource.mstyle.bullet = Basemenu::Empty;
+    else if (! strncasecmp(value.addr, "square", value.size))
+      resource.mstyle.bullet = Basemenu::Square;
+    else if (! strncasecmp(value.addr, "diamond", value.size))
+      resource.mstyle.bullet = Basemenu::Diamond;
+    else
+      resource.mstyle.bullet = Basemenu::Triangle;
+  } else {
+    resource.mstyle.bullet = Basemenu::Triangle;
+  }
+  if (XrmGetResource(resource.stylerc, "menu.bullet.position",
+                     "Menu.Bullet.Position", &value_type, &value)) {
+    if (! strncasecmp(value.addr, "right", value.size))
+      resource.mstyle.bullet_pos = Basemenu::Right;
+    else
+      resource.mstyle.bullet_pos = Basemenu::Left;
+  } else {
+    resource.mstyle.bullet_pos = Basemenu::Left;
+  }
+  readDatabaseColor("borderColor", "BorderColor", &resource.border_color,
+		    BlackPixel(getBaseDisplay()->getXDisplay(),
+			       getScreenNumber()));
+
+  // load bevel, border and handle widths
+  if (XrmGetResource(resource.stylerc, "handleWidth", "HandleWidth",
+                     &value_type, &value)) {
+    if (sscanf(value.addr, "%u", &resource.handle_width) != 1 ||
+	resource.handle_width > getWidth() / 2 || resource.handle_width == 0)
+      resource.handle_width = 6;
+  } else {
+    resource.handle_width = 6;
+  }
+  if (XrmGetResource(resource.stylerc, "borderWidth", "BorderWidth",
+                     &value_type, &value)) {
+    if (sscanf(value.addr, "%u", &resource.border_width) != 1)
+      resource.border_width = 1;
+  } else {
+    resource.border_width = 1;
+  }
+
+  if (XrmGetResource(resource.stylerc, "bevelWidth", "BevelWidth",
+                     &value_type, &value)) {
+    if (sscanf(value.addr, "%u", &resource.bevel_width) != 1 ||
+	resource.bevel_width > getWidth() / 2 || resource.bevel_width == 0)
+      resource.bevel_width = 3;
+  } else {
+    resource.bevel_width = 3;
+  }
+  if (XrmGetResource(resource.stylerc, "frameWidth", "FrameWidth",
+                     &value_type, &value)) {
+    if (sscanf(value.addr, "%u", &resource.frame_width) != 1 ||
+	resource.frame_width > getWidth() / 2)
+      resource.frame_width = resource.bevel_width;
+  } else {
+    resource.frame_width = resource.bevel_width;
+  }
+  const char *cmd = resource.root_command;
+  if (cmd != NULL || XrmGetResource(resource.stylerc,
+                     "rootCommand",
+                     "RootCommand", &value_type, &value)) {
+    if (cmd == NULL)
+      cmd = value.addr; // not specified by the screen, so use the one from the
+                        // style file
+#ifndef    __EMX__
+    char displaystring[MAXPATHLEN];
+    sprintf(displaystring, "DISPLAY=%s",
+	    DisplayString(getBaseDisplay()->getXDisplay()));
+    sprintf(displaystring + strlen(displaystring) - 1, "%d",
+	    getScreenNumber());
+
+    bexec(cmd, displaystring);
+#else //   __EMX__
+    spawnlp(P_NOWAIT, "cmd.exe", "cmd.exe", "/c", cmd, NULL);
+#endif // !__EMX__
+  }
+
+  XrmDestroyDatabase(resource.stylerc);
+}
+
+
+void BScreen::addIcon(OpenboxWindow *w) {
+  if (! w) return;
+
+  w->setWorkspace(-1);
+  w->setWindowNumber(iconList->count());
+
+  iconList->insert(w);
+
+  iconmenu->insert((const char **) w->getIconTitle());
+  iconmenu->update();
+}
+
+
+void BScreen::removeIcon(OpenboxWindow *w) {
+  if (! w) return;
+
+  iconList->remove(w->getWindowNumber());
+
+  iconmenu->remove(w->getWindowNumber());
+  iconmenu->update();
+
+  LinkedListIterator it(iconList);
+  OpenboxWindow *bw = it.current();
+  for (int i = 0; bw; it++, bw = it.current())
+    bw->setWindowNumber(i++);
+}
+
+
+OpenboxWindow *BScreen::getIcon(int index) {
+  if (index >= 0 && index < iconList->count())
+    return iconList->find(index);
+
+  return (OpenboxWindow *) 0;
+}
+
+
+int BScreen::addWorkspace(void) {
+  Workspace *wkspc = new Workspace(this, workspacesList->count());
+  workspacesList->insert(wkspc);
+
+  workspacemenu->insert(wkspc->getName(), wkspc->getMenu(),
+			wkspc->getWorkspaceID() + 2);
+  workspacemenu->update();
+
+  toolbar->reconfigure();
+
+  updateNetizenWorkspaceCount();
+
+  return workspacesList->count();
+}
+
+
+int BScreen::removeLastWorkspace(void) {
+  if (workspacesList->count() == 1)
+    return 0;
+
+  Workspace *wkspc = workspacesList->last();
+
+  if (current_workspace->getWorkspaceID() == wkspc->getWorkspaceID())
+    changeWorkspaceID(current_workspace->getWorkspaceID() - 1);
+
+  wkspc->removeAll();
+
+  workspacemenu->remove(wkspc->getWorkspaceID() + 2);
+  workspacemenu->update();
+
+  workspacesList->remove(wkspc);
+  delete wkspc;
+
+  toolbar->reconfigure();
+
+  updateNetizenWorkspaceCount();
+
+  return workspacesList->count();
+}
+
+
+void BScreen::changeWorkspaceID(int id) {
+  if (! current_workspace) return;
+
+  if (id != current_workspace->getWorkspaceID()) {
+    current_workspace->hideAll();
+
+    workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2,
+				   False);
+
+    if (openbox->getFocusedWindow() &&
+	openbox->getFocusedWindow()->getScreen() == this &&
+        (! openbox->getFocusedWindow()->isStuck())) {
+      current_workspace->setLastFocusedWindow(openbox->getFocusedWindow());
+      openbox->setFocusedWindow((OpenboxWindow *) 0);
+    }
+
+    current_workspace = getWorkspace(id);
+
+    workspacemenu->setItemSelected(current_workspace->getWorkspaceID() + 2,
+				   True);
+    toolbar->redrawWorkspaceLabel(True);
+
+    current_workspace->showAll();
+
+    if (resource.focus_last && current_workspace->getLastFocusedWindow()) {
+      XSync(openbox->getXDisplay(), False);
+      current_workspace->getLastFocusedWindow()->setInputFocus();
+    }
+  }
+
+  updateNetizenCurrentWorkspace();
+}
+
+
+void BScreen::addNetizen(Netizen *n) {
+  netizenList->insert(n);
+
+  n->sendWorkspaceCount();
+  n->sendCurrentWorkspace();
+
+  LinkedListIterator it(workspacesList);
+  for (Workspace *w = it.current(); w; it++, w = it.current()) {
+    for (int i = 0; i < w->getCount(); i++)
+      n->sendWindowAdd(w->getWindow(i)->getClientWindow(),
+		       w->getWorkspaceID());
+  }
+
+  Window f = ((openbox->getFocusedWindow()) ?
+              openbox->getFocusedWindow()->getClientWindow() : None);
+  n->sendWindowFocus(f);
+}
+
+
+void BScreen::removeNetizen(Window w) {
+  LinkedListIterator it(netizenList);
+  int i = 0;
+
+  for (Netizen *n = it.current(); n; it++, i++, n = it.current())
+    if (n->getWindowID() == w) {
+      Netizen *tmp = netizenList->remove(i);
+      delete tmp;
+
+      break;
+    }
+}
+
+
+void BScreen::updateNetizenCurrentWorkspace(void) {
+  LinkedListIterator it(netizenList);
+  for (Netizen *n = it.current(); n; it++, n = it.current())
+    n->sendCurrentWorkspace();
+}
+
+
+void BScreen::updateNetizenWorkspaceCount(void) {
+  LinkedListIterator it(netizenList);
+  for (Netizen *n = it.current(); n; it++, n = it.current())
+    n->sendWorkspaceCount();
+}
+
+
+void BScreen::updateNetizenWindowFocus(void) {
+  Window f = ((openbox->getFocusedWindow()) ?
+              openbox->getFocusedWindow()->getClientWindow() : None);
+  LinkedListIterator it(netizenList);
+  for (Netizen *n = it.current(); n; it++, n = it.current())
+    n->sendWindowFocus(f);
+}
+
+
+void BScreen::updateNetizenWindowAdd(Window w, unsigned long p) {
+  LinkedListIterator it(netizenList);
+  for (Netizen *n = it.current(); n; it++, n = it.current())
+    n->sendWindowAdd(w, p);
+}
+
+
+void BScreen::updateNetizenWindowDel(Window w) {
+  LinkedListIterator it(netizenList);
+  for (Netizen *n = it.current(); n; it++, n = it.current())
+    n->sendWindowDel(w);
+}
+
+
+void BScreen::updateNetizenWindowRaise(Window w) {
+  LinkedListIterator it(netizenList);
+  for (Netizen *n = it.current(); n; it++, n = it.current())
+    n->sendWindowRaise(w);
+}
+
+
+void BScreen::updateNetizenWindowLower(Window w) {
+  LinkedListIterator it(netizenList);
+  for (Netizen *n = it.current(); n; it++, n = it.current())
+    n->sendWindowLower(w);
+}
+
+
+void BScreen::updateNetizenConfigNotify(XEvent *e) {
+  LinkedListIterator it(netizenList);
+  for (Netizen *n = it.current(); n; it++, n = it.current())
+    n->sendConfigNotify(e);
+}
+
+
+void BScreen::raiseWindows(Window *workspace_stack, int num) {
+  Window *session_stack = new
+    Window[(num + workspacesList->count() + rootmenuList->count() + 13)];
+  int i = 0, k = num;
+
+  XRaiseWindow(getBaseDisplay()->getXDisplay(), iconmenu->getWindowID());
+  *(session_stack + i++) = iconmenu->getWindowID();
+
+  LinkedListIterator wit(workspacesList);
+  for (Workspace *tmp = wit.current(); tmp; wit++, tmp = wit.current())
+    *(session_stack + i++) = tmp->getMenu()->getWindowID();
+
+  *(session_stack + i++) = workspacemenu->getWindowID();
+
+  *(session_stack + i++) = configmenu->getFocusmenu()->getWindowID();
+  *(session_stack + i++) = configmenu->getPlacementmenu()->getWindowID();
+  *(session_stack + i++) = configmenu->getWindowID();
+
+#ifdef    SLIT
+  *(session_stack + i++) = slit->getMenu()->getDirectionmenu()->getWindowID();
+  *(session_stack + i++) = slit->getMenu()->getPlacementmenu()->getWindowID();
+  *(session_stack + i++) = slit->getMenu()->getWindowID();
+#endif // SLIT
+
+  *(session_stack + i++) =
+    toolbar->getMenu()->getPlacementmenu()->getWindowID();
+  *(session_stack + i++) = toolbar->getMenu()->getWindowID();
+
+  LinkedListIterator rit(rootmenuList);
+  for (Rootmenu *tmp = rit.current(); tmp; rit++, tmp = rit.current())
+    *(session_stack + i++) = tmp->getWindowID();
+  *(session_stack + i++) = rootmenu->getWindowID();
+
+  if (toolbar->isOnTop())
+    *(session_stack + i++) = toolbar->getWindowID();
+
+#ifdef    SLIT
+  if (slit->isOnTop())
+    *(session_stack + i++) = slit->getWindowID();
+#endif // SLIT
+
+  while (k--)
+    *(session_stack + i++) = *(workspace_stack + k);
+
+  XRestackWindows(getBaseDisplay()->getXDisplay(), session_stack, i);
+
+  delete [] session_stack;
+}
+
+
+#ifdef    HAVE_STRFTIME
+void BScreen::saveStrftimeFormat(char *format) {
+  if (resource.strftime_format)
+    delete [] resource.strftime_format;
+
+  resource.strftime_format = bstrdup(format);
+}
+#endif // HAVE_STRFTIME
+
+
+void BScreen::addWorkspaceName(char *name) {
+  workspaceNames->insert(bstrdup(name));
+}
+
+
+char* BScreen::getNameOfWorkspace(int id) {
+  char *name = (char *) 0;
+
+  if (id >= 0 && id < workspaceNames->count()) {
+    char *wkspc_name = workspaceNames->find(id);
+
+    if (wkspc_name)
+      name = wkspc_name;
+  }
+  return name;
+}
+
+
+void BScreen::reassociateWindow(OpenboxWindow *w, int wkspc_id, Bool ignore_sticky) {
+  if (! w) return;
+
+  if (wkspc_id == -1)
+    wkspc_id = current_workspace->getWorkspaceID();
+
+  if (w->getWorkspaceNumber() == wkspc_id)
+    return;
+
+  if (w->isIconic()) {
+    removeIcon(w);
+    getWorkspace(wkspc_id)->addWindow(w);
+  } else if (ignore_sticky || ! w->isStuck()) {
+    getWorkspace(w->getWorkspaceNumber())->removeWindow(w);
+    getWorkspace(wkspc_id)->addWindow(w);
+  }
+}
+
+
+void BScreen::nextFocus(void) {
+  Bool have_focused = False;
+  int focused_window_number = -1;
+  OpenboxWindow *next;
+
+  if (openbox->getFocusedWindow()) {
+    if (openbox->getFocusedWindow()->getScreen()->getScreenNumber() ==
+	getScreenNumber()) {
+      have_focused = True;
+      focused_window_number = openbox->getFocusedWindow()->getWindowNumber();
+    }
+  }
+
+  if ((getCurrentWorkspace()->getCount() > 1) && have_focused) {
+    int next_window_number = focused_window_number;
+    do {
+      if ((++next_window_number) >= getCurrentWorkspace()->getCount())
+	next_window_number = 0;
+
+      next = getCurrentWorkspace()->getWindow(next_window_number);
+    } while ((! next->setInputFocus()) && (next_window_number !=
+					   focused_window_number));
+
+    if (next_window_number != focused_window_number)
+      getCurrentWorkspace()->raiseWindow(next);
+  } else if (getCurrentWorkspace()->getCount() >= 1) {
+    next = current_workspace->getWindow(0);
+
+    current_workspace->raiseWindow(next);
+    next->setInputFocus();
+  }
+}
+
+
+void BScreen::prevFocus(void) {
+  Bool have_focused = False;
+  int focused_window_number = -1;
+  OpenboxWindow *prev;
+
+  if (openbox->getFocusedWindow()) {
+    if (openbox->getFocusedWindow()->getScreen()->getScreenNumber() ==
+	getScreenNumber()) {
+      have_focused = True;
+      focused_window_number = openbox->getFocusedWindow()->getWindowNumber();
+    }
+  }
+
+  if ((getCurrentWorkspace()->getCount() > 1) && have_focused) {
+    int prev_window_number = focused_window_number;
+    do {
+      if ((--prev_window_number) < 0)
+	prev_window_number = getCurrentWorkspace()->getCount() - 1;
+
+      prev = getCurrentWorkspace()->getWindow(prev_window_number);
+    } while ((! prev->setInputFocus()) && (prev_window_number !=
+					   focused_window_number));
+
+    if (prev_window_number != focused_window_number)
+      getCurrentWorkspace()->raiseWindow(prev);
+  } else if (getCurrentWorkspace()->getCount() >= 1) {
+    prev = current_workspace->getWindow(0);
+
+    current_workspace->raiseWindow(prev);
+    prev->setInputFocus();
+  }
+}
+
+
+void BScreen::raiseFocus(void) {
+  Bool have_focused = False;
+  int focused_window_number = -1;
+
+  if (openbox->getFocusedWindow()) {
+    if (openbox->getFocusedWindow()->getScreen()->getScreenNumber() ==
+	getScreenNumber()) {
+      have_focused = True;
+      focused_window_number = openbox->getFocusedWindow()->getWindowNumber();
+    }
+  }
+
+  if ((getCurrentWorkspace()->getCount() > 1) && have_focused)
+    getWorkspace(openbox->getFocusedWindow()->getWorkspaceNumber())->
+      raiseWindow(openbox->getFocusedWindow());
+}
+
+
+void BScreen::InitMenu(void) {
+  if (rootmenu) {
+    while (rootmenuList->count())
+      rootmenuList->remove(0);
+
+    while (rootmenu->getCount())
+      rootmenu->remove(0);
+  } else {
+    rootmenu = new Rootmenu(this);
+  }
+  Bool defaultMenu = True;
+
+  if (openbox->getMenuFilename()) {
+    FILE *menu_file = fopen(openbox->getMenuFilename(), "r");
+
+    if (!menu_file) {
+      perror(openbox->getMenuFilename());
+    } else {
+      if (feof(menu_file)) {
+	fprintf(stderr, i18n->getMessage(ScreenSet, ScreenEmptyMenuFile,
+					 "%s: Empty menu file"),
+		openbox->getMenuFilename());
+      } else {
+	char line[1024], label[1024];
+	memset(line, 0, 1024);
+	memset(label, 0, 1024);
+
+	while (fgets(line, 1024, menu_file) && ! feof(menu_file)) {
+	  if (line[0] != '#') {
+	    int i, key = 0, index = -1, len = strlen(line);
+
+	    key = 0;
+	    for (i = 0; i < len; i++) {
+	      if (line[i] == '[') index = 0;
+	      else if (line[i] == ']') break;
+	      else if (line[i] != ' ')
+		if (index++ >= 0)
+		  key += tolower(line[i]);
+	    }
+
+	    if (key == 517) {
+	      index = -1;
+	      for (i = index; i < len; i++) {
+		if (line[i] == '(') index = 0;
+		else if (line[i] == ')') break;
+		else if (index++ >= 0) {
+		  if (line[i] == '\\' && i < len - 1) i++;
+		  label[index - 1] = line[i];
+		}
+	      }
+
+	      if (index == -1) index = 0;
+	      label[index] = '\0';
+
+	      rootmenu->setLabel(label);
+	      defaultMenu = parseMenuFile(menu_file, rootmenu);
+	      break;
+	    }
+	  }
+	}
+      }
+      fclose(menu_file);
+    }
+  }
+
+  if (defaultMenu) {
+    rootmenu->setInternalMenu();
+    rootmenu->insert(i18n->getMessage(ScreenSet, Screenxterm, "xterm"),
+		     BScreen::Execute,
+		     i18n->getMessage(ScreenSet, Screenxterm, "xterm"));
+    rootmenu->insert(i18n->getMessage(ScreenSet, ScreenRestart, "Restart"),
+		     BScreen::Restart);
+    rootmenu->insert(i18n->getMessage(ScreenSet, ScreenExit, "Exit"),
+		     BScreen::Exit);
+  } else {
+    openbox->saveMenuFilename(openbox->getMenuFilename());
+  }
+}
+
+
+Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) {
+  char line[1024], label[1024], command[1024];
+
+  while (! feof(file)) {
+    memset(line, 0, 1024);
+    memset(label, 0, 1024);
+    memset(command, 0, 1024);
+
+    if (fgets(line, 1024, file)) {
+      if (line[0] != '#') {
+	register int i, key = 0, parse = 0, index = -1,
+	  line_length = strlen(line),
+	  label_length = 0, command_length = 0;
+
+	// determine the keyword
+	key = 0;
+	for (i = 0; i < line_length; i++) {
+	  if (line[i] == '[') parse = 1;
+	  else if (line[i] == ']') break;
+	  else if (line[i] != ' ')
+	    if (parse)
+	      key += tolower(line[i]);
+	}
+
+	// get the label enclosed in ()'s
+	parse = 0;
+
+	for (i = 0; i < line_length; i++) {
+	  if (line[i] == '(') {
+	    index = 0;
+	    parse = 1;
+	  } else if (line[i] == ')') break;
+	  else if (index++ >= 0) {
+	    if (line[i] == '\\' && i < line_length - 1) i++;
+	    label[index - 1] = line[i];
+	  }
+	}
+
+	if (parse) {
+	  label[index] = '\0';
+	  label_length = index;
+	} else {
+	  label[0] = '\0';
+	  label_length = 0;
+	}
+
+	// get the command enclosed in {}'s
+	parse = 0;
+	index = -1;
+	for (i = 0; i < line_length; i++) {
+	  if (line[i] == '{') {
+	    index = 0;
+	    parse = 1;
+	  } else if (line[i] == '}') break;
+	  else if (index++ >= 0) {
+	    if (line[i] == '\\' && i < line_length - 1) i++;
+	    command[index - 1] = line[i];
+	  }
+	}
+
+	if (parse) {
+	  command[index] = '\0';
+	  command_length = index;
+	} else {
+	  command[0] = '\0';
+	  command_length = 0;
+	}
+
+	switch (key) {
+        case 311: //end
+          return ((menu->getCount() == 0) ? True : False);
+
+          break;
+
+        case 333: // nop
+	  menu->insert(label);
+
+	  break;
+
+	case 421: // exec
+	  if ((! *label) && (! *command)) {
+	    fprintf(stderr, i18n->getMessage(ScreenSet, ScreenEXECError,
+			     "BScreen::parseMenuFile: [exec] error, "
+			     "no menu label and/or command defined\n"));
+	    continue;
+	  }
+
+	  menu->insert(label, BScreen::Execute, command);
+
+	  break;
+
+	case 442: // exit
+	  if (! *label) {
+	    fprintf(stderr, i18n->getMessage(ScreenSet, ScreenEXITError,
+				     "BScreen::parseMenuFile: [exit] error, "
+				     "no menu label defined\n"));
+	    continue;
+	  }
+
+	  menu->insert(label, BScreen::Exit);
+
+	  break;
+
+	case 561: // style
+	  {
+	    if ((! *label) || (! *command)) {
+	      fprintf(stderr, i18n->getMessage(ScreenSet, ScreenSTYLEError,
+				 "BScreen::parseMenuFile: [style] error, "
+				 "no menu label and/or filename defined\n"));
+	      continue;
+	    }
+
+	    char style[MAXPATHLEN];
+
+	    // perform shell style ~ home directory expansion
+	    char *homedir = 0;
+	    int homedir_len = 0;
+	    if (*command == '~' && *(command + 1) == '/') {
+	      homedir = getenv("HOME");
+	      homedir_len = strlen(homedir);
+	    }
+
+	    if (homedir && homedir_len != 0) {
+	      strncpy(style, homedir, homedir_len);
+
+	      strncpy(style + homedir_len, command + 1,
+		      command_length - 1);
+	      *(style + command_length + homedir_len - 1) = '\0';
+	    } else {
+	      strncpy(style, command, command_length);
+	      *(style + command_length) = '\0';
+	    }
+
+	    menu->insert(label, BScreen::SetStyle, style);
+	  }
+
+	  break;
+
+	case 630: // config
+	  if (! *label) {
+	    fprintf(stderr, i18n->getMessage(ScreenSet, ScreenCONFIGError,
+			       "BScreen::parseMenufile: [config] error, "
+			       "no label defined"));
+	    continue;
+	  }
+
+	  menu->insert(label, configmenu);
+
+	  break;
+
+	case 740: // include
+	  {
+	    if (! *label) {
+	      fprintf(stderr, i18n->getMessage(ScreenSet, ScreenINCLUDEError,
+				 "BScreen::parseMenuFile: [include] error, "
+				 "no filename defined\n"));
+	      continue;
+	    }
+
+	    char newfile[MAXPATHLEN];
+
+	    // perform shell style ~ home directory expansion
+	    char *homedir = 0;
+	    int homedir_len = 0;
+	    if (*label == '~' && *(label + 1) == '/') {
+	      homedir = getenv("HOME");
+	      homedir_len = strlen(homedir);
+	    }
+
+	    if (homedir && homedir_len != 0) {
+	      strncpy(newfile, homedir, homedir_len);
+
+	      strncpy(newfile + homedir_len, label + 1,
+		      label_length - 1);
+	      *(newfile + label_length + homedir_len - 1) = '\0';
+	    } else {
+	      strncpy(newfile, label, label_length);
+	      *(newfile + label_length) = '\0';
+	    }
+
+	    if (newfile) {
+	      FILE *submenufile = fopen(newfile, "r");
+
+	      if (submenufile) {
+                struct stat buf;
+                if (fstat(fileno(submenufile), &buf) ||
+                    (! S_ISREG(buf.st_mode))) {
+                  fprintf(stderr,
+			  i18n->getMessage(ScreenSet, ScreenINCLUDEErrorReg,
+			     "BScreen::parseMenuFile: [include] error: "
+			     "'%s' is not a regular file\n"), newfile);
+                  break;
+                }
+
+		if (! feof(submenufile)) {
+		  if (! parseMenuFile(submenufile, menu))
+		    openbox->saveMenuFilename(newfile);
+
+		  fclose(submenufile);
+		}
+	      } else
+		perror(newfile);
+	    }
+	  }
+
+	  break;
+
+	case 767: // submenu
+	  {
+	    if (! *label) {
+	      fprintf(stderr, i18n->getMessage(ScreenSet, ScreenSUBMENUError,
+				 "BScreen::parseMenuFile: [submenu] error, "
+				 "no menu label defined\n"));
+	      continue;
+	    }
+
+	    Rootmenu *submenu = new Rootmenu(this);
+
+	    if (*command)
+	      submenu->setLabel(command);
+	    else
+	      submenu->setLabel(label);
+
+	    parseMenuFile(file, submenu);
+	    submenu->update();
+	    menu->insert(label, submenu);
+	    rootmenuList->insert(submenu);
+	  }
+
+	  break;
+
+	case 773: // restart
+	  {
+	    if (! *label) {
+	      fprintf(stderr, i18n->getMessage(ScreenSet, ScreenRESTARTError,
+				 "BScreen::parseMenuFile: [restart] error, "
+				 "no menu label defined\n"));
+	      continue;
+	    }
+
+	    if (*command)
+	      menu->insert(label, BScreen::RestartOther, command);
+	    else
+	      menu->insert(label, BScreen::Restart);
+	  }
+
+	  break;
+
+	case 845: // reconfig
+	  {
+	    if (! *label) {
+	      fprintf(stderr, i18n->getMessage(ScreenSet, ScreenRECONFIGError,
+				 "BScreen::parseMenuFile: [reconfig] error, "
+				 "no menu label defined\n"));
+	      continue;
+	    }
+
+	    menu->insert(label, BScreen::Reconfigure);
+	  }
+
+	  break;
+
+        case 995: // stylesdir
+        case 1113: // stylesmenu
+          {
+            Bool newmenu = ((key == 1113) ? True : False);
+
+            if ((! *label) || ((! *command) && newmenu)) {
+              fprintf(stderr,
+		      i18n->getMessage(ScreenSet, ScreenSTYLESDIRError,
+			 "BScreen::parseMenuFile: [stylesdir/stylesmenu]"
+			 " error, no directory defined\n"));
+              continue;
+            }
+
+            char stylesdir[MAXPATHLEN];
+
+            char *directory = ((newmenu) ? command : label);
+            int directory_length = ((newmenu) ? command_length : label_length);
+
+            // perform shell style ~ home directory expansion
+            char *homedir = 0;
+            int homedir_len = 0;
+
+            if (*directory == '~' && *(directory + 1) == '/') {
+              homedir = getenv("HOME");
+              homedir_len = strlen(homedir);
+            }
+
+            if (homedir && homedir_len != 0) {
+              strncpy(stylesdir, homedir, homedir_len);
+
+              strncpy(stylesdir + homedir_len, directory + 1,
+                      directory_length - 1);
+              *(stylesdir + directory_length + homedir_len - 1) = '\0';
+            } else {
+              strncpy(stylesdir, directory, directory_length);
+              *(stylesdir + directory_length) = '\0';
+            }
+
+            struct stat statbuf;
+
+            if (! stat(stylesdir, &statbuf)) {
+              if (S_ISDIR(statbuf.st_mode)) {
+                Rootmenu *stylesmenu;
+
+                if (newmenu)
+                  stylesmenu = new Rootmenu(this);
+                else
+                  stylesmenu = menu;
+
+                DIR *d = opendir(stylesdir);
+                int entries = 0;
+                struct dirent *p;
+
+                // get the total number of directory entries
+                while ((p = readdir(d))) entries++;
+                rewinddir(d);
+
+                char **ls = new char* [entries];
+                int index = 0;
+                while ((p = readdir(d)))
+		  ls[index++] = bstrdup(p->d_name);
+
+		closedir(d);
+
+		std::sort(ls, ls + entries, dcmp());
+
+                int n, slen = strlen(stylesdir);
+                for (n = 0; n < entries; n++) {
+                  if (ls[n][strlen(ls[n])-1] != '~') {
+                    int nlen = strlen(ls[n]);
+                    char style[MAXPATHLEN + 1];
+
+                    strncpy(style, stylesdir, slen);
+                    *(style + slen) = '/';
+                    strncpy(style + slen + 1, ls[n], nlen + 1);
+
+                    if ((! stat(style, &statbuf)) && S_ISREG(statbuf.st_mode))
+                      stylesmenu->insert(ls[n], BScreen::SetStyle, style);
+                  }
+
+                  delete [] ls[n];
+                }
+
+                delete [] ls;
+
+                stylesmenu->update();
+
+                if (newmenu) {
+                  stylesmenu->setLabel(label);
+                  menu->insert(label, stylesmenu);
+                  rootmenuList->insert(stylesmenu);
+                }
+
+                openbox->saveMenuFilename(stylesdir);
+              } else {
+                fprintf(stderr, i18n->getMessage(ScreenSet,
+						 ScreenSTYLESDIRErrorNotDir,
+				   "BScreen::parseMenuFile:"
+				   " [stylesdir/stylesmenu] error, %s is not a"
+				   " directory\n"), stylesdir);
+              }
+            } else {
+              fprintf(stderr,
+		      i18n->getMessage(ScreenSet, ScreenSTYLESDIRErrorNoExist,
+			 "BScreen::parseMenuFile: [stylesdir/stylesmenu]"
+			 " error, %s does not exist\n"), stylesdir);
+            }
+
+            break;
+          }
+
+	case 1090: // workspaces
+	  {
+	    if (! *label) {
+	      fprintf(stderr,
+		      i18n->getMessage(ScreenSet, ScreenWORKSPACESError,
+			       "BScreen:parseMenuFile: [workspaces] error, "
+			       "no menu label defined\n"));
+	      continue;
+	    }
+
+	    menu->insert(label, workspacemenu);
+
+	    break;
+	  }
+	}
+      }
+    }
+  }
+
+  return ((menu->getCount() == 0) ? True : False);
+}
+
+
+void BScreen::shutdown(void) {
+  openbox->grab();
+
+  XSelectInput(getBaseDisplay()->getXDisplay(), getRootWindow(), NoEventMask);
+  XSync(getBaseDisplay()->getXDisplay(), False);
+
+  LinkedListIterator it(workspacesList);
+  for (Workspace *w = it.current(); w; it++, w = it.current())
+    w->shutdown();
+
+  while (iconList->count()) {
+    iconList->first()->restore();
+    delete iconList->first();
+  }
+
+#ifdef    SLIT
+  slit->shutdown();
+#endif // SLIT
+
+  openbox->ungrab();
+}
+
+
+void BScreen::showPosition(int x, int y) {
+  if (! geom_visible) {
+    XMoveResizeWindow(getBaseDisplay()->getXDisplay(), geom_window,
+                      (getWidth() - geom_w) / 2,
+                      (getHeight() - geom_h) / 2, geom_w, geom_h);
+    XMapWindow(getBaseDisplay()->getXDisplay(), geom_window);
+    XRaiseWindow(getBaseDisplay()->getXDisplay(), geom_window);
+
+    geom_visible = True;
+  }
+
+  char label[1024];
+
+  sprintf(label, i18n->getMessage(ScreenSet, ScreenPositionFormat,
+				  "X: %4d x Y: %4d"), x, y);
+
+  XClearWindow(getBaseDisplay()->getXDisplay(), geom_window);
+
+  if (i18n->multibyte()) {
+    XmbDrawString(getBaseDisplay()->getXDisplay(), geom_window,
+		  resource.wstyle.fontset, resource.wstyle.l_text_focus_gc,
+		  resource.bevel_width, resource.bevel_width -
+		  resource.wstyle.fontset_extents->max_ink_extent.y,
+		  label, strlen(label));
+  } else {
+    XDrawString(getBaseDisplay()->getXDisplay(), geom_window,
+		resource.wstyle.l_text_focus_gc,
+		resource.bevel_width,
+		resource.wstyle.font->ascent +
+		resource.bevel_width, label, strlen(label));
+  }
+}
+
+
+void BScreen::showGeometry(unsigned int gx, unsigned int gy) {
+  if (! geom_visible) {
+    XMoveResizeWindow(getBaseDisplay()->getXDisplay(), geom_window,
+                      (getWidth() - geom_w) / 2,
+                      (getHeight() - geom_h) / 2, geom_w, geom_h);
+    XMapWindow(getBaseDisplay()->getXDisplay(), geom_window);
+    XRaiseWindow(getBaseDisplay()->getXDisplay(), geom_window);
+
+    geom_visible = True;
+  }
+
+  char label[1024];
+
+  sprintf(label, i18n->getMessage(ScreenSet, ScreenGeometryFormat,
+				  "W: %4d x H: %4d"), gx, gy);
+
+  XClearWindow(getBaseDisplay()->getXDisplay(), geom_window);
+
+  if (i18n->multibyte()) {
+    XmbDrawString(getBaseDisplay()->getXDisplay(), geom_window,
+		  resource.wstyle.fontset, resource.wstyle.l_text_focus_gc,
+		  resource.bevel_width, resource.bevel_width -
+		  resource.wstyle.fontset_extents->max_ink_extent.y,
+		  label, strlen(label));
+  } else {
+    XDrawString(getBaseDisplay()->getXDisplay(), geom_window,
+		resource.wstyle.l_text_focus_gc,
+		resource.bevel_width,
+		resource.wstyle.font->ascent +
+		resource.bevel_width, label, strlen(label));
+  }
+}
+
+
+void BScreen::hideGeometry(void) {
+  if (geom_visible) {
+    XUnmapWindow(getBaseDisplay()->getXDisplay(), geom_window);
+    geom_visible = False;
+  }
+}
diff --git a/src/Screen.h b/src/Screen.h
new file mode 100644
index 00000000..d49668f9
--- /dev/null
+++ b/src/Screen.h
@@ -0,0 +1,349 @@
+// Screen.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Screen_hh
+#define   __Screen_hh
+
+#include 
+#include 
+
+#ifdef    TIME_WITH_SYS_TIME
+#  include 
+#  include 
+#else // !TIME_WITH_SYS_TIME
+#  ifdef    HAVE_SYS_TIME_H
+#    include 
+#  else // !HAVE_SYS_TIME_H
+#    include 
+#  endif // HAVE_SYS_TIME_H
+#endif // TIME_WITH_SYS_TIME
+
+#include "BaseDisplay.h"
+#include "Configmenu.h"
+#include "Iconmenu.h"
+#include "LinkedList.h"
+#include "Netizen.h"
+#include "Rootmenu.h"
+#include "Timer.h"
+#include "Workspace.h"
+#include "Workspacemenu.h"
+#include "openbox.h"
+#ifdef    SLIT
+#  include "Slit.h"
+#endif // SLIT
+#include "Image.h"
+
+// forward declaration
+class BScreen;
+
+struct WindowStyle {
+  BColor f_focus, f_unfocus, l_text_focus, l_text_unfocus, b_pic_focus,
+    b_pic_unfocus;
+  BTexture t_focus, t_unfocus, l_focus, l_unfocus, h_focus, h_unfocus,
+    b_focus, b_unfocus, b_pressed, g_focus, g_unfocus;
+  GC l_text_focus_gc, l_text_unfocus_gc, b_pic_focus_gc, b_pic_unfocus_gc;
+
+  XFontSet fontset;
+  XFontSetExtents *fontset_extents;
+  XFontStruct *font;
+  
+  int justify;
+};
+
+struct ToolbarStyle {
+  BColor l_text, w_text, c_text, b_pic;
+  BTexture toolbar, label, window, button, pressed, clock;
+  GC l_text_gc, w_text_gc, c_text_gc, b_pic_gc;
+
+  XFontSet fontset;
+  XFontSetExtents *fontset_extents;
+  XFontStruct *font;
+  
+  int justify;
+};
+
+struct MenuStyle {
+  BColor t_text, f_text, h_text, d_text;
+  BTexture title, frame, hilite;
+  GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc;
+
+  XFontSet t_fontset, f_fontset;
+  XFontSetExtents *t_fontset_extents, *f_fontset_extents;
+  XFontStruct *t_font, *f_font;
+
+  int t_justify, f_justify, bullet, bullet_pos;
+};
+
+
+class BScreen : public ScreenInfo {
+private:
+  Bool root_colormap_installed, managed, geom_visible;
+  GC opGC;
+  Pixmap geom_pixmap;
+  Window geom_window;
+
+  Openbox *openbox;
+  BImageControl *image_control;
+  Configmenu *configmenu;
+  Iconmenu *iconmenu;
+  Rootmenu *rootmenu;
+
+  LinkedList *rootmenuList;
+  LinkedList *netizenList;
+  LinkedList *iconList;
+
+#ifdef    SLIT
+  Slit *slit;
+#endif // SLIT
+
+  Toolbar *toolbar;
+  Workspace *current_workspace;
+  Workspacemenu *workspacemenu;
+
+  unsigned int geom_w, geom_h;
+  unsigned long event_mask;
+
+  LinkedList *workspaceNames;
+  LinkedList *workspacesList;
+
+  struct resource {
+    WindowStyle wstyle;
+    ToolbarStyle tstyle;
+    MenuStyle mstyle;
+
+    Bool toolbar_on_top, toolbar_auto_hide, sloppy_focus, auto_raise,
+      auto_edge_balance, image_dither, ordered_dither, opaque_move, full_max,
+      focus_new, focus_last;
+    BColor border_color;
+    XrmDatabase stylerc;
+
+    int workspaces, toolbar_placement, toolbar_width_percent, placement_policy,
+      edge_snap_threshold, row_direction, col_direction;
+
+#ifdef    SLIT
+    Bool slit_on_top, slit_auto_hide;
+    int slit_placement, slit_direction;
+#endif // SLIT
+
+    unsigned int handle_width, bevel_width, frame_width, border_width;
+    unsigned int zones; // number of zones to be used when alt-resizing a window
+
+#ifdef    HAVE_STRFTIME
+    char *strftime_format;
+#else // !HAVE_STRFTIME
+    Bool clock24hour;
+    int date_format;
+#endif // HAVE_STRFTIME
+
+    char *root_command;
+  } resource;
+
+
+protected:
+  Bool parseMenuFile(FILE *, Rootmenu *);
+
+  void readDatabaseTexture(char *, char *, BTexture *, unsigned long);
+  void readDatabaseColor(char *, char *, BColor *, unsigned long);
+
+  void readDatabaseFontSet(char *, char *, XFontSet *);
+  XFontSet createFontSet(char *);
+  void readDatabaseFont(char *, char *, XFontStruct **);
+
+  void InitMenu(void);
+  void LoadStyle(void);
+
+
+public:
+  BScreen(Openbox *, int);
+  ~BScreen(void);
+
+  inline const Bool &isToolbarOnTop(void) const
+  { return resource.toolbar_on_top; }
+  inline const Bool &doToolbarAutoHide(void) const
+  { return resource.toolbar_auto_hide; }
+  inline const Bool &isSloppyFocus(void) const
+  { return resource.sloppy_focus; }
+  inline const Bool &isRootColormapInstalled(void) const
+  { return root_colormap_installed; }
+  inline const Bool &doAutoRaise(void) const { return resource.auto_raise; }
+  inline const Bool &isScreenManaged(void) const { return managed; }
+  inline const Bool &doImageDither(void) const
+  { return resource.image_dither; }
+  inline const Bool &doOrderedDither(void) const
+  { return resource.ordered_dither; }
+  inline const Bool &doOpaqueMove(void) const { return resource.opaque_move; }
+  inline const Bool &doFullMax(void) const { return resource.full_max; }
+  inline const Bool &doFocusNew(void) const { return resource.focus_new; }
+  inline const Bool &doFocusLast(void) const { return resource.focus_last; }
+
+  inline const GC &getOpGC() const { return opGC; }
+
+  inline Openbox *getOpenbox(void) { return openbox; }
+  inline BColor *getBorderColor(void) { return &resource.border_color; }
+  inline BImageControl *getImageControl(void) { return image_control; }
+  inline Rootmenu *getRootmenu(void) { return rootmenu; }
+
+#ifdef   SLIT
+  inline const Bool &isSlitOnTop(void) const { return resource.slit_on_top; }
+  inline const Bool &doSlitAutoHide(void) const
+  { return resource.slit_auto_hide; }
+  inline Slit *getSlit(void) { return slit; }
+  inline const int &getSlitPlacement(void) const
+  { return resource.slit_placement; }
+  inline const int &getSlitDirection(void) const
+  { return resource.slit_direction; }
+  inline void saveSlitPlacement(int p) { resource.slit_placement = p; }
+  inline void saveSlitDirection(int d) { resource.slit_direction = d; }
+  inline void saveSlitOnTop(Bool t)    { resource.slit_on_top = t; }
+  inline void saveSlitAutoHide(Bool t) { resource.slit_auto_hide = t; }
+#endif // SLIT
+
+  inline int getWindowZones(void) const
+  { return resource.zones; }
+  inline void saveWindowZones(int z) { resource.zones = z; }
+  
+  inline Toolbar *getToolbar(void) { return toolbar; }
+
+  inline Workspace *getWorkspace(int w) { return workspacesList->find(w); }
+  inline Workspace *getCurrentWorkspace(void) { return current_workspace; }
+
+  inline Workspacemenu *getWorkspacemenu(void) { return workspacemenu; }
+
+  inline const unsigned int &getHandleWidth(void) const
+  { return resource.handle_width; }
+  inline const unsigned int &getBevelWidth(void) const
+  { return resource.bevel_width; }
+  inline const unsigned int &getFrameWidth(void) const
+  { return resource.frame_width; }
+  inline const unsigned int &getBorderWidth(void) const
+  { return resource.border_width; }
+
+  inline const int getCurrentWorkspaceID()
+  { return current_workspace->getWorkspaceID(); }
+  inline const int getCount(void) { return workspacesList->count(); }
+  inline const int getIconCount(void) { return iconList->count(); }
+  inline const int &getNumberOfWorkspaces(void) const
+  { return resource.workspaces; }
+  inline const int &getToolbarPlacement(void) const
+  { return resource.toolbar_placement; }
+  inline const int &getToolbarWidthPercent(void) const
+  { return resource.toolbar_width_percent; }
+  inline const int &getPlacementPolicy(void) const
+  { return resource.placement_policy; }
+  inline const int &getEdgeSnapThreshold(void) const
+  { return resource.edge_snap_threshold; }
+  inline const int &getRowPlacementDirection(void) const
+  { return resource.row_direction; }
+  inline const int &getColPlacementDirection(void) const
+  { return resource.col_direction; }
+
+  inline void saveRootCommand(const char *cmd) {
+    if (resource.root_command != NULL)
+      delete [] resource.root_command;
+    if (cmd != NULL)
+      resource.root_command = bstrdup(cmd);
+    else
+      resource.root_command = NULL;
+  }
+  inline const char *getRootCommand(void) const
+  { return resource.root_command; }
+  
+  inline void setRootColormapInstalled(Bool r) { root_colormap_installed = r; }
+  inline void saveSloppyFocus(Bool s) { resource.sloppy_focus = s; }
+  inline void saveAutoRaise(Bool a) { resource.auto_raise = a; }
+  inline void saveWorkspaces(int w) { resource.workspaces = w; }
+  inline void saveToolbarOnTop(Bool r) { resource.toolbar_on_top = r; }
+  inline void saveToolbarAutoHide(Bool r) { resource.toolbar_auto_hide = r; }
+  inline void saveToolbarWidthPercent(int w)
+  { resource.toolbar_width_percent = w; }
+  inline void saveToolbarPlacement(int p) { resource.toolbar_placement = p; }
+  inline void savePlacementPolicy(int p) { resource.placement_policy = p; }
+  inline void saveRowPlacementDirection(int d) { resource.row_direction = d; }
+  inline void saveColPlacementDirection(int d) { resource.col_direction = d; }
+  inline void saveEdgeSnapThreshold(int t)
+  { resource.edge_snap_threshold = t; }
+  inline void saveImageDither(Bool d) { resource.image_dither = d; }
+  inline void saveOpaqueMove(Bool o) { resource.opaque_move = o; }
+  inline void saveFullMax(Bool f) { resource.full_max = f; }
+  inline void saveFocusNew(Bool f) { resource.focus_new = f; }
+  inline void saveFocusLast(Bool f) { resource.focus_last = f; }
+  inline void iconUpdate(void) { iconmenu->update(); }
+
+#ifdef    HAVE_STRFTIME
+  inline char *getStrftimeFormat(void) { return resource.strftime_format; }
+  void saveStrftimeFormat(char *);
+#else // !HAVE_STRFTIME
+  inline int getDateFormat(void) { return resource.date_format; }
+  inline void saveDateFormat(int f) { resource.date_format = f; }
+  inline Bool isClock24Hour(void) { return resource.clock24hour; }
+  inline void saveClock24Hour(Bool c) { resource.clock24hour = c; }
+#endif // HAVE_STRFTIME
+
+  inline WindowStyle *getWindowStyle(void) { return &resource.wstyle; }
+  inline MenuStyle *getMenuStyle(void) { return &resource.mstyle; }
+  inline ToolbarStyle *getToolbarStyle(void) { return &resource.tstyle; }
+
+  OpenboxWindow *getIcon(int);
+
+  int addWorkspace(void);
+  int removeLastWorkspace(void);
+
+  void removeWorkspaceNames(void);
+  void addWorkspaceName(char *);
+  void addNetizen(Netizen *);
+  void removeNetizen(Window);
+  void addIcon(OpenboxWindow *);
+  void removeIcon(OpenboxWindow *);
+  char* getNameOfWorkspace(int);
+  void changeWorkspaceID(int);
+  void raiseWindows(Window *, int);
+  void reassociateWindow(OpenboxWindow *, int, Bool);
+  void prevFocus(void);
+  void nextFocus(void);
+  void raiseFocus(void);
+  void reconfigure(void);
+  void rereadMenu(void);
+  void shutdown(void);
+  void showPosition(int, int);
+  void showGeometry(unsigned int, unsigned int);
+  void hideGeometry(void);
+
+  void updateNetizenCurrentWorkspace(void);
+  void updateNetizenWorkspaceCount(void);
+  void updateNetizenWindowFocus(void);
+  void updateNetizenWindowAdd(Window, unsigned long);
+  void updateNetizenWindowDel(Window);
+  void updateNetizenConfigNotify(XEvent *);
+  void updateNetizenWindowRaise(Window);
+  void updateNetizenWindowLower(Window);
+
+  enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement, LeftRight,
+         RightLeft, TopBottom, BottomTop };
+  enum { LeftJustify = 1, RightJustify, CenterJustify };
+  enum { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet };
+  enum { Restart = 1, RestartOther, Exit, Shutdown, Execute, Reconfigure,
+         WindowShade, WindowIconify, WindowMaximize, WindowClose, WindowRaise,
+         WindowLower, WindowStick, WindowKill, SetStyle };
+};
+
+
+#endif // __Screen_hh
diff --git a/src/Slit.cc b/src/Slit.cc
new file mode 100644
index 00000000..2eb940e7
--- /dev/null
+++ b/src/Slit.cc
@@ -0,0 +1,773 @@
+// Slit.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#ifdef    SLIT
+
+#include 
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Image.h"
+#include "Screen.h"
+#include "Slit.h"
+#include "Toolbar.h"
+
+
+Slit::Slit(BScreen *scr) {
+  screen = scr;
+  openbox = screen->getOpenbox();
+
+  on_top = screen->isSlitOnTop();
+  hidden = do_auto_hide = screen->doSlitAutoHide();
+
+  display = screen->getBaseDisplay()->getXDisplay();
+  frame.window = frame.pixmap = None;
+
+  timer = new BTimer(openbox, this);
+  timer->setTimeout(openbox->getAutoRaiseDelay());
+  timer->fireOnce(True);
+
+  clientList = new LinkedList;
+
+  slitmenu = new Slitmenu(this);
+
+  XSetWindowAttributes attrib;
+  unsigned long create_mask = CWBackPixmap | CWBackPixel | CWBorderPixel |
+                              CWColormap | CWOverrideRedirect | CWEventMask;
+  attrib.background_pixmap = None;
+  attrib.background_pixel = attrib.border_pixel =
+    screen->getBorderColor()->getPixel();
+  attrib.colormap = screen->getColormap();
+  attrib.override_redirect = True;
+  attrib.event_mask = SubstructureRedirectMask | ButtonPressMask |
+                      EnterWindowMask | LeaveWindowMask;
+
+  frame.x = frame.y = 0;
+  frame.width = frame.height = 1;
+
+  frame.window =
+    XCreateWindow(display, screen->getRootWindow(), frame.x, frame.y,
+		  frame.width, frame.height, screen->getBorderWidth(),
+                  screen->getDepth(), InputOutput, screen->getVisual(),
+                  create_mask, &attrib);
+  openbox->saveSlitSearch(frame.window, this);
+
+  reconfigure();
+}
+
+
+Slit::~Slit() {
+  openbox->grab();
+
+  if (timer->isTiming()) timer->stop();
+  delete timer;
+
+  delete clientList;
+  delete slitmenu;
+
+  screen->getImageControl()->removeImage(frame.pixmap);
+
+  openbox->removeSlitSearch(frame.window);
+
+  XDestroyWindow(display, frame.window);
+
+  openbox->ungrab();
+}
+
+
+void Slit::addClient(Window w) {
+  openbox->grab();
+
+  if (openbox->validateWindow(w)) {
+    SlitClient *client = new SlitClient;
+    client->client_window = w;
+
+    XWMHints *wmhints = XGetWMHints(display, w);
+
+    if (wmhints) {
+      if ((wmhints->flags & IconWindowHint) &&
+	  (wmhints->icon_window != None)) {
+	XMoveWindow(display, client->client_window, screen->getWidth() + 10,
+		    screen->getHeight() + 10);
+	XMapWindow(display, client->client_window);
+
+	client->icon_window = wmhints->icon_window;
+	client->window = client->icon_window;
+      } else {
+	client->icon_window = None;
+	client->window = client->client_window;
+      }
+
+      XFree(wmhints);
+    } else {
+      client->icon_window = None;
+      client->window = client->client_window;
+    }
+
+    XWindowAttributes attrib;
+    if (XGetWindowAttributes(display, client->window, &attrib)) {
+      client->width = attrib.width;
+      client->height = attrib.height;
+    } else {
+      client->width = client->height = 64;
+    }
+
+    XSetWindowBorderWidth(display, client->window, 0);
+
+    XSelectInput(display, frame.window, NoEventMask);
+    XSelectInput(display, client->window, NoEventMask);
+
+    XReparentWindow(display, client->window, frame.window, 0, 0);
+    XMapRaised(display, client->window);
+    XChangeSaveSet(display, client->window, SetModeInsert);
+
+    XSelectInput(display, frame.window, SubstructureRedirectMask |
+		 ButtonPressMask | EnterWindowMask | LeaveWindowMask);
+    XSelectInput(display, client->window, StructureNotifyMask |
+                 SubstructureNotifyMask | EnterWindowMask);
+    XFlush(display);
+
+    clientList->insert(client);
+
+    openbox->saveSlitSearch(client->client_window, this);
+    openbox->saveSlitSearch(client->icon_window, this);
+    reconfigure();
+  }
+
+  openbox->ungrab();
+}
+
+
+void Slit::removeClient(SlitClient *client, Bool remap) {
+  openbox->removeSlitSearch(client->client_window);
+  openbox->removeSlitSearch(client->icon_window);
+  clientList->remove(client);
+
+  screen->removeNetizen(client->window);
+
+  if (remap && openbox->validateWindow(client->window)) {
+    XSelectInput(display, frame.window, NoEventMask);
+    XSelectInput(display, client->window, NoEventMask);
+    XReparentWindow(display, client->window, screen->getRootWindow(),
+		    client->x, client->y);
+    XChangeSaveSet(display, client->window, SetModeDelete);
+    XSelectInput(display, frame.window, SubstructureRedirectMask |
+		 ButtonPressMask | EnterWindowMask | LeaveWindowMask);
+    XFlush(display);
+  }
+
+  delete client;
+  client = (SlitClient *) 0;
+}
+
+
+void Slit::removeClient(Window w, Bool remap) {
+  openbox->grab();
+
+  Bool reconf = False;
+
+  LinkedListIterator it(clientList);
+  for (SlitClient *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->window == w) {
+      removeClient(tmp, remap);
+      reconf = True;
+
+      break;
+    }
+  }
+
+  if (reconf) reconfigure();
+
+  openbox->ungrab();
+}
+
+
+void Slit::reconfigure(void) {
+  frame.width = 0;
+  frame.height = 0;
+  LinkedListIterator it(clientList);
+  SlitClient *client;
+
+  switch (screen->getSlitDirection()) {
+  case Vertical:
+    for (client = it.current(); client; it++, client = it.current()) {
+      frame.height += client->height + screen->getBevelWidth();
+
+      if (frame.width < client->width)
+        frame.width = client->width;
+    }
+
+    if (frame.width < 1)
+      frame.width = 1;
+    else
+      frame.width += (screen->getBevelWidth() * 2);
+
+    if (frame.height < 1)
+      frame.height = 1;
+    else
+      frame.height += screen->getBevelWidth();
+
+    break;
+
+  case Horizontal:
+    for (client = it.current(); client; it++, client = it.current()) {
+      frame.width += client->width + screen->getBevelWidth();
+
+      if (frame.height < client->height)
+        frame.height = client->height;
+    }
+
+    if (frame.width < 1)
+      frame.width = 1;
+    else
+      frame.width += screen->getBevelWidth();
+
+    if (frame.height < 1)
+      frame.height = 1;
+    else
+      frame.height += (screen->getBevelWidth() * 2);
+
+    break;
+  }
+
+  reposition();
+
+  XSetWindowBorderWidth(display ,frame.window, screen->getBorderWidth());
+  XSetWindowBorder(display, frame.window,
+                   screen->getBorderColor()->getPixel());
+
+  if (! clientList->count())
+    XUnmapWindow(display, frame.window);
+  else
+    XMapWindow(display, frame.window);
+
+  Pixmap tmp = frame.pixmap;
+  BImageControl *image_ctrl = screen->getImageControl();
+  BTexture *texture = &(screen->getToolbarStyle()->toolbar);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.pixmap = None;
+    XSetWindowBackground(display, frame.window,
+			 texture->getColor()->getPixel());
+  } else {
+    frame.pixmap = image_ctrl->renderImage(frame.width, frame.height,
+					   texture);
+    XSetWindowBackgroundPixmap(display, frame.window, frame.pixmap);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+  XClearWindow(display, frame.window);
+
+  int x, y;
+  it.reset();
+
+  switch (screen->getSlitDirection()) {
+  case Vertical:
+    x = 0;
+    y = screen->getBevelWidth();
+
+    for (client = it.current(); client; it++, client = it.current()) {
+      x = (frame.width - client->width) / 2;
+
+      XMoveResizeWindow(display, client->window, x, y,
+                        client->width, client->height);
+      XMapWindow(display, client->window);
+
+      // for ICCCM compliance
+      client->x = x;
+      client->y = y;
+
+      XEvent event;
+      event.type = ConfigureNotify;
+
+      event.xconfigure.display = display;
+      event.xconfigure.event = client->window;
+      event.xconfigure.window = client->window;
+      event.xconfigure.x = x;
+      event.xconfigure.y = y;
+      event.xconfigure.width = client->width;
+      event.xconfigure.height = client->height;
+      event.xconfigure.border_width = 0;
+      event.xconfigure.above = frame.window;
+      event.xconfigure.override_redirect = False;
+
+      XSendEvent(display, client->window, False, StructureNotifyMask, &event);
+
+      y += client->height + screen->getBevelWidth();
+    }
+
+    break;
+
+  case Horizontal:
+    x = screen->getBevelWidth();
+    y = 0;
+
+    for (client = it.current(); client; it++, client = it.current()) {
+      y = (frame.height - client->height) / 2;
+
+      XMoveResizeWindow(display, client->window, x, y,
+                        client->width, client->height);
+      XMapWindow(display, client->window);
+
+      // for ICCCM compliance
+      client->x = x;
+      client->y = y;
+
+      XEvent event;
+      event.type = ConfigureNotify;
+
+      event.xconfigure.display = display;
+      event.xconfigure.event = client->window;
+      event.xconfigure.window = client->window;
+      event.xconfigure.x = x;
+      event.xconfigure.y = y;
+      event.xconfigure.width = client->width;
+      event.xconfigure.height = client->height;
+      event.xconfigure.border_width = 0;
+      event.xconfigure.above = frame.window;
+      event.xconfigure.override_redirect = False;
+
+      XSendEvent(display, client->window, False, StructureNotifyMask, &event);
+
+      x += client->width + screen->getBevelWidth();
+    }
+
+    break;
+  }
+
+  slitmenu->reconfigure();
+}
+
+
+void Slit::reposition(void) {
+  // place the slit in the appropriate place
+  switch (screen->getSlitPlacement()) {
+  case TopLeft:
+    frame.x = 0;
+    frame.y = 0;
+    if (screen->getSlitDirection() == Vertical) {
+      frame.x_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+	               - frame.width;
+      frame.y_hidden = 0;
+    } else {
+      frame.x_hidden = 0;
+      frame.y_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+	               - frame.height;
+    }
+    break;
+
+  case CenterLeft:
+    frame.x = 0;
+    frame.y = (screen->getHeight() - frame.height) / 2;
+    frame.x_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+	             - frame.width;
+    frame.y_hidden = frame.y;
+    break;
+
+  case BottomLeft:
+    frame.x = 0;
+    frame.y = screen->getHeight() - frame.height
+      - (screen->getBorderWidth() * 2);
+    if (screen->getSlitDirection() == Vertical) {
+      frame.x_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+	               - frame.width;
+      frame.y_hidden = frame.y;
+    } else {
+      frame.x_hidden = 0;
+      frame.y_hidden = screen->getHeight() - screen->getBevelWidth()
+	               - screen->getBorderWidth();
+    }
+    break;
+
+  case TopCenter:
+    frame.x = (screen->getWidth() - frame.width) / 2;
+    frame.y = 0;
+    frame.x_hidden = frame.x;
+    frame.y_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+                     - frame.height;
+    break;
+
+  case BottomCenter:
+    frame.x = (screen->getWidth() - frame.width) / 2;
+    frame.y = screen->getHeight() - frame.height
+      - (screen->getBorderWidth() * 2);
+    frame.x_hidden = frame.x;
+    frame.y_hidden = screen->getHeight() - screen->getBevelWidth()
+                     - screen->getBorderWidth();
+    break;
+
+  case TopRight:
+    frame.x = screen->getWidth() - frame.width
+      - (screen->getBorderWidth() * 2);
+    frame.y = 0;
+    if (screen->getSlitDirection() == Vertical) {
+      frame.x_hidden = screen->getWidth() - screen->getBevelWidth()
+	               - screen->getBorderWidth();
+      frame.y_hidden = 0;
+    } else {
+      frame.x_hidden = frame.x;
+      frame.y_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+                       - frame.height;
+    }
+    break;
+
+  case CenterRight:
+  default:
+    frame.x = screen->getWidth() - frame.width
+      - (screen->getBorderWidth() * 2);
+    frame.y = (screen->getHeight() - frame.height) / 2;
+    frame.x_hidden = screen->getWidth() - screen->getBevelWidth()
+                     - screen->getBorderWidth();
+    frame.y_hidden = frame.y;
+    break;
+
+  case BottomRight:
+    frame.x = screen->getWidth() - frame.width
+      - (screen->getBorderWidth() * 2);
+    frame.y = screen->getHeight() - frame.height
+      - (screen->getBorderWidth() * 2);
+    if (screen->getSlitDirection() == Vertical) {
+      frame.x_hidden = screen->getWidth() - screen->getBevelWidth()
+	               - screen->getBorderWidth();
+      frame.y_hidden = frame.y;
+    } else {
+      frame.x_hidden = frame.x;
+      frame.y_hidden = screen->getHeight() - screen->getBevelWidth()
+                       - screen->getBorderWidth();
+    }
+    break;
+  }
+
+  Toolbar *tbar = screen->getToolbar();
+  int sw = frame.width + (screen->getBorderWidth() * 2),
+      sh = frame.height + (screen->getBorderWidth() * 2),
+      tw = tbar->getWidth() + screen->getBorderWidth(),
+      th = tbar->getHeight() + screen->getBorderWidth();
+
+  if (tbar->getX() < frame.x + sw && tbar->getX() + tw > frame.x &&
+      tbar->getY() < frame.y + sh && tbar->getY() + th > frame.y) {
+    if (frame.y < th) {
+      frame.y += tbar->getExposedHeight();
+      if (screen->getSlitDirection() == Vertical)
+        frame.y_hidden += tbar->getExposedHeight();
+      else
+	frame.y_hidden = frame.y;
+    } else {
+      frame.y -= tbar->getExposedHeight();
+      if (screen->getSlitDirection() == Vertical)
+        frame.y_hidden -= tbar->getExposedHeight();
+      else
+	frame.y_hidden = frame.y;
+    }
+  }
+
+  if (hidden)
+    XMoveResizeWindow(display, frame.window, frame.x_hidden,
+		      frame.y_hidden, frame.width, frame.height);
+  else
+    XMoveResizeWindow(display, frame.window, frame.x,
+		      frame.y, frame.width, frame.height);
+}
+
+
+void Slit::shutdown(void) {
+  while (clientList->count())
+    removeClient(clientList->first());
+}
+
+
+void Slit::buttonPressEvent(XButtonEvent *e) {
+  if (e->window != frame.window) return;
+
+  if (e->button == Button1 && (! on_top)) {
+    Window w[1] = { frame.window };
+    screen->raiseWindows(w, 1);
+  } else if (e->button == Button2 && (! on_top)) {
+    XLowerWindow(display, frame.window);
+  } else if (e->button == Button3) {
+    if (! slitmenu->isVisible()) {
+      int x, y;
+
+      x = e->x_root - (slitmenu->getWidth() / 2);
+      y = e->y_root - (slitmenu->getHeight() / 2);
+
+      if (x < 0)
+        x = 0;
+      else if (x + slitmenu->getWidth() > screen->getWidth())
+        x = screen->getWidth() - slitmenu->getWidth();
+
+      if (y < 0)
+        y = 0;
+      else if (y + slitmenu->getHeight() > screen->getHeight())
+        y = screen->getHeight() - slitmenu->getHeight();
+
+      slitmenu->move(x, y);
+      slitmenu->show();
+    } else {
+      slitmenu->hide();
+    }
+  }
+}
+
+
+void Slit::enterNotifyEvent(XCrossingEvent *) {
+  if (! do_auto_hide)
+    return;
+
+  if (hidden) {
+    if (! timer->isTiming()) timer->start();
+  } else {
+    if (timer->isTiming()) timer->stop();
+  }
+}
+
+
+void Slit::leaveNotifyEvent(XCrossingEvent *) {
+  if (! do_auto_hide)
+    return;
+
+  if (hidden) {
+    if (timer->isTiming()) timer->stop();
+  } else if (! slitmenu->isVisible()) {
+    if (! timer->isTiming()) timer->start();
+  }
+}
+
+
+void Slit::configureRequestEvent(XConfigureRequestEvent *e) {
+  openbox->grab();
+
+  if (openbox->validateWindow(e->window)) {
+    Bool reconf = False;
+    XWindowChanges xwc;
+
+    xwc.x = e->x;
+    xwc.y = e->y;
+    xwc.width = e->width;
+    xwc.height = e->height;
+    xwc.border_width = 0;
+    xwc.sibling = e->above;
+    xwc.stack_mode = e->detail;
+
+    XConfigureWindow(display, e->window, e->value_mask, &xwc);
+
+    LinkedListIterator it(clientList);
+    SlitClient *client = it.current();
+    for (; client; it++, client = it.current())
+      if (client->window == e->window)
+        if (client->width != ((unsigned) e->width) ||
+            client->height != ((unsigned) e->height)) {
+          client->width = (unsigned) e->width;
+          client->height = (unsigned) e->height;
+
+          reconf = True;
+
+          break;
+        }
+
+    if (reconf) reconfigure();
+
+  }
+
+  openbox->ungrab();
+}
+
+
+void Slit::timeout(void) {
+  hidden = ! hidden;
+  if (hidden)
+    XMoveWindow(display, frame.window, frame.x_hidden, frame.y_hidden);
+  else
+    XMoveWindow(display, frame.window, frame.x, frame.y);
+}
+
+
+Slitmenu::Slitmenu(Slit *sl) : Basemenu(sl->screen) {
+  slit = sl;
+
+  setLabel(i18n->getMessage(SlitSet, SlitSlitTitle, "Slit"));
+  setInternalMenu();
+
+  directionmenu = new Directionmenu(this);
+  placementmenu = new Placementmenu(this);
+
+  insert(i18n->getMessage(CommonSet, CommonDirectionTitle, "Direction"),
+	 directionmenu);
+  insert(i18n->getMessage(CommonSet, CommonPlacementTitle, "Placement"),
+	 placementmenu);
+  insert(i18n->getMessage(CommonSet, CommonAlwaysOnTop, "Always on top"), 1);
+  insert(i18n->getMessage(CommonSet, CommonAutoHide, "Auto hide"), 2);
+
+  update();
+
+  if (slit->isOnTop()) setItemSelected(2, True);
+  if (slit->doAutoHide()) setItemSelected(3, True);
+}
+
+
+Slitmenu::~Slitmenu(void) {
+  delete directionmenu;
+  delete placementmenu;
+}
+
+
+void Slitmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+  if (! item) return;
+
+  switch (item->function()) {
+  case 1: { // always on top
+    Bool change = ((slit->isOnTop()) ?  False : True);
+    slit->on_top = change;
+    setItemSelected(2, change);
+
+    if (slit->isOnTop()) slit->screen->raiseWindows((Window *) 0, 0);
+    break;
+  }
+
+  case 2: { // auto hide
+    Bool change = ((slit->doAutoHide()) ?  False : True);
+    slit->do_auto_hide = change;
+    setItemSelected(3, change);
+
+    break;
+  }
+  } // switch
+}
+
+
+void Slitmenu::internal_hide(void) {
+  Basemenu::internal_hide();
+  if (slit->doAutoHide())
+    slit->timeout();
+}
+
+
+void Slitmenu::reconfigure(void) {
+  directionmenu->reconfigure();
+  placementmenu->reconfigure();
+
+  Basemenu::reconfigure();
+}
+
+
+Slitmenu::Directionmenu::Directionmenu(Slitmenu *sm)
+  : Basemenu(sm->slit->screen) {
+  slitmenu = sm;
+
+  setLabel(i18n->getMessage(SlitSet, SlitSlitDirection, "Slit Direction"));
+  setInternalMenu();
+
+  insert(i18n->getMessage(CommonSet, CommonDirectionHoriz, "Horizontal"),
+	 Slit::Horizontal);
+  insert(i18n->getMessage(CommonSet, CommonDirectionVert, "Vertical"),
+	 Slit::Vertical);
+
+  update();
+
+  if (sm->slit->screen->getSlitDirection() == Slit::Horizontal)
+    setItemSelected(0, True);
+  else
+    setItemSelected(1, True);
+}
+
+
+void Slitmenu::Directionmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+  if (! item) return;
+
+  slitmenu->slit->screen->saveSlitDirection(item->function());
+
+  if (item->function() == Slit::Horizontal) {
+    setItemSelected(0, True);
+    setItemSelected(1, False);
+  } else {
+    setItemSelected(0, False);
+    setItemSelected(1, True);
+  }
+
+  hide();
+  slitmenu->slit->reconfigure();
+}
+
+
+Slitmenu::Placementmenu::Placementmenu(Slitmenu *sm)
+  : Basemenu(sm->slit->screen) {
+  slitmenu = sm;
+
+  setLabel(i18n->getMessage(SlitSet, SlitSlitPlacement, "Slit Placement"));
+  setMinimumSublevels(3);
+  setInternalMenu();
+
+  insert(i18n->getMessage(CommonSet, CommonPlacementTopLeft, "Top Left"),
+	 Slit::TopLeft);
+  insert(i18n->getMessage(CommonSet, CommonPlacementCenterLeft, "Center Left"),
+	 Slit::CenterLeft);
+  insert(i18n->getMessage(CommonSet, CommonPlacementBottomLeft, "Bottom Left"),
+	 Slit::BottomLeft);
+  insert(i18n->getMessage(CommonSet, CommonPlacementTopCenter, "Top Center"),
+	 Slit::TopCenter);
+  insert("");
+  insert(i18n->getMessage(CommonSet, CommonPlacementBottomCenter, 
+			  "Bottom Center"),
+	 Slit::BottomCenter);
+  insert(i18n->getMessage(CommonSet, CommonPlacementTopRight, "Top Right"),
+	 Slit::TopRight);
+  insert(i18n->getMessage(CommonSet, CommonPlacementCenterRight,
+			  "Center Right"),
+	 Slit::CenterRight);
+  insert(i18n->getMessage(CommonSet, CommonPlacementBottomRight,
+			  "Bottom Right"),
+	 Slit::BottomRight);
+
+  update();
+}
+
+
+void Slitmenu::Placementmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+  if (! (item && item->function())) return;
+
+  slitmenu->slit->screen->saveSlitPlacement(item->function());
+  hide();
+  slitmenu->slit->reconfigure();
+}
+
+
+#endif // SLIT
diff --git a/src/Slit.h b/src/Slit.h
new file mode 100644
index 00000000..1cb89751
--- /dev/null
+++ b/src/Slit.h
@@ -0,0 +1,159 @@
+// Slit.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+// DEALINGS IN THE SOFTWARE.
+  
+#ifndef   __Slit_hh
+#define   __Slit_hh
+
+#include 
+#include 
+
+#include "Basemenu.h"
+#include "LinkedList.h"
+
+// forward declaration
+class Slit;
+class Slitmenu;
+
+class Slitmenu : public Basemenu {
+private: 
+  class Directionmenu : public Basemenu {
+  private:
+    Slitmenu *slitmenu;
+
+  protected:
+    virtual void itemSelected(int, int);
+
+  public:
+    Directionmenu(Slitmenu *);
+  };
+
+  class Placementmenu : public Basemenu {
+  private:
+    Slitmenu *slitmenu;
+
+  protected: 
+    virtual void itemSelected(int, int);
+
+  public:
+    Placementmenu(Slitmenu *);
+  };
+
+  Directionmenu *directionmenu;
+  Placementmenu *placementmenu;
+
+  Slit *slit;
+
+  friend class Directionmenu;
+  friend class Placementmenu;
+  friend class Slit;
+
+
+protected:
+  virtual void itemSelected(int, int);
+  virtual void internal_hide(void);
+
+
+public:
+  Slitmenu(Slit *);
+  virtual ~Slitmenu(void);
+
+  inline Basemenu *getDirectionmenu(void) { return directionmenu; }
+  inline Basemenu *getPlacementmenu(void) { return placementmenu; }
+
+  void reconfigure(void);
+};
+
+
+class Slit : public TimeoutHandler {
+private:
+  class SlitClient {
+  public:
+    Window window, client_window, icon_window;
+
+    int x, y;
+    unsigned int width, height;
+  };
+
+  Bool on_top, hidden, do_auto_hide;
+  Display *display;
+
+  Openbox *openbox;
+  BScreen *screen;
+  BTimer *timer;
+
+  LinkedList *clientList;
+  Slitmenu *slitmenu;
+
+  struct frame {
+    Pixmap pixmap;
+    Window window;
+
+    int x, y, x_hidden, y_hidden;
+    unsigned int width, height;
+  } frame;
+
+  friend class Slitmenu;
+  friend class Slitmenu::Directionmenu;
+  friend class Slitmenu::Placementmenu;
+
+
+public:
+  Slit(BScreen *);
+  virtual ~Slit();
+
+  inline const Bool &isOnTop(void) const { return on_top; }
+  inline const Bool &isHidden(void) const { return hidden; }
+  inline const Bool &doAutoHide(void) const { return do_auto_hide; }
+
+  inline Slitmenu *getMenu() { return slitmenu; }
+
+  inline const Window &getWindowID() const { return frame.window; }
+
+  inline const int &getX(void) const
+  { return ((hidden) ? frame.x_hidden : frame.x); }
+  inline const int &getY(void) const
+  { return ((hidden) ? frame.y_hidden : frame.y); }
+
+  inline const unsigned int &getWidth(void) const { return frame.width; }
+  inline const unsigned int &getHeight(void) const { return frame.height; }
+
+  void addClient(Window);
+  void removeClient(SlitClient *, Bool = True);
+  void removeClient(Window, Bool = True);
+  void reconfigure(void);
+  void reposition(void);
+  void shutdown(void);
+
+  void buttonPressEvent(XButtonEvent *);
+  void enterNotifyEvent(XCrossingEvent *);
+  void leaveNotifyEvent(XCrossingEvent *);
+  void configureRequestEvent(XConfigureRequestEvent *);
+
+  virtual void timeout(void);
+
+  enum { Vertical = 1, Horizontal };
+  enum { TopLeft = 1, CenterLeft, BottomLeft, TopCenter, BottomCenter,
+         TopRight, CenterRight, BottomRight };
+};
+
+
+#endif // __Slit_hh
diff --git a/src/Timer.cc b/src/Timer.cc
new file mode 100644
index 00000000..95985a01
--- /dev/null
+++ b/src/Timer.cc
@@ -0,0 +1,76 @@
+// Timer.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#  define _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "BaseDisplay.h"
+#include "Timer.h"
+
+BTimer::BTimer(BaseDisplay *d, TimeoutHandler *h) {
+  display = d;
+  handler = h;
+
+  once = timing = False;
+}
+
+BTimer::~BTimer(void) {
+  if (timing) stop();
+}
+
+void BTimer::setTimeout(long t) {
+  _timeout.tv_sec = t / 1000;
+  _timeout.tv_usec = t;
+  _timeout.tv_usec -= (_timeout.tv_sec * 1000);
+  _timeout.tv_usec *= 1000;
+}
+
+void BTimer::setTimeout(timeval t) {
+  _timeout.tv_sec = t.tv_sec;
+  _timeout.tv_usec = t.tv_usec;
+}
+
+void BTimer::start(void) {
+  gettimeofday(&_start, 0);
+
+  if (! timing) {
+    timing = True;
+    display->addTimer(this);
+  }
+}
+
+void BTimer::stop(void) {
+  timing = False;
+
+  display->removeTimer(this);
+}
+
+void BTimer::fireTimeout(void) {
+  if (handler) handler->timeout();
+}
diff --git a/src/Timer.h b/src/Timer.h
new file mode 100644
index 00000000..410d658e
--- /dev/null
+++ b/src/Timer.h
@@ -0,0 +1,78 @@
+// Timer.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+// DEALINGS IN THE SOFTWARE.
+  
+#ifndef   __Timer_hh
+#define   __Timer_hh
+
+#ifdef    TIME_WITH_SYS_TIME
+#  include 
+#  include  
+#else // !TIME_WITH_SYS_TIME 
+#  ifdef    HAVE_SYS_TIME_H
+#    include 
+#  else // !HAVE_SYS_TIME_H
+#    include 
+#  endif // HAVE_SYS_TIME_H
+#endif // TIME_WITH_SYS_TIME
+
+// forward declaration
+class BTimer;
+class TimeoutHandler;
+class BaseDisplay;
+
+class TimeoutHandler {
+public:
+  virtual void timeout(void) = 0;
+};
+
+class BTimer {
+  friend class BaseDisplay;
+private:
+  BaseDisplay *display;
+  TimeoutHandler *handler;
+  int timing, once;
+
+  timeval _start, _timeout;
+
+protected:
+  void fireTimeout(void);
+
+public:
+  BTimer(BaseDisplay *, TimeoutHandler *);
+  virtual ~BTimer(void);
+
+  inline const int &isTiming(void) const { return timing; } 
+  inline const int &doOnce(void) const { return once; }
+
+  inline const timeval &getTimeout(void) const { return _timeout; }
+  inline const timeval &getStartTime(void) const { return _start; }
+
+  inline void fireOnce(int o) { once = o; }
+
+  void setTimeout(long);
+  void setTimeout(timeval);
+  void start(void);
+  void stop(void);
+};
+
+#endif // __Timer_hh
+
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
new file mode 100644
index 00000000..d2e39c85
--- /dev/null
+++ b/src/Toolbar.cc
@@ -0,0 +1,1260 @@
+// Toolbar.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Clientmenu.h"
+#include "Iconmenu.h"
+#include "Rootmenu.h"
+#include "Screen.h"
+#include "Toolbar.h"
+#include "Window.h"
+#include "Workspace.h"
+#include "Workspacemenu.h"
+
+#include 
+#include 
+
+#ifdef    STDC_HEADERS
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#ifdef    TIME_WITH_SYS_TIME
+# include 
+# include 
+#else // !TIME_WITH_SYS_TIME
+# ifdef    HAVE_SYS_TIME_H
+#  include 
+# else // !HAVE_SYS_TIME_H
+#  include 
+# endif // HAVE_SYS_TIME_H
+#endif // TIME_WITH_SYS_TIME
+
+
+Toolbar::Toolbar(BScreen *scrn) {
+  screen = scrn;
+  openbox = screen->getOpenbox();
+
+  // get the clock updating every minute
+  clock_timer = new BTimer(openbox, this);
+  timeval now;
+  gettimeofday(&now, 0);
+  clock_timer->setTimeout((60 - (now.tv_sec % 60)) * 1000);
+  clock_timer->start();
+
+  hide_handler.toolbar = this;
+  hide_timer = new BTimer(openbox, &hide_handler);
+  hide_timer->setTimeout(openbox->getAutoRaiseDelay());
+  hide_timer->fireOnce(True);
+
+  image_ctrl = screen->getImageControl();
+
+  on_top = screen->isToolbarOnTop();
+  hidden = do_auto_hide = screen->doToolbarAutoHide();
+
+  editing = False;
+  new_workspace_name = (char *) 0;
+  new_name_pos = 0;
+  frame.grab_x = frame.grab_y = 0;
+
+  toolbarmenu = new Toolbarmenu(this);
+
+  display = openbox->getXDisplay();
+  XSetWindowAttributes attrib;
+  unsigned long create_mask = CWBackPixmap | CWBackPixel | CWBorderPixel |
+                              CWColormap | CWOverrideRedirect | CWEventMask;
+  attrib.background_pixmap = None;
+  attrib.background_pixel = attrib.border_pixel =
+    screen->getBorderColor()->getPixel();
+  attrib.colormap = screen->getColormap();
+  attrib.override_redirect = True;
+  attrib.event_mask = ButtonPressMask | ButtonReleaseMask |
+                      EnterWindowMask | LeaveWindowMask;
+
+  frame.window =
+    XCreateWindow(display, screen->getRootWindow(), 0, 0, 1, 1, 0,
+		  screen->getDepth(), InputOutput, screen->getVisual(),
+		  create_mask, &attrib);
+  openbox->saveToolbarSearch(frame.window, this);
+
+  attrib.event_mask = ButtonPressMask | ButtonReleaseMask | ExposureMask |
+                      KeyPressMask | EnterWindowMask;
+
+  frame.workspace_label =
+    XCreateWindow(display, frame.window, 0, 0, 1, 1, 0, screen->getDepth(),
+		  InputOutput, screen->getVisual(), create_mask, &attrib);
+  openbox->saveToolbarSearch(frame.workspace_label, this);
+
+  frame.window_label =
+    XCreateWindow(display, frame.window, 0, 0, 1, 1, 0, screen->getDepth(),
+		  InputOutput, screen->getVisual(), create_mask, &attrib);
+  openbox->saveToolbarSearch(frame.window_label, this);
+
+  frame.clock =
+    XCreateWindow(display, frame.window, 0, 0, 1, 1, 0, screen->getDepth(),
+		  InputOutput, screen->getVisual(), create_mask, &attrib);
+  openbox->saveToolbarSearch(frame.clock, this);
+
+  frame.psbutton =
+    XCreateWindow(display ,frame.window, 0, 0, 1, 1, 0, screen->getDepth(),
+                  InputOutput, screen->getVisual(), create_mask, &attrib);
+  openbox->saveToolbarSearch(frame.psbutton, this);
+
+  frame.nsbutton =
+    XCreateWindow(display ,frame.window, 0, 0, 1, 1, 0, screen->getDepth(),
+                  InputOutput, screen->getVisual(), create_mask, &attrib);
+  openbox->saveToolbarSearch(frame.nsbutton, this);
+
+  frame.pwbutton =
+    XCreateWindow(display ,frame.window, 0, 0, 1, 1, 0, screen->getDepth(),
+                  InputOutput, screen->getVisual(), create_mask, &attrib);
+  openbox->saveToolbarSearch(frame.pwbutton, this);
+
+  frame.nwbutton =
+    XCreateWindow(display ,frame.window, 0, 0, 1, 1, 0, screen->getDepth(),
+                  InputOutput, screen->getVisual(), create_mask, &attrib);
+  openbox->saveToolbarSearch(frame.nwbutton, this);
+
+  frame.base = frame.label = frame.wlabel = frame.clk = frame.button =
+    frame.pbutton = None;
+
+  reconfigure();
+
+  XMapSubwindows(display, frame.window);
+  XMapWindow(display, frame.window);
+}
+
+
+Toolbar::~Toolbar(void) {
+  XUnmapWindow(display, frame.window);
+
+  if (frame.base) image_ctrl->removeImage(frame.base);
+  if (frame.label) image_ctrl->removeImage(frame.label);
+  if (frame.wlabel) image_ctrl->removeImage(frame.wlabel);
+  if (frame.clk) image_ctrl->removeImage(frame.clk);
+  if (frame.button) image_ctrl->removeImage(frame.button);
+  if (frame.pbutton) image_ctrl->removeImage(frame.pbutton);
+
+  openbox->removeToolbarSearch(frame.window);
+  openbox->removeToolbarSearch(frame.workspace_label);
+  openbox->removeToolbarSearch(frame.window_label);
+  openbox->removeToolbarSearch(frame.clock);
+  openbox->removeToolbarSearch(frame.psbutton);
+  openbox->removeToolbarSearch(frame.nsbutton);
+  openbox->removeToolbarSearch(frame.pwbutton);
+  openbox->removeToolbarSearch(frame.nwbutton);
+
+  XDestroyWindow(display, frame.workspace_label);
+  XDestroyWindow(display, frame.window_label);
+  XDestroyWindow(display, frame.clock);
+
+  XDestroyWindow(display, frame.window);
+
+  delete hide_timer;
+  delete clock_timer;
+  delete toolbarmenu;
+}
+
+
+void Toolbar::reconfigure(void) {
+  frame.bevel_w = screen->getBevelWidth();
+  frame.width = screen->getWidth() * screen->getToolbarWidthPercent() / 100;
+  
+  if (i18n->multibyte())
+    frame.height =
+      screen->getToolbarStyle()->fontset_extents->max_ink_extent.height;
+  else
+    frame.height = screen->getToolbarStyle()->font->ascent +
+		   screen->getToolbarStyle()->font->descent;
+  frame.button_w = frame.height;
+  frame.height += 2;
+  frame.label_h = frame.height;
+  frame.height += (frame.bevel_w * 2);
+  
+  switch (screen->getToolbarPlacement()) {
+  case TopLeft:
+    frame.x = 0;
+    frame.y = 0;
+    frame.x_hidden = 0;
+    frame.y_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+                     - frame.height;
+    break;
+
+  case BottomLeft:
+    frame.x = 0;
+    frame.y = screen->getHeight() - frame.height
+      - (screen->getBorderWidth() * 2);
+    frame.x_hidden = 0;
+    frame.y_hidden = screen->getHeight() - screen->getBevelWidth()
+                     - screen->getBorderWidth();
+    break;
+
+  case TopCenter:
+    frame.x = (screen->getWidth() - frame.width) / 2;
+    frame.y = 0;
+    frame.x_hidden = frame.x;
+    frame.y_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+                     - frame.height;
+    break;
+
+  case BottomCenter:
+  default:
+    frame.x = (screen->getWidth() - frame.width) / 2;
+    frame.y = screen->getHeight() - frame.height
+      - (screen->getBorderWidth() * 2);
+    frame.x_hidden = frame.x;
+    frame.y_hidden = screen->getHeight() - screen->getBevelWidth()
+                     - screen->getBorderWidth();
+    break;
+
+  case TopRight:
+    frame.x = screen->getWidth() - frame.width
+      - (screen->getBorderWidth() * 2);
+    frame.y = 0;
+    frame.x_hidden = frame.x;
+    frame.y_hidden = screen->getBevelWidth() - screen->getBorderWidth()
+                     - frame.height;
+    break;
+
+  case BottomRight:
+    frame.x = screen->getWidth() - frame.width
+      - (screen->getBorderWidth() * 2);
+    frame.y = screen->getHeight() - frame.height
+      - (screen->getBorderWidth() * 2);
+    frame.x_hidden = frame.x;
+    frame.y_hidden = screen->getHeight() - screen->getBevelWidth()
+                     - screen->getBorderWidth();
+    break;
+  }
+
+#ifdef    HAVE_STRFTIME
+  time_t ttmp = time(NULL);
+  struct tm *tt = 0;
+
+  if (ttmp != -1) {
+    tt = localtime(&ttmp);
+    if (tt) {
+      char t[1024], *time_string = (char *) 0;
+      int len = strftime(t, 1024, screen->getStrftimeFormat(), tt);
+
+      if (i18n->multibyte()) {
+        XRectangle ink, logical;
+        XmbTextExtents(screen->getToolbarStyle()->fontset, t, len, &ink,
+                       &logical);
+        frame.clock_w = logical.width;
+
+        // ben's additional solution to pad some space beside the numbers
+        frame.clock_w +=
+          screen->getToolbarStyle()->fontset_extents->max_logical_extent.width *
+          4;
+
+        // brad's solution, which is currently buggy, too big
+        //frame.clock_w =
+        //  screen->getToolbarStyle()->fontset_extents->max_logical_extent.width
+        //  * len;
+      } else {
+        frame.clock_w = XTextWidth(screen->getToolbarStyle()->font, t, len);
+        // ben's additional solution to pad some space beside the numbers
+        frame.clock_w += screen->getToolbarStyle()->font->max_bounds.width * 4;
+        // brad's solution again, too big
+        //frame.clock_w = screen->getToolbarStyle()->font->max_bounds.width * len;
+      }
+      frame.clock_w += (frame.bevel_w * 4);
+      
+      delete [] time_string;
+    } else {
+      frame.clock_w = 0;
+    }
+  } else {
+    frame.clock_w = 0;
+  }
+#else // !HAVE_STRFTIME
+  frame.clock_w =
+    XTextWidth(screen->getToolbarStyle()->font,
+	       i18n->getMessage(ToolbarSet, ToolbarNoStrftimeLength,
+				"00:00000"),
+	       strlen(i18n->getMessage(ToolbarSet, ToolbarNoStrftimeLength,
+				       "00:00000"))) + (frame.bevel_w * 4);
+#endif // HAVE_STRFTIME
+
+  int i;
+  unsigned int w = 0;
+  frame.workspace_label_w = 0;
+
+  for (i = 0; i < screen->getCount(); i++) {
+    if (i18n->multibyte()) {
+      XRectangle ink, logical;
+      XmbTextExtents(screen->getToolbarStyle()->fontset,
+		     screen->getWorkspace(i)->getName(),
+		     strlen(screen->getWorkspace(i)->getName()),
+		     &ink, &logical);
+      w = logical.width;
+    } else {
+      w = XTextWidth(screen->getToolbarStyle()->font,
+		     screen->getWorkspace(i)->getName(),
+		     strlen(screen->getWorkspace(i)->getName()));
+    }
+    w += (frame.bevel_w * 4);
+
+    if (w > frame.workspace_label_w) frame.workspace_label_w = w;
+  }
+
+  if (frame.workspace_label_w < frame.clock_w)
+    frame.workspace_label_w = frame.clock_w;
+  else if (frame.workspace_label_w > frame.clock_w)
+    frame.clock_w = frame.workspace_label_w;
+
+  frame.window_label_w =
+    (frame.width - (frame.clock_w + (frame.button_w * 4) +
+                    frame.workspace_label_w + (frame.bevel_w * 8) + 6));
+
+  if (hidden) {
+    XMoveResizeWindow(display, frame.window, frame.x_hidden, frame.y_hidden,
+		      frame.width, frame.height);
+  } else {
+    XMoveResizeWindow(display, frame.window, frame.x, frame.y,
+		      frame.width, frame.height);
+  }
+
+  XMoveResizeWindow(display, frame.workspace_label, frame.bevel_w,
+		    frame.bevel_w, frame.workspace_label_w,
+                    frame.label_h);
+  XMoveResizeWindow(display, frame.psbutton, (frame.bevel_w * 2) +
+                    frame.workspace_label_w + 1, frame.bevel_w + 1,
+                    frame.button_w, frame.button_w);
+  XMoveResizeWindow(display ,frame.nsbutton, (frame.bevel_w * 3) +
+                    frame.workspace_label_w + frame.button_w + 2,
+                    frame.bevel_w + 1, frame.button_w, frame.button_w);
+  XMoveResizeWindow(display, frame.window_label, (frame.bevel_w * 4) +
+                    (frame.button_w * 2) + frame.workspace_label_w + 3,
+		    frame.bevel_w, frame.window_label_w, frame.label_h);
+  XMoveResizeWindow(display, frame.pwbutton, (frame.bevel_w * 5) +
+                    (frame.button_w * 2) + frame.workspace_label_w +
+                    frame.window_label_w + 4, frame.bevel_w + 1,
+                    frame.button_w, frame.button_w);
+  XMoveResizeWindow(display, frame.nwbutton, (frame.bevel_w * 6) +
+                    (frame.button_w * 3) + frame.workspace_label_w +
+                    frame.window_label_w + 5, frame.bevel_w + 1,
+                    frame.button_w, frame.button_w);
+  XMoveResizeWindow(display, frame.clock, frame.width - frame.clock_w -
+		    frame.bevel_w, frame.bevel_w, frame.clock_w,
+		    frame.label_h);
+
+  Pixmap tmp = frame.base;
+  BTexture *texture = &(screen->getToolbarStyle()->toolbar);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.base = None;
+    XSetWindowBackground(display, frame.window,
+			 texture->getColor()->getPixel());
+  } else {
+    frame.base =
+      image_ctrl->renderImage(frame.width, frame.height, texture);
+    XSetWindowBackgroundPixmap(display, frame.window, frame.base);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = frame.label;
+  texture = &(screen->getToolbarStyle()->window);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.label = None;
+    XSetWindowBackground(display, frame.window_label,
+			 texture->getColor()->getPixel());
+  } else {
+    frame.label =
+      image_ctrl->renderImage(frame.window_label_w, frame.label_h, texture);
+    XSetWindowBackgroundPixmap(display, frame.window_label, frame.label);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = frame.wlabel;
+  texture = &(screen->getToolbarStyle()->label);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.wlabel = None;
+    XSetWindowBackground(display, frame.workspace_label,
+			 texture->getColor()->getPixel());
+  } else {
+    frame.wlabel =
+      image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, texture);
+    XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = frame.clk;
+  texture = &(screen->getToolbarStyle()->clock);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.clk = None;
+    XSetWindowBackground(display, frame.clock,
+			 texture->getColor()->getPixel());
+  } else {
+    frame.clk =
+      image_ctrl->renderImage(frame.clock_w, frame.label_h, texture);
+    XSetWindowBackgroundPixmap(display, frame.clock, frame.clk);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = frame.button;
+  texture = &(screen->getToolbarStyle()->button);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.button = None;
+
+    frame.button_pixel = texture->getColor()->getPixel();
+    XSetWindowBackground(display, frame.psbutton, frame.button_pixel);
+    XSetWindowBackground(display, frame.nsbutton, frame.button_pixel);
+    XSetWindowBackground(display, frame.pwbutton, frame.button_pixel);
+    XSetWindowBackground(display, frame.nwbutton, frame.button_pixel);
+  } else {
+    frame.button =
+      image_ctrl->renderImage(frame.button_w, frame.button_w, texture);
+
+    XSetWindowBackgroundPixmap(display, frame.psbutton, frame.button);
+    XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button);
+    XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button);
+    XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = frame.pbutton;
+  texture = &(screen->getToolbarStyle()->pressed);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.pbutton = None;
+    frame.pbutton_pixel = texture->getColor()->getPixel();
+  } else {
+    frame.pbutton =
+      image_ctrl->renderImage(frame.button_w, frame.button_w, texture);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  XSetWindowBorder(display, frame.window,
+		   screen->getBorderColor()->getPixel());
+  XSetWindowBorderWidth(display, frame.window, screen->getBorderWidth());
+
+  XClearWindow(display, frame.window);
+  XClearWindow(display, frame.workspace_label);
+  XClearWindow(display, frame.window_label);
+  XClearWindow(display, frame.clock);
+  XClearWindow(display, frame.psbutton);
+  XClearWindow(display, frame.nsbutton);
+  XClearWindow(display, frame.pwbutton);
+  XClearWindow(display, frame.nwbutton);
+
+  redrawWindowLabel();
+  redrawWorkspaceLabel();
+  redrawPrevWorkspaceButton();
+  redrawNextWorkspaceButton();
+  redrawPrevWindowButton();
+  redrawNextWindowButton();
+  checkClock(True);
+
+  toolbarmenu->reconfigure();
+}
+
+
+#ifdef    HAVE_STRFTIME
+void Toolbar::checkClock(Bool redraw) {
+#else // !HAVE_STRFTIME
+void Toolbar::checkClock(Bool redraw, Bool date) {
+#endif // HAVE_STRFTIME
+  time_t tmp = 0;
+  struct tm *tt = 0;
+
+  if ((tmp = time(NULL)) != -1) {
+    if (! (tt = localtime(&tmp))) return;
+    if (tt->tm_min != frame.minute || tt->tm_hour != frame.hour) {
+      frame.hour = tt->tm_hour;
+      frame.minute = tt->tm_min;
+      XClearWindow(display, frame.clock);
+      redraw = True;
+    }
+  }
+
+  if (redraw) {
+#ifdef    HAVE_STRFTIME
+    char t[1024];
+    if (! strftime(t, 1024, screen->getStrftimeFormat(), tt))
+      return;
+#else // !HAVE_STRFTIME
+    char t[9];
+    if (date) {
+      // format the date... with special consideration for y2k ;)
+      if (screen->getDateFormat() == Openbox::B_EuropeanDate)
+        sprintf(t, 18n->getMessage(ToolbarSet, ToolbarNoStrftimeDateFormatEu,
+				   "%02d.%02d.%02d"),
+		tt->tm_mday, tt->tm_mon + 1,
+                (tt->tm_year >= 100) ? tt->tm_year - 100 : tt->tm_year);
+      else
+        sprintf(t, i18n->getMessage(ToolbarSet, ToolbarNoStrftimeDateFormat,
+				    "%02d/%02d/%02d"),
+		tt->tm_mon + 1, tt->tm_mday,
+                (tt->tm_year >= 100) ? tt->tm_year - 100 : tt->tm_year);
+    } else {
+      if (screen->isClock24Hour())
+	sprintf(t, i18n->getMessage(ToolbarSet, ToolbarNoStrftimeTimeFormat24,
+				    "  %02d:%02d "),
+		frame.hour, frame.minute);
+      else
+	sprintf(t, i18n->getMessage(ToolbarSet, ToolbarNoStrftimeTimeFormat12,
+				    "%02d:%02d %sm"),
+		((frame.hour > 12) ? frame.hour - 12 :
+		 ((frame.hour == 0) ? 12 : frame.hour)), frame.minute,
+		((frame.hour >= 12) ?
+		 i18n->getMessage(ToolbarSet,
+				  ToolbarNoStrftimeTimeFormatP, "p") :
+		 i18n->getMessage(ToolbarSet,
+				  ToolbarNoStrftimeTimeFormatA, "a")));
+    }
+#endif // HAVE_STRFTIME
+
+    int dx = (frame.bevel_w * 2), dlen = strlen(t);
+    unsigned int l;
+
+    if (i18n->multibyte()) {
+      XRectangle ink, logical;
+      XmbTextExtents(screen->getToolbarStyle()->fontset,
+		     t, dlen, &ink, &logical);
+      l = logical.width;
+    } else {
+      l = XTextWidth(screen->getToolbarStyle()->font, t, dlen);
+    }
+    
+    l += (frame.bevel_w * 4);
+    
+    if (l > frame.clock_w) {
+      for (; dlen >= 0; dlen--) {
+	if (i18n->multibyte()) {
+	  XRectangle ink, logical;
+	  XmbTextExtents(screen->getToolbarStyle()->fontset,
+			 t, dlen, &ink, &logical);
+	  l = logical.width;
+	} else {
+	  l = XTextWidth(screen->getToolbarStyle()->font, t, dlen);
+	}
+	l+= (frame.bevel_w * 4);
+	
+        if (l < frame.clock_w)
+          break;
+      }
+    }
+    switch (screen->getToolbarStyle()->justify) {
+    case BScreen::RightJustify:
+      dx += frame.clock_w - l;
+      break;
+
+    case BScreen::CenterJustify:
+      dx += (frame.clock_w - l) / 2;
+      break;
+    }
+
+    ToolbarStyle *style = screen->getToolbarStyle();
+    if (i18n->multibyte())
+      XmbDrawString(display, frame.clock, style->fontset, style->c_text_gc,
+		    dx, (1 - style->fontset_extents->max_ink_extent.y),
+		    t, dlen);
+    else
+      XDrawString(display, frame.clock, style->c_text_gc, dx,
+		  (style->font->ascent + 1), t, dlen);
+  }
+}
+
+
+void Toolbar::redrawWindowLabel(Bool redraw) {
+  if (screen->getOpenbox()->getFocusedWindow()) {
+    if (redraw)
+      XClearWindow(display, frame.window_label);
+
+    OpenboxWindow *foc = screen->getOpenbox()->getFocusedWindow();
+    if (foc->getScreen() != screen) return;
+
+    int dx = (frame.bevel_w * 2), dlen = strlen(*foc->getTitle());
+    unsigned int l;
+
+    if (i18n->multibyte()) {
+      XRectangle ink, logical;
+      XmbTextExtents(screen->getToolbarStyle()->fontset, *foc->getTitle(),
+		     dlen, &ink, &logical);
+      l = logical.width;
+    } else {
+      l = XTextWidth(screen->getToolbarStyle()->font, *foc->getTitle(), dlen);
+    }
+    l += (frame.bevel_w * 4);
+
+    if (l > frame.window_label_w) {
+      for (; dlen >= 0; dlen--) {
+	if (i18n->multibyte()) {
+	  XRectangle ink, logical;
+	  XmbTextExtents(screen->getToolbarStyle()->fontset,
+			 *foc->getTitle(), dlen, &ink, &logical);
+	  l = logical.width;
+	} else {
+	  l = XTextWidth(screen->getToolbarStyle()->font,
+			 *foc->getTitle(), dlen);
+	}
+	l += (frame.bevel_w * 4);
+	
+	if (l < frame.window_label_w)
+          break;
+      }
+    }
+    switch (screen->getToolbarStyle()->justify) {
+    case BScreen::RightJustify:
+      dx += frame.window_label_w - l;
+      break;
+
+    case BScreen::CenterJustify:
+      dx += (frame.window_label_w - l) / 2;
+      break;
+    }
+
+    ToolbarStyle *style = screen->getToolbarStyle();
+    if (i18n->multibyte())
+      XmbDrawString(display, frame.window_label, style->fontset,
+		    style->w_text_gc, dx,
+		    (1 - style->fontset_extents->max_ink_extent.y),
+		    *foc->getTitle(), dlen);
+    else
+      XDrawString(display, frame.window_label, style->w_text_gc, dx,
+		  (style->font->ascent + 1), *foc->getTitle(), dlen);
+  } else {
+    XClearWindow(display, frame.window_label);
+  }
+}
+ 
+ 
+void Toolbar::redrawWorkspaceLabel(Bool redraw) {
+  if (screen->getCurrentWorkspace()->getName()) {
+    if (redraw)
+      XClearWindow(display, frame.workspace_label);
+    
+    int dx = (frame.bevel_w * 2), dlen =
+	     strlen(screen->getCurrentWorkspace()->getName());
+    unsigned int l;
+    
+    if (i18n->multibyte()) {
+      XRectangle ink, logical;
+      XmbTextExtents(screen->getToolbarStyle()->fontset,
+		     screen->getCurrentWorkspace()->getName(), dlen,
+		     &ink, &logical);
+      l = logical.width;
+    } else {
+      l = XTextWidth(screen->getToolbarStyle()->font,
+		     screen->getCurrentWorkspace()->getName(), dlen);
+    }
+    l += (frame.bevel_w * 4);
+    
+    if (l > frame.workspace_label_w) {
+      for (; dlen >= 0; dlen--) {
+	if (i18n->multibyte()) {
+	  XRectangle ink, logical;
+	  XmbTextExtents(screen->getToolbarStyle()->fontset,
+			 screen->getCurrentWorkspace()->getName(), dlen,
+			 &ink, &logical);
+	  l = logical.width;
+	} else {
+	  l = XTextWidth(screen->getWindowStyle()->font,
+			 screen->getCurrentWorkspace()->getName(), dlen);
+	}
+	l += (frame.bevel_w * 4);
+	
+        if (l < frame.workspace_label_w)
+          break;
+      }
+    }
+    switch (screen->getToolbarStyle()->justify) {
+    case BScreen::RightJustify:
+      dx += frame.workspace_label_w - l;
+      break;
+
+    case BScreen::CenterJustify:
+      dx += (frame.workspace_label_w - l) / 2;
+      break;
+    }
+
+    ToolbarStyle *style = screen->getToolbarStyle();
+    if (i18n->multibyte())
+      XmbDrawString(display, frame.workspace_label, style->fontset,
+		    style->l_text_gc, dx,
+		    (1 - style->fontset_extents->max_ink_extent.y),
+		    (char *) screen->getCurrentWorkspace()->getName(), dlen);
+    else
+      XDrawString(display, frame.workspace_label, style->l_text_gc, dx,
+		  (style->font->ascent + 1),
+		  (char *) screen->getCurrentWorkspace()->getName(), dlen);
+  }
+}
+
+
+void Toolbar::redrawPrevWorkspaceButton(Bool pressed, Bool redraw) {
+  if (redraw) {
+    if (pressed) {
+      if (frame.pbutton)
+	XSetWindowBackgroundPixmap(display, frame.psbutton, frame.pbutton);
+      else
+	XSetWindowBackground(display, frame.psbutton, frame.pbutton_pixel);
+    } else {
+      if (frame.button)
+        XSetWindowBackgroundPixmap(display, frame.psbutton, frame.button);
+      else
+	XSetWindowBackground(display, frame.psbutton, frame.button_pixel);
+    }
+    XClearWindow(display, frame.psbutton);
+  }
+
+  int hh = frame.button_w / 2, hw = frame.button_w / 2;
+
+  XPoint pts[3];
+  pts[0].x = hw - 2; pts[0].y = hh;
+  pts[1].x = 4; pts[1].y = 2;
+  pts[2].x = 0; pts[2].y = -4;
+
+  XFillPolygon(display, frame.psbutton, screen->getToolbarStyle()->b_pic_gc,
+               pts, 3, Convex, CoordModePrevious);
+}
+
+
+void Toolbar::redrawNextWorkspaceButton(Bool pressed, Bool redraw) {
+  if (redraw) {
+    if (pressed) {
+      if (frame.pbutton)
+	XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.pbutton);
+      else
+	XSetWindowBackground(display, frame.nsbutton, frame.pbutton_pixel);
+    } else {
+      if (frame.button)
+        XSetWindowBackgroundPixmap(display, frame.nsbutton, frame.button);
+      else
+	XSetWindowBackground(display, frame.nsbutton, frame.button_pixel);
+    }
+    XClearWindow(display, frame.nsbutton);
+  }
+
+  int hh = frame.button_w / 2, hw = frame.button_w / 2;
+
+  XPoint pts[3];
+  pts[0].x = hw - 2; pts[0].y = hh - 2;
+  pts[1].x = 4; pts[1].y =  2;
+  pts[2].x = -4; pts[2].y = 2;
+
+  XFillPolygon(display, frame.nsbutton, screen->getToolbarStyle()->b_pic_gc,
+               pts, 3, Convex, CoordModePrevious);
+}
+
+
+void Toolbar::redrawPrevWindowButton(Bool pressed, Bool redraw) {
+  if (redraw) {
+    if (pressed) {
+      if (frame.pbutton)
+	XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.pbutton);
+      else
+	XSetWindowBackground(display, frame.pwbutton, frame.pbutton_pixel);
+    } else {
+      if (frame.button)
+        XSetWindowBackgroundPixmap(display, frame.pwbutton, frame.button);
+      else
+	XSetWindowBackground(display, frame.pwbutton, frame.button_pixel);
+    }
+    XClearWindow(display, frame.pwbutton);
+  }
+
+  int hh = frame.button_w / 2, hw = frame.button_w / 2;
+
+  XPoint pts[3];
+  pts[0].x = hw - 2; pts[0].y = hh;
+  pts[1].x = 4; pts[1].y = 2;
+  pts[2].x = 0; pts[2].y = -4;
+
+  XFillPolygon(display, frame.pwbutton, screen->getToolbarStyle()->b_pic_gc,
+               pts, 3, Convex, CoordModePrevious);
+}
+
+
+void Toolbar::redrawNextWindowButton(Bool pressed, Bool redraw) {
+  if (redraw) {
+    if (pressed) {
+      if (frame.pbutton)
+	XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.pbutton);
+      else
+	XSetWindowBackground(display, frame.nwbutton, frame.pbutton_pixel);
+    } else {
+      if (frame.button)
+        XSetWindowBackgroundPixmap(display, frame.nwbutton, frame.button);
+      else
+	XSetWindowBackground(display, frame.nwbutton, frame.button_pixel);
+    }
+    XClearWindow(display, frame.nwbutton);
+  }
+
+  int hh = frame.button_w / 2, hw = frame.button_w / 2;
+
+  XPoint pts[3];
+  pts[0].x = hw - 2; pts[0].y = hh - 2;
+  pts[1].x = 4; pts[1].y =  2;
+  pts[2].x = -4; pts[2].y = 2;
+
+  XFillPolygon(display, frame.nwbutton, screen->getToolbarStyle()->b_pic_gc,
+               pts, 3, Convex, CoordModePrevious);
+}
+
+
+void Toolbar::edit(void) {
+  Window window;
+  int foo;
+
+  editing = True;
+  if (XGetInputFocus(display, &window, &foo) &&
+      window == frame.workspace_label)
+    return;
+
+  XSetInputFocus(display, frame.workspace_label,
+                 ((screen->isSloppyFocus()) ? RevertToPointerRoot :
+                  RevertToParent),
+                 CurrentTime);
+  XClearWindow(display, frame.workspace_label);
+
+  openbox->setNoFocus(True);
+  if (openbox->getFocusedWindow())
+    openbox->getFocusedWindow()->setFocusFlag(False);
+
+  XDrawRectangle(display, frame.workspace_label,
+                 screen->getWindowStyle()->l_text_focus_gc,
+                 frame.workspace_label_w / 2, 0, 1,
+                 frame.label_h - 1);
+  
+  // change the background of the window to that of an active window label
+  Pixmap tmp = frame.wlabel;
+  BTexture *texture = &(screen->getWindowStyle()->l_focus);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.wlabel = None;
+    XSetWindowBackground(display, frame.workspace_label,
+			 texture->getColor()->getPixel());
+  } else {
+    frame.wlabel =
+      image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, texture);
+    XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+}
+
+
+void Toolbar::buttonPressEvent(XButtonEvent *be) {
+  if (be->button == 1) {
+    if (be->window == frame.psbutton)
+      redrawPrevWorkspaceButton(True, True);
+    else if (be->window == frame.nsbutton)
+      redrawNextWorkspaceButton(True, True);
+    else if (be->window == frame.pwbutton)
+      redrawPrevWindowButton(True, True);
+    else if (be->window == frame.nwbutton)
+      redrawNextWindowButton(True, True);
+#ifndef   HAVE_STRFTIME
+    else if (be->window == frame.clock) {
+      XClearWindow(display, frame.clock);
+      checkClock(True, True);
+    }
+#endif // HAVE_STRFTIME
+    else if (! on_top) {
+      Window w[1] = { frame.window };
+      screen->raiseWindows(w, 1);
+    }
+  } else if (be->button == 2 && (! on_top)) {
+    XLowerWindow(display, frame.window);
+  } else if (be->button == 3) {
+    if (! toolbarmenu->isVisible()) {
+      int x, y;
+
+      x = be->x_root - (toolbarmenu->getWidth() / 2);
+      y = be->y_root - (toolbarmenu->getHeight() / 2);
+
+      if (x < 0)
+        x = 0;
+      else if (x + toolbarmenu->getWidth() > screen->getWidth())
+        x = screen->getWidth() - toolbarmenu->getWidth();
+
+      if (y < 0)
+        y = 0;
+      else if (y + toolbarmenu->getHeight() > screen->getHeight())
+        y = screen->getHeight() - toolbarmenu->getHeight();
+
+      toolbarmenu->move(x, y);
+      toolbarmenu->show();
+    } else
+      toolbarmenu->hide();
+  }
+}
+
+
+
+void Toolbar::buttonReleaseEvent(XButtonEvent *re) {
+  if (re->button == 1) {
+    if (re->window == frame.psbutton) {
+      redrawPrevWorkspaceButton(False, True);
+
+      if (re->x >= 0 && re->x < (signed) frame.button_w &&
+          re->y >= 0 && re->y < (signed) frame.button_w)
+       if (screen->getCurrentWorkspace()->getWorkspaceID() > 0)
+          screen->changeWorkspaceID(screen->getCurrentWorkspace()->
+                                    getWorkspaceID() - 1);
+        else
+          screen->changeWorkspaceID(screen->getCount() - 1);
+    } else if (re->window == frame.nsbutton) {
+      redrawNextWorkspaceButton(False, True);
+
+      if (re->x >= 0 && re->x < (signed) frame.button_w &&
+          re->y >= 0 && re->y < (signed) frame.button_w)
+        if (screen->getCurrentWorkspace()->getWorkspaceID() <
+            screen->getCount() - 1)
+          screen->changeWorkspaceID(screen->getCurrentWorkspace()->
+                                    getWorkspaceID() + 1);
+        else
+          screen->changeWorkspaceID(0);
+    } else if (re->window == frame.pwbutton) {
+      redrawPrevWindowButton(False, True);
+
+      if (re->x >= 0 && re->x < (signed) frame.button_w &&
+          re->y >= 0 && re->y < (signed) frame.button_w)
+        screen->prevFocus();
+    } else if (re->window == frame.nwbutton) {
+      redrawNextWindowButton(False, True);
+
+      if (re->x >= 0 && re->x < (signed) frame.button_w &&
+          re->y >= 0 && re->y < (signed) frame.button_w)
+        screen->nextFocus();
+    } else if (re->window == frame.window_label)
+      screen->raiseFocus();
+#ifndef   HAVE_STRFTIME
+    else if (re->window == frame.clock) {
+      XClearWindow(display, frame.clock);
+      checkClock(True);
+    }
+#endif // HAVE_STRFTIME
+  }
+}
+
+
+void Toolbar::enterNotifyEvent(XCrossingEvent *) {
+  if (! do_auto_hide)
+    return;
+
+  if (hidden) {
+    if (! hide_timer->isTiming()) hide_timer->start();
+  } else {
+    if (hide_timer->isTiming()) hide_timer->stop();
+  }
+}
+
+void Toolbar::leaveNotifyEvent(XCrossingEvent *) {
+  if (! do_auto_hide)
+    return;
+
+  if (hidden) {
+    if (hide_timer->isTiming()) hide_timer->stop();
+  } else if (! toolbarmenu->isVisible()) {
+    if (! hide_timer->isTiming()) hide_timer->start();
+  }
+}
+
+
+void Toolbar::exposeEvent(XExposeEvent *ee) {
+  if (ee->window == frame.clock) checkClock(True);
+  else if (ee->window == frame.workspace_label && (! editing))
+    redrawWorkspaceLabel();
+  else if (ee->window == frame.window_label) redrawWindowLabel();
+  else if (ee->window == frame.psbutton) redrawPrevWorkspaceButton();
+  else if (ee->window == frame.nsbutton) redrawNextWorkspaceButton();
+  else if (ee->window == frame.pwbutton) redrawPrevWindowButton();
+  else if (ee->window == frame.nwbutton) redrawNextWindowButton();
+}
+
+
+void Toolbar::keyPressEvent(XKeyEvent *ke) {
+  if (ke->window == frame.workspace_label && editing) {
+    openbox->grab();
+
+    if (! new_workspace_name) {
+      new_workspace_name = new char[128];
+      new_name_pos = 0;
+
+      if (! new_workspace_name) return;
+    }
+
+    KeySym ks;
+    char keychar[1];
+    XLookupString(ke, keychar, 1, &ks, 0);
+
+    // either we are told to end with a return or we hit the end of the buffer
+    if (ks == XK_Return || new_name_pos == 127) {
+      *(new_workspace_name + new_name_pos) = 0;
+
+      editing = False;
+
+      openbox->setNoFocus(False);
+      if (openbox->getFocusedWindow()) {
+        openbox->getFocusedWindow()->setInputFocus();
+        openbox->getFocusedWindow()->setFocusFlag(True);
+      } else {
+        XSetInputFocus(display, PointerRoot, None, CurrentTime);
+      }
+      // check to make sure that new_name[0] != 0... otherwise we have a null
+      // workspace name which causes serious problems, especially for the
+      // Openbox::LoadRC() method.
+      if (*new_workspace_name) {
+ 	screen->getCurrentWorkspace()->setName(new_workspace_name);
+	screen->getCurrentWorkspace()->getMenu()->hide();
+	screen->getWorkspacemenu()->
+	  remove(screen->getCurrentWorkspace()->getWorkspaceID() + 2);
+	screen->getWorkspacemenu()->
+	  insert(screen->getCurrentWorkspace()->getName(),
+		 screen->getCurrentWorkspace()->getMenu(),
+		 screen->getCurrentWorkspace()->getWorkspaceID() + 2);
+	screen->getWorkspacemenu()->update();
+      }
+
+      delete [] new_workspace_name;
+      new_workspace_name = (char *) 0;
+      new_name_pos = 0;
+
+      // reset the background to that of the workspace label (its normal
+      // setting)
+      Pixmap tmp = frame.wlabel;
+      BTexture *texture = &(screen->getToolbarStyle()->label);
+      if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+        frame.wlabel = None;
+        XSetWindowBackground(display, frame.workspace_label,
+                            texture->getColor()->getPixel());
+      } else {
+        frame.wlabel =
+          image_ctrl->renderImage(frame.workspace_label_w, frame.label_h, texture);
+        XSetWindowBackgroundPixmap(display, frame.workspace_label, frame.wlabel);
+      }
+      if (tmp) image_ctrl->removeImage(tmp);
+  
+      reconfigure();
+    } else if (! (ks == XK_Shift_L || ks == XK_Shift_R ||
+		  ks == XK_Control_L || ks == XK_Control_R ||
+		  ks == XK_Caps_Lock || ks == XK_Shift_Lock ||
+		  ks == XK_Meta_L || ks == XK_Meta_R ||
+		  ks == XK_Alt_L || ks == XK_Alt_R ||
+		  ks == XK_Super_L || ks == XK_Super_R ||
+		  ks == XK_Hyper_L || ks == XK_Hyper_R)) {
+      if (ks == XK_BackSpace) {
+	if (new_name_pos > 0) {
+	  --new_name_pos;
+	  *(new_workspace_name + new_name_pos) = '\0';
+	} else {
+	  *new_workspace_name = '\0';
+	}
+      } else {
+	*(new_workspace_name + new_name_pos) = *keychar;
+	++new_name_pos;
+	*(new_workspace_name + new_name_pos) = '\0';
+      }
+
+      XClearWindow(display, frame.workspace_label);
+      int l = strlen(new_workspace_name), tw, x;
+
+      if (i18n->multibyte()) {
+	XRectangle ink, logical;
+	XmbTextExtents(screen->getToolbarStyle()->fontset,
+		       new_workspace_name, l, &ink, &logical);
+	tw = logical.width;
+      } else {
+	tw = XTextWidth(screen->getToolbarStyle()->font,
+			new_workspace_name, l);
+      }
+      x = (frame.workspace_label_w - tw) / 2;
+
+      if (x < (signed) frame.bevel_w) x = frame.bevel_w;
+
+      WindowStyle *style = screen->getWindowStyle();
+      if (i18n->multibyte())
+	XmbDrawString(display, frame.workspace_label, style->fontset,
+		      style->l_text_focus_gc, x,
+		      (1 - style->fontset_extents->max_ink_extent.y),
+		      new_workspace_name, l);
+      else
+	XDrawString(display, frame.workspace_label, style->l_text_focus_gc, x,
+		    (style->font->ascent + 1),
+		    new_workspace_name, l);
+      
+      XDrawRectangle(display, frame.workspace_label,
+		     screen->getWindowStyle()->l_text_focus_gc, x + tw, 0, 1,
+		     frame.label_h - 1);
+    }
+    
+    openbox->ungrab();
+  }
+}
+
+
+void Toolbar::timeout(void) {
+  checkClock(True);
+
+  timeval now;
+  gettimeofday(&now, 0);
+  clock_timer->setTimeout((60 - (now.tv_sec % 60)) * 1000);
+}
+
+
+void Toolbar::HideHandler::timeout(void) {
+  toolbar->hidden = ! toolbar->hidden;
+  if (toolbar->hidden)
+    XMoveWindow(toolbar->display, toolbar->frame.window,
+		toolbar->frame.x_hidden, toolbar->frame.y_hidden);
+  else
+    XMoveWindow(toolbar->display, toolbar->frame.window,
+		toolbar->frame.x, toolbar->frame.y);
+}
+
+
+Toolbarmenu::Toolbarmenu(Toolbar *tb) : Basemenu(tb->screen) {
+  toolbar = tb;
+
+  setLabel(i18n->getMessage(ToolbarSet, ToolbarToolbarTitle, "Toolbar"));
+  setInternalMenu();
+
+  placementmenu = new Placementmenu(this);
+
+  insert(i18n->getMessage(CommonSet, CommonPlacementTitle, "Placement"),
+	 placementmenu);
+  insert(i18n->getMessage(CommonSet, CommonAlwaysOnTop, "Always on top"), 1);
+  insert(i18n->getMessage(CommonSet, CommonAutoHide, "Auto hide"), 2);
+  insert(i18n->getMessage(ToolbarSet, ToolbarEditWkspcName,
+			  "Edit current workspace name"), 3);
+
+  update();
+
+  if (toolbar->isOnTop()) setItemSelected(1, True);
+  if (toolbar->doAutoHide()) setItemSelected(2, True);
+}
+
+
+Toolbarmenu::~Toolbarmenu(void) {
+  delete placementmenu;
+}
+
+
+void Toolbarmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+  if (! item) return;
+
+  switch (item->function()) {
+  case 1: { // always on top
+    Bool change = ((toolbar->isOnTop()) ? False : True);
+    toolbar->on_top = change;
+    setItemSelected(1, change);
+
+    if (toolbar->isOnTop()) toolbar->screen->raiseWindows((Window *) 0, 0);
+    break;
+  }
+
+  case 2: { // auto hide
+    Bool change = ((toolbar->doAutoHide()) ?  False : True);
+    toolbar->do_auto_hide = change;
+    setItemSelected(2, change);
+
+#ifdef    SLIT
+    toolbar->screen->getSlit()->reposition();
+#endif // SLIT
+    break;
+  }
+
+  case 3: { // edit current workspace name
+    toolbar->edit();
+    hide();
+
+    break;
+  }
+  } // switch
+}
+
+
+void Toolbarmenu::internal_hide(void) {
+  Basemenu::internal_hide();
+  if (toolbar->doAutoHide() && ! toolbar->isEditing())
+    toolbar->hide_handler.timeout();
+}
+
+
+void Toolbarmenu::reconfigure(void) {
+  placementmenu->reconfigure();
+
+  Basemenu::reconfigure();
+}
+
+
+Toolbarmenu::Placementmenu::Placementmenu(Toolbarmenu *tm)
+  : Basemenu(tm->toolbar->screen) {
+  toolbarmenu = tm;
+
+  setLabel(i18n->getMessage(ToolbarSet, ToolbarToolbarPlacement,
+			    "Toolbar Placement"));
+  setInternalMenu();
+  setMinimumSublevels(3);
+
+  insert(i18n->getMessage(CommonSet, CommonPlacementTopLeft,
+			  "Top Left"), Toolbar::TopLeft);
+  insert(i18n->getMessage(CommonSet, CommonPlacementBottomLeft,
+			  "Bottom Left"), Toolbar::BottomLeft);
+  insert(i18n->getMessage(CommonSet, CommonPlacementTopCenter,
+			  "Top Center"), Toolbar::TopCenter);
+  insert(i18n->getMessage(CommonSet, CommonPlacementBottomCenter,
+			  "Bottom Center"), Toolbar::BottomCenter);
+  insert(i18n->getMessage(CommonSet, CommonPlacementTopRight,
+			  "Top Right"), Toolbar::TopRight);
+  insert(i18n->getMessage(CommonSet, CommonPlacementBottomRight,
+			  "Bottom Right"), Toolbar::BottomRight);
+  update();
+}
+
+
+void Toolbarmenu::Placementmenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  BasemenuItem *item = find(index);
+  if (! item) return;
+
+  toolbarmenu->toolbar->screen->saveToolbarPlacement(item->function());
+  hide();
+  toolbarmenu->toolbar->reconfigure();
+
+#ifdef    SLIT
+  // reposition the slit as well to make sure it doesn't intersect the
+  // toolbar
+  toolbarmenu->toolbar->screen->getSlit()->reposition();
+#endif // SLIT
+}
diff --git a/src/Toolbar.h b/src/Toolbar.h
new file mode 100644
index 00000000..17c46984
--- /dev/null
+++ b/src/Toolbar.h
@@ -0,0 +1,156 @@
+// Toolbar.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Toolbar_hh
+#define   __Toolbar_hh
+
+#include 
+
+#include "Basemenu.h"
+#include "Timer.h"
+
+// forward declaration
+class Toolbar;
+
+class Toolbarmenu : public Basemenu {
+private:
+  class Placementmenu : public Basemenu {
+  private:
+    Toolbarmenu *toolbarmenu;
+
+  protected:
+    virtual void itemSelected(int, int);
+
+  public:
+    Placementmenu(Toolbarmenu *);
+  };
+
+  Toolbar *toolbar;
+  Placementmenu *placementmenu;
+
+  friend class Placementmenu;
+  friend class Toolbar;
+
+
+protected:
+  virtual void itemSelected(int, int);
+  virtual void internal_hide(void);
+
+public:
+  Toolbarmenu(Toolbar *);
+  ~Toolbarmenu(void);
+
+  inline Basemenu *getPlacementmenu(void) { return placementmenu; }
+
+  void reconfigure(void);
+};
+
+
+class Toolbar : public TimeoutHandler {
+private:
+  Bool on_top, editing, hidden, do_auto_hide;
+  Display *display;
+
+  struct frame {
+    unsigned long button_pixel, pbutton_pixel;
+    Pixmap base, label, wlabel, clk, button, pbutton;
+    Window window, workspace_label, window_label, clock, psbutton, nsbutton,
+      pwbutton, nwbutton;
+
+    int x, y, x_hidden, y_hidden, hour, minute, grab_x, grab_y;
+    unsigned int width, height, window_label_w, workspace_label_w, clock_w,
+      button_w, bevel_w, label_h;
+  } frame;
+
+  class HideHandler : public TimeoutHandler {
+  public:
+    Toolbar *toolbar;
+
+    virtual void timeout(void);
+  } hide_handler;
+
+  Openbox *openbox;
+  BImageControl *image_ctrl;
+  BScreen *screen;
+  BTimer *clock_timer, *hide_timer;
+  Toolbarmenu *toolbarmenu;
+
+  char *new_workspace_name;
+  size_t new_name_pos;
+
+  friend class HideHandler;
+  friend class Toolbarmenu;
+  friend class Toolbarmenu::Placementmenu;
+
+
+public:
+  Toolbar(BScreen *);
+  virtual ~Toolbar(void);
+
+  inline Toolbarmenu *getMenu(void) { return toolbarmenu; }
+
+  inline const Bool &isEditing(void) const { return editing; }
+  inline const Bool &isOnTop(void) const { return on_top; }
+  inline const Bool &isHidden(void) const { return hidden; }
+  inline const Bool &doAutoHide(void) const { return do_auto_hide; }
+
+  inline const Window &getWindowID(void) const { return frame.window; }
+
+  inline const unsigned int &getWidth(void) const { return frame.width; }
+  inline const unsigned int &getHeight(void) const { return frame.height; }
+  inline const unsigned int &getExposedHeight(void) const
+  { return ((do_auto_hide) ? frame.bevel_w : frame.height); }
+  inline const int &getX(void) const
+  { return ((hidden) ? frame.x_hidden : frame.x); }
+  inline const int &getY(void) const
+  { return ((hidden) ? frame.y_hidden : frame.y); }
+
+  void buttonPressEvent(XButtonEvent *);
+  void buttonReleaseEvent(XButtonEvent *);
+  void enterNotifyEvent(XCrossingEvent *);
+  void leaveNotifyEvent(XCrossingEvent *);
+  void exposeEvent(XExposeEvent *);
+  void keyPressEvent(XKeyEvent *);
+
+  void redrawWindowLabel(Bool = False);
+  void redrawWorkspaceLabel(Bool = False);
+  void redrawPrevWorkspaceButton(Bool = False, Bool = False);
+  void redrawNextWorkspaceButton(Bool = False, Bool = False);
+  void redrawPrevWindowButton(Bool = False, Bool = False);
+  void redrawNextWindowButton(Bool = False, Bool = False);
+  void edit(void);
+  void reconfigure(void);
+
+#ifdef    HAVE_STRFTIME
+  void checkClock(Bool = False);
+#else //  HAVE_STRFTIME
+  void checkClock(Bool = False, Bool = False);
+#endif // HAVE_STRFTIME
+
+  virtual void timeout(void);
+
+  enum { TopLeft = 1, BottomLeft, TopCenter,
+         BottomCenter, TopRight, BottomRight };
+};
+
+
+#endif // __Toolbar_hh
diff --git a/src/Window.cc b/src/Window.cc
new file mode 100644
index 00000000..4133ac00
--- /dev/null
+++ b/src/Window.cc
@@ -0,0 +1,3244 @@
+// Window.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include 
+#include 
+
+#ifdef    STDC_HEADERS
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    DEBUG
+#  ifdef    HAVE_STDIO_H
+#    include 
+#  endif // HAVE_STDIO_H
+#endif // DEBUG
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Iconmenu.h"
+#include "Screen.h"
+#include "Toolbar.h"
+#include "Window.h"
+#include "Windowmenu.h"
+#include "Workspace.h"
+#ifdef    SLIT
+#  include "Slit.h"
+#endif // SLIT
+
+/*
+ * Initializes the class with default values/the window's set initial values.
+ */
+OpenboxWindow::OpenboxWindow(Openbox *b, Window w, BScreen *s) {
+#ifdef    DEBUG
+  fprintf(stderr, i18n->getMessage(WindowSet, WindowCreating,
+		     "OpenboxWindow::OpenboxWindow(): creating 0x%lx\n"),
+	  w);
+#endif // DEBUG
+
+  client.window = w;
+  openbox = b;
+  display = openbox->getXDisplay();
+
+  openbox->grab();
+  if (! validateClient()) return;
+
+  // fetch client size and placement
+  XWindowAttributes wattrib;
+  if ((! XGetWindowAttributes(display, client.window, &wattrib)) ||
+      (! wattrib.screen) || wattrib.override_redirect) {
+#ifdef    DEBUG
+    fprintf(stderr,
+	    i18n->getMessage(WindowSet, WindowXGetWindowAttributesFail,
+	       "OpenboxWindow::OpenboxWindow(): XGetWindowAttributes "
+	       "failed\n"));
+#endif // DEBUG
+
+    b->ungrab();
+    return;
+  }
+
+  if (s) {
+    screen = s;
+  } else {
+    screen = openbox->searchScreen(RootWindowOfScreen(wattrib.screen));
+    if (! screen) {
+#ifdef    DEBUG
+      fprintf(stderr, i18n->getMessage(WindowSet, WindowCannotFindScreen,
+		      "OpenboxWindow::OpenboxWindow(): can't find screen\n"
+		      "\tfor root window 0x%lx\n"),
+	              RootWindowOfScreen(wattrib.screen));
+#endif // DEBUG
+
+      b->ungrab();
+      return;
+    }
+  }
+
+  flags.moving = flags.resizing = flags.shaded = flags.visible =
+    flags.iconic = flags.transient = flags.focused =
+    flags.stuck = flags.modal =  flags.send_focus_message =
+    flags.shaped = flags.managed = False;
+  flags.maximized = 0;
+
+  openbox_attrib.workspace = workspace_number = window_number = -1;
+
+  openbox_attrib.flags = openbox_attrib.attrib = openbox_attrib.stack
+    = openbox_attrib.decoration = 0l;
+  openbox_attrib.premax_x = openbox_attrib.premax_y = 0;
+  openbox_attrib.premax_w = openbox_attrib.premax_h = 0;
+
+  frame.window = frame.plate = frame.title = frame.handle = None;
+  frame.close_button = frame.iconify_button = frame.maximize_button = None;
+  frame.right_grip = frame.left_grip = None;
+
+  frame.utitle = frame.ftitle = frame.uhandle = frame.fhandle = None;
+  frame.ulabel = frame.flabel = frame.ubutton = frame.fbutton = None;
+  frame.pbutton = frame.ugrip = frame.fgrip = None;
+
+  decorations.titlebar = decorations.border = decorations.handle = True;
+  decorations.iconify = decorations.maximize = decorations.menu = True;
+  functions.resize = functions.move = functions.iconify =
+    functions.maximize = True;
+  functions.close = decorations.close = False;
+
+  client.wm_hint_flags = client.normal_hint_flags = 0;
+  client.transient_for = client.transient = 0;
+  client.title = 0;
+  client.title_len = 0;
+  client.icon_title = 0;
+  client.mwm_hint = (MwmHints *) 0;
+  client.openbox_hint = (OpenboxHints *) 0;
+
+  // get the initial size and location of client window (relative to the
+  // _root window_). This position is the reference point used with the
+  // window's gravity to find the window's initial position.
+  client.x = wattrib.x;
+  client.y = wattrib.y;
+  client.width = wattrib.width;
+  client.height = wattrib.height;
+  client.old_bw = wattrib.border_width;
+
+  windowmenu = 0;
+  lastButtonPressTime = 0;
+  image_ctrl = screen->getImageControl();
+
+  timer = new BTimer(openbox, this);
+  timer->setTimeout(openbox->getAutoRaiseDelay());
+  timer->fireOnce(True);
+
+  getOpenboxHints();
+  if (! client.openbox_hint)
+    getMWMHints();
+
+  // get size, aspect, minimum/maximum size and other hints set by the
+  // client
+  getWMProtocols();
+  getWMHints();
+  getWMNormalHints();
+
+#ifdef    SLIT
+  if (client.initial_state == WithdrawnState) {
+    screen->getSlit()->addClient(client.window);
+    delete this;
+
+    b->ungrab();
+    return;
+  }
+#endif // SLIT
+
+  flags.managed = True;
+  openbox->saveWindowSearch(client.window, this);
+
+  // determine if this is a transient window
+  Window win;
+  if (XGetTransientForHint(display, client.window, &win)) {
+    if (win && (win != client.window)) {
+      OpenboxWindow *tr;
+      if ((tr = openbox->searchWindow(win))) {
+	while (tr->client.transient) tr = tr->client.transient;
+	client.transient_for = tr;
+	tr->client.transient = this;
+	flags.stuck = client.transient_for->flags.stuck;
+	flags.transient = True;
+      } else if (win == client.window_group) {
+	if ((tr = openbox->searchGroup(win, this))) {
+	  while (tr->client.transient) tr = tr->client.transient;
+	  client.transient_for = tr;
+	  tr->client.transient = this;
+	  flags.stuck = client.transient_for->flags.stuck;
+	  flags.transient = True;
+	}
+      }
+    }
+
+    if (win == screen->getRootWindow()) flags.modal = True;
+  }
+
+  // adjust the window decorations based on transience and window sizes
+  if (flags.transient)
+    decorations.maximize = decorations.handle = functions.maximize = False;
+
+  if ((client.normal_hint_flags & PMinSize) &&
+      (client.normal_hint_flags & PMaxSize) &&
+       client.max_width <= client.min_width &&
+      client.max_height <= client.min_height) {
+    decorations.maximize = decorations.handle =
+      functions.resize = functions.maximize = False;
+  }
+  upsize();
+
+  Bool place_window = True;
+  if (openbox->isStartup() || flags.transient ||
+      client.normal_hint_flags & (PPosition|USPosition)) {
+    setGravityOffsets();
+
+    if ((openbox->isStartup()) ||
+	(frame.x >= 0 &&
+	 (signed) (frame.y + frame.y_border) >= 0 &&
+	 frame.x <= (signed) screen->getWidth() &&
+	 frame.y <= (signed) screen->getHeight()))
+      place_window = False;
+  }
+
+  frame.window = createToplevelWindow(frame.x, frame.y, frame.width,
+				      frame.height,
+				      frame.border_w);
+  openbox->saveWindowSearch(frame.window, this);
+
+  frame.plate = createChildWindow(frame.window);
+  openbox->saveWindowSearch(frame.plate, this);
+
+  if (decorations.titlebar) {
+    frame.title = createChildWindow(frame.window);
+    frame.label = createChildWindow(frame.title);
+    openbox->saveWindowSearch(frame.title, this);
+    openbox->saveWindowSearch(frame.label, this);
+  }
+
+  if (decorations.handle) {
+    frame.handle = createChildWindow(frame.window);
+    openbox->saveWindowSearch(frame.handle, this);
+
+    frame.left_grip =
+      createChildWindow(frame.handle, openbox->getLowerLeftAngleCursor());
+    openbox->saveWindowSearch(frame.left_grip, this);
+
+    frame.right_grip =
+      createChildWindow(frame.handle, openbox->getLowerRightAngleCursor());
+    openbox->saveWindowSearch(frame.right_grip, this);
+  }
+
+  associateClientWindow();
+
+  if (! screen->isSloppyFocus())
+    openbox->grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
+        GrabModeSync, GrabModeSync, None, None);
+
+  openbox->grabButton(Button1, Mod1Mask, frame.window, True,
+      ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
+      GrabModeAsync, None, openbox->getMoveCursor());
+  openbox->grabButton(Button2, Mod1Mask, frame.window, True,
+      ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None);
+  openbox->grabButton(Button3, Mod1Mask, frame.window, True,
+      ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
+      GrabModeAsync, None, None);
+
+  positionWindows();
+  XRaiseWindow(display, frame.plate);
+  XMapSubwindows(display, frame.plate);
+  if (decorations.titlebar) XMapSubwindows(display, frame.title);
+  XMapSubwindows(display, frame.window);
+
+  if (decorations.menu)
+    windowmenu = new Windowmenu(this);
+
+  decorate();
+
+  if (workspace_number < 0 || workspace_number >= screen->getCount())
+    screen->getCurrentWorkspace()->addWindow(this, place_window);
+  else
+    screen->getWorkspace(workspace_number)->addWindow(this, place_window);
+
+  configure(frame.x, frame.y, frame.width, frame.height);
+
+  if (flags.shaded) {
+    flags.shaded = False;
+    shade();
+  }
+
+  if (flags.maximized && functions.maximize) {
+    unsigned int button = flags.maximized;
+    flags.maximized = 0;
+    maximize(button);
+  }
+
+  setFocusFlag(False);
+
+  openbox->ungrab();
+}
+
+
+OpenboxWindow::~OpenboxWindow(void) {
+  if (flags.moving || flags.resizing) {
+    screen->hideGeometry();
+    XUngrabPointer(display, CurrentTime);
+  }
+
+  if (workspace_number != -1 && window_number != -1)
+    screen->getWorkspace(workspace_number)->removeWindow(this);
+  else if (flags.iconic)
+    screen->removeIcon(this);
+
+  if (timer) {
+    if (timer->isTiming()) timer->stop();
+    delete timer;
+  }
+
+  if (windowmenu) delete windowmenu;
+
+  if (client.title)
+    delete [] client.title;
+
+  if (client.icon_title)
+    delete [] client.icon_title;
+
+  if (client.mwm_hint)
+    XFree(client.mwm_hint);
+
+  if (client.openbox_hint)
+    XFree(client.openbox_hint);
+
+  if (client.window_group)
+    openbox->removeGroupSearch(client.window_group);
+
+  if (flags.transient && client.transient_for)
+    client.transient_for->client.transient = client.transient;
+  if (client.transient)
+    client.transient->client.transient_for = client.transient_for;
+
+  if (frame.close_button) {
+    openbox->removeWindowSearch(frame.close_button);
+    XDestroyWindow(display, frame.close_button);
+  }
+
+  if (frame.iconify_button) {
+    openbox->removeWindowSearch(frame.iconify_button);
+    XDestroyWindow(display, frame.iconify_button);
+  }
+
+  if (frame.maximize_button) {
+    openbox->removeWindowSearch(frame.maximize_button);
+    XDestroyWindow(display, frame.maximize_button);
+  }
+
+  if (frame.title) {
+    if (frame.ftitle)
+      image_ctrl->removeImage(frame.ftitle);
+
+    if (frame.utitle)
+      image_ctrl->removeImage(frame.utitle);
+
+    if (frame.flabel)
+      image_ctrl->removeImage(frame.flabel);
+
+    if( frame.ulabel)
+      image_ctrl->removeImage(frame.ulabel);
+
+    openbox->removeWindowSearch(frame.label);
+    openbox->removeWindowSearch(frame.title);
+    XDestroyWindow(display, frame.label);
+    XDestroyWindow(display, frame.title);
+  }
+
+  if (frame.handle) {
+    if (frame.fhandle)
+      image_ctrl->removeImage(frame.fhandle);
+
+    if (frame.uhandle)
+      image_ctrl->removeImage(frame.uhandle);
+
+    if (frame.fgrip)
+      image_ctrl->removeImage(frame.fgrip);
+
+    if (frame.ugrip)
+      image_ctrl->removeImage(frame.ugrip);
+
+    openbox->removeWindowSearch(frame.handle);
+    openbox->removeWindowSearch(frame.right_grip);
+    openbox->removeWindowSearch(frame.left_grip);
+    XDestroyWindow(display, frame.right_grip);
+    XDestroyWindow(display, frame.left_grip);
+    XDestroyWindow(display, frame.handle);
+  }
+
+  if (frame.fbutton)
+    image_ctrl->removeImage(frame.fbutton);
+
+  if (frame.ubutton)
+    image_ctrl->removeImage(frame.ubutton);
+
+  if (frame.pbutton)
+    image_ctrl->removeImage(frame.pbutton);
+
+  if (frame.plate) {
+    openbox->removeWindowSearch(frame.plate);
+    XDestroyWindow(display, frame.plate);
+  }
+
+  if (frame.window) {
+    openbox->removeWindowSearch(frame.window);
+    XDestroyWindow(display, frame.window);
+  }
+
+  if (flags.managed) {
+    openbox->removeWindowSearch(client.window);
+    screen->removeNetizen(client.window);
+  }
+}
+
+
+/*
+ * Creates a new top level window, with a given location, size, and border
+ * width.
+ * Returns: the newly created window
+ */
+Window OpenboxWindow::createToplevelWindow(int x, int y, unsigned int width,
+					    unsigned int height,
+					    unsigned int borderwidth)
+{
+  XSetWindowAttributes attrib_create;
+  unsigned long create_mask = CWBackPixmap | CWBorderPixel | CWColormap |
+                              CWOverrideRedirect | CWEventMask;
+
+  attrib_create.background_pixmap = None;
+  attrib_create.colormap = screen->getColormap();
+  attrib_create.override_redirect = True;
+  attrib_create.event_mask = ButtonPressMask | ButtonReleaseMask |
+                             ButtonMotionMask | EnterWindowMask;
+
+  return XCreateWindow(display, screen->getRootWindow(), x, y, width, height,
+			borderwidth, screen->getDepth(), InputOutput,
+			screen->getVisual(), create_mask,
+			&attrib_create);
+}
+
+
+/*
+ * Creates a child window, and optionally associates a given cursor with
+ * the new window.
+ */
+Window OpenboxWindow::createChildWindow(Window parent, Cursor cursor) {
+  XSetWindowAttributes attrib_create;
+  unsigned long create_mask = CWBackPixmap | CWBorderPixel |
+                              CWEventMask;
+
+  attrib_create.background_pixmap = None;
+  attrib_create.event_mask = ButtonPressMask | ButtonReleaseMask |
+                             ButtonMotionMask | ExposureMask |
+                             EnterWindowMask | LeaveWindowMask;
+
+  if (cursor) {
+    create_mask |= CWCursor;
+    attrib_create.cursor = cursor;
+  }
+
+  return XCreateWindow(display, parent, 0, 0, 1, 1, 0, screen->getDepth(),
+		       InputOutput, screen->getVisual(), create_mask,
+		       &attrib_create);
+}
+
+
+void OpenboxWindow::associateClientWindow(void) {
+  XSetWindowBorderWidth(display, client.window, 0);
+  getWMName();
+  getWMIconName();
+
+  XChangeSaveSet(display, client.window, SetModeInsert);
+  XSetWindowAttributes attrib_set;
+
+  XSelectInput(display, frame.plate, NoEventMask);
+  XReparentWindow(display, client.window, frame.plate, 0, 0);
+  XSelectInput(display, frame.plate, SubstructureRedirectMask);
+
+  XFlush(display);
+
+  attrib_set.event_mask = PropertyChangeMask | StructureNotifyMask |
+                          FocusChangeMask;
+  attrib_set.do_not_propagate_mask = ButtonPressMask | ButtonReleaseMask |
+                                     ButtonMotionMask;
+
+  XChangeWindowAttributes(display, client.window, CWEventMask|CWDontPropagate,
+                          &attrib_set);
+
+#ifdef    SHAPE
+  if (openbox->hasShapeExtensions()) {
+    XShapeSelectInput(display, client.window, ShapeNotifyMask);
+
+    int foo;
+    unsigned int ufoo;
+
+    XShapeQueryExtents(display, client.window, &flags.shaped, &foo, &foo,
+		       &ufoo, &ufoo, &foo, &foo, &foo, &ufoo, &ufoo);
+
+    if (flags.shaped) {
+      XShapeCombineShape(display, frame.window, ShapeBounding,
+			 frame.mwm_border_w, frame.y_border +
+			 frame.mwm_border_w, client.window,
+			 ShapeBounding, ShapeSet);
+
+      int num = 1;
+      XRectangle xrect[2];
+      xrect[0].x = xrect[0].y = 0;
+      xrect[0].width = frame.width;
+      xrect[0].height = frame.y_border;
+
+      if (decorations.handle) {
+	xrect[1].x = 0;
+	xrect[1].y = frame.y_handle;
+	xrect[1].width = frame.width;
+	xrect[1].height = frame.handle_h + frame.border_w;
+	num++;
+      }
+
+      XShapeCombineRectangles(display, frame.window, ShapeBounding, 0, 0,
+			      xrect, num, ShapeUnion, Unsorted);
+    }
+  }
+#endif // SHAPE
+
+  if (decorations.iconify) createIconifyButton();
+  if (decorations.maximize) createMaximizeButton();
+  if (decorations.close) createCloseButton();
+
+  if (frame.ubutton) {
+    if (frame.close_button)
+      XSetWindowBackgroundPixmap(display, frame.close_button, frame.ubutton);
+    if (frame.maximize_button)
+      XSetWindowBackgroundPixmap(display, frame.maximize_button,
+				 frame.ubutton);
+    if (frame.iconify_button)
+      XSetWindowBackgroundPixmap(display, frame.iconify_button, frame.ubutton);
+  } else {
+    if (frame.close_button)
+      XSetWindowBackground(display, frame.close_button, frame.ubutton_pixel);
+    if (frame.maximize_button)
+      XSetWindowBackground(display, frame.maximize_button,
+			   frame.ubutton_pixel);
+    if (frame.iconify_button)
+      XSetWindowBackground(display, frame.iconify_button, frame.ubutton_pixel);
+  }
+}
+
+
+void OpenboxWindow::decorate(void) {
+  Pixmap tmp = frame.fbutton;
+  BTexture *texture = &(screen->getWindowStyle()->b_focus);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.fbutton = None;
+    frame.fbutton_pixel = texture->getColor()->getPixel();
+  } else {
+    frame.fbutton =
+      image_ctrl->renderImage(frame.button_w, frame.button_h, texture);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = frame.ubutton;
+  texture = &(screen->getWindowStyle()->b_unfocus);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.ubutton = None;
+    frame.ubutton_pixel = texture->getColor()->getPixel();
+  } else {
+    frame.ubutton =
+      image_ctrl->renderImage(frame.button_w, frame.button_h, texture);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = frame.pbutton;
+  texture = &(screen->getWindowStyle()->b_pressed);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.pbutton = None;
+    frame.pbutton_pixel = texture->getColor()->getPixel();
+  } else {
+    frame.pbutton =
+      image_ctrl->renderImage(frame.button_w, frame.button_h, texture);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  if (decorations.titlebar) {
+    tmp = frame.ftitle;
+    texture = &(screen->getWindowStyle()->t_focus);
+    if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+      frame.ftitle = None;
+      frame.ftitle_pixel = texture->getColor()->getPixel();
+    } else {
+      frame.ftitle =
+        image_ctrl->renderImage(frame.width, frame.title_h, texture);
+    }
+    if (tmp) image_ctrl->removeImage(tmp);
+
+    tmp = frame.utitle;
+    texture = &(screen->getWindowStyle()->t_unfocus);
+    if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+      frame.utitle = None;
+      frame.utitle_pixel = texture->getColor()->getPixel();
+    } else {
+      frame.utitle =
+        image_ctrl->renderImage(frame.width, frame.title_h, texture);
+    }
+    if (tmp) image_ctrl->removeImage(tmp);
+
+    XSetWindowBorder(display, frame.title,
+                     screen->getBorderColor()->getPixel());
+
+    decorateLabel();
+  }
+
+  if (decorations.border) {
+    frame.fborder_pixel = screen->getWindowStyle()->f_focus.getPixel();
+    frame.uborder_pixel = screen->getWindowStyle()->f_unfocus.getPixel();
+    openbox_attrib.flags |= AttribDecoration;
+    openbox_attrib.decoration = DecorNormal;
+  } else {
+    openbox_attrib.flags |= AttribDecoration;
+    openbox_attrib.decoration = DecorNone;
+  }
+
+  if (decorations.handle) {
+    tmp = frame.fhandle;
+    texture = &(screen->getWindowStyle()->h_focus);
+    if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+      frame.fhandle = None;
+      frame.fhandle_pixel = texture->getColor()->getPixel();
+    } else {
+      frame.fhandle =
+        image_ctrl->renderImage(frame.width, frame.handle_h, texture);
+    }
+    if (tmp) image_ctrl->removeImage(tmp);
+
+    tmp = frame.uhandle;
+    texture = &(screen->getWindowStyle()->h_unfocus);
+    if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+      frame.uhandle = None;
+      frame.uhandle_pixel = texture->getColor()->getPixel();
+    } else {
+      frame.uhandle =
+        image_ctrl->renderImage(frame.width, frame.handle_h, texture);
+    }
+    if (tmp) image_ctrl->removeImage(tmp);
+
+    tmp = frame.fgrip;
+    texture = &(screen->getWindowStyle()->g_focus);
+    if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+      frame.fgrip = None;
+      frame.fgrip_pixel = texture->getColor()->getPixel();
+    } else {
+      frame.fgrip =
+        image_ctrl->renderImage(frame.grip_w, frame.grip_h, texture);
+    }
+    if (tmp) image_ctrl->removeImage(tmp);
+
+    tmp = frame.ugrip;
+    texture = &(screen->getWindowStyle()->g_unfocus);
+    if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+      frame.ugrip = None;
+      frame.ugrip_pixel = texture->getColor()->getPixel();
+    } else {
+      frame.ugrip =
+        image_ctrl->renderImage(frame.grip_w, frame.grip_h, texture);
+    }
+    if (tmp) image_ctrl->removeImage(tmp);
+
+    XSetWindowBorder(display, frame.handle,
+                     screen->getBorderColor()->getPixel());
+    XSetWindowBorder(display, frame.left_grip,
+                     screen->getBorderColor()->getPixel());
+    XSetWindowBorder(display, frame.right_grip,
+                     screen->getBorderColor()->getPixel());
+  }
+
+  XSetWindowBorder(display, frame.window,
+                   screen->getBorderColor()->getPixel());
+}
+
+
+void OpenboxWindow::decorateLabel(void) {
+  Pixmap tmp = frame.flabel;
+  BTexture *texture = &(screen->getWindowStyle()->l_focus);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.flabel = None;
+    frame.flabel_pixel = texture->getColor()->getPixel();
+  } else {
+    frame.flabel =
+      image_ctrl->renderImage(frame.label_w, frame.label_h, texture);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+
+  tmp = frame.ulabel;
+  texture = &(screen->getWindowStyle()->l_unfocus);
+  if (texture->getTexture() == (BImage_Flat | BImage_Solid)) {
+    frame.ulabel = None;
+    frame.ulabel_pixel = texture->getColor()->getPixel();
+  } else {
+    frame.ulabel =
+      image_ctrl->renderImage(frame.label_w, frame.label_h, texture);
+  }
+  if (tmp) image_ctrl->removeImage(tmp);
+}
+
+
+void OpenboxWindow::createCloseButton(void) {
+  if (decorations.close && frame.title != None) {
+    frame.close_button = createChildWindow(frame.title);
+    openbox->saveWindowSearch(frame.close_button, this);
+  }
+}
+
+
+void OpenboxWindow::createIconifyButton(void) {
+  if (decorations.iconify && frame.title != None) {
+    frame.iconify_button = createChildWindow(frame.title);
+    openbox->saveWindowSearch(frame.iconify_button, this);
+  }
+}
+
+
+void OpenboxWindow::createMaximizeButton(void) {
+  if (decorations.maximize && frame.title != None) {
+    frame.maximize_button = createChildWindow(frame.title);
+    openbox->saveWindowSearch(frame.maximize_button, this);
+  }
+}
+
+
+void OpenboxWindow::positionButtons(Bool redecorate_label) {
+  const char *format = openbox->getTitleBarLayout();
+  const unsigned int bw = frame.bevel_w + 1;
+  const unsigned int by = frame.bevel_w + 1;
+  unsigned int bx = frame.bevel_w + 1;
+  unsigned int bcount = strlen(format) - 1;
+
+  if (!decorations.close)
+    bcount--;
+  if (!decorations.maximize)
+    bcount--;
+  if (!decorations.iconify)
+    bcount--;
+  frame.label_w = frame.width - bx * 2 - (frame.button_w + bw) * bcount;
+  
+  bool hasclose, hasiconify, hasmaximize;
+  hasclose = hasiconify = hasmaximize = false;
+ 
+  for (int i = 0; format[i] != '\0' && i < 4; i++) {
+    switch(format[i]) {
+    case 'C':
+      if (decorations.close && frame.close_button != None) {
+        XMoveResizeWindow(display, frame.close_button, bx, by,
+                          frame.button_w, frame.button_h);
+        XMapWindow(display, frame.close_button);
+        XClearWindow(display, frame.close_button);
+        bx += frame.button_w + bw;
+        hasclose = true;
+      } else if (frame.close_button)
+        XUnmapWindow(display, frame.close_button);
+      break;
+    case 'I':
+      if (decorations.iconify && frame.iconify_button != None) {
+        XMoveResizeWindow(display, frame.iconify_button, bx, by,
+                          frame.button_w, frame.button_h);
+        XMapWindow(display, frame.iconify_button);
+        XClearWindow(display, frame.iconify_button);
+        bx += frame.button_w + bw;
+        hasiconify = true;
+      } else if (frame.close_button)
+        XUnmapWindow(display, frame.close_button);
+      break;
+    case 'M':
+      if (decorations.maximize && frame.maximize_button != None) {
+        XMoveResizeWindow(display, frame.maximize_button, bx, by,
+                          frame.button_w, frame.button_h);
+        XMapWindow(display, frame.maximize_button);
+        XClearWindow(display, frame.maximize_button);
+        bx += frame.button_w + bw;
+        hasmaximize = true;
+      } else if (frame.close_button)
+        XUnmapWindow(display, frame.close_button);
+      break;
+    case 'L':
+      XMoveResizeWindow(display, frame.label, bx, by - 1,
+                        frame.label_w, frame.label_h);
+      bx += frame.label_w + bw;
+      break;
+    }
+  }
+
+  if (!hasclose) {
+      openbox->removeWindowSearch(frame.close_button);
+      XDestroyWindow(display, frame.close_button);     
+  }
+  if (!hasiconify) {
+      openbox->removeWindowSearch(frame.iconify_button);
+      XDestroyWindow(display, frame.iconify_button);
+  }
+  if (!hasmaximize) {
+      openbox->removeWindowSearch(frame.maximize_button);
+      XDestroyWindow(display, frame.maximize_button);                 
+  }
+  if (redecorate_label)
+    decorateLabel();
+  redrawLabel();
+  redrawAllButtons();
+}
+
+
+void OpenboxWindow::reconfigure(void) {
+  upsize();
+
+  client.x = frame.x + frame.mwm_border_w + frame.border_w;
+  client.y = frame.y + frame.y_border + frame.mwm_border_w +
+	     frame.border_w;
+
+  if (client.title) {
+    if (i18n->multibyte()) {
+      XRectangle ink, logical;
+      XmbTextExtents(screen->getWindowStyle()->fontset,
+		     client.title, client.title_len, &ink, &logical);
+      client.title_text_w = logical.width;
+    } else {
+      client.title_text_w = XTextWidth(screen->getWindowStyle()->font,
+				       client.title, client.title_len);
+    }
+    client.title_text_w += (frame.bevel_w * 4);
+  }
+
+  positionWindows();
+  decorate();
+
+  XClearWindow(display, frame.window);
+  setFocusFlag(flags.focused);
+
+  configure(frame.x, frame.y, frame.width, frame.height);
+
+  if (! screen->isSloppyFocus())
+    openbox->grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
+        GrabModeSync, GrabModeSync, None, None);
+  else
+    openbox->ungrabButton(Button1, 0, frame.plate);
+
+  if (windowmenu) {
+    windowmenu->move(windowmenu->getX(), frame.y + frame.title_h);
+    windowmenu->reconfigure();
+  }
+}
+
+
+void OpenboxWindow::positionWindows(void) {
+  XResizeWindow(display, frame.window, frame.width,
+                ((flags.shaded) ? frame.title_h : frame.height));
+  XSetWindowBorderWidth(display, frame.window, frame.border_w);
+  XSetWindowBorderWidth(display, frame.plate, frame.mwm_border_w);
+  XMoveResizeWindow(display, frame.plate, 0, frame.y_border,
+                    client.width, client.height);
+  XMoveResizeWindow(display, client.window, 0, 0, client.width, client.height);
+
+  if (decorations.titlebar) {
+    XSetWindowBorderWidth(display, frame.title, frame.border_w);
+    XMoveResizeWindow(display, frame.title, -frame.border_w,
+		      -frame.border_w, frame.width, frame.title_h);
+
+    positionButtons();
+  } else if (frame.title) {
+    XUnmapWindow(display, frame.title);
+  }
+  if (decorations.handle) {
+    XSetWindowBorderWidth(display, frame.handle, frame.border_w);
+    XSetWindowBorderWidth(display, frame.left_grip, frame.border_w);
+    XSetWindowBorderWidth(display, frame.right_grip, frame.border_w);
+
+    XMoveResizeWindow(display, frame.handle, -frame.border_w,
+                      frame.y_handle - frame.border_w,
+		      frame.width, frame.handle_h);
+    XMoveResizeWindow(display, frame.left_grip, -frame.border_w,
+		      -frame.border_w, frame.grip_w, frame.grip_h);
+    XMoveResizeWindow(display, frame.right_grip,
+		      frame.width - frame.grip_w - frame.border_w,
+                      -frame.border_w, frame.grip_w, frame.grip_h);
+    XMapSubwindows(display, frame.handle);
+  } else if (frame.handle) {
+    XUnmapWindow(display, frame.handle);
+  }
+}
+
+
+void OpenboxWindow::getWMName(void) {
+  if (client.title) {
+    delete [] client.title;
+    client.title = (char *) 0;
+  }
+
+  XTextProperty text_prop;
+  char **list;
+  int num;
+
+  if (XGetWMName(display, client.window, &text_prop)) {
+    if (text_prop.value && text_prop.nitems > 0) {
+      if (text_prop.encoding != XA_STRING) {
+	text_prop.nitems = strlen((char *) text_prop.value);
+
+	if ((XmbTextPropertyToTextList(display, &text_prop,
+				       &list, &num) == Success) &&
+	    (num > 0) && *list) {
+	  client.title = bstrdup(*list);
+	  XFreeStringList(list);
+	} else {
+	  client.title = bstrdup((char *) text_prop.value);
+	}
+      } else {
+	client.title = bstrdup((char *) text_prop.value);
+      }
+      XFree((char *) text_prop.value);
+    } else {
+      client.title = bstrdup(i18n->getMessage(WindowSet, WindowUnnamed,
+					      "Unnamed"));
+    }
+  } else {
+    client.title = bstrdup(i18n->getMessage(WindowSet, WindowUnnamed,
+					    "Unnamed"));
+  }
+  client.title_len = strlen(client.title);
+
+  if (i18n->multibyte()) {
+    XRectangle ink, logical;
+    XmbTextExtents(screen->getWindowStyle()->fontset,
+		   client.title, client.title_len, &ink, &logical);
+    client.title_text_w = logical.width;
+  } else {
+    client.title_len = strlen(client.title);
+    client.title_text_w = XTextWidth(screen->getWindowStyle()->font,
+				     client.title, client.title_len);
+  }
+
+  client.title_text_w += (frame.bevel_w * 4);
+}
+
+
+void OpenboxWindow::getWMIconName(void) {
+  if (client.icon_title) {
+    delete [] client.icon_title;
+    client.icon_title = (char *) 0;
+  }
+
+  XTextProperty text_prop;
+  char **list;
+  int num;
+
+  if (XGetWMIconName(display, client.window, &text_prop)) {
+    if (text_prop.value && text_prop.nitems > 0) {
+      if (text_prop.encoding != XA_STRING) {
+ 	text_prop.nitems = strlen((char *) text_prop.value);
+
+ 	if ((XmbTextPropertyToTextList(display, &text_prop,
+ 				       &list, &num) == Success) &&
+ 	    (num > 0) && *list) {
+ 	  client.icon_title = bstrdup(*list);
+ 	  XFreeStringList(list);
+ 	} else {
+ 	  client.icon_title = bstrdup((char *) text_prop.value);
+	}
+      } else {
+ 	client.icon_title = bstrdup((char *) text_prop.value);
+      }
+      XFree((char *) text_prop.value);
+    } else {
+      client.icon_title = bstrdup(client.title);
+    }
+  } else {
+    client.icon_title = bstrdup(client.title);
+  }
+}
+
+
+/*
+ * Retrieve which WM Protocols are supported by the client window.
+ * If the WM_DELETE_WINDOW protocol is supported, add the close button to the
+ * window's decorations and allow the close behavior.
+ * If the WM_TAKE_FOCUS protocol is supported, save a value that indicates
+ * this.
+ */
+void OpenboxWindow::getWMProtocols(void) {
+  Atom *proto;
+  int num_return = 0;
+
+  if (XGetWMProtocols(display, client.window, &proto, &num_return)) {
+    for (int i = 0; i < num_return; ++i) {
+      if (proto[i] == openbox->getWMDeleteAtom())
+	functions.close = decorations.close = True;
+      else if (proto[i] == openbox->getWMTakeFocusAtom())
+        flags.send_focus_message = True;
+      else if (proto[i] == openbox->getOpenboxStructureMessagesAtom())
+        screen->addNetizen(new Netizen(screen, client.window));
+    }
+
+    XFree(proto);
+  }
+}
+
+
+/*
+ * Gets the value of the WM_HINTS property.
+ * If the property is not set, then use a set of default values.
+ */
+void OpenboxWindow::getWMHints(void) {
+  XWMHints *wmhint = XGetWMHints(display, client.window);
+  if (! wmhint) {
+    flags.visible = True;
+    flags.iconic = False;
+    focus_mode = F_Passive;
+    client.window_group = None;
+    client.initial_state = NormalState;
+    return;
+  }
+  client.wm_hint_flags = wmhint->flags;
+  if (wmhint->flags & InputHint) {
+    if (wmhint->input == True) {
+      if (flags.send_focus_message)
+	focus_mode = F_LocallyActive;
+      else
+	focus_mode = F_Passive;
+    } else {
+      if (flags.send_focus_message)
+	focus_mode = F_GloballyActive;
+      else
+	focus_mode = F_NoInput;
+    }
+  } else {
+    focus_mode = F_Passive;
+  }
+
+  if (wmhint->flags & StateHint)
+    client.initial_state = wmhint->initial_state;
+  else
+    client.initial_state = NormalState;
+
+  if (wmhint->flags & WindowGroupHint) {
+    if (! client.window_group) {
+      client.window_group = wmhint->window_group;
+      openbox->saveGroupSearch(client.window_group, this);
+    }
+  } else {
+    client.window_group = None;
+  }
+  XFree(wmhint);
+}
+
+
+/*
+ * Gets the value of the WM_NORMAL_HINTS property.
+ * If the property is not set, then use a set of default values.
+ */
+void OpenboxWindow::getWMNormalHints(void) {
+  long icccm_mask;
+  XSizeHints sizehint;
+
+  client.min_width = client.min_height =
+    client.base_width = client.base_height =
+    client.width_inc = client.height_inc = 1;
+  client.max_width = screen->getWidth();
+  client.max_height = screen->getHeight();
+  client.min_aspect_x = client.min_aspect_y =
+    client.max_aspect_x = client.max_aspect_y = 1;
+  client.win_gravity = NorthWestGravity;
+
+  if (! XGetWMNormalHints(display, client.window, &sizehint, &icccm_mask))
+    return;
+
+  client.normal_hint_flags = sizehint.flags;
+
+  if (sizehint.flags & PMinSize) {
+    client.min_width = sizehint.min_width;
+    client.min_height = sizehint.min_height;
+  }
+
+  if (sizehint.flags & PMaxSize) {
+    client.max_width = sizehint.max_width;
+    client.max_height = sizehint.max_height;
+  }
+
+  if (sizehint.flags & PResizeInc) {
+    client.width_inc = sizehint.width_inc;
+    client.height_inc = sizehint.height_inc;
+  }
+
+  if (sizehint.flags & PAspect) {
+    client.min_aspect_x = sizehint.min_aspect.x;
+    client.min_aspect_y = sizehint.min_aspect.y;
+    client.max_aspect_x = sizehint.max_aspect.x;
+    client.max_aspect_y = sizehint.max_aspect.y;
+  }
+
+  if (sizehint.flags & PBaseSize) {
+    client.base_width = sizehint.base_width;
+    client.base_height = sizehint.base_height;
+  }
+
+  if (sizehint.flags & PWinGravity)
+    client.win_gravity = sizehint.win_gravity;
+}
+
+
+/*
+ * Gets the MWM hints for the class' contained window.
+ * This is used while initializing the window to its first state, and not
+ * thereafter.
+ * Returns: true if the MWM hints are successfully retreived and applied; false
+ * if they are not.
+ */
+void OpenboxWindow::getMWMHints(void) {
+  int format;
+  Atom atom_return;
+  unsigned long num, len;
+
+  int ret = XGetWindowProperty(display, client.window,
+			       openbox->getMotifWMHintsAtom(), 0,
+			       PropMwmHintsElements, False,
+			       openbox->getMotifWMHintsAtom(), &atom_return,
+			       &format, &num, &len,
+			       (unsigned char **) &client.mwm_hint);
+
+  if (ret != Success || !client.mwm_hint || num != PropMwmHintsElements)
+    return;
+
+  if (client.mwm_hint->flags & MwmHintsDecorations) {
+    if (client.mwm_hint->decorations & MwmDecorAll) {
+      decorations.titlebar = decorations.handle = decorations.border =
+	decorations.iconify = decorations.maximize =
+	decorations.close = decorations.menu = True;
+    } else {
+      decorations.titlebar = decorations.handle = decorations.border =
+	decorations.iconify = decorations.maximize =
+	decorations.close = decorations.menu = False;
+
+      if (client.mwm_hint->decorations & MwmDecorBorder)
+	decorations.border = True;
+      if (client.mwm_hint->decorations & MwmDecorHandle)
+	decorations.handle = True;
+      if (client.mwm_hint->decorations & MwmDecorTitle)
+	decorations.titlebar = True;
+      if (client.mwm_hint->decorations & MwmDecorMenu)
+	decorations.menu = True;
+      if (client.mwm_hint->decorations & MwmDecorIconify)
+	decorations.iconify = True;
+      if (client.mwm_hint->decorations & MwmDecorMaximize)
+	decorations.maximize = True;
+    }
+  }
+
+  if (client.mwm_hint->flags & MwmHintsFunctions) {
+    if (client.mwm_hint->functions & MwmFuncAll) {
+      functions.resize = functions.move = functions.iconify =
+	functions.maximize = functions.close = True;
+    } else {
+      functions.resize = functions.move = functions.iconify =
+	functions.maximize = functions.close = False;
+
+      if (client.mwm_hint->functions & MwmFuncResize)
+	functions.resize = True;
+      if (client.mwm_hint->functions & MwmFuncMove)
+	functions.move = True;
+      if (client.mwm_hint->functions & MwmFuncIconify)
+	functions.iconify = True;
+      if (client.mwm_hint->functions & MwmFuncMaximize)
+	functions.maximize = True;
+      if (client.mwm_hint->functions & MwmFuncClose)
+	functions.close = True;
+    }
+  }
+}
+
+
+/*
+ * Gets the openbox hints from the class' contained window.
+ * This is used while initializing the window to its first state, and not
+ * thereafter.
+ * Returns: true if the hints are successfully retreived and applied; false if
+ * they are not.
+ */
+void OpenboxWindow::getOpenboxHints(void) {
+  int format;
+  Atom atom_return;
+  unsigned long num, len;
+
+  int ret = XGetWindowProperty(display, client.window,
+			       openbox->getOpenboxHintsAtom(), 0,
+			       PropOpenboxHintsElements, False,
+			       openbox->getOpenboxHintsAtom(), &atom_return,
+			       &format, &num, &len,
+			       (unsigned char **) &client.openbox_hint);
+  if (ret != Success || !client.openbox_hint ||
+      num != PropOpenboxHintsElements)
+    return;
+
+  if (client.openbox_hint->flags & AttribShaded)
+    flags.shaded = (client.openbox_hint->attrib & AttribShaded);
+
+  if ((client.openbox_hint->flags & AttribMaxHoriz) &&
+      (client.openbox_hint->flags & AttribMaxVert))
+    flags.maximized = (client.openbox_hint->attrib &
+		       (AttribMaxHoriz | AttribMaxVert)) ? 1 : 0;
+  else if (client.openbox_hint->flags & AttribMaxVert)
+    flags.maximized = (client.openbox_hint->attrib & AttribMaxVert) ? 2 : 0;
+  else if (client.openbox_hint->flags & AttribMaxHoriz)
+    flags.maximized = (client.openbox_hint->attrib & AttribMaxHoriz) ? 3 : 0;
+
+  if (client.openbox_hint->flags & AttribOmnipresent)
+    flags.stuck = (client.openbox_hint->attrib & AttribOmnipresent);
+
+  if (client.openbox_hint->flags & AttribWorkspace)
+    workspace_number = client.openbox_hint->workspace;
+
+  // if (client.openbox_hint->flags & AttribStack)
+  //   don't yet have always on top/bottom for openbox yet... working
+  //   on that
+
+  if (client.openbox_hint->flags & AttribDecoration) {
+    switch (client.openbox_hint->decoration) {
+    case DecorNone:
+      decorations.titlebar = decorations.border = decorations.handle =
+	decorations.iconify = decorations.maximize =
+	decorations.menu = False;
+      functions.resize = functions.move = functions.iconify =
+	functions.maximize = False;
+
+      break;
+
+    case DecorTiny:
+      decorations.titlebar = decorations.iconify = decorations.menu =
+	functions.move = functions.iconify = True;
+      decorations.border = decorations.handle = decorations.maximize =
+	functions.resize = functions.maximize = False;
+
+      break;
+
+    case DecorTool:
+      decorations.titlebar = decorations.menu = functions.move = True;
+      decorations.iconify = decorations.border = decorations.handle =
+	decorations.maximize = functions.resize = functions.maximize =
+	functions.iconify = False;
+
+      break;
+
+    case DecorNormal:
+    default:
+      decorations.titlebar = decorations.border = decorations.handle =
+	decorations.iconify = decorations.maximize =
+	decorations.menu = True;
+      functions.resize = functions.move = functions.iconify =
+	functions.maximize = True;
+
+      break;
+    }
+
+    reconfigure();
+  }
+}
+
+
+void OpenboxWindow::configure(int dx, int dy,
+                               unsigned int dw, unsigned int dh) {
+  Bool send_event = (frame.x != dx || frame.y != dy);
+
+  if ((dw != frame.width) || (dh != frame.height)) {
+    if ((((signed) frame.width) + dx) < 0) dx = 0;
+    if ((((signed) frame.height) + dy) < 0) dy = 0;
+
+    frame.x = dx;
+    frame.y = dy;
+    frame.width = dw;
+    frame.height = dh;
+
+    downsize();
+
+#ifdef    SHAPE
+    if (openbox->hasShapeExtensions() && flags.shaped) {
+      XShapeCombineShape(display, frame.window, ShapeBounding,
+ 		         frame.mwm_border_w, frame.y_border +
+			 frame.mwm_border_w, client.window,
+			 ShapeBounding, ShapeSet);
+
+      int num = 1;
+      XRectangle xrect[2];
+      xrect[0].x = xrect[0].y = 0;
+      xrect[0].width = frame.width;
+      xrect[0].height = frame.y_border;
+
+      if (decorations.handle) {
+	xrect[1].x = 0;
+	xrect[1].y = frame.y_handle;
+	xrect[1].width = frame.width;
+	xrect[1].height = frame.handle_h + frame.border_w;
+	num++;
+      }
+
+      XShapeCombineRectangles(display, frame.window, ShapeBounding, 0, 0,
+			      xrect, num, ShapeUnion, Unsorted);
+    }
+#endif // SHAPE
+
+    XMoveWindow(display, frame.window, frame.x, frame.y);
+
+    positionWindows();
+    decorate();
+    setFocusFlag(flags.focused);
+    redrawAllButtons();
+  } else {
+    frame.x = dx;
+    frame.y = dy;
+
+    XMoveWindow(display, frame.window, frame.x, frame.y);
+
+    if (! flags.moving) send_event = True;
+  }
+
+  if (send_event && ! flags.moving) {
+    client.x = dx + frame.mwm_border_w + frame.border_w;
+    client.y = dy + frame.y_border + frame.mwm_border_w +
+               frame.border_w;
+
+    XEvent event;
+    event.type = ConfigureNotify;
+
+    event.xconfigure.display = display;
+    event.xconfigure.event = client.window;
+    event.xconfigure.window = client.window;
+    event.xconfigure.x = client.x;
+    event.xconfigure.y = client.y;
+    event.xconfigure.width = client.width;
+    event.xconfigure.height = client.height;
+    event.xconfigure.border_width = client.old_bw;
+    event.xconfigure.above = frame.window;
+    event.xconfigure.override_redirect = False;
+
+    XSendEvent(display, client.window, True, NoEventMask, &event);
+
+    screen->updateNetizenConfigNotify(&event);
+  }
+}
+
+
+Bool OpenboxWindow::setInputFocus(void) {
+  if (((signed) (frame.x + frame.width)) < 0) {
+    if (((signed) (frame.y + frame.y_border)) < 0)
+      configure(frame.border_w, frame.border_w, frame.width, frame.height);
+    else if (frame.y > (signed) screen->getHeight())
+      configure(frame.border_w, screen->getHeight() - frame.height,
+                frame.width, frame.height);
+    else
+      configure(frame.border_w, frame.y + frame.border_w,
+                frame.width, frame.height);
+  } else if (frame.x > (signed) screen->getWidth()) {
+    if (((signed) (frame.y + frame.y_border)) < 0)
+      configure(screen->getWidth() - frame.width, frame.border_w,
+                frame.width, frame.height);
+    else if (frame.y > (signed) screen->getHeight())
+      configure(screen->getWidth() - frame.width,
+	        screen->getHeight() - frame.height, frame.width, frame.height);
+    else
+      configure(screen->getWidth() - frame.width,
+                frame.y + frame.border_w, frame.width, frame.height);
+  }
+
+  openbox->grab();
+  if (! validateClient()) return False;
+
+  Bool ret = False;
+
+  if (client.transient && flags.modal) {
+    ret = client.transient->setInputFocus();
+  } else if (! flags.focused) {
+    if (focus_mode == F_LocallyActive || focus_mode == F_Passive)
+      XSetInputFocus(display, client.window,
+		     RevertToPointerRoot, CurrentTime);
+    else
+      XSetInputFocus(display, screen->getRootWindow(),
+		     RevertToNone, CurrentTime);
+
+    openbox->setFocusedWindow(this);
+
+    if (flags.send_focus_message) {
+      XEvent ce;
+      ce.xclient.type = ClientMessage;
+      ce.xclient.message_type = openbox->getWMProtocolsAtom();
+      ce.xclient.display = display;
+      ce.xclient.window = client.window;
+      ce.xclient.format = 32;
+      ce.xclient.data.l[0] = openbox->getWMTakeFocusAtom();
+      ce.xclient.data.l[1] = openbox->getLastTime();
+      ce.xclient.data.l[2] = 0l;
+      ce.xclient.data.l[3] = 0l;
+      ce.xclient.data.l[4] = 0l;
+      XSendEvent(display, client.window, False, NoEventMask, &ce);
+    }
+
+    if (screen->isSloppyFocus() && screen->doAutoRaise())
+      timer->start();
+
+    ret = True;
+  }
+
+  openbox->ungrab();
+
+  return ret;
+}
+
+
+void OpenboxWindow::iconify(void) {
+  if (flags.iconic) return;
+
+  if (windowmenu) windowmenu->hide();
+
+  setState(IconicState);
+
+  XSelectInput(display, client.window, NoEventMask);
+  XUnmapWindow(display, client.window);
+  XSelectInput(display, client.window,
+               PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
+
+  XUnmapWindow(display, frame.window);
+  flags.visible = False;
+  flags.iconic = True;
+
+  screen->getWorkspace(workspace_number)->removeWindow(this);
+
+  if (flags.transient && client.transient_for &&
+      !client.transient_for->flags.iconic) {
+    client.transient_for->iconify();
+  }
+  screen->addIcon(this);
+
+  if (client.transient && !client.transient->flags.iconic) {
+    client.transient->iconify();
+  }
+}
+
+
+void OpenboxWindow::deiconify(Bool reassoc, Bool raise) {
+  if (flags.iconic || reassoc)
+    screen->reassociateWindow(this, -1, False);
+  else if (workspace_number != screen->getCurrentWorkspace()->getWorkspaceID())
+    return;
+
+  setState(NormalState);
+
+  XSelectInput(display, client.window, NoEventMask);
+  XMapWindow(display, client.window);
+  XSelectInput(display, client.window,
+               PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
+
+  XMapSubwindows(display, frame.window);
+  XMapWindow(display, frame.window);
+
+  if (flags.iconic && screen->doFocusNew()) setInputFocus();
+
+  flags.visible = True;
+  flags.iconic = False;
+
+  if (reassoc && client.transient) client.transient->deiconify(True, False);
+
+  if (raise)
+    screen->getWorkspace(workspace_number)->raiseWindow(this);
+}
+
+
+void OpenboxWindow::close(void) {
+  XEvent ce;
+  ce.xclient.type = ClientMessage;
+  ce.xclient.message_type = openbox->getWMProtocolsAtom();
+  ce.xclient.display = display;
+  ce.xclient.window = client.window;
+  ce.xclient.format = 32;
+  ce.xclient.data.l[0] = openbox->getWMDeleteAtom();
+  ce.xclient.data.l[1] = CurrentTime;
+  ce.xclient.data.l[2] = 0l;
+  ce.xclient.data.l[3] = 0l;
+  ce.xclient.data.l[4] = 0l;
+  XSendEvent(display, client.window, False, NoEventMask, &ce);
+}
+
+
+void OpenboxWindow::withdraw(void) {
+  flags.visible = False;
+  flags.iconic = False;
+
+  XUnmapWindow(display, frame.window);
+
+  XSelectInput(display, client.window, NoEventMask);
+  XUnmapWindow(display, client.window);
+  XSelectInput(display, client.window,
+               PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
+
+  if (windowmenu) windowmenu->hide();
+}
+
+
+void OpenboxWindow::maximize(unsigned int button) {
+  // handle case where menu is open then the max button is used instead
+  if (windowmenu && windowmenu->isVisible()) windowmenu->hide();
+
+  if (flags.maximized) {
+    flags.maximized = 0;
+
+    openbox_attrib.flags &= ! (AttribMaxHoriz | AttribMaxVert);
+    openbox_attrib.attrib &= ! (AttribMaxHoriz | AttribMaxVert);
+
+    // when a resize is begun, maximize(0) is called to clear any maximization
+    // flags currently set.  Otherwise it still thinks it is maximized.
+    // so we do not need to call configure() because resizing will handle it
+    if (!flags.resizing)
+      configure(openbox_attrib.premax_x, openbox_attrib.premax_y,
+		openbox_attrib.premax_w, openbox_attrib.premax_h);
+
+    openbox_attrib.premax_x = openbox_attrib.premax_y = 0;
+    openbox_attrib.premax_w = openbox_attrib.premax_h = 0;
+
+    redrawAllButtons();
+    setState(current_state);
+    return;
+  }
+
+  int dx = 0, dy = 0;
+  unsigned int dw, dh;
+
+  openbox_attrib.premax_x = frame.x;
+  openbox_attrib.premax_y = frame.y;
+  openbox_attrib.premax_w = frame.width;
+  openbox_attrib.premax_h = frame.height;
+
+  dw = screen->getWidth();
+  dw -= frame.border_w * 2;
+  dw -= frame.mwm_border_w * 2;
+  dw -= client.base_width;
+
+  dh = screen->getHeight();
+  dh -= frame.border_w * 2;
+  dh -= frame.mwm_border_w * 2;
+  dh -= ((frame.handle_h + frame.border_w) * decorations.handle);
+  dh -= client.base_height;
+  dh -= frame.y_border;
+
+  if (! screen->doFullMax())
+    dh -= screen->getToolbar()->getExposedHeight() + frame.border_w;
+
+  if (dw < client.min_width) dw = client.min_width;
+  if (dh < client.min_height) dh = client.min_height;
+  if (dw > client.max_width) dw = client.max_width;
+  if (dh > client.max_height) dh = client.max_height;
+
+  dw -= (dw % client.width_inc);
+  dw += client.base_width;
+  dw += frame.mwm_border_w * 2;
+
+  dh -= (dh % client.height_inc);
+  dh += client.base_height;
+  dh += frame.y_border;
+  dh += ((frame.handle_h + frame.border_w) * decorations.handle);
+  dh += frame.mwm_border_w * 2;
+
+  dx += ((screen->getWidth() - dw) / 2) - frame.border_w;
+
+  if (screen->doFullMax()) {
+    dy += ((screen->getHeight() - dh) / 2) - frame.border_w;
+  } else {
+    dy += (((screen->getHeight() - screen->getToolbar()->getExposedHeight())
+           - dh) / 2) - frame.border_w;
+
+    switch (screen->getToolbarPlacement()) {
+    case Toolbar::TopLeft:
+    case Toolbar::TopCenter:
+    case Toolbar::TopRight:
+      dy += screen->getToolbar()->getExposedHeight() +
+        frame.border_w;
+      break;
+    }
+  }
+
+  switch(button) {
+  case 1:
+    openbox_attrib.flags |= AttribMaxHoriz | AttribMaxVert;
+    openbox_attrib.attrib |= AttribMaxHoriz | AttribMaxVert;
+    break;
+
+  case 2:
+    openbox_attrib.flags |= AttribMaxVert;
+    openbox_attrib.attrib |= AttribMaxVert;
+
+    dw = frame.width;
+    dx = frame.x;
+    break;
+
+  case 3:
+    openbox_attrib.flags |= AttribMaxHoriz;
+    openbox_attrib.attrib |= AttribMaxHoriz;
+
+    dh = frame.height;
+    dy = frame.y;
+    break;
+  }
+
+  if (flags.shaded) {
+    openbox_attrib.flags ^= AttribShaded;
+    openbox_attrib.attrib ^= AttribShaded;
+    flags.shaded = False;
+  }
+
+  flags.maximized = button;
+
+  configure(dx, dy, dw, dh);
+  screen->getWorkspace(workspace_number)->raiseWindow(this);
+  redrawAllButtons();
+  setState(current_state);
+}
+
+
+void OpenboxWindow::setWorkspace(int n) {
+  workspace_number = n;
+
+  openbox_attrib.flags |= AttribWorkspace;
+  openbox_attrib.workspace = workspace_number;
+}
+
+
+void OpenboxWindow::shade(void) {
+  if (!decorations.titlebar)
+    return;
+
+  if (flags.shaded) {
+    XResizeWindow(display, frame.window, frame.width, frame.height);
+    flags.shaded = False;
+    openbox_attrib.flags ^= AttribShaded;
+    openbox_attrib.attrib ^= AttribShaded;
+
+    setState(NormalState);
+  } else {
+    XResizeWindow(display, frame.window, frame.width, frame.title_h);
+    flags.shaded = True;
+    openbox_attrib.flags |= AttribShaded;
+    openbox_attrib.attrib |= AttribShaded;
+
+    setState(IconicState);
+  }
+}
+
+
+void OpenboxWindow::stick(void) {
+  if (flags.stuck) {
+    openbox_attrib.flags ^= AttribOmnipresent;
+    openbox_attrib.attrib ^= AttribOmnipresent;
+
+    flags.stuck = False;
+
+    if (! flags.iconic)
+      screen->reassociateWindow(this, -1, True);
+
+    setState(current_state);
+  } else {
+    flags.stuck = True;
+
+    openbox_attrib.flags |= AttribOmnipresent;
+    openbox_attrib.attrib |= AttribOmnipresent;
+
+    setState(current_state);
+  }
+}
+
+
+void OpenboxWindow::setFocusFlag(Bool focus) {
+  flags.focused = focus;
+
+  if (decorations.titlebar) {
+    if (flags.focused) {
+      if (frame.ftitle)
+        XSetWindowBackgroundPixmap(display, frame.title, frame.ftitle);
+      else
+        XSetWindowBackground(display, frame.title, frame.ftitle_pixel);
+    } else {
+      if (frame.utitle)
+        XSetWindowBackgroundPixmap(display, frame.title, frame.utitle);
+      else
+        XSetWindowBackground(display, frame.title, frame.utitle_pixel);
+    }
+    XClearWindow(display, frame.title);
+
+    redrawLabel();
+    redrawAllButtons();
+  }
+
+  if (decorations.handle) {
+    if (flags.focused) {
+      if (frame.fhandle)
+        XSetWindowBackgroundPixmap(display, frame.handle, frame.fhandle);
+      else
+        XSetWindowBackground(display, frame.handle, frame.fhandle_pixel);
+
+      if (frame.fgrip) {
+        XSetWindowBackgroundPixmap(display, frame.right_grip, frame.fgrip);
+        XSetWindowBackgroundPixmap(display, frame.left_grip, frame.fgrip);
+      } else {
+        XSetWindowBackground(display, frame.right_grip, frame.fgrip_pixel);
+        XSetWindowBackground(display, frame.left_grip, frame.fgrip_pixel);
+      }
+    } else {
+      if (frame.uhandle)
+        XSetWindowBackgroundPixmap(display, frame.handle, frame.uhandle);
+      else
+        XSetWindowBackground(display, frame.handle, frame.uhandle_pixel);
+
+      if (frame.ugrip) {
+        XSetWindowBackgroundPixmap(display, frame.right_grip, frame.ugrip);
+        XSetWindowBackgroundPixmap(display, frame.left_grip, frame.ugrip);
+      } else {
+        XSetWindowBackground(display, frame.right_grip, frame.ugrip_pixel);
+        XSetWindowBackground(display, frame.left_grip, frame.ugrip_pixel);
+      }
+    }
+    XClearWindow(display, frame.handle);
+    XClearWindow(display, frame.right_grip);
+    XClearWindow(display, frame.left_grip);
+  }
+
+  if (decorations.border) {
+    if (flags.focused)
+      XSetWindowBorder(display, frame.plate, frame.fborder_pixel);
+    else
+      XSetWindowBorder(display, frame.plate, frame.uborder_pixel);
+  }
+
+  if (screen->isSloppyFocus() && screen->doAutoRaise() && timer->isTiming())
+    timer->stop();
+}
+
+
+void OpenboxWindow::installColormap(Bool install) {
+  openbox->grab();
+  if (! validateClient()) return;
+
+  int i = 0, ncmap = 0;
+  Colormap *cmaps = XListInstalledColormaps(display, client.window, &ncmap);
+  XWindowAttributes wattrib;
+  if (cmaps) {
+    if (XGetWindowAttributes(display, client.window, &wattrib)) {
+      if (install) {
+	// install the window's colormap
+	for (i = 0; i < ncmap; i++) {
+	  if (*(cmaps + i) == wattrib.colormap)
+	    // this window is using an installed color map... do not install
+	    install = False;
+	}
+	// otherwise, install the window's colormap
+	if (install)
+	  XInstallColormap(display, wattrib.colormap);
+      } else {
+	// uninstall the window's colormap
+	for (i = 0; i < ncmap; i++) {
+	  if (*(cmaps + i) == wattrib.colormap)
+	    // we found the colormap to uninstall
+	    XUninstallColormap(display, wattrib.colormap);
+	}
+      }
+    }
+
+    XFree(cmaps);
+  }
+
+  openbox->ungrab();
+}
+
+
+void OpenboxWindow::setState(unsigned long new_state) {
+  current_state = new_state;
+
+  unsigned long state[2];
+  state[0] = (unsigned long) current_state;
+  state[1] = (unsigned long) None;
+  XChangeProperty(display, client.window, openbox->getWMStateAtom(),
+		  openbox->getWMStateAtom(), 32, PropModeReplace,
+		  (unsigned char *) state, 2);
+
+  XChangeProperty(display, client.window,
+		  openbox->getOpenboxAttributesAtom(),
+                  openbox->getOpenboxAttributesAtom(), 32, PropModeReplace,
+                  (unsigned char *) &openbox_attrib,
+		  PropOpenboxAttributesElements);
+}
+
+
+Bool OpenboxWindow::getState(void) {
+  current_state = 0;
+
+  Atom atom_return;
+  Bool ret = False;
+  int foo;
+  unsigned long *state, ulfoo, nitems;
+
+  if ((XGetWindowProperty(display, client.window, openbox->getWMStateAtom(),
+			  0l, 2l, False, openbox->getWMStateAtom(),
+			  &atom_return, &foo, &nitems, &ulfoo,
+			  (unsigned char **) &state) != Success) ||
+      (! state)) {
+    openbox->ungrab();
+    return False;
+  }
+
+  if (nitems >= 1) {
+    current_state = (unsigned long) state[0];
+
+    ret = True;
+  }
+
+  XFree((void *) state);
+
+  return ret;
+}
+
+
+void OpenboxWindow::setGravityOffsets(void) {
+  // x coordinates for each gravity type
+  const int x_west = client.x;
+  const int x_east = client.x + client.width - frame.width;
+  const int x_center = client.x + client.width - frame.width/2;
+  // y coordinates for each gravity type
+  const int y_north = client.y;
+  const int y_south = client.y + client.height - frame.height;
+  const int y_center = client.y + client.height - frame.height/2;
+
+  switch (client.win_gravity) {
+  case NorthWestGravity:
+  default:
+    frame.x = x_west;
+    frame.y = y_north;
+    break;
+  case NorthGravity:
+    frame.x = x_center;
+    frame.y = y_north;
+    break;
+  case NorthEastGravity:
+    frame.x = x_east;
+    frame.y = y_north;
+    break;
+  case SouthWestGravity:
+    frame.x = x_west;
+    frame.y = y_south;
+    break;
+  case SouthGravity:
+    frame.x = x_center;
+    frame.y = y_south;
+    break;
+  case SouthEastGravity:
+    frame.x = x_east;
+    frame.y = y_south;
+    break;
+  case WestGravity:
+    frame.x = x_west;
+    frame.y = y_center;
+    break;
+  case EastGravity:
+    frame.x = x_east;
+    frame.y = y_center;
+    break;
+  case CenterGravity:
+    frame.x = x_center;
+    frame.y = y_center;
+    break;
+  case ForgetGravity:
+  case StaticGravity:
+    frame.x = client.x - frame.mwm_border_w + frame.border_w;
+    frame.y = client.y - frame.y_border - frame.mwm_border_w - frame.border_w;
+    break;
+  }
+}
+
+
+void OpenboxWindow::restoreAttributes(void) {
+  if (! getState()) current_state = NormalState;
+
+  Atom atom_return;
+  int foo;
+  unsigned long ulfoo, nitems;
+
+  OpenboxAttributes *net;
+  int ret = XGetWindowProperty(display, client.window,
+			       openbox->getOpenboxAttributesAtom(), 0l,
+			       PropOpenboxAttributesElements, False,
+			       openbox->getOpenboxAttributesAtom(),
+			       &atom_return, &foo, &nitems, &ulfoo,
+			       (unsigned char **) &net);
+  if (ret != Success || !net || nitems != PropOpenboxAttributesElements)
+    return;
+
+  openbox_attrib.flags = net->flags;
+  openbox_attrib.attrib = net->attrib;
+  openbox_attrib.decoration = net->decoration;
+  openbox_attrib.workspace = net->workspace;
+  openbox_attrib.stack = net->stack;
+  openbox_attrib.premax_x = net->premax_x;
+  openbox_attrib.premax_y = net->premax_y;
+  openbox_attrib.premax_w = net->premax_w;
+  openbox_attrib.premax_h = net->premax_h;
+
+  XFree((void *) net);
+
+  if (openbox_attrib.flags & AttribShaded &&
+      openbox_attrib.attrib & AttribShaded) {
+    int save_state =
+      ((current_state == IconicState) ? NormalState : current_state);
+
+    flags.shaded = False;
+    shade();
+
+    current_state = save_state;
+  }
+
+  if (((int) openbox_attrib.workspace != screen->getCurrentWorkspaceID()) &&
+      ((int) openbox_attrib.workspace < screen->getCount())) {
+    screen->reassociateWindow(this, openbox_attrib.workspace, True);
+
+    if (current_state == NormalState) current_state = WithdrawnState;
+  } else if (current_state == WithdrawnState) {
+    current_state = NormalState;
+  }
+
+  if (openbox_attrib.flags & AttribOmnipresent &&
+      openbox_attrib.attrib & AttribOmnipresent) {
+    flags.stuck = False;
+    stick();
+
+    current_state = NormalState;
+  }
+
+  if ((openbox_attrib.flags & AttribMaxHoriz) ||
+      (openbox_attrib.flags & AttribMaxVert)) {
+    int x = openbox_attrib.premax_x, y = openbox_attrib.premax_y;
+    unsigned int w = openbox_attrib.premax_w, h = openbox_attrib.premax_h;
+    flags.maximized = 0;
+
+    unsigned int m = False;
+    if ((openbox_attrib.flags & AttribMaxHoriz) &&
+        (openbox_attrib.flags & AttribMaxVert))
+      m = (openbox_attrib.attrib & (AttribMaxHoriz | AttribMaxVert)) ? 1 : 0;
+    else if (openbox_attrib.flags & AttribMaxVert)
+      m = (openbox_attrib.attrib & AttribMaxVert) ? 2 : 0;
+    else if (openbox_attrib.flags & AttribMaxHoriz)
+      m = (openbox_attrib.attrib & AttribMaxHoriz) ? 3 : 0;
+
+    if (m) maximize(m);
+
+    openbox_attrib.premax_x = x;
+    openbox_attrib.premax_y = y;
+    openbox_attrib.premax_w = w;
+    openbox_attrib.premax_h = h;
+  }
+
+  setState(current_state);
+}
+
+
+/*
+ * The reverse of the setGravityOffsets function. Uses the frame window's
+ * position to find the window's reference point.
+ */
+void OpenboxWindow::restoreGravity(void) {
+  // x coordinates for each gravity type
+  const int x_west = frame.x;
+  const int x_east = frame.x + frame.width - client.width;
+  const int x_center = frame.x + (frame.width/2) - client.width;
+  // y coordinates for each gravity type
+  const int y_north = frame.y;
+  const int y_south = frame.y + frame.height - client.height;
+  const int y_center = frame.y + (frame.height/2) - client.height;
+
+  switch(client.win_gravity) {
+  default:
+  case NorthWestGravity:
+    client.x = x_west;
+    client.y = y_north;
+    break;
+  case NorthGravity:
+    client.x = x_center;
+    client.y = y_north;
+    break;
+  case NorthEastGravity:
+    client.x = x_east;
+    client.y = y_north;
+    break;
+  case SouthWestGravity:
+    client.x = x_west;
+    client.y = y_south;
+    break;
+  case SouthGravity:
+    client.x = x_center;
+    client.y = y_south;
+    break;
+  case SouthEastGravity:
+    client.x = x_east;
+    client.y = y_south;
+    break;
+  case WestGravity:
+    client.x = x_west;
+    client.y = y_center;
+    break;
+  case EastGravity:
+    client.x = x_east;
+    client.y = y_center;
+    break;
+  case CenterGravity:
+    client.x = x_center;
+    client.y = y_center;
+    break;
+  case ForgetGravity:
+  case StaticGravity:
+    client.x = frame.x + frame.mwm_border_w + frame.border_w;
+    client.y = frame.y + frame.y_border + frame.mwm_border_w +
+      frame.border_w;
+    break;
+  }
+}
+
+
+void OpenboxWindow::redrawLabel(void) {
+  int dx = frame.bevel_w * 2, dlen = client.title_len;
+  unsigned int l = client.title_text_w;
+
+  if (flags.focused) {
+    if (frame.flabel)
+      XSetWindowBackgroundPixmap(display, frame.label, frame.flabel);
+    else
+      XSetWindowBackground(display, frame.label, frame.flabel_pixel);
+  } else {
+    if (frame.ulabel)
+      XSetWindowBackgroundPixmap(display, frame.label, frame.ulabel);
+    else
+      XSetWindowBackground(display, frame.label, frame.ulabel_pixel);
+  }
+  XClearWindow(display, frame.label);
+
+  if (client.title_text_w > frame.label_w) {
+    for (; dlen >= 0; dlen--) {
+      if (i18n->multibyte()) {
+	XRectangle ink, logical;
+	XmbTextExtents(screen->getWindowStyle()->fontset, client.title, dlen,
+		       &ink, &logical);
+	l = logical.width;
+      } else {
+	l = XTextWidth(screen->getWindowStyle()->font, client.title, dlen);
+      }
+      l += (frame.bevel_w * 4);
+
+      if (l < frame.label_w)
+	break;
+    }
+  }
+
+  switch (screen->getWindowStyle()->justify) {
+  case BScreen::RightJustify:
+    dx += frame.label_w - l;
+    break;
+
+  case BScreen::CenterJustify:
+    dx += (frame.label_w - l) / 2;
+    break;
+  }
+
+  WindowStyle *style = screen->getWindowStyle();
+  GC text_gc = (flags.focused) ? style->l_text_focus_gc :
+    style->l_text_unfocus_gc;
+  if (i18n->multibyte())
+    XmbDrawString(display, frame.label, style->fontset, text_gc, dx,
+		  (1 - style->fontset_extents->max_ink_extent.y),
+		  client.title, dlen);
+  else
+    XDrawString(display, frame.label, text_gc, dx,
+		(style->font->ascent + 1), client.title, dlen);
+}
+
+
+void OpenboxWindow::redrawAllButtons(void) {
+  if (frame.iconify_button) redrawIconifyButton(False);
+  if (frame.maximize_button) redrawMaximizeButton(flags.maximized);
+  if (frame.close_button) redrawCloseButton(False);
+}
+
+
+void OpenboxWindow::redrawIconifyButton(Bool pressed) {
+  if (! pressed) {
+    if (flags.focused) {
+      if (frame.fbutton)
+        XSetWindowBackgroundPixmap(display, frame.iconify_button,
+				   frame.fbutton);
+      else
+        XSetWindowBackground(display, frame.iconify_button,
+			     frame.fbutton_pixel);
+    } else {
+      if (frame.ubutton)
+        XSetWindowBackgroundPixmap(display, frame.iconify_button,
+				   frame.ubutton);
+      else
+        XSetWindowBackground(display, frame.iconify_button,
+			     frame.ubutton_pixel);
+    }
+  } else {
+    if (frame.pbutton)
+      XSetWindowBackgroundPixmap(display, frame.iconify_button, frame.pbutton);
+    else
+      XSetWindowBackground(display, frame.iconify_button, frame.pbutton_pixel);
+  }
+  XClearWindow(display, frame.iconify_button);
+
+  XDrawRectangle(display, frame.iconify_button,
+		 ((flags.focused) ? screen->getWindowStyle()->b_pic_focus_gc :
+		  screen->getWindowStyle()->b_pic_unfocus_gc),
+		 2, (frame.button_h - 5), (frame.button_w - 5), 2);
+}
+
+
+void OpenboxWindow::redrawMaximizeButton(Bool pressed) {
+  if (! pressed) {
+    if (flags.focused) {
+      if (frame.fbutton)
+        XSetWindowBackgroundPixmap(display, frame.maximize_button,
+				   frame.fbutton);
+      else
+        XSetWindowBackground(display, frame.maximize_button,
+			     frame.fbutton_pixel);
+    } else {
+      if (frame.ubutton)
+        XSetWindowBackgroundPixmap(display, frame.maximize_button,
+				   frame.ubutton);
+      else
+        XSetWindowBackground(display, frame.maximize_button,
+			     frame.ubutton_pixel);
+    }
+  } else {
+    if (frame.pbutton)
+      XSetWindowBackgroundPixmap(display, frame.maximize_button,
+				 frame.pbutton);
+    else
+      XSetWindowBackground(display, frame.maximize_button,
+			   frame.pbutton_pixel);
+  }
+  XClearWindow(display, frame.maximize_button);
+
+  XDrawRectangle(display, frame.maximize_button,
+		 ((flags.focused) ? screen->getWindowStyle()->b_pic_focus_gc :
+		  screen->getWindowStyle()->b_pic_unfocus_gc),
+		 2, 2, (frame.button_w - 5), (frame.button_h - 5));
+  XDrawLine(display, frame.maximize_button,
+	    ((flags.focused) ? screen->getWindowStyle()->b_pic_focus_gc :
+	     screen->getWindowStyle()->b_pic_unfocus_gc),
+	    2, 3, (frame.button_w - 3), 3);
+}
+
+
+void OpenboxWindow::redrawCloseButton(Bool pressed) {
+  if (! pressed) {
+    if (flags.focused) {
+      if (frame.fbutton)
+        XSetWindowBackgroundPixmap(display, frame.close_button,
+				   frame.fbutton);
+      else
+        XSetWindowBackground(display, frame.close_button,
+			     frame.fbutton_pixel);
+    } else {
+      if (frame.ubutton)
+        XSetWindowBackgroundPixmap(display, frame.close_button,
+				   frame.ubutton);
+      else
+        XSetWindowBackground(display, frame.close_button,
+			     frame.ubutton_pixel);
+    }
+  } else {
+    if (frame.pbutton)
+      XSetWindowBackgroundPixmap(display, frame.close_button, frame.pbutton);
+    else
+      XSetWindowBackground(display, frame.close_button, frame.pbutton_pixel);
+  }
+  XClearWindow(display, frame.close_button);
+
+  XDrawLine(display, frame.close_button,
+	    ((flags.focused) ? screen->getWindowStyle()->b_pic_focus_gc :
+	     screen->getWindowStyle()->b_pic_unfocus_gc), 2, 2,
+            (frame.button_w - 3), (frame.button_h - 3));
+  XDrawLine(display, frame.close_button,
+	    ((flags.focused) ? screen->getWindowStyle()->b_pic_focus_gc :
+	     screen->getWindowStyle()->b_pic_unfocus_gc), 2,
+	    (frame.button_h - 3),
+            (frame.button_w - 3), 2);
+}
+
+
+void OpenboxWindow::mapRequestEvent(XMapRequestEvent *re) {
+  if (re->window == client.window) {
+#ifdef    DEBUG
+    fprintf(stderr, i18n->getMessage(WindowSet, WindowMapRequest,
+			     "OpenboxWindow::mapRequestEvent() for 0x%lx\n"),
+            client.window);
+#endif // DEBUG
+
+    openbox->grab();
+    if (! validateClient()) return;
+
+    Bool get_state_ret = getState();
+    if (! (get_state_ret && openbox->isStartup())) {
+      if ((client.wm_hint_flags & StateHint) &&
+          (! (current_state == NormalState || current_state == IconicState)))
+        current_state = client.initial_state;
+      else
+        current_state = NormalState;
+    } else if (flags.iconic) {
+      current_state = NormalState;
+    }
+
+    switch (current_state) {
+    case IconicState:
+      iconify();
+      break;
+
+    case WithdrawnState:
+      withdraw();
+      break;
+
+    case NormalState:
+    case InactiveState:
+    case ZoomState:
+    default:
+      deiconify(False);
+      break;
+    }
+
+    openbox->ungrab();
+  }
+}
+
+
+void OpenboxWindow::mapNotifyEvent(XMapEvent *ne) {
+  if ((ne->window == client.window) && (! ne->override_redirect)
+      && (flags.visible)) {
+    openbox->grab();
+    if (! validateClient()) return;
+
+    if (decorations.titlebar) positionButtons();
+
+    setState(NormalState);
+
+    redrawAllButtons();
+
+    if (flags.transient || screen->doFocusNew())
+      setInputFocus();
+    else
+      setFocusFlag(False);
+
+    flags.visible = True;
+    flags.iconic = False;
+
+    openbox->ungrab();
+  }
+}
+
+
+void OpenboxWindow::unmapNotifyEvent(XUnmapEvent *ue) {
+  if (ue->window == client.window) {
+#ifdef    DEBUG
+    fprintf(stderr, i18n->getMessage(WindowSet, WindowUnmapNotify,
+			     "OpenboxWindow::unmapNotifyEvent() for 0x%lx\n"),
+            client.window);
+#endif // DEBUG
+
+    openbox->grab();
+    if (! validateClient()) return;
+
+    XChangeSaveSet(display, client.window, SetModeDelete);
+    XSelectInput(display, client.window, NoEventMask);
+
+    XDeleteProperty(display, client.window, openbox->getWMStateAtom());
+    XDeleteProperty(display, client.window,
+		    openbox->getOpenboxAttributesAtom());
+
+    XUnmapWindow(display, frame.window);
+    XUnmapWindow(display, client.window);
+
+    XEvent dummy;
+    if (! XCheckTypedWindowEvent(display, client.window, ReparentNotify,
+				 &dummy)) {
+#ifdef    DEBUG
+      fprintf(stderr, i18n->getMessage(WindowSet, WindowUnmapNotifyReparent,
+		       "OpenboxWindow::unmapNotifyEvent(): reparent 0x%lx to "
+		       "root.\n"), client.window);
+#endif // DEBUG
+
+      restoreGravity();
+      XReparentWindow(display, client.window, screen->getRootWindow(),
+		      client.x, client.y);
+    }
+
+    XFlush(display);
+
+    openbox->ungrab();
+
+    delete this;
+  }
+}
+
+
+void OpenboxWindow::destroyNotifyEvent(XDestroyWindowEvent *de) {
+  if (de->window == client.window) {
+    XUnmapWindow(display, frame.window);
+
+    delete this;
+  }
+}
+
+
+void OpenboxWindow::propertyNotifyEvent(Atom atom) {
+  openbox->grab();
+  if (! validateClient()) return;
+
+  switch(atom) {
+  case XA_WM_CLASS:
+  case XA_WM_CLIENT_MACHINE:
+  case XA_WM_COMMAND:
+    break;
+
+  case XA_WM_TRANSIENT_FOR:
+    // determine if this is a transient window
+    Window win;
+    if (XGetTransientForHint(display, client.window, &win)) {
+      if (win && (win != client.window)) {
+        if ((client.transient_for = openbox->searchWindow(win))) {
+          client.transient_for->client.transient = this;
+          flags.stuck = client.transient_for->flags.stuck;
+          flags.transient = True;
+        } else if (win == client.window_group) {
+	  //jr This doesn't look quite right...
+          if ((client.transient_for = openbox->searchGroup(win, this))) {
+            client.transient_for->client.transient = this;
+            flags.stuck = client.transient_for->flags.stuck;
+            flags.transient = True;
+          }
+        }
+      }
+
+      if (win == screen->getRootWindow()) flags.modal = True;
+    }
+
+    // adjust the window decorations based on transience
+    if (flags.transient)
+      decorations.maximize = decorations.handle = functions.maximize = False;
+
+    reconfigure();
+
+    break;
+
+  case XA_WM_HINTS:
+    getWMHints();
+    break;
+
+  case XA_WM_ICON_NAME:
+    getWMIconName();
+    if (flags.iconic) screen->iconUpdate();
+    break;
+
+  case XA_WM_NAME:
+    getWMName();
+
+    if (decorations.titlebar)
+      redrawLabel();
+
+    if (! flags.iconic)
+      screen->getWorkspace(workspace_number)->update();
+
+    break;
+
+  case XA_WM_NORMAL_HINTS: {
+    getWMNormalHints();
+
+    if ((client.normal_hint_flags & PMinSize) &&
+        (client.normal_hint_flags & PMaxSize)) {
+      if (client.max_width <= client.min_width &&
+          client.max_height <= client.min_height)
+        decorations.maximize = decorations.handle =
+	    functions.resize = functions.maximize = False;
+      else
+        decorations.maximize = decorations.handle =
+	    functions.resize = functions.maximize = True;
+    }
+
+    int x = frame.x, y = frame.y;
+    unsigned int w = frame.width, h = frame.height;
+
+    upsize();
+
+    if ((x != frame.x) || (y != frame.y) ||
+        (w != frame.width) || (h != frame.height))
+      reconfigure();
+
+    break;
+  }
+
+  default:
+    if (atom == openbox->getWMProtocolsAtom()) {
+      getWMProtocols();
+
+      if (decorations.close && (! frame.close_button)) {
+        createCloseButton();
+        if (decorations.titlebar) positionButtons(True);
+        if (windowmenu) windowmenu->reconfigure();
+      }
+    }
+
+    break;
+  }
+
+  openbox->ungrab();
+}
+
+
+void OpenboxWindow::exposeEvent(XExposeEvent *ee) {
+  if (frame.label == ee->window && decorations.titlebar)
+    redrawLabel();
+  else if (frame.close_button == ee->window)
+    redrawCloseButton(False);
+  else if (frame.maximize_button == ee->window)
+    redrawMaximizeButton(flags.maximized);
+  else if (frame.iconify_button == ee->window)
+    redrawIconifyButton(False);
+}
+
+
+void OpenboxWindow::configureRequestEvent(XConfigureRequestEvent *cr) {
+  if (cr->window == client.window) {
+    openbox->grab();
+    if (! validateClient()) return;
+
+    int cx = frame.x, cy = frame.y;
+    unsigned int cw = frame.width, ch = frame.height;
+
+    if (cr->value_mask & CWBorderWidth)
+      client.old_bw = cr->border_width;
+
+    if (cr->value_mask & CWX)
+      cx = cr->x - frame.mwm_border_w - frame.border_w;
+
+    if (cr->value_mask & CWY)
+      cy = cr->y - frame.y_border - frame.mwm_border_w -
+        frame.border_w;
+
+    if (cr->value_mask & CWWidth)
+      cw = cr->width + (frame.mwm_border_w * 2);
+
+    if (cr->value_mask & CWHeight)
+      ch = cr->height + frame.y_border + (frame.mwm_border_w * 2) +
+        (frame.border_w * decorations.handle) + frame.handle_h;
+
+    if (frame.x != cx || frame.y != cy ||
+        frame.width != cw || frame.height != ch)
+      configure(cx, cy, cw, ch);
+
+    if (cr->value_mask & CWStackMode) {
+      switch (cr->detail) {
+      case Above:
+      case TopIf:
+      default:
+	if (flags.iconic) deiconify();
+	screen->getWorkspace(workspace_number)->raiseWindow(this);
+	break;
+
+      case Below:
+      case BottomIf:
+	if (flags.iconic) deiconify();
+	screen->getWorkspace(workspace_number)->lowerWindow(this);
+	break;
+      }
+    }
+
+    openbox->ungrab();
+  }
+}
+
+
+void OpenboxWindow::buttonPressEvent(XButtonEvent *be) {
+  openbox->grab();
+  if (! validateClient())
+    return;
+
+  int stack_change = 1; // < 0 means to lower the window
+                        // > 0 means to raise the window
+                        // 0 means to leave it where it is
+  
+  // alt + left/right click begins interactively moving/resizing the window
+  // when the mouse is moved
+  if (be->state == Mod1Mask && (be->button == 1 || be->button == 3)) {
+    frame.grab_x = be->x_root - frame.x - frame.border_w;
+    frame.grab_y = be->y_root - frame.y - frame.border_w;
+    if (be->button == 3) {
+      if (screen->getWindowZones() == 4 &&
+          be->y < (signed) frame.height / 2) {
+        resize_zone = ZoneTop;
+      } else {
+        resize_zone = ZoneBottom;
+      }
+      if (screen->getWindowZones() >= 2 &&
+          be->x < (signed) frame.width / 2) {
+        resize_zone |= ZoneLeft;
+      } else {
+        resize_zone |= ZoneRight;
+      }
+    }
+  // control + left click on the titlebar shades the window
+  } else if (be->state == ControlMask && be->button == 1) {
+    if (be->window == frame.title ||
+        be->window == frame.label)
+      shade();
+  // left click
+  } else if (be->state == 0 && be->button == 1) {
+    if (windowmenu && windowmenu->isVisible())
+        windowmenu->hide();
+
+    if (be->window == frame.maximize_button) {
+      redrawMaximizeButton(True);
+    } else if (be->window == frame.iconify_button) {
+      redrawIconifyButton(True);
+    } else if (be->window == frame.close_button) {
+      redrawCloseButton(True);
+    } else if (be->window == frame.plate) {
+      XAllowEvents(display, ReplayPointer, be->time);
+    } else if (be->window == frame.title ||
+               be->window == frame.label) {
+      // shade the window when the titlebar is double clicked
+      if ( (be->time - lastButtonPressTime) <=
+            openbox->getDoubleClickInterval()) {
+        lastButtonPressTime = 0;
+        shade();
+      } else {
+        lastButtonPressTime = be->time;
+      }
+      // clicking and dragging on the titlebar moves the window, so on a click
+      // we need to save the coords of the click in case the user drags
+      frame.grab_x = be->x_root - frame.x - frame.border_w;
+      frame.grab_y = be->y_root - frame.y - frame.border_w;
+    } else if (be->window == frame.handle ||
+               be->window == frame.left_grip ||
+               be->window == frame.right_grip ||
+               be->window == frame.window) {
+      // clicking and dragging on the window's frame moves the window, so on a
+      // click we need to save the coords of the click in case the user drags
+      frame.grab_x = be->x_root - frame.x - frame.border_w;
+      frame.grab_y = be->y_root - frame.y - frame.border_w;
+      if (be->window == frame.left_grip)
+        resize_zone = ZoneBottom | ZoneLeft;
+      else if (be->window == frame.right_grip)
+        resize_zone = ZoneBottom | ZoneRight;
+    }
+  // middle click
+  } else if (be->state == 0 && be->button == 2) {
+    if (be->window == frame.maximize_button) {
+      redrawMaximizeButton(True);
+    // a middle click anywhere on the window's frame except for on the buttons
+    // will lower the window
+    } else if (! (be->window == frame.iconify_button ||
+                  be->window == frame.close_button) ) {
+      stack_change = -1;
+    }
+  // right click
+  } else if (be->state == 0 && be->button == 3) {
+    if (be->window == frame.maximize_button) {
+      redrawMaximizeButton(True);
+    // a right click on the window's frame will show or hide the window's
+    // windowmenu
+    } else if (be->window == frame.title ||
+               be->window == frame.label ||
+               be->window == frame.handle ||
+               be->window == frame.window) {
+      int mx, my;
+      if (windowmenu) {
+        if (windowmenu->isVisible()) {
+          windowmenu->hide();
+        } else {
+          // get the coords for the menu
+          mx = be->x_root - windowmenu->getWidth() / 2;
+          if (be->window == frame.title || be->window == frame.label) {
+            my = frame.y + frame.title_h;
+          } else if (be->window = frame.handle) {
+            my = frame.y + frame.y_handle - windowmenu->getHeight();
+          } else { // (be->window == frame.window)
+            if (be->y <= (signed) frame.bevel_w) {
+              my = frame.y + frame.y_border;
+            } else {
+              my = be->y_root - (windowmenu->getHeight() / 2);
+            }
+          }
+
+          if (mx > (signed) (frame.x + frame.width -
+              windowmenu->getWidth())) {
+            mx = frame.x + frame.width - windowmenu->getWidth();
+          } else if (mx < frame.x) {
+            mx = frame.x;
+          }
+
+          if (my > (signed) (frame.y + frame.y_handle -
+                windowmenu->getHeight())) {
+            my = frame.y + frame.y_handle - windowmenu->getHeight();
+          } else if (my < (signed) (frame.y +
+              ((decorations.titlebar) ? frame.title_h : frame.y_border))) {
+            my = frame.y +
+              ((decorations.titlebar) ? frame.title_h : frame.y_border);
+          }
+
+          windowmenu->move(mx, my);
+          windowmenu->show();
+          XRaiseWindow(display, windowmenu->getWindowID());
+          XRaiseWindow(display, windowmenu->getSendToMenu()->getWindowID());
+          stack_change = 0;  // dont raise the window overtop of the menu
+        }
+      }
+    }
+  // mouse wheel up
+  } else if (be->state == 0 && be->button == 4) {
+    if ((be->window == frame.label ||
+        be->window == frame.title) &&
+        !flags.shaded)
+      shade();
+  // mouse wheel down
+  } else if (be->state == 0 && be->button == 5) {
+    if ((be->window == frame.label ||
+        be->window == frame.title) &&
+        flags.shaded)
+      shade();
+  }
+
+  if (! (flags.focused || screen->isSloppyFocus()) ) {
+    setInputFocus();  // any click focus' the window in 'click to focus'
+  }
+  if (stack_change < 0) {
+    screen->getWorkspace(workspace_number)->lowerWindow(this);
+  } else if (stack_change > 0) {
+    screen->getWorkspace(workspace_number)->raiseWindow(this);
+  }
+ 
+  openbox->ungrab();
+}
+
+
+void OpenboxWindow::buttonReleaseEvent(XButtonEvent *re) {
+  openbox->grab();
+  if (! validateClient())
+    return;
+
+  // alt + middle button released
+  if (re->state == (Mod1Mask & Button2Mask) && re->button == 2) {
+    if (re->window == frame.window) {
+      XUngrabPointer(display, CurrentTime); // why? i dont know
+    }
+  // left button released
+  } else if (re->button == 1) {
+    if (re->window == frame.maximize_button) {
+      if (re->state == Button1Mask && // only the left button was depressed
+          (re->x >= 0) && ((unsigned) re->x <= frame.button_w) &&
+          (re->y >= 0) && ((unsigned) re->y <= frame.button_h)) {
+        maximize(re->button);
+      } else {
+        redrawMaximizeButton(False);
+      }
+    } else if (re->window == frame.iconify_button) {
+      if (re->state == Button1Mask && // only the left button was depressed
+          (re->x >= 0) && ((unsigned) re->x <= frame.button_w) &&
+          (re->y >= 0) && ((unsigned) re->y <= frame.button_h)) {
+        iconify();
+      } else {
+        redrawIconifyButton(False);
+      }
+    } else if (re->window == frame.close_button) {
+      if (re->state == Button1Mask && // only the left button was depressed
+          (re->x >= 0) && ((unsigned) re->x <= frame.button_w) &&
+          (re->y >= 0) && ((unsigned) re->y <= frame.button_h)) {
+          close();
+      } else {
+        redrawCloseButton(False);
+      }
+    }
+  // middle button released
+  } else if (re->button == 2) {
+    if (re->window == frame.maximize_button) {
+      if (re->state == Button2Mask && // only the middle button was depressed
+          (re->x >= 0) && ((unsigned) re->x <= frame.button_w) &&
+          (re->y >= 0) && ((unsigned) re->y <= frame.button_h)) {
+        maximize(re->button);
+      } else {
+        redrawMaximizeButton(False);
+      }
+    }
+  // right button released
+  } else if (re->button == 3) {
+    if (re->window == frame.maximize_button) {
+      if (re->state == Button3Mask && // only the right button was depressed
+          (re->x >= 0) && ((unsigned) re->x <= frame.button_w) &&
+          (re->y >= 0) && ((unsigned) re->y <= frame.button_h)) {
+        maximize(re->button);
+      } else {
+        redrawMaximizeButton(False);
+      }
+    }
+  }
+  
+  // when the window is being interactively moved, a button release stops the
+  // move where it is
+  if (flags.moving) {
+    flags.moving = False;
+
+    openbox->maskWindowEvents(0, (OpenboxWindow *) 0);
+    if (!screen->doOpaqueMove()) {
+      XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
+                     frame.move_x, frame.move_y, frame.resize_w - 1,
+                     frame.resize_h - 1);
+
+      configure(frame.move_x, frame.move_y, frame.width, frame.height);
+      openbox->ungrab();
+    } else {
+      configure(frame.x, frame.y, frame.width, frame.height);
+    }
+    screen->hideGeometry();
+    XUngrabPointer(display, CurrentTime);
+  // when the window is being interactively resized, a button release stops the
+  // resizing
+  } else if (flags.resizing) {
+    flags.resizing = False;
+    XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
+                   frame.resize_x, frame.resize_y,
+                   frame.resize_w - 1, frame.resize_h - 1);
+    screen->hideGeometry();
+    if (resize_zone & ZoneLeft) {
+      left_fixsize();
+    } else {  // when resizing with "Alt+Button3", the resize is the same as if
+              // done with the right grip (the right side of the window is what
+              // moves)
+      right_fixsize();
+    }
+    // unset maximized state when resized after fully maximized
+    if (flags.maximized == 1) {
+        maximize(0);
+    }
+    configure(frame.resize_x, frame.resize_y,
+              frame.resize_w - (frame.border_w * 2),
+              frame.resize_h - (frame.border_w * 2));
+    openbox->ungrab();
+    XUngrabPointer(display, CurrentTime);
+    resize_zone = 0;
+  }
+
+  openbox->ungrab();
+}
+
+
+void OpenboxWindow::motionNotifyEvent(XMotionEvent *me) {
+  if (!flags.resizing && (me->state & Button1Mask) && functions.move &&
+      (frame.title == me->window || frame.label == me->window ||
+       frame.handle == me->window || frame.window == me->window)) {
+    if (! flags.moving) {
+      XGrabPointer(display, me->window, False, Button1MotionMask |
+                   ButtonReleaseMask, GrabModeAsync, GrabModeAsync,
+                   None, openbox->getMoveCursor(), CurrentTime);
+
+      if (windowmenu && windowmenu->isVisible())
+        windowmenu->hide();
+
+      flags.moving = True;
+
+      openbox->maskWindowEvents(client.window, this);
+
+      if (! screen->doOpaqueMove()) {
+        openbox->grab();
+
+        frame.move_x = frame.x;
+	frame.move_y = frame.y;
+        frame.resize_w = frame.width + (frame.border_w * 2);
+        frame.resize_h = ((flags.shaded) ? frame.title_h : frame.height) +
+          (frame.border_w * 2);
+
+	screen->showPosition(frame.x, frame.y);
+
+	XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
+		       frame.move_x, frame.move_y,
+		       frame.resize_w - 1, frame.resize_h - 1);
+      }
+    } else {
+      int dx = me->x_root - frame.grab_x, dy = me->y_root - frame.grab_y;
+
+      dx -= frame.border_w;
+      dy -= frame.border_w;
+
+      int snap_distance = screen->getEdgeSnapThreshold();
+      if (snap_distance) {
+        int drx = screen->getWidth() - (dx + frame.snap_w);
+
+        if (dx < drx && (dx > 0 && dx < snap_distance) ||
+                        (dx < 0 && dx > -snap_distance) )
+          dx = 0;
+        else if ( (drx > 0 && drx < snap_distance) ||
+                  (drx < 0 && drx > -snap_distance) )
+          dx = screen->getWidth() - frame.snap_w;
+
+        int dtty, dbby, dty, dby;
+        switch (screen->getToolbarPlacement()) {
+        case Toolbar::TopLeft:
+        case Toolbar::TopCenter:
+        case Toolbar::TopRight:
+          dtty = screen->getToolbar()->getExposedHeight() +
+	         frame.border_w;
+          dbby = screen->getHeight();
+          break;
+
+        default:
+          dtty = 0;
+	  dbby = screen->getToolbar()->getY();
+          break;
+        }
+
+        dty = dy - dtty;
+        dby = dbby - (dy + frame.snap_h);
+
+        if ( (dy > 0 && dty < snap_distance) ||
+            (dy < 0 && dty > -snap_distance) )
+          dy = dtty;
+        else if ( (dby > 0 && dby < snap_distance) ||
+                 (dby < 0 && dby > -snap_distance) )
+          dy = dbby - frame.snap_h;
+      }
+
+      if (screen->doOpaqueMove()) {
+	configure(dx, dy, frame.width, frame.height);
+      } else {
+	XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
+		       frame.move_x, frame.move_y, frame.resize_w - 1,
+		       frame.resize_h - 1);
+
+	frame.move_x = dx;
+	frame.move_y = dy;
+
+	XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
+		       frame.move_x, frame.move_y, frame.resize_w - 1,
+		       frame.resize_h - 1);
+      }
+
+      screen->showPosition(dx, dy);
+    }
+  } else if (functions.resize &&
+	     (((me->state & Button1Mask) && (me->window == frame.right_grip ||
+					     me->window == frame.left_grip)) ||
+	      (me->state & (Mod1Mask | Button3Mask) &&
+	                                     me->window == frame.window))) {
+    Bool left = resize_zone & ZoneLeft;
+
+    if (! flags.resizing) {
+      Cursor cursor;
+      if (resize_zone & ZoneTop)
+        cursor = (resize_zone & ZoneLeft) ?
+          openbox->getUpperLeftAngleCursor() :
+          openbox->getUpperRightAngleCursor();
+      else
+        cursor = (resize_zone & ZoneLeft) ?
+          openbox->getLowerLeftAngleCursor() :
+          openbox->getLowerRightAngleCursor();
+      XGrabPointer(display, me->window, False, ButtonMotionMask |
+                   ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None,
+                   cursor, CurrentTime);
+
+      flags.resizing = True;
+
+      openbox->grab();
+
+      int gx, gy;
+      if (resize_zone & ZoneRight)
+        frame.grab_x = me->x - screen->getBorderWidth();
+      else
+        frame.grab_x = me->x + screen->getBorderWidth();
+      if (resize_zone & ZoneTop)
+        frame.grab_y = me->y + screen->getBorderWidth() * 2;
+      else
+        frame.grab_y = me->y - screen->getBorderWidth() * 2;
+      frame.resize_x = frame.x;
+      frame.resize_y = frame.y;
+      frame.resize_w = frame.width + (frame.border_w * 2);
+      frame.resize_h = frame.height + (frame.border_w * 2);
+
+      if (left)
+        left_fixsize(&gx, &gy);
+      else
+	right_fixsize(&gx, &gy);
+
+      screen->showGeometry(gx, gy);
+
+      XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
+		     frame.resize_x, frame.resize_y,
+		     frame.resize_w - 1, frame.resize_h - 1);
+    } else {
+      XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
+		     frame.resize_x, frame.resize_y,
+		     frame.resize_w - 1, frame.resize_h - 1);
+
+      int gx, gy;
+
+      if (resize_zone & ZoneTop)
+        frame.resize_h = frame.height - (me->y - frame.grab_y);
+      else
+        frame.resize_h = frame.height + (me->y - frame.grab_y);
+      if (frame.resize_h < 1) frame.resize_h = 1;
+
+      if (left) {
+        frame.resize_x = me->x_root - frame.grab_x;
+        if (frame.resize_x > (signed) (frame.x + frame.width))
+          frame.resize_x = frame.resize_x + frame.width - 1;
+
+        left_fixsize(&gx, &gy);
+      } else {
+	frame.resize_w = frame.width + (me->x - frame.grab_x);
+	if (frame.resize_w < 1) frame.resize_w = 1;
+
+	right_fixsize(&gx, &gy);
+      }
+
+      XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
+		     frame.resize_x, frame.resize_y,
+		     frame.resize_w - 1, frame.resize_h - 1);
+
+      screen->showGeometry(gx, gy);
+    }
+  }
+}
+
+
+#ifdef    SHAPE
+void OpenboxWindow::shapeEvent(XShapeEvent *) {
+  if (openbox->hasShapeExtensions()) {
+    if (flags.shaped) {
+      openbox->grab();
+      if (! validateClient()) return;
+      XShapeCombineShape(display, frame.window, ShapeBounding,
+			 frame.mwm_border_w, frame.y_border +
+			 frame.mwm_border_w, client.window,
+			 ShapeBounding, ShapeSet);
+
+      int num = 1;
+      XRectangle xrect[2];
+      xrect[0].x = xrect[0].y = 0;
+      xrect[0].width = frame.width;
+      xrect[0].height = frame.y_border;
+
+      if (decorations.handle) {
+	xrect[1].x = 0;
+	xrect[1].y = frame.y_handle;
+	xrect[1].width = frame.width;
+	xrect[1].height = frame.handle_h + frame.border_w;
+	num++;
+      }
+
+      XShapeCombineRectangles(display, frame.window, ShapeBounding, 0, 0,
+			      xrect, num, ShapeUnion, Unsorted);
+      openbox->ungrab();
+    }
+  }
+}
+#endif // SHAPE
+
+
+Bool OpenboxWindow::validateClient(void) {
+  XSync(display, False);
+
+  XEvent e;
+  if (XCheckTypedWindowEvent(display, client.window, DestroyNotify, &e) ||
+      XCheckTypedWindowEvent(display, client.window, UnmapNotify, &e)) {
+    XPutBackEvent(display, &e);
+    openbox->ungrab();
+
+    return False;
+  }
+
+  return True;
+}
+
+
+void OpenboxWindow::restore(void) {
+  XChangeSaveSet(display, client.window, SetModeDelete);
+  XSelectInput(display, client.window, NoEventMask);
+
+  restoreGravity();
+
+  XUnmapWindow(display, frame.window);
+  XUnmapWindow(display, client.window);
+
+  XSetWindowBorderWidth(display, client.window, client.old_bw);
+  XReparentWindow(display, client.window, screen->getRootWindow(),
+                  client.x, client.y);
+  XMapWindow(display, client.window);
+
+  XFlush(display);
+}
+
+
+void OpenboxWindow::timeout(void) {
+  screen->getWorkspace(workspace_number)->raiseWindow(this);
+}
+
+
+void OpenboxWindow::changeOpenboxHints(OpenboxHints *net) {
+  if ((net->flags & AttribShaded) &&
+      ((openbox_attrib.attrib & AttribShaded) !=
+       (net->attrib & AttribShaded)))
+    shade();
+
+  if (flags.visible && // watch out for requests when we can not be seen
+      (net->flags & (AttribMaxVert | AttribMaxHoriz)) &&
+      ((openbox_attrib.attrib & (AttribMaxVert | AttribMaxHoriz)) !=
+       (net->attrib & (AttribMaxVert | AttribMaxHoriz)))) {
+    if (flags.maximized) {
+      maximize(0);
+    } else {
+      int button = 0;
+
+      if ((net->flags & AttribMaxHoriz) && (net->flags & AttribMaxVert))
+        button = ((net->attrib & (AttribMaxHoriz | AttribMaxVert)) ?  1 : 0);
+      else if (net->flags & AttribMaxVert)
+        button = ((net->attrib & AttribMaxVert) ? 2 : 0);
+      else if (net->flags & AttribMaxHoriz)
+        button = ((net->attrib & AttribMaxHoriz) ? 3 : 0);
+
+      maximize(button);
+    }
+  }
+
+  if ((net->flags & AttribOmnipresent) &&
+      ((openbox_attrib.attrib & AttribOmnipresent) !=
+       (net->attrib & AttribOmnipresent)))
+    stick();
+
+  if ((net->flags & AttribWorkspace) &&
+      (workspace_number != (signed) net->workspace)) {
+    screen->reassociateWindow(this, net->workspace, True);
+
+    if (screen->getCurrentWorkspaceID() != (signed) net->workspace) withdraw();
+    else deiconify();
+  }
+
+  if (net->flags & AttribDecoration) {
+    switch (net->decoration) {
+    case DecorNone:
+      decorations.titlebar = decorations.border = decorations.handle =
+       decorations.iconify = decorations.maximize = decorations.menu = False;
+
+      break;
+
+    default:
+    case DecorNormal:
+      decorations.titlebar = decorations.border = decorations.handle =
+       decorations.iconify = decorations.maximize = decorations.menu = True;
+
+      break;
+
+    case DecorTiny:
+      decorations.titlebar = decorations.iconify = decorations.menu = True;
+      decorations.border = decorations.handle = decorations.maximize = False;
+ 
+      break;
+
+    case DecorTool:
+      decorations.titlebar = decorations.menu = functions.move = True;
+      decorations.iconify = decorations.border = decorations.handle =
+	decorations.maximize = False;
+
+      break;
+    }
+    if (frame.window) {
+      XMapSubwindows(display, frame.window);
+      XMapWindow(display, frame.window);
+    }
+
+    reconfigure();
+    setState(current_state);
+  }
+}
+
+
+/*
+ * Set the sizes of all components of the window frame
+ * (the window decorations).
+ * These values are based upon the current style settings and the client
+ * window's dimentions.
+ */
+void OpenboxWindow::upsize(void) {
+  frame.bevel_w = screen->getBevelWidth();
+
+  if (decorations.border) {
+    frame.border_w = screen->getBorderWidth();
+    if (!flags.transient)
+      frame.mwm_border_w = screen->getFrameWidth();
+    else
+      frame.mwm_border_w = 0;
+  } else {
+    frame.mwm_border_w = frame.border_w = 0;
+  }
+
+  if (decorations.titlebar) {
+    // the height of the titlebar is based upon the height of the font being
+    // used to display the window's title
+    WindowStyle *style = screen->getWindowStyle();
+    if (i18n->multibyte())
+      frame.title_h = (style->fontset_extents->max_ink_extent.height +
+		       (frame.bevel_w * 2) + 2);
+    else
+      frame.title_h = (style->font->ascent + style->font->descent +
+		       (frame.bevel_w * 2) + 2);
+
+    frame.label_h = frame.title_h - (frame.bevel_w * 2);
+    frame.button_w = frame.button_h = (frame.label_h - 2);
+    frame.y_border = frame.title_h + frame.border_w;
+  } else {
+    frame.title_h = 0;
+    frame.label_h = 0;
+    frame.button_w = frame.button_h = 0;
+    frame.y_border = 0;
+  }
+
+  frame.border_h = client.height + frame.mwm_border_w * 2;
+
+  if (decorations.handle) {
+    frame.y_handle = frame.y_border + frame.border_h + frame.border_w;
+    frame.grip_w = frame.button_w * 2;
+    frame.grip_h = frame.handle_h = screen->getHandleWidth();
+  } else {
+    frame.y_handle = frame.y_border + frame.border_h;
+    frame.handle_h = 0;
+    frame.grip_w = frame.grip_h = 0;
+  }
+  
+  frame.width = client.width + (frame.mwm_border_w * 2);
+  frame.height = frame.y_handle + frame.handle_h;
+
+  frame.snap_w = frame.width + (frame.border_w * 2);
+  frame.snap_h = frame.height + (frame.border_w * 2);
+}
+
+
+/*
+ * Set the size and position of the client window.
+ * These values are based upon the current style settings and the frame
+ * window's dimensions.
+ */
+void OpenboxWindow::downsize(void) {
+  frame.y_handle = frame.height - frame.handle_h;
+  frame.border_h = frame.y_handle - frame.y_border -
+    (decorations.handle ? frame.border_w : 0);
+
+  client.x = frame.x + frame.mwm_border_w + frame.border_w;
+  client.y = frame.y + frame.y_border + frame.mwm_border_w + frame.border_w;
+
+  client.width = frame.width - (frame.mwm_border_w * 2);
+  client.height = frame.height - frame.y_border - (frame.mwm_border_w * 2)
+    - frame.handle_h - (decorations.handle ? frame.border_w : 0);
+
+  frame.y_handle = frame.border_h + frame.y_border + frame.border_w;
+
+  frame.snap_w = frame.width + (frame.border_w * 2);
+  frame.snap_h = frame.height + (frame.border_w * 2);
+}
+
+
+void OpenboxWindow::right_fixsize(int *gx, int *gy) {
+  // calculate the size of the client window and conform it to the
+  // size specified by the size hints of the client window...
+  int dx = frame.resize_w - client.base_width - (frame.mwm_border_w * 2) -
+    (frame.border_w * 2) + (client.width_inc / 2);
+  int dy = frame.resize_h - frame.y_border - client.base_height -
+    frame.handle_h - (frame.border_w * 3) - (frame.mwm_border_w * 2)
+    + (client.height_inc / 2);
+
+  if (dx < (signed) client.min_width) dx = client.min_width;
+  if (dy < (signed) client.min_height) dy = client.min_height;
+  if ((unsigned) dx > client.max_width) dx = client.max_width;
+  if ((unsigned) dy > client.max_height) dy = client.max_height;
+
+  dx /= client.width_inc;
+  dy /= client.height_inc;
+
+  if (gx) *gx = dx;
+  if (gy) *gy = dy;
+
+  dx = (dx * client.width_inc) + client.base_width;
+  dy = (dy * client.height_inc) + client.base_height;
+
+  frame.resize_w = dx + (frame.mwm_border_w * 2) + (frame.border_w * 2);
+  frame.resize_h = dy + frame.y_border + frame.handle_h +
+                   (frame.mwm_border_w * 2) +  (frame.border_w * 3);
+  if (resize_zone & ZoneTop)
+    frame.resize_y = frame.y + frame.height - frame.resize_h +
+      screen->getBorderWidth() * 2;
+}
+
+
+void OpenboxWindow::left_fixsize(int *gx, int *gy) {
+  // calculate the size of the client window and conform it to the
+  // size specified by the size hints of the client window...
+  int dx = frame.x + frame.width - frame.resize_x - client.base_width -
+    (frame.mwm_border_w * 2) + (client.width_inc / 2);
+  int dy = frame.resize_h - frame.y_border - client.base_height -
+    frame.handle_h - (frame.border_w * 3) - (frame.mwm_border_w * 2)
+    + (client.height_inc / 2);
+
+  if (dx < (signed) client.min_width) dx = client.min_width;
+  if (dy < (signed) client.min_height) dy = client.min_height;
+  if ((unsigned) dx > client.max_width) dx = client.max_width;
+  if ((unsigned) dy > client.max_height) dy = client.max_height;
+
+  dx /= client.width_inc;
+  dy /= client.height_inc;
+
+  if (gx) *gx = dx;
+  if (gy) *gy = dy;
+
+  dx = (dx * client.width_inc) + client.base_width;
+  dy = (dy * client.height_inc) + client.base_height;
+
+  frame.resize_w = dx + (frame.mwm_border_w * 2) + (frame.border_w * 2);
+  frame.resize_x = frame.x + frame.width - frame.resize_w +
+                   (frame.border_w * 2);
+  frame.resize_h = dy + frame.y_border + frame.handle_h +
+                   (frame.mwm_border_w * 2) + (frame.border_w * 3);
+  if (resize_zone & ZoneTop)
+    frame.resize_y = frame.y + frame.height - frame.resize_h +
+      screen->getBorderWidth() * 2;
+  
+}
diff --git a/src/Window.h b/src/Window.h
new file mode 100644
index 00000000..d6e9f809
--- /dev/null
+++ b/src/Window.h
@@ -0,0 +1,330 @@
+// Window.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Window_hh
+#define   __Window_hh
+
+#include 
+#include 
+#ifdef    SHAPE
+#  include 
+#endif // SHAPE
+
+#include "BaseDisplay.h"
+#include "Timer.h"
+#include "Windowmenu.h"
+
+// forward declaration
+class OpenboxWindow;
+
+#define MwmHintsFunctions     (1l << 0)
+#define MwmHintsDecorations   (1l << 1)
+
+#define MwmFuncAll            (1l << 0)
+#define MwmFuncResize         (1l << 1)
+#define MwmFuncMove           (1l << 2)
+#define MwmFuncIconify        (1l << 3)
+#define MwmFuncMaximize       (1l << 4)
+#define MwmFuncClose          (1l << 5)
+
+#define MwmDecorAll           (1l << 0)
+#define MwmDecorBorder        (1l << 1)
+#define MwmDecorHandle        (1l << 2)
+#define MwmDecorTitle         (1l << 3)
+#define MwmDecorMenu          (1l << 4)
+#define MwmDecorIconify       (1l << 5)
+#define MwmDecorMaximize      (1l << 6)
+
+// this structure only contains 3 elements... the Motif 2.0 structure contains
+// 5... we only need the first 3... so that is all we will define
+typedef struct MwmHints {
+  unsigned long flags, functions, decorations;
+} MwmHints;
+
+#define PropMwmHintsElements  3
+
+
+class OpenboxWindow : public TimeoutHandler {
+private:
+  BImageControl *image_ctrl;
+  Openbox *openbox;
+  BScreen *screen;
+  Display *display;
+  BTimer *timer;
+  OpenboxAttributes openbox_attrib;
+
+  Time lastButtonPressTime;  // used for double clicks, when were we clicked
+  Windowmenu *windowmenu;
+
+  int window_number, workspace_number;
+  unsigned long current_state;
+
+  enum FocusMode { F_NoInput = 0, F_Passive,
+		   F_LocallyActive, F_GloballyActive };
+  FocusMode focus_mode;
+
+  enum ResizeZones {
+    ZoneTop     = 1 << 0,
+    ZoneBottom  = 1 << 1,
+    ZoneLeft    = 1 << 2,
+    ZoneRight   = 1 << 3
+  };
+  unsigned int resize_zone;     // bitmask of ResizeZones values
+
+  struct _flags {
+    Bool moving,             // is moving?
+      resizing,              // is resizing?
+      shaded,                // is shaded?
+      visible,               // is visible?
+      iconic,                // is iconified?
+      transient,             // is a transient window?
+      focused,               // has focus?
+      stuck,                 // is omnipresent
+      modal,                 // is modal? (must be dismissed to continue)
+      send_focus_message,    // should we send focus messages to our client?
+      shaped,                // does the frame use the shape extension?
+      managed;               // under openbox's control?
+                             // maximize is special, the number corresponds
+                             // with a mouse button
+                             // if 0, not maximized
+    unsigned int maximized;  // 1 = HorizVert, 2 = Vertical, 3 = Horizontal
+  } flags;
+
+  struct _client {
+    OpenboxWindow *transient_for,  // which window are we a transient for?
+      *transient;                   // which window is our transient?
+
+    Window window,                  // the client's window
+      window_group;                 // the client's window group
+
+    char *title, *icon_title;
+    size_t title_len;               // strlen(title)
+
+    int x, y,
+      old_bw;                       // client's borderwidth
+
+    unsigned int width, height,
+      title_text_w,                 // width as rendered in the current font
+      min_width, min_height,        // can not be resized smaller
+      max_width, max_height,        // can not be resized larger
+      width_inc, height_inc,        // increment step
+      min_aspect_x, min_aspect_y,   // minimum aspect ratio
+      max_aspect_x, max_aspect_y,   // maximum aspect ratio
+      base_width, base_height,
+      win_gravity;
+
+    unsigned long initial_state, normal_hint_flags, wm_hint_flags;
+
+    MwmHints *mwm_hint;
+    OpenboxHints *openbox_hint;
+  } client;
+
+  struct _functions {
+    Bool resize, move, iconify, maximize, close;
+  } functions;
+
+  /*
+   * client window = the application's window
+   * frame window = the window drawn around the outside of the client window
+   *                by the window manager which contains items like the
+   *                titlebar and close button
+   * title = the titlebar drawn above the client window, it displays the
+   *         window's name and any buttons for interacting with the window,
+   *         such as iconify, maximize, and close
+   * label = the window in the titlebar where the title is drawn
+   * buttons = maximize, iconify, close
+   * handle = the bar drawn at the bottom of the window, which contains the
+   *          left and right grips used for resizing the window
+   * grips = the smaller reactangles in the handle, one of each side of it.
+   *         When clicked and dragged, these resize the window interactively
+   * border = the line drawn around the outside edge of the frame window,
+   *          between the title, the bordered client window, and the handle.
+   *          Also drawn between the grips and the handle
+   */
+
+  /*
+   * what decorations do we have?
+   * this is based on the type of the client window as well as user input
+   * the menu is not really decor, but it goes hand in hand with the decor
+   */
+  struct _decorations {
+    Bool titlebar, handle, border, iconify, maximize, close, menu;
+  } decorations;
+
+  struct _frame {
+    // u -> unfocused, f -> has focus
+    unsigned long ulabel_pixel, flabel_pixel, utitle_pixel,
+      ftitle_pixel, uhandle_pixel, fhandle_pixel, ubutton_pixel,
+      fbutton_pixel, pbutton_pixel, uborder_pixel, fborder_pixel,
+      ugrip_pixel, fgrip_pixel;
+    Pixmap ulabel, flabel, utitle, ftitle, uhandle, fhandle,
+      ubutton, fbutton, pbutton, ugrip, fgrip;
+
+    Window window,       // the frame
+      plate,             // holds the client
+      title,
+      label,
+      handle,
+      close_button, iconify_button, maximize_button,
+      right_grip, left_grip;
+
+
+    unsigned int resize_w, resize_h;
+    int resize_x, resize_y,    // size and location of box drawn while resizing
+      move_x, move_y;          // location of box drawn while moving
+
+    int x, y,
+      grab_x, grab_y,          // where was the window when it was grabbed?
+      y_border, y_handle;      // where within frame is the border and handle
+
+    unsigned int width, height, title_h, label_w, label_h, handle_h,
+      button_w, button_h, grip_w, grip_h, mwm_border_w, border_h, border_w,
+      bevel_w, snap_w, snap_h;
+  } frame;
+
+protected:
+  Bool getState(void);
+  Window createToplevelWindow(int x, int y, unsigned int width,
+			      unsigned int height, unsigned int borderwidth);
+  Window createChildWindow(Window parent, Cursor = None);
+
+  void getWMName(void);
+  void getWMIconName(void);
+  void getWMNormalHints(void);
+  void getWMProtocols(void);
+  void getWMHints(void);
+  void getMWMHints(void);
+  void getOpenboxHints(void);
+  void setNetWMAttributes(void);
+  void associateClientWindow(void);
+  void decorate(void);
+  void decorateLabel(void);
+  void positionButtons(Bool redecorate_label = False);
+  void positionWindows(void);
+  void createCloseButton(void);
+  void createIconifyButton(void);
+  void createMaximizeButton(void);
+  void redrawLabel(void);
+  void redrawAllButtons(void);
+  void redrawCloseButton(Bool);
+  void redrawIconifyButton(Bool);
+  void redrawMaximizeButton(Bool);
+  void restoreGravity(void);
+  void setGravityOffsets(void);
+  void setState(unsigned long);
+  void upsize(void);
+  void downsize(void);
+  void right_fixsize(int *gx = 0, int *gy = 0);
+  void left_fixsize(int *gx = 0, int *gy = 0);
+
+
+public:
+  OpenboxWindow(Openbox *b, Window w, BScreen *s = (BScreen *) 0);
+  virtual ~OpenboxWindow(void);
+
+  inline Bool isTransient(void) const { return flags.transient; }
+  inline Bool isFocused(void) const { return flags.focused; }
+  inline Bool isVisible(void) const { return flags.visible; }
+  inline Bool isIconic(void) const { return flags.iconic; }
+  inline Bool isShaded(void) const { return flags.shaded; }
+  inline Bool isMaximized(void) const { return flags.maximized; }
+  inline Bool isMaximizedFull(void) const { return flags.maximized == 1; }
+  inline Bool isStuck(void) const { return flags.stuck; }
+  inline Bool isIconifiable(void) const { return functions.iconify; }
+  inline Bool isMaximizable(void) const { return functions.maximize; }
+  inline Bool isResizable(void) const { return functions.resize; }
+  inline Bool isClosable(void) const { return functions.close; }
+
+  inline Bool hasTitlebar(void) const { return decorations.titlebar; }
+  inline Bool hasTransient(void) const
+  { return ((client.transient) ? True : False); }
+
+  inline OpenboxWindow *getTransient(void) { return client.transient; }
+  inline OpenboxWindow *getTransientFor(void) { return client.transient_for; }
+
+  inline BScreen *getScreen(void) { return screen; }
+
+  inline const Window &getFrameWindow(void) const { return frame.window; }
+  inline const Window &getClientWindow(void) const { return client.window; }
+
+  inline Windowmenu * getWindowmenu(void) { return windowmenu; }
+
+  inline char **getTitle(void) { return &client.title; }
+  inline char **getIconTitle(void) { return &client.icon_title; }
+  inline const int &getXFrame(void) const { return frame.x; }
+  inline const int &getYFrame(void) const { return frame.y; }
+  inline const int &getXClient(void) const { return client.x; }
+  inline const int &getYClient(void) const { return client.y; }
+  inline const int &getWorkspaceNumber(void) const { return workspace_number; }
+  inline const int &getWindowNumber(void) const { return window_number; }
+
+  inline const unsigned int &getWidth(void) const { return frame.width; }
+  inline const unsigned int &getHeight(void) const { return frame.height; }
+  inline const unsigned int &getClientHeight(void) const
+  { return client.height; }
+  inline const unsigned int &getClientWidth(void) const
+  { return client.width; }
+  inline const unsigned int &getTitleHeight(void) const
+  { return frame.title_h; }
+
+  inline void setWindowNumber(int n) { window_number = n; }
+  
+  Bool validateClient(void);
+  Bool setInputFocus(void);
+
+  void setFocusFlag(Bool);
+  void iconify(void);
+  void deiconify(Bool reassoc = True, Bool raise = True);
+  void close(void);
+  void withdraw(void);
+  void maximize(unsigned int button);
+  void shade(void);
+  void stick(void);
+  void unstick(void);
+  void reconfigure(void);
+  void installColormap(Bool);
+  void restore(void);
+  void configure(int dx, int dy, unsigned int dw, unsigned int dh);
+  void setWorkspace(int n);
+  void changeOpenboxHints(OpenboxHints *);
+  void restoreAttributes(void);
+
+  void buttonPressEvent(XButtonEvent *);
+  void buttonReleaseEvent(XButtonEvent *);
+  void motionNotifyEvent(XMotionEvent *);
+  void destroyNotifyEvent(XDestroyWindowEvent *);
+  void mapRequestEvent(XMapRequestEvent *);
+  void mapNotifyEvent(XMapEvent *);
+  void unmapNotifyEvent(XUnmapEvent *);
+  void propertyNotifyEvent(Atom);
+  void exposeEvent(XExposeEvent *);
+  void configureRequestEvent(XConfigureRequestEvent *);
+
+#ifdef    SHAPE
+  void shapeEvent(XShapeEvent *);
+#endif // SHAPE
+
+  virtual void timeout(void);
+};
+
+
+#endif // __Window_hh
diff --git a/src/Windowmenu.cc b/src/Windowmenu.cc
new file mode 100644
index 00000000..d9da5b86
--- /dev/null
+++ b/src/Windowmenu.cc
@@ -0,0 +1,204 @@
+// Windowmenu.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Screen.h"
+#include "Window.h"
+#include "Windowmenu.h"
+#include "Workspace.h"
+
+#ifdef    STDC_HEADERS
+#  include 
+#endif // STDC_HEADERS
+
+
+Windowmenu::Windowmenu(OpenboxWindow *win) : Basemenu(win->getScreen()) {
+  window = win;
+  screen = window->getScreen();
+
+  setTitleVisibility(False);
+  setMovable(False);
+  setInternalMenu();
+
+  sendToMenu = new SendtoWorkspacemenu(this);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuSendTo, "Send To ..."),
+	 sendToMenu);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuShade, "Shade"),
+	 BScreen::WindowShade);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuIconify, "Iconify"),
+	 BScreen::WindowIconify);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuMaximize, "Maximize"),
+	 BScreen::WindowMaximize);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuRaise,"Raise"),
+	 BScreen::WindowRaise);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuLower, "Lower"),
+	 BScreen::WindowLower);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuStick, "Stick"),
+	 BScreen::WindowStick);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuKillClient, "Kill Client"),
+	 BScreen::WindowKill);
+  insert(i18n->getMessage(WindowmenuSet, WindowmenuClose, "Close"),
+	 BScreen::WindowClose);
+
+  update();
+
+  setItemEnabled(1, window->hasTitlebar());
+  setItemEnabled(2, window->isIconifiable());
+  setItemEnabled(3, window->isMaximizable());
+  setItemEnabled(8, window->isClosable());
+}
+
+
+Windowmenu::~Windowmenu(void) {
+  delete sendToMenu;
+}
+
+
+void Windowmenu::show(void) {
+  if (isItemEnabled(1)) setItemSelected(1, window->isShaded());
+  if (isItemEnabled(3)) setItemSelected(3, window->isMaximized());
+  if (isItemEnabled(6)) setItemSelected(6, window->isStuck());
+
+  Basemenu::show();
+}
+
+
+void Windowmenu::itemSelected(int button, int index) {
+  BasemenuItem *item = find(index);
+
+  /* Added by Scott Moynes, April 8, 2002
+     Ignore the middle button for every item except the maximize
+     button in the window menu. Maximize needs it for
+     horizontal/vertical maximize, however, for the others it is
+     inconsistent with the rest of the window behaviour.
+     */
+  if(button != 2) {
+    hide();
+    switch (item->function()) {
+    case BScreen::WindowShade:
+      window->shade();
+      break;
+
+    case BScreen::WindowIconify:
+      window->iconify();
+      break;
+
+    case BScreen::WindowMaximize:
+      window->maximize((unsigned int) button);
+      break;
+
+    case BScreen::WindowClose:
+      window->close();
+      break;
+
+    case BScreen::WindowRaise:
+      screen->getWorkspace(window->getWorkspaceNumber())->raiseWindow(window);
+      break;
+
+    case BScreen::WindowLower:
+      screen->getWorkspace(window->getWorkspaceNumber())->lowerWindow(window);
+      break;
+
+    case BScreen::WindowStick:
+      window->stick();
+      break;
+
+    case BScreen::WindowKill:
+      XKillClient(screen->getBaseDisplay()->getXDisplay(),
+                  window->getClientWindow());
+      break;
+    }
+  } else if (item->function() == BScreen::WindowMaximize) {
+    hide();
+    window->maximize((unsigned int) button);
+  }
+}
+
+
+void Windowmenu::reconfigure(void) {
+  setItemEnabled(1, window->hasTitlebar());
+  setItemEnabled(2, window->isIconifiable());
+  setItemEnabled(3, window->isMaximizable());
+  setItemEnabled(8, window->isClosable());
+
+  sendToMenu->reconfigure();
+
+  Basemenu::reconfigure();
+}
+
+
+Windowmenu::SendtoWorkspacemenu::SendtoWorkspacemenu(Windowmenu *w)
+  : Basemenu(w->screen) {
+  windowmenu = w;
+
+  setTitleVisibility(False);
+  setMovable(False);
+  setInternalMenu();
+  update();
+}
+
+
+void Windowmenu::SendtoWorkspacemenu::itemSelected(int button, int index) {
+  if (button > 2) return;
+
+  if (index <= windowmenu->screen->getCount()) {
+    if (index == windowmenu->screen->getCurrentWorkspaceID()) return;
+    if (windowmenu->window->isStuck()) windowmenu->window->stick();
+
+    if (button == 1) windowmenu->window->withdraw();
+    windowmenu->screen->reassociateWindow(windowmenu->window, index, True);
+    if (button == 2) windowmenu->screen->changeWorkspaceID(index);
+  }
+  hide();
+}
+
+
+void Windowmenu::SendtoWorkspacemenu::update(void) {
+  int i, r = getCount();
+
+  if (r != 0)
+    for (i = 0; i < r; ++i)
+      remove(0);
+
+  for (i = 0; i < windowmenu->screen->getCount(); ++i)
+    insert(windowmenu->screen->getWorkspace(i)->getName());
+
+  Basemenu::update();
+}
+
+
+void Windowmenu::SendtoWorkspacemenu::show(void) {
+  update();
+
+  Basemenu::show();
+}
diff --git a/src/Windowmenu.h b/src/Windowmenu.h
new file mode 100644
index 00000000..53206df4
--- /dev/null
+++ b/src/Windowmenu.h
@@ -0,0 +1,78 @@
+// Windowmenu.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Windowmenu_hh
+#define   __Windowmenu_hh
+
+#include "Basemenu.h"
+
+// forward declaration
+class Windowmenu;
+class SendtoWorkspaceMenu;
+
+class Openbox;
+class OpenboxWindow;
+class Toolbar;
+
+class Windowmenu : public Basemenu {
+private:
+  OpenboxWindow *window;
+  BScreen *screen;
+
+  class SendtoWorkspacemenu : public Basemenu {
+  private:
+    Windowmenu *windowmenu;
+
+  protected:
+    virtual void itemSelected(int, int);
+
+  public:
+    SendtoWorkspacemenu(Windowmenu *);
+
+    void update(void);
+
+    virtual void show(void);
+  };
+
+  SendtoWorkspacemenu *sendToMenu;
+
+  friend class SendtoWorkspacemenu;
+
+
+protected:
+  virtual void itemSelected(int, int);
+
+
+public:
+  Windowmenu(OpenboxWindow *);
+  virtual ~Windowmenu(void);
+
+  inline Basemenu *getSendToMenu(void) { return (Basemenu *) sendToMenu; }
+
+  void reconfigure(void);
+  void setClosable(void);
+
+  virtual void show(void);
+};
+
+
+#endif // __Windowmenu_hh
diff --git a/src/Workspace.cc b/src/Workspace.cc
new file mode 100644
index 00000000..fa1f7990
--- /dev/null
+++ b/src/Workspace.cc
@@ -0,0 +1,502 @@
+// Workspace.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include 
+#include 
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Clientmenu.h"
+#include "Screen.h"
+#include "Toolbar.h"
+#include "Window.h"
+#include "Workspace.h"
+#include "Windowmenu.h"
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#ifdef    STDC_HEADERS
+#  include 
+#endif // STDC_HEADERS
+
+
+Workspace::Workspace(BScreen *scrn, int i) {
+  screen = scrn;
+
+  cascade_x = cascade_y = 32;
+
+  id = i;
+
+  stackingList = new LinkedList;
+  windowList = new LinkedList;
+  clientmenu = new Clientmenu(this);
+
+  lastfocus = (OpenboxWindow *) 0;
+
+  name = (char *) 0;
+  char *tmp = screen->getNameOfWorkspace(id);
+  setName(tmp);
+}
+
+
+Workspace::~Workspace(void) {
+  delete stackingList;
+  delete windowList;
+  delete clientmenu;
+
+  if (name)
+    delete [] name;
+}
+
+
+const int Workspace::addWindow(OpenboxWindow *w, Bool place) {
+  if (! w) return -1;
+
+  if (place) placeWindow(w);
+
+  w->setWorkspace(id);
+  w->setWindowNumber(windowList->count());
+
+  stackingList->insert(w, 0);
+  windowList->insert(w);
+
+  clientmenu->insert((const char **) w->getTitle());
+  clientmenu->update();
+
+  screen->updateNetizenWindowAdd(w->getClientWindow(), id);
+
+  raiseWindow(w);
+
+  return w->getWindowNumber();
+}
+
+
+const int Workspace::removeWindow(OpenboxWindow *w) {
+  if (! w) return -1;
+
+  stackingList->remove(w);
+
+  if (w->isFocused()) {
+    if (w->isTransient() && w->getTransientFor() &&
+	w->getTransientFor()->isVisible()) {
+      w->getTransientFor()->setInputFocus();
+    } else if (screen->isSloppyFocus()) {
+      screen->getOpenbox()->setFocusedWindow((OpenboxWindow *) 0);
+    } else {
+      OpenboxWindow *top = stackingList->first();
+      if (! top || ! top->setInputFocus()) {
+	screen->getOpenbox()->setFocusedWindow((OpenboxWindow *) 0);
+	XSetInputFocus(screen->getOpenbox()->getXDisplay(),
+		       screen->getToolbar()->getWindowID(),
+		       RevertToParent, CurrentTime);
+      }
+    }
+  }
+  
+  if (lastfocus == w)
+    lastfocus = (OpenboxWindow *) 0;
+
+  windowList->remove(w->getWindowNumber());
+  clientmenu->remove(w->getWindowNumber());
+  clientmenu->update();
+
+  screen->updateNetizenWindowDel(w->getClientWindow());
+
+  LinkedListIterator it(windowList);
+  OpenboxWindow *bw = it.current();
+  for (int i = 0; bw; it++, i++, bw = it.current())
+    bw->setWindowNumber(i);
+
+  return windowList->count();
+}
+
+
+void Workspace::showAll(void) {
+  LinkedListIterator it(stackingList);
+  for (OpenboxWindow *bw = it.current(); bw; it++, bw = it.current())
+    bw->deiconify(False, False);
+}
+
+
+void Workspace::hideAll(void) {
+  LinkedList lst;
+
+  LinkedListIterator it(stackingList);
+  for (OpenboxWindow *bw = it.current(); bw; it++, bw = it.current())
+    lst.insert(bw, 0);
+
+  LinkedListIterator it2(&lst);
+  for (OpenboxWindow *bw = it2.current(); bw; it2++, bw = it2.current())
+    if (! bw->isStuck())
+      bw->withdraw();
+}
+
+
+void Workspace::removeAll(void) {
+  LinkedListIterator it(windowList);
+  for (OpenboxWindow *bw = it.current(); bw; it++, bw = it.current())
+    bw->iconify();
+}
+
+
+void Workspace::raiseWindow(OpenboxWindow *w) {
+  OpenboxWindow *win = (OpenboxWindow *) 0, *bottom = w;
+
+  while (bottom->isTransient() && bottom->getTransientFor())
+    bottom = bottom->getTransientFor();
+
+  int i = 1;
+  win = bottom;
+  while (win->hasTransient() && win->getTransient()) {
+    win = win->getTransient();
+
+    i++;
+  }
+
+  Window *nstack = new Window[i], *curr = nstack;
+  Workspace *wkspc;
+
+  win = bottom;
+  while (True) {
+    *(curr++) = win->getFrameWindow();
+    screen->updateNetizenWindowRaise(win->getClientWindow());
+
+    if (! win->isIconic()) {
+      wkspc = screen->getWorkspace(win->getWorkspaceNumber());
+      wkspc->stackingList->remove(win);
+      wkspc->stackingList->insert(win, 0);
+    }
+
+    if (! win->hasTransient() || ! win->getTransient())
+      break;
+
+    win = win->getTransient();
+  }
+
+  screen->raiseWindows(nstack, i);
+
+  delete [] nstack;
+}
+
+
+void Workspace::lowerWindow(OpenboxWindow *w) {
+  OpenboxWindow *win = (OpenboxWindow *) 0, *bottom = w;
+
+  while (bottom->isTransient() && bottom->getTransientFor())
+    bottom = bottom->getTransientFor();
+
+  int i = 1;
+  win = bottom;
+  while (win->hasTransient() && win->getTransient()) {
+    win = win->getTransient();
+
+    i++;
+  }
+
+  Window *nstack = new Window[i], *curr = nstack;
+  Workspace *wkspc;
+
+  while (True) {
+    *(curr++) = win->getFrameWindow();
+    screen->updateNetizenWindowLower(win->getClientWindow());
+
+    if (! win->isIconic()) {
+      wkspc = screen->getWorkspace(win->getWorkspaceNumber());
+      wkspc->stackingList->remove(win);
+      wkspc->stackingList->insert(win);
+    }
+
+    if (! win->getTransientFor())
+      break;
+
+    win = win->getTransientFor();
+  }
+
+  screen->getOpenbox()->grab();
+
+  XLowerWindow(screen->getBaseDisplay()->getXDisplay(), *nstack);
+  XRestackWindows(screen->getBaseDisplay()->getXDisplay(), nstack, i);
+
+  screen->getOpenbox()->ungrab();
+
+  delete [] nstack;
+}
+
+
+void Workspace::reconfigure(void) {
+  clientmenu->reconfigure();
+
+  LinkedListIterator it(windowList);
+  for (OpenboxWindow *bw = it.current(); bw; it++, bw = it.current()) {
+    if (bw->validateClient())
+      bw->reconfigure();
+  }
+}
+
+
+OpenboxWindow *Workspace::getWindow(int index) {
+  if ((index >= 0) && (index < windowList->count()))
+    return windowList->find(index);
+  else
+    return 0;
+}
+
+
+const int Workspace::getCount(void) {
+  return windowList->count();
+}
+
+
+void Workspace::update(void) {
+  clientmenu->update();
+  screen->getToolbar()->redrawWindowLabel(True);
+}
+
+
+Bool Workspace::isCurrent(void) {
+  return (id == screen->getCurrentWorkspaceID());
+}
+
+
+Bool Workspace::isLastWindow(OpenboxWindow *w) {
+  return (w == windowList->last());
+}
+
+void Workspace::setCurrent(void) {
+  screen->changeWorkspaceID(id);
+}
+
+
+void Workspace::setName(char *new_name) {
+  if (name)
+    delete [] name;
+
+  if (new_name) {
+    name = bstrdup(new_name);
+  } else {
+    name = new char[128];
+    sprintf(name, i18n->getMessage(WorkspaceSet, WorkspaceDefaultNameFormat,
+				   "Workspace %d"), id + 1);
+  }
+  
+  clientmenu->setLabel(name);
+  clientmenu->update();
+}
+
+
+void Workspace::shutdown(void) {
+  while (windowList->count()) {
+    windowList->first()->restore();
+    delete windowList->first();
+  }
+}
+
+void Workspace::placeWindow(OpenboxWindow *win) {
+  Bool placed = False;
+
+  const int win_w = win->getWidth() + (screen->getBorderWidth() * 4),
+    win_h = win->getHeight() + (screen->getBorderWidth() * 4),
+#ifdef    SLIT
+    slit_x = screen->getSlit()->getX() - screen->getBorderWidth(),
+    slit_y = screen->getSlit()->getY() - screen->getBorderWidth(),
+    slit_w = screen->getSlit()->getWidth() +
+      (screen->getBorderWidth() * 4),
+    slit_h = screen->getSlit()->getHeight() +
+      (screen->getBorderWidth() * 4),
+#endif // SLIT
+    toolbar_x = screen->getToolbar()->getX() - screen->getBorderWidth(),
+    toolbar_y = screen->getToolbar()->getY() - screen->getBorderWidth(),
+    toolbar_w = screen->getToolbar()->getWidth() +
+      (screen->getBorderWidth() * 4),
+    toolbar_h = screen->getToolbar()->getHeight() + 
+      (screen->getBorderWidth() * 4),
+    start_pos = 0,
+    change_y =
+      ((screen->getColPlacementDirection() == BScreen::TopBottom) ? 1 : -1),
+    change_x =
+      ((screen->getRowPlacementDirection() == BScreen::LeftRight) ? 1 : -1),
+    delta_x = 8, delta_y = 8;
+
+  int test_x, test_y, place_x = 0, place_y = 0;
+  LinkedListIterator it(windowList);
+
+  switch (screen->getPlacementPolicy()) {
+  case BScreen::RowSmartPlacement: {
+    test_y = (screen->getColPlacementDirection() == BScreen::TopBottom) ?
+      start_pos : screen->getHeight() - win_h - start_pos;
+
+    while (!placed &&
+	   ((screen->getColPlacementDirection() == BScreen::BottomTop) ?
+	    test_y > 0 : test_y + win_h < (signed) screen->getHeight())) {
+      test_x = (screen->getRowPlacementDirection() == BScreen::LeftRight) ?
+	start_pos : screen->getWidth() - win_w - start_pos;
+
+      while (!placed &&
+	     ((screen->getRowPlacementDirection() == BScreen::RightLeft) ?
+	      test_x > 0 : test_x + win_w < (signed) screen->getWidth())) {
+        placed = True;
+
+        it.reset();
+        for (OpenboxWindow *curr = it.current(); placed && curr;
+	     it++, curr = it.current()) {
+          if (curr->isMaximizedFull()) // fully maximized, ignore it
+            continue;
+          int curr_w = curr->getWidth() + (screen->getBorderWidth() * 4);
+          int curr_h =
+	    ((curr->isShaded()) ? curr->getTitleHeight() : curr->getHeight()) +
+            (screen->getBorderWidth() * 4);
+	  
+          if (curr->getXFrame() < test_x + win_w &&
+              curr->getXFrame() + curr_w > test_x &&
+              curr->getYFrame() < test_y + win_h &&
+              curr->getYFrame() + curr_h > test_y) {
+            placed = False;
+	  }
+        }
+
+        if (placed &&
+	    (toolbar_x < test_x + win_w &&
+             toolbar_x + toolbar_w > test_x &&
+             toolbar_y < test_y + win_h &&
+             toolbar_y + toolbar_h > test_y)
+#ifdef    SLIT
+             ||
+            (slit_x < test_x + win_w &&
+             slit_x + slit_w > test_x &&
+             slit_y < test_y + win_h &&
+             slit_y + slit_h > test_y)
+#endif // SLIT
+	    )
+          placed = False;
+
+        if (placed) {
+          place_x = test_x;
+          place_y = test_y;
+
+          break;
+        }
+
+	test_x += (change_x * delta_x);
+      }
+
+      test_y += (change_y * delta_y);
+    }
+
+    break;
+  }
+
+  case BScreen::ColSmartPlacement: {
+    test_x = (screen->getRowPlacementDirection() == BScreen::LeftRight) ?
+      start_pos : screen->getWidth() - win_w - start_pos;
+
+    while (!placed &&
+	   ((screen->getRowPlacementDirection() == BScreen::RightLeft) ?
+	    test_x > 0 : test_x + win_w < (signed) screen->getWidth())) {
+      test_y = (screen->getColPlacementDirection() == BScreen::TopBottom) ?
+	start_pos : screen->getHeight() - win_h - start_pos;
+      
+      while (!placed &&
+	     ((screen->getColPlacementDirection() == BScreen::BottomTop) ?
+	      test_y > 0 : test_y + win_h < (signed) screen->getHeight())) {
+        placed = True;
+
+        it.reset();
+        for (OpenboxWindow *curr = it.current(); placed && curr;
+	     it++, curr = it.current()) {
+          if (curr->isMaximizedFull()) // fully maximized, ignore it
+            continue;
+          int curr_w = curr->getWidth() + (screen->getBorderWidth() * 4);
+          int curr_h =
+            ((curr->isShaded()) ? curr->getTitleHeight() : curr->getHeight()) +
+            (screen->getBorderWidth() * 4);
+
+          if (curr->getXFrame() < test_x + win_w &&
+              curr->getXFrame() + curr_w > test_x &&
+              curr->getYFrame() < test_y + win_h &&
+              curr->getYFrame() + curr_h > test_y) {
+            placed = False;
+	  }
+        }
+
+        if (placed &&
+	    (toolbar_x < test_x + win_w &&
+	     toolbar_x + toolbar_w > test_x &&
+	     toolbar_y < test_y + win_h &&
+	     toolbar_y + toolbar_h > test_y)
+#ifdef    SLIT
+	    ||
+	    (slit_x < test_x + win_w &&
+	     slit_x + slit_w > test_x &&
+	     slit_y < test_y + win_h &&
+	     slit_y + slit_h > test_y)
+#endif // SLIT
+	    )
+	  placed = False;
+
+	if (placed) {
+	  place_x = test_x;
+	  place_y = test_y;
+
+	  break;
+	}
+
+	test_y += (change_y * delta_y);
+      }
+
+      test_x += (change_x * delta_x);
+    }
+
+    break;
+  }
+  } // switch
+
+  if (! placed) {
+    if (((unsigned) cascade_x > (screen->getWidth() / 2)) ||
+	((unsigned) cascade_y > (screen->getHeight() / 2)))
+      cascade_x = cascade_y = 32;
+
+    place_x = cascade_x;
+    place_y = cascade_y;
+
+    cascade_x += win->getTitleHeight();
+    cascade_y += win->getTitleHeight();
+  }
+  
+  if (place_x + win_w > (signed) screen->getWidth())
+    place_x = (((signed) screen->getWidth()) - win_w) / 2;
+  if (place_y + win_h > (signed) screen->getHeight())
+    place_y = (((signed) screen->getHeight()) - win_h) / 2;
+
+  win->configure(place_x, place_y, win->getWidth(), win->getHeight());
+}
diff --git a/src/Workspace.h b/src/Workspace.h
new file mode 100644
index 00000000..f9700bdc
--- /dev/null
+++ b/src/Workspace.h
@@ -0,0 +1,90 @@
+// Workspace.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Workspace_hh
+#define   __Workspace_hh
+
+#include 
+
+#include "LinkedList.h"
+
+class BScreen;
+class Clientmenu;
+class Workspace;
+class OpenboxWindow;
+
+class Workspace {
+private:
+  BScreen *screen;
+  OpenboxWindow *lastfocus;
+  Clientmenu *clientmenu;
+
+  LinkedList *stackingList, *windowList;
+
+  char *name;
+  int id, cascade_x, cascade_y;
+
+
+protected:
+  void placeWindow(OpenboxWindow *);
+
+
+public:
+  Workspace(BScreen *, int = 0);
+  ~Workspace(void);
+
+  inline BScreen *getScreen(void) { return screen; }
+
+  inline OpenboxWindow *getLastFocusedWindow(void) { return lastfocus; }
+  
+  inline Clientmenu *getMenu(void) { return clientmenu; }
+
+  inline const char *getName(void) const { return name; }
+
+  inline const int &getWorkspaceID(void) const { return id; }
+  
+  inline void setLastFocusedWindow(OpenboxWindow *w) { lastfocus = w; }
+
+  OpenboxWindow *getWindow(int);
+
+  Bool isCurrent(void);
+  Bool isLastWindow(OpenboxWindow *);
+  
+  const int addWindow(OpenboxWindow *, Bool = False);
+  const int removeWindow(OpenboxWindow *);
+  const int getCount(void);
+
+  void showAll(void);
+  void hideAll(void);
+  void removeAll(void);
+  void raiseWindow(OpenboxWindow *);
+  void lowerWindow(OpenboxWindow *);
+  void reconfigure();
+  void update();
+  void setCurrent(void);
+  void setName(char *);
+  void shutdown(void);
+};
+
+
+#endif // __Workspace_hh
+
diff --git a/src/Workspacemenu.cc b/src/Workspacemenu.cc
new file mode 100644
index 00000000..bec5f455
--- /dev/null
+++ b/src/Workspacemenu.cc
@@ -0,0 +1,69 @@
+// Workspacemenu.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Screen.h"
+#include "Toolbar.h"
+#include "Workspacemenu.h"
+#include "Workspace.h"
+
+
+Workspacemenu::Workspacemenu(BScreen *scrn) : Basemenu(scrn) {
+  screen = scrn;
+
+  setInternalMenu();
+
+  setLabel(i18n->getMessage(WorkspacemenuSet, WorkspacemenuWorkspacesTitle,
+			    "Workspaces"));
+  insert(i18n->getMessage(WorkspacemenuSet, WorkspacemenuNewWorkspace,
+			  "New Workspace"));
+  insert(i18n->getMessage(WorkspacemenuSet, WorkspacemenuRemoveLast,
+			  "Remove Last"));
+}
+
+
+void Workspacemenu::itemSelected(int button, int index) {
+  if (button != 1)
+    return;
+
+  if (index == 0)
+    screen->addWorkspace();
+  else if (index == 1)
+    screen->removeLastWorkspace();
+  else if ((screen->getCurrentWorkspace()->getWorkspaceID() !=
+	    (index - 2)) && ((index - 2) < screen->getCount()))
+    screen->changeWorkspaceID(index - 2);
+
+  if (! (screen->getWorkspacemenu()->isTorn() || isTorn()))
+    hide();
+}
diff --git a/src/Workspacemenu.h b/src/Workspacemenu.h
new file mode 100644
index 00000000..6902315d
--- /dev/null
+++ b/src/Workspacemenu.h
@@ -0,0 +1,45 @@
+// WorkspaceMenu.h for Openbox - an X11 Window manager
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __Workspacemenu_hh
+#define   __Workspacemenu_hh
+
+#include "Basemenu.h"
+
+// forward declaration
+class Workspacemenu;
+class Toolbar;
+
+class Workspacemenu : public Basemenu {
+private:
+  BScreen *screen;
+
+protected:
+  virtual void itemSelected(int, int);
+
+public:
+  Workspacemenu(BScreen *);
+};
+
+
+#endif // __Workspacemenu_hh
+
diff --git a/src/bsd-snprintf.c b/src/bsd-snprintf.c
new file mode 100644
index 00000000..4716ee29
--- /dev/null
+++ b/src/bsd-snprintf.c
@@ -0,0 +1,788 @@
+/**************************************************************
+ * Original:
+ * Patrick Powell Tue Apr 11 09:48:21 PDT 1995
+ * A bombproof version of doprnt (dopr) included.
+ * Sigh.  This sort of thing is always nasty do deal with.  Note that
+ * the version here does not include floating point...
+ *
+ * snprintf() is used instead of sprintf() as it does limit checks
+ * for string length.  This covers a nasty loophole.
+ *
+ * The other functions are there to prevent NULL pointers from
+ * causing nast effects.
+ *
+ * More Recently:
+ *  Brandon Long  9/15/96 for mutt 0.43
+ *  This was ugly.  It is still ugly.  I opted out of floating point
+ *  numbers, but the formatter understands just about everything
+ *  from the normal C string format, at least as far as I can tell from
+ *  the Solaris 2.5 printf(3S) man page.
+ *
+ *  Brandon Long  10/22/97 for mutt 0.87.1
+ *    Ok, added some minimal floating point support, which means this
+ *    probably requires libm on most operating systems.  Don't yet
+ *    support the exponent (e,E) and sigfig (g,G).  Also, fmtint()
+ *    was pretty badly broken, it just wasn't being exercised in ways
+ *    which showed it, so that's been fixed.  Also, formated the code
+ *    to mutt conventions, and removed dead code left over from the
+ *    original.  Also, there is now a builtin-test, just compile with:
+ *           gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
+ *    and run snprintf for results.
+ * 
+ *  Thomas Roessler  01/27/98 for mutt 0.89i
+ *    The PGP code was using unsigned hexadecimal formats. 
+ *    Unfortunately, unsigned formats simply didn't work.
+ *
+ *  Michael Elkins  03/05/98 for mutt 0.90.8
+ *    The original code assumed that both snprintf() and vsnprintf() were
+ *    missing.  Some systems only have snprintf() but not vsnprintf(), so
+ *    the code is now broken down under HAVE_SNPRINTF and HAVE_VSNPRINTF.
+ *
+ **************************************************************/
+
+#include "config.h"
+
+#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
+
+#include 
+# include 
+#include 
+
+/* Define this as a fall through, HAVE_STDARG_H is probably already set */
+
+#define HAVE_VARARGS_H
+
+/* varargs declarations: */
+
+#if defined(HAVE_STDARG_H)
+# include 
+# define HAVE_STDARGS    /* let's hope that works everywhere (mj) */
+# define VA_LOCAL_DECL   va_list ap
+# define VA_START(f)     va_start(ap, f)
+# define VA_SHIFT(v,t)  ;   /* no-op for ANSI */
+# define VA_END          va_end(ap)
+#else
+# if defined(HAVE_VARARGS_H)
+#  include 
+#  undef HAVE_STDARGS
+#  define VA_LOCAL_DECL   va_list ap
+#  define VA_START(f)     va_start(ap)      /* f is ignored! */
+#  define VA_SHIFT(v,t) v = va_arg(ap,t)
+#  define VA_END        va_end(ap)
+# else
+/*XX ** NO VARARGS ** XX*/
+# endif
+#endif
+
+/*int snprintf (char *str, size_t count, const char *fmt, ...);*/
+/*int vsnprintf (char *str, size_t count, const char *fmt, va_list arg);*/
+
+static void dopr (char *buffer, size_t maxlen, const char *format, 
+                  va_list args);
+static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
+		    char *value, int flags, int min, int max);
+static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
+		    long value, int base, int min, int max, int flags);
+static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
+		   long double fvalue, int min, int max, int flags);
+static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c );
+
+/*
+ * dopr(): poor man's version of doprintf
+ */
+
+/* format read states */
+#define DP_S_DEFAULT 0
+#define DP_S_FLAGS   1
+#define DP_S_MIN     2
+#define DP_S_DOT     3
+#define DP_S_MAX     4
+#define DP_S_MOD     5
+#define DP_S_CONV    6
+#define DP_S_DONE    7
+
+/* format flags - Bits */
+#define DP_F_MINUS 	(1 << 0)
+#define DP_F_PLUS  	(1 << 1)
+#define DP_F_SPACE 	(1 << 2)
+#define DP_F_NUM   	(1 << 3)
+#define DP_F_ZERO  	(1 << 4)
+#define DP_F_UP    	(1 << 5)
+#define DP_F_UNSIGNED 	(1 << 6)
+
+/* Conversion Flags */
+#define DP_C_SHORT   1
+#define DP_C_LONG    2
+#define DP_C_LDOUBLE 3
+
+#define char_to_int(p) (p - '0')
+#define MAX(p,q) ((p >= q) ? p : q)
+
+static void dopr (char *buffer, size_t maxlen, const char *format, va_list args)
+{
+  char ch;
+  long value;
+  long double fvalue;
+  char *strvalue;
+  int min;
+  int max;
+  int state;
+  int flags;
+  int cflags;
+  size_t currlen;
+  
+  state = DP_S_DEFAULT;
+  currlen = flags = cflags = min = 0;
+  max = -1;
+  ch = *format++;
+
+  while (state != DP_S_DONE)
+  {
+    if ((ch == '\0') || (currlen >= maxlen)) 
+      state = DP_S_DONE;
+
+    switch(state) 
+    {
+    case DP_S_DEFAULT:
+      if (ch == '%') 
+	state = DP_S_FLAGS;
+      else 
+	dopr_outch (buffer, &currlen, maxlen, ch);
+      ch = *format++;
+      break;
+    case DP_S_FLAGS:
+      switch (ch) 
+      {
+      case '-':
+	flags |= DP_F_MINUS;
+        ch = *format++;
+	break;
+      case '+':
+	flags |= DP_F_PLUS;
+        ch = *format++;
+	break;
+      case ' ':
+	flags |= DP_F_SPACE;
+        ch = *format++;
+	break;
+      case '#':
+	flags |= DP_F_NUM;
+        ch = *format++;
+	break;
+      case '0':
+	flags |= DP_F_ZERO;
+        ch = *format++;
+	break;
+      default:
+	state = DP_S_MIN;
+	break;
+      }
+      break;
+    case DP_S_MIN:
+      if (isdigit((unsigned char)ch)) 
+      {
+	min = 10*min + char_to_int (ch);
+	ch = *format++;
+      } 
+      else if (ch == '*') 
+      {
+	min = va_arg (args, int);
+	ch = *format++;
+	state = DP_S_DOT;
+      } 
+      else 
+	state = DP_S_DOT;
+      break;
+    case DP_S_DOT:
+      if (ch == '.') 
+      {
+	state = DP_S_MAX;
+	ch = *format++;
+      } 
+      else 
+	state = DP_S_MOD;
+      break;
+    case DP_S_MAX:
+      if (isdigit((unsigned char)ch)) 
+      {
+	if (max < 0)
+	  max = 0;
+	max = 10*max + char_to_int (ch);
+	ch = *format++;
+      } 
+      else if (ch == '*') 
+      {
+	max = va_arg (args, int);
+	ch = *format++;
+	state = DP_S_MOD;
+      } 
+      else 
+	state = DP_S_MOD;
+      break;
+    case DP_S_MOD:
+      /* Currently, we don't support Long Long, bummer */
+      switch (ch) 
+      {
+      case 'h':
+	cflags = DP_C_SHORT;
+	ch = *format++;
+	break;
+      case 'l':
+	cflags = DP_C_LONG;
+	ch = *format++;
+	break;
+      case 'L':
+	cflags = DP_C_LDOUBLE;
+	ch = *format++;
+	break;
+      default:
+	break;
+      }
+      state = DP_S_CONV;
+      break;
+    case DP_S_CONV:
+      switch (ch) 
+      {
+      case 'd':
+      case 'i':
+	if (cflags == DP_C_SHORT) 
+	  value = va_arg (args, short int);
+	else if (cflags == DP_C_LONG)
+	  value = va_arg (args, long int);
+	else
+	  value = va_arg (args, int);
+	fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
+	break;
+      case 'o':
+	flags |= DP_F_UNSIGNED;
+	if (cflags == DP_C_SHORT)
+	  value = va_arg (args, unsigned short int);
+	else if (cflags == DP_C_LONG)
+	  value = va_arg (args, unsigned long int);
+	else
+	  value = va_arg (args, unsigned int);
+	fmtint (buffer, &currlen, maxlen, value, 8, min, max, flags);
+	break;
+      case 'u':
+	flags |= DP_F_UNSIGNED;
+	if (cflags == DP_C_SHORT)
+	  value = va_arg (args, unsigned short int);
+	else if (cflags == DP_C_LONG)
+	  value = va_arg (args, unsigned long int);
+	else
+	  value = va_arg (args, unsigned int);
+	fmtint (buffer, &currlen, maxlen, value, 10, min, max, flags);
+	break;
+      case 'X':
+	flags |= DP_F_UP;
+      case 'x':
+	flags |= DP_F_UNSIGNED;
+	if (cflags == DP_C_SHORT)
+	  value = va_arg (args, unsigned short int);
+	else if (cflags == DP_C_LONG)
+	  value = va_arg (args, unsigned long int);
+	else
+	  value = va_arg (args, unsigned int);
+	fmtint (buffer, &currlen, maxlen, value, 16, min, max, flags);
+	break;
+      case 'f':
+	if (cflags == DP_C_LDOUBLE)
+	  fvalue = va_arg (args, long double);
+	else
+	  fvalue = va_arg (args, double);
+	/* um, floating point? */
+	fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
+	break;
+      case 'E':
+	flags |= DP_F_UP;
+      case 'e':
+	if (cflags == DP_C_LDOUBLE)
+	  fvalue = va_arg (args, long double);
+	else
+	  fvalue = va_arg (args, double);
+	break;
+      case 'G':
+	flags |= DP_F_UP;
+      case 'g':
+	if (cflags == DP_C_LDOUBLE)
+	  fvalue = va_arg (args, long double);
+	else
+	  fvalue = va_arg (args, double);
+	break;
+      case 'c':
+	dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
+	break;
+      case 's':
+	strvalue = va_arg (args, char *);
+	if (max < 0) 
+	  max = maxlen; /* ie, no max */
+	fmtstr (buffer, &currlen, maxlen, strvalue, flags, min, max);
+	break;
+      case 'p':
+	strvalue = va_arg (args, void *);
+	fmtint (buffer, &currlen, maxlen, (long) strvalue, 16, min, max, flags);
+	break;
+      case 'n':
+	if (cflags == DP_C_SHORT) 
+	{
+	  short int *num;
+	  num = va_arg (args, short int *);
+	  *num = currlen;
+        } 
+	else if (cflags == DP_C_LONG) 
+	{
+	  long int *num;
+	  num = va_arg (args, long int *);
+	  *num = currlen;
+        } 
+	else 
+	{
+	  int *num;
+	  num = va_arg (args, int *);
+	  *num = currlen;
+        }
+	break;
+      case '%':
+	dopr_outch (buffer, &currlen, maxlen, ch);
+	break;
+      case 'w':
+	/* not supported yet, treat as next char */
+	ch = *format++;
+	break;
+      default:
+	/* Unknown, skip */
+	break;
+      }
+      ch = *format++;
+      state = DP_S_DEFAULT;
+      flags = cflags = min = 0;
+      max = -1;
+      break;
+    case DP_S_DONE:
+      break;
+    default:
+      /* hmm? */
+      break; /* some picky compilers need this */
+    }
+  }
+  if (currlen < maxlen - 1) 
+    buffer[currlen] = '\0';
+  else 
+    buffer[maxlen - 1] = '\0';
+}
+
+static void fmtstr (char *buffer, size_t *currlen, size_t maxlen,
+		    char *value, int flags, int min, int max)
+{
+  int padlen, strln;     /* amount to pad */
+  int cnt = 0;
+  
+  if (value == 0)
+  {
+    value = "";
+  }
+
+  for (strln = 0; value[strln]; ++strln); /* strlen */
+  padlen = min - strln;
+  if (padlen < 0) 
+    padlen = 0;
+  if (flags & DP_F_MINUS) 
+    padlen = -padlen; /* Left Justify */
+
+  while ((padlen > 0) && (cnt < max)) 
+  {
+    dopr_outch (buffer, currlen, maxlen, ' ');
+    --padlen;
+    ++cnt;
+  }
+  while (*value && (cnt < max)) 
+  {
+    dopr_outch (buffer, currlen, maxlen, *value++);
+    ++cnt;
+  }
+  while ((padlen < 0) && (cnt < max)) 
+  {
+    dopr_outch (buffer, currlen, maxlen, ' ');
+    ++padlen;
+    ++cnt;
+  }
+}
+
+/* Have to handle DP_F_NUM (ie 0x and 0 alternates) */
+
+static void fmtint (char *buffer, size_t *currlen, size_t maxlen,
+		    long value, int base, int min, int max, int flags)
+{
+  int signvalue = 0;
+  unsigned long uvalue;
+  char convert[20];
+  int place = 0;
+  int spadlen = 0; /* amount to space pad */
+  int zpadlen = 0; /* amount to zero pad */
+  int caps = 0;
+  
+  if (max < 0)
+    max = 0;
+
+  uvalue = value;
+
+  if(!(flags & DP_F_UNSIGNED))
+  {
+    if( value < 0 ) {
+      signvalue = '-';
+      uvalue = -value;
+    }
+    else
+      if (flags & DP_F_PLUS)  /* Do a sign (+/i) */
+	signvalue = '+';
+    else
+      if (flags & DP_F_SPACE)
+	signvalue = ' ';
+  }
+  
+  if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
+
+  do {
+    convert[place++] =
+      (caps? "0123456789ABCDEF":"0123456789abcdef")
+      [uvalue % (unsigned)base  ];
+    uvalue = (uvalue / (unsigned)base );
+  } while(uvalue && (place < 20));
+  if (place == 20) place--;
+  convert[place] = 0;
+
+  zpadlen = max - place;
+  spadlen = min - MAX (max, place) - (signvalue ? 1 : 0);
+  if (zpadlen < 0) zpadlen = 0;
+  if (spadlen < 0) spadlen = 0;
+  if (flags & DP_F_ZERO)
+  {
+    zpadlen = MAX(zpadlen, spadlen);
+    spadlen = 0;
+  }
+  if (flags & DP_F_MINUS) 
+    spadlen = -spadlen; /* Left Justifty */
+
+#ifdef DEBUG_SNPRINTF
+  dprint (1, (debugfile, "zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
+      zpadlen, spadlen, min, max, place));
+#endif
+
+  /* Spaces */
+  while (spadlen > 0) 
+  {
+    dopr_outch (buffer, currlen, maxlen, ' ');
+    --spadlen;
+  }
+
+  /* Sign */
+  if (signvalue) 
+    dopr_outch (buffer, currlen, maxlen, signvalue);
+
+  /* Zeros */
+  if (zpadlen > 0) 
+  {
+    while (zpadlen > 0)
+    {
+      dopr_outch (buffer, currlen, maxlen, '0');
+      --zpadlen;
+    }
+  }
+
+  /* Digits */
+  while (place > 0) 
+    dopr_outch (buffer, currlen, maxlen, convert[--place]);
+  
+  /* Left Justified spaces */
+  while (spadlen < 0) {
+    dopr_outch (buffer, currlen, maxlen, ' ');
+    ++spadlen;
+  }
+}
+
+static long double abs_val (long double value)
+{
+  long double result = value;
+
+  if (value < 0)
+    result = -value;
+
+  return result;
+}
+
+static long double pow10 (int exp)
+{
+  long double result = 1;
+
+  while (exp)
+  {
+    result *= 10;
+    exp--;
+  }
+  
+  return result;
+}
+
+static long round (long double value)
+{
+  long intpart;
+
+  intpart = value;
+  value = value - intpart;
+  if (value >= 0.5)
+    intpart++;
+
+  return intpart;
+}
+
+static void fmtfp (char *buffer, size_t *currlen, size_t maxlen,
+		   long double fvalue, int min, int max, int flags)
+{
+  int signvalue = 0;
+  long double ufvalue;
+  char iconvert[20];
+  char fconvert[20];
+  int iplace = 0;
+  int fplace = 0;
+  int padlen = 0; /* amount to pad */
+  int zpadlen = 0; 
+  int caps = 0;
+  long intpart;
+  long fracpart;
+  
+  /* 
+   * AIX manpage says the default is 0, but Solaris says the default
+   * is 6, and sprintf on AIX defaults to 6
+   */
+  if (max < 0)
+    max = 6;
+
+  ufvalue = abs_val (fvalue);
+
+  if (fvalue < 0)
+    signvalue = '-';
+  else
+    if (flags & DP_F_PLUS)  /* Do a sign (+/i) */
+      signvalue = '+';
+    else
+      if (flags & DP_F_SPACE)
+	signvalue = ' ';
+
+#if 0
+  if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
+#endif
+
+  intpart = ufvalue;
+
+  /* 
+   * Sorry, we only support 9 digits past the decimal because of our 
+   * conversion method
+   */
+  if (max > 9)
+    max = 9;
+
+  /* We "cheat" by converting the fractional part to integer by
+   * multiplying by a factor of 10
+   */
+  fracpart = round ((pow10 (max)) * (ufvalue - intpart));
+
+  if (fracpart >= pow10 (max))
+  {
+    intpart++;
+    fracpart -= pow10 (max);
+  }
+
+#ifdef DEBUG_SNPRINTF
+  dprint (1, (debugfile, "fmtfp: %f =? %d.%d\n", fvalue, intpart, fracpart));
+#endif
+
+  /* Convert integer part */
+  do {
+    iconvert[iplace++] =
+      (caps? "0123456789ABCDEF":"0123456789abcdef")[intpart % 10];
+    intpart = (intpart / 10);
+  } while(intpart && (iplace < 20));
+  if (iplace == 20) iplace--;
+  iconvert[iplace] = 0;
+
+  /* Convert fractional part */
+  do {
+    fconvert[fplace++] =
+      (caps? "0123456789ABCDEF":"0123456789abcdef")[fracpart % 10];
+    fracpart = (fracpart / 10);
+  } while(fracpart && (fplace < 20));
+  if (fplace == 20) fplace--;
+  fconvert[fplace] = 0;
+
+  /* -1 for decimal point, another -1 if we are printing a sign */
+  padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0); 
+  zpadlen = max - fplace;
+  if (zpadlen < 0)
+    zpadlen = 0;
+  if (padlen < 0) 
+    padlen = 0;
+  if (flags & DP_F_MINUS) 
+    padlen = -padlen; /* Left Justifty */
+
+  if ((flags & DP_F_ZERO) && (padlen > 0)) 
+  {
+    if (signvalue) 
+    {
+      dopr_outch (buffer, currlen, maxlen, signvalue);
+      --padlen;
+      signvalue = 0;
+    }
+    while (padlen > 0)
+    {
+      dopr_outch (buffer, currlen, maxlen, '0');
+      --padlen;
+    }
+  }
+  while (padlen > 0)
+  {
+    dopr_outch (buffer, currlen, maxlen, ' ');
+    --padlen;
+  }
+  if (signvalue) 
+    dopr_outch (buffer, currlen, maxlen, signvalue);
+
+  while (iplace > 0) 
+    dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
+
+  /*
+   * Decimal point.  This should probably use locale to find the correct
+   * char to print out.
+   */
+  dopr_outch (buffer, currlen, maxlen, '.');
+
+  while (fplace > 0) 
+    dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
+
+  while (zpadlen > 0)
+  {
+    dopr_outch (buffer, currlen, maxlen, '0');
+    --zpadlen;
+  }
+
+  while (padlen < 0) 
+  {
+    dopr_outch (buffer, currlen, maxlen, ' ');
+    ++padlen;
+  }
+}
+
+static void dopr_outch (char *buffer, size_t *currlen, size_t maxlen, char c)
+{
+  if (*currlen < maxlen)
+    buffer[(*currlen)++] = c;
+}
+#endif /* !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) */
+
+#ifndef HAVE_VSNPRINTF
+int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
+{
+  str[0] = 0;
+  dopr(str, count, fmt, args);
+  return(strlen(str));
+}
+#endif /* !HAVE_VSNPRINTF */
+
+#ifndef HAVE_SNPRINTF
+/* VARARGS3 */
+#ifdef HAVE_STDARGS
+int snprintf (char *str,size_t count,const char *fmt,...)
+#else
+int snprintf (va_alist) va_dcl
+#endif
+{
+#ifndef HAVE_STDARGS
+  char *str;
+  size_t count;
+  char *fmt;
+#endif
+  VA_LOCAL_DECL;
+    
+  VA_START (fmt);
+  VA_SHIFT (str, char *);
+  VA_SHIFT (count, size_t );
+  VA_SHIFT (fmt, char *);
+  (void) vsnprintf(str, count, fmt, ap);
+  VA_END;
+  return(strlen(str));
+}
+
+#ifdef TEST_SNPRINTF
+#ifndef LONG_STRING
+#define LONG_STRING 1024
+#endif
+int main (void)
+{
+  char buf1[LONG_STRING];
+  char buf2[LONG_STRING];
+  char *fp_fmt[] = {
+    "%-1.5f",
+    "%1.5f",
+    "%123.9f",
+    "%10.5f",
+    "% 10.5f",
+    "%+22.9f",
+    "%+4.9f",
+    "%01.3f",
+    "%4f",
+    "%3.1f",
+    "%3.2f",
+    NULL
+  };
+  double fp_nums[] = { -1.5, 134.21, 91340.2, 341.1234, 0203.9, 0.96, 0.996, 
+    0.9996, 1.996, 4.136, 0};
+  char *int_fmt[] = {
+    "%-1.5d",
+    "%1.5d",
+    "%123.9d",
+    "%5.5d",
+    "%10.5d",
+    "% 10.5d",
+    "%+22.33d",
+    "%01.3d",
+    "%4d",
+    NULL
+  };
+  long int_nums[] = { -1, 134, 91340, 341, 0203, 0};
+  int x, y;
+  int fail = 0;
+  int num = 0;
+
+  printf ("Testing snprintf format codes against system sprintf...\n");
+
+  for (x = 0; fp_fmt[x] != NULL ; x++)
+    for (y = 0; fp_nums[y] != 0 ; y++)
+    {
+      snprintf (buf1, sizeof (buf1), fp_fmt[x], fp_nums[y]);
+      sprintf (buf2, fp_fmt[x], fp_nums[y]);
+      if (strcmp (buf1, buf2))
+      {
+	printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf  = %s\n", 
+	    fp_fmt[x], buf1, buf2);
+	fail++;
+      }
+      num++;
+    }
+
+  for (x = 0; int_fmt[x] != NULL ; x++)
+    for (y = 0; int_nums[y] != 0 ; y++)
+    {
+      snprintf (buf1, sizeof (buf1), int_fmt[x], int_nums[y]);
+      sprintf (buf2, int_fmt[x], int_nums[y]);
+      if (strcmp (buf1, buf2))
+      {
+	printf("snprintf doesn't match Format: %s\n\tsnprintf = %s\n\tsprintf  = %s\n", 
+	    int_fmt[x], buf1, buf2);
+	fail++;
+      }
+      num++;
+    }
+  printf ("%d tests failed out of %d.\n", fail, num);
+}
+#endif /* SNPRINTF_TEST */
+
+#endif /* !HAVE_SNPRINTF */
diff --git a/src/bsd-snprintf.h b/src/bsd-snprintf.h
new file mode 100644
index 00000000..ed7a21c9
--- /dev/null
+++ b/src/bsd-snprintf.h
@@ -0,0 +1,17 @@
+#ifndef _BSD_SNPRINTF_H
+#define _BSD_SNPRINTF_H
+
+#include "config.h"
+
+#include  /* For size_t */
+
+#ifndef HAVE_SNPRINTF
+int snprintf(char *str, size_t count, const char *fmt, ...);
+#endif /* !HAVE_SNPRINTF */
+
+#ifndef HAVE_VSNPRINTF
+int vsnprintf(char *str, size_t count, const char *fmt, va_list args);
+#endif /* !HAVE_SNPRINTF */
+
+
+#endif /* _BSD_SNPRINTF_H */
diff --git a/src/i18n.cc b/src/i18n.cc
new file mode 100644
index 00000000..18b77209
--- /dev/null
+++ b/src/i18n.cc
@@ -0,0 +1,134 @@
+// i18n.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "i18n.h"
+
+#include 
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_LOCALE_H
+#  include 
+#endif // HAVE_LOCALE_H
+
+// the rest of bb source uses True and False from X, so we continue that
+#define True true
+#define False false
+
+static I18n static_i18n;
+I18n *i18n;
+
+void NLSInit(const char *catalog) {
+  i18n = &static_i18n;
+
+  i18n->openCatalog(catalog);
+}
+
+
+I18n::I18n(void) {
+  mb = False;
+#ifdef    HAVE_SETLOCALE
+  locale = setlocale(LC_ALL, "");
+  if (! locale) {
+    fprintf(stderr, "failed to set locale, reverting to \"C\"\n");
+#endif // HAVE_SETLOCALE
+    locale = "C";
+#ifdef    HAVE_SETLOCALE
+  } else {
+    // MB_CUR_MAX returns the size of a char in the current locale
+    if (MB_CUR_MAX > 1)
+      mb = True;
+    // truncate any encoding off the end of the locale
+    char *l = strchr(locale, '@');
+    if (l) *l = '\0';
+    l = strchr(locale, '.');
+    if (l) *l = '\0';
+  }
+
+#ifdef HAVE_CATOPEN
+  catalog_fd = (nl_catd) -1;
+#endif
+#endif // HAVE_SETLOCALE
+
+  catalog_filename = (char *) 0;
+}
+
+
+I18n::~I18n(void) {
+  delete [] catalog_filename;
+
+#if defined(NLS) && defined(HAVE_CATCLOSE)
+  if (catalog_fd != (nl_catd) -1)
+    catclose(catalog_fd);
+#endif // HAVE_CATCLOSE
+}
+
+
+void I18n::openCatalog(const char *catalog) {
+#if defined(NLS) && defined(HAVE_CATOPEN)
+  int lp = strlen(LOCALEPATH), lc = strlen(locale),
+      ct = strlen(catalog), len = lp + lc + ct + 3;
+  catalog_filename = new char[len];
+
+  strncpy(catalog_filename, LOCALEPATH, lp);
+  *(catalog_filename + lp) = '/';
+  strncpy(catalog_filename + lp + 1, locale, lc);
+  *(catalog_filename + lp + lc + 1) = '/';
+  strncpy(catalog_filename + lp + lc + 2, catalog, ct + 1);
+
+#  ifdef    MCLoadBySet
+  catalog_fd = catopen(catalog_filename, MCLoadBySet);
+#  else // !MCLoadBySet
+  catalog_fd = catopen(catalog_filename, NL_CAT_LOCALE);
+#  endif // MCLoadBySet
+
+  if (catalog_fd == (nl_catd) -1)
+    fprintf(stderr, "failed to open catalog, using default messages\n");
+#else // !HAVE_CATOPEN
+
+  catalog_filename = (char *) 0;
+#endif // HAVE_CATOPEN
+}
+
+
+const char *I18n::getMessage(int set, int msg, const char *msgString) const {
+#if   defined(NLS) && defined(HAVE_CATGETS)
+  if (catalog_fd != (nl_catd) -1)
+    return (const char *) catgets(catalog_fd, set, msg, msgString);
+  else
+#endif
+    return msgString;
+}
diff --git a/src/i18n.h b/src/i18n.h
new file mode 100644
index 00000000..b074b2ff
--- /dev/null
+++ b/src/i18n.h
@@ -0,0 +1,66 @@
+// i18n.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __i18n_h
+#define   __i18n_h
+
+// always include this just for the #defines
+// this keeps the calls to i18n->getMessage clean, otherwise we have to
+// add ifdefs to every call to getMessage
+#include "../nls/openbox-nls.h"
+
+#ifdef    HAVE_LOCALE_H
+#  include 
+#endif // HAVE_LOCALE_H
+
+#ifdef    HAVE_NL_TYPES_H
+extern "C" {
+#  include 
+}
+#endif // HAVE_NL_TYPES_H
+
+
+class I18n {
+private:
+  char *locale, *catalog_filename;
+  bool mb;
+#ifdef HAVE_NL_TYPES_H
+  nl_catd catalog_fd;
+#endif
+
+public:
+  I18n(void);
+  ~I18n(void);
+
+  inline bool multibyte(void) const { return mb; }
+
+  const char *getMessage(int set, int msg, const char *msgString) const;
+  void openCatalog(const char *catalog);
+};
+
+
+extern I18n *i18n;
+extern void NLSInit(const char *);
+
+
+
+#endif // __i18n_h
diff --git a/src/main.cc b/src/main.cc
new file mode 100644
index 00000000..0a0ad5ba
--- /dev/null
+++ b/src/main.cc
@@ -0,0 +1,186 @@
+// main.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#include "../version.h"
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include "i18n.h"
+#include "openbox.h"
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_UNISTD_H
+#include 
+#endif // HAVE_UNISTD_H
+
+#ifdef    HAVE_SYS_PARAM_H
+#  include 
+#endif // HAVE_SYS_PARAM_H
+
+#ifndef   MAXPATHLEN
+#define   MAXPATHLEN 255
+#endif // MAXPATHLEN
+
+
+static void showHelp(int exitval) {
+  // print program usage and command line options
+  printf(i18n->getMessage(mainSet, mainUsage,
+			  "Openbox %s : (c) 2002 - 2002 Ben Jansens\n"
+                          "\t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n\n"
+			  "\t\t\t  1997 - 2000 Brad Hughes\n\n"
+			  "  -display \t\tuse display connection.\n"
+			  "  -rc \t\t\tuse alternate resource file.\n"
+			  "  -version\t\t\tdisplay version and exit.\n"
+			  "  -help\t\t\t\tdisplay this help text and exit.\n\n"),
+	 __openbox_version);
+
+  // some people have requested that we print out compile options
+  // as well
+  fprintf(stdout,i18n->getMessage(mainSet, mainCompileOptions,
+				  "Compile time options:\n"
+				  "  Debugging:\t\t\t%s\n"
+				  "  Interlacing:\t\t\t%s\n"
+				  "  Shape:\t\t\t%s\n"
+				  "  Slit:\t\t\t\t%s\n"
+				  "  8bpp Ordered Dithering:\t%s\n"
+                                  "  Event Clobbering:\t\t%s\n\n"),
+#ifdef    DEBUG
+	  i18n->getMessage(CommonSet, CommonYes, "yes"),
+#else // !DEBUG
+	  i18n->getMessage(CommonSet, CommonNo, "no"),
+#endif // DEBUG
+
+#ifdef    INTERLACE
+	  i18n->getMessage(CommonSet, CommonYes, "yes"),
+#else // !INTERLACE
+	  i18n->getMessage(CommonSet, CommonNo, "no"),
+#endif // INTERLACE
+
+#ifdef    SHAPE
+	  i18n->getMessage(CommonSet, CommonYes, "yes"),
+#else // !SHAPE
+	  i18n->getMessage(CommonSet, CommonNo, "no"),
+#endif // SHAPE
+
+#ifdef    SLIT
+	  i18n->getMessage(CommonSet, CommonYes, "yes"),
+#else // !SLIT
+	  i18n->getMessage(CommonSet, CommonNo, "no"),
+#endif // SLIT
+
+#ifdef    ORDEREDPSEUDO
+	  i18n->getMessage(CommonSet, CommonYes, "yes"),
+#else // !ORDEREDPSEUDO
+	  i18n->getMessage(CommonSet, CommonNo, "no"),
+#endif // ORDEREDPSEUDO
+
+#ifndef   NOCLOBBER
+	  i18n->getMessage(CommonSet, CommonYes, "yes")
+#else // !NOCLOBBER
+	  i18n->getMessage(CommonSet, CommonNo, "no")
+#endif // NOCLOBBER
+	  );
+
+  ::exit(exitval);
+}
+
+int main(int argc, char **argv) {
+  char *session_display = (char *) 0;
+  char *rc_file = (char *) 0;
+
+  NLSInit("openbox.cat");
+
+  for (int i = 1; i < argc; ++i) {
+    if (! strcmp(argv[i], "-rc")) {
+      // look for alternative rc file to use
+
+      if ((++i) >= argc) {
+        fprintf(stderr,
+		i18n->getMessage(mainSet, mainRCRequiresArg,
+				 "error: '-rc' requires and argument\n"));
+
+        ::exit(1);
+      }
+
+      rc_file = argv[i];
+    } else if (! strcmp(argv[i], "-display")) {
+      // check for -display option... to run on a display other than the one
+      // set by the environment variable DISPLAY
+
+      if ((++i) >= argc) {
+	fprintf(stderr,
+		i18n->getMessage(mainSet, mainDISPLAYRequiresArg,
+				 "error: '-display' requires an argument\n"));
+
+	::exit(1);
+      }
+
+      session_display = argv[i];
+      char dtmp[MAXPATHLEN];
+      sprintf(dtmp, "DISPLAY=%s", session_display);
+
+      if (putenv(dtmp)) {
+	fprintf(stderr,
+		i18n->
+		getMessage(mainSet, mainWarnDisplaySet,
+		   "warning: couldn't set environment variable 'DISPLAY'\n"));
+	perror("putenv()");
+      }
+    } else if (! strcmp(argv[i], "-version")) {
+      // print current version string
+      printf("Openbox %s : (c) 1997 - 2000 Brad Hughes\n"
+	     "\t\t\t  2001 - 2002 Sean 'Shaleh' Perry\n",
+             __openbox_version);
+
+      ::exit(0);
+    } else if (! strcmp(argv[i], "-help")) {
+      showHelp(0);
+    } else { // invalid command line option
+      showHelp(-1);
+    }
+  }
+
+#ifdef    __EMX__
+  _chdir2(getenv("X11ROOT"));
+#endif // __EMX__
+
+  Openbox openbox(argc, argv, session_display, rc_file);
+  openbox.eventLoop();
+
+  return(0);
+}
diff --git a/src/openbox.cc b/src/openbox.cc
new file mode 100644
index 00000000..ad3ecc01
--- /dev/null
+++ b/src/openbox.cc
@@ -0,0 +1,1797 @@
+// openbox.cc for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+// stupid macros needed to access some functions in version 2 of the GNU C
+// library
+#ifndef   _GNU_SOURCE
+#define   _GNU_SOURCE
+#endif // _GNU_SOURCE
+
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef    SHAPE
+#include 
+#endif // SHAPE
+
+#include "i18n.h"
+#include "openbox.h"
+#include "Basemenu.h"
+#include "Clientmenu.h"
+#include "Rootmenu.h"
+#include "Screen.h"
+
+#ifdef    SLIT
+#include "Slit.h"
+#endif // SLIT
+
+#include "Toolbar.h"
+#include "Window.h"
+#include "Workspace.h"
+#include "Workspacemenu.h"
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_UNISTD_H
+#  include 
+#  include 
+#endif // HAVE_UNISTD_H
+
+#ifdef    HAVE_SYS_PARAM_H
+#  include 
+#endif // HAVE_SYS_PARAM_H
+
+#ifndef   MAXPATHLEN
+#define   MAXPATHLEN 255
+#endif // MAXPATHLEN
+
+#ifdef    HAVE_SYS_SELECT_H
+#  include 
+#endif // HAVE_SYS_SELECT_H
+
+#ifdef    HAVE_SIGNAL_H
+#  include 
+#endif // HAVE_SIGNAL_H
+
+#ifdef    HAVE_SYS_SIGNAL_H
+#  include 
+#endif // HAVE_SYS_SIGNAL_H
+
+#ifdef    HAVE_SYS_STAT_H
+#  include 
+#  include 
+#endif // HAVE_SYS_STAT_H
+
+#ifdef    TIME_WITH_SYS_TIME
+#  include 
+#  include 
+#else // !TIME_WITH_SYS_TIME
+#  ifdef    HAVE_SYS_TIME_H
+#    include 
+#  else // !HAVE_SYS_TIME_H
+#    include 
+#  endif // HAVE_SYS_TIME_H
+#endif // TIME_WITH_SYS_TIME
+
+#ifdef    HAVE_LIBGEN_H
+#  include 
+#endif // HAVE_LIBGEN_H
+
+#ifndef   HAVE_BASENAME
+static inline char *basename (char *s) {
+  char *save = s;
+
+  while (*s) if (*s++ == '/') save = s;
+
+  return save;
+}
+#endif // HAVE_BASENAME
+
+
+// X event scanner for enter/leave notifies - adapted from twm
+typedef struct scanargs {
+  Window w;
+  Bool leave, inferior, enter;
+} scanargs;
+
+static Bool queueScanner(Display *, XEvent *e, char *args) {
+  if ((e->type == LeaveNotify) &&
+      (e->xcrossing.window == ((scanargs *) args)->w) &&
+      (e->xcrossing.mode == NotifyNormal)) {
+    ((scanargs *) args)->leave = True;
+    ((scanargs *) args)->inferior = (e->xcrossing.detail == NotifyInferior);
+  } else if ((e->type == EnterNotify) &&
+             (e->xcrossing.mode == NotifyUngrab)) {
+    ((scanargs *) args)->enter = True;
+  }
+
+  return False;
+}
+
+Openbox *openbox;
+
+
+Openbox::Openbox(int m_argc, char **m_argv, char *dpy_name, char *rc)
+  : BaseDisplay(m_argv[0], dpy_name) {
+  grab();
+
+  if (! XSupportsLocale())
+    fprintf(stderr, "X server does not support locale\n");
+
+  if (XSetLocaleModifiers("") == NULL)
+    fprintf(stderr, "cannot set locale modifiers\n");
+
+  ::openbox = this;
+  argc = m_argc;
+  argv = m_argv;
+  if (rc == NULL) {
+    char *homedir = getenv("HOME");
+
+    rc_file = new char[strlen(homedir) + strlen("/.openbox/rc") + 1];
+    sprintf(rc_file, "%s/.openbox", homedir);
+
+    // try to make sure the ~/.openbox directory exists
+    mkdir(rc_file, S_IREAD | S_IWRITE | S_IEXEC | S_IRGRP | S_IWGRP | S_IXGRP |
+          S_IROTH | S_IWOTH | S_IXOTH);
+    
+    sprintf(rc_file, "%s/.openbox/rc", homedir);
+  } else {
+    rc_file = bstrdup(rc);
+  }
+
+  no_focus = False;
+
+  resource.menu_file = resource.style_file = (char *) 0;
+  resource.titlebar_layout = (char *) NULL;
+  resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec = 0;
+
+  focused_window = masked_window = (OpenboxWindow *) 0;
+  masked = None;
+
+  windowSearchList = new LinkedList;
+  menuSearchList = new LinkedList;
+
+#ifdef    SLIT
+  slitSearchList = new LinkedList;
+#endif // SLIT
+
+  toolbarSearchList = new LinkedList;
+  groupSearchList = new LinkedList;
+
+  menuTimestamps = new LinkedList;
+
+  XrmInitialize();
+  load_rc();
+
+#ifdef    HAVE_GETPID
+  openbox_pid = XInternAtom(getXDisplay(), "_BLACKBOX_PID", False);
+#endif // HAVE_GETPID
+
+  screenList = new LinkedList;
+  for (int i = 0; i < getNumberOfScreens(); i++) {
+    BScreen *screen = new BScreen(this, i);
+
+    if (! screen->isScreenManaged()) {
+      delete screen;
+      continue;
+    }
+
+    screenList->insert(screen);
+  }
+
+  if (! screenList->count()) {
+    fprintf(stderr,
+	    i18n->getMessage(openboxSet, openboxNoManagableScreens,
+	       "Openbox::Openbox: no managable screens found, aborting.\n"));
+    ::exit(3);
+  }
+
+  XSynchronize(getXDisplay(), False);
+  XSync(getXDisplay(), False);
+
+  reconfigure_wait = reread_menu_wait = False;
+
+  timer = new BTimer(this, this);
+  timer->setTimeout(0);
+  timer->fireOnce(True);
+
+  ungrab();
+}
+
+
+Openbox::~Openbox(void) {
+  while (screenList->count())
+    delete screenList->remove(0);
+
+  while (menuTimestamps->count()) {
+    MenuTimestamp *ts = menuTimestamps->remove(0);
+
+    if (ts->filename)
+      delete [] ts->filename;
+
+    delete ts;
+  }
+
+  if (resource.menu_file)
+    delete [] resource.menu_file;
+
+  if (resource.style_file)
+    delete [] resource.style_file;
+
+  delete timer;
+
+  delete screenList;
+  delete menuTimestamps;
+
+  delete windowSearchList;
+  delete menuSearchList;
+  delete toolbarSearchList;
+  delete groupSearchList;
+
+  delete [] rc_file;
+
+#ifdef    SLIT
+  delete slitSearchList;
+#endif // SLIT
+}
+
+
+void Openbox::process_event(XEvent *e) {
+  if ((masked == e->xany.window) && masked_window &&
+      (e->type == MotionNotify)) {
+    last_time = e->xmotion.time;
+    masked_window->motionNotifyEvent(&e->xmotion);
+
+    return;
+  }
+
+  switch (e->type) {
+  case ButtonPress: {
+    // strip the lock key modifiers
+    e->xbutton.state &= ~(NumLockMask | ScrollLockMask | LockMask);
+
+    last_time = e->xbutton.time;
+
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+    Basemenu *menu = (Basemenu *) 0;
+
+#ifdef    SLIT
+    Slit *slit = (Slit *) 0;
+#endif // SLIT
+
+    Toolbar *tbar = (Toolbar *) 0;
+
+    if ((win = searchWindow(e->xbutton.window))) {
+      win->buttonPressEvent(&e->xbutton);
+
+      if (e->xbutton.button == 1)
+	win->installColormap(True);
+    } else if ((menu = searchMenu(e->xbutton.window))) {
+      menu->buttonPressEvent(&e->xbutton);
+
+#ifdef    SLIT
+    } else if ((slit = searchSlit(e->xbutton.window))) {
+      slit->buttonPressEvent(&e->xbutton);
+#endif // SLIT
+
+    } else if ((tbar = searchToolbar(e->xbutton.window))) {
+      tbar->buttonPressEvent(&e->xbutton);
+    } else {
+      LinkedListIterator it(screenList);
+      BScreen *screen = it.current();
+      for (; screen; it++, screen = it.current()) {
+	if (e->xbutton.window == screen->getRootWindow()) {
+	  if (e->xbutton.button == 1) {
+            if (! screen->isRootColormapInstalled())
+	      screen->getImageControl()->installRootColormap();
+
+	    if (screen->getWorkspacemenu()->isVisible())
+	      screen->getWorkspacemenu()->hide();
+
+            if (screen->getRootmenu()->isVisible())
+              screen->getRootmenu()->hide();
+          } else if (e->xbutton.button == 2) {
+	    int mx = e->xbutton.x_root -
+	      (screen->getWorkspacemenu()->getWidth() / 2);
+	    int my = e->xbutton.y_root -
+	      (screen->getWorkspacemenu()->getTitleHeight() / 2);
+
+	    if (mx < 0) mx = 0;
+	    if (my < 0) my = 0;
+
+	    if (mx + screen->getWorkspacemenu()->getWidth() >
+		screen->getWidth())
+	      mx = screen->getWidth() -
+		screen->getWorkspacemenu()->getWidth() -
+		screen->getBorderWidth();
+
+	    if (my + screen->getWorkspacemenu()->getHeight() >
+		screen->getHeight())
+	      my = screen->getHeight() -
+		screen->getWorkspacemenu()->getHeight() -
+		screen->getBorderWidth();
+
+	    screen->getWorkspacemenu()->move(mx, my);
+
+	    if (! screen->getWorkspacemenu()->isVisible()) {
+	      screen->getWorkspacemenu()->removeParent();
+	      screen->getWorkspacemenu()->show();
+	    }
+	  } else if (e->xbutton.button == 3) {
+	    int mx = e->xbutton.x_root -
+	      (screen->getRootmenu()->getWidth() / 2);
+	    int my = e->xbutton.y_root -
+	      (screen->getRootmenu()->getTitleHeight() / 2);
+
+	    if (mx < 0) mx = 0;
+	    if (my < 0) my = 0;
+
+	    if (mx + screen->getRootmenu()->getWidth() > screen->getWidth())
+	      mx = screen->getWidth() -
+		screen->getRootmenu()->getWidth() -
+		screen->getBorderWidth();
+
+	    if (my + screen->getRootmenu()->getHeight() > screen->getHeight())
+		my = screen->getHeight() -
+		  screen->getRootmenu()->getHeight() -
+		  screen->getBorderWidth();
+
+	    screen->getRootmenu()->move(mx, my);
+
+	    if (! screen->getRootmenu()->isVisible()) {
+	      checkMenu();
+	      screen->getRootmenu()->show();
+	    }
+          } else if (e->xbutton.button == 4) {
+            if ((screen->getCurrentWorkspaceID()-1)<0)
+              screen->changeWorkspaceID(screen->getCount()-1);
+            else
+              screen->changeWorkspaceID(screen->getCurrentWorkspaceID()-1);
+          } else if (e->xbutton.button == 5) {
+            if ((screen->getCurrentWorkspaceID()+1)>screen->getCount()-1)
+              screen->changeWorkspaceID(0);
+            else
+              screen->changeWorkspaceID(screen->getCurrentWorkspaceID()+1);
+          }
+        }
+      }
+    }
+
+    break;
+  }
+
+  case ButtonRelease: {
+    // strip the lock key modifiers
+    e->xbutton.state &= ~(NumLockMask | ScrollLockMask | LockMask);
+
+    last_time = e->xbutton.time;
+
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+    Basemenu *menu = (Basemenu *) 0;
+    Toolbar *tbar = (Toolbar *) 0;
+
+    if ((win = searchWindow(e->xbutton.window)))
+      win->buttonReleaseEvent(&e->xbutton);
+    else if ((menu = searchMenu(e->xbutton.window)))
+      menu->buttonReleaseEvent(&e->xbutton);
+    else if ((tbar = searchToolbar(e->xbutton.window)))
+      tbar->buttonReleaseEvent(&e->xbutton);
+
+    break;
+  }
+
+  case ConfigureRequest: {
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+
+#ifdef    SLIT
+    Slit *slit = (Slit *) 0;
+#endif // SLIT
+
+    if ((win = searchWindow(e->xconfigurerequest.window))) {
+      win->configureRequestEvent(&e->xconfigurerequest);
+
+#ifdef    SLIT
+    } else if ((slit = searchSlit(e->xconfigurerequest.window))) {
+      slit->configureRequestEvent(&e->xconfigurerequest);
+#endif // SLIT
+
+    } else {
+      grab();
+
+      if (validateWindow(e->xconfigurerequest.window)) {
+	XWindowChanges xwc;
+
+	xwc.x = e->xconfigurerequest.x;
+	xwc.y = e->xconfigurerequest.y;
+	xwc.width = e->xconfigurerequest.width;
+	xwc.height = e->xconfigurerequest.height;
+	xwc.border_width = e->xconfigurerequest.border_width;
+	xwc.sibling = e->xconfigurerequest.above;
+	xwc.stack_mode = e->xconfigurerequest.detail;
+
+	XConfigureWindow(getXDisplay(), e->xconfigurerequest.window,
+			 e->xconfigurerequest.value_mask, &xwc);
+      }
+
+      ungrab();
+    }
+
+    break;
+  }
+
+  case MapRequest: {
+#ifdef    DEBUG
+    fprintf(stderr,
+	    i18n->getMessage(openboxSet, openboxMapRequest,
+		 "Openbox::process_event(): MapRequest for 0x%lx\n"),
+	    e->xmaprequest.window);
+#endif // DEBUG
+
+    OpenboxWindow *win = searchWindow(e->xmaprequest.window);
+
+    if (! win)
+      win = new OpenboxWindow(this, e->xmaprequest.window);
+
+    if ((win = searchWindow(e->xmaprequest.window)))
+      win->mapRequestEvent(&e->xmaprequest);
+
+    break;
+  }
+
+  case MapNotify: {
+    OpenboxWindow *win = searchWindow(e->xmap.window);
+
+    if (win)
+      win->mapNotifyEvent(&e->xmap);
+
+      break;
+  }
+
+  case UnmapNotify: {
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+
+#ifdef    SLIT
+    Slit *slit = (Slit *) 0;
+#endif // SLIT
+
+    if ((win = searchWindow(e->xunmap.window))) {
+      win->unmapNotifyEvent(&e->xunmap);
+      if (focused_window == win)
+	focused_window = (OpenboxWindow *) 0;
+#ifdef    SLIT
+    } else if ((slit = searchSlit(e->xunmap.window))) {
+      slit->removeClient(e->xunmap.window);
+#endif // SLIT
+
+    }
+
+    break;
+  }
+
+  case DestroyNotify: {
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+
+#ifdef    SLIT
+    Slit *slit = (Slit *) 0;
+#endif // SLIT
+
+    if ((win = searchWindow(e->xdestroywindow.window))) {
+      win->destroyNotifyEvent(&e->xdestroywindow);
+      if (focused_window == win)
+	focused_window = (OpenboxWindow *) 0;
+#ifdef    SLIT
+    } else if ((slit = searchSlit(e->xdestroywindow.window))) {
+      slit->removeClient(e->xdestroywindow.window, False);
+#endif // SLIT
+    }
+
+    break;
+  }
+
+  case MotionNotify: {
+    // strip the lock key modifiers
+    e->xbutton.state &= ~(NumLockMask | ScrollLockMask | LockMask);
+    
+    last_time = e->xmotion.time;
+
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+    Basemenu *menu = (Basemenu *) 0;
+
+    if ((win = searchWindow(e->xmotion.window)))
+      win->motionNotifyEvent(&e->xmotion);
+    else if ((menu = searchMenu(e->xmotion.window)))
+      menu->motionNotifyEvent(&e->xmotion);
+
+    break;
+  }
+
+  case PropertyNotify: {
+    last_time = e->xproperty.time;
+
+    if (e->xproperty.state != PropertyDelete) {
+      OpenboxWindow *win = searchWindow(e->xproperty.window);
+
+      if (win)
+	win->propertyNotifyEvent(e->xproperty.atom);
+    }
+
+    break;
+  }
+
+  case EnterNotify: {
+    last_time = e->xcrossing.time;
+
+    BScreen *screen = (BScreen *) 0;
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+    Basemenu *menu = (Basemenu *) 0;
+    Toolbar *tbar = (Toolbar *) 0;
+
+#ifdef    SLIT
+    Slit *slit = (Slit *) 0;
+#endif // SLIT
+
+    if (e->xcrossing.mode == NotifyGrab) break;
+
+    XEvent dummy;
+    scanargs sa;
+    sa.w = e->xcrossing.window;
+    sa.enter = sa.leave = False;
+    XCheckIfEvent(getXDisplay(), &dummy, queueScanner, (char *) &sa);
+
+    if ((e->xcrossing.window == e->xcrossing.root) &&
+	(screen = searchScreen(e->xcrossing.window))) {
+      screen->getImageControl()->installRootColormap();
+    } else if ((win = searchWindow(e->xcrossing.window))) {
+      if (win->getScreen()->isSloppyFocus() &&
+	  (! win->isFocused()) && (! no_focus)) {
+	grab();
+
+        if (((! sa.leave) || sa.inferior) && win->isVisible() &&
+            win->setInputFocus())
+	  win->installColormap(True);
+
+        ungrab();
+      }
+    } else if ((menu = searchMenu(e->xcrossing.window))) {
+      menu->enterNotifyEvent(&e->xcrossing);
+    } else if ((tbar = searchToolbar(e->xcrossing.window))) {
+      tbar->enterNotifyEvent(&e->xcrossing);
+#ifdef    SLIT
+    } else if ((slit = searchSlit(e->xcrossing.window))) {
+      slit->enterNotifyEvent(&e->xcrossing);
+#endif // SLIT
+    }
+    break;
+  }
+
+  case LeaveNotify: {
+    last_time = e->xcrossing.time;
+
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+    Basemenu *menu = (Basemenu *) 0;
+    Toolbar *tbar = (Toolbar *) 0;
+
+#ifdef    SLIT
+    Slit *slit = (Slit *) 0;
+#endif // SLIT
+
+    if ((menu = searchMenu(e->xcrossing.window)))
+      menu->leaveNotifyEvent(&e->xcrossing);
+    else if ((win = searchWindow(e->xcrossing.window)))
+      win->installColormap(False);
+    else if ((tbar = searchToolbar(e->xcrossing.window)))
+      tbar->leaveNotifyEvent(&e->xcrossing);
+#ifdef    SLIT
+    else if ((slit = searchSlit(e->xcrossing.window)))
+      slit->leaveNotifyEvent(&e->xcrossing);
+#endif // SLIT
+
+    break;
+  }
+
+  case Expose: {
+    OpenboxWindow *win = (OpenboxWindow *) 0;
+    Basemenu *menu = (Basemenu *) 0;
+    Toolbar *tbar = (Toolbar *) 0;
+
+    if ((win = searchWindow(e->xexpose.window)))
+      win->exposeEvent(&e->xexpose);
+    else if ((menu = searchMenu(e->xexpose.window)))
+      menu->exposeEvent(&e->xexpose);
+    else if ((tbar = searchToolbar(e->xexpose.window)))
+      tbar->exposeEvent(&e->xexpose);
+
+    break;
+  }
+
+  case KeyPress: {
+    Toolbar *tbar = searchToolbar(e->xkey.window);
+
+    if (tbar && tbar->isEditing())
+      tbar->keyPressEvent(&e->xkey);
+
+    break;
+  }
+
+  case ColormapNotify: {
+    BScreen *screen = searchScreen(e->xcolormap.window);
+
+    if (screen)
+      screen->setRootColormapInstalled((e->xcolormap.state ==
+					ColormapInstalled) ? True : False);
+
+    break;
+  }
+
+  case FocusIn: {
+    if (e->xfocus.mode == NotifyUngrab || e->xfocus.detail == NotifyPointer)
+      break;
+
+    OpenboxWindow *win = searchWindow(e->xfocus.window);
+    if (win && ! win->isFocused())
+      setFocusedWindow(win);
+
+    break;
+  }
+
+  case FocusOut:
+    break;
+
+  case ClientMessage: {
+    if (e->xclient.format == 32) {
+      if (e->xclient.message_type == getWMChangeStateAtom()) {
+        OpenboxWindow *win = searchWindow(e->xclient.window);
+        if (! win || ! win->validateClient()) return;
+
+        if (e->xclient.data.l[0] == IconicState)
+	  win->iconify();
+        if (e->xclient.data.l[0] == NormalState)
+          win->deiconify();
+      } else if (e->xclient.message_type == getOpenboxChangeWorkspaceAtom()) {
+	BScreen *screen = searchScreen(e->xclient.window);
+
+	if (screen && e->xclient.data.l[0] >= 0 &&
+	    e->xclient.data.l[0] < screen->getCount())
+	  screen->changeWorkspaceID(e->xclient.data.l[0]);
+      } else if (e->xclient.message_type == getOpenboxChangeWindowFocusAtom()) {
+	OpenboxWindow *win = searchWindow(e->xclient.window);
+
+	if (win && win->isVisible() && win->setInputFocus())
+          win->installColormap(True);
+      } else if (e->xclient.message_type == getOpenboxCycleWindowFocusAtom()) {
+        BScreen *screen = searchScreen(e->xclient.window);
+
+        if (screen) {
+          if (! e->xclient.data.l[0])
+            screen->prevFocus();
+          else
+            screen->nextFocus();
+	}
+      } else if (e->xclient.message_type == getOpenboxChangeAttributesAtom()) {
+	OpenboxWindow *win = searchWindow(e->xclient.window);
+
+	if (win && win->validateClient()) {
+	  OpenboxHints net;
+	  net.flags = e->xclient.data.l[0];
+	  net.attrib = e->xclient.data.l[1];
+	  net.workspace = e->xclient.data.l[2];
+	  net.stack = e->xclient.data.l[3];
+	  net.decoration = e->xclient.data.l[4];
+
+	  win->changeOpenboxHints(&net);
+	}
+      }
+    }
+
+    break;
+  }
+
+
+  default: {
+#ifdef    SHAPE
+    if (e->type == getShapeEventBase()) {
+      XShapeEvent *shape_event = (XShapeEvent *) e;
+      OpenboxWindow *win = (OpenboxWindow *) 0;
+
+      if ((win = searchWindow(e->xany.window)) ||
+	  (shape_event->kind != ShapeBounding))
+	win->shapeEvent(shape_event);
+    }
+#endif // SHAPE
+
+  }
+  } // switch
+}
+
+
+Bool Openbox::handleSignal(int sig) {
+  switch (sig) {
+  case SIGHUP:
+    reconfigure();
+    break;
+
+  case SIGUSR1:
+    reload_rc();
+    break;
+
+  case SIGUSR2:
+    rereadMenu();
+    break;
+
+  case SIGPIPE:
+  case SIGSEGV:
+  case SIGFPE:
+  case SIGINT:
+  case SIGTERM:
+    shutdown();
+
+  default:
+    return False;
+  }
+
+  return True;
+}
+
+
+BScreen *Openbox::searchScreen(Window window) {
+  LinkedListIterator it(screenList);
+
+  for (BScreen *curr = it.current(); curr; it++, curr = it.current()) {
+    if (curr->getRootWindow() == window) {
+      return curr;
+    }
+  }
+
+  return (BScreen *) 0;
+}
+
+
+OpenboxWindow *Openbox::searchWindow(Window window) {
+  LinkedListIterator it(windowSearchList);
+
+  for (WindowSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+      if (tmp->getWindow() == window) {
+	return tmp->getData();
+      }
+  }
+
+  return (OpenboxWindow *) 0;
+}
+
+
+OpenboxWindow *Openbox::searchGroup(Window window, OpenboxWindow *win) {
+  OpenboxWindow *w = (OpenboxWindow *) 0;
+  LinkedListIterator it(groupSearchList);
+
+  for (WindowSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window) {
+      w = tmp->getData();
+      if (w->getClientWindow() != win->getClientWindow())
+        return win;
+    }
+  }
+
+  return (OpenboxWindow *) 0;
+}
+
+
+Basemenu *Openbox::searchMenu(Window window) {
+  LinkedListIterator it(menuSearchList);
+
+  for (MenuSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window)
+      return tmp->getData();
+  }
+
+  return (Basemenu *) 0;
+}
+
+
+Toolbar *Openbox::searchToolbar(Window window) {
+  LinkedListIterator it(toolbarSearchList);
+
+  for (ToolbarSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window)
+      return tmp->getData();
+  }
+
+  return (Toolbar *) 0;
+}
+
+
+#ifdef    SLIT
+Slit *Openbox::searchSlit(Window window) {
+  LinkedListIterator it(slitSearchList);
+
+  for (SlitSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window)
+      return tmp->getData();
+  }
+
+  return (Slit *) 0;
+}
+#endif // SLIT
+
+
+void Openbox::saveWindowSearch(Window window, OpenboxWindow *data) {
+  windowSearchList->insert(new WindowSearch(window, data));
+}
+
+
+void Openbox::saveGroupSearch(Window window, OpenboxWindow *data) {
+  groupSearchList->insert(new WindowSearch(window, data));
+}
+
+
+void Openbox::saveMenuSearch(Window window, Basemenu *data) {
+  menuSearchList->insert(new MenuSearch(window, data));
+}
+
+
+void Openbox::saveToolbarSearch(Window window, Toolbar *data) {
+  toolbarSearchList->insert(new ToolbarSearch(window, data));
+}
+
+
+#ifdef    SLIT
+void Openbox::saveSlitSearch(Window window, Slit *data) {
+  slitSearchList->insert(new SlitSearch(window, data));
+}
+#endif // SLIT
+
+
+void Openbox::removeWindowSearch(Window window) {
+  LinkedListIterator it(windowSearchList);
+  for (WindowSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window) {
+      windowSearchList->remove(tmp);
+      delete tmp;
+      break;
+    }
+  }
+}
+
+
+void Openbox::removeGroupSearch(Window window) {
+  LinkedListIterator it(groupSearchList);
+  for (WindowSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window) {
+      groupSearchList->remove(tmp);
+      delete tmp;
+      break;
+    }
+  }
+}
+
+
+void Openbox::removeMenuSearch(Window window) {
+  LinkedListIterator it(menuSearchList);
+  for (MenuSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window) {
+      menuSearchList->remove(tmp);
+      delete tmp;
+      break;
+    }
+  }
+}
+
+
+void Openbox::removeToolbarSearch(Window window) {
+  LinkedListIterator it(toolbarSearchList);
+  for (ToolbarSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window) {
+      toolbarSearchList->remove(tmp);
+      delete tmp;
+      break;
+    }
+  }
+}
+
+
+#ifdef    SLIT
+void Openbox::removeSlitSearch(Window window) {
+  LinkedListIterator it(slitSearchList);
+  for (SlitSearch *tmp = it.current(); tmp; it++, tmp = it.current()) {
+    if (tmp->getWindow() == window) {
+      slitSearchList->remove(tmp);
+      delete tmp;
+      break;
+    }
+  }
+}
+#endif // SLIT
+
+
+void Openbox::restart(const char *prog) {
+  shutdown();
+
+  if (prog) {
+    execlp(prog, prog, NULL);
+    perror(prog);
+  }
+
+  // fall back in case the above execlp doesn't work
+  execvp(argv[0], argv);
+  execvp(basename(argv[0]), argv);
+}
+
+
+void Openbox::shutdown(void) {
+  BaseDisplay::shutdown();
+
+  XSetInputFocus(getXDisplay(), PointerRoot, None, CurrentTime);
+
+  LinkedListIterator it(screenList);
+  for (BScreen *s = it.current(); s; it++, s = it.current())
+    s->shutdown();
+
+  XSync(getXDisplay(), False);
+
+  save_rc();
+}
+
+
+void Openbox::save_rc(void) {
+  XrmDatabase new_openboxrc = (XrmDatabase) 0;
+  char rc_string[1024];
+
+  load_rc();
+
+  sprintf(rc_string, "session.menuFile:  %s", resource.menu_file);
+  XrmPutLineResource(&new_openboxrc, rc_string);
+
+  sprintf(rc_string, "session.colorsPerChannel:  %d",
+          resource.colors_per_channel);
+  XrmPutLineResource(&new_openboxrc, rc_string);
+
+  sprintf(rc_string, "session.titlebarLayout:  %s",
+          resource.titlebar_layout);
+  XrmPutLineResource(&new_openboxrc, rc_string);
+
+  sprintf(rc_string, "session.doubleClickInterval:  %lu",
+          resource.double_click_interval);
+  XrmPutLineResource(&new_openboxrc, rc_string);
+
+  sprintf(rc_string, "session.autoRaiseDelay:  %lu",
+          ((resource.auto_raise_delay.tv_sec * 1000) +
+           (resource.auto_raise_delay.tv_usec / 1000)));
+  XrmPutLineResource(&new_openboxrc, rc_string);
+
+  sprintf(rc_string, "session.cacheLife: %lu", resource.cache_life / 60000);
+  XrmPutLineResource(&new_openboxrc, rc_string);
+
+  sprintf(rc_string, "session.cacheMax: %lu", resource.cache_max);
+  XrmPutLineResource(&new_openboxrc, rc_string);
+
+  LinkedListIterator it(screenList);
+  for (BScreen *screen = it.current(); screen; it++, screen = it.current()) {
+    int screen_number = screen->getScreenNumber();
+
+#ifdef    SLIT
+    char *slit_placement = (char *) 0;
+
+    switch (screen->getSlitPlacement()) {
+    case Slit::TopLeft: slit_placement = "TopLeft"; break;
+    case Slit::CenterLeft: slit_placement = "CenterLeft"; break;
+    case Slit::BottomLeft: slit_placement = "BottomLeft"; break;
+    case Slit::TopCenter: slit_placement = "TopCenter"; break;
+    case Slit::BottomCenter: slit_placement = "BottomCenter"; break;
+    case Slit::TopRight: slit_placement = "TopRight"; break;
+    case Slit::BottomRight: slit_placement = "BottomRight"; break;
+    case Slit::CenterRight: default: slit_placement = "CenterRight"; break;
+    }
+
+    sprintf(rc_string, "session.screen%d.slit.placement: %s", screen_number,
+	    slit_placement);
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.slit.direction: %s", screen_number,
+            ((screen->getSlitDirection() == Slit::Horizontal) ? "Horizontal" :
+                                                                "Vertical"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    const char *rootcmd;
+    if ((rootcmd = screen->getRootCommand()) != NULL) {
+      sprintf(rc_string, "session.screen%d.rootCommand: %s", screen_number,
+              rootcmd);
+      XrmPutLineResource(&new_openboxrc, rc_string);
+    }
+
+    sprintf(rc_string, "session.screen%d.slit.onTop: %s", screen_number,
+            ((screen->getSlit()->isOnTop()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.slit.autoHide: %s", screen_number,
+            ((screen->getSlit()->doAutoHide()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+#endif // SLIT
+
+    sprintf(rc_string, "session.opaqueMove: %s",
+	    ((screen->doOpaqueMove()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.imageDither: %s",
+	    ((screen->getImageControl()->doDither()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.fullMaximization: %s", screen_number,
+	    ((screen->doFullMax()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.focusNewWindows: %s", screen_number,
+            ((screen->doFocusNew()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.focusLastWindow: %s", screen_number,
+	    ((screen->doFocusLast()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.rowPlacementDirection: %s",
+	    screen_number,
+	    ((screen->getRowPlacementDirection() == BScreen::LeftRight) ?
+	     "LeftToRight" : "RightToLeft"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.colPlacementDirection: %s",
+	    screen_number,
+	    ((screen->getColPlacementDirection() == BScreen::TopBottom) ?
+	     "TopToBottom" : "BottomToTop"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    char *placement = (char *) 0;
+    switch (screen->getPlacementPolicy()) {
+    case BScreen::CascadePlacement:
+      placement = "CascadePlacement";
+      break;
+
+    case BScreen::ColSmartPlacement:
+      placement = "ColSmartPlacement";
+      break;
+
+    case BScreen::RowSmartPlacement:
+    default:
+      placement = "RowSmartPlacement";
+      break;
+    }
+    sprintf(rc_string, "session.screen%d.windowPlacement:  %s", screen_number,
+	    placement);
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.windowZones:  %i", screen_number,
+	    screen->getWindowZones());
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.focusModel:  %s", screen_number,
+	    ((screen->isSloppyFocus()) ?
+	     ((screen->doAutoRaise()) ? "AutoRaiseSloppyFocus" :
+	      "SloppyFocus") :
+	     "ClickToFocus"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.workspaces:  %d", screen_number,
+	    screen->getCount());
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.toolbar.onTop:  %s", screen_number,
+	    ((screen->getToolbar()->isOnTop()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.toolbar.autoHide:  %s", screen_number,
+	    ((screen->getToolbar()->doAutoHide()) ? "True" : "False"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    char *toolbar_placement = (char *) 0;
+
+    switch (screen->getToolbarPlacement()) {
+    case Toolbar::TopLeft: toolbar_placement = "TopLeft"; break;
+    case Toolbar::BottomLeft: toolbar_placement = "BottomLeft"; break;
+    case Toolbar::TopCenter: toolbar_placement = "TopCenter"; break;
+    case Toolbar::TopRight: toolbar_placement = "TopRight"; break;
+    case Toolbar::BottomRight: toolbar_placement = "BottomRight"; break;
+    case Toolbar::BottomCenter: default:
+      toolbar_placement = "BottomCenter"; break;
+    }
+
+    sprintf(rc_string, "session.screen%d.toolbar.placement: %s", screen_number,
+            toolbar_placement);
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    load_rc(screen);
+
+    // these are static, but may not be saved in the users .openbox/rc,
+    // writing these resources will allow the user to edit them at a later
+    // time... but loading the defaults before saving allows us to rewrite the
+    // users changes...
+
+#ifdef    HAVE_STRFTIME
+    sprintf(rc_string, "session.screen%d.strftimeFormat: %s", screen_number,
+	    screen->getStrftimeFormat());
+    XrmPutLineResource(&new_openboxrc, rc_string);
+#else // !HAVE_STRFTIME
+    sprintf(rc_string, "session.screen%d.dateFormat:  %s", screen_number,
+	    ((screen->getDateFormat() == B_EuropeanDate) ?
+	     "European" : "American"));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.clockFormat:  %d", screen_number,
+	    ((screen->isClock24Hour()) ? 24 : 12));
+    XrmPutLineResource(&new_openboxrc, rc_string);
+#endif // HAVE_STRFTIME
+
+    sprintf(rc_string, "session.screen%d.edgeSnapThreshold: %d", screen_number,
+	    screen->getEdgeSnapThreshold());
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    sprintf(rc_string, "session.screen%d.toolbar.widthPercent:  %d",
+            screen_number, screen->getToolbarWidthPercent());
+    XrmPutLineResource(&new_openboxrc, rc_string);
+
+    // write out the users workspace names
+    int i, len = 0;
+    for (i = 0; i < screen->getCount(); i++)
+      len += strlen((screen->getWorkspace(i)->getName()) ?
+		    screen->getWorkspace(i)->getName() : "Null") + 1;
+
+    char *resource_string = new char[len + 1024],
+      *save_string = new char[len], *save_string_pos = save_string,
+      *name_string_pos;
+    if (save_string) {
+      for (i = 0; i < screen->getCount(); i++) {
+	len = strlen((screen->getWorkspace(i)->getName()) ?
+		     screen->getWorkspace(i)->getName() : "Null") + 1;
+	name_string_pos =
+	  (char *) ((screen->getWorkspace(i)->getName()) ?
+		    screen->getWorkspace(i)->getName() : "Null");
+
+	while (--len) *(save_string_pos++) = *(name_string_pos++);
+	*(save_string_pos++) = ',';
+      }
+    }
+
+    *(--save_string_pos) = '\0';
+
+    sprintf(resource_string, "session.screen%d.workspaceNames:  %s",
+	    screen_number, save_string);
+    XrmPutLineResource(&new_openboxrc, resource_string);
+
+    delete [] resource_string;
+    delete [] save_string;
+  }
+
+  XrmDatabase old_openboxrc = XrmGetFileDatabase(rc_file);
+
+  XrmMergeDatabases(new_openboxrc, &old_openboxrc);
+  XrmPutFileDatabase(old_openboxrc, rc_file);
+  XrmDestroyDatabase(old_openboxrc);
+}
+
+
+void Openbox::load_rc(void) {
+  XrmDatabase database = (XrmDatabase) 0;
+
+  database = XrmGetFileDatabase(rc_file);
+
+  XrmValue value;
+  char *value_type;
+
+  if (resource.menu_file)
+    delete [] resource.menu_file;
+
+  if (XrmGetResource(database, "session.menuFile", "Session.MenuFile",
+		     &value_type, &value))
+    resource.menu_file = bstrdup(value.addr);
+  else
+    resource.menu_file = bstrdup(DEFAULTMENU);
+
+  if (XrmGetResource(database, "session.colorsPerChannel",
+		     "Session.ColorsPerChannel", &value_type, &value)) {
+    if (sscanf(value.addr, "%d", &resource.colors_per_channel) != 1) {
+      resource.colors_per_channel = 4;
+    } else {
+      if (resource.colors_per_channel < 2) resource.colors_per_channel = 2;
+      if (resource.colors_per_channel > 6) resource.colors_per_channel = 6;
+    }
+  } else {
+    resource.colors_per_channel = 4;
+  }
+
+  if (resource.style_file)
+    delete [] resource.style_file;
+
+  if (XrmGetResource(database, "session.styleFile", "Session.StyleFile",
+		     &value_type, &value))
+    resource.style_file = bstrdup(value.addr);
+  else
+    resource.style_file = bstrdup(DEFAULTSTYLE);
+
+  if (XrmGetResource(database, "session.titlebarLayout",
+                     "Session.TitlebarLayout", &value_type, &value)) {
+    resource.titlebar_layout = bstrdup(value.addr == NULL ? "ILMC" :
+                                       value.addr);
+  } else {
+    resource.titlebar_layout = bstrdup("ILMC");
+  }
+
+  if (XrmGetResource(database, "session.doubleClickInterval",
+		     "Session.DoubleClickInterval", &value_type, &value)) {
+    if (sscanf(value.addr, "%lu", &resource.double_click_interval) != 1)
+      resource.double_click_interval = 250;
+  } else {
+    resource.double_click_interval = 250;
+  }
+
+  if (XrmGetResource(database, "session.autoRaiseDelay",
+                     "Session.AutoRaiseDelay", &value_type, &value)) {
+    if (sscanf(value.addr, "%ld", &resource.auto_raise_delay.tv_usec) != 1)
+      resource.auto_raise_delay.tv_usec = 400;
+  } else {
+    resource.auto_raise_delay.tv_usec = 400;
+  }
+
+  resource.auto_raise_delay.tv_sec = resource.auto_raise_delay.tv_usec / 1000;
+  resource.auto_raise_delay.tv_usec -=
+    (resource.auto_raise_delay.tv_sec * 1000);
+  resource.auto_raise_delay.tv_usec *= 1000;
+
+  if (XrmGetResource(database, "session.cacheLife", "Session.CacheLife",
+                     &value_type, &value)) {
+    if (sscanf(value.addr, "%lu", &resource.cache_life) != 1)
+      resource.cache_life = 5l;
+  } else {
+    resource.cache_life = 5l;
+  }
+
+  resource.cache_life *= 60000;
+
+  if (XrmGetResource(database, "session.cacheMax", "Session.CacheMax",
+                     &value_type, &value)) {
+    if (sscanf(value.addr, "%lu", &resource.cache_max) != 1)
+      resource.cache_max = 200;
+  } else {
+    resource.cache_max = 200;
+  }
+}
+
+
+void Openbox::load_rc(BScreen *screen) {
+  XrmDatabase database = (XrmDatabase) 0;
+
+  database = XrmGetFileDatabase(rc_file);
+
+  XrmValue value;
+  char *value_type, name_lookup[1024], class_lookup[1024];
+  int screen_number = screen->getScreenNumber();
+
+  sprintf(name_lookup,  "session.screen%d.fullMaximization", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.FullMaximization", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+                     &value)) {
+    if (! strncasecmp(value.addr, "true", value.size))
+      screen->saveFullMax(True);
+    else
+      screen->saveFullMax(False);
+  } else {
+    screen->saveFullMax(False);
+  }
+  sprintf(name_lookup,  "session.screen%d.focusNewWindows", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.FocusNewWindows", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+                     &value)) {
+    if (! strncasecmp(value.addr, "true", value.size))
+      screen->saveFocusNew(True);
+    else
+      screen->saveFocusNew(False);
+  } else {
+    screen->saveFocusNew(False);
+  }
+  sprintf(name_lookup,  "session.screen%d.focusLastWindow", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.focusLastWindow", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (! strncasecmp(value.addr, "true", value.size))
+      screen->saveFocusLast(True);
+    else
+      screen->saveFocusLast(False);
+  } else {
+    screen->saveFocusLast(False);
+  }
+  sprintf(name_lookup,  "session.screen%d.rowPlacementDirection",
+	  screen_number);
+  sprintf(class_lookup, "Session.Screen%d.RowPlacementDirection",
+	  screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (! strncasecmp(value.addr, "righttoleft", value.size))
+      screen->saveRowPlacementDirection(BScreen::RightLeft);
+    else
+      screen->saveRowPlacementDirection(BScreen::LeftRight);
+  } else {
+    screen->saveRowPlacementDirection(BScreen::LeftRight);
+  }
+  sprintf(name_lookup,  "session.screen%d.colPlacementDirection",
+	  screen_number);
+  sprintf(class_lookup, "Session.Screen%d.ColPlacementDirection",
+	  screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (! strncasecmp(value.addr, "bottomtotop", value.size))
+      screen->saveColPlacementDirection(BScreen::BottomTop);
+    else
+      screen->saveColPlacementDirection(BScreen::TopBottom);
+  } else {
+    screen->saveColPlacementDirection(BScreen::TopBottom);
+  }
+  sprintf(name_lookup,  "session.screen%d.workspaces", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Workspaces", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    int i;
+    if (sscanf(value.addr, "%d", &i) != 1) i = 1;
+    screen->saveWorkspaces(i);
+  } else {
+    screen->saveWorkspaces(1);
+  }
+  sprintf(name_lookup,  "session.screen%d.toolbar.widthPercent",
+          screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Toolbar.WidthPercent",
+          screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    int i;
+    if (sscanf(value.addr, "%d", &i) != 1) i = 66;
+
+    if (i <= 0 || i > 100)
+      i = 66;
+
+    screen->saveToolbarWidthPercent(i);
+  } else {
+    screen->saveToolbarWidthPercent(66);
+  }
+  sprintf(name_lookup, "session.screen%d.toolbar.placement", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Toolbar.Placement", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+                     &value)) {
+    if (! strncasecmp(value.addr, "TopLeft", value.size))
+      screen->saveToolbarPlacement(Toolbar::TopLeft);
+    else if (! strncasecmp(value.addr, "BottomLeft", value.size))
+      screen->saveToolbarPlacement(Toolbar::BottomLeft);
+    else if (! strncasecmp(value.addr, "TopCenter", value.size))
+      screen->saveToolbarPlacement(Toolbar::TopCenter);
+    else if (! strncasecmp(value.addr, "TopRight", value.size))
+      screen->saveToolbarPlacement(Toolbar::TopRight);
+    else if (! strncasecmp(value.addr, "BottomRight", value.size))
+      screen->saveToolbarPlacement(Toolbar::BottomRight);
+    else
+      screen->saveToolbarPlacement(Toolbar::BottomCenter);
+  } else {
+    screen->saveToolbarPlacement(Toolbar::BottomCenter);
+  }
+  screen->removeWorkspaceNames();
+
+  sprintf(name_lookup,  "session.screen%d.workspaceNames", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.WorkspaceNames", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    char *search = bstrdup(value.addr);
+
+    for (int i = 0; i < screen->getNumberOfWorkspaces(); i++) {
+      char *nn;
+
+      if (! i) nn = strtok(search, ",");
+      else nn = strtok(NULL, ",");
+
+      if (nn) screen->addWorkspaceName(nn);
+      else break;
+    }
+
+    delete [] search;
+  }
+
+  sprintf(name_lookup,  "session.screen%d.toolbar.onTop", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Toolbar.OnTop", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (! strncasecmp(value.addr, "true", value.size))
+      screen->saveToolbarOnTop(True);
+    else
+      screen->saveToolbarOnTop(False);
+  } else {
+    screen->saveToolbarOnTop(False);
+  }
+  sprintf(name_lookup,  "session.screen%d.toolbar.autoHide", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Toolbar.autoHide", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (! strncasecmp(value.addr, "true", value.size))
+      screen->saveToolbarAutoHide(True);
+    else
+      screen->saveToolbarAutoHide(False);
+  } else {
+    screen->saveToolbarAutoHide(False);
+  }
+  sprintf(name_lookup,  "session.screen%d.focusModel", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.FocusModel", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (! strncasecmp(value.addr, "clicktofocus", value.size)) {
+      screen->saveAutoRaise(False);
+      screen->saveSloppyFocus(False);
+    } else if (! strncasecmp(value.addr, "autoraisesloppyfocus", value.size)) {
+      screen->saveSloppyFocus(True);
+      screen->saveAutoRaise(True);
+    } else {
+      screen->saveSloppyFocus(True);
+      screen->saveAutoRaise(False);
+    }
+  } else {
+    screen->saveSloppyFocus(True);
+    screen->saveAutoRaise(False);
+  }
+
+  sprintf(name_lookup,  "session.screen%d.windowZones", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.WindowZones", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+                     &value)) {
+    int i = atoi(value.addr);
+    screen->saveWindowZones((i == 1 || i == 2 || i == 4) ? i : 1);
+  } else {
+    screen->saveWindowZones(1);
+  }
+  
+  sprintf(name_lookup,  "session.screen%d.windowPlacement", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.WindowPlacement", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (! strncasecmp(value.addr, "RowSmartPlacement", value.size))
+      screen->savePlacementPolicy(BScreen::RowSmartPlacement);
+    else if (! strncasecmp(value.addr, "ColSmartPlacement", value.size))
+      screen->savePlacementPolicy(BScreen::ColSmartPlacement);
+    else
+      screen->savePlacementPolicy(BScreen::CascadePlacement);
+  } else {
+    screen->savePlacementPolicy(BScreen::RowSmartPlacement);
+  }
+#ifdef    SLIT
+  sprintf(name_lookup, "session.screen%d.slit.placement", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Slit.Placement", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (! strncasecmp(value.addr, "TopLeft", value.size))
+      screen->saveSlitPlacement(Slit::TopLeft);
+    else if (! strncasecmp(value.addr, "CenterLeft", value.size))
+      screen->saveSlitPlacement(Slit::CenterLeft);
+    else if (! strncasecmp(value.addr, "BottomLeft", value.size))
+      screen->saveSlitPlacement(Slit::BottomLeft);
+    else if (! strncasecmp(value.addr, "TopCenter", value.size))
+      screen->saveSlitPlacement(Slit::TopCenter);
+    else if (! strncasecmp(value.addr, "BottomCenter", value.size))
+      screen->saveSlitPlacement(Slit::BottomCenter);
+    else if (! strncasecmp(value.addr, "TopRight", value.size))
+      screen->saveSlitPlacement(Slit::TopRight);
+    else if (! strncasecmp(value.addr, "BottomRight", value.size))
+      screen->saveSlitPlacement(Slit::BottomRight);
+    else
+      screen->saveSlitPlacement(Slit::CenterRight);
+  } else {
+    screen->saveSlitPlacement(Slit::CenterRight);
+  }
+  sprintf(name_lookup, "session.screen%d.slit.direction", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Slit.Direction", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+                     &value)) {
+    if (! strncasecmp(value.addr, "Horizontal", value.size))
+      screen->saveSlitDirection(Slit::Horizontal);
+    else
+      screen->saveSlitDirection(Slit::Vertical);
+  } else {
+    screen->saveSlitDirection(Slit::Vertical);
+  }
+  sprintf(name_lookup, "session.screen%d.slit.onTop", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Slit.OnTop", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+                     &value)) {
+    if (! strncasecmp(value.addr, "True", value.size))
+      screen->saveSlitOnTop(True);
+    else
+      screen->saveSlitOnTop(False);
+  } else {
+    screen->saveSlitOnTop(False);
+  }
+  sprintf(name_lookup, "session.screen%d.slit.autoHide", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.Slit.AutoHide", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+                     &value)) {
+    if (! strncasecmp(value.addr, "True", value.size))
+      screen->saveSlitAutoHide(True);
+    else
+      screen->saveSlitAutoHide(False);
+  } else {
+    screen->saveSlitAutoHide(False);
+  }
+#endif // SLIT
+
+#ifdef    HAVE_STRFTIME
+  sprintf(name_lookup,  "session.screen%d.strftimeFormat", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.StrftimeFormat", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    screen->saveStrftimeFormat(value.addr);
+  } else {
+    screen->saveStrftimeFormat("%I:%M %p");
+  }
+#else //  HAVE_STRFTIME
+  sprintf(name_lookup,  "session.screen%d.dateFormat", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.DateFormat", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    if (strncasecmp(value.addr, "european", value.size))
+      screen->saveDateFormat(B_AmericanDate);
+    else
+      screen->saveDateFormat(B_EuropeanDate);
+  } else {
+    screen->saveDateFormat(B_AmericanDate);
+  }
+  sprintf(name_lookup,  "session.screen%d.clockFormat", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.ClockFormat", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    int clock;
+    if (sscanf(value.addr, "%d", &clock) != 1) screen->saveClock24Hour(False);
+    else if (clock == 24) screen->saveClock24Hour(True);
+    else screen->saveClock24Hour(False);
+  } else {
+    screen->saveClock24Hour(False);
+  }
+#endif // HAVE_STRFTIME
+
+  sprintf(name_lookup,  "session.screen%d.edgeSnapThreshold", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.EdgeSnapThreshold", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+		     &value)) {
+    int threshold;
+    if (sscanf(value.addr, "%d", &threshold) != 1)
+      screen->saveEdgeSnapThreshold(0);
+    else
+      screen->saveEdgeSnapThreshold(threshold);
+  } else {
+    screen->saveEdgeSnapThreshold(0);
+  }
+  sprintf(name_lookup,  "session.screen%d.imageDither", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.ImageDither", screen_number);
+  if (XrmGetResource(database, "session.imageDither", "Session.ImageDither",
+		     &value_type, &value)) {
+    if (! strncasecmp("true", value.addr, value.size))
+      screen->saveImageDither(True);
+    else
+      screen->saveImageDither(False);
+  } else {
+    screen->saveImageDither(True);
+  }
+
+  sprintf(name_lookup, "session.screen%d.rootCommand", screen_number);
+  sprintf(class_lookup, "Session.Screen%d.RootCommand", screen_number);
+  if (XrmGetResource(database, name_lookup, class_lookup, &value_type,
+                     &value)) {
+    screen->saveRootCommand(value.addr);
+  } else
+    screen->saveRootCommand(NULL);
+
+  if (XrmGetResource(database, "session.opaqueMove", "Session.OpaqueMove",
+                     &value_type, &value)) {
+    if (! strncasecmp("true", value.addr, value.size))
+      screen->saveOpaqueMove(True);
+    else
+      screen->saveOpaqueMove(False);
+  } else {
+    screen->saveOpaqueMove(False);
+  }
+  XrmDestroyDatabase(database);
+}
+
+
+void Openbox::reload_rc(void) {
+  load_rc();
+  reconfigure();
+}
+
+
+void Openbox::reconfigure(void) {
+  reconfigure_wait = True;
+
+  if (! timer->isTiming()) timer->start();
+}
+
+
+void Openbox::real_reconfigure(void) {
+  grab();
+
+  XrmDatabase new_openboxrc = (XrmDatabase) 0;
+  char style[MAXPATHLEN + 64];
+
+  sprintf(style, "session.styleFile: %s", resource.style_file);
+  XrmPutLineResource(&new_openboxrc, style);
+
+  XrmDatabase old_openboxrc = XrmGetFileDatabase(rc_file);
+
+  XrmMergeDatabases(new_openboxrc, &old_openboxrc);
+  XrmPutFileDatabase(old_openboxrc, rc_file);
+  if (old_openboxrc) XrmDestroyDatabase(old_openboxrc);
+
+  for (int i = 0, n = menuTimestamps->count(); i < n; i++) {
+    MenuTimestamp *ts = menuTimestamps->remove(0);
+
+    if (ts) {
+      if (ts->filename)
+	delete [] ts->filename;
+
+      delete ts;
+    }
+  }
+
+  LinkedListIterator it(screenList);
+  for (BScreen *screen = it.current(); screen; it++, screen = it.current()) {
+    screen->reconfigure();
+  }
+
+  ungrab();
+}
+
+
+void Openbox::checkMenu(void) {
+  Bool reread = False;
+  LinkedListIterator it(menuTimestamps);
+  for (MenuTimestamp *tmp = it.current(); tmp && (! reread);
+       it++, tmp = it.current()) {
+    struct stat buf;
+
+    if (! stat(tmp->filename, &buf)) {
+      if (tmp->timestamp != buf.st_ctime)
+        reread = True;
+    } else {
+      reread = True;
+    }
+  }
+
+  if (reread) rereadMenu();
+}
+
+
+void Openbox::rereadMenu(void) {
+  reread_menu_wait = True;
+
+  if (! timer->isTiming()) timer->start();
+}
+
+
+void Openbox::real_rereadMenu(void) {
+  for (int i = 0, n = menuTimestamps->count(); i < n; i++) {
+    MenuTimestamp *ts = menuTimestamps->remove(0);
+
+    if (ts) {
+      if (ts->filename)
+	delete [] ts->filename;
+
+      delete ts;
+    }
+  }
+
+  LinkedListIterator it(screenList);
+  for (BScreen *screen = it.current(); screen; it++, screen = it.current())
+    screen->rereadMenu();
+}
+
+
+void Openbox::saveStyleFilename(const char *filename) {
+  if (resource.style_file)
+    delete [] resource.style_file;
+
+  resource.style_file = bstrdup(filename);
+}
+
+
+void Openbox::saveMenuFilename(const char *filename) {
+  Bool found = False;
+
+  LinkedListIterator it(menuTimestamps);
+  for (MenuTimestamp *tmp = it.current(); tmp && (! found);
+       it++, tmp = it.current()) {
+    if (! strcmp(tmp->filename, filename)) found = True;
+  }
+  if (! found) {
+    struct stat buf;
+
+    if (! stat(filename, &buf)) {
+      MenuTimestamp *ts = new MenuTimestamp;
+
+      ts->filename = bstrdup(filename);
+      ts->timestamp = buf.st_ctime;
+
+      menuTimestamps->insert(ts);
+    }
+  }
+}
+
+
+void Openbox::timeout(void) {
+  if (reconfigure_wait)
+    real_reconfigure();
+
+  if (reread_menu_wait)
+    real_rereadMenu();
+
+  reconfigure_wait = reread_menu_wait = False;
+}
+
+
+void Openbox::setFocusedWindow(OpenboxWindow *win) {
+  BScreen *old_screen = (BScreen *) 0, *screen = (BScreen *) 0;
+  OpenboxWindow *old_win = (OpenboxWindow *) 0;
+  Toolbar *old_tbar = (Toolbar *) 0, *tbar = (Toolbar *) 0;
+  Workspace *old_wkspc = (Workspace *) 0, *wkspc = (Workspace *) 0;
+
+  if (focused_window) {
+    old_win = focused_window;
+    old_screen = old_win->getScreen();
+    old_tbar = old_screen->getToolbar();
+    old_wkspc = old_screen->getWorkspace(old_win->getWorkspaceNumber());
+
+    old_win->setFocusFlag(False);
+    old_wkspc->getMenu()->setItemSelected(old_win->getWindowNumber(), False);
+  }
+
+  if (win && ! win->isIconic()) {
+    screen = win->getScreen();
+    tbar = screen->getToolbar();
+    wkspc = screen->getWorkspace(win->getWorkspaceNumber());
+
+    focused_window = win;
+
+    win->setFocusFlag(True);
+    wkspc->getMenu()->setItemSelected(win->getWindowNumber(), True);
+  } else {
+    focused_window = (OpenboxWindow *) 0;
+  }
+
+  if (tbar)
+    tbar->redrawWindowLabel(True);
+  if (screen)
+    screen->updateNetizenWindowFocus();
+
+  if (old_tbar && old_tbar != tbar)
+    old_tbar->redrawWindowLabel(True);
+  if (old_screen && old_screen != screen)
+    old_screen->updateNetizenWindowFocus();
+}
diff --git a/src/openbox.h b/src/openbox.h
new file mode 100644
index 00000000..6f23e035
--- /dev/null
+++ b/src/openbox.h
@@ -0,0 +1,212 @@
+// openbox.h for Openbox
+// Copyright (c) 2001 Sean 'Shaleh' Perry 
+// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
+//
+// 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+// DEALINGS IN THE SOFTWARE.
+
+#ifndef   __openbox_hh
+#define   __openbox_hh
+
+#include 
+#include 
+
+#ifdef    HAVE_STDIO_H
+# include 
+#endif // HAVE_STDIO_H
+
+#ifdef    TIME_WITH_SYS_TIME
+#  include 
+#  include 
+#else // !TIME_WITH_SYS_TIME
+#  ifdef    HAVE_SYS_TIME_H
+#    include 
+#  else // !HAVE_SYS_TIME_H
+#    include 
+#  endif // HAVE_SYS_TIME_H
+#endif // TIME_WITH_SYS_TIME
+
+
+#include "LinkedList.h"
+#include "BaseDisplay.h"
+#include "Timer.h"
+
+//forward declaration
+class BScreen;
+class Openbox;
+class BImageControl;
+class OpenboxWindow;
+class Basemenu;
+class Toolbar;
+#ifdef    SLIT
+class Slit;
+#endif // SLIT
+
+template 
+class DataSearch {
+private:
+  Window window;
+  Z *data;
+
+public:
+  DataSearch(Window w, Z *d): window(w), data(d) {}
+
+  inline const Window &getWindow(void) const { return window; }
+  inline Z *getData(void) { return data; }
+};
+
+
+class Openbox : public BaseDisplay, public TimeoutHandler {
+private:
+  typedef struct MenuTimestamp {
+    char *filename;
+    time_t timestamp;
+  } MenuTimestamp;
+
+  struct resource {
+    Time double_click_interval;
+
+    char *menu_file, *style_file;
+    char *titlebar_layout;
+    int colors_per_channel;
+    timeval auto_raise_delay;
+    unsigned long cache_life, cache_max;
+  } resource;
+
+  typedef DataSearch WindowSearch;
+  LinkedList *windowSearchList, *groupSearchList;
+  typedef DataSearch MenuSearch;
+  LinkedList *menuSearchList;
+  typedef DataSearch ToolbarSearch;
+  LinkedList *toolbarSearchList;
+
+#ifdef    SLIT
+  typedef DataSearch SlitSearch;
+  LinkedList *slitSearchList;
+#endif // SLIT
+
+  LinkedList *menuTimestamps;
+  LinkedList *screenList;
+
+  OpenboxWindow *focused_window, *masked_window;
+  BTimer *timer;
+
+#ifdef    HAVE_GETPID
+  Atom openbox_pid;
+#endif // HAVE_GETPID
+
+  Bool no_focus, reconfigure_wait, reread_menu_wait;
+  Time last_time;
+  Window masked;
+  char *rc_file, **argv;
+  int argc;
+
+
+protected:
+  void load_rc(void);
+  void save_rc(void);
+  void reload_rc(void);
+  void real_rereadMenu(void);
+  void real_reconfigure(void);
+
+  virtual void process_event(XEvent *);
+
+
+public:
+  Openbox(int, char **, char * = 0, char * = 0);
+  virtual ~Openbox(void);
+
+#ifdef    HAVE_GETPID
+  inline const Atom &getOpenboxPidAtom(void) const { return openbox_pid; }
+#endif // HAVE_GETPID
+
+  Basemenu *searchMenu(Window);
+
+  OpenboxWindow *searchGroup(Window, OpenboxWindow *);
+  OpenboxWindow *searchWindow(Window);
+  inline OpenboxWindow *getFocusedWindow(void) { return focused_window; }
+
+  BScreen *getScreen(int);
+  BScreen *searchScreen(Window);
+
+  inline const Time &getDoubleClickInterval(void) const
+    { return resource.double_click_interval; }
+  inline const Time &getLastTime(void) const { return last_time; }
+
+  Toolbar *searchToolbar(Window);
+
+  inline const char *getStyleFilename(void) const
+    { return resource.style_file; }
+  inline const char *getMenuFilename(void) const
+    { return resource.menu_file; }
+
+  inline const int &getColorsPerChannel(void) const
+    { return resource.colors_per_channel; }
+
+  inline const timeval &getAutoRaiseDelay(void) const
+    { return resource.auto_raise_delay; }
+
+  inline const char *getTitleBarLayout(void) const
+    { return resource.titlebar_layout; }
+
+  inline const unsigned long &getCacheLife(void) const
+    { return resource.cache_life; }
+  inline const unsigned long &getCacheMax(void) const
+    { return resource.cache_max; }
+
+  inline void maskWindowEvents(Window w, OpenboxWindow *bw)
+    { masked = w; masked_window = bw; }
+  inline void setNoFocus(Bool f) { no_focus = f; }
+
+  void setFocusedWindow(OpenboxWindow *w);
+  void shutdown(void);
+  void load_rc(BScreen *);
+  void saveStyleFilename(const char *);
+  void saveMenuFilename(const char *);
+  void saveMenuSearch(Window, Basemenu *);
+  void saveWindowSearch(Window, OpenboxWindow *);
+  void saveToolbarSearch(Window, Toolbar *);
+  void saveGroupSearch(Window, OpenboxWindow *);
+  void removeMenuSearch(Window);
+  void removeWindowSearch(Window);
+  void removeToolbarSearch(Window);
+  void removeGroupSearch(Window);
+  void restart(const char * = 0);
+  void reconfigure(void);
+  void rereadMenu(void);
+  void checkMenu(void);
+
+  virtual Bool handleSignal(int);
+
+  virtual void timeout(void);
+
+#ifdef    SLIT
+  Slit *searchSlit(Window);
+
+  void saveSlitSearch(Window, Slit *);
+  void removeSlitSearch(Window);
+#endif // SLIT
+
+#ifndef   HAVE_STRFTIME
+
+  enum { B_AmericanDate = 1, B_EuropeanDate };
+#endif // HAVE_STRFTIME
+};
+
+
+#endif // __openbox_hh
diff --git a/stamp-h.in b/stamp-h.in
new file mode 100644
index 00000000..9788f702
--- /dev/null
+++ b/stamp-h.in
@@ -0,0 +1 @@
+timestamp
diff --git a/util/Makefile.am b/util/Makefile.am
new file mode 100644
index 00000000..3c75a4c4
--- /dev/null
+++ b/util/Makefile.am
@@ -0,0 +1,18 @@
+# util/Makefile.am for Openbox
+
+CPPFLAGS= @CPPFLAGS@ @DEBUG@ @NLS@ @TIMEDCACHE@ @NEWWMSPEC@ @INTERLACE@ \
+@ORDEREDPSEUDO@
+
+bin_SCRIPTS = 		bsetbg
+bin_PROGRAMS =		bsetroot
+
+bsetroot_SOURCES =	bsetroot.cc
+bsetroot_LDADD =	../src/BaseDisplay.o ../src/LinkedList.o ../src/Timer.o ../src/Image.o ../src/i18n.o
+
+MAINTAINERCLEANFILES =	Makefile.in
+
+distclean-local:
+	rm -f *\~
+
+bsetroot.o: bsetroot.cc ../config.h bsetroot.h ../src/BaseDisplay.h \
+ ../src/LinkedList.h ../src/Timer.h ../src/Image.h
diff --git a/util/Makefile.in b/util/Makefile.in
new file mode 100644
index 00000000..aefa5e99
--- /dev/null
+++ b/util/Makefile.in
@@ -0,0 +1,385 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# util/Makefile.am for Openbox
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+CC = @CC@
+CLOBBER = @CLOBBER@
+CXX = @CXX@
+DEBUG = @DEBUG@
+INTERLACE = @INTERLACE@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+NEWWMSPEC = @NEWWMSPEC@
+NLS = @NLS@
+ORDEREDPSEUDO = @ORDEREDPSEUDO@
+PACKAGE = @PACKAGE@
+SHAPE = @SHAPE@
+SLIT = @SLIT@
+TIMEDCACHE = @TIMEDCACHE@
+VERSION = @VERSION@
+gencat_cmd = @gencat_cmd@
+regex_cmd = @regex_cmd@
+
+CPPFLAGS = @CPPFLAGS@ @DEBUG@ @NLS@ @TIMEDCACHE@ @NEWWMSPEC@ @INTERLACE@ @ORDEREDPSEUDO@
+
+
+bin_SCRIPTS = bsetbg
+bin_PROGRAMS = bsetroot
+
+bsetroot_SOURCES = bsetroot.cc
+bsetroot_LDADD = ../src/BaseDisplay.o ../src/LinkedList.o ../src/Timer.o ../src/Image.o ../src/i18n.o
+
+MAINTAINERCLEANFILES = Makefile.in
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+PROGRAMS =  $(bin_PROGRAMS)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_LIBS = @X_LIBS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+bsetroot_OBJECTS =  bsetroot.o
+bsetroot_DEPENDENCIES =  ../src/BaseDisplay.o ../src/LinkedList.o \
+../src/Timer.o ../src/Image.o ../src/i18n.o
+bsetroot_LDFLAGS = 
+SCRIPTS =  $(bin_SCRIPTS)
+
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = tar
+GZIP_ENV = --best
+DEP_FILES =  .deps/bsetroot.P
+SOURCES = $(bsetroot_SOURCES)
+OBJECTS = $(bsetroot_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cc .o .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-binPROGRAMS:
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+distclean-binPROGRAMS:
+
+maintainer-clean-binPROGRAMS:
+
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo "  $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+	     $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	  else :; fi; \
+	done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	list='$(bin_PROGRAMS)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+	done
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+bsetroot: $(bsetroot_OBJECTS) $(bsetroot_DEPENDENCIES)
+	@rm -f bsetroot
+	$(CXXLINK) $(bsetroot_LDFLAGS) $(bsetroot_OBJECTS) $(bsetroot_LDADD) $(LIBS)
+
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+	    $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+	  else if test -f $(srcdir)/$$p; then \
+	    echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+	    $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+	  else :; fi; fi; \
+	done
+
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+	done
+.cc.o:
+	$(CXXCOMPILE) -c $<
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = util
+
+distdir: $(DISTFILES)
+	here=`cd $(top_builddir) && pwd`; \
+	top_distdir=`cd $(top_distdir) && pwd`; \
+	distdir=`cd $(distdir) && pwd`; \
+	cd $(top_srcdir) \
+	  && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu util/Makefile
+	@for file in $(DISTFILES); do \
+	  d=$(srcdir); \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+	-rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+	@echo '$(COMPILE) -c $<'; \
+	$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-cp .deps/$(*F).pp .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	    >> .deps/$(*F).P; \
+	rm .deps/$(*F).pp
+
+%.lo: %.c
+	@echo '$(LTCOMPILE) -c $<'; \
+	$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-sed -e 's/^\([^:]*\)\.o[ 	]*:/\1.lo \1.o :/' \
+	  < .deps/$(*F).pp > .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	    >> .deps/$(*F).P; \
+	rm -f .deps/$(*F).pp
+
+%.o: %.cc
+	@echo '$(CXXCOMPILE) -c $<'; \
+	$(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-cp .deps/$(*F).pp .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	    >> .deps/$(*F).P; \
+	rm .deps/$(*F).pp
+
+%.lo: %.cc
+	@echo '$(LTCXXCOMPILE) -c $<'; \
+	$(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+	@-sed -e 's/^\([^:]*\)\.o[ 	]*:/\1.lo \1.o :/' \
+	  < .deps/$(*F).pp > .deps/$(*F).P; \
+	tr ' ' '\012' < .deps/$(*F).pp \
+	  | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+	    >> .deps/$(*F).P; \
+	rm -f .deps/$(*F).pp
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am: all-am
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS
+uninstall: uninstall-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am:  mostlyclean-binPROGRAMS mostlyclean-compile \
+		mostlyclean-tags mostlyclean-depend mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-binPROGRAMS clean-compile clean-tags clean-depend \
+		clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-binPROGRAMS distclean-compile distclean-tags \
+		distclean-depend distclean-generic clean-am \
+		distclean-local
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-binPROGRAMS \
+		maintainer-clean-compile maintainer-clean-tags \
+		maintainer-clean-depend maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
+maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile uninstall-binSCRIPTS install-binSCRIPTS tags \
+mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
+distdir mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+distclean-local:
+	rm -f *\~
+
+bsetroot.o: bsetroot.cc ../config.h bsetroot.h ../src/BaseDisplay.h \
+ ../src/LinkedList.h ../src/Timer.h ../src/Image.h
+
+# 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:
diff --git a/util/bsetbg b/util/bsetbg
new file mode 100644
index 00000000..a0675aa6
--- /dev/null
+++ b/util/bsetbg
@@ -0,0 +1,694 @@
+#!/bin/sh
+
+# Copyright (c) 2000 LordZork Industries (lordzork@lordzork.com)
+#
+# 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+# DEALINGS IN THE SOFTWARE.
+
+
+error_msg()
+{
+ case $INFO in yes|y|1) info_msg; esac
+
+ case $1 in
+   1)
+     echo; echo "$NAME: configuration error: $OPTION=\"$VALUE\"" 
+     echo "$NAME: please edit $CONFIG and provide the correct variable."
+     ;;
+   2)
+     echo; echo "$NAME: error: couldn't execute '$APP'! tried to run fallback option $ARGUMENT"
+     echo "$NAME: but quit because of the following error in $CONFIG:"
+     echo "$NAME: $OPTION= $VALUE"
+     echo "$NAME: please edit $CONFIG and provide the correct variable!"
+     ;;
+   3)
+     echo; echo "$NAME: error: couldn't find any suitable image applications in the system path!"
+     echo
+     error_msg url
+     ;;
+   4)
+     echo; echo "$NAME: error: invalid option, or non-existent image ($ARGUMENT)."
+     ;;
+   5)
+     echo; echo "$NAME: error: the image you specified ($IMAGE) could not be found."
+     ;;
+   6)
+     echo; echo "$NAME: error: please specify a valid image."
+     ;;
+   7)
+     echo; echo "$NAME: error: bsetroot couldn't be found! check your openbox installation."
+     ;;
+   8)
+     echo; echo "$NAME: error: wrong number of arguments!"
+     echo "$NAME: make sure you enclosed the options for '$APP' in double quotes."
+     ;;
+   nobgapp)
+     echo; echo "$NAME: error: tried to run '$VALUE' for $ARGUMENT argument,"
+     echo "$NAME: but couldnt find '$APP' in the path! please fix the following"
+     echo "$NAME: line in $CONFIG to point to an existing application:"
+     echo "$NAME: $OPTION=\"$VALUE\""
+     ;;
+   nogrep)
+     echo "$NAME: error: couldn't find grep!"
+     echo "this script needs grep to be in your path in order to function." 
+     echo "you can get GNU grep from ftp://ftp.gnu.org/bin/gnu/grep/" && exit 1
+     ;;
+   url)
+     echo "it is suggested that you use qiv, xli (xsetbg), or xv."
+     echo "you can obtain them at the following locations:"
+     echo
+     echo "   qiv: http://www.klografx.de/software/qiv.shtml"
+     echo "   xli: http://pantransit.reptiles.org/prog/#xli"
+     echo "   xv: http://www.trilon.com/xv/downloads.html"
+     echo
+     echo "the above URLs are current as of 05/23/2000."
+ esac
+ exit 1	    
+}
+
+
+help_msg()
+{
+    echo "$NAME $VERSION: $MORE"
+    echo "options:"
+    echo
+    echo "  (none)                             image is set using default values"
+    echo
+    echo "  -full, -f                          image is set fullscreen"
+    echo "  -tile, -t                          image is set tiled"
+    echo "  -center, -c                        image is set centered"
+    echo
+    echo "  -app, -a              image is set using  with"
+    echo "     <"'"application options"'">            quote-enclosed \"options\" and" 
+    echo "     -center, -c|-tile, -t|-full, -f    default fallback option"
+    echo
+    echo "  -display                   display to connect to (bsetroot only)"
+    echo "  -mod                         sets bsetroot modula pattern"
+    echo "     -foreground, -fg            modula foreground color"
+    echo "     -background, -bg            modula background color"
+    echo
+    echo "  -gradient                 sets bsetroot gradient texture"
+    echo "     -from                       gradient start color"
+    echo "     -to                         gradient end color"
+    echo
+    echo "  -solid                      sets bsetroot solid color"
+    echo
+    echo "  -version, -v                       outputs $NAME's version number"
+    echo "  -info, -i                          outputs configuration info"
+    echo "  -help, -h                          this message"
+    echo
+    echo "usage:  "
+    exit 0 
+}
+
+
+info_msg()
+{
+    case $ERROR in
+	[1-3])
+	    SUMMARY="error: some variables are blank"
+	    ;;
+	4)
+	    SUMMARY="no values have been specified"
+	    ;;
+ 	0)
+	    SUMMARY="looks good"
+    esac
+
+    case $APP_ERROR in [1-4])
+	SUMMARY="error: some applications couldn't be found!"
+    esac
+
+    case `which bsetroot 2>&1` in
+	*/*bsetroot)
+	    BSETROOT=`which bsetroot`
+	    ;;
+	*)
+	    BSETROOT="(error: not found)"
+	    case $ERROR in
+		1-4)
+		    SUMMARY="$SUMMARY, and bsetroot does not seem to be present."
+		    ;;
+		*)
+		    SUMMARY="$SUMMARY, but bsetroot does not seem to be present."
+	    esac
+    esac
+
+    echo "$NAME $VERSION configuration:"
+    echo
+    echo "  bsetroot:                          $BSETROOT"
+    echo
+    echo "  reading configuration from:        $CONFIG"
+    echo
+    echo "  configuration values:"
+    echo
+    case $FULL_BGAPP_MSG in 
+	*"not found")
+	    echo "      fullscreen (ERROR):            $FULL_BGAPP_MSG"
+	    ;;
+	*)
+	    echo "      fullscreen (FULL):             $FULL_MSG"
+    esac
+
+    echo
+
+    case $TILE_BGAPP_MSG in 
+	*"not found")
+	    echo "      tiled (ERROR):                 $TILE_BGAPP_MSG"
+	    ;;
+	*)
+	    echo "      tiled (TILE):                  $TILE_MSG"
+    esac
+
+    echo
+
+    case $CENTER_BGAPP_MSG in 
+	*"not found")
+	    echo "      centered (ERROR):              $CENTER_BGAPP_MSG"
+	    ;;
+	*)
+	    echo "      centered (CENTER):             $CENTER_MSG"
+    esac
+
+    echo
+
+    case $DEFAULT_BGAPP_MSG in 
+	*"not found")
+	    echo "      default (ERROR):               $DEFAULT_BGAPP_MSG"
+	    ;;
+	*)
+	    echo "      default (DEFAULT):             $DEFAULT_MSG"
+    esac
+    echo
+    echo "  summary: $SUMMARY"
+    exit 0
+}
+
+
+find_app()
+{
+    case `which $1 2>&1` in 
+	*/*$1)
+	    echo "$NAME: checking for $1... `which $1`"
+	    echo "### $app" >> $TMPFILE
+	    echo "# FULL=\"$full\"" >> $TMPFILE
+	    echo "# TILE=\"$tile\"" >> $TMPFILE
+	    echo "# CENTER=\"$center\"" >> $TMPFILE
+	    echo "# DEFAULT=\"$default\"" >> $TMPFILE
+	    echo >> $TMPFILE
+
+	    FULL=$full
+	    TILE=$tile
+	    CENTER=$center
+	    DEFAULT=$default
+	    APP=$app
+	    ;;
+	*)
+	echo "$NAME: checking for $1... not found."
+    esac
+}
+
+search_display()
+{
+    ### display
+    full="display -geometry 800x600 -window root"
+    tile="display -window root"
+    center="display -backdrop -window root"
+    default=$center
+    find_app display
+}
+
+search_Esetroot()
+{
+    ### Esetroot
+    full="Esetroot -scale"
+    tile="Esetroot"
+    center="Esetroot -c"
+    default=$center
+    find_app Esetroot
+}
+
+search_wmsetbg()
+{
+    ### wmsetbg
+    full="wmsetbg -s -S"
+    tile="wmsetbg -t"
+    center="wmsetbg -e"
+    default=$center
+    find_app wmsetbg
+}
+
+search_xli()
+{
+    ### xli
+    case `which xsetbg 2>&1` in
+	*/*xsetbg)
+	    full="xsetbg -fillscreen"
+	    tile="xsetbg"
+	    center="xsetbg -center"
+	    default=$center
+	    app="xsetbg (xli)"
+	    find_app xsetbg
+	    ;;
+	*)
+	    case `which xli 2>&1` in */*xli)
+		full="xli -fillscreen -onroot -quiet"
+		tile="xli -onroot -quiet"
+		center="xli -center -onroot quiet"
+		default=$center
+		app=xli
+		find_app xli
+	    esac
+    esac
+}
+
+search_qiv()
+{
+    ### qiv
+    full="qiv --root_s"
+    tile="qiv --root_t"
+    center="qiv --root"
+    default=$center
+    find_app qiv
+}
+
+search_xv()
+{
+    ### xv
+    full="xv -max -smooth -root -quit"
+    tile="xv -root -quit"
+    center="xv -rmode 5 -root -quit"
+    default=$center
+    find_app xv
+}
+
+
+rm_tmpfiles()
+{
+    [ -f $TMPFILE ] && rm -f $TMPFILE
+}
+
+
+create_config()
+{
+    trap rm_tmpfiles INT QUIT STOP TERM
+    case $UID in 0)
+	if [ "$ARGUMENT" != "-r" ]; then
+	    echo "$NAME: running X as root is a security hazard, and is NOT a good idea!"
+	    echo "$NAME: if you insist upon having a ~/.bsetbgrc for root, run bsetbg with"
+	    echo "$NAME: the '-r' flag to force its creation. you have been warned!"
+	    exit 1
+	fi
+    esac
+
+    case $ARGUMENT in
+	-r)
+	    echo "$NAME: creating configuration for root (BAD IDEA)..."
+	    ;;
+	*)
+	    echo "$NAME: $CONFIG not found, creating..."
+    esac
+
+    for app in $IMAGE_APPS; do
+	search_$app
+    done
+
+    if [ -z "$FULL" ] || [ -z "TILE" ] || [ -z "$CENTER" ]; then
+	rm -f $TMPFILE
+	INFO= && error_msg 3
+    fi
+
+    echo "# $CONFIG" >> $CONFIG
+    echo "#" >> $CONFIG
+    echo "# automagically generated with loving care by $NAME $VERSION on `date`" >> $CONFIG
+    echo "#" >> $CONFIG
+    echo "# uncomment the set below that corresponds to your favorite root-image" >> $CONFIG
+    echo "# application, or mix and match to suit your pleasure." >> $CONFIG
+    echo "#" >> $CONFIG
+    echo "# xli misbehaves under larger screen resolutions when using the -fillscreen" >> $CONFIG
+    echo "# option. use -fullscreen if your resolution is higher than 1024x768." >> $CONFIG
+    echo "#" >> $CONFIG
+    echo; echo >> $CONFIG
+    echo "### $APP" >> $CONFIG
+    echo "FULL=\"$FULL\"" >> $CONFIG
+    echo "TILE=\"$TILE\"" >> $CONFIG
+    echo "CENTER=\"$CENTER\"" >> $CONFIG
+    echo "DEFAULT=\"$DEFAULT\"" >> $CONFIG
+    echo >> $CONFIG
+ 
+    cat $TMPFILE | grep -v $APP >> $CONFIG
+
+    rm -f $TMPFILE
+
+    if [ -f $CONFIG ]; then
+	echo "$NAME: default configuration was created in $CONFIG."
+    else
+	echo "ERROR: $CONFIG not found!" && exit 1
+    fi
+}
+
+check_config_apps()
+{
+    BGAPP=$1
+    case `which $1 2>&1` in
+	*/*$1)
+	    BGAPP_MSG="`which $1`"
+	    ;;
+	*)
+	    BGAPP_MSG="$BGAPP: not found"
+	    APP_ERROR=`expr $APP_ERROR + 1`
+    esac
+}
+
+
+check_config_vars()
+{
+    ERROR=0
+    APP_ERROR=0
+
+    if [ -z "$FULL" ]; then
+	FULL_MSG="(no value)" && ERROR=`expr $ERROR + 1`
+    else
+	check_config_apps $FULL
+	FULL_BGAPP_MSG=$BGAPP_MSG
+	FULL_BGAPP=$BGAPP
+	FULL_MSG="$FULL" 
+    fi
+
+    if [ -z "$TILE" ]; then
+	TILE_MSG="(no value)" && ERROR=`expr $ERROR + 1`
+    else
+	check_config_apps $TILE
+	TILE_BGAPP_MSG=$BGAPP_MSG
+	TILE_BGAPP=$BGAPP
+	TILE_MSG="$TILE"
+    fi
+
+    if [ -z "$CENTER" ]; then
+	CENTER_MSG="(no value)" && ERROR=`expr $ERROR + 1`
+    else
+	check_config_apps $CENTER
+	CENTER_BGAPP_MSG=$BGAPP_MSG
+	CENTER_BGAPP=$BGAPP
+	CENTER_MSG="$CENTER"
+    fi
+
+    if [ -z "$DEFAULT" ]; then
+	DEFAULT_MSG="(no value)" && ERROR=`expr $ERROR + 1`
+    else
+	check_config_apps $DEFAULT
+	DEFAULT_BGAPP_MSG=$BGAPP_MSG
+	DEFAULT_BGAPP=$BGAPP
+	DEFAULT_MSG="$DEFAULT"
+    fi
+}
+
+
+final_error_check()
+{
+    case $ARGUMENT in
+	*full|-f|c)
+	    OPTION=FULL
+	    VALUE=$FULL_MSG
+	    FB_ARG=$FULL
+	    case $FULL_BGAPP_MSG in *"not found")
+		APP=$FULL_BGAPP
+		error_msg nobgapp
+	    esac
+	    ;;
+	*tile|-t|t)
+	    OPTION=TILE
+	    VALUE=$TILE_MSG
+	    FB_ARG=$TILE
+	    case $TILE_BGAPP_MSG in *"not found")
+		APP=$TILE_BGAPP
+		error_msg nobgapp
+	    esac
+	    ;;
+	*center|-c|c)
+	    OPTION=CENTER
+	    VALUE=$CENTER_MSG
+	    FB_ARG=$CENTER
+	    case $CENTER_BGAPP_MSG in *"not found")
+		APP=$CENTER_BGAPP
+		error_msg nobgapp
+	    esac		    
+	    ;;
+	*)
+	    OPTION=DEFAULT
+	    VALUE=$DEFAULT_MSG
+	    FB_ARG=$DEFAULT
+	    ARGUMENT=default
+	    case $DEFAULT_BGAPP_MSG in *"not found")
+		APP=$DEFAULT_BGAPP
+		error_msg nobgapp
+	    esac
+
+	    if [ "$IMAGE_EXISTS" != yes ]; then
+	    error_msg 4; fi
+    esac
+
+    case $VALUE in "(no value)")
+        if [ -n "$APP" ]; then
+	    error_msg 2
+	else
+	    error_msg 1
+	fi
+    esac
+}
+
+
+check_config()
+{
+    if [ ! -f $CONFIG ]; then
+	create_config
+    fi
+
+    check_old_config
+    . $CONFIG
+    check_config_vars
+    final_error_check
+}
+
+
+check_image()
+{
+    case "$IMAGE" in
+	*~/*)
+	    IMAGE="$HOME/`basename $IMAGE`"
+    esac
+
+    case $NOARG in 
+	yes|y|1)
+	    NUM=4
+	    ;;
+	*)
+	    if [ -n "$IMAGE" ]; then
+		NUM=5
+	    else
+		NUM=6
+	    fi
+	    case $IMAGE in $ARGUMENT|"."|"./")
+	        error_msg 6
+	    esac
+    esac
+
+    if [ ! -e "$IMAGE" ]; then
+	error_msg $NUM  
+    else
+	IMAGE_EXISTS=yes
+    fi
+}
+
+
+exec_app()
+{
+    case `which $APP 2>&1` in
+	*/*$APP)
+	    check_image
+	    final_error_check
+	    exec $APP $ARGS "$IMAGE"
+	    ;;
+	*)
+	    check_image
+	    check_config
+	    exec $FB_ARG "$IMAGE"
+    esac
+}
+
+
+check_bsetroot_args()
+{
+    case $1 in
+	-mod)
+	    ARGS="$1 $2 $3 $4 $5 $6 $7"
+	    ;;
+        -gradient)
+	    ARGS="$1 $2 $3 $4 $5 $6"
+	    ;;
+        -solid)
+	    ARGS="$1 $2"
+    esac
+}
+
+
+exec_bsetroot()
+{
+    case `which bsetroot 2>&1` in
+        */*bsetroot)
+	    exec bsetroot $ARGS
+	    ;;
+        *)
+	    error_msg 7
+    esac
+}
+
+
+check_old_config()
+{
+   if [ -f $CONFIG ]; then
+	. $CONFIG
+	if [ -n "$BGAPP" ] || [ -n "$CENTER_ARGS" ] || \
+	   [ -n "$TILED_ARGS" ] || [ -n "$OTHER_ARGS" ] || \
+	   [ -n "$DEFAULT_ARGS" ]; then
+		echo " this version of $NAME ($VERSION) no longer uses the old configuration format."
+	      	echo " please update $CONFIG with the new syntax:"
+		echo
+		echo "        CENTER=\"value\""
+		echo "        FULL=\"value\""
+		echo "        TILE=\"value\""
+	        echo "        DEFAULT=\"value\""
+		echo
+		echo "     see the sample.config file for details."
+		exit 0
+	fi
+    fi
+}
+
+
+debug()
+{ 
+    echo "DEBUG:--------------------------"
+    echo "config: $CONFIG"
+    echo "full: $FULL"
+    echo "tile: $TILE"
+    echo "center: $CENTER"
+    echo "default: $DEFAULT"
+    echo "error: $ERROR"
+    echo "app error: $APP_ERROR"
+    echo "argument: $ARGUMENT"
+    echo "________________________________"
+    echo
+}
+
+IMAGE_APPS="display Esetroot wmsetbg xv xli qiv"
+CONFIG="$HOME/.bsetbgrc"
+NAME=bsetbg
+VERSION=1.12
+MORE="(C) 2000 by lordzork industries (http://lordzork.com/)"
+PATH=$PATH:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/usr/X11/bin
+TMPFILE=`tempfile --prefix=bsetbg`
+ARGUMENT=$1
+
+
+case `which grep 2>&1` in */*grep) : ;;
+    *)
+	error_msg nogrep
+esac
+
+case $1 in 
+    *-full|-f|f)
+   	check_config
+	IMAGE=$2 && check_image
+	exec $FULL "$IMAGE"
+	;;
+    *-tile|*tiled|-t|t)
+   	check_config
+	IMAGE=$2 && check_image
+	exec $TILE "$IMAGE"
+	;;
+    *-center|-c|c)
+   	check_config
+	IMAGE=$2 && check_image
+	exec $CENTER "$IMAGE"
+	;;
+    *-app|-a|a)
+	APP=$2
+	ARGS="$3"
+	case $# in
+	    4)
+		ARGMENT=$3
+		IMAGE=$4 
+		exec_app
+		;;
+	    5)
+		COMMAND=`shift 1 && echo $*`
+		ARGUMENT=$4
+		IMAGE=$5
+		exec_app
+		;;
+	    *)
+		error_msg 8
+	esac
+	;;
+    -mod|-gradient|-solid)
+	check_bsetroot_args $*
+	exec_bsetroot
+	;;
+    -display)
+	shift 1 && check_bsetroot_args $*
+	ARGS="-display $ARGS"
+	exec_bsetroot
+	;;
+    *-info|-i|i)
+	INFO=yes
+	check_config
+	info_msg
+	;;
+    *-version|-v|v)
+	echo; echo "    $NAME version $VERSION"; echo "    $MORE";  exit 0
+	;;
+    *-help|-h|h)
+	help_msg
+	;;
+    -r)
+	case $UID in
+	    0)
+		if [ -f $CONFIG ]; then
+		    exit 1
+		else
+		    create_config
+		fi		
+		;;
+	    *)
+		exit 1
+	esac
+	;;
+    *)
+	if [ -n "$1" ]; then
+	    NOARG=yes
+	    IMAGE=$1 && check_image
+	    check_config && final_error_check
+	    exec $DEFAULT "$1"
+	else
+	    if [ ! -f $CONFIG ]; then
+		create_config && exit 0
+	    fi
+	    help_msg
+	fi
+esac
diff --git a/util/bsetroot.cc b/util/bsetroot.cc
new file mode 100644
index 00000000..f0912cab
--- /dev/null
+++ b/util/bsetroot.cc
@@ -0,0 +1,296 @@
+#ifdef    HAVE_CONFIG_H
+#  include "../config.h"
+#endif // HAVE_CONFIG_H
+
+#ifdef    STDC_HEADERS
+#  include 
+#  include 
+#endif // STDC_HEADERS
+
+#ifdef    HAVE_STDIO_H
+#  include 
+#endif // HAVE_STDIO_H
+
+#include "../src/i18n.h"
+#include "bsetroot.h"
+
+
+bsetroot::bsetroot(int argc, char **argv, char *dpy_name)
+  : BaseDisplay(argv[0], dpy_name)
+{
+  pixmaps = (Pixmap *) 0;
+  grad = fore = back = (char *) 0;
+
+  Bool mod = False, sol = False, grd = False;
+  int mod_x = 0, mod_y = 0, i = 0;
+
+  img_ctrl = new BImageControl*[getNumberOfScreens()];
+  for (; i < getNumberOfScreens(); i++)
+    img_ctrl[i] = new BImageControl(this, getScreenInfo(i), True);
+
+  for (i = 1; i < argc; i++) {
+    if (! strcmp("-help", argv[i])) {
+      usage();
+    } else if ((! strcmp("-fg", argv[i])) ||
+               (! strcmp("-foreground", argv[i])) ||
+               (! strcmp("-from", argv[i]))) {
+      if ((++i) >= argc) usage(1);
+
+      fore = argv[i];
+    } else if ((! strcmp("-bg", argv[i])) ||
+               (! strcmp("-background", argv[i])) ||
+               (! strcmp("-to", argv[i]))) {
+      if ((++i) >= argc) usage(1);
+
+      back = argv[i];
+    } else if (! strcmp("-solid", argv[i])) {
+      if ((++i) >= argc) usage(1);
+
+      fore = argv[i];
+      sol = True;
+    } else if (! strcmp("-mod", argv[i])) {
+      if ((++i) >= argc) usage();
+
+      mod_x = atoi(argv[i]);
+
+      if ((++i) >= argc) usage();
+
+      mod_y = atoi(argv[i]);
+
+      if (mod_x < 1) mod_x = 1;
+      if (mod_y < 1) mod_y = 1;
+
+      mod = True;
+    } else if (! strcmp("-gradient", argv[i])) {
+      if ((++i) >= argc) usage();
+
+      grad = argv[i];
+      grd = True;
+    } else if (! strcmp("-display", argv[i])) {
+      // -display passed through tests ealier... we just skip it now
+      i++;
+    } else
+      usage();
+  }
+
+  if ((mod + sol + grd) != True) {
+    fprintf(stderr,
+	    i18n->
+	    getMessage(
+#ifdef    NLS
+                       bsetrootSet, bsetrootMustSpecify,
+#else // !NLS
+                       0, 0,
+#endif // NLS
+		       "%s: error: must specify one of: -solid, -mod, -gradient\n"),
+	    getApplicationName());
+    
+    usage(2);
+  }
+  
+  if (sol && fore) solid();
+  else if (mod && mod_x && mod_y && fore && back) modula(mod_x, mod_y);
+  else if (grd && grad && fore && back) gradient();
+  else usage();
+}
+
+
+bsetroot::~bsetroot(void) {
+  XKillClient(getXDisplay(), AllTemporary);
+
+  if (pixmaps) {
+    int i;
+    for (i = 0; i < getNumberOfScreens(); i++)
+      if (pixmaps[i] != None) {
+        XSetCloseDownMode(getXDisplay(), RetainTemporary);
+        break;
+      }
+
+    delete [] pixmaps;
+  }
+
+  if (img_ctrl) {
+    int i = 0;
+    for (; i < getNumberOfScreens(); i++)
+      delete img_ctrl[i];
+
+    delete [] img_ctrl;
+  }
+}
+
+
+void bsetroot::solid(void) {
+  register int screen = 0;
+
+  for (; screen < getNumberOfScreens(); screen++) {
+    BColor c;
+
+    img_ctrl[screen]->parseColor(&c, fore);
+    if (! c.isAllocated()) c.setPixel(BlackPixel(getXDisplay(), screen));
+
+    XSetWindowBackground(getXDisplay(), getScreenInfo(screen)->getRootWindow(),
+                         c.getPixel());
+    XClearWindow(getXDisplay(), getScreenInfo(screen)->getRootWindow());
+  }
+}
+
+
+void bsetroot::modula(int x, int y) {
+  char data[32];
+  long pattern;
+
+  register int screen, i;
+
+  pixmaps = new Pixmap[getNumberOfScreens()];
+
+  for (pattern = 0, screen = 0; screen < getNumberOfScreens(); screen++) {
+    for (i = 0; i < 16; i++) {
+      pattern <<= 1;
+      if ((i % x) == 0)
+        pattern |= 0x0001;
+    }
+
+    for (i = 0; i < 16; i++)
+      if ((i %  y) == 0) {
+        data[(i * 2)] = (char) 0xff;
+        data[(i * 2) + 1] = (char) 0xff;
+      } else {
+        data[(i * 2)] = pattern & 0xff;
+        data[(i * 2) + 1] = (pattern >> 8) & 0xff;
+      }
+
+    BColor f, b;
+    GC gc;
+    Pixmap bitmap;
+    XGCValues gcv;
+
+    bitmap =
+      XCreateBitmapFromData(getXDisplay(),
+                            getScreenInfo(screen)->getRootWindow(), data,
+                            16, 16);
+
+    img_ctrl[screen]->parseColor(&f, fore);
+    img_ctrl[screen]->parseColor(&b, back);
+
+    if (! f.isAllocated()) f.setPixel(WhitePixel(getXDisplay(), screen));
+    if (! b.isAllocated()) b.setPixel(BlackPixel(getXDisplay(), screen));
+
+    gcv.foreground = f.getPixel();
+    gcv.background = b.getPixel();
+
+    gc = XCreateGC(getXDisplay(), getScreenInfo(screen)->getRootWindow(),
+                   GCForeground | GCBackground, &gcv);
+
+    pixmaps[screen] =
+      XCreatePixmap(getXDisplay(), getScreenInfo(screen)->getRootWindow(),
+                    16, 16, getScreenInfo(screen)->getDepth());
+
+    XCopyPlane(getXDisplay(), bitmap, pixmaps[screen], gc,
+               0, 0, 16, 16, 0, 0, 1l);
+    XSetWindowBackgroundPixmap(getXDisplay(),
+                               getScreenInfo(screen)->getRootWindow(),
+                               pixmaps[screen]);
+    XClearWindow(getXDisplay(), getScreenInfo(screen)->getRootWindow());
+
+    XFreeGC(getXDisplay(), gc);
+    XFreePixmap(getXDisplay(), bitmap);
+
+    if (! (getScreenInfo(screen)->getVisual()->c_class & 1)) {
+      XFreePixmap(getXDisplay(), pixmaps[screen]);
+      pixmaps[screen] = None;
+    }
+  }
+}
+
+
+void bsetroot::gradient(void) {
+  register int screen;
+
+  pixmaps = new Pixmap[getNumberOfScreens()];
+
+  for (screen = 0; screen < getNumberOfScreens(); screen++) {
+    BTexture texture;
+    img_ctrl[screen]->parseTexture(&texture, grad);
+    img_ctrl[screen]->parseColor(texture.getColor(), fore);
+    img_ctrl[screen]->parseColor(texture.getColorTo(), back);
+
+    if (! texture.getColor()->isAllocated())
+      texture.getColor()->setPixel(WhitePixel(getXDisplay(), screen));
+    if (! texture.getColorTo()->isAllocated())
+      texture.getColorTo()->setPixel(BlackPixel(getXDisplay(), screen));
+
+    pixmaps[screen] =
+      img_ctrl[screen]->renderImage(getScreenInfo(screen)->getWidth(),
+                                    getScreenInfo(screen)->getHeight(),
+                                    &texture);
+
+    XSetWindowBackgroundPixmap(getXDisplay(),
+                               getScreenInfo(screen)->getRootWindow(),
+                               pixmaps[screen]);
+    XClearWindow(getXDisplay(), getScreenInfo(screen)->getRootWindow());
+
+    if (! (getScreenInfo(screen)->getVisual()->c_class & 1)) {
+      img_ctrl[screen]->removeImage(pixmaps[screen]);
+      img_ctrl[screen]->timeout();
+      pixmaps[screen] = None;
+    }
+  }
+}
+
+
+void bsetroot::usage(int exit_code) {
+  fprintf(stderr,
+          i18n->
+	  getMessage(
+#ifdef    NLS
+                     bsetrootSet, bsetrootUsage,
+#else // !NLS
+                     0, 0,
+#endif // NLS
+	             "%s 2.0 : (c) 1997-1999 Brad Hughes\n\n"
+		     "  -display         display connection\n"
+		     "  -mod               modula pattern\n"
+		     "  -foreground, -fg  modula foreground color\n"
+		     "  -background, -bg  modula background color\n\n"
+		     "  -gradient       gradient texture\n"
+		     "  -from             gradient start color\n"
+		     "  -to               gradient end color\n\n"
+		     "  -solid            solid color\n\n"
+		     "  -help                    print this help text and exit\n"),
+	  getApplicationName());
+  
+  exit(exit_code);
+}
+
+
+int main(int argc, char **argv) {
+  char *display_name = (char *) 0;
+  int i = 1;
+  
+  NLSInit("openbox.cat");
+  
+  for (; i < argc; i++) {
+    if (! strcmp(argv[i], "-display")) {
+      // check for -display option
+      
+      if ((++i) >= argc) {
+        fprintf(stderr,
+		i18n->getMessage(
+#ifdef    NLS
+                                 mainSet, mainDISPLAYRequiresArg,
+#else // !NLS
+                                 0, 0,
+#endif // NLS
+				 "error: '-display' requires an argument\n"));
+	
+        ::exit(1);
+      }
+      
+      display_name = argv[i];
+    }
+  }
+  
+  bsetroot app(argc, argv, display_name);
+  
+  return 0;
+}
diff --git a/util/bsetroot.h b/util/bsetroot.h
new file mode 100644
index 00000000..ca535562
--- /dev/null
+++ b/util/bsetroot.h
@@ -0,0 +1,33 @@
+#ifndef   __bsetroot2_hh
+#define   __bsetroot2_hh
+
+#include "../src/BaseDisplay.h"
+#include "../src/Image.h"
+
+
+class bsetroot : public BaseDisplay {
+private:
+  BImageControl **img_ctrl;
+  Pixmap *pixmaps;
+
+  char *fore, *back, *grad;
+
+
+protected:
+  inline virtual void process_event(XEvent *) { }
+
+ 
+public:
+  bsetroot(int, char **, char * = 0);
+  ~bsetroot(void);
+
+  inline virtual Bool handleSignal(int) { return False; }
+
+  void gradient(void);
+  void modula(int, int);
+  void solid(void);
+  void usage(int = 0);
+};
+
+
+#endif // __bsetroot2_hh
diff --git a/version.h.in b/version.h.in
new file mode 100644
index 00000000..196c3f77
--- /dev/null
+++ b/version.h.in
@@ -0,0 +1 @@
+#define __openbox_version "@VERSION@"