buici-clock-0.4.9.2/0000755000000000000000000000000011613345003010732 5ustar buici-clock-0.4.9.2/options.h0000644000000000000000000000453211613344743012614 0ustar /* options.h $Id: options.h,v 1.3 1997/10/14 09:11:26 elf Exp $ written by Marc Singer 20 April 1996 This file is part of the project CurVeS. See the file README for more information. Copyright (C) 1996 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __OPTIONS_H__ #define __OPTIONS_H__ // ----- Inclusions // ----- Constants // ----- Typedefs typedef enum { OptNonoption = 0x0001, // Option to use for non-options OptDefault = 0x0002, // Option to use when no other found OptArg = 0x0004, // Option has an argument OptCommand = 0x0008, // Option is a command, no dash prefix OptAllDash = 0x0010, // Long option recognized after one dash or two OptSetType = 0x0f00, OptSetMask = 0xff00, OptSetString = 0x0100, OptSetInt = 0x0200, OptSetShort = 0x0400, OptSetLong = 0x0800, OptClear = 0x8000, } E_Opt; typedef enum { OptErrOk = 0, OptErrFail = 1, // Option function failed OptErrUnrecognized = 2, // Unrecognized option OptErrNoArgument = 3, // Argument missing OptErrBadOption = 4, // Error in option descriptions OptErrAmbiguous = 5, // Ambiguous partial OptErrExit = 9, // Used internally for quick exit } E_OptErr; struct _OPTION; typedef int (*PFN_OPTION) (struct _OPTION* pOption, const char* pch); typedef struct _OPTION { const char* sz; // Text of option unsigned flags; void* pv; // Pointer to option result PFN_OPTION pfn; // Callback function } OPTION; // ----- Classes // ----- Macros // ----- Globals / Externals // ----- Prototypes char* parse_application (char* pch); int parse_options (int argc, char** argv, OPTION* rgOptions, int* argc_used); // ----- Inline #endif // __OPTIONS_H__ buici-clock-0.4.9.2/ANNOUNCEMENT0000644000000000000000000000201611613344743012560 0ustar Version <> of the Buici clock An attractive clock for X-Windows that uses nothing besides the Consortiums Xlib and Xext. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The best clock on the Internet that I found didn't look good enough. I designed (am designing) Buici to be attractive, configurable, and easy to use. This release patches a couple of bugs, adds support for window manager communication (ICCCM), and improves geometry parsing. If this one encounters no crash bugs, I'll be adding configurability from a dialog. Yep, there's a dialog manager in there somewhere. Please check the release notes in the README for information on the problems I working to erradicate. If you have any difficulties please send me e-mail with a description of the problem andx the output of the info.sh script. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - buici-clock-0.4.9.2/xo/0000755000000000000000000000000011612677215011374 5ustar buici-clock-0.4.9.2/xo/Notes0000644000000000000000000000773711612677215012425 0ustar - Since we cannot use the createwindowevent (it is sent to the Parent, and not to us) we need to make a special call after creating a window with the create window information. The important part is the window dimension. Or! We could simply store this info in the LWindow structure. - Need an encapsulation of resource manager. Can be VERY simple subclass of LDisplay. - Need an encapsulation of fonts. I think we should ask for fonts from a third party which will cache fontname->fontID mappings. It will return fast an ID if one has been requested already. Also, it will not free any fonts until the application quits. We don't have to do this because the server will do a quick return when the font has been referenced by another application. Still, it is advantageous to eliminate any round-trip-times from the application that are easy to circumvent. - Need to think about implementing full button functionality. How does a button event get reported? It would be nice if we could specify a simple mechanism for events to propagate. Thus, we could have containers inside dialogs, but the events still go to the dialog. Or, the container could request a chance to filter notification events. - Need to think about minimum dialog template features. How to specify the dialog, and how to store this in a binary. Can we do some clever trick to implement a resource in a binary file? We could link a symbol? We could execute a simple resource compiler. Whoa. This will be very cool. It would also be nice to be able to specify both dialog units, relative to the default dialog font, and pixels for controls that need to reference exact bitmap sizes and such. - Need to focus on inter-window messaging. Look at how a child notifies the parent about a state change. There is the event ID as accepted by the parent, I think it is best to use a client message. Then there is the window ID so we can know what happened. Then, there is the event we are trying to notify ABOUT. Click, change, etc. Now, we could use a class interface for notification and circumvent the message map. This has the advantage of obviating the need for atoms and the like, and it makes it easier to cope with the structures we may want to pass. The down side is that it is a 'somewhat' parallel messaging mechanism. This, the parent need to have a place to call into. I'm heasitant to start using virtual call tables since these have crummy extensibility characteristics. So instead, we could use the event dispatch table, define some high-numbered event numbers, and use our 'event' structure. Hmm. I'm pretty shy of using the C++ class structuring mechanisms. Can you tell? - In extracting from dialog templates, it would be good to have a couple of helper functions for the simpler cases, origin, extent, title, that return the arguments if the object is defined. - Need to implement dialog specific resources so we can compute the text cell size used in scaling. - Also, we need to make sure children notify the right parent on dialog creation. - Also, it would be good to allow preprocessing of dialog templates st. we can do simple math and some string concatenation. - Also, we want to fogure out how to prevent the window manager from controlling window placement of these dialogs. - Also, can we prevent a window from being resized? - Compiler bug? It is possible we have found a compiler error. If we have a method declared in a base class as well as a derived class, and if the arguments for these functions are different, a call to this method using an object pointer SHOULD find the base class method by matching the argument types. Right? - What is the goal here? It looks like the goal of XO is to provide an efficient library for interfacing to a graphical display. I'm finding that a primary motivating factor is the desire to visualize numerical data. This is turning out to be like Razor except that *I* want use the tool myself.buici-clock-0.4.9.2/xo/lpicture.cxx0000644000000000000000000000650411612677215013754 0ustar /* lpicture.cxx $Id: lpicture.cxx,v 1.4 1998/10/15 04:11:51 elf Exp $ written by Marc Singer 3 June 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include #include #include #include #include #include "lpicture.h" typedef struct { // INT16 bfType; //'B' 'M' unsigned32 bfSize; int16 bfReserved1; int16 bfReserved2; unsigned32 bfOffBits; } HDR_DIBFILE; typedef struct{ unsigned32 biSize; unsigned32 biWidth; unsigned32 biHeight; unsigned16 biPlanes; unsigned16 biBitCount; unsigned32 biCompression; unsigned32 biSizeImage; unsigned32 biXPelsPerMeter; unsigned32 biYPelsPerMeter; unsigned32 biClrUsed; unsigned32 biClrImportant; } HDR_DIB; bool LPicture::read (const char* szPath) { m_fh = open (szPath, O_RDONLY); if (m_fh < 0) { m_fh = 0; return false; } struct stat stat; fstat (m_fh, &stat); if (!(m_pvMap = mmap (NULL, m_cbMap = stat.st_size, PROT_READ, MAP_SHARED, m_fh, 0)) || ((char*)m_pvMap)[0] != 'B' || ((char*)m_pvMap)[1] != 'M') { release_mmap (); return false; } HDR_DIBFILE& hdrFile = *(HDR_DIBFILE*)((unsigned8*) m_pvMap + 2); HDR_DIB& hdr = *(HDR_DIB*)((unsigned8*) m_pvMap + 2 + sizeof (HDR_DIBFILE)); m_width = hdr.biWidth; m_height = hdr.biHeight; m_depth = hdr.biPlanes*hdr.biBitCount; _calc_stride (); m_fNonNormal = true; m_cColors = (hdrFile.bfOffBits - sizeof (hdrFile) - sizeof (hdr)) /sizeof (RGBQUAD); if (m_cColors) m_rgRGB = (RGBQUAD*) (&hdr + 1); m_pv = (unsigned8*) m_pvMap + hdrFile.bfOffBits; m_cb = m_cbStride*m_height; // This is catastrophic, but we cannot // do much about it unless we handle // reading very specially. // ** FIXME?? if ((unsigned8*) m_pv + m_cb > (unsigned8*) m_pvMap + m_cbMap) { release_mmap (); return false; } return true; } void LPicture::release_mmap (void) { if (!m_pvMap) return; if (m_rgRGB >= m_pvMap && (unsigned8*) m_rgRGB < (unsigned8*) m_pvMap + m_cbMap) m_rgRGB = NULL; if (m_pv >= m_pvMap && m_pv < (unsigned8*) m_pvMap + m_cbMap) m_pv = NULL; if (m_pvMap) munmap ((caddr_t) m_pvMap, m_cbMap); m_pvMap = NULL; if (m_fh) { close (m_fh); m_fh = 0; } } void LPicture::release_this (void) { release_mmap (); if (m_pv) { free (m_pv); m_pv = NULL; m_cb = 0; } if (m_rgRGB) { free (m_rgRGB); m_rgRGB = 0; m_cColors = 0; } } buici-clock-0.4.9.2/xo/LSM0000644000000000000000000000074211612677215011755 0ustar Begin3 Title: XO <> - X-Windows Class Library Version: <> Entered-date: <> Description: Class libraries for interfacing to X-Windows. Keywords: X-Windows X windows X11 class library Author: elf@netcom.com (Marc Singer) Maintained-by: elf@netcom.com (Marc Singer) Primary-site: thumper.moretechnology.com /pub/distrib <> <> Platform: C++ to build from source. X-Windows. Copying-policy: GNU GPL End buici-clock-0.4.9.2/xo/lfont.h0000644000000000000000000000330411612677215012667 0ustar /* lfont.h -*- C++ -*- $Id: lfont.h,v 1.3 1997/10/18 04:57:35 elf Exp $ written by Marc Singer 10 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----- Font management. We provide these routines in order to streamline font requests without requiring toolkit window classes from monitoring their font usage. */ #if !defined (__LFONT_H__) # define __LFONT_H__ /* ----- Includes */ #include "lhash.h" class LDisplay; class LFontCache { protected: LDisplay* m_pDisplay; LHashTable m_hashFontName; // szFont->XFontStruct* LHashTable m_hashFontID; // fontID->XFontStruct* public: LFontCache () { zero (); } ~LFontCache () { release_this (); } void zero (void) { memset (this, 0, sizeof (*this)); } void init (LDisplay* pDisplay); void release_this (void); XFontStruct* find (char* szFont); XFontStruct* find (Font fid); }; #endif /* __LFONT_H__ */ buici-clock-0.4.9.2/xo/lhash.cxx0000644000000000000000000001512011612677215013216 0ustar /* lhash.cxx $Id: lhash.cxx,v 1.4 1997/10/18 04:57:35 elf Exp $ written by Marc Singer 15 October 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ----- Includes */ #include "standard.h" #include #include "lhash.h" /* ----- Class Globals/Statics */ /* ----- Methods */ bool LHashBucket::add (HashKey key, const void* pv) { int i = _find (key); // -- Add new entry if (i == -1) return m_pArrayKey->add (&key) && m_pArrayItem->add (pv); // -- Replace old entry void* pvItem = m_pArrayItem->reference (i); if (pvItem) memcpy (pvItem, pv, m_cbEach); return pvItem != NULL; } /* LHashBucket::add */ /* LHashBucket::_find performs the internal lookup within a bucket. We do a simple linear search of the items in the list. The return value is the index of the item or -1 if the key cannot be found. */ int LHashBucket::_find (HashKey key) { if (!is_init ()) return -1; int i = 0; for (HashKey* pKey = NULL; pKey = (HashKey*) m_pArrayKey->enumerate ((void*) pKey); ++i) if (*pKey == key) return i; return -1; } /* LHashBucket::_find */ bool LHashBucket::find (HashKey key, void* pv) { int i = _find (key); if (i == -1) return false; return m_pArrayItem->get (i, pv); } /* LHashBucket::find */ void* LHashBucket::find (HashKey key) { int i = _find (key); if (i == -1) return NULL; return m_pArrayItem->reference (i); } /* LHashBucket::find */ void LHashBucket::init (int cbEach) { release_all (); m_cbEach = cbEach; m_pArrayItem = new LArray (cbEach); m_pArrayKey = new LArray (sizeof (HashKey)); } /* LHashBucket::init */ void LHashBucket::release_all (void) { if (m_pArrayKey) delete m_pArrayKey; m_pArrayKey = NULL; if (m_pArrayItem) delete m_pArrayItem; m_pArrayItem = NULL; m_cbEach = 0; } /* LHashBucket::release_all */ bool LHashBucket::remove (HashKey key) { int i = _find (key); if (i == -1) return false; m_pArrayKey->remove (i); m_pArrayItem->remove (i); return true; } /* LHashBucket::remove */ void LHashBucket::zero (void) { memset (this, 0, sizeof (*this)); } /* LHashBucket::zero */ bool LHashTable::add (HashKey key, const void* pv) { LHashBucket* pBucket = (LHashBucket*) m_pArrayBucket->reference (bucket_of (key)); if (!pBucket) return false; if (!pBucket->is_init ()) pBucket->init (m_cbEach); return pBucket->add (key, pv); } /* LHashTable::add */ /* LHashTable::enumerate_reverse enumerates all keys in the hash table. It is called _reverse because it uses to the same technique as LArray::enumerate_reverse that guarantees that deleted items during the enumeration will not affect the completeness of the coverage. The unsigned32 index controls the enumeration. For the first call, pass index as zero. On subsequent calls, pass the index as returned from the previous call. The return value is zero when enumeration is complete. */ unsigned32 LHashTable::enumerate_reverse (unsigned32 index, HashKey* pKey, const void** ppv) { LHashBucket* pBucket; unsigned iBucket = HIWORD (index); unsigned long iKey = LOWORD (index) - 1; // -- Initial case if (index == 0) { iBucket = m_cBuckets; iKey = 0; } /* if */ // -- Iteration across bucket boundary if (!iKey) { while (iBucket--) { pBucket = (LHashBucket*) m_pArrayBucket->reference (iBucket); if (!pBucket || !pBucket->is_init ()) continue; iKey = pBucket->get_count (); break; } /* while */ if (!iKey) return 0; } /* if */ --iKey; pBucket = (LHashBucket*) m_pArrayBucket->at (iBucket); if (pKey) *pKey = pBucket->get_key (iKey); if (ppv) *ppv = pBucket->reference_item (iKey); return MAKELONG (iKey + 1, iBucket); } /* LHashTable::enumerate_reverse */ void* LHashTable::find (HashKey key) { LHashBucket* pBucket = (LHashBucket*) m_pArrayBucket->reference (bucket_of (key)); return pBucket ? pBucket->find (key) : NULL; } /* LHashTable::find */ bool LHashTable::find (HashKey key, void* pv) { LHashBucket* pBucket = (LHashBucket*) m_pArrayBucket->reference (bucket_of (key)); return pBucket ? pBucket->find (key, pv) : false; } /* LHashTable::find */ void LHashTable::init (int cbEach, int cBuckets) { release_all (); m_cbEach = cbEach; m_cBuckets = cBuckets; if (!cBuckets) return; m_pArrayBucket = new LArray (sizeof (LHashBucket)); m_pArrayBucket->alloc_to (cBuckets); } HashKey LHashTable::make_string_key (const char* sz) { return LHashTable::make_string_key (sz, strlen (sz)); } HashKey LHashTable::make_string_key (const char* sz, int cch) { unsigned long l = 0; while (cch--) { l = (l << 4) + (unsigned char)*(sz++); unsigned long m = l & 0xf0000000; if (m) { l = l ^ (m >> 24); l = l ^ m; } } return l; } HashKey LHashTable::make_case_string_key (const char* sz) { return LHashTable::make_case_string_key (sz, strlen (sz)); } HashKey LHashTable::make_case_string_key (const char* sz, int cch) { unsigned long l = 0; while (cch--) { l = (l << 4) + tolower (*(sz++)); unsigned long m = l & 0xf0000000; if (m) { l = l ^ (m >> 24); l = l ^ m; } } return l; } void LHashTable::release_all (void) { if (m_pArrayBucket) { for (LHashBucket* pBucket = NULL; pBucket = (LHashBucket*) m_pArrayBucket ->enumerate ((void*) pBucket); ) pBucket->release_all (); delete m_pArrayBucket; m_pArrayBucket = NULL; } /* if */ } /* LHashTable::release_all */ bool LHashTable::remove (HashKey key) { LHashBucket* pBucket = (LHashBucket*) m_pArrayBucket->reference (bucket_of (key)); return pBucket ? pBucket->remove (key) : false; } /* LHashTable::remove */ void LHashTable::zero (void) { memset (this, 0, sizeof (*this)); } /* LHashTable::zero */ buici-clock-0.4.9.2/xo/wbutton.cxx0000644000000000000000000001070111612677215013621 0ustar /* wbutton.cxx $Id: wbutton.cxx,v 1.14 1998/10/15 04:11:51 elf Exp $ written by Marc Singer 9 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- Implementation of a button window class. */ #include "standard.h" #include "ldisplay.h" #include "lwindow.h" //#include "lwindowclass.h" #include "wbutton.h" #define EVENT_MASK ( ButtonPressMask \ | ButtonReleaseMask \ | ExposureMask \ | EnterWindowMask \ | LeaveWindowMask) EventMap g_rgEMButton[] = { { ButtonPress, (PFNEvent) &WButton::buttondown }, { ButtonRelease, (PFNEvent) &WButton::buttonup }, { Expose, (PFNEvent) &WButton::expose }, // { CreateSelfNotify, (PFNEvent) &WButton::createself }, { EnterNotify, (PFNEvent) &WButton::enter }, { LeaveNotify, (PFNEvent) &WButton::leave }, { 0, NULL }, }; void WButton::buttondown (XButtonEvent* pEvent) { m_fPress = true; m_fOutOfWindow = false; XClearArea (pEvent->display, pEvent->window, 0, 0, 0, 0, True); } void WButton::buttonup (XButtonEvent* pEvent) { m_fPress = false; if (!m_fOutOfWindow) { XClearArea (pEvent->display, pEvent->window, 0, 0, 0, 0, True); notify (ButtonPressNotify); } } void WButton::createself (XoCreateSelfWindowEvent* /* pEvent */) { // fprintf (stderr, "create button\n"); } void WButton::enter (XEnterWindowEvent* pEvent) { if (!m_fPress) return; m_fOutOfWindow = false; XClearArea (pEvent->display, pEvent->window, 0, 0, 0, 0, True); } void WButton::leave (XLeaveWindowEvent* pEvent) { if (!m_fPress) return; m_fOutOfWindow = true; XClearArea (pEvent->display, pEvent->window, 0, 0, 0, 0, True); } void WButton::expose (XExposeEvent* pEvent) { GC gc = m_pDisplay->gc (); bool fDown = m_fPress && !m_fOutOfWindow; int colorFG = fDown ? m_highlight : m_foreground; int colorBG = fDown ? m_foreground : m_highlight; XSetState (pEvent->display, gc, colorFG, colorBG, GXcopy, AllPlanes); XDrawRectangle (pEvent->display, pEvent->window, gc, 0, 0, width () - 1, height () - 1 ); XFontStruct* pFont = display ()->find_font (m_fid); if (pFont) { const char* szTitle = text (); if (!szTitle) szTitle = "Pressing"; int cchTitle = strlen (szTitle); int direction; int ascent; int descent; XCharStruct xchar; XSetFont (pEvent->display, gc, pFont->fid); // fprintf (stderr, "fontID 0x%x\n", pFont->fid); XTextExtents (pFont, szTitle, cchTitle, &direction, &ascent, &descent, &xchar); XDrawString (pEvent->display, pEvent->window, gc, (width () - xchar.width)/2, (height () - ascent - descent)/2 + ascent, szTitle, cchTitle); } } void WButton::register_template (LDisplay* pDisplay) { WButton* pWindow = new WButton (pDisplay); pWindow->event_map (g_rgEMButton); pWindow->select_events (EVENT_MASK); // -- Prepare instance data XrmValue value; pDisplay->find_resource ("xo.button.font", "Toolkit.Button.Font", NULL, &value); XFontStruct* pFont = pDisplay->find_font (value.addr); if (pFont) pWindow->m_fid = pFont->fid; pDisplay->find_resource ("xo.button.background", "Toolkit.Button.Background", NULL, &value); pDisplay->find_pixel (value.addr, &pWindow->m_background); pDisplay->find_resource ("xo.button.foreground", "Toolkit.Button.Foreground", NULL, &value); pDisplay->find_pixel (value.addr, &pWindow->m_foreground); pDisplay->find_resource ("xo.button.highlight", "Toolkit.Button.Highlight", NULL, &value); pDisplay->find_pixel (value.addr, &pWindow->m_highlight); pWindow->set_background_pixel (pWindow->m_background); pDisplay->hash_template ("button", pWindow); } buici-clock-0.4.9.2/xo/dither.cxx0000644000000000000000000002036711612677215013407 0ustar /* dither.cxx $Id: dither.cxx,v 1.3 1997/10/18 04:57:32 elf Exp $ written by Marc Singer 22 March 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- Creates an 8bpp bitmap from the given 24bpp image using a fast ordered dither. */ #include "standard.h" #include "dither.h" //#include #include #include typedef unsigned long DWORD; typedef unsigned short WORD; typedef short UINT; typedef unsigned char BYTE; typedef struct { // UINT bfType; //'B' 'M' DWORD bfSize; UINT bfReserved1; UINT bfReserved2; DWORD bfOffBits; } HDR_DIBFILE; typedef struct{ DWORD biSize; DWORD biWidth; DWORD biHeight; WORD biPlanes; WORD biBitCount; DWORD biCompression; DWORD biSizeImage; DWORD biXPelsPerMeter; DWORD biYPelsPerMeter; DWORD biClrUsed; DWORD biClrImportant; } HDR_DIB; typedef struct { unsigned8 rgbBlue; unsigned8 rgbGreen; unsigned8 rgbRed; unsigned8 rgbReserved; } RGBQUAD; #define ROWWIDTH(width,depth) ((((width)*(depth))/8 + 3)& ~0x3) #define _rgb(r,g,b) (b),(g),(r) #define _error(peThis,pePrev,i,c) \ ((((peThis[((i) - 1)*3 + (c)])*7) \ + ((pePrev[((i) - 1)*3 + (c)])*3) \ + ((pePrev[((i) )*3 + (c)])*5))/16) /* LDither::create_matrix creates the dithering matrix for the specified dimension. The values are scaled by C_SHADES_MAX. */ void LDither::create_matrix (int dim) { if (m_dim == dim && m_pMatrix) return; if (m_pMatrix) { free (m_pMatrix); m_pMatrix = NULL; } int x, y, *dat; assert (dim == 4); // If this fails, we need to eliminate // some of the performance code in // dither.h m_dim = (1 << dim); m_dim2 = m_dim*m_dim; // Precompute some inner-loop values m_level_red = levels (m_cRed); m_level_green = levels (m_cGreen); m_level_blue = levels (m_cBlue); m_dither_divisor = m_dim2*C_SHADES_MAX; m_pMatrix = (int **) malloc ((m_dim *sizeof(int*)) + // pointers (m_dim2*sizeof(int))); // data assert (m_pMatrix); dat = (int*) &m_pMatrix[m_dim]; for (y = 0; y < m_dim; y++) m_pMatrix[y] = &dat[y*m_dim]; for (y = 0; y < m_dim; y++) for (x = 0; x < m_dim; x++) m_pMatrix[y][x] = C_SHADES_MAX*matrix_value (y, x, dim); } /* LDither::dither dithers cy rows of cx pixels. The source pixels are in Windows 24 bit DIB format. The output is Windows 8 bit DIB format. */ void LDither::dither (int xOrg, int yOrg, int cx, int cy, unsigned8* pbSrc, unsigned8* pbDst) { int y, mask = (m_dim - 1); register int x, d; register int *pMatrix; int cbRowSrcExtra = ROWWIDTH (cx, 24) - cx*3; int cbRowDstExtra = ROWWIDTH (cx, 8) - cx; for (y = 0; y < cy; ++y, pbSrc += cbRowSrcExtra, pbDst += cbRowDstExtra) for (pMatrix = m_pMatrix[(y + yOrg) & mask], x = cx; x--; pbSrc += 3) { d = pMatrix[(x + xOrg) & mask]; #if 0 *pbDst++ = color_index (dither (pbSrc[2], d, m_cRed), dither (pbSrc[1], d, m_cGreen), dither (pbSrc[0], d, m_cBlue)); #else *pbDst++ = color_index (dither_red (pbSrc[2], d), dither_green (pbSrc[1], d), dither_blue (pbSrc[0], d)); #endif } } /* LDither::init initialize the dithering control structures. This includes the scalar parameters, the lookup table and the dithering matrix. */ void LDither::init (int dim, int cRed, int cGreen, int cBlue) { if (m_cRed == cRed && m_cGreen == cGreen && m_cBlue == cBlue && m_rgRGB) return; m_cRed = cRed; m_cGreen = cGreen; m_cBlue = cBlue; m_cColors = cRed*cGreen*cBlue; if (m_cColors > C_COLOR_MAX) { fprintf (stderr, "too many shades %d, max %d\n", m_cColors, C_COLOR_MAX); return; } if (m_cRed < 2) { fprintf (stderr, "too few shades for red, minimum of 2\n"); return; } if (m_cGreen < 2) fprintf (stderr, "too few shades for green, minimum of 2\n"); if (m_cBlue < 2) fprintf (stderr, "too few shades for blue, minimum of 2\n"); register int r, g, b, i; if (m_rgRGB) { free (m_rgRGB); m_rgRGB = NULL; } m_rgRGB = (RGBQUAD*) malloc (m_cColors*sizeof (RGBQUAD)); memset (m_rgRGB, 0, m_cColors*sizeof (RGBQUAD)); RGBQUAD* rgRGB = (RGBQUAD*) m_rgRGB; for (r = 0; r < m_cRed; r++) for (g = 0; g < m_cGreen; g++) for (b = 0; b < m_cBlue; b++) { i = color_index (r,g,b); rgRGB[i].rgbRed = (r*(C_COLOR_MAX-1)/(m_cRed - 1)); rgRGB[i].rgbGreen = (g*(C_COLOR_MAX-1)/(m_cGreen - 1)); rgRGB[i].rgbBlue = (b*(C_COLOR_MAX-1)/(m_cBlue - 1)); } create_matrix (dim); } /* LDither::matrix_value returns the value for a dithering matrix of square matrix, size high and wide, at the point x, y. From netpbm-mar-1994 which got it from Graphics Gems, p. 714. */ int LDither::matrix_value (int y, int x, int size) { assert (size > 0); register int d; /* Think of d as the density. At every iteration, d is shifted left * one and a new bit is put in the low bit based on x and y. If x * is odd and y is even, or visa versa, then a bit is shifted in. * This generates the checkerboard pattern seen in dithering. This * quantity is shifted again and the low bit of y is added in. This * whole thing interleaves a checkerboard pattern and y's bits which * is what you want. */ for (d = 0; size--; x >>= 1, y >>= 1) d = (d << 2) | (((x & 1) ^ (y & 1)) << 1) | (y & 1); return d; } void LDither::release_this (void) { if (m_pMatrix) { free (m_pMatrix); m_pMatrix = NULL; } if (m_rgRGB) { free (m_rgRGB); m_rgRGB = NULL; } } #if defined (TEST_DITHER) main (int argc, char** argv) { if (argc != 2) { fprintf (stderr, "usage: \n"); exit (1); } char* sz = argv[1]; HDR_DIBFILE hdr_file; HDR_DIB hdr; int height; int width; FILE* fp = fopen (sz, "rb"); UINT bftype; fread (&bftype, 1, sizeof (bftype), fp); if ( bftype != (('B' << 8) | 'M') && bftype != (('M' << 8) | 'B')) { fprintf (stderr, "file %s is not a bitmap\n", sz); exit (2); } fread (&hdr_file, 1, sizeof (hdr_file), fp); fread (&hdr, 1, sizeof (hdr), fp); if (hdr.biBitCount != 24) { fprintf (stderr, "source file must be 24 bits/pel"); exit (3); } height = hdr.biHeight; width = hdr.biWidth; int cbRowSrc = ROWWIDTH (width, 24); unsigned8* pbSrc = (unsigned8*) malloc (height*cbRowSrc); fseek (fp, hdr_file.bfOffBits, SEEK_SET); fread (pbSrc, 1, height*cbRowSrc, fp); fclose (fp); int cbRowDst = ROWWIDTH (width, 8); memset (&hdr_file, 0, sizeof (hdr_file)); hdr_file.bfOffBits = sizeof (hdr_file) + 2 + sizeof (hdr) + sizeof (RGBQUAD)*256; hdr_file.bfSize = hdr_file.bfOffBits + cbRowDst*height; memset (&hdr, 0, sizeof (hdr)); hdr.biSize = sizeof (hdr); hdr.biWidth = width; hdr.biHeight = height; hdr.biPlanes = 1; hdr.biBitCount = 8; hdr.biSizeImage = cbRowDst*height; fwrite ("B", 1, 1, stdout); fwrite ("M", 1, 1, stdout); fwrite (&hdr_file, 1, sizeof (hdr_file), stdout); fwrite (&hdr, 1, sizeof (hdr), stdout); LDither dither; dither.init (); fwrite (dither.palette (), dither.colors (), sizeof (RGBQUAD), stdout); RGBQUAD rgb; memset (&rgb, 0, sizeof (RGBQUAD)); for (int i = 256 - dither.colors (); i--; ) fwrite (&rgb, 1, sizeof (RGBQUAD), stdout); unsigned8* pbDst = (unsigned8*) malloc (height*cbRowDst); memset (pbDst, 0, height*cbRowDst); dither.dither (width, height, pbSrc, pbDst); fwrite (pbDst, height, cbRowDst, stdout); fflush (stdout); exit (0); } #endif buici-clock-0.4.9.2/xo/dmalloc.h0000644000000000000000000000344411612677215013165 0ustar /* dmalloc.h $Id: dmalloc.h,v 1.4 1997/10/18 04:57:33 elf Exp $ written by Marc Singer 27 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Debugging memory allocator. */ #if !defined (__DMALLOC_H__) # define __DMALLOC_H__ /* ----- Includes */ #include "memory.h" /* ----- Globals */ #ifdef __cplusplus extern "C" { #endif void* _malloc_ (size_t cb, const char*, int); void* _calloc_ (size_t c, size_t cb, const char*, int); void* _realloc_ (void* pv, size_t cb, const char*, int); void _free_ (void* pv); void dmalloc_exit (void); void dmalloc_validate (void); #ifdef __cplusplus } #endif #ifdef __cplusplus void* operator new (size_t, const char*, int); void operator delete (void*); #endif #if !defined (BY_DMALLOC) # define new new(__FILE__,__LINE__) # define calloc(c,cb) _calloc_((c),(cb),__FILE__,__LINE__) # define malloc(cb) _malloc_((cb),__FILE__,__LINE__) # define realloc(pv,cb) _realloc_((pv),(cb),__FILE__,__LINE__) # define free _free_ #endif #endif /* __DMALLOC_H__ */ buici-clock-0.4.9.2/xo/wtext.h0000644000000000000000000000516711612677215012731 0ustar /* wtext.h -*- C++ -*- $Id: wtext.h,v 1.4 1997/10/18 04:57:46 elf Exp $ written by Marc Singer 27 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #if !defined (__WTEXT_H__) # define __WTEXT_H__ /* ----- Includes */ /* ----- Classes */ class WTextEdit : public LWindow { protected: Font m_fid; unsigned long m_foreground; // Color values for foreground and unsigned long m_background; // background pixels unsigned long m_highlight; // Highlight for pressed button char* m_sz; // String of characters in buffer int m_cchLim; // Length of current string int m_cchMax; // Length of allocated text buffer int m_widthString; // Length of last rendered string Pixmap m_pixmapCaret; // Bitmap representing the caret. bool m_fFocus; // Window has focus public: void buttondown (XButtonEvent* pEvent); void buttonup (XButtonEvent* pEvent); void expose (XExposeEvent* pEvent); void createself (XoCreateSelfWindowEvent* pEvent); void enter (XEnterWindowEvent* pEvent); void leave (XLeaveWindowEvent* pEvent); void keypress (XKeyPressedEvent* pEvent); void keyrelease (XKeyReleasedEvent* pEvent); void focusin (XFocusInEvent* pEvent); void focusout (XFocusOutEvent* pEvent); public: WTextEdit (LDisplay* pDisplay) : LWindow (pDisplay) { zero (); m_cbInstance = sizeof (*this) - sizeof (LWindow); } WTextEdit (LWindow* pWindow) : LWindow (pWindow) {} ~WTextEdit () { release_this (); } void release_this (void) {} void zero (void) { memset (((LWindow*) this) + 1, 0, sizeof (*this) - sizeof (LWindow)); } static void register_template (LDisplay* pDisplay); // -- Control Methods const char* text (void) { return m_sz; } void text (const char* sz); }; /* ----- Globals */ #endif /* __WTEXT_H__ */ buici-clock-0.4.9.2/xo/lhash.h0000644000000000000000000000623111612677215012646 0ustar /* lhash.h Emacs, this file is -*- C++ -*- $Id: lhash.h,v 1.4 1997/10/18 04:57:36 elf Exp $ written by Marc Singer 15 October 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __LHASH_H__ #define __LHASH_H__ /* ----- Inclusions */ #include "larray.h" /* ----- Constants */ #define LOWORD(v) ((v)&0xffff) #define HIWORD(v) (((v)>>16)&0xffff) #define MAKELONG(l,h) ((((h) & 0xffff)<<16) | ((l) & 0xffff)) /* ----- Typedefs */ typedef unsigned long HashKey; /* ----- Classes */ class LHashBucket { private: LArray* m_pArrayItem; // Array of data items (user specified lengths) LArray* m_pArrayKey; // Array of keys int m_cbEach; // Size of user items int _find (HashKey); public: LHashBucket (int cbEach) { zero (); init (cbEach); } ~LHashBucket () { release_all (); } void init (int); void release_all (void); void zero (void); bool add (HashKey, const void*); void* find (HashKey); bool find (HashKey, void*); bool is_init (void) { return m_cbEach != 0; } long get_count (void) { return m_pArrayKey->get_count (); } HashKey get_key (long i) { HashKey* pKey = (HashKey*) m_pArrayKey->at (i); return pKey ? *pKey : 0; } void* reference_item (long i) { return m_pArrayItem->reference (i); } bool remove (HashKey); }; class LHashTable { private: LArray* m_pArrayBucket; // Array of hash buckets int m_cBuckets; // Number of buckets in table int m_cbEach; // Size of user's data item public: LHashTable () { zero (); init (0, 0); } LHashTable (int cbEach, int cBuckets) { zero (); init (cbEach, cBuckets); } ~LHashTable () { release_all (); } bool is_init (void) { return m_cbEach != 0 && m_cBuckets != 0; } void init (int, int); void release_all (void); void zero (void); bool add (HashKey, const void*); int bucket_of (HashKey key) { return (int) (m_cBuckets ? ((LOWORD (key) + HIWORD (key)) % m_cBuckets) : 0); } unsigned32 enumerate_reverse ( // Enumerate ALL keys in table unsigned32 index, HashKey* pKey, const void** ppv); void* find (HashKey); bool find (HashKey, void*); static HashKey make_string_key (const char*); static HashKey make_string_key (const char*, int); static HashKey make_case_string_key (const char*); static HashKey make_case_string_key (const char*, int); bool remove (HashKey); }; #endif /* __LHASH_H__ */ buici-clock-0.4.9.2/xo/sample.dlg0000644000000000000000000000137411612677215013352 0ustar /* sample.dlg Dialog template file. */ bitmap (1) { file ("mybitmap.pnm") } menu (1) { item (1) { title ("open") } item (2) { title ("close") } } dialog (1) { origin (100, 100) extent (26, 4.5) title ("Sample Dialog") pushbutton (1) { title ("Quit") origin (1, 0.5) extent (7, 1.5) highlight } pushbutton (2) { title ("Don't Press") origin (12, 0.5) extent (13, 1.5) } textedit (3) { origin (1, 2.5) extent (24, 1.5) text ("There's nothing like the real thing") } } dialog (2) { title ("File Open") pushbutton (1) { title ("Open") origin (2, 2) extent (8, 1.5) highlight } pushbutton (2) { title ("Cancel") origin (12, 2) extent (15, 1.5) } } buici-clock-0.4.9.2/xo/larray.cxx0000644000000000000000000002220011612677215013406 0ustar /* larray.cxx $Id: larray.cxx,v 1.2 1997/10/18 04:57:33 elf Exp $ written by Marc Singer 9 October 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -- IMPLEMENTATION NOTE -- The m_cStep member is set to -1 if a request was made to allocate the array larger than 64 AND we are not using GCC or Win32. Once allocated, we do not permit reallocation. */ /* ----- Includes */ #include "standard.h" #include "larray.h" #include #include #define max(a,b) (((a) >= (b)) ? (a) : (b)) #define min(a,b) (((a) <= (b)) ? (a) : (b)) /* ----- Class Globals/Statics */ /* ----- Methods */ /* LArray::add adds an item to the end of the array. */ bool LArray::add (const void* pv) { if (!alloc (m_cItems + 1)) return false; memcpy (_at (m_cItems++), pv, m_cbEach); return true; } /* LArray::add */ /* LArray::add_new adds an item to the end of the array and returns pointer to it. */ void* LArray::add_new (void) { if (!alloc (m_cItems + 1)) return NULL; return _at (m_cItems++); } /* LArray::add_new */ /* LArray::alloc tries to make space for cItems in the array. If there is already enough space, nothing is done. The return value is true if there is enough room for cItems. */ bool LArray::alloc (long cItems) { assert (m_cbEach); if (m_cStep < 0) return false; if (m_cStep == 0) m_cStep = 1; cItems = ((cItems + m_cStep - 1)/m_cStep)*m_cStep; if (m_cItemMax >= cItems) { assert (m_cItemMax == 0 || m_rgItems); return true; } /* if */ if (m_rgItems) { void* pItems = realloc (m_rgItems, size_t (m_cbEach*cItems)); if (!pItems) return false; m_rgItems = pItems; memset (_at (m_cItemMax), 0, size_t (m_cbEach*(cItems - m_cItemMax))); } /* if */ else m_rgItems = calloc ((size_t) cItems, m_cbEach); if (m_rgItems) m_cItemMax = cItems; return m_rgItems != NULL; } /* LArray::alloc */ /* LArray::alloc_to allocates the array to include at least cItems and it also sets the current number of filled items to cItems. The effect is the same as adding cItems worth of empty cells, but this method is faster. */ bool LArray::alloc_to (long cItems) { if (!alloc (cItems) && m_cItemMax < cItems) return false; m_cItems = max (m_cItems, cItems); return true; } /* LArray::alloc_to */ /* LArray::at routines to convert indicies and pointers into pointers and indicies. Note that these are NOT inline so we can use dynamic linking to change them. */ void* LArray::at (long iItem) const { return _at (iItem); } /* LArray::at */ long LArray::at (const void* pv) const { if (pv < m_rgItems || pv >= _at (m_cItems)) return -1; return _at (pv); } /* LArray::at */ /* LArray::attach uses an external data pointer for the array storage. This automatically sets the m_cbStep to -2 which indicates that the array does not own the storage. LArray uses the cb parameter to compute the number of available slots for the array. */ void LArray::attach (void* pv, long cb) { release (); m_rgItems = pv; m_cStep = -2; m_cItemMax = cb/m_cbEach; } /* LArray::attach */ /* LArray::contains returns true if the array contains en element matching the data pointed to by *pv. Note that this is a SLOW operation requiring a comparison with every element in the array. */ bool LArray::contains (const void* pv) { for (void* pvElement = NULL; pvElement = enumerate (pvElement); ) if (memcmp (pvElement, pv, m_cbEach) == 0) return true; return false; } /* LArray::contains */ /* LArray::enumerate and enumerate_reverse enumerates a reference pointer to the items in the list. The return value points to the next item in the array. To enumerate all items in the array, pass NULL the first time and the last returned pointer on successive calls. Enumerate is complete when the function returns NULL. The variant enumerate_reverse enumerates from the end of the list. It is useful when deleting items from the array because the enumeration pointer will be properly decremented on each iteration. These functions enumerate pointers to the elements of the array. This means that in order to enumerate the elements of an array of character pointers, you need to construct the loop this way: for (char** ppch = NULL; ppch = (char**) array.enumerate ((void*) ppch);) { printf ("Got the string '%s'\n", *ppch); */ void* LArray::enumerate (const void* pv) { if (!pv) return m_cItems ? m_rgItems : NULL; if (pv < m_rgItems) // Error case return NULL; long iItem = _at (pv); if (iItem < 0 || iItem >= m_cItems) return NULL; ++iItem; return (iItem < m_cItems) ? _at (iItem) : NULL; } /* LArray::enumerate */ void* LArray::enumerate_reverse (const void* pv) { if (!pv) return m_cItems ? _at (m_cItems - 1) : NULL; if (pv < m_rgItems) // Error case return NULL; long iItem = _at (pv) - 1; return (iItem >= 0 && iItem < m_cItems) ? _at (iItem) : NULL; } /* LArray::enumerate_reverse */ /* LArray::get gets an item in the array. m_cbEach bytes are copied from index iItem. The return value is true if the item was copied. */ bool LArray::get (long iItem, void* pv) { if (iItem < 0 || iItem >= m_cItems || !pv) return false; memcpy (pv, _at (iItem), m_cbEach); return true; } /* LArray::get */ /* LArray::init initializes the array. cbEach is the size of each item and cStep is the number of items to allocate when the array is full. */ void LArray::init (int cbEach, int cStep) { release (); m_cbEach = cbEach; m_cStep = cStep; } /* LArray::init */ /* LArray::insert makes space before the indicated item for a new item in the array. Note that this function has the side-effect of changing the addresses of the items that follow and potentially of all items if the array is realloc'd in a new memory location. The return value is the pointer to the new, blank item or NULL if the memory cannot be allocated for it. */ void* LArray::insert (const void* pv) { assert (m_cbEach); long iInsert = at (pv); if (iInsert == -1) return NULL; if (!alloc_to (m_cItems + 1)) return NULL; // (m_cItems has been incremented) // -- Move data after iInsert to accomodate new entry pv = _at (iInsert); memmove (((char*) pv) + m_cbEach, ((char*) pv), size_t ((m_cItems - 1 - iInsert)*m_cbEach)); // ++m_cItems; return (void*) pv; } /* LArray::insert */ /* LArray::reference returns a pointer to the specified item. If the index is out of range, the return value is NULL. */ void* LArray::reference (long iItem) { if (iItem < 0 || iItem >= m_cItems) return NULL; return _at (iItem); } /* LArray::reference */ /* LArray::release releases memory allocated for the array. Note that if the array stores pointers, those pointers are not freed. */ void LArray::release (void) { if (m_rgItems) { if (m_cStep >= 0) free (m_rgItems); } /* if */ m_rgItems = NULL; m_cItems = m_cItemMax = 0; } /* LArray::release */ /* LArray::remove with variants removes cItems from the list at offset iItem. The size of the allocation does not change. The variant that takes a void* pointer removes only that item from the list. */ void LArray::remove (long iItem, long cItems) { iItem = min (m_cItems - 1, iItem); if (iItem < 0) return; cItems = min (m_cItemMax - iItem, cItems); memmove (_at (iItem), _at (iItem + cItems), size_t ((m_cItems - iItem - cItems)*m_cbEach)); m_cItems -= cItems; } /* LArray::remove */ void LArray::remove (const void* pv) { if (!m_cItems) return; long iItem = at (pv); if (iItem == -1) return; long cItems = 1; memmove (_at (iItem), _at (iItem + cItems), size_t ((m_cItems - iItem - cItems)*m_cbEach)); m_cItems -= cItems; } /* LArray::remove */ /* LArray::set sets the data for an item in the array. */ bool LArray::set (long iItem, const void* pv) { if (!alloc_to (iItem)) return false; memcpy (_at (iItem), pv, m_cbEach); return true; } /* LArray::set */ /* LArray::truncate truncates the array at cItems items. This is used to effectively shrink array usage when the array might grow again. */ void LArray::truncate (long cItems) { cItems = max (0, cItems); m_cItems = min (m_cItems, cItems); } /* LArray::truncate */ buici-clock-0.4.9.2/xo/wdialog.h0000644000000000000000000000412211612677215013172 0ustar /* wdialog.h -*- C++ -*- $Id: wdialog.h,v 1.3 1997/10/18 04:57:45 elf Exp $ written by Marc Singer 27 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #if !defined (__WDIALOG_H__) # define __WDIALOG_H__ /* ----- Includes */ #include "lres.h" /* ----- Classes */ class WDialog : public LWindow { protected: Font m_fid; // Default dialog font, used for dlg units int m_unitWidth; // Width of a dialog character int m_unitHeight; // Height of a dialog character LResNode* m_pNodeResource; // Resource node void create_pushbutton (XoCreateSelfWindowEvent* pEvent, LResNode* pNode); void create_textedit (XoCreateSelfWindowEvent* pEvent, LResNode* pNode); public: void createself (XoCreateSelfWindowEvent* pEvent); public: WDialog (LDisplay* pDisplay) : LWindow (pDisplay) { zero (); m_cbInstance = sizeof (*this) - sizeof (LWindow); } WDialog (LWindow* pWindow) : LWindow (pWindow) {} ~WDialog () { release_this (); } void release_this (void) {} void zero (void) { memset (((LWindow*) this) + 1, 0, sizeof (*this) - sizeof (LWindow)); } static void register_template (LDisplay* pDisplay); static WDialog* create (LWindow* pWindowOwner, char* szFileResource, int id); }; #endif /* __WDIALOG_H__ */ buici-clock-0.4.9.2/xo/stats.h0000644000000000000000000000433011612677215012703 0ustar /* stats.h (* Microsoft C++ 8.0 *) $Id: stats.h,v 1.3 1997/10/18 04:57:43 elf Exp $ written by Marc Singer 3 October 1996 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- Support for (simple) statistical analysis of program performance data. */ #if !defined (__STATS_H__) # define __STATS_H__ /* ----- Includes */ #include #include #if defined (HAVE_MEMORY_H) # include #endif /* ----- Class Globals/Statics */ #define C_STAT_SAMPLES 200 // Samples saved for rolling statistics /* ----- Methods */ class LStatistics { protected: unsigned long m_cSamples; // Number of samples collected long m_rgSamples[C_STAT_SAMPLES]; // Sample data public: LStatistics () { zero (); } ~LStatistics () { } void zero () { memset (this, 0, sizeof (*this)); } void sample (long l); long samples (void) { return m_cSamples; } int count (void) { return (m_cSamples > C_STAT_SAMPLES) ? C_STAT_SAMPLES : (int) m_cSamples; } float mean (void); float stddev (void); void calc (float& rMean, float& rStddev, long& min, long& max); }; class LTime { protected: struct tms m_times; struct rusage m_usage; struct timeval m_timeval; public: LTime () { zero (); } ~LTime () {} void zero () { memset (this, 0, sizeof (*this)); } void reset (void); long delta (void); }; #endif /* __STATS_H__ */ buici-clock-0.4.9.2/xo/messages.h0000644000000000000000000000622711612677215013363 0ustar /* messages.h -*- C++ -*- $Id: messages.h,v 1.2 1997/10/18 04:57:40 elf Exp $ written by Marc Singer 12 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- We have some of our own messages to piggyback onto the core message sending code. We do this in a simple way. We define message identifiers that cannot practically collide with the protocol messages. We choose to avoid the X client message as it is best suited to inter-application messaging which does not suit us. Ours is a more efficient mechanism. */ #if !defined (__MESSAGES_H__) # define __MESSAGES_H__ /* ----- Includes */ /* ----- Globals */ #define FIRSTXoEventBase 0x8000 #define CreateSelfNotify 0x8001 // Notify to window that it is created #define ChildNotify 0x8002 // Button notifying parent of event typedef struct { int type; unsigned long serial; // We don't use this Bool send_event; // We always set this, only because it is true Display* display; // Display where child and this window reside Window window; // Window receiving the event } XoAnyEvent; typedef struct { int type; unsigned long serial; // We don't use this Bool send_event; // We always set this, only because it is true Display* display; // Display where child and this window reside Window window; // Window receiving the event // -- Event specific portion Window parent; // Parent that owns this window void* pvParentData; // Context pointer returned to parent on notify int x, y; // Window origin relative to parent int width, height; // Window extent int border_width; // I'm not sure if this is important } XoCreateSelfWindowEvent; typedef struct { int type; unsigned long serial; // We don't use this Bool send_event; // We always set this, only because it is true Display* display; // Display where child and this window reside Window window; // Window receiving the event // -- Event specific portion LWindow* pWindowChild; // Child window sending the event void* pvParentData; // Context pointer, a type of ID int child_type; // Child's event type, class specific int rgData[4]; // Some data from the child } XoChildNotifyEvent; typedef union { int type; XoAnyEvent xany; XoCreateSelfWindowEvent xcreatewindow; XoChildNotifyEvent xchildnotify; } XoEvent; #endif /* __MESSAGES_H__ */ buici-clock-0.4.9.2/xo/wbutton.h0000644000000000000000000000413611612677215013253 0ustar /* wbutton.h -*- C++ -*- $Id: wbutton.h,v 1.3 1997/10/18 04:57:44 elf Exp $ written by Marc Singer 12 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #if !defined (__WBUTTON_H__) # define __WBUTTON_H__ /* ----- Includes */ /* ----- Classes */ class WButton : public LWindow { protected: Font m_fid; unsigned long m_foreground; // Color values for foreground and unsigned long m_background; // background pixels unsigned long m_highlight; // Highlight for pressed button bool m_fPress; bool m_fOutOfWindow; public: void buttondown (XButtonEvent* pEvent); void buttonup (XButtonEvent* pEvent); void expose (XExposeEvent* pEvent); void createself (XoCreateSelfWindowEvent* pEvent); void enter (XEnterWindowEvent* pEvent); void leave (XLeaveWindowEvent* pEvent); public: WButton (LDisplay* pDisplay) : LWindow (pDisplay) { zero (); m_cbInstance = sizeof (*this) - sizeof (LWindow); } WButton (LWindow* pWindow) : LWindow (pWindow) {} ~WButton () { release_this (); } void release_this (void) {} void zero (void) { memset (((LWindow*) this) + 1, 0, sizeof (*this) - sizeof (LWindow)); } static void register_template (LDisplay* pDisplay); }; #define ButtonPressNotify 1 #endif /* __WBUTTON_H__ */ buici-clock-0.4.9.2/xo/lwindow.cxx0000644000000000000000000002500011612677215013600 0ustar /* lwindow.cxx $Id: lwindow.cxx,v 1.20 1998/10/15 04:11:51 elf Exp $ written by Marc Singer 8 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include "ldisplay.h" #include "lwindow.h" /* LWindow::create creates the X server window object. As a side effect this LWindow structure is linked into the hierarchy of windows. */ bool LWindow::create (LWindow* pWindowParent) { Window wndParent = (pWindowParent ? pWindowParent->window () : XDefaultRootWindow (m_pDisplay->display ())); XSetWindowAttributes attr = m_attr; unsigned long mask = m_maskAttr; // if (!(mask & CWBackPixel)) { // mask |= CWBackPixel; // attr.background_pixel = 19; // } // if (!(mask & CWBorderPixel)) { // mask |= CWBorderPixel; // attributes.border_pixel = 1; // } // if (!(mask & CWEventMask) || event_mask) { // mask |= CWEventMask; // attributes.event_mask = event_mask; // } // m_pEventHandlerMap = pEventHandlerMap; mask |= CWColormap; attr.colormap = m_pDisplay->colormap (); mask |= CWEventMask; m_window = XCreateWindow (xdisplay (), wndParent, m_x, m_y, m_width, m_height, 0, m_pDisplay->depth (), InputOutput, m_pDisplay->visual (), mask, &attr); m_pDisplay->flush (); // Helps notify semantics, really? **FIXME** // m_event_mask = attr.event_mask; if (m_window) { // Properties if (m_szXName) { XChangeProperty (xdisplay (), m_window, XA_WM_NAME, XA_STRING, sizeof (char)*8, PropModeReplace, (unsigned char*) m_szXName, strlen (m_szXName)); XChangeProperty (xdisplay (), m_window, XA_WM_ICON_NAME, XA_STRING, sizeof (char)*8, PropModeReplace, (unsigned char*) m_szXName, strlen (m_szXName)); } if (m_szXClass) { int cch; for (cch = 0; m_szXClass[cch]; cch += 1 + strlen (m_szXClass + cch)); XChangeProperty (xdisplay (), m_window, XA_WM_CLASS, XA_STRING, sizeof (char)*8, PropModeReplace, (unsigned char*) m_szXClass, cch); } { XSizeHints hints; memset (&hints, 0, sizeof (hints)); hints.flags |= (m_fOrigin ? USPosition : PPosition); hints.flags |= (m_fExtent ? USSize : PSize); // hints.flags |= PMinSize | PMaxSize | PAspect; hints.x = m_x; hints.y = m_y; hints.width = m_width; hints.height = m_height; hints.min_width = 32; hints.min_height = 32; hints.max_width = 1024; hints.max_height = 1024; hints.min_aspect.x = 1; hints.min_aspect.y = 1; hints.max_aspect.x = 1; hints.max_aspect.y = 1; XSetWMNormalHints (xdisplay (), m_window, &hints); } { XWMHints hints; memset (&hints, 0, sizeof (hints)); hints.flags = InputHint | StateHint; hints.input = True; // We default to a Passive input model hints.initial_state = NormalState; XSetWMHints (xdisplay (), m_window, &hints); } { char sz[256]; gethostname (sz, sizeof (sz)); XChangeProperty (xdisplay (), m_window, XA_WM_CLIENT_MACHINE, XA_STRING, sizeof (char)*8, PropModeReplace, (unsigned char*) sz, strlen (sz)); } m_pDisplay->hash_window (this); m_pWindowParent = pWindowParent; // Link LWindow** ppWindowHere = (pWindowParent ? &pWindowParent->m_pWindowChild : m_pDisplay->root_windows ()); m_pWindowSibling = *ppWindowHere; *ppWindowHere = this; // Give due notice XoEvent _event; memset (&_event, 0, sizeof (_event)); XoCreateSelfWindowEvent& event = _event.xcreatewindow; event.type = CreateSelfNotify; event.display = m_pDisplay->display (); event.window = m_window; event.parent = wndParent; event.x = m_x; event.y = m_y; event.width = m_width; event.height = m_height; m_pDisplay->dispatch ((XEvent*) &_event); } return m_window != 0; } LWindow* LWindow::find_sibling (int id) { for (LWindow* pWindow = this; pWindow; pWindow = pWindow->m_pWindowSibling) if (pWindow->id () == id) return pWindow; return NULL; } PFNEvent LWindow::find_event (int event_type, XEvent* event) { for (EventMap* pMap = event_map (); pMap && pMap->pfn; ++pMap) if (pMap->event_type == event_type) return pMap->pfn; // This is the new, improved implementation of event handling. We // simply call the virtual function and let the implementor take // care of it. We still return a NULL pointer so that the old code // works. switch (event_type) { case Expose: handle_expose ((XExposeEvent*) event); break; case ButtonPress: handle_buttonpress ((XButtonEvent*) event); break; case ConfigureNotify: handle_configure ((XConfigureEvent*) event); break; case ResizeRequest: handle_resizerequest ((XResizeRequestEvent*) event); break; default: // printf ("event %d\n", event_type); break; } return (PFNEvent) NULL; } void LWindow::geometry (const char* sz) { if (!sz || !* sz) return; int x = m_x; int y = m_y; unsigned int width = m_width; unsigned int height = m_height; int flags = XParseGeometry (sz, &x, &y, &width, &height); if (flags & XNegative) x = m_pDisplay->width () - width; if (flags & YNegative) y = m_pDisplay->height () - height; if (flags & XValue) { m_x = x; m_fOrigin = True; } if (flags & YValue) { m_y = y; m_fOrigin = True; } if (flags & WidthValue) { m_width = width; m_fExtent = True; } if (flags & HeightValue) { m_height = height; m_fExtent = True; } } /* LWindow::init initializes an LWindow instance from an existing LWindow instance. This can be though of as a clone operation since everything except for the X-Windows window handle is duplicated. (FXIME, really?) */ void LWindow::init (LWindow* pWindow) { // Locality m_pDisplay = pWindow->m_pDisplay; // Appearance m_maskAttr = pWindow->m_maskAttr; m_attr = pWindow->m_attr; m_x = pWindow->m_x; m_y = pWindow->m_y; m_width = pWindow->m_width; m_height = pWindow->m_height; // Personality m_cbInstance = pWindow->m_cbInstance; m_pEventMap = pWindow->m_pEventMap; m_pfnNotify = pWindow->m_pfnNotify; memcpy (this + 1, pWindow + 1, m_cbInstance);// Duplicate instance data } void LWindow::lower (void) { if (!m_window) return; XLowerWindow (m_pDisplay->display (), m_window); } void LWindow::map (void) { if (!m_window) return; XMapWindow (m_pDisplay->display (), m_window); } void LWindow::notify (int child_event, int cArgs, int* rgArgs) { // Some windows don't notify if (!m_pWindowOwner || !m_pWindowOwner->m_pfnNotify) return; XoEvent _event; memset (&_event, 0, sizeof (_event)); XoChildNotifyEvent& event = _event.xchildnotify; event.type = ChildNotify; event.display = m_pDisplay->display (); event.window = m_pWindowOwner->window (); event.pWindowChild = this; event.pvParentData = m_pvOwner; event.child_type = child_event; for (int i = 0; i < cArgs && rgArgs && i < int (sizeof (event.rgData)/sizeof (int)); ++i) event.rgData[i] = rgArgs[i]; (m_pWindowOwner->*m_pfnNotify) ((XEvent*) &event); // m_pDisplay->dispatch ((XEvent*) &event); } void LWindow::release_this (void) { if (m_szName) { free ((void*) m_szName); m_szName = NULL; } if (m_szXName) { free ((void*) m_szXName); m_szXName = NULL; } if (m_szXClass) { free ((void*) m_szXClass); m_szXClass = NULL; } if (m_window) { m_pDisplay->unhash_window (this); XDestroyWindow (m_pDisplay->display (), m_window); m_window = 0; } } /* LWindow::qualify is a first attempt to provide information that Window Managers can use to recognize us. */ void LWindow::qualify (const char* szXName, const char* szXClass) { if (m_szXName) { free ((void*) m_szXName); m_szXName = NULL; } if (szXName && *szXName) { m_szXName = (char*) malloc (strlen (szXName) + 1); memcpy ((void*) m_szXName, szXName, strlen (szXName) + 1); } if (m_szXClass) { free ((void*) m_szXClass); m_szXClass = NULL; } if (szXClass && *szXClass) { int cch = 0; while (szXClass[cch]) cch += 1 + strlen (szXClass + cch); // fprintf (stderr, "class is %d long\n", cch); m_szXClass = (char*) malloc (cch + 1); memcpy ((void*) m_szXClass, szXClass, cch + 1); } } void LWindow::text (const char* sz) { if (m_szName) { free ((void*) m_szName); m_szName = NULL; } if (!sz || !*sz) return; m_szName = (char*) malloc (strlen (sz) + 1); memcpy ((void*) m_szName, sz, strlen (sz) + 1); } void LWindow::transient_for (LWindow* pWindow) { XSetTransientForHint (m_pDisplay->display (), pWindow ? pWindow->m_window : XDefaultRootWindow (m_pDisplay->display ()), m_window); } void LWindow::net_window_type (int type) { const char* sz = NULL; switch (type) { default: case windowTypeNormal: sz = "_NET_WM_WINDOW_TYPE_NORMAL"; break; case windowTypeDesktop: sz = "_NET_WM_WINDOW_TYPE_DESKTOP"; break; case windowTypeDock: sz = "_NET_WM_WINDOW_TYPE_DOCK"; break; case windowTypeToolbar: sz = "_NET_WM_WINDOW_TYPE_TOOLBAR"; break; case windowTypeMenu: sz = "_NET_WM_WINDOW_TYPE_MENU"; break; case windowTypeUtility: sz = "_NET_WM_WINDOW_TYPE_UTILITY"; break; case windowTypeSplash: sz = "_NET_WM_WINDOW_TYPE_SPLASH"; break; case windowTypeDialog: sz = "_NET_WM_WINDOW_TYPE_DIALOG"; break; } Atom a = XInternAtom (xdisplay (), "_NET_WM_WINDOW_TYPE", true); Atom b = XInternAtom (xdisplay (), sz, true); XChangeProperty (xdisplay (), m_window, a, XA_ATOM, sizeof (Atom)*8, PropModeReplace, (unsigned char*) &b, 1); } buici-clock-0.4.9.2/xo/lfont.cxx0000644000000000000000000000433511612677215013247 0ustar /* lfont.cxx $Id: lfont.cxx,v 1.5 1997/10/18 04:57:35 elf Exp $ written by Marc Singer 10 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include "ldisplay.h" #include "lfont.h" void LFontCache::init (LDisplay* pDisplay) { release_this (); // Just in case we are doing something stupid m_pDisplay = pDisplay; m_hashFontName.init (sizeof (XFontStruct*), 101); m_hashFontID.init (sizeof (XFontStruct*), 101); } XFontStruct* LFontCache::find (char* szFont) { HashKey key = LHashTable::make_case_string_key (szFont); XFontStruct* pFont = NULL; m_hashFontName.find (key, &pFont); if (pFont) return pFont; pFont = XLoadQueryFont (m_pDisplay->display (), szFont); if (pFont) { m_hashFontName.add (key, &pFont); m_hashFontID.add (HashKey (pFont->fid), &pFont); } return pFont; } XFontStruct* LFontCache::find (Font fid) { XFontStruct* pFont = NULL; m_hashFontID.find (HashKey (fid), &pFont); return pFont; } void LFontCache::release_this (void) { if (!m_pDisplay) return; HashKey key; XFontStruct** ppFont; for (unsigned32 index = 0; index = m_hashFontName.enumerate_reverse (index, &key, (const void**) &ppFont); ) { m_hashFontID.remove (HashKey ((*ppFont)->fid)); XUnloadFont (m_pDisplay->display (), (*ppFont)->fid); XFreeFontInfo (NULL, *ppFont, 1); m_hashFontName.remove (key); } } buici-clock-0.4.9.2/xo/COPYING0000644000000000000000000004307611612677215012441 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. buici-clock-0.4.9.2/xo/res.cxx0000644000000000000000000002510011612677215012707 0ustar /* res.cxx $Id: res.cxx,v 1.16 1998/10/21 21:13:57 elf Exp $ written by Marc Singer 14 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ //#define USE_TEST #include "standard.h" #include "ctype.h" #if defined (HAVE_FCNTL_H) # include "fcntl.h" #endif #if defined (HAVE_MEMORY_H) # include "memory.h" #endif #define IS_PARSER #include "lres.h" #include "res_y.h" #define LONG_PRIME_MAX (LONG_MAX/10) #define LONG_PRIME_MAX_REM (LONG_MAX - LONG_PRIME_MAX*10) //#define TEST_LEXER #define CB_NODES (0x10000) #define DPRINTF(a) printf a void* LResNode::g_pvBase; void* LResNode::g_pvAlloc; int* LResNode::g_piResource; void* LResNode::alloc (int cb, void* pv) { if (!g_pvBase) { g_pvBase = g_pvAlloc = malloc (CB_NODES); if (!g_pvBase) return NULL; g_piResource = (int*) alloc (sizeof (int), NULL); } void* pvNew = g_pvAlloc; if (pv) memcpy (pvNew, pv, cb); else memset (pvNew, 0, cb); cb = ((cb + 3) & ~3); g_pvAlloc = (unsigned8*) g_pvAlloc + cb; return pvNew; } /* safe_atol converts a string to a long in a safe manner, checking for errors. */ int safe_atol (char* sz, signed long* pl) { if (sz[0] == '0' && tolower (sz[1]) == 'x') { unsigned long l = 0; if (strlen (sz) > 10) return 1; // Overflow on unsigned for (sz += 2; *sz; ++sz) { switch (tolower (*sz)) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': l = (l << 4) + (*sz - '0'); break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': l = (l << 4) + (tolower (*sz) - 'a' + 10); break; default: // assert (false); break; } /* switch */ } /* for */ *pl = (long) l; } /* if */ else { register long l = 0; int fSigned = 0; for (; *sz; ++sz) { switch (*sz) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* DPRINTF (("%d %d %d %d\n", l, *sz - '0', LONG_PRIME_MAX, LONG_PRIME_MAX_REM)); */ if ( l < LONG_PRIME_MAX || ( l == LONG_PRIME_MAX && *sz - '0' < LONG_PRIME_MAX_REM)) l = l*10 + *sz - '0'; else return 1; /* Overflow on unsigned number */ break; case '-': fSigned = 1; case '+': break; } /* switch */ } /* while */ if (fSigned && l > LONG_MAX - 1) return 2; /* Overflow on signed number */ *pl = fSigned ? -l : l; } /* else */ return 0; } /* safe_atol */ int safe_atof (char* sz, float* pr) { *pr = atof (sz); return 0; } bool LResNode::is_invocation (const char* szKeyword, int id) { return ( m_type == INVOCATION && m_v.pNode && m_v.pNode->m_type == KEYWORD && m_v.pNode->m_v.sz && !strcasecmp (m_v.pNode->m_v.sz, szKeyword) && m_v.pNode->m_pNode && m_v.pNode->m_pNode->m_type == ARGLIST && m_v.pNode->m_pNode->m_v.pNode && m_v.pNode->m_pNode->m_v.pNode->m_type == INTEGER && m_v.pNode->m_pNode->m_v.pNode->m_v.l == id ); } bool LResNode::integer (int* pi) { if (m_type != INTEGER) return false; *pi = m_v.l; return true; } bool LResNode::real (float* pr) { if (m_type != REAL) return false; *pr = m_v.r; return true; } bool LResNode::string (char** psz) { if (m_type != STRING) return false; *psz = m_v.sz; return true; } /* find_resources returns a pointer to the first invocation contained by this invocation. This function recurses into the current invocation. */ LResNode* LResNode::find_resources (void) { if (m_type != INVOCATION) return NULL; for (LResNode* pNode = m_v.pNode; pNode; pNode = pNode->m_pNode) if (pNode->m_type == RESOURCE) return pNode->m_v.pNode; return NULL; } /* LResNode::keyword returns a pointer to the keyword string for the invocation. The return value is NULL if the node is not an invocation. */ char* LResNode::keyword (void) { if ( m_type != INVOCATION || !m_v.pNode || m_v.pNode->m_type != KEYWORD) return NULL; return m_v.pNode->m_v.sz; } /* LResNode::locate locates a typed resource with the given ID. It is required that all resources have the ID as the first argument if they are found with this primitive. */ LResNode* LResNode::locate (const char* szInvocation, int id) { LResNode* pNode = (LResNode*) ((unsigned8*) g_pvBase + *g_piResource); if (pNode->m_v.pNode) pNode = pNode->m_v.pNode; for (; pNode; pNode = pNode->m_pNode) { if (pNode->is_invocation (szInvocation, id)) return pNode; } return NULL; } /* LResNode::enum_args enumerates the argument vector for an invocation. On the first call, pass the pointer to the invocation. For successive calls, pass the pointer returned by the function. */ LResNode* LResNode::enum_args (void) { if (!this) return NULL; // Initial case if (m_type == INVOCATION) { for (LResNode* pNode = m_v.pNode; pNode; pNode = pNode->m_pNode) if (pNode->m_type == ARGLIST) return pNode->m_v.pNode; return NULL; } // Iterative case return m_pNode; } void LResNode::emit (int index) { /* DPRINTF (("[emit 0x%x]", (char*) pNode - (char*) g_pvNodeAlloc)); */ switch (m_type) { case ARGLIST: DPRINTF ((" (")); for (LResNode* pNode = m_v.pNode; pNode; pNode = pNode->m_pNode) pNode->emit (index + 1); DPRINTF ((" )")); break; case INVOCATION: DPRINTF (("%*.*s", index, index, "")); for (LResNode* pNode = m_v.pNode; pNode; pNode = pNode->m_pNode) pNode->emit (index + 1); DPRINTF (("\n")); break; case KEYWORD: DPRINTF (("%s", m_v.sz)); break; case INTEGER: DPRINTF ((" %ld", m_v.l)); break; case REAL: DPRINTF ((" %g", m_v.r)); break; case STRING: DPRINTF ((" \"%s\"", m_v.sz)); break; case RESOURCE: if (index > 0) DPRINTF ((" {\n")); for (LResNode* pNode = m_v.pNode; pNode; pNode = pNode->m_pNode) { pNode->emit (index + 1); /* DPRINTF (("[ in resource 0x%x=>0x%x]", (char*) pNode - (char*) g_pvNodeAlloc, (char*) pNode->m_pNode - (char*) g_pvNodeAlloc)); */ } if (index > 0) DPRINTF (("%*.*s}", index - 1, index - 1, "")); break; } } void LResNode::generate (LResNode* pNode) { *g_piResource = (unsigned8*) pNode - (unsigned8*) g_pvBase; // Emit all of the resources // for (; pNode; pNode = pNode->m_pNode) // emit (pNode, -1); DPRINTF (("resource templates require %d bytes\n", int ((unsigned8*) g_pvAlloc - (unsigned8*) g_pvBase))); { int fh = open ("resources", O_WRONLY | O_CREAT | O_TRUNC, 0660); write (fh, g_pvBase, (unsigned8*) g_pvAlloc - (unsigned8*) g_pvBase); close (fh); } // pNode = locate ("menu", 1); // pNode->emit (0); } /* _fixup reverses the order of the argument and resource lists. These lists are collected in reverse order because of the way that the parser reduces the grammer. Yes, we could fix it, but the overhead of reordering is low. Note that the invocation itself is not reordered, but it must be enumerated in order to reorder the argument list, the possible resource list. */ void LResNode::_fixup (void) { switch (m_type) { default: break; case ARGLIST: case RESOURCE: { LResNode* pNodeNext = NULL; LResNode* pNodeLink; for (LResNode* pNodeStep = m_v.pNode; pNodeStep; pNodeStep = pNodeLink) { pNodeLink = pNodeStep->m_pNode; pNodeStep->m_pNode = pNodeNext; pNodeNext = pNodeStep; } m_v.pNode = pNodeNext; } case INVOCATION: for (LResNode* pNode = m_v.pNode; pNode; pNode = pNode->m_pNode) pNode->_fixup (); break; } } void LResNode::fixup (LResNode* pNode) { for (; pNode; pNode = pNode->m_pNode) pNode->_fixup (); } /* as_bool returns a boolean value interpretation for a X Resource Manager value. This is a convenience feature to make the specification of booleans simple. The default is returned if the value is not valid. */ bool as_bool (const XrmValue& value, bool fDefault) { if (!value.addr || !value.size) return fDefault; if ( *value.addr == 't' || *value.addr == 'T' || *value.addr == 'y' || *value.addr == 'Y' || *value.addr == '1') return true; if ( *value.addr == 'f' || *value.addr == 'F' || *value.addr == 'n' || *value.addr == 'N' || *value.addr == '0') return false; return fDefault; } extern "C" int yywrap (void) { return 1; } /* yywrap */ #if defined (USE_TEST) int main (int /* argc */, char** /* argv */) { yyin = stdin; #if defined (TEST_LEXER) int result; while (result = yylex ()) { switch (result) { case KEYWORD: DPRINTF ((" <%s>", yylval.sz)); break; case PO: DPRINTF ((" PO")); break; case PC: DPRINTF ((" PC\n")); break; case BO: DPRINTF ((" BO\n")); break; case BC: DPRINTF ((" BC\n")); break; case QUOTE: DPRINTF ((" QUOTE")); break; case INTEGER: DPRINTF ((" INTEGER %d", yylval.l)); break; case REAL: DPRINTF ((" REAL")); break; case STRING: DPRINTF ((" STRING '%s'", yylval.sz)); break; case ERROR: DPRINTF ((" ERROR\n")); break; default: if (isprint (result)) DPRINTF ((" '%c'", result)); else DPRINTF ((" [%d]", result)); break; } } #else yyparse (); #endif #if 0 LResNode* pNodeMenu = LResNode::locate ("dialog", 1); for (LResNode* pNode = pNodeMenu->find_resources (); pNode; pNode = pNode->next ()) { pNode->emit (1); for (LResNode* pNodeArg = pNode; pNodeArg = pNodeArg->enum_args (); ) { pNodeArg->emit (3); } } #endif } #endif buici-clock-0.4.9.2/xo/config.h.in0000644000000000000000000000175411612677215013426 0ustar /* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define to empty if the keyword does not work. */ #undef const /* Define as __inline if that's what the C compiler calls it. */ #undef inline /* Define to `unsigned' if doesn't define. */ #undef size_t /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define if you have the memset function. */ #undef HAVE_MEMSET /* Define if you have the strncmp function. */ #undef HAVE_STRNCMP /* Define if you have the header file. */ #undef HAVE_FCNTL_H /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the header file. */ #undef HAVE_MEMORY_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H buici-clock-0.4.9.2/xo/loupe.cxx0000644000000000000000000002065711612677215013256 0ustar /* loupe.cxx $Id: loupe.cxx,v 1.7 1998/10/15 07:12:41 elf Exp $ written by Marc Singer 30 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include "ldisplay.h" #include "lwindow.h" #include "wdialog.h" #include "stats.h" #include "dither.h" #include "lpicture.h" #include #include #include #define ROWWIDTH(width,depth) ((((width)*(depth))/8 + 3)& ~0x3) #define SHM(v,s,m) ((s < 8) ? (((v) << (8 - (s)))&(m)) \ : (((v) >> ((s) - 8))&(m))) #define USE_SHM // Enable XShmImage's #define USE_DITHER char** g_argv; bool g_fQuit; void exit_error (const char* sz, ...) { fprintf (stderr, "%s: ", g_argv[0]); va_list ap; va_start (ap, sz); vfprintf (stderr, sz, ap); va_end (ap); fprintf (stderr, "\n"); exit (1); } class WTopLevel : public LWindow { protected: bool m_fSharedMemory; XShmSegmentInfo m_shmInfo; public: XImage* m_pImage; public: WTopLevel (LDisplay* pDisplay) : LWindow (pDisplay) { zero (); } WTopLevel (LWindow* pWindow) : LWindow (pWindow) { zero (); } void zero (void) { memset (((LWindow*) this) + 1, 0, sizeof (*this) - sizeof (LWindow)); } void buttondown (XButtonEvent* pEvent); void expose (XExposeEvent* pEvent); void load_image (const char* szFile); }; EventMap g_rgEMTop[] = { { ButtonPress, (PFNEvent) &WTopLevel::buttondown }, { Expose, (PFNEvent) &WTopLevel::expose }, { 0, NULL }, }; void WTopLevel::buttondown (XButtonEvent* pEvent) { XUnmapWindow (pEvent->display, pEvent->window); g_fQuit = true; } void WTopLevel::expose (XExposeEvent* pEvent) { GC gc = display ()->gc (); LTime time; time.reset (); long overhead = time.delta (); { double r = (overhead*1e-6)/1; printf ("(overhead %d.%07d s/fetch) ", int (r), int ((r - int (r))*1e7)); } time.reset (); int cBlt = 1; if (m_fSharedMemory) { for (int i = cBlt; i--;) { XShmPutImage (pEvent->display, pEvent->window, gc, m_pImage, 0, 0, 0, 0, m_pImage->width, m_pImage->height, False); m_pDisplay->flush (); } } else { for (int i = cBlt; i--;) { XPutImage (pEvent->display, pEvent->window, gc, m_pImage, 0, 0, 0, 0, m_pImage->width, m_pImage->height); m_pDisplay->flush (); } } { long delta = time.delta (); double r = ((delta - overhead)*1e-6)/cBlt; printf ("took %d.%07d s/blt\n", int (r), int ((r - int (r))*1e7)); } } void register_base_classes (LDisplay* pDisplay) { LWindow* pWindow = new LWindow (pDisplay); pWindow->event_map (g_rgEMTop); pWindow->select_events (ButtonPressMask | ExposureMask); pWindow->set_background_pixel (XBlackPixel (pDisplay->display (), 0)); pWindow->set_bit_gravity (NorthWestGravity); // pWindow->notify ((PFNEvent) WTopLevel::child); if (!pDisplay->hash_template ("top-level", pWindow)) return; // WButton::register_template (pDisplay); // WTextEdit::register_template (pDisplay); // WDialog::register_template (pDisplay); } void WTopLevel::load_image (const char* szFile) { LPicture picture; if (!picture.read (szFile)) return; int width = picture.m_width; int height = picture.m_height; int cbRowSrc = picture.m_cbStride; // --- Create the XImage Visual* pVisual = m_pDisplay->visual (); int shiftRed = m_pDisplay->shift_red (); int shiftGreen = m_pDisplay->shift_green (); int shiftBlue = m_pDisplay->shift_blue (); int depth = m_pDisplay->depth (); int cbRowDst = ROWWIDTH (width, depth); unsigned8* pbDst; if ( #if !defined (USE_SHM) 0 && #endif XShmQueryExtension (m_pDisplay->display ())) { m_pImage = XShmCreateImage (m_pDisplay->display (), pVisual, depth, ZPixmap, NULL, &m_shmInfo, width, height); m_shmInfo.shmid = shmget (IPC_PRIVATE, cbRowDst*height, IPC_CREAT | 0777); m_shmInfo.shmaddr = m_pImage->data = (char*) (pbDst = (unsigned8*) shmat (m_shmInfo.shmid, 0, 0)); m_shmInfo.readOnly = false; XShmAttach (m_pDisplay->display (), &m_shmInfo); m_fSharedMemory = true; } else { pbDst = (unsigned8*) malloc (height*cbRowDst); m_pImage = XCreateImage (m_pDisplay->display (), pVisual, depth, ZPixmap, 0, (char*) pbDst, width, height, m_pDisplay->pad (), cbRowDst); } if (picture.m_depth == 8) { int cbDeltaSrc = width - cbRowSrc; int cbDeltaDst = width*(depth/8) - cbRowDst; unsigned8* pbS = (unsigned8*) picture.m_pv; unsigned8* pbD = pbDst; if (picture.m_fNonNormal) { pbS += (height - 1)*cbRowSrc; cbDeltaSrc -= 2*cbRowSrc; } for (int row = 0; row < height; ++row, pbS += cbDeltaSrc, pbD += cbDeltaDst) { for (int col = 0; col < width; ++col, ++pbS, pbD += depth/8) { RGBQUAD& rgb = picture.m_rgRGB[*pbS]; unsigned16 pel = SHM (rgb.rgbRed, shiftRed, pVisual->red_mask) | SHM (rgb.rgbGreen, shiftGreen, pVisual->green_mask) | SHM (rgb.rgbBlue, shiftBlue, pVisual->blue_mask); if (depth == 16) *(unsigned16*)pbD = pel; else *pbD = (unsigned8) pel; } } } #if defined (USE_DITHER) if (picture.m_depth == 24) { unsigned8* pbSrc = (unsigned8*) picture.m_pv; LDither dither; dither.init (); dither.dither (width, height, pbSrc, pbDst); cbRowSrc = ROWWIDTH (width, 8); pbSrc = (unsigned8*) malloc (height*cbRowSrc); memcpy (pbSrc, pbDst, height*cbRowSrc); RGBQUAD* rgRGB = (RGBQUAD*) dither.palette (); int cbDeltaSrc = width - cbRowSrc; int cbDeltaDst = width*(depth/8) - cbRowDst; unsigned8* pbS = pbSrc; unsigned8* pbD = pbDst; if (picture.m_fNonNormal) { pbS += (height - 1)*cbRowSrc; cbDeltaSrc -= 2*cbRowSrc; } for (int row = 0; row < height; ++row, pbS += cbDeltaSrc, pbD += cbDeltaDst) { for (int col = 0; col < width; ++col, ++pbS, pbD += depth/8) { RGBQUAD& rgb = rgRGB[*pbS]; unsigned16 pel = SHM (rgb.rgbRed, shiftRed, pVisual->red_mask) | SHM (rgb.rgbGreen, shiftGreen, pVisual->green_mask) | SHM (rgb.rgbBlue, shiftBlue, pVisual->blue_mask); if (depth == 16) *(unsigned16*)pbD = pel; else *pbD = (unsigned8) pel; } } free (pbSrc); } #else if (picture.m_depth == 24) { int cbDeltaSrc = width*(24/8) - cbRowSrc; int cbDeltaDst = width*(depth/8) - cbRowDst; unsigned8* pbS = (unsigned8*) picture.m_pv; unsigned8* pbD = pbDst; if (picture.m_fNonNormal) { pbS += (height - 1)*cbRowSrc; cbDeltaSrc -= 2*cbRowSrc; } for (int row = 0; row < height; ++row, pbS += cbDeltaSrc, pbD += cbDeltaDst) { for (int col = 0; col < width; ++col, pbS += 3, pbD += depth/8) { unsigned16 pel = SHM (pbS[2], shiftRed, pVisual->red_mask) | SHM (pbS[1], shiftGreen, pVisual->green_mask) | SHM (pbS[0], shiftBlue, pVisual->blue_mask); if (depth == 16) *(unsigned16*)pbD = pel; else *pbD = (unsigned8) pel; } } } #endif } int main (int argc, char** argv) { if (argc != 2) { fprintf (stderr, "usage: %s \n", argv[0]); exit (1); } { LDisplay display; if (!display.open ()) exit_error ("unable to open display"); register_base_classes (&display); WTopLevel* pWindow = new WTopLevel (display.find_template ("top-level")); pWindow->load_image (argv[1]); pWindow->position (100, 100, pWindow->m_pImage->width, pWindow->m_pImage->height); if (!pWindow->create (0)) exit_error ("unable to open window"); pWindow->map (); while (!g_fQuit) { display.dispatch_next_event (); } pWindow->unmap (); // Make a clean (looking) exit display.flush (); delete pWindow; } // dmalloc_exit (); // See what is left allocated } buici-clock-0.4.9.2/xo/lres.h0000644000000000000000000000470411612677215012517 0ustar /* lres.h -*- C++ -*- $Id: lres.h,v 1.5 1998/10/21 21:13:57 elf Exp $ written by Marc Singer 15 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #if !defined (__LRES_H__) # define __LRES_H__ #if defined (IS_PARSER) typedef struct _NODE { int type; struct _NODE* pNode; union { long l; float r; char* sz; struct _NODE* pNode; } v; } NODE; #endif class LResNode { private: int m_type; LResNode* m_pNode; union { long l; float r; char* sz; LResNode* pNode; } m_v; static void* g_pvBase; // Base allocation for resource nodes static void* g_pvAlloc; // Source for allocation of new nodes static int* g_piResource; // Offset from base to root node void _fixup (void); public: static void* alloc (int cb, void *pv); // Allocate resource memory void emit (int index); LResNode* enum_args (void); LResNode* find_resources (void); static void fixup (LResNode* pNode); static void generate (LResNode* pNode); char* keyword (void); bool is_invocation (const char* szKeyword, int id); static LResNode* locate (const char* szInvocation, int id); LResNode* next (void) { return m_pNode; } bool integer (int* pi); bool real (float* pr); bool string (char** sz); }; extern void* g_pvNodeAlloc; /* Base allocation for all NODEs */ void* alloc_resource (int cb, void* pv); int safe_atol (char* sz, signed long* pl); int safe_atof (char* sz, float* pr); bool as_bool (const XrmValue& value, bool fDefault); extern FILE* yyin; extern "C" int yylex (void); int yyparse (void); #endif /* __LRES_H__ */ buici-clock-0.4.9.2/xo/stats.cxx0000644000000000000000000000675111612677215013267 0ustar /* stats.cxx $Id: stats.cxx,v 1.4 2000/01/13 07:04:46 elf Exp $ written by Marc Singer 3 October 1996 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Support for (simple) statistical analysis of program performance data. */ /* ----- Includes */ #include "standard.h" #include "stats.h" #include "math.h" #include "sys/time.h" #include /* ----- Class Globals/Statics */ /* ----- Methods */ void LStatistics::calc (float& rMean, float& rStddev, long& min, long& max) { double sum_xx = 0.0; double sum_x = 0.0; min = LONG_MAX; max = LONG_MIN; // TraceMsg (NULL, "stddev %d samples", count ()); for (int c = count (); c--; ) { sum_xx += (double) m_rgSamples[c]*(double) m_rgSamples[c]; sum_x += (double) m_rgSamples[c]; if (m_rgSamples[c] > max) max = m_rgSamples[c]; if (m_rgSamples[c] < min) min = m_rgSamples[c]; } double n = (double) count (); rMean = float (sum_x/n); rStddev = float (sqrt ((sum_xx - (sum_x*sum_x)/n)/(n - 1.0))); } float LStatistics::mean (void) { // TraceMsg (NULL, "mean has %d samples", count ()); double value = 0.0; for (int c = count (); c--; ) value += (double) m_rgSamples[c]; return float (value/(double) count ()); } /* LStatistics::sample collects a sample. It save the last sizeof (m_rgSamples)/sizeof (long) samples. */ void LStatistics::sample (long sample) { int i = int (((m_cSamples++) % (sizeof (m_rgSamples)/sizeof (long)))); assert (i < C_STAT_SAMPLES); m_rgSamples[i] = sample; } /* LStatistics::stddev calculates the sample standard deviation where the samples represent a subset of a larger population. The compuation has been simplified algebraicly from the definition of the standard deviation. */ float LStatistics::stddev (void) { double sum_xx = 0.0; double sum_x = 0.0; double n = (double) count (); // TraceMsg (NULL, "stddev %d samples", count ()); for (int c = count (); c--; ) { sum_xx += (double) m_rgSamples[c]*(double) m_rgSamples[c]; sum_x += (double) m_rgSamples[c]; } return float (sqrt ((sum_xx - (sum_x*sum_x)/n)/(n - 1.0))); } long LTime::delta (void) { // struct tms l_times; // struct rusage l_usage; struct timeval l_timeval; // times (&l_times); // getrusage (RUSAGE_SELF, &l_usage); // return (l_usage.ru_utime.tv_sec - m_usage.ru_utime.tv_sec)*1000000L // + (l_usage.ru_utime.tv_usec - m_usage.ru_utime.tv_usec); gettimeofday (&l_timeval, NULL); return (l_timeval.tv_sec - m_timeval.tv_sec)*1000000L + (l_timeval.tv_usec - m_timeval.tv_usec); } void LTime::reset (void) { // times (&m_times); // getrusage (RUSAGE_SELF, &m_usage); gettimeofday (&m_timeval, NULL); } buici-clock-0.4.9.2/xo/standard.h0000644000000000000000000000335111612677215013347 0ustar /* standard.h $Id: standard.h,v 1.7 1997/10/23 06:00:47 elf Exp $ written by Marc Singer 8 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #if !defined (__STANDARD_H__) # define __STANDARD_H__ /* ----- Includes */ #include "config.h" // autoconf configuration header #if defined (STDC_HEADERS) # include # include # include #endif #if defined (HAVE_UNISTD_H) # include #endif #if defined (HAVE_LIMITS_H) # include "limits.h" #endif #include #include #include #include //#include "dmalloc.h" // ----- Typedefs typedef signed char int8; typedef unsigned char unsigned8; typedef short int16; typedef unsigned short unsigned16; typedef signed long int32; typedef signed long long int64; typedef unsigned long unsigned32; typedef unsigned long long unsigned64; #endif /* __STANDARD_H__ */ buici-clock-0.4.9.2/xo/.version_minor0000644000000000000000000000000211612677215014256 0ustar 2 buici-clock-0.4.9.2/xo/.version_patch0000644000000000000000000000000211612677215014231 0ustar 6 buici-clock-0.4.9.2/xo/wdialog.cxx0000644000000000000000000001604211612677215013551 0ustar /* wdialog.cxx $Id: wdialog.cxx,v 1.12 1998/10/15 04:17:25 elf Exp $ written by Marc Singer 16 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include "ldisplay.h" //#include "lwindowclass.h" #include "lwindow.h" #include "wdialog.h" #include "wbutton.h" #include "wtext.h" typedef struct { Font fid; // Default dialog font, used for dlg units int id; // ID for identifying int unitWidth; // Width of a dialog character int unitHeight; // Height of a dialog character LResNode* pNodeResource; // Resource node } DIALOG_INFO; #define EVENT_MASK ( ButtonPressMask \ | ButtonReleaseMask \ | ExposureMask \ | EnterWindowMask \ | LeaveWindowMask) EventMap g_rgEHDialog[] = { { CreateSelfNotify, (PFNEvent) &WDialog::createself }, { 0, NULL }, }; WDialog* WDialog::create (LWindow* pWindowOwner, char* szFileResource, int id) { // Parse the resource file, **FIXME** // this should be done in LResNode FILE* fp = fopen (szFileResource, "r"); yyin = fp; yyparse (); fclose (fp); // Extract dialog specific information int rgi[4] = { 0, 0, 0, 0 }; LResNode* pNode = LResNode::locate ("dialog", id); if (!pNode) return NULL; WDialog* pWindow = new WDialog (pWindowOwner->display () ->find_template ("dialog")); pWindow->m_pNodeResource = pNode; // { // LResNode* pNodeArg = pNode->enum_args (); // if (pNodeArg) // pNodeArg->integer (&id); // } pWindow->id (id); for (pNode = pNode->find_resources (); pNode; pNode = pNode->next ()) { char* sz = pNode->keyword (); if (!sz) continue; int* pi; if (!strcasecmp (sz, "origin")) pi = &rgi[0]; else if (!strcasecmp (sz, "extent")) pi = &rgi[2]; else continue; int i = 0; for (LResNode* pNodeArg = pNode; i < 2 && (pNodeArg = pNodeArg->enum_args ());) { if (pNodeArg->integer (pi)) { *pi++ *= (i ? pWindow->m_unitHeight : pWindow->m_unitWidth); ++i; } float r; if (pNodeArg->real (&r)) { *pi++ = int (r* (i ? pWindow->m_unitHeight : pWindow->m_unitWidth)); ++i; } } } pWindow->owner (pWindowOwner, pWindow->id ()); pWindow->position (rgi[0], rgi[1], rgi[2], rgi[3]); pWindow->LWindow::create (NULL); pWindow->map (); return pWindow; } void WDialog::createself (XoCreateSelfWindowEvent* pEvent) { fprintf (stderr, "create dialog\n"); LResNode* pNode = m_pNodeResource; // Create the child windows for (pNode = pNode->find_resources (); pNode; pNode = pNode->next ()) { char* sz = pNode->keyword (); if (!sz) continue; if (!strcasecmp (sz, "pushbutton")) create_pushbutton (pEvent, pNode); if (!strcasecmp (sz, "textedit")) create_textedit (pEvent, pNode); } m_pNodeResource = NULL; } void WDialog::create_pushbutton (XoCreateSelfWindowEvent* /* pEvent */, LResNode* pNode) { char* szTitle = NULL; int rgi[4] = { 0, 0, 0, 0 }; WButton* pWindow = new WButton (m_pDisplay->find_template ("button")); int id = 0; { LResNode* pNodeArg = pNode->enum_args (); if (pNodeArg) pNodeArg->integer (&id); } pWindow->id (id); for (pNode = pNode->find_resources (); pNode; pNode = pNode->next ()) { char* sz = pNode->keyword (); if (!sz) continue; int* pi; if (!strcasecmp (sz, "origin")) pi = &rgi[0]; else if (!strcasecmp (sz, "extent")) pi = &rgi[2]; else if (!strcasecmp (sz, "title")) { LResNode* pNodeArg = pNode->enum_args (); pNodeArg->string (&szTitle); continue; } else continue; int i = 0; for (LResNode* pNodeArg = pNode; i < 2 && (pNodeArg = pNodeArg->enum_args ());) { if (pNodeArg->integer (pi)) { *pi++ *= (i ? m_unitHeight : m_unitWidth); ++i; } float r; if (pNodeArg->real (&r)) { *pi++ = int (r* (i ? m_unitHeight : m_unitWidth)); ++i; } } } pWindow->text (szTitle); pWindow->owner (owner (), ((this->id () << 16) | id)); pWindow->position (rgi[0], rgi[1], rgi[2], rgi[3]); pWindow->create (this); pWindow->map (); } void WDialog::create_textedit (XoCreateSelfWindowEvent* /* pEvent */, LResNode* pNode) { char* szText = NULL; int rgi[4] = { 0, 0, 0, 0 }; WTextEdit* pWindow = new WTextEdit (m_pDisplay->find_template ("text")); int id = 0; { LResNode* pNodeArg = pNode->enum_args (); if (pNodeArg) pNodeArg->integer (&id); } pWindow->id (id); for (pNode = pNode->find_resources (); pNode; pNode = pNode->next ()) { char* sz = pNode->keyword (); if (!sz) continue; int* pi; if (!strcasecmp (sz, "origin")) pi = &rgi[0]; else if (!strcasecmp (sz, "extent")) pi = &rgi[2]; else if (!strcasecmp (sz, "text")) { LResNode* pNodeArg = pNode->enum_args (); pNodeArg->string (&szText); continue; } else continue; int i = 0; for (LResNode* pNodeArg = pNode; i < 2 && (pNodeArg = pNodeArg->enum_args ());) { if (pNodeArg->integer (pi)) { *pi++ *= (i ? m_unitHeight : m_unitWidth); ++i; } float r; if (pNodeArg->real (&r)) { *pi++ = int (r* (i ? m_unitHeight : m_unitWidth)); ++i; } } } // pWindow->owner (pWindowParent->owner (), (void*) ((pInfo->id << 16) | id)); pWindow->position (rgi[0], rgi[1], rgi[2], rgi[3]); pWindow->create (this); if (szText) pWindow->text (szText); pWindow->map (); } void WDialog::register_template (LDisplay* pDisplay) { WDialog* pWindow = new WDialog (pDisplay); pWindow->event_map (g_rgEHDialog); pWindow->select_events (EVENT_MASK); XrmValue value; pDisplay->find_resource ("xo.dialog.font", "Toolkit.Dialog.Font", NULL, &value); XFontStruct* pFont = pDisplay->find_font (value.addr); if (pFont) { pWindow->m_fid = pFont->fid; pWindow->m_unitWidth = pFont->per_char['m' - pFont->min_char_or_byte2].width; // pInfo->unitWidth // = (pFont->min_bounds.width + pFont->max_bounds.width)/2; pWindow->m_unitHeight = pFont->max_bounds.ascent + pFont->max_bounds.descent; } pDisplay->hash_template ("dialog", pWindow); // pClass->set_background_pixel (XBlackPixel (pDisplay->display (), 0)); // pClass->set_bit_gravity (SouthEastGravity); } buici-clock-0.4.9.2/xo/classes.cxx0000644000000000000000000001052111612677215013554 0ustar /* classes.cxx $Id: classes.cxx,v 1.16 1998/10/26 18:59:28 elf Exp $ written by Marc Singer 9 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include "ldisplay.h" #include "lwindow.h" #include "wbutton.h" #include "wdialog.h" #include "wtext.h" extern bool g_fQuit; class WTopLevel : public LWindow { public: WTopLevel (LDisplay* pDisplay) : LWindow (pDisplay) {} void child (XoChildNotifyEvent* pEvent); }; //void eh_buttondown (LWindow* pWindow, XButtonEvent* pEvent); //void eh_expose (LWindow* pWindow, XExposeEvent* pEvent); //void eh_create (LWindow* pWindow, XoCreateSelfWindowEvent* pEvent); //void eh_child (LWindow* pWindow, XoChildNotifyEvent* pEvent); #if 0 EventHandlerMap g_rgEventHandlerMap[] = { { ButtonPress, (PFNEvent) &eh_buttondown }, { Expose, (PFNEvent) &eh_expose }, { CreateSelfNotify, (PFNEvent) &eh_create }, { ChildNotify, (PFNEvent) &eh_child }, { 0, NULL }, }; #endif void WTopLevel::child (XoChildNotifyEvent* pEvent) { printf ("notify from 0x%lx\n", (long) pEvent->pvParentData); if (pEvent->pvParentData == (void*) 1 && pEvent->child_type == ButtonPressNotify) { XUnmapWindow (pEvent->display, pEvent->window); g_fQuit = true; } else if (pEvent->pvParentData == (void*) 0x10001 && pEvent->child_type == ButtonPressNotify) { // XUnmapWindow (pEvent->display, pEvent->window); g_fQuit = true; } else if (pEvent->pvParentData == (void*) 0x10002 && pEvent->child_type == ButtonPressNotify) { LWindow* pWindow = m_pDisplay->find_child (1); pWindow = pWindow->find_child (3); WTextEdit* pText = (WTextEdit*) pWindow; printf ("Captured '%s'\n", pText->text ()); } } #if 0 void eh_create (LWindow* pWindow, XoCreateSelfWindowEvent* pEvent) { fprintf (stderr, "create self [%ld] window 0x%lx parent 0x%lx\n", pEvent->serial, pEvent->window, pEvent->parent); LWindow* pWindowChild = new LWindow (pWindow->display() ->find_template ("button")); pWindowChild->owner (pWindow, (void*) 1); pWindowChild->position (10, 10, 70, 40); if (pWindowChild->create (pWindow)) pWindowChild->map (); else delete pWindowChild; } void eh_buttondown (LWindow* /* pWindow */, XButtonEvent* pEvent) { XUnmapWindow (pEvent->display, pEvent->window); g_fQuit = true; } void eh_expose (LWindow* pWindow, XExposeEvent* pEvent) { fprintf (stderr, "expose serial %ld count %d [%d %d %d %d]\n", pEvent->serial, pEvent->count, pEvent->x, pEvent->y, pEvent->width, pEvent->height); GC gc = pWindow->display ()->gc (); // if (!pEvent->count) // XSetState (pEvent->display, gc, 3, 0, GXcopy, AllPlanes); XDrawLine (pEvent->display, pEvent->window, gc, pEvent->x, pEvent->y, pEvent->x + pEvent->width, pEvent->y + pEvent->height); XDrawLine (pEvent->display, pEvent->window, gc, pEvent->x + pEvent->width, pEvent->y, pEvent->x, pEvent->y + pEvent->height); } #endif void register_base_classes (LDisplay* pDisplay) { LWindow* pWindow = new LWindow (pDisplay); // pWindow->event_handler_map (g_rgEventHandlerMap); // pWindow->select_events (ButtonPressMask | ExposureMask); // pWindow->set_background_pixel (XBlackPixel (pDisplay->display (), 0)); // pWindow->set_bit_gravity (SouthEastGravity); pWindow->notify ((PFNEvent) &WTopLevel::child); if (!pDisplay->hash_template ("top-level", pWindow)) return; WButton::register_template (pDisplay); WTextEdit::register_template (pDisplay); WDialog::register_template (pDisplay); } buici-clock-0.4.9.2/xo/lwindowclass.h0000644000000000000000000000511111612677215014254 0ustar /* lwindowclass.h -*- C++ -*- $Id: lwindowclass.h,v 1.3 1997/10/18 04:57:40 elf Exp $ written by Marc Singer 9 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #if !defined (__LWINDOWCLASS_H__) # define __LWINDOWCLASS_H__ /* ----- Includes */ #include "lhash.h" /* ----- Classes */ class LDisplay; class LWindow; typedef void (*PFNEvent) (LWindow* pWindow, XEvent* pEvent); typedef struct { int event_type; PFNEvent pfn; } EventHandlerMap; class LWindowClass { protected: static LHashTable g_hashClass; // szClass->LWindowClass* char* m_szName; // Class name, case insensitive EventHandlerMap* m_pEventHandlerMap; XSetWindowAttributes m_attribute; unsigned long m_attribute_mask; void* m_pvUser; // Associated instance specific data public: LWindowClass () { zero (); } ~LWindowClass () { release_this (); } void zero (void) { memset (this, 0, sizeof (*this)); } bool register_class (char* szName, long event_mask, EventHandlerMap* pEventHandlerMap); void release_this (void) {} static LWindowClass* find_class (char* szName); unsigned long attributes (XSetWindowAttributes* pAttribute) { memcpy (pAttribute, &m_attribute, sizeof (m_attribute)); return m_attribute_mask; } void* data (void) { return m_pvUser; } EventHandlerMap* event_handler_map (void) { return m_pEventHandlerMap; } void set_background_pixel (unsigned long pixel) { m_attribute.background_pixel = pixel; m_attribute_mask |= CWBackPixel; } void set_bit_gravity (int gravity) { m_attribute.bit_gravity = gravity; m_attribute_mask |= CWBitGravity; } void* set_data (void* pv) { void* pvPrev = m_pvUser; m_pvUser = pv; return pvPrev; } }; #endif /* __LWINDOWCLASS_H__ */ buici-clock-0.4.9.2/xo/larray.h0000644000000000000000000000536411612677215013047 0ustar /* larray.h $Id: larray.h,v 1.2 1997/10/18 04:57:34 elf Exp $ written by Marc Singer 9 October 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __LARRAY_H__ #define __LARRAY_H__ // ----- Inclusions #include // ----- Constants // ----- Typedefs // ----- Classes class LArray { protected: int m_cbEach; // Size of each item is bytes int m_cStep; // Allocation increment long m_cItems; // Number of filled items in array long m_cItemMax; // Size of allocation void* m_rgItems; // Item array void* _at (long iItem) const { return (void*) ((char*) m_rgItems + iItem*m_cbEach); } int _at (const void* pv) const { return (((const char*) pv) - ((const char*) m_rgItems))/m_cbEach; } public: LArray () { zero (); init (sizeof (void*), 4); } LArray (int cbEach) { zero (); init (cbEach); } LArray (int cbEach, int cStep) { zero (); init (cbEach, cStep); } ~LArray () { release (); } void init (int cbEach, int cStep = 4); void release (void); void zero (void) { memset (this, 0, sizeof (*this)); } bool add (const void* pv); void* add_new (void); // Add and return pointer to it bool alloc (long cItems); bool alloc_to (long cItems); void* at (long iItem) const; long at (const void* pv) const; void attach (void*, long cb); void* base (void) const { return m_rgItems; } int count_each (void) { return m_cbEach; } bool contains (const void* pv); void* enumerate (const void* pv); void* enumerate_reverse (const void* pv); bool get (long iItem, void* pv); long get_count () const { return m_cItems; } void* insert (const void*); void* reference (long iItem); void remove (const void* pv); void remove (long iItem, long cItems = 1); bool set (long iItem, const void* pv); void truncate (long cItems); }; // ----- Macros // ----- Globals / Externals // ----- Prototypes // ----- Inline #endif // __LARRAY_H__ buici-clock-0.4.9.2/xo/lwindow.h0000644000000000000000000001534411612677215013237 0ustar /* lwindow.h -*- C++ -*- $Id: lwindow.h,v 1.18 1997/10/23 06:56:16 elf Exp $ written by Marc Singer 8 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #if !defined (__LWINDOW_H__) # define __LWINDOW_H__ /* ----- Includes */ #include #include #include "messages.h" enum { windowTypeNormal = 0, windowTypeDesktop, windowTypeDock, windowTypeToolbar, windowTypeMenu, windowTypeUtility, windowTypeSplash, windowTypeDialog, }; class LDisplay; class LWindow; typedef void (LWindow::*PFNEvent)(XEvent* pEvent); typedef struct { int event_type; PFNEvent pfn; } EventMap; class LWindow { protected: // -- X Attributes LDisplay* m_pDisplay; // X display where window is displayed Window m_window; // X window handle // long m_event_mask; // X event mask, cached XSetWindowAttributes m_attr; // X window creation attributes unsigned long m_maskAttr; // X attribute mask for creation short m_x, m_y; // Origin short m_width, m_height; // and extent bool m_fOrigin; // true: window origin specied bool m_fExtent; // true: window extent specied // -- Properties for X Windows Window Managers char* m_szXName; char* m_szXClass; // -- Relationship int32_t m_id; // Generic ID LWindow* m_pWindowParent; // Enclosing window, NULL for top-level LWindow* m_pWindowOwner; // Notification target void* m_pvOwner; // Owner's context pointer LWindow* m_pWindowSibling; // Lateral link LWindow* m_pWindowChild; // Leaf directed link // -- Local Attributes char* m_szName; // Window name or content // void* m_pvInstance; // Instance data int m_cbInstance; // Size of window class structure // -- Event/Notification Handling EventMap* m_pEventMap; PFNEvent m_pfnNotify; // Object-local notification receipt function public: // -- Object creation LWindow (LDisplay* pDisplay) { zero (); init (pDisplay); } LWindow (LWindow* pWindow) { zero (); init (pWindow); } virtual ~LWindow () { release_this (); } void init (LDisplay* pDisplay) { m_pDisplay = pDisplay; } void init (LWindow* pWindow); // Clone void release_this (void); void zero (void) { memset (this, 0, sizeof (*this)); } // -- X-Windows methods bool create (LWindow* pWindowParent); void map (void); void unmap (void) { m_window ? XUnmapWindow (m_pDisplay->display (), m_window) : 0; } // -- Configuration methods void event_map (EventMap* pEventMap) { m_pEventMap = pEventMap; } void extent (int width, int height) { m_width = width; m_height = height; m_fExtent = true; } // void* instance (void* pv) { // void* pvPrev = m_pvInstance; m_pvInstance = pv; return pvPrev; } void id (int id) { m_id = id; } void notify (PFNEvent pfn) { m_pfnNotify = pfn; } void owner (LWindow* pWindow, void* pv) { m_pWindowOwner = pWindow; m_pvOwner = pv; } void owner (LWindow* pWindow, int32_t v) { m_pWindowOwner = pWindow; m_pvOwner = (void*) (intptr_t (v)); } void geometry (const char* sz); void origin (int x, int y) { m_x = x; m_y = y; } void position (int x, int y, int width, int height) { m_x = x; m_y = y; m_width = width; m_height = height; } void qualify (const char* szXName, const char* szXClass); void text (const char* sz); void lower (void); // -- Access methods LDisplay* display (void) { return m_pDisplay; } EventMap* event_map (void) { return m_pEventMap; } LWindow* find_child (int id) { return m_pWindowChild ? m_pWindowChild->find_sibling (id) : (LWindow*) NULL; } LWindow* find_sibling (int id); int height (void) { return m_height; } // void* instance (void) { // return m_pvInstance; } int32_t id (void) { return m_id; } LWindow* owner (void) { return m_pWindowOwner; } void* owner_data (void) { return m_pvOwner; } const char* text (void) { return m_szName; } int width (void) { return m_width; } Window window (void) { return m_window; } Display* xdisplay (void) { return m_pDisplay->display (); } Visual* xvisual (void) { return m_pDisplay->visual (); } // -- Event control void add_events (long event_mask) { m_attr.event_mask |= event_mask; m_window ? XSelectInput (m_pDisplay->display (), m_window, m_attr.event_mask) : 0; } PFNEvent find_event (int event_type, XEvent* event); void ignore_events (long event_mask) { m_attr.event_mask &= ~event_mask; m_window ? XSelectInput (m_pDisplay->display (), m_window, m_attr.event_mask) : 0; } void notify (int child_event) { notify (child_event, 0, NULL); } void notify (int child_event, int cArgs, int* rgArgs); void select_events (long event_mask) { m_attr.event_mask = event_mask; m_window ? XSelectInput (m_pDisplay->display (), m_window, m_attr.event_mask) : 0; } // -- Attribute methods void set_background_pixel (unsigned long pixel) { m_attr.background_pixel = pixel; m_maskAttr |= CWBackPixel; } void set_bit_gravity (int gravity) { m_attr.bit_gravity = gravity; m_maskAttr |= CWBitGravity; } void set_override_redirect (bool f) { m_attr.override_redirect = f; m_maskAttr |= CWOverrideRedirect; } void transient_for (LWindow* pWindow); void net_window_type (int); virtual void handle_expose (XExposeEvent* pEvent) {} virtual void handle_buttonpress (XButtonEvent* pEvent) {} virtual void handle_configure (XConfigureEvent* pEvent) {} virtual void handle_resizerequest (XResizeRequestEvent* pEvent) { m_width = pEvent->width; m_height = pEvent->height; XWindowChanges changes; changes.width = m_width; changes.height = m_height; printf ("configuring to %d %d\n", m_width, m_height); // XConfigureWindow (display ()->display (), // window (), CWWidth | CWHeight, &changes); XResizeWindow (display ()->display (), window (), m_width, m_height); } }; /* ----- Globals */ #endif /* __LWINDOW_H__ */ buici-clock-0.4.9.2/xo/ldisplay.cxx0000644000000000000000000002013711612677215013744 0ustar /* ldisplay.cxx $Id: ldisplay.cxx,v 1.19 1997/10/23 02:28:57 elf Exp $ written by Marc Singer 8 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include "ldisplay.h" #include "lwindow.h" unsigned long LDisplay::color_distance (XColor& color, XColor& colorMatch) { unsigned long sh = 16 - m_pVisual->bits_per_rgb; //unsigned long mask = (0xffff ^ ((1 << (16 - m_pVisual->bits_per_rgb)) - 1)); unsigned long distRed = (color.red >> sh) - (colorMatch.red >> sh); unsigned long distGreen = (color.green >> sh) - (colorMatch.green >> sh); unsigned long distBlue = (color.blue >> sh) - (colorMatch.blue >> sh); return distRed*distRed + distGreen*distGreen + distBlue*distBlue; } void LDisplay::dispatch (XEvent* pEvent) { LWindow* pWindow = find_window (pEvent->xany.window); if (!pWindow) return; PFNEvent pfn = pWindow->find_event (pEvent->type, pEvent); if (!pfn) return; (pWindow->*pfn) (pEvent); } void LDisplay::dispatch_next_event (void) { XEvent event; next_event (&event); // Update keyboard mapping if (event.type == MappingKeyboard) { XRefreshKeyboardMapping ((XMappingEvent*) &event); return; } //fprintf (stderr, "event %d window 0x%lx\n", event.type, event.xany.window); LWindow* pWindow = find_window (event.xany.window); if (!pWindow) return; PFNEvent pfn = pWindow->find_event (event.type, &event); if (!pfn) return; (pWindow->*pfn) (&event); } LWindow* LDisplay::find_child (int id) { return m_pWindowRoot ? m_pWindowRoot->find_sibling (id) : (LWindow*) NULL; } bool LDisplay::open (char* szDisplay) { m_pDisplay = XOpenDisplay (szDisplay); if (!m_pDisplay) return false; m_cbitUnit = XBitmapUnit (m_pDisplay); m_cbitPadding = XBitmapPad (m_pDisplay); m_depth = XDefaultDepth (m_pDisplay, 0); m_hashWindow.init (sizeof (LWindow*), 301); m_font_cache.init (this); m_hashTemplate.init (sizeof (LWindow*), 301); // dmalloc_validate (); // -- Get the resource database { char* szDatabase = XResourceManagerString (m_pDisplay); // ** FIXME ** Seems to me that this is a really bad problem if this fails if (szDatabase) m_database = XrmGetStringDatabase (szDatabase); } if (!m_visual_class) m_visual_class = TrueColor; XMatchVisualInfo (m_pDisplay, 0, m_depth, m_visual_class, &m_visualInfo); m_pVisual = (m_visualInfo.visual ? m_visualInfo.visual : XDefaultVisual (m_pDisplay, 0)); m_colormap = ((m_visualInfo.c_class == TrueColor) ? XCreateColormap (m_pDisplay, XDefaultRootWindow (m_pDisplay), m_pVisual, AllocNone) : CopyFromParent); #if defined (TALK) printf ("using visualID 0x%lx\n", XVisualIDFromVisual (m_pVisual)); #endif if (m_pVisual->red_mask) { unsigned mask; for (m_shiftRed = 0, mask = m_pVisual->red_mask; !(mask & 0x8000) && mask; ++m_shiftRed, (mask <<= 1)) ; for (m_shiftGreen = 0, mask = m_pVisual->green_mask; !(mask & 0x8000) && mask; ++m_shiftGreen, (mask <<= 1)) ; for (m_shiftBlue = 0, mask = m_pVisual->blue_mask; !(mask & 0x8000) && mask; ++m_shiftBlue, (mask <<= 1)) ; } // Cache some GCs XGCValues values; unsigned long value_mask = 0; values.foreground = XWhitePixel (m_pDisplay, 0); values.background = XBlackPixel (m_pDisplay, 0); value_mask |= GCForeground | GCBackground; m_gcAttribute = XCreateGC (m_pDisplay, XDefaultRootWindow (m_pDisplay), value_mask, &values); m_gcDraw = XCreateGC (m_pDisplay, XDefaultRootWindow (m_pDisplay), 0, 0); // Evaluate pixmap format #if defined (TALK) { int c; XPixmapFormatValues* pFormat = XListPixmapFormats (m_pDisplay, &c); for (int i = 0; i < c; ++i) printf ("pixmap depth %d bits_per_pixel %d scanline_pad %d\n", pFormat[i].depth, pFormat[i].bits_per_pixel, pFormat[i].scanline_pad); XFree (pFormat); printf ("bitmap unit %d bitmap pad %d\n", XBitmapUnit (m_pDisplay), XBitmapPad (m_pDisplay)); printf ("image byte order %s bit order %s\n", XImageByteOrder (m_pDisplay) ? "msb" : "lsb", XBitmapBitOrder (m_pDisplay) ? "msb" : "lsb"); } #endif // dmalloc_validate (); return true; } bool LDisplay::find_pixel (char* szColorName, unsigned long* pPixel) { Colormap colormap = XDefaultColormap (m_pDisplay, 0); XColor color; XParseColor (m_pDisplay, colormap, szColorName, &color); bool fReturn = false; if ( m_pVisual->c_class == PseudoColor || m_pVisual->c_class == StaticColor) { int cColors = m_pVisual->map_entries; XColor* rgColor = (XColor*) malloc (sizeof (XColor)*cColors); memset (rgColor, 0, sizeof (XColor)*cColors); for (int i = cColors; i--;) { rgColor[i].pixel = i; rgColor[i].flags = DoRed | DoGreen | DoBlue; } XQueryColors (m_pDisplay, colormap, rgColor, cColors); unsigned long distanceLast = 0xfffffff; int pixel = 0; // ** FIXME: shouldn't we detect error? for (int i = 0; i < cColors; ++i) { unsigned long distance = color_distance (color, rgColor[i]); if (distance >= distanceLast) continue; pixel = i; distanceLast = distance; if (distance == 0) break; } *pPixel = pixel; fReturn = true; free (rgColor); } else if ( m_pVisual->c_class == DirectColor || m_pVisual->c_class == TrueColor) { *pPixel = 0; *pPixel |= (color.red >> m_shiftRed) & m_pVisual->red_mask; *pPixel |= (color.green >> m_shiftGreen) & m_pVisual->green_mask; *pPixel |= (color.blue >> m_shiftBlue) & m_pVisual->blue_mask; fReturn = true; } return fReturn; } LWindow* LDisplay::find_template (const char* szTemplate) { LWindow* pWindow = NULL; HashKey key = LHashTable::make_string_key (szTemplate); m_hashTemplate.find (key, &pWindow); return pWindow; } LWindow* LDisplay::find_window (Window window) { LWindow* pWindow = NULL; m_hashWindow.find ((HashKey) window, &pWindow); return pWindow; } GC LDisplay::gc (void) { XCopyGC (m_pDisplay, m_gcAttribute, (1 << (GCLastBit + 1)) - 1, m_gcDraw); return m_gcDraw; } bool LDisplay::hash_template (const char* szTemplate, LWindow* pWindow) { HashKey key = LHashTable::make_string_key (szTemplate); if (m_hashTemplate.find (key)) return false; m_hashTemplate.add (key, &pWindow); return true; } void LDisplay::hash_window (LWindow* pWindow) { Window window = pWindow->window (); if (window) m_hashWindow.add ((HashKey) window, &pWindow); } void LDisplay::release_this (void) { // FIXME we cannot *really* release // the templates because they may // allocate memory. This works for // those that do nothing of the sort. HashKey key; LWindow** ppWindow; for (unsigned32 index = 0; index = m_hashTemplate.enumerate_reverse (index, &key, (const void**) &ppWindow); ) { delete *ppWindow; m_hashTemplate.remove (key); } // -- Do the rest of the cleanup m_font_cache.release_this (); if (m_gcAttribute) { XFreeGC (m_pDisplay, m_gcAttribute); XFreeGC (m_pDisplay, m_gcDraw); m_gcAttribute = m_gcDraw = 0; } if (m_pDisplay) { XCloseDisplay (m_pDisplay); m_pDisplay = 0; } } void LDisplay::unhash_window (LWindow* pWindow) { Window window = pWindow->window (); if (window) m_hashWindow.remove ((HashKey) window); } buici-clock-0.4.9.2/xo/README0000644000000000000000000000255211612677215012260 0ustar ========= XO README $Id: README,v 1.1 1997/10/18 04:57:31 elf Exp $ ========= by Marc Singer, elf@netcom.com 17 October 1997 (date of last revision) 1. Introduction This is a C++ class library I use to support a collection of X-Windows applications. I don't use the Xt and other like libraries because they're bigger and much more complex that this one. Also, I'm working toward a device-independent user interface library so it is easier to perform dialogs and handle varying screen dimensions. 1.1. Copyright The XO library is Copyright (C) 1997 by Marc Singer. It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 1.2 Feedback and Bug Reports Bug reports may be sent to the author at . There is a plan to incorporate some form of automatic bug report generation within the application, but until that is available e-mail is likely to produce the best response. 1.3 Disclaimer 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. buici-clock-0.4.9.2/xo/res.h0000644000000000000000000000274111612677215012342 0ustar /* res.h $Id: res.h,v 1.3 1997/10/18 04:57:41 elf Exp $ written by Marc Singer 15 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #if !defined (__RES_H__) # define __RES_H__ typedef struct _NODE { int type; struct _NODE* pNode; union { long l; float r; char* sz; struct _NODE* pNode; } v; } NODE; extern void* g_pvNodeAlloc; /* Base allocation for all NODEs */ void* alloc_resource (int cb, void* pv); int safe_atol (char* sz, signed long* pl); int safe_atof (char* sz, float* pr); extern FILE* yyin; extern "C" int yylex (void); int yyparse (void); NODE* find_dialog (void); #endif /* __RES_H__ */ buici-clock-0.4.9.2/xo/.version_major0000644000000000000000000000000211612677215014242 0ustar 0 buici-clock-0.4.9.2/xo/Makefile.in0000644000000000000000000001321511612677215013443 0ustar # -*- Makefile -*- # Makefile.in # $Id: Makefile.in,v 1.15 2006/01/17 19:48:14 elf Exp $ # # written by Marc Singer # 8 May 1996 # # .PHONY: install clean all version revision patch # # --- Project specification # PACKAGE=xo TARGET=xo O_D=o/ SRC_LIB= \ ldisplay.cxx lwindow.cxx lfont.cxx \ wbutton.cxx wtext.cxx wdialog.cxx \ lhash.cxx larray.cxx \ res.cxx dither.cxx lpicture.cxx #dmalloc.cxx _SRC=$(SRC_LIB) \ loupe.cxx stats.cxx # classes.cxx main.cxx DEPS:=$(SRC) DEPS:=$(DEPS:%.c=%.d) DEPS:=$(DEPS:%.cc=%.d) DEPS:=$(DEPS:%.cxx=%.d) SRC= $(_SRC) res_l.cxx res_y.cxx # lwindowclass.cxx # options.cxx version.cxx # system.cxx video.cxx timebase.cxx # lfile.cxx lstream.cxx lring.cxx lthread.cxx thread.s # report.cxx ____OBJ=$(SRC:.c=.o) ___OBJ=$(____OBJ:.cxx=.o) __OBJ=$(___OBJ:.s=.o) _OBJ=$(__OBJ:.l=.o) OBJ=$(_OBJ:.y=.o) ____OBJ_LIB=$(SRC_LIB:.c=.o) ___OBJ_LIB=$(____OBJ_LIB:.cxx=.o) __OBJ_LIB=$(___OBJ_LIB:.s=.o) _OBJ_LIB=$(__OBJ_LIB:.l=.o) OBJ_LIB=$(_OBJ_LIB:.y=.o) VERSION_HEADER=version.h CC=@CXX@ CXXFLAGS=@CXXFLAGS@ #CXXFLAGS=-${CXXFLAGS} -O #CXXFLAGS=-${CXXFLAGS} -O2 #CXXFLAGS=-${CXXFLAGS} -fomit-frame-pointer CXXFLAGS_=-g @CFLAGS_W@@X_CFLAGS@ LFLAGS=-g @LDFLAGS@@X_LIBS@@LIBS@ -lX11 -lXext @X_EXTRA_LIBS@ FLEX=@LEX@ YACC=@YACC@ # # --- Autoconf generated symbols # #srcdir = @srcdir@ #VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ infodir = @infodir@ mandir = @mandir@ # # --- Implicit rules # vpath %.o $(O_D) %.o: %.cxx $(ECHO) $(CC) -c $(CXXFLAGS) -o $(O_D)$@ $< @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $(O_D)$@ $< $(O_D)%.o: %.cxx $(ECHO) $(CC) -c $(CXXFLAGS) -o $@ $< @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $@ $< %.o: %.s $(ECHO) $(AS) $(AFLAGS) -o $(O_D)$@ $< @$(AS) $(AFLAGS) $(AFLAGS_) -o $(O_D)$@ $< $(O_D)%.o: %.s $(ECHO) $(AS) $(AFLAGS) -o $@ $< @$(AS) $(AFLAGS) $(AFLAGS_) -o $@ $< %.cxx: %.l $(FLEX) -o$@ $< %.cxx: %.y $(YACC) -d -o $@ $< mv $(basename $@).hxx $(basename $@).h %.i: %.cxx $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -E -o $(notdir $@) $< %.s: %.cxx $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $< %.s: %.c $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $< # # --- Primary targets # all: make_o _version.h res_y.cxx $(O_D)$(TARGET) libxo.a .PHONY: make_o make_o: @if test ! -e $(O_D) ;\ then echo === Creating \'$(O_D)\' output directory ; mkdir $(O_D) ; fi res_l.cxx: res_l.l res_y.cxx: res_y.y $(O_D)res.o: lres.h res: o/res_y.o o/res_l.o o/res.o $(CC) $(LFLAGS) -o $@ $^ libxo.a: $(OBJ_LIB) ar rc libxo.a $(addprefix $(O_D),$(OBJ_LIB)) $(O_D)$(TARGET): $(OBJ) $(CC) -o $@ $(addprefix $(O_D),$(OBJ)) $(LFLAGS) #install: # cp $(TARGET).exe c:/usr/local .PHONY: count count: wc $(_SRC) *.h clean: ifneq "$(O_D)" "" -rm -rf $(O_D) else -rm $(OBJ) endif -rm *.i .PHONY: dist_clean distclean: clean @-rm -f \#* *~ *.sed *.i *.cod -chmod +w Makefile config.h -rm Makefile config.h $(DEPEND) -rm config.cache config.status config.log -rm _version.h .version -rm res_y.h res_l.cxx res_y.cxx -rm libxo.a res_l.l: res.h res_y.y: res.h # # Version and Build Engineering # .version: .version_major .version_minor .version_patch @/bin/echo -n `cat .version_major`.`cat .version_minor`.`cat \ .version_patch` > .version _version.h: .version @/bin/echo -e \#define SZ_VERSION \"`cat .version`\" > _version.h .PHONY: transmit transmit: # distribution-archive @/bin/sh -c "cd .. ;\ distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.tar.gz" @distftp.sh ${PACKAGE} ANNOUNCEMENT @distftp.sh ${PACKAGE} README @distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.lsm lsm.sed: _version.h @echo Creating LSM edit script... @/bin/echo s/\<\\>/`cat .version`/ > lsm.sed @/bin/echo s/\<\\>/`date +"%d %B %Y"`/ >> lsm.sed @/bin/echo s/\<\\>/${PACKAGE}-`cat .version`.tar.gz/ \ >> lsm.sed @/bin/echo s/\<\\>/${PACKAGE}-`cat .version`.lsm/ >> lsm.sed .PHONY: ${PACKAGE}.lsm ${PACKAGE}.lsm: lsm.sed LSM @echo Creating LSM file... @-rm *.lsm @sed -f lsm.sed LSM > ${PACKAGE}-`cat .version`.lsm .PHONY: distribution-archive da distribution-archive da: ${PACKAGE}.lsm dist_clean @echo Creating distribution archive... @/bin/sh -c "if test -x ../${PACKAGE}-`cat .version`;\ then rm ../${PACKAGE}-`cat .version` ; fi" @ln -s ${PACKAGE} ../${PACKAGE}-`cat .version` @find . -path CVS -prune\ -o -path o -prune\ -o -regex .\*/${PACKAGE} -prune\ -o -regex .\*/configure -prune\ -o -regex .\*/config.status -prune\ -o -regex .\*\.o -prune\ -o -type f -exec chmod 644 \{\} \; @/bin/sh -c 'cd .. ; V=`cat ${PACKAGE}/.version` ;\ tar zcf ${PACKAGE}-$$V.tar.gz\ `find ${PACKAGE}-$$V/\ -regex .\*/CVS -prune\ -o -regex .\*~ -prune\ -o -regex .\*/o -prune\ -o -regex .\*/res -prune\ -o -regex .\*\\\\.o -prune\ -o -regex .\*\\\\.a -prune\ -o -regex .\*\\\\.m -prune\ -o -regex .\*\\\\.bmp -prune\ -o -regex .\*/${PACKAGE} -prune\ -o -regex .\*/Makefile -prune\ -o -regex .\*/config.cache -prune\ -o -regex .\*/config.h -prune\ -o -regex .\*/config.log -prune\ -o -regex .\*/config.status -prune\ -o -regex .\*/configure.scan -prune\ -o -regex .\*/log -prune\ -o -regex .\*/gmon.out -prune\ -o -regex .\*/\.cvsignore -prune\ -o -regex .\*/\.gdbinit -prune\ -o -regex .\*/NOTES -prune\ -o -regex .\*/patches -prune\ -o -type f -print | sort`' @-rm ../${PACKAGE}-`cat .version` # # --- Dependencies: depend.m # %.d: %.c @set -e; rm -f $@; \ $(CC) -M $(CFLAGS) $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ %.d: %.cc @set -e; rm -f $@; \ $(CXX) -MM $(CFLAGS) $< > $@.$$$$; \ sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ -include $(DEPS) buici-clock-0.4.9.2/xo/lpicture.h0000644000000000000000000000464611612677215013406 0ustar /* lpicture.h -*- C++ -*- $Id: lpicture.h,v 1.2 1997/10/18 04:57:37 elf Exp $ written by Marc Singer 3 Jun 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- Helper structures and procedures for working with pictures. The primary motivation for this stuff is to allow us to handle varying formats without putting them into a windowing system specific data structure. */ #if !defined (__LPICTURE_H__) # define __LPICTURE_H__ /* ----- Includes */ #include "memory.h" /* ----- Class */ typedef struct { unsigned8 rgbBlue; unsigned8 rgbGreen; unsigned8 rgbRed; unsigned8 rgbReserved; } RGBQUAD; // MS Windows palette structure class LPicture { protected: void _calc_stride (void) { m_cbStride = (((m_width*m_depth)/8 + 3)& ~0x3); } public: int m_width; int m_height; int m_depth; // Depth of image, probably 1, 8, 16, or 24 bool m_fNonNormal; // Normal is top-down scanline order int m_cColors; // Number of colors in the palette, 0 for none int m_cbStride; // Width of one scanline void* m_pvMap; // Location where file is mapped into memory int m_cbMap; // Length of mapping int m_fh; // File handle used in mapping void* m_pv; // Pointer to the bits int m_cb; // Size of region holding the bitmap RGBQUAD* m_rgRGB; // Pointer to palette, if there is one bool read (const char* szPath); LPicture () { zero (); } ~LPicture () { release_this (); } void release_mmap (void); void release_this (void); void zero (void) { memset (this, 0, sizeof (*this)); } }; #endif /* __LPICTURE_H__ */ buici-clock-0.4.9.2/xo/configure0000755000000000000000000053273511612677215013322 0ustar #! /bin/sh # From configure.in Id: configure.in,v 1.5 2000/01/13 07:04:46 elf Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="ldisplay.cxx" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias YACC YFLAGS LEX LEX_OUTPUT_ROOT CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT LEXLIB LN_S XMKMF CXXCPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS GREP EGREP CFLAGS_W LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias YACC YFLAGS CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC XMKMF CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF 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 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: YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory XMKMF Path to xmkmf, Makefile generator for X Window System CXXCPP 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 ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { echo "$as_me:$LINENO: checking lex library" >&5 echo $ECHO_N "checking lex library... $ECHO_C" >&6; } if test "${ac_cv_lib_lex+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lex=$ac_lib else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 echo "${ECHO_T}$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi if test "${GXX}" = "yes" ; then CFLAGS_W=" -Wall -Wno-parentheses -Wno-unused" CFLAGS="${CFLAGS}" fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 echo "$as_me: error: Cannot use X directory names containing '" >&2;} { (exit 1); exit 1; }; };; #( *,NONE | NONE,*) 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 -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/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 Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then 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 sed 's/^/| /' 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/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { 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 . . . . { 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" ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS="$ac_xsave_LIBS -R $x_libraries" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: neither works" >&5 echo "${ECHO_T}neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dnet_stub_dnet_ntoa=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); /* 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 #endif int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_nsl_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_bsd_gethostbyname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 name server (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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define connect to an innocuous variant, in case declares connect. For example, HP-UX 11i declares gettimeofday. */ #define connect innocuous_connect /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef connect /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); /* 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 #endif int main () { return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_socket_connect=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define remove to an innocuous variant, in case declares remove. For example, HP-UX 11i declares gettimeofday. */ #define remove innocuous_remove /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef remove /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); /* 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 #endif int main () { return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_posix_remove=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shmat to an innocuous variant, in case declares shmat. For example, HP-UX 11i declares gettimeofday. */ #define shmat innocuous_shmat /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shmat /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); /* 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 #endif int main () { return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ipc_shmat=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ICE_IceConnectionNumber=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_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 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_func in memset strncmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in memory.h fcntl.h limits.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking whether 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err 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 ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { 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 fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim YACC!$YACC$ac_delim YFLAGS!$YFLAGS$ac_delim LEX!$LEX$ac_delim LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim LEXLIB!$LEXLIB$ac_delim LN_S!$LN_S$ac_delim XMKMF!$XMKMF$ac_delim CXXCPP!$CXXCPP$ac_delim X_CFLAGS!$X_CFLAGS$ac_delim X_PRE_LIBS!$X_PRE_LIBS$ac_delim X_LIBS!$X_LIBS$ac_delim X_EXTRA_LIBS!$X_EXTRA_LIBS$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim CFLAGS_W!$CFLAGS_W$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 61; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi chmod -w Makefile chmod -w config.h buici-clock-0.4.9.2/xo/lwindowclass.cxx0000644000000000000000000000364311612677215014637 0ustar /* lwindowclass.cxx $Id: lwindowclass.cxx,v 1.2 1997/10/18 04:57:39 elf Exp $ written by Marc Singer 9 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include "lwindowclass.h" LHashTable LWindowClass::g_hashClass; // szClass->LWindowClass* LWindowClass* LWindowClass::find_class (char* szName) { HashKey key = LHashTable::make_case_string_key (szName); LWindowClass* pClass = NULL; g_hashClass.find (key, &pClass); return pClass; } bool LWindowClass::register_class (char* szName, long event_mask, EventHandlerMap* pEventHandlerMap) { if (!g_hashClass.is_init ()) g_hashClass.init (sizeof (LWindowClass*), 101); HashKey key = LHashTable::make_case_string_key (szName); LWindowClass* pClass = NULL; g_hashClass.find (key, &pClass); if (pClass) return false; m_szName = (char*) malloc (strlen (szName) + 1); strcpy (m_szName, szName); m_pEventHandlerMap = pEventHandlerMap; m_attribute.event_mask = event_mask; m_attribute_mask |= CWEventMask; pClass = this; g_hashClass.add (key, &pClass); return true; } buici-clock-0.4.9.2/xo/main.cxx0000644000000000000000000000412611612677215013047 0ustar /* main.cxx $Id: main.cxx,v 1.11 1997/10/18 04:57:40 elf Exp $ written by Marc Singer 8 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #include "standard.h" #include "ldisplay.h" #include "lwindow.h" #include "wdialog.h" void register_base_classes (LDisplay* pDisplay); int g_argc; char** g_argv; bool g_fQuit; void exit_error (char* sz, ...) { fprintf (stderr, "%s: ", g_argv[0]); va_list ap; va_start (ap, sz); vfprintf (stderr, sz, ap); va_end (ap); fprintf (stderr, "\n"); exit (1); } int main (int argc, char** argv) { g_argc = argc; g_argv = argv; for (int i = 1; i < argc; ++i) if (strcasecmp (argv[i], "--no-ornaments") == 0) g_fNoOrnaments = true; LDisplay display; if (!display.open ()) exit_error ("unable to open display"); register_base_classes (&display); LWindow* pWindow = new LWindow (display.find_template ("top-level")); #if 0 pWindow->position (100, 100, 200, 200); if (!pWindow->create (0)) exit_error ("unable to open window"); pWindow->map (); #endif LWindow* pWindowDialog = WDialog::create (pWindow, "sample.dlg", 1); // XEvent event; while (!g_fQuit) { display.dispatch_next_event (); } pWindowDialog->unmap (); // Make a clean exit display.flush (); } buici-clock-0.4.9.2/xo/ldisplay.h0000644000000000000000000001256611612677215013400 0ustar /* ldisplay.h -*- C++ -*- $Id: ldisplay.h,v 1.17 1998/10/26 18:59:11 elf Exp $ written by Marc Singer 8 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. NOTES ----- - GC It is *very* desirable to cache graphics contexts. It is also desirable to avoid creating loads of GCs when a program starts up. So, what we do is create a default GC per VISUAL. Presently, we do nothing with visuals/screens, so this translates to one GC per LDisplay. Eventually, we need to create one per VISUAL. The idea is that most drawing can be done by fetching this default GC, making the necessary changes to the graphics state, and then performing drawing. But, we do something sneaky here. We really create two GCs. One stores the default drawing state, and the other is given to drawables to use. Before handing a drawable the GC, we copy the attributes from the default settings one. This way, we can simulate attribute save/restore. */ #if !defined (__LDISPLAY_H__) # define __LDISPLAY_H__ /* ----- Includes */ #include "lhash.h" #include "lfont.h" #include /* ----- Globals */ class LWindow; typedef struct { LWindow* pWindow; // Child window sending the notification int id; // Child window ID, if there is one int event; // What the child has done unsigned long data[4]; // Extra data the child may want to send } ChildNotifyInfo; class LDisplay { protected: Display* m_pDisplay; // -- Display Attributes int m_cbitPadding; // Scanlines padded to this number of bits int m_cbitUnit; // Bitmap row unit quant int (*m_pfnAfter) (Display*); // User's after function // -- Visual Attributes Visual* m_pVisual; // We only support one visual right now int m_visual_class; // Requested class XVisualInfo m_visualInfo; int m_shiftRed; int m_shiftGreen; int m_shiftBlue; int m_depth; // Visual's bit depth Colormap m_colormap; // -- Drawing Contexts GC m_gcAttribute; // Cached attribute GC (see NOTES) GC m_gcDraw; // Cached drawing GC (see NOTES) // -- X Resources XrmDatabase m_database; LFontCache m_font_cache; // Cache of font names to IDs // -- Windows LWindow* m_pWindowRoot; // Link to windows created at the root LHashTable m_hashWindow; // Window->LWindow* LHashTable m_hashTemplate; // "windowclass"->LWindow* public: LDisplay () { zero (); } ~LDisplay () { release_this (); } void zero (void) { memset (this, 0, sizeof (*this)); } void release_this (void); unsigned long color_distance (XColor& color, XColor& colorMatch); void dispatch_next_event (void); void dispatch (XEvent* pEvent); Colormap colormap (void) { return m_colormap; } int height (void) { return XDisplayHeight (m_pDisplay, 0); } int width (void) { return XDisplayWidth (m_pDisplay, 0); } int depth (void) { return m_depth; } Display* display (void) { return m_pDisplay; } bool is_pending_event (void) { return m_pDisplay ? (XPending (m_pDisplay) != 0) : false; } int pad (void) { return m_cbitPadding; } Visual* visual (void) { return m_pVisual; } XFontStruct* find_font (char* szFont) { return m_font_cache.find (szFont); } XFontStruct* find_font (Font fid) { return m_font_cache.find (fid); } LWindow* find_child (int id); bool find_resource (const char* szName, const char* szClass, char** pszType, XrmValue* pValue) { char* szType = NULL; pValue->addr = 0; // For the callers who don't check return return m_database ? ( XrmGetResource (m_database, szName, szClass, pszType ? pszType : &szType, pValue) != False) : False; } bool find_pixel (char* szColorName, unsigned long* pPixel); LWindow* find_template (const char* szTemplate); LWindow* find_window (Window window); void flush (void) { m_pDisplay ? XFlush (m_pDisplay) : 0; } GC gc (void); void hash_window (LWindow* pWindow); bool hash_template (const char* szTemplate, LWindow* pWindow); void next_event (XEvent* pEvent) { m_pDisplay ? XNextEvent (m_pDisplay, pEvent) : 0; } bool open (char* szDisplay = NULL); void unhash_window (LWindow* pWindow); LWindow** root_windows (void) { return &m_pWindowRoot; } int shift_red (void) { return m_shiftRed; } int shift_green (void) { return m_shiftGreen; } int shift_blue (void) { return m_shiftBlue; } void set_after_function (int (*pfn)(Display*)) { m_pfnAfter = pfn; XSetAfterFunction (m_pDisplay, pfn); } void set_visual_class (int visual_class) { m_visual_class = visual_class; } }; #endif /* __LDISPLAY_H__ */ buici-clock-0.4.9.2/xo/res_y.y0000644000000000000000000001242511612677215012713 0ustar %{ /* res_y.y $Id: res_y.y,v 1.7 1997/10/18 04:57:42 elf Exp $ This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- Grammar for dialog parser. */ #include "standard.h" #define IS_PARSER #include "lres.h" #include #if defined (__cplusplus) extern "C" int yylex (void); #else int yylex (void); #endif int yyerror (const char* sz); extern FILE* yyout; int g_cBraceOpen; /* Count of open braces */ int g_cParenOpen; /* Count of open parentheses */ int g_cConst; /* Count of open constant expressions */ //#define DPRINTF(a) printf a #define DPRINTF(a) //#define _in(p) ((char*) p - (char*) g_pvNodeAlloc) %} %token PO PC /* Parenthesis Open and Close */ %token BO BC /* Brace Open and Close */ %token QUOTE /* Quote mark to inhibit lambda binding */ %union { long l; /* Constant numeric value */ float r; /* Real number value */ char* sz; /* String literal */ int er; /* Error value */ NODE* pNode; } %token INTEGER %token REAL %token STRING %token KEYWORD %token ERROR %token RESOURCE %token INVOCATION %token ARGLIST %type keyword %type argument argument_list argument_list_d %type invocation invocation_list invocation_list_d %type resource_file %% resource_file: invocation_list { LResNode::fixup ((LResNode*) $$); LResNode::generate ((LResNode*) $$); } ; invocation_list: invocation { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("RESOURCE 0x%x -> 0x%x\n", _in ($$), _in ($1))); $$->type = RESOURCE; $$->v.pNode = $1; } | invocation_list invocation { DPRINTF (("RESOURCE+ 0x%x -> 0x%x\n", _in ($1), _in ($2))); $2->pNode = $1->v.pNode; $1->v.pNode = $2; $$ = $1; } ; invocation: keyword { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("INVOCATION <%s> @0x%x\n", $1->v.sz, _in ($$))); $$->type = INVOCATION; $$->v.pNode = $1; } | keyword argument_list_d { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("INVOCATION <%s> @0x%x a 0x%x\n", $1->v.sz, _in ($$), _in ($2))); $$->type = INVOCATION; $$->v.pNode = $1; $1->pNode = $2; } | keyword invocation_list_d { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("INVOCATION <%s> @0x%x i 0x%x\n", $1->v.sz, _in ($$), _in ($2))); $$->type = INVOCATION; $$->v.pNode = $1; $1->pNode = $2; } | keyword argument_list_d invocation_list_d { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("INVOCATION <%s> @0x%x a 0x%x i 0x%x\n", $1->v.sz, _in ($$), _in ($2), _in ($3))); $$->type = INVOCATION; $$->v.pNode = $1; $1->pNode = $2; $2->pNode = $3; } ; invocation_list_d: BO invocation_list BC { $$ = $2; } | BO BC { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("invocation_list @0x%x\n", _in ($$))); $$->type = INVOCATION; } ; argument_list_d: PO argument_list PC { $$ = $2; } | PO PC { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("argument_list @0x%x\n", _in ($$))); $$->type = ARGLIST; } ; argument_list: argument { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("argument_list @0x%x => @0x%x\n", _in ($$), _in ($1))); $$->type = ARGLIST; $$->v.pNode = $1; } | argument_list ',' argument { DPRINTF ((" 0x%x => 0x%x\n", _in ($1), _in ($3))); $3->pNode = $1->v.pNode; $1->v.pNode = $3; $$ = $1; } ; keyword: KEYWORD { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("KEYWORD @0x%x\n", _in ($$))); $$->type = KEYWORD; $$->v.sz = $1; } ; argument: STRING { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("STRING @0x%x\n", _in ($$))); $$->type = STRING; $$->v.sz = $1; } | INTEGER { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("INTEGER @0x%x\n", _in ($$))); $$->type = INTEGER; $$->v.l = $1; } | REAL { $$ = (NODE*) LResNode::alloc (sizeof (NODE), NULL); DPRINTF (("REAL @0x%x\n", _in ($$))); $$->type = REAL; $$->v.r = $1; } ; %% int yyerror (const char* sz) { extern int g_iLineParse; extern char *yytext; /* printf ("%d: %s at '%s'\n", yylineno, sz, yytext); */ printf("error: line %d, %s at '%s'\n", g_iLineParse, sz, yytext); // printf ("yyerror: %s\n", sz); return 0; } buici-clock-0.4.9.2/xo/dmalloc.cxx0000644000000000000000000001406711612677215013543 0ustar /* dmalloc.cxx $Id: dmalloc.cxx,v 1.7 1998/10/15 07:12:41 elf Exp $ written by Marc Singer 27 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ #define BY_DMALLOC #include "standard.h" #include "dmalloc.h" typedef struct _WRAPPER { unsigned32 marker; // Marker for start of block _WRAPPER* pPrev; _WRAPPER* pNext; unsigned long cb; // User's size of block char szModule[16]; // Word aligned name of allocating source } WRAPPER; #define CB_WRAPPER (sizeof (WRAPPER) + sizeof (unsigned32)) //#define MARKER_HEAD (unsigned32) 0xefacdaed #define MARKER_HEAD ((unsigned32) 0xfecade2b) #define MARKER_TAIL ((unsigned32) 0xd1cefaef) #define B_WRAP '+' #define B_FREE '-' WRAPPER* g_pWrapperHead; // Head of list of wrapped blocks void _tell_ (WRAPPER* pWrapper); bool _validate_one_ (WRAPPER* pWrapper); bool _validate_ (WRAPPER* pWrapper); void* _wrap_ (void* pv, int cb, const char* szModule, int iLine, bool fFill, WRAPPER** ppWrapLink); /* ::operator new & delete replace global new and delete operators. */ void* operator new (size_t cb) { return _malloc_ (cb, "unknown", 0); } void* operator new (size_t cb, const char* szModule, int iLine) { return _malloc_ (cb, szModule, iLine); } void operator delete (void* pv) { _free_ (pv); } void dmalloc_exit (void) { for (WRAPPER* pWrapper = g_pWrapperHead; pWrapper; pWrapper = pWrapper->pNext) _tell_ (pWrapper); } void dmalloc_validate (void) { if (!_validate_ (g_pWrapperHead)) fprintf (stderr, "heap invalid on dmalloc_validate\n"); } /* _free_ */ void _free_ (void* pv) { if (!pv) return; // -- Locate WRAPPER* pWrapper = (WRAPPER*) ((unsigned8*) pv - sizeof (WRAPPER)); if (!_validate_one_ (pWrapper)) { _tell_ (pWrapper); fprintf (stderr, "heap invalid on free\n"); return; } // -- Unlink if (pWrapper->pPrev) pWrapper->pPrev->pNext = pWrapper->pNext; if (pWrapper->pNext) pWrapper->pNext->pPrev = pWrapper->pPrev; if (g_pWrapperHead == pWrapper) g_pWrapperHead = pWrapper->pNext; // -- Release free (pWrapper); } /* _calloc_ allocate memory and wrap it with tracing information. */ void* _calloc_ (size_t c, size_t cb, const char* szModule, int iLine) { if (!_validate_ (g_pWrapperHead)) { fprintf (stderr, "heap invalid on malloc\n"); return NULL; } cb *= c; void* pv = malloc (cb + CB_WRAPPER); if (pv && CB_WRAPPER) pv = _wrap_ (pv, cb, szModule, iLine, false, &g_pWrapperHead); // ASSERT_FAIL (pv); return pv; } /* _malloc_ allocate memory and wrap it with tracing information. */ void* _malloc_ (size_t cb, const char* szModule, int iLine) { if (!_validate_ (g_pWrapperHead)) { fprintf (stderr, "heap invalid on malloc\n"); return NULL; } void* pv = malloc (cb + CB_WRAPPER); if (pv && CB_WRAPPER) pv = _wrap_ (pv, cb, szModule, iLine, true, &g_pWrapperHead); // ASSERT_FAIL (pv); return pv; } /* _realloc_ re-allocate memory and wrap it with tracing information. */ void* _realloc_ (void* pvOld, size_t cb, const char* szModule, int iLine) { if (!_validate_ (g_pWrapperHead)) { fprintf (stderr, "heap invalid on malloc\n"); return NULL; } void* pv = _malloc_ (cb + CB_WRAPPER, szModule, iLine); if (pv) { unsigned int cbCopy = ((WRAPPER*) pvOld)->cb; if (cbCopy > cb) cbCopy = cb; memcpy ((unsigned8*) pv + sizeof (WRAPPER), (unsigned8*) pvOld + sizeof (WRAPPER), cbCopy); _free_ (pvOld); } if (pv && CB_WRAPPER) pv = _wrap_ (pv, cb, szModule, iLine, true, &g_pWrapperHead); // ASSERT_FAIL (pv); return pv; } void* _wrap_ (void* pv, int cb, const char* szModule, int iLine, bool fFill, WRAPPER** ppWrapLink) { // -- Fill if (fFill) memset ((unsigned8*) pv + sizeof (WRAPPER), B_WRAP, cb); else memset ((unsigned8*) pv + sizeof (WRAPPER), 0, cb); // calloc requires this // -- Wrap WRAPPER* pWrapper = (WRAPPER*) pv; pWrapper->marker = MARKER_HEAD; pWrapper->cb = cb; // User's requested size memset (pWrapper->szModule, 0, sizeof (pWrapper->szModule)); sprintf (pWrapper->szModule, "%.10s.%.4d", szModule, iLine); *(unsigned32*) ((unsigned char*) pv + sizeof (WRAPPER) + cb) = MARKER_TAIL; // -- Link pWrapper->pPrev = NULL; pWrapper->pNext = *ppWrapLink; if (*ppWrapLink) (*ppWrapLink)->pPrev = pWrapper; *ppWrapLink = pWrapper; return (void*)(pWrapper + 1); } void _tell_ (WRAPPER* pWrapper) { fprintf (stderr, "block 0x%lx %ld (0x%lx) bytes for %.*s", (unsigned long) pWrapper + 1, pWrapper->cb, pWrapper->cb, (int) sizeof (pWrapper->szModule), pWrapper->szModule); if (pWrapper->marker != MARKER_HEAD) fprintf (stderr, " [HEAD]"); if (*(unsigned32*)((char*) (pWrapper + 1) + pWrapper->cb) != MARKER_TAIL) fprintf (stderr, " [TAIL]"); fprintf (stderr, "\n"); } bool _validate_one_ (WRAPPER* pWrapper) { return (pWrapper->marker == MARKER_HEAD && *(unsigned32*)(((unsigned char*) pWrapper) + sizeof (WRAPPER) + pWrapper->cb) == MARKER_TAIL); } bool _validate_ (WRAPPER* pWrapper) { for (; pWrapper; pWrapper = pWrapper->pNext) { if (!_validate_one_ (pWrapper)) { _tell_ (pWrapper); fprintf (stderr, "heap invalid\n"); return false; } } return true; } buici-clock-0.4.9.2/xo/wtext.cxx0000644000000000000000000001715711612677215013306 0ustar /* wtext.cxx $Id: wtext.cxx,v 1.9 1998/10/15 04:11:51 elf Exp $ written by Marc Singer 22 May 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- Text edit and display control. */ #include "standard.h" #include "ldisplay.h" #include "lwindow.h" #include "wtext.h" #include //#include "wtext.h" #define PIX_MARGIN_LEFT 5 #define WIDTH_CARET 3 #define PIX_OFFSET_CARET 1 #define EVENT_MASK ( ButtonPressMask \ | ButtonReleaseMask \ | ExposureMask \ | KeyPressMask \ | KeyReleaseMask \ | EnterWindowMask \ | LeaveWindowMask \ | FocusChangeMask ) EventMap g_rgEMText[] = { { ButtonPress, (PFNEvent) &WTextEdit::buttondown }, { ButtonRelease, (PFNEvent) &WTextEdit::buttonup }, { Expose, (PFNEvent) &WTextEdit::expose }, { CreateSelfNotify, (PFNEvent) &WTextEdit::createself }, { EnterNotify, (PFNEvent) &WTextEdit::enter }, { LeaveNotify, (PFNEvent) &WTextEdit::leave }, { KeyPress, (PFNEvent) &WTextEdit::keypress }, { KeyRelease, (PFNEvent) &WTextEdit::keyrelease }, { FocusIn, (PFNEvent) &WTextEdit::focusin }, { FocusOut, (PFNEvent) &WTextEdit::focusout }, { 0, NULL }, }; void WTextEdit::buttondown (XButtonEvent* pEvent) { } void WTextEdit::buttonup (XButtonEvent* pEvent) { } void WTextEdit::createself (XoCreateSelfWindowEvent* /* pEvent */) { m_sz = (char*) malloc (m_cchMax = 1024); m_cchLim = 0; *m_sz = 0; } void WTextEdit::enter (XEnterWindowEvent* pEvent) { XFontStruct* pFont = m_pDisplay->find_font (m_fid); if (!pFont) return; m_fFocus = true; XClearArea (pEvent->display, pEvent->window, PIX_MARGIN_LEFT + m_widthString + PIX_OFFSET_CARET, (height () - pFont->ascent - pFont->descent)/2, WIDTH_CARET, pFont->ascent + pFont->descent, True); XGrabKeyboard (pEvent->display, pEvent->window, True, GrabModeAsync, GrabModeAsync, CurrentTime); } void WTextEdit::leave (XLeaveWindowEvent* pEvent) { XFontStruct* pFont = m_pDisplay->find_font (m_fid); if (!pFont) return; m_fFocus = false; XClearArea (pEvent->display, pEvent->window, PIX_MARGIN_LEFT + m_widthString + PIX_OFFSET_CARET, (height () - pFont->ascent - pFont->descent)/2, WIDTH_CARET, pFont->ascent + pFont->descent, True); XUngrabKeyboard (pEvent->display, CurrentTime); } void WTextEdit::focusin (XFocusInEvent* pEvent) { } void WTextEdit::focusout (XFocusOutEvent* pEvent) { } void WTextEdit::expose (XExposeEvent* pEvent) { GC gc = m_pDisplay->gc (); XSetState (pEvent->display, gc, m_foreground, m_background, GXcopy, AllPlanes); XRectangle rect = { pEvent->x, pEvent->y, pEvent->width, pEvent->height }; XSetClipRectangles (pEvent->display, gc, 0, 0, &rect, 1, Unsorted); XDrawRectangle (pEvent->display, pEvent->window, gc, 0, 0, width () - 1, height () - 1 ); XFontStruct* pFont = m_pDisplay->find_font (m_fid); if (pFont) { int direction; int ascent; int descent; XCharStruct xchar; XSetFont (pEvent->display, gc, pFont->fid); XTextExtents (pFont, m_sz, m_cchLim, &direction, &ascent, &descent, &xchar); XDrawString (pEvent->display, pEvent->window, gc, PIX_MARGIN_LEFT, (height () - ascent - descent)/2 + ascent, m_sz, m_cchLim); if (m_fFocus) XCopyPlane (pEvent->display, m_pixmapCaret, pEvent->window, gc, 0, 0, WIDTH_CARET, ascent + descent, PIX_MARGIN_LEFT + m_widthString + PIX_OFFSET_CARET, (height () - ascent - descent)/2, 0x1); } } void WTextEdit::keypress (XKeyPressedEvent* pEvent) { KeySym keysym = XLookupKeysym (pEvent, 0); // printf ("keysym 0x%lx\n", (long) keysym); char sz[80]; memset (sz, 0, sizeof (sz)); XLookupString (pEvent, sz, sizeof (sz), &keysym, NULL); // printf ("string '%s' (0x%x)\n", sz, *sz); for (int i = 0; sz[i]; ++i) { if (sz[i] >= 0x20 && sz[i] <= 0x7e) m_sz[m_cchLim++] = sz[i]; else if (sz[i] == 0x8 && m_cchLim) --m_cchLim; } m_sz[m_cchLim] = 0; // printf ("'%s'\n", pInfo->sz); if (m_cchLim == 0 && m_widthString == 0) return; XFontStruct* pFont = m_pDisplay->find_font (m_fid); if (pFont) { int direction; int ascent; int descent; XCharStruct xchar; XTextExtents (pFont, m_sz, m_cchLim, &direction, &ascent, &descent, &xchar); if (m_widthString < xchar.width) XClearArea (pEvent->display, pEvent->window, PIX_MARGIN_LEFT + m_widthString, (height () - ascent - descent)/2, xchar.width - m_widthString + WIDTH_CARET + PIX_OFFSET_CARET, ascent + descent, True); else XClearArea (pEvent->display, pEvent->window, PIX_MARGIN_LEFT + xchar.width, (height () - ascent - descent)/2, m_widthString - xchar.width + WIDTH_CARET + PIX_OFFSET_CARET, ascent + descent, True); m_widthString = xchar.width; } // XClearArea (pEvent->display, pEvent->window, 0, 0, 0, 0, True); } void WTextEdit::keyrelease (XKeyReleasedEvent* /* pEvent */) { } void WTextEdit::register_template (LDisplay* pDisplay) { WTextEdit* pWindow = new WTextEdit (pDisplay); pWindow->event_map (g_rgEMText); pWindow->select_events (EVENT_MASK); // -- Prepare instance data XrmValue value; pDisplay->find_resource ("xo.text.font", "Toolkit.Text.Font", NULL, &value); XFontStruct* pFont = pDisplay->find_font (value.addr); if (pFont) pWindow->m_fid = pFont->fid; pDisplay->find_resource ("xo.text.background", "Toolkit.Text.Background", NULL, &value); pDisplay->find_pixel (value.addr, &pWindow->m_background); pDisplay->find_resource ("xo.text.foreground", "Toolkit.Text.Foreground", NULL, &value); pDisplay->find_pixel (value.addr, &pWindow->m_foreground); pDisplay->find_resource ("xo.text.highlight", "Toolkit.Text.Highlight", NULL, &value); pDisplay->find_pixel (value.addr, &pWindow->m_highlight); pWindow->set_background_pixel (pWindow->m_background); { int width = WIDTH_CARET; int height = pFont->ascent + pFont->descent; char rgb[128]; for (int i = 0; i < height; ++i) rgb[i] = (i == 0 || i == height - 1) ? 5 : 2; // rgb[i] = (i == 0 || i == height - 1) ? 5 : 0xff; pWindow->m_pixmapCaret = XCreateBitmapFromData (pDisplay->display (), XDefaultRootWindow (pDisplay->display ()), rgb, width, height); } pDisplay->hash_template ("text", pWindow); } void WTextEdit::text (const char* sz) { if (!sz) { *m_sz = 0; return; } int cb = strlen (sz); if (cb > m_cchMax - 1) cb = m_cchMax - 1; memcpy (m_sz, sz, cb); m_sz[cb] = 0; m_cchLim = cb; XFontStruct* pFont = m_pDisplay->find_font (m_fid); if (pFont) { int direction; int ascent; int descent; XCharStruct xchar; XTextExtents (pFont, m_sz, m_cchLim, &direction, &ascent, &descent, &xchar); m_widthString = xchar.width; } } buici-clock-0.4.9.2/xo/dither.h0000644000000000000000000000634111612677215013030 0ustar /* dither.h -*- C++ -*- $Id: dither.h,v 1.2 1997/10/18 04:57:32 elf Exp $ written by Marc Singer 24 Mar 1997 This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #if !defined (__DITHER_H__) # define __DITHER_H__ /* ----- Includes */ #include #define C_COLOR_MAX 256 /* Total number of colors */ #define C_SHADES_MAX 256 /* Max number of shades in primary */ typedef unsigned32 PEL; #define COLOROF(r,g,b) (((r)<<16) + ((g)<<8) + (b)) class LDither { protected: int m_cRed; // Count of red shades int m_cGreen; // Count of green shades int m_cBlue; // Count of blue shades int m_cColors; // Count of all combinations, cRed*cGreen*cBlue void* m_rgRGB; // Dithering palette RGBQUAD int **m_pMatrix; // Dithering matrix int m_dim; // Dimension of dither matrix int m_dim2; // Dither matrix dimension squared int m_level_red; int m_level_green; int m_level_blue; int m_dither_divisor; #define LEVELS(s) (m_dim2*((shades) - 1) + 1) #define LEVEL5MULT(p) (((p) << 10) + (p)) #define LEVEL9MULT(p) (((p) << 11) + (p)) unsigned8 dither (PEL pel, int d, int shades) { return unsigned8 ((LEVELS (shades)*(pel) + (d))/(m_dim2*C_SHADES_MAX)); } unsigned8 dither_red (PEL pel, int d) { return unsigned8 ((LEVEL5MULT(pel) + (d)) >> 16); } unsigned8 dither_green (PEL pel, int d) { return unsigned8 ((LEVEL9MULT(pel) + (d)) >> 16); } unsigned8 dither_blue (PEL pel, int d) { return unsigned8 ((LEVEL5MULT(pel) + (d)) >> 16); } int levels (int shades) { return m_dim2*((shades) - 1) + 1; } int matrix_value (int y, int x, int size); public: LDither () { zero (); } ~LDither () { release_this (); } void zero (void) { memset (this, 0, sizeof (*this)); } void init (void) { init (4, 5, 9, 5); } void release_this (void); int color_index (int r, int g, int b) { return ((r)*m_cGreen + (g))*m_cBlue + (b); } void create_matrix (int dim); void dither (int x, int y, int cx, int cy, unsigned8* pbSrc, unsigned8* pbDst); void dither (int cx, int cy, unsigned8* pbSrc, unsigned8* pbDst) { dither (0, 0, cx, cy, pbSrc, pbDst); } void init (int dim, int cRed, int cGreen, int cBlue); int closest_match (float r, float g, float b) { return color_index (int (r*(m_cRed - 1)), int (g*(m_cGreen - 1)), int (b*(m_cBlue - 1))); } int colors (void) { return m_cColors; } void* palette (void) { return m_rgRGB; } }; #endif /* __DITHER_H__ */ buici-clock-0.4.9.2/xo/configure.in0000644000000000000000000000216611612677215013712 0ustar dnl Process this file with autoconf to produce a configure script. AC_REVISION([$Id: configure.in,v 1.5 2000/01/13 07:04:46 elf Exp $]) AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required. AC_INIT(ldisplay.cxx) dnl Name of unique file that must exist AC_CONFIG_HEADER(config.h) AC_LANG_CPLUSPLUS dnl Default to c++ cause that what we done. dnl Checks for programs. AC_PROG_YACC AC_PROG_LEX AC_PROG_CXX AC_PROG_LN_S if test "${GXX}" = "yes" ; then CFLAGS_W=" -Wall -Wno-parentheses -Wno-unused" CFLAGS="${CFLAGS}" fi dnl Checks for header files. AC_PATH_XTRA AC_HEADER_STDC AC_CHECK_FUNCS(memset strncmp) AC_CHECK_HEADERS(memory.h fcntl.h limits.h unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl -- Removed because it tends to interfere with headers dnl AC_C_CONST dnl -- Removed because it tends to interfere with headers dnl AC_C_INLINE AC_TYPE_SIZE_T AC_HEADER_TIME dnl Checks for library functions. dnl AC_FUNC_MMAP dnl AC_FUNC_VPRINTF dnl -- We use vsprintf AC_SUBST(CFLAGS_W) AC_OUTPUT(Makefile) dnl -- Prevent accidental edits. chmod -w Makefile chmod -w config.h buici-clock-0.4.9.2/xo/res_l.l0000644000000000000000000000534611612677215012665 0ustar %{ /* res_l.l $Id: res_l.l,v 1.8 1997/10/18 04:57:41 elf Exp $ This file is part of the project XO. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- Lexical anaylzer for dialog language parser. */ #include "standard.h" #define IS_PARSER #include "lres.h" #include "res_y.h" #include #if defined (__cplusplus) extern "C" int yylex (void); #else int yylex (void); #endif int g_iLineParse = 1; /* We need to read from the buffered input stream because we do some magic with the first line that requires an ungetc() call. */ #define YY_INPUT(pv,result,cbMax) \ if ((result = fread ((char*) pv, 1, cbMax, yyin)) < 0 ) \ YY_FATAL_ERROR ("input in flex scanner failed"); #define DPRINTF(a) #define YY_NO_UNPUT %} %s COMMENT %% /* comments are ignored */ "/*" { BEGIN COMMENT; } "*/" { BEGIN 0; } .* ; \n { ++g_iLineParse; } /* real number */ ([+-]?[0-9]+\.[0-9]*) { float r; if (safe_atof (yytext, &r)) { /* yylval.er = erInteger; */ return ERROR; } yylval.r = r; return REAL; } /* integer */ ([+-]?[0-9]+) { long l; if (safe_atol (yytext, &l)) { /* yylval.er = erInteger; */ return ERROR; } yylval.l = l; return INTEGER; } /* hex integer */ (0[xX][0-9a-fA-F]+) { long l; if (safe_atol (yytext, &l)) { /* yylval.er = erInteger; */ return ERROR; } yylval.l = l; return INTEGER; } /* white space is ignored */ \n { ++g_iLineParse; } [ \t\r\032] ; /* string surrounded by double quotes, \" to escape a " character */ \"([^\"\n]|(\\\"))*\" { yytext[yyleng - 1] = 0; yylval.sz = (char*) LResNode::alloc (yyleng - 1, yytext + 1); return STRING; } [a-zA-Z_]+ { yylval.sz = (char*) LResNode::alloc (yyleng + 1, yytext); return KEYWORD; } "\"" { return QUOTE; } "{" { return BO; } "}" { return BC; } "(" { return PO; } ")" { return PC; } . { return yytext[0]; } %% buici-clock-0.4.9.2/draw.cc0000644000000000000000000002266011613344743012216 0ustar /* draw.cc written by Marc Singer 25 Dec 2006 Copyright (C) 2006 Marc Singer ----------- DESCRIPTION ----------- Drawing of clock mechanism with cairo. g++ `pkg-config --cflags --libs cairo` -o draw draw.cc */ #include #include #include #include #include #include #include #include #include #include #include #define DX 100.0 #define DY 100.0 #define WIDTH_BORDER (DX*0.04) #define WIDTH_THICK (DX*0.026) #define WIDTH_THIN 1.0 #define WIDTH_HAND (WIDTH_THICK*0.8) #define FONT "serif" void draw (void) { cairo_surface_t* s = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, (int) DX, (int) DY); cairo_t* cr = cairo_create (s); // -- Setup initial matrix cairo_translate (cr, DX/2.0, DY/2.0); // cairo_scale (cr, 0.3, 0.3); // cairo_rotate (cr, M_PI/8); // cairo_rectangle (cr, 0, 0, DX, DY); // cairo_set_source_rgb (cr, 0.5, 0.5, 0.5); // cairo_fill (cr); // -- Draw border cairo_arc (cr, 0, 0, DX/2 - WIDTH_BORDER/2, 0, 2*M_PI); cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_fill_preserve (cr); // cairo_arc (cr, DX/2.0, DY/2.0, DX/2 - WIDTH_THICK, 0, 2*M_PI); cairo_set_line_width (cr, WIDTH_BORDER); cairo_set_source_rgb (cr, 0, 0, 0); cairo_stroke (cr); // -- Draw ticks for (int i = 0; i < 60; ++i) { cairo_save (cr); cairo_rotate (cr, (2*M_PI)*i/60.0); cairo_set_line_width (cr, (i%5 == 0) ? WIDTH_THICK : WIDTH_THIN); cairo_move_to (cr, (DX/2.0)*0.90, 0); cairo_line_to (cr, (i%5 == 0) ? (DX/2.0)*0.70 : (DX/2.0)*0.83, 0); cairo_set_source_rgb (cr, 0, 0, 0); cairo_stroke (cr); cairo_restore (cr); } // -- Draw brand { const char* sz = "Buici"; cairo_save (cr); cairo_select_font_face (cr, FONT, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_source_rgb (cr, 0, 0, 0); cairo_set_font_size (cr, DX*0.08); cairo_text_extents_t ex; cairo_text_extents (cr, sz, &ex); cairo_translate (cr, -ex.width/2 + ex.x_bearing, -ex.y_bearing/2 - (DX/2)*0.35); cairo_show_text (cr, sz); cairo_restore (cr); } // -- Draw hands { time_t t = time (NULL); struct tm tm; localtime_r (&t, &tm); int second = tm.tm_sec; // t%60; float minute = tm.tm_min + second/60.0; //(t/60)%60; float hour = tm.tm_hour + minute/60.0; //(t/(60*60))%12; cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*hour)/12.0); cairo_set_line_width (cr, WIDTH_HAND); cairo_move_to (cr, 0, (DY/2.0)*0.15); cairo_line_to (cr, 0, -(DY/2.0)*0.58); cairo_stroke (cr); cairo_restore (cr); cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*minute)/60.0); cairo_set_line_width (cr, WIDTH_HAND); cairo_move_to (cr, 0, (DY/2.0)*0.15); cairo_line_to (cr, 0, -(DY/2.0)*0.75); cairo_path_t* path = cairo_copy_path (cr); // cairo_stroke (cr); cairo_translate (cr, WIDTH_THIN, WIDTH_THIN); cairo_append_path (cr, path); cairo_path_destroy (path); cairo_set_source_rgb (cr, 0, 1.0, 0); // cairo_stroke (cr); cairo_restore (cr); cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*second)/60.0); cairo_set_line_width (cr, WIDTH_THIN); cairo_move_to (cr, 0, (DY/2.0)*0.20); cairo_line_to (cr, 0, -(DY/2.0)*0.64); cairo_set_source_rgb (cr, 1.0, 0, 0); cairo_stroke (cr); cairo_arc (cr, 0, -(DY/2.0)*0.64, DX*0.03, 0, 2*M_PI); cairo_fill (cr); cairo_restore (cr); } cairo_surface_write_to_png (s, "foo.png"); cairo_destroy (cr); cairo_surface_destroy (s); } void draw_hands (Display* display, Visual* visual, Pixmap pixmap, int dx, int dy, int seconds) { cairo_surface_t* s = cairo_xlib_surface_create (display, pixmap, visual, dx, dy); cairo_t* cr = cairo_create (s); cairo_surface_destroy (s); // -- Setup initial matrix cairo_translate (cr, (double) dx/2.0, (double) dy/2.0); cairo_scale (cr, (double) dx/DX, (double) dy/DY); // -- Draw hands { seconds %= 60*60*12; float minute = ((double) (seconds%(60*60)))/60.0; float hour = ((double) seconds)/(60.0*60.0); // printf ("time %d %.2f %.2f\n", seconds, minute, hour); // Hour hand cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*hour)/12.0); cairo_set_line_width (cr, WIDTH_HAND); cairo_move_to (cr, 0, (DY/2.0)*0.15); cairo_line_to (cr, 0, -(DY/2.0)*0.58); cairo_stroke (cr); cairo_restore (cr); // Minute hand cairo_move_to (cr, 0, (DY/2.0)*0.15); cairo_line_to (cr, 0, -(DY/2.0)*0.75); cairo_path_t* path = cairo_copy_path (cr); cairo_set_line_width (cr, WIDTH_HAND); cairo_new_path (cr); #if 0 cairo_save (cr); cairo_translate (cr, WIDTH_THIN*2, WIDTH_THIN*2); cairo_rotate (cr, ((2.0*M_PI)*minute)/60.0); cairo_append_path (cr, path); cairo_set_source_rgb (cr, 0.7, 0.7, 0.7); cairo_stroke (cr); cairo_restore (cr); #endif cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*minute)/60.0); cairo_append_path (cr, path); cairo_stroke (cr); cairo_restore (cr); cairo_path_destroy (path); // Second hand cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*seconds)/60.0); cairo_set_line_width (cr, WIDTH_THIN); cairo_move_to (cr, 0, (DY/2.0)*0.20); cairo_line_to (cr, 0, -(DY/2.0)*0.64); cairo_set_source_rgb (cr, 1.0, 0, 0); cairo_stroke (cr); cairo_arc (cr, 0, -(DY/2.0)*0.64, DX*0.03, 0, 2*M_PI); cairo_fill (cr); cairo_restore (cr); } cairo_destroy (cr); } void draw_dial (Display* display, Visual* visual, Pixmap pixmap, int dx, int dy) { cairo_surface_t* s = cairo_xlib_surface_create (display, pixmap, visual, dx, dy); // cairo_surface_t* s = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, // DX, DY); cairo_t* cr = cairo_create (s); cairo_surface_destroy (s); // -- Setup initial matrix cairo_translate (cr, (double) dx/2.0, (double) dy/2.0); cairo_scale (cr, (double) dx/DX, (double) dy/DY); // cairo_rotate (cr, M_PI/8); // -- Erase cairo_save (cr); cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); cairo_paint (cr); cairo_restore (cr); // cairo_rectangle (cr, -DX/2.0, -DY/2.0, DX, DY); // cairo_set_source_rgb (cr, 0.9, 0, 0); // cairo_fill (cr); // -- Draw border cairo_arc (cr, 0, 0, DX/2 - WIDTH_BORDER/2, 0, 2*M_PI); cairo_set_source_rgb (cr, 1.0, 1.0, 1.0); cairo_fill_preserve (cr); // cairo_arc (cr, DX/2.0, DY/2.0, DX/2 - WIDTH_THICK, 0, 2*M_PI); cairo_set_line_width (cr, WIDTH_BORDER); cairo_set_source_rgb (cr, 0, 0, 0); cairo_stroke (cr); // -- Draw ticks for (int i = 0; i < 60; ++i) { cairo_save (cr); cairo_rotate (cr, (2*M_PI)*i/60.0); cairo_set_line_width (cr, (i%5 == 0) ? WIDTH_THICK : WIDTH_THIN); cairo_move_to (cr, (DX/2.0)*0.88, 0); cairo_line_to (cr, (i%5 == 0) ? (DX/2.0)*0.70 : (DX/2.0)*0.81, 0); cairo_set_source_rgb (cr, 0, 0, 0); cairo_stroke (cr); cairo_restore (cr); } // -- Draw brand { const char* sz = "Buici"; cairo_save (cr); cairo_select_font_face (cr, FONT, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_source_rgb (cr, 0, 0, 0); cairo_set_font_size (cr, DX*0.08); cairo_text_extents_t ex; cairo_text_extents (cr, sz, &ex); cairo_translate (cr, -ex.width/2 + ex.x_bearing, -ex.y_bearing/2 - (DX/2)*0.35); cairo_show_text (cr, sz); cairo_restore (cr); } #if 0 // -- Draw hands { time_t t = time (NULL); struct tm tm; localtime_r (&t, &tm); int second = tm.tm_sec; // t%60; float minute = tm.tm_min + second/60.0; //(t/60)%60; float hour = tm.tm_hour + minute/60.0; //(t/(60*60))%12; cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*hour)/12.0); cairo_set_line_width (cr, WIDTH_HAND); cairo_move_to (cr, 0, (DY/2.0)*0.15); cairo_line_to (cr, 0, -(DY/2.0)*0.58); cairo_stroke (cr); cairo_restore (cr); cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*minute)/60.0); cairo_set_line_width (cr, WIDTH_HAND); cairo_move_to (cr, 0, (DY/2.0)*0.15); cairo_line_to (cr, 0, -(DY/2.0)*0.75); cairo_stroke (cr); cairo_restore (cr); cairo_save (cr); cairo_rotate (cr, ((2.0*M_PI)*second)/60.0); cairo_set_line_width (cr, WIDTH_THIN); cairo_move_to (cr, 0, (DY/2.0)*0.20); cairo_line_to (cr, 0, -(DY/2.0)*0.64); cairo_set_source_rgb (cr, 1.0, 0, 0); cairo_stroke (cr); cairo_arc (cr, 0, -(DY/2.0)*0.64, DX*0.03, 0, 2*M_PI); cairo_fill (cr); cairo_restore (cr); } cairo_surface_write_to_png (s, "foo.png"); #endif cairo_destroy (cr); } void draw_dial_shape (Display* display, Pixmap pixmap, int dx, int dy) { cairo_surface_t* s = cairo_xlib_surface_create_for_bitmap (display, pixmap, XDefaultScreenOfDisplay (display), dx, dy); cairo_t* cr = cairo_create (s); cairo_surface_destroy (s); // -- Setup initial matrix cairo_translate (cr, (double) dx/2.0, (double) dy/2.0); cairo_scale (cr, (double) dx/DX, (double) dy/DY); // -- Erase cairo_save (cr); cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); cairo_paint (cr); cairo_restore (cr); // -- Draw border and fill cairo_arc (cr, 0, 0, DX/2 - WIDTH_BORDER/2, 0, 2*M_PI); cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 1.0); cairo_fill_preserve (cr); cairo_set_line_width (cr, WIDTH_BORDER); cairo_stroke (cr); cairo_destroy (cr); } #if defined (TEST) int main (int, char**) { draw (); return 0; } #endif buici-clock-0.4.9.2/LSM0000644000000000000000000000075711613344743011333 0ustar Begin3 Title: Buici Clock <> - Attractive X-Windows Clock Version: <> Entered-date: <> Description: Xlib implementation of an attractive, configurable clock. Keywords: X-Windows X X11 clock time Author: elf@netcom.com (Marc Singer) Maintained-by: elf@netcom.com (Marc Singer) Primary-site: thumper.moretechnology.com /pub/distrib <> <> Platform: C++ to build from source. X-Windows. Copying-policy: GNU GPL End buici-clock-0.4.9.2/install-sh0000644000000000000000000001430211613344743012745 0ustar #!/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="" # CYGNUS LOCAL: exeext variable exeext="" # END CYGNUS LOCAL 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;; # CYGNUS LOCAL: -x option -x=*) exeext=`echo $1 | sed 's/-x=//'` shift continue;; -x) exeext=".exe" shift continue;; # END CYGNUS LOCAL *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # CYGNUS LOCAL noer # Win32-based gcc automatically appends .exe to produced executables, # whether asked for or not. This breaks installs. The following # changes the value of $src to $src.exe if $src is missing if [ -f $src ] then true elif [ -f $src.exe ] then echo "install: $src does not exist, trying with .exe appended" src="$src".exe fi # end CYGNUS LOCAL noer # 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 # CYGNUS LOCAL: Use exeext case "`basename $dst`" in *.*) ;; *) dst="$dst$exeext" ;; esac # END CYGNUS LOCAL 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 buici-clock-0.4.9.2/packageinfo0000644000000000000000000000042511613344743013137 0ustar # packageinfo package buici class software title "Attractive X-Windows Clock" keywords "clock, X-Windows, X11" description "The Buici clock is a simple implementation of an X-Windows\ clock. It sports an attractive face with a second hand and well\ proportioned features." buici-clock-0.4.9.2/CHANGELOG0000644000000000000000000000112611613344743012156 0ustar ===================== Buici Clock CHANGELOG $Id: CHANGELOG,v 1.1 1997/10/23 07:04:29 elf Exp $ ===================== 0.3.4 22 October 97 o Added ICCCM properties so that clock cooperates with window managers. o Posted public release. 0.3.3 20 October 97 o Fixed parsing of geometry to recognize negative offsets. o Changed algorithm for time calculation in order to universalize time-zones and daylight savings time. o Added a work-around for what appears to be X servers without resource properties. 0.3.2 18 October 97 o Posted public release. buici-clock-0.4.9.2/buici.xbm0000644000000000000000000003140011613344743012545 0ustar #define buici_width 254 #define buici_height 79 static char buici_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0xf8,0x00,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0xfe,0xff,0xff,0xff,0xff,0xff,0x01, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x03,0x00,0x00,0xff,0xff,0xff,0xff,0xff, 0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x03, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0xff,0xff,0xff, 0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80, 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00, 0xf8,0xff,0x03,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00, 0x00,0x00,0xf0,0xff,0x01,0x00,0xf8,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff, 0x07,0x00,0x00,0x00,0xf0,0xff,0x00,0x00,0xf0,0xff,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xff,0x07,0x00,0x00,0x00,0xf0,0x7f,0x00,0x00,0xe0,0xff,0x01,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x01,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0xfe,0x03,0x00,0x00,0x00,0xf0,0x7f,0x00,0x00,0xc0,0xff,0x01, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0x00,0xf8,0x7f,0x00,0x00,0x80, 0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0xf8,0x7f,0x00, 0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8, 0x3f,0x00,0x00,0x00,0xff,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0xf8,0x3f,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0xfc,0x3f,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0xfc,0x1f,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x1f,0x00,0x00,0x00,0xff,0x07,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x1f,0x00,0x00,0x00,0xff, 0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x1f,0x00,0x00, 0x00,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x0f, 0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0xfe,0x0f,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0xfe,0x0f,0x00,0x00,0x80,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0xff,0x0f,0x00,0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x80,0xff,0x03,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0xc0,0xff,0x03, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x07,0x00,0x00,0xc0, 0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x07,0x00, 0x00,0xe0,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff, 0x03,0x00,0x00,0xf0,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x80,0xff,0x03,0x00,0x00,0xf0,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x03,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0xc0,0xff,0x03,0x00,0x00,0xf8,0x3f,0x00,0x00,0xf8,0x0f,0x00,0x00, 0xff,0x01,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,0xc0,0xff,0x1f,0x00,0x00,0xf0, 0x1f,0x00,0x00,0x00,0xc0,0xff,0x01,0x00,0x00,0xfc,0x1f,0x00,0xfc,0xff,0x07, 0x00,0x00,0xff,0x00,0x00,0xfc,0xff,0x07,0x00,0x00,0x00,0xf8,0xff,0x3f,0x00, 0xf8,0xff,0x0f,0x00,0x00,0x00,0xc0,0xff,0x01,0x00,0x00,0xff,0x0f,0x00,0xfc, 0xff,0x07,0x00,0x00,0xff,0x00,0x00,0xfe,0xff,0x07,0x00,0x00,0x00,0xfc,0xff, 0x7f,0x00,0xfc,0xff,0x0f,0x00,0x00,0x00,0xc0,0xff,0x01,0x00,0x80,0xff,0x07, 0x00,0xfe,0xff,0x07,0x00,0x00,0xff,0x00,0x00,0xfe,0xff,0x07,0x00,0x00,0x00, 0xff,0x07,0xfc,0x00,0xfc,0xff,0x0f,0x00,0x00,0x00,0xe0,0xff,0x01,0x00,0xe0, 0xff,0x01,0x00,0xfe,0xff,0x07,0x00,0x80,0xff,0x00,0x00,0xfe,0xff,0x07,0x00, 0x00,0x80,0xff,0x01,0xf0,0x01,0xfc,0xff,0x0f,0x00,0x00,0x00,0xe0,0xff,0x00, 0x00,0xfc,0x3f,0x00,0x00,0x00,0xff,0x03,0x00,0x80,0x7f,0x00,0x00,0x00,0xff, 0x03,0x00,0x00,0xe0,0x7f,0x00,0xe0,0x01,0x00,0xfe,0x07,0x00,0x00,0x00,0xe0, 0xff,0xff,0xff,0xff,0x07,0x00,0x00,0x00,0xfc,0x03,0x00,0x80,0x7f,0x00,0x00, 0x00,0xfc,0x03,0x00,0x00,0xf0,0x1f,0x00,0xe0,0x03,0x00,0xf8,0x07,0x00,0x00, 0x00,0xe0,0xff,0xff,0xff,0x3f,0x00,0x00,0x00,0x00,0xfc,0x03,0x00,0x80,0x7f, 0x00,0x00,0x00,0xfc,0x03,0x00,0x00,0xf8,0x0f,0x00,0xf0,0x03,0x00,0xf8,0x07, 0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x03,0x00,0x00,0x00,0xfe,0x01,0x00, 0xc0,0x3f,0x00,0x00,0x00,0xfe,0x01,0x00,0x00,0xfc,0x07,0x00,0xfc,0x03,0x00, 0xfc,0x03,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xfe, 0x01,0x00,0xc0,0x3f,0x00,0x00,0x00,0xfe,0x01,0x00,0x00,0xfe,0x03,0x00,0xff, 0x03,0x00,0xfc,0x03,0x00,0x00,0x00,0xf0,0x7f,0x00,0x00,0xf8,0x7f,0x00,0x00, 0x00,0xfe,0x01,0x00,0xc0,0x3f,0x00,0x00,0x00,0xfe,0x01,0x00,0x00,0xfe,0x03, 0x80,0xff,0x03,0x00,0xfc,0x03,0x00,0x00,0x00,0xf8,0x7f,0x00,0x00,0xc0,0xff, 0x01,0x00,0x00,0xff,0x01,0x00,0xe0,0x3f,0x00,0x00,0x00,0xff,0x01,0x00,0x00, 0xff,0x01,0x80,0xff,0x03,0x00,0xfe,0x03,0x00,0x00,0x00,0xf8,0x7f,0x00,0x00, 0x00,0xff,0x03,0x00,0x00,0xff,0x00,0x00,0xe0,0x1f,0x00,0x00,0x00,0xff,0x00, 0x00,0x80,0xff,0x00,0x80,0xff,0x03,0x00,0xfe,0x01,0x00,0x00,0x00,0xf8,0x3f, 0x00,0x00,0x00,0xfe,0x07,0x00,0x00,0xff,0x00,0x00,0xe0,0x1f,0x00,0x00,0x00, 0xff,0x00,0x00,0x80,0xff,0x00,0x80,0xff,0x01,0x00,0xfe,0x01,0x00,0x00,0x00, 0xf8,0x3f,0x00,0x00,0x00,0xfc,0x0f,0x00,0x00,0xff,0x00,0x00,0xe0,0x1f,0x00, 0x00,0x00,0xff,0x00,0x00,0xc0,0x7f,0x00,0x00,0xff,0x01,0x00,0xfe,0x01,0x00, 0x00,0x00,0xfc,0x3f,0x00,0x00,0x00,0xf8,0x1f,0x00,0x80,0xff,0x00,0x00,0xf0, 0x1f,0x00,0x00,0x80,0xff,0x00,0x00,0xc0,0x7f,0x00,0x00,0xff,0x00,0x00,0xff, 0x01,0x00,0x00,0x00,0xfc,0x1f,0x00,0x00,0x00,0xf0,0x3f,0x00,0x80,0x7f,0x00, 0x00,0xf0,0x0f,0x00,0x00,0x80,0x7f,0x00,0x00,0xe0,0x3f,0x00,0x00,0x3c,0x00, 0x00,0xff,0x00,0x00,0x00,0x00,0xfc,0x1f,0x00,0x00,0x00,0xf0,0x3f,0x00,0x80, 0x7f,0x00,0x00,0xf0,0x0f,0x00,0x00,0x80,0x7f,0x00,0x00,0xe0,0x3f,0x00,0x00, 0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0xfc,0x1f,0x00,0x00,0x00,0xf0,0x7f, 0x00,0x80,0x7f,0x00,0x00,0xf0,0x0f,0x00,0x00,0x80,0x7f,0x00,0x00,0xf0,0x1f, 0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0xfe,0x1f,0x00,0x00,0x00, 0xe0,0x7f,0x00,0xc0,0x7f,0x00,0x00,0xf8,0x0f,0x00,0x00,0xc0,0x7f,0x00,0x00, 0xf0,0x1f,0x00,0x00,0x00,0x00,0x80,0xff,0x00,0x00,0x00,0x00,0xfe,0x0f,0x00, 0x00,0x00,0xe0,0x7f,0x00,0xc0,0x3f,0x00,0x00,0xf8,0x07,0x00,0x00,0xc0,0x3f, 0x00,0x00,0xf8,0x1f,0x00,0x00,0x00,0x00,0x80,0x7f,0x00,0x00,0x00,0x00,0xfe, 0x0f,0x00,0x00,0x00,0xe0,0xff,0x00,0xc0,0x3f,0x00,0x00,0xf8,0x07,0x00,0x00, 0xc0,0x3f,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,0x00,0x80,0x7f,0x00,0x00,0x00, 0x00,0xfe,0x0f,0x00,0x00,0x00,0xe0,0xff,0x00,0xc0,0x3f,0x00,0x00,0xfc,0x07, 0x00,0x00,0xc0,0x3f,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,0x00,0x80,0x7f,0x00, 0x00,0x00,0x00,0xff,0x0f,0x00,0x00,0x00,0xe0,0xff,0x00,0xe0,0x1f,0x00,0x00, 0xfc,0x03,0x00,0x00,0xe0,0x1f,0x00,0x00,0xf8,0x0f,0x00,0x00,0x00,0x00,0xc0, 0x3f,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00,0xe0,0xff,0x00,0xe0,0x1f, 0x00,0x00,0xfc,0x03,0x00,0x00,0xe0,0x1f,0x00,0x00,0xfc,0x0f,0x00,0x00,0x00, 0x00,0xc0,0x3f,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00,0xe0,0xff,0x00, 0xe0,0x1f,0x00,0x00,0xfe,0x03,0x00,0x00,0xe0,0x1f,0x00,0x00,0xfc,0x07,0x00, 0x00,0x00,0x00,0xc0,0x3f,0x00,0x00,0x00,0x80,0xff,0x07,0x00,0x00,0x00,0xe0, 0xff,0x00,0xf0,0x1f,0x00,0x00,0xfe,0x03,0x00,0x00,0xf0,0x1f,0x00,0x00,0xfc, 0x07,0x00,0x00,0x00,0x00,0xe0,0x3f,0x00,0x00,0x00,0x80,0xff,0x07,0x00,0x00, 0x00,0xe0,0xff,0x00,0xf0,0x0f,0x00,0x00,0xff,0x01,0x00,0x00,0xf0,0x0f,0x00, 0x00,0xfc,0x07,0x00,0x00,0x00,0x00,0xe0,0x1f,0x00,0x00,0x00,0x80,0xff,0x03, 0x00,0x00,0x00,0xf0,0xff,0x00,0xf0,0x0f,0x00,0x00,0xff,0x01,0x00,0x00,0xf0, 0x0f,0x00,0x00,0xfc,0x07,0x00,0x00,0x00,0x00,0xe0,0x1f,0x00,0x00,0x00,0x80, 0xff,0x03,0x00,0x00,0x00,0xf0,0x7f,0x00,0xf0,0x0f,0x00,0x80,0xff,0x01,0x20, 0x00,0xf0,0x0f,0x00,0x01,0xfc,0x07,0x00,0x00,0x00,0x00,0xe0,0x1f,0x00,0x02, 0x00,0xc0,0xff,0x03,0x00,0x00,0x00,0xf0,0x7f,0x00,0xf8,0x0f,0x00,0x80,0xff, 0x01,0xf0,0x00,0xf8,0x0f,0x80,0x07,0xfc,0x07,0x00,0x00,0x00,0x00,0xf0,0x1f, 0x00,0x0f,0x00,0xc0,0xff,0x01,0x00,0x00,0x00,0xf8,0x7f,0x00,0xf8,0x07,0x00, 0xc0,0xff,0x00,0x70,0x00,0xf8,0x07,0x80,0x07,0xfc,0x07,0x00,0x00,0x00,0x00, 0xf0,0x0f,0x00,0x0f,0x00,0xc0,0xff,0x01,0x00,0x00,0x00,0xf8,0x3f,0x00,0xf8, 0x07,0x00,0xc0,0xff,0x00,0x78,0x00,0xf8,0x07,0xc0,0x03,0xfc,0x07,0x00,0x00, 0x00,0x00,0xf0,0x0f,0x80,0x07,0x00,0xc0,0xff,0x01,0x00,0x00,0x00,0xfc,0x3f, 0x00,0xf8,0x07,0x00,0xe0,0xff,0x00,0x38,0x00,0xf8,0x07,0xc0,0x03,0xfc,0x07, 0x00,0x00,0x00,0x00,0xf0,0x0f,0x80,0x07,0x00,0xe0,0xff,0x01,0x00,0x00,0x00, 0xfc,0x1f,0x00,0xf8,0x07,0x00,0xf0,0xff,0x00,0x3c,0x00,0xfc,0x07,0xe0,0x01, 0xfc,0x07,0x00,0x00,0x10,0x00,0xf8,0x0f,0xc0,0x03,0x00,0xe0,0xff,0x00,0x00, 0x00,0x00,0xfe,0x1f,0x00,0xfc,0x03,0x00,0xb8,0x7f,0x00,0x1e,0x00,0xfc,0x03, 0xf0,0x00,0xf8,0x07,0x00,0x00,0x38,0x00,0xf8,0x07,0xe0,0x01,0x00,0xe0,0xff, 0x00,0x00,0x00,0x00,0xff,0x0f,0x00,0xfc,0x03,0x00,0xb8,0x7f,0x00,0x1e,0x00, 0xfc,0x03,0xf0,0x00,0xf8,0x0f,0x00,0x00,0x7c,0x00,0xf8,0x07,0xe0,0x01,0x00, 0xe0,0xff,0x00,0x00,0x00,0x80,0xff,0x07,0x00,0xfc,0x03,0x00,0x9c,0x7f,0x00, 0x0f,0x00,0xfc,0x03,0x78,0x00,0xf8,0x0f,0x00,0x00,0x3e,0x00,0xf8,0x07,0xf0, 0x00,0x00,0xf0,0xff,0x00,0x00,0x00,0xc0,0xff,0x03,0x00,0xfc,0x03,0x00,0xce, 0x7f,0x80,0x07,0x00,0xfc,0x03,0x7c,0x00,0xf0,0x0f,0x00,0x00,0x1e,0x00,0xf8, 0x07,0xf8,0x00,0x00,0xf0,0x7f,0x00,0x00,0x00,0xe0,0xff,0x01,0x00,0xfc,0x03, 0x00,0xc7,0x3f,0x80,0x07,0x00,0xfc,0x01,0x3c,0x00,0xf0,0x1f,0x00,0x80,0x0f, 0x00,0xf8,0x03,0x78,0x00,0x00,0xf0,0x7f,0x00,0x00,0x00,0xf8,0xff,0x00,0x00, 0xfc,0x03,0xc0,0xc3,0x3f,0xc0,0x03,0x00,0xfc,0x01,0x1e,0x00,0xe0,0x3f,0x00, 0xc0,0x07,0x00,0xf8,0x03,0x3c,0x00,0x00,0xf8,0xff,0x00,0x00,0x00,0xfe,0x3f, 0x00,0x00,0xfc,0x07,0xe0,0xc1,0x3f,0xe0,0x01,0x00,0xfc,0x01,0x0f,0x00,0xc0, 0x7f,0x00,0xe0,0x03,0x00,0xf8,0x03,0x1e,0x00,0x00,0xfc,0xff,0x01,0x00,0xe0, 0xff,0x0f,0x00,0x00,0xfc,0x07,0xf0,0xc0,0x3f,0xf0,0x00,0x00,0xfc,0x81,0x07, 0x00,0xc0,0xff,0x00,0xf8,0x01,0x00,0xf8,0x03,0x0f,0x00,0xfe,0xff,0xff,0xff, 0xff,0xff,0xff,0x03,0x00,0x00,0xf8,0x1f,0x7c,0xc0,0x7f,0x78,0x00,0x00,0xfc, 0xe3,0x03,0x00,0x80,0xff,0x03,0xfe,0x00,0x00,0xf8,0xc7,0x07,0x00,0xfe,0xff, 0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xf0,0xff,0x1f,0x80,0xff,0x3f,0x00, 0x00,0xf8,0xff,0x01,0x00,0x00,0xfe,0xff,0x3f,0x00,0x00,0xf0,0xff,0x03,0x00, 0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0x00,0x00,0x00,0xf0,0xff,0x0f,0x80,0xff, 0x0f,0x00,0x00,0xf8,0x7f,0x00,0x00,0x00,0xfc,0xff,0x1f,0x00,0x00,0xf0,0xff, 0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0xc0,0xff,0x03, 0x00,0xff,0x07,0x00,0x00,0xf0,0x3f,0x00,0x00,0x00,0xf0,0xff,0x07,0x00,0x00, 0xe0,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x7f,0x00,0x00,0xfc,0x00,0x00,0x00,0xc0,0x07,0x00,0x00,0x00,0x80,0x7f,0x00, 0x00,0x00,0x80,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; buici-clock-0.4.9.2/buici-clock.10000644000000000000000000000234511613344743013216 0ustar .TH buici-clock 1 21-October-1998 "Debian GNU/Linux" .SH NAME buici-clock \- attractive X11 clock .SH SYNOPSIS .B buici-clock [ .B \-geometry geometry ] .SH DESCRIPTION \fBbuici-clock\fR displays an attractive, analog, X11 clock. Among the many digital clocks and analog clocks with peculiar display artifacts, \fBbuici-clock\fR intends to stand out as a stylish, low-overhead clock. .SH OPTIONS .TP .I "\-geometry geometry" This standard X11 options specifies the position and size of the clock; see .IR X (1). .SH USAGE What's to say. This release of \fBbuici-clock\fR offers no customizable features. It has a white clock face, black markers, a black border, and a red second hand with a circular pointer. The minute and hour hands are black and rectangular. Some may recognize the form from Swiss railway clocks. .SH RESOURCES Because this program doesn't use a toolkit, it recognizes only the resources specified here. .\".in +1in .TP 8 .B "showSecondHand" Is a boolean indicating whether or not the second hand will display. Note that in the current version of \fBbuici-clock\fR, disabling the second hand does not prevent an update of the clock face every second. .SH AUTHOR Marc Singer .SH "SEE ALSO" .IR X (1) buici-clock-0.4.9.2/ChangeLog0000644000000000000000000000172411613344743012522 0ustar 2003-02-12 Marc Singer * debian/control (Build-Depends): Reordered dependencies to make xlibs-dev the default xlibs library. * Makefile.in: Configuring explicitly in the current directory. Applied suggested patch to xo/Makefile.in. 1998-10-26 Marc Singer * clock.cxx (do_clock): The second-hand resource code was dumping on some users. I changed the code path to explicitly check return values and avoid references uninitialized stack variables. 1998-10-21 Marc Singer * buici-clock.1: Documented resource to enable/disable the second hand. * clock.cxx (do_clock): Added check for resource to enable/disable second hand. 1998-10-15 Marc Singer * Fixed a large batch of compiler warnings and errors in the makefiles that prevented smooth builds from untarred source. 1998-10-13 Marc Singer * Making first debianized version available. buici-clock-0.4.9.2/version.h0000644000000000000000000000305511613344743012605 0ustar /* version.h $Id: version.h,v 1.1 1997/10/12 17:27:12 elf Exp $ written by Marc Singer 29 September 1996 This file is part of the project Buici. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- This file declares C statics for the current version number. */ #if defined (DECLARE_VERSION) /* _version.h contains a single #define for SZ_VERSION. It is created automatically from .version_{major,minor,patch} files in the build process. The define takes this form. #define SZ_VERSION "1.2.3" */ # include "_version.h" # define SZ_COPYRIGHT "Copyright (C) 1997,2007 by Marc Singer" const char* g_szVersion = SZ_VERSION; const char* g_szCopyright = SZ_COPYRIGHT; #else extern const char* g_szVersion; extern const char* g_szCopyright; #endif buici-clock-0.4.9.2/signal.cxx0000644000000000000000000002024611613344743012751 0ustar /* signal.cxx $Id: signal.cxx,v 1.1 1997/10/12 19:57:37 elf Exp $ written by Marc Singer 18 October 1996 This file is part of the project Buici (taken from CurVeS). See the file README for more information. Copyright (C) 1996-1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- Simple signal wrapper. This is interesting only because we plan to port this application. Also, it helps to make the interface to signals a little more obvious. For example, we only care about certain kinds of signals and we want to be notified in the right way for these. Since we may need to adjust the signal action records when the signals are received and services, it is cleaner to do this here, in one place, instead of forcing the signal user to know the semantics of the signaling. This may seem to be overkill for a simple application as we have here. The goal is to understand signals well and to lay the foundation for more sophisticated applications that will build on this understanding. The chaining may be very useful when we need to specify clean-up handlers for allocated objects and these objects may not know about each other. -- Chaining signals The services provided by the LSignal class is that of chaining signal handlers. The default signal handling for a UN*X process links a function pointer to a signal. However, we want to cast signals into an object space which requires a function pointer and a context pointer. The signal code generates lists of handlers for each signal and calls them in rank order. The caller must provide an order by specifying a rank when declaring the handler. These ranks have no meaning to the signal code except to allow them to be prioritized. For the most part, signal handlers will be singular for each signal, but we provide this inexpensive service with the hope that the LSignal interface proves useful. ** It appears to be true that signal handlers that modify their status while being processed are incompatible with those that do not. I am leaning toward a protocol where handlers, such as the suspend handler, that must disable and then raise themselves during processessing must be last in their chain. This allows us to modify the handler structures by noting that a handler is the last in the list and therefore disregard the handler list after processing it. -- Signal Types I've chosen to start with the native signal types instead of abstracting the signal function to another type. Why? I figure that the signal types will be few and generally supported by OSs we're likely to support with the exception of everything written by Mxcrxsxft. If it is necessary to recode the signal types into an enumeration it will be an easy task. -- Race Conditions Since we permit several handlers per signal and since some signals are asynchronous and unpredictable, we may choose (not yet decided) to limit the number of handlers for some signals to one. The other option is to attempt to block the signal being modified until the structures are updated. Some signals may not be blocked and may, therefore, preclude this tactic. It turns out that GNU glibc and POSIX guarantee that pointer accesses are atomic which means that the race conditions mentioned above do not exist. Since we use a linked list of handlers, there is only one store used to link or unlink a LSignalHandlerInstance which means that the accept/release operations are safe. -- LSignalHandle Presently, this is a very cheesey cookie that turns the address of the signal number into a LSignalHandle to give to the caller. The user can recoved the signal number, if needed, by calling back to the signal class. However, we may decide to put more information in this handle when we determine if we will handle some of the signals that sport more than one parameter such as the floating point error signal, SIGFPE. -- Modifying signal handlers while processing signals We need a special version of */ #include "standard.h" #include "signal.h" #include LSignalHandlerInstance* LSignal::g_rgpHandler[NSIG]; struct sigaction LSignal::g_rgAction[NSIG]; sigset_t LSignal::g_setEnable; /* LSignal::accept adds a caller's signal handler to the list of handlers for a signal. There are several race conditions that must be addressed, but we may finesse this for now. The return value is non-zero if there is an error. */ int LSignal::accept (int signal, LSignalHandler pfn, void* pv, int rank, int flags) { // -- Stupid checks, but cheap if (!pfn || signal < 1 || signal > NSIG) return 1; LSignalHandlerInstance* pSig = (LSignalHandlerInstance*) malloc (sizeof (LSignalHandlerInstance)); assert (pSig); memset (pSig, 0, sizeof (*pSig)); pSig->pfn = pfn; pSig->pv = pv; pSig->rank = rank; pSig->flags = flags; // -- Find it's place in the handler list LSignalHandlerInstance** ppSig = &g_rgpHandler[signal]; while (*ppSig && (*ppSig)->rank < pSig->rank) ppSig = &(*ppSig)->pNext; // -- Link pSig->pNext = (*ppSig); *ppSig = pSig; enable (signal); return 0; } /* LSignal::block this is supposed to do something so that we don't receive this signal until it is unblocked. */ void LSignal::block (int /* signal */) { } void LSignal::disable (int signal) { if (!sigismember (&g_setEnable, signal)) return; sigdelset (&g_setEnable, signal); sigaction (signal, &g_rgAction[signal], NULL); } void LSignal::enable (int signal) { if (sigismember (&g_setEnable, signal)) return; sigaddset (&g_setEnable, signal); sigaction (signal, NULL, &g_rgAction[signal]); // Save previous action struct sigaction action; memset (&action, 0, sizeof (action)); action.sa_handler = handler; action.sa_flags |= SA_RESTART; sigemptyset (&action.sa_mask); sigaction (signal, &action, NULL); } /* LSignal::handler single, reentrant handler for all signals. The check for last'ness is necessary to allow the last handler in the chain to manipulate the handler's status while it is being processed. */ void LSignal::handler (int signal) { bool fLast = false; for (LSignalHandlerInstance** ppSig = &g_rgpHandler[signal]; !fLast && *ppSig; ppSig = &(*ppSig)->pNext) { if (!(*ppSig)->pNext) fLast = true; (*ppSig)->pfn ((LSignalHandle) &signal, (*ppSig)->pv); } } /* LSignal::release removes a signal handler instance. The return value is non-zero if there is an error. */ int LSignal::release (int signal, LSignalHandler pfn, void* pv) { // -- Stupid checks, but cheap if (!pfn || signal < 1 || signal > NSIG) return 1; // -- Look for the handler of interest LSignalHandlerInstance** ppSig = &g_rgpHandler[signal]; while (*ppSig && (*ppSig)->pfn != pfn && (*ppSig)->pv != pv) ppSig = &(*ppSig)->pNext; if (!*ppSig) return 1; // -- Unlink and release LSignalHandlerInstance* pSig = *ppSig; *ppSig = pSig->pNext; free (pSig); if (!*ppSig) disable (signal); return 0; } /* LSignal::signal_of recovers the signal number from the signal handle. */ int LSignal::signal_of (LSignalHandle handle) { if (!handle) return -1; return *((int*) handle); } /* LSignal::unblock this is supposed to do something so that we don't receive a signal while the data structure is being adjusted. */ void LSignal::unblock (int /* signal */) { } buici-clock-0.4.9.2/debian/0000755000000000000000000000000011613344743012166 5ustar buici-clock-0.4.9.2/debian/postinst0000755000000000000000000000035311613344743014000 0ustar #!/bin/sh # $Id: postinst,v 1.3 2001/09/06 22:34:37 elf Exp $ # # postinst for buici-clock # Remove detritus if test -f /usr/X11R6/share/man/man1/buici-clock.1.gz ; then rm /usr/X11R6/share/man/man1/buici-clock.1.gz ; fi #DEBHELPER# buici-clock-0.4.9.2/debian/buici-clock.menu0000644000000000000000000000021711613344743015240 0ustar ?package(buici-clock):\ needs="X11"\ section="Games/Toys"\ hints="Clocks"\ title="buici clock"\ command="buici-clock" buici-clock-0.4.9.2/debian/changelog0000644000000000000000000001414411613344743014044 0ustar buici-clock (0.4.9.2) unstable; urgency=low * Added pkg-config and libcairo to build dependencies. Unclear how it ever built at all. * Changed menu to conform to recommended section for clocks. (Closes: #496094) * Verified that these NMUs are either incorporated or adequately covered by other changes to the package. (Closes: #392675, #392821) -- Marc Singer Mon, 25 Jul 2011 19:38:19 +0000 buici-clock (0.4.9.1) unstable; urgency=low * Reordered link line for libxo.a s.t. libraries succeed objects. (Closes: # 634730) * Upgraded debian rules and compatibility. * Removed libSM and libICE from link as no symbols from libraries were used. Also removed from build dependencies. * Restored support for complete source archive on upload. (Closes: #635240) -- Marc Singer Mon, 25 Jul 2011 11:29:38 +0000 buici-clock (0.4.8) unstable; urgency=low * Revised Joey's changes to the build as to better clean up all build transients. * Removed decoration from the main clock window on use of a command-line switch. * Fixed an error in the application name parser. * Added command line switch to enable/disable the second hand. -- Marc Singer Sat, 23 Dec 2006 18:44:23 -0800 buici-clock (0.4.6.0.1) unstable; urgency=low * NMU * Version number munge to let this NMU have a higher version number than the 0.4.6+b1 hppa bin-nmu in testing. -- Joey Hess Fri, 13 Oct 2006 20:33:48 -0400 buici-clock (0.4.6-0.2) unstable; urgency=low * NMU * Improve clean target slightly, to remove xo/libxo.a. Closes: #392734 Also other generated files in xo/. -- Joey Hess Fri, 13 Oct 2006 13:56:49 -0400 buici-clock (0.4.6-0.1) unstable; urgency=low * NMU * Fix location of man page. Closes: #391695 * Remove incorrect hardcoded path to program in menu file. * Add missing quotes in menu file. * Add a call to dh_clean in rules file. Still doesn't clean entirely correctly. -- Joey Hess Thu, 12 Oct 2006 15:41:01 -0400 buici-clock (0.4.6) unstable; urgency=low * Moved the executable from /usr/X11R6 to /usr. -- Marc Singer Mon, 17 Apr 2006 08:23:19 -0700 buici-clock (0.4.5) unstable; urgency=low * Autoconf fix required unstable version of autoconf. This update also fixes: * Updating the control file. Removing xlibs-dev dependency. * Updated the configure script to fix an error in the way that older autoconf's searched for X libraries and header. * Added SM and ICE libraries to the list of build-depends, libraries that the whiz-bang script missed. -- Marc Singer Tue, 17 Jan 2006 11:54:59 -0800 buici-clock (0.4.4) unstable; urgency=low * Rolled revision to propagate configure script change as well as: * Updating the control file. Removing xlibs-dev dependency. * Updated the configure script to fix an error in the way that older autoconf's searched for X libraries and header. -- Marc Singer Mon, 16 Jan 2006 15:02:49 -0800 buici-clock (0.4.3) unstable; urgency=low * Updating the control file. Removing xlibs-dev dependency. * Updated the configure script to fix an error in the way that older autoconf's searched for X libraries and header. -- Marc Singer Mon, 16 Jan 2006 14:27:24 -0800 buici-clock (0.4.2) unstable; urgency=low * Upload to upgrade to new gcc compiler. -- Marc Singer Wed, 20 Aug 2003 21:52:54 -0700 buici-clock (0.4.1) unstable; urgency=low * Reordered dependencies to make xlibs-dev the default xlibs library. (closes: #170242) * Configuring explicitly in the current directory. * Applied suggested patch to xo/Makefile.in. (closes: #141442) -- Marc Singer Wed, 12 Feb 2003 10:05:10 -0800 buici-clock (0.4.0) unstable; urgency=low * Checks every hour for the timezone offset. We'll know in the spring if it tracks DST changes properly. (closes: #117353) * Rolled revision because of the previous, bona-fide bug fix. -- Marc Singer Tue, 30 Oct 2001 20:52:29 -0800 buici-clock (0.3.15) unstable; urgency=low * Lintian changes. Man page in the right place, correct install scripts. Using all debhelper commands. Lintian is now happy. -- Marc Singer Thu, 06 Sep 2001 02:22:00 -0000 buici-clock (0.3.14) unstable; urgency=low * Dropped xbase-clients from build-depends. -- Marc Singer Mon, 23 Jul 2001 01:11:00 -0000 buici-clock (0.3.13) unstable; urgency=low * Added more entries to the build-depends. * Incremented version number twice to avoid conflict with the NMU. -- Marc Singer Sun, 22 Jul 2001 19:27:00 -0000 buici-clock (0.3.11) unstable; urgency=low * Changed the prerelease rule to correctly set file permissions. -- Marc Singer Mon, 9 Apr 2001 22:09:59 -0700 buici-clock (0.3.10) testing unstable; urgency=low * Changed autoconf WRT time.h and sys/time.h. This makes it build in potato and woody, bug #92346. -- Marc Singer Sat, 31 Mar 2001 13:20:39 -0800 buici-clock (0.3.9) testing unstable; urgency=low * Added build-depends for X libraries, but it doesn't work. Hmm. * Moved doc and man to share, bug #91398. -- Marc Singer Mon, 26 Mar 2001 16:32:33 -0800 buici-clock (0.3.8) frozen unstable; urgency=low * This patches the clock so it can be shipped with the now frozen potato. * Fixed a contravariance violation related to const. * Rebuild to link with libstdc++2.9 for potato. -- Oscar Levi Wed, 12 Jan 2000 15:01:57 -0800 buici-clock (0.3.7) frozen; urgency=low * Patched clock.cxx to fix a core dump (on non-Debian systems) that appears to be related to the resource management. * Rebuilt to fix the erroneous dependency on libstdc++2.8. -- Marc Singer Tue, 17 Nov 1998 17:06:53 -0800 buici-clock (0.3.6) unstable; urgency=low * First debianized version of buici-clock. -- Marc Singer Wed, 21 Oct 1998 15:35:51 -0700 buici-clock-0.4.9.2/debian/rules0000755000000000000000000000105411613344743013246 0ustar #!/usr/bin/make -f %: dh $@ # Helpers for assisted package building dph-post-source-export: # Import xo library directly into source archive. @[ ! -z "$(SOURCE)" -o ! -d "$(SOURCE)" ] \ || { echo "invalid or missing $$SOURCE" ; exit 1; } ; \ xo= ; \ [ ! -z "$$xo" -o ! -f "xo/ldisplay.cxx" ] || xo=xo ; \ [ ! -z "$$xo" -o ! -f "../xo/ldisplay.cxx" ] || xo=../xo ; \ [ ! -z "$$xo" ] || { echo "no xo library found"; exit 1 ; } ; \ ( cd $$xo ; git archive --format=tar --prefix=xo/ HEAD ) \ | (cd "$(SOURCE)" ; tar xf -) dph-%: @exit 0 buici-clock-0.4.9.2/debian/control0000644000000000000000000000117111613344743013571 0ustar Source: buici-clock Section: x11 Priority: optional Maintainer: Marc Singer Standards-Version: 3.7.3 Build-Depends: debhelper (>= 7), bison, flex, libx11-dev, libxext-dev, pkg-config, libcairo2-dev Package: buici-clock Architecture: any Depends: ${shlibs:Depends} ${misc:Depends} Description: attractive desktop clock As clocks go, Buici satisfies the basic need of representing the time accurately and attractively. I wrote it when I began to use X as my primary desktop environment and wanted to have a decent looking clock on my desktop. I loathe digital clocks. This release has limited configurability. buici-clock-0.4.9.2/debian/copyright0000644000000000000000000000167311613344743014130 0ustar This copyright refers to the Debian GNU/Linux, packaged version of Buici-Clock. This program offers an attractive X11 desktop clock. Program Copyright (C) 1997,1998,2001 Marc Singer 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 with your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with the Debian GNU/Linux hello source package as the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, MA 02111-1307, USA. buici-clock-0.4.9.2/debian/compat0000644000000000000000000000000211613344743013364 0ustar 7 buici-clock-0.4.9.2/.gitignore0000644000000000000000000000045611613344743012741 0ustar .version Makefile _version.h buici-clock buici-clock-0.4.8.README config.h config.log config.status debian/buici-clock.debhelper.log debian/buici-clock.postinst.debhelper debian/buici-clock.postrm.debhelper debian/buici-clock.substvars debian/buici-clock/ debian/files debian/rules-orig depend.m o/ xo buici-clock-0.4.9.2/version.cxx0000644000000000000000000000205111613344743013153 0ustar /* version.cxx $Id: version.cxx,v 1.1 1997/10/12 17:27:12 elf Exp $ written by Marc Singer 4 April 1997 This file is part of the project Buici. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ----- Includes */ #define DECLARE_VERSION #include "standard.h" #include "version.h" buici-clock-0.4.9.2/COPYING0000644000000000000000000004307611613344743012011 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. buici-clock-0.4.9.2/mkinstalldirs0000755000000000000000000000115011613344743013547 0ustar #!/bin/sh # Make directory hierarchy. # Written by Noah Friedman # Public domain. defaultIFS=' ' IFS="${IFS-${defaultIFS}}" for file in ${1+"$@"} ; do oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${file} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" test ".${1}" = "." && shift pathcomp='' while test $# -ne 0 ; do pathcomp="${pathcomp}${1}" shift if test ! -d "${pathcomp}"; then echo "mkdir $pathcomp" 1>&2 mkdir "${pathcomp}" fi pathcomp="${pathcomp}/" done done # eof buici-clock-0.4.9.2/config.h.in0000644000000000000000000000205111613344743012765 0ustar /* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define to empty if the keyword does not work. */ #undef const /* Define if your struct tm has tm_zone. */ #undef HAVE_TM_ZONE /* Define if you don't have tm_zone but do have the external array tzname. */ #undef HAVE_TZNAME /* Define as __inline if that's what the C compiler calls it. */ #undef inline /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if your declares struct tm. */ #undef TM_IN_SYS_TIME #undef TIME_WITH_SYS_TIME /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to `long' if doesn't define. */ #undef time_t /* Define if you have the memset function. */ #undef HAVE_MEMSET /* Define if you have the strncmp function. */ #undef HAVE_STRNCMP /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you have the m library (-lm). */ #undef HAVE_LIBM /* Define if you have cairo library */ #undef HAVE_CAIRO buici-clock-0.4.9.2/options.cxx0000644000000000000000000002474511613344743013177 0ustar /* options.cxx $Id: options.cxx,v 1.4 1998/10/14 00:40:07 elf Exp $ written by Marc Singer 20 April 1996 This file is part of the project Buici. See the file README for more information. Copyright (C) 1996-1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. --------------------- ABBREVIATED CHANGELOG --------------------- Option parsing and value storage. Version 0.4 (13 October 1997) Allow long options to be prefixed by a single dash. This is for X-Windows compatibility. This entails some fancy footwork for option parsing and the addition of an option flag to permit recognition of long options when looking for short ones. Version 0.3 (14 November 1996) Permit option arguments to be prefixed by '='. Version 0.2 (14 May 1996) Long option names prefixed by a period are interpreted without a dash. This allows command parsing as well as option parsing. Version 0.1 Short and long options. Default and error option codes. Long option prefix matching. ----- NOTES ----- - We should detect ambiguous partials. We need to change fetch_option to return the error code and not the OPTION pointer. */ /* ----- Includes */ #include "standard.h" #include "options.h" #include #include #define USE_PARTIALS // Permit partial matches for long options //#define TEST_OPTIONS /* ----- Class Globals/Statics */ typedef enum { STATE_0 = 0, STATE_FOUND_DASH = 1, STATE_FOUND_DASHDASH = 2, } STATE_PARSE; typedef enum { FETCH_DEFAULT = 0, FETCH_SHORT = 1, FETCH_LONG = 2, FETCH_COMMAND = 3, } FETCH_MODE; static int eval_option (char* pch, int cch, char* pchArgument, OPTION* pOptions); static OPTION* fetch_option (char* pch, FETCH_MODE mode, OPTION* rgOptions); int fetch_argument (OPTION* pOption, char* pch, int argc, char** argv, char** ppchArgument); /* ----- Methods */ char* parse_application (char* pch) { char* pchSep = rindex (pch, '\\'); char* pchSepAlt = rindex (pch, '/'); char* pchColon = rindex (pch, ':'); char* pchDot = rindex (pch, '.'); if (pchSepAlt > pchSep) pchSep = pchSepAlt; if (pchColon > pchSep) pchSep = pchColon; pch = pchSep ? pchSep + 1 : pch; // This line code, while OK on Windows, may cause the process name // to disappear from the process list. // if (pchDot && strcasecmp (pch, ".exe")) // *pchDot = 0; return pch; } /* parse_applications */ /* parse_options accepts the argument vector for the application and an option description array and parses the command line arguments. The return value is zero if the parse succeeds or non-zero if there was an error. */ int parse_options (int argc, char** argv, OPTION* rgOptions, int* pargc_used) { int argc_used; if (!pargc_used) pargc_used = &argc_used; *pargc_used = 0; int result = 0; int state = STATE_0; for (; argc; --argc, ++argv, ++*pargc_used) { char* pch; for (pch = *argv; *pch; ++pch) { OPTION* pOption; char* pchArgument = NULL; int cch; // General purpose length storage switch (state) { case STATE_0: if (*pch == '-') { state = STATE_FOUND_DASH; continue; } /* if */ if ((pOption = fetch_option (pch, FETCH_COMMAND, rgOptions))) { if ((result = eval_option (pch, strlen (pch), NULL, pOption))) return result; } /* if */ else if ((pOption = fetch_option (NULL, FETCH_DEFAULT, rgOptions))) { if ((result = eval_option (NULL, 0, pch, pOption))) return result; } /* else-if */ else return OptErrOk; pch += strlen (pch) - 1; break; case STATE_FOUND_DASH: if (*pch == '-') { state = STATE_FOUND_DASHDASH; continue; } /* if */ pOption = fetch_option (pch, FETCH_SHORT, rgOptions); if (!pOption) return OptErrUnrecognized; if (result = fetch_argument (pOption, pch, argc, argv, &pchArgument)) return result; cch = (pOption->sz && pOption->sz[1] ? strlen (pch) : 1); if ((result = eval_option (pch, cch, pchArgument, pOption))) return result; if (pchArgument) { if (argc && argv[1] == pchArgument) { --argc; ++argv; ++*pargc_used; } else cch = strlen (pch); state = STATE_0; } pch += cch - 1; break; case STATE_FOUND_DASHDASH: pOption = fetch_option (pch, FETCH_LONG, rgOptions); if (!pOption) return OptErrUnrecognized; if (result = fetch_argument (pOption, pch, argc, argv, &pchArgument)) return result; cch = (pOption->sz && pOption->sz[1] ? strlen (pch) : 1); if ((result = eval_option (pch, cch, pchArgument, pOption))) return result; if (pchArgument && (argc && argv[1] == pchArgument)) { --argc; ++argv; ++*pargc_used; } pch += cch - 1; state = STATE_0; break; } /* switch */ } /* for */ } /* for */ return OptErrOk; } /* parse_options */ /* fetch_argument handle the complexity of argument fetching. It accepts the parsed option and the argument pointers, argc and argv, and returns a pointer to the argument, if there is one. */ int fetch_argument (OPTION* pOption, char* pch, int argc, char** argv, char** ppchArgument) { *ppchArgument = NULL; if (!(pOption->flags & OptArg)) return OptErrOk; if (!(pOption->sz && pOption->sz[0] && pOption->sz[1])) { if (pch[1]) { *ppchArgument = pch + 1; if (**ppchArgument == '=') ++*ppchArgument; } else if (argc > 1) *ppchArgument = argv[1]; } else { int cch = strcspn (pch, "="); if (pch[cch] == '=') { *ppchArgument = pch + cch + 1; pch[cch] = 0; // Important for OptDefault? Not really. } else if (argc > 1) *ppchArgument = argv[1]; } if (!*ppchArgument || !**ppchArgument) return OptErrNoArgument; return OptErrOk; } /* fetch_option accepts a pointer into a word within the command line, usually after either a single or double dash, and a mode specifier that determines which types of options it can match. It then tries to match that option string in the option data. Long options and command options will match partials if the USE_PARTIALS macro is defined. */ OPTION* fetch_option (char* pch, FETCH_MODE mode, OPTION* rgOptions) { // int cch = ((mode == FETCH_SHORT) ? 1 : (pch ? strlen (pch) : 0)); int cch = pch ? strlen (pch) : 0; if (cch) { int cchOption = strcspn (pch, "="); if (cchOption < cch) cch = cchOption; } OPTION* pOptionDefault = NULL; OPTION* pOptionPartial = NULL; for (OPTION* pOption = rgOptions; pOption && pOption->sz; ++pOption) { if ( (pOption->flags & OptDefault) && !pOptionDefault) pOptionDefault = pOption; if (!pch) { if (pOption->flags & OptNonoption) return pOption; continue; } /* if */ if (*pOption->sz != *pch) continue; bool fLongOption = pOption->sz && pOption->sz[0] && pOption->sz[1]; if ( (mode == FETCH_COMMAND && !(pOption->flags & OptCommand)) || (mode != FETCH_COMMAND && (pOption->flags & OptCommand))) continue; if (mode == FETCH_SHORT) { if (!fLongOption) return pOption; if (!(pOption->flags & OptAllDash)) continue; } if (strncmp (pch, pOption->sz, cch)) continue; if (!pOption->sz[cch]) return pOption; if (mode == FETCH_SHORT && fLongOption) // No partials for OptAllDash continue; #if defined USE_PARTIALS pOptionPartial = pOptionPartial ? (OPTION*) -1 : pOption; #endif } /* for */ return (pOptionPartial && pOptionPartial != (OPTION*) -1) ? pOptionPartial : pOptionDefault; } /* fetch_option */ /* eval_option accepts a pointer to the user's option string, a pointer to the option argument, and the fetched option pointer. */ int eval_option (char* pch, int cch, char* pchArgument, OPTION* pOption) { if (pOption->pfn) { char sz[2]; if (pOption->flags & OptDefault) { if (cch == 1) { sz[0] = *pch; sz[1] = 0; pchArgument = sz; } /* if */ else pchArgument = pch; } /* if */ return pOption->pfn (pOption, pchArgument) ? OptErrFail : OptErrOk; } /* if */ if (pOption->flags & OptDefault) { printf ("Unrecognized option '%.*s'\n", cch, pch); return OptErrUnrecognized; } if (pOption->flags & OptNonoption) return OptErrExit; if ((pOption->flags & OptSetMask) && pOption->pv) { long value = 1; if (pchArgument && !(pOption->flags & OptSetString)) value = strtol (pchArgument, NULL, 0); else if (pOption->flags & OptClear) value = 0; switch (pOption->flags & OptSetType) { default: return OptErrBadOption; case OptSetInt: *(int*) pOption->pv = int (value); break; case OptSetShort: *(short*) pOption->pv = short (value); break; case OptSetLong: *(long*) pOption->pv = long (value); break; case OptSetString: *(char**) pOption->pv = pchArgument; break; } /* switch */ return OptErrOk; } /* if */ return OptErrBadOption; } /* eval_option */ #if defined (TEST_OPTIONS) char* g_szOptS; int do_a (OPTION*, char*) { printf ("option a\n"); return 0; } int do_unrecognized (OPTION*, char* sz) { printf ("unrecognized option '%s'\n", sz); } OPTION rgOptions[] = { { "s", OptArg | OptSetString, &g_szOptS }, { "string", OptArg | OptSetString, &g_szOptS }, { "geom", OptArg | OptSetString | OptAllDash, &g_szOptS }, { "garage", OptArg | OptSetString | OptAllDash, &g_szOptS }, { "a", 0, NULL, do_a }, { "", OptDefault, NULL, do_unrecognized }, { NULL }, }; int main (int argc, char** argv) { int argc_used; int result = parse_options (argc - 1, argv + 1, rgOptions, &argc_used); if (g_szOptS) printf ("option s '%s'\n", g_szOptS); printf ("result %d argc_used %d\n", result, argc_used); return 0; } #endif buici-clock-0.4.9.2/.gdbinit0000644000000000000000000000007011613344743012362 0ustar file ./buici-clock set args --geometry =200x200+824+568 buici-clock-0.4.9.2/acconfig.h0000644000000000000000000000010311613344743012660 0ustar /* Define to `long' if doesn't define. */ #undef time_t buici-clock-0.4.9.2/standard.h0000644000000000000000000000365511613344743012726 0ustar /* standard.h -*- C++ -*- $Id: standard.h,v 1.3 1998/10/15 07:18:04 elf Exp $ written by Marc Singer 3 April 1997 This file is part of the project DeltaCine. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. --- Introduction Standard header for project. */ #ifndef __STANDARD_H__ #define __STANDARD_H__ // ----- Inclusions #include "config.h" // autoconf configuration header #if defined (HAVE_UNISTD_H) # include #endif #if defined (STDC_HEADERS) # include # include #endif #include "assert.h" //#include "dmalloc.h" #include "options.h" // ----- Constants // ----- Typedefs typedef signed char int8; typedef unsigned char unsigned8; typedef short int16; typedef unsigned short unsigned16; typedef signed long int32; typedef signed long long int64; typedef unsigned long unsigned32; typedef unsigned long long unsigned64; // ----- Classes // ----- Macros #define _memmove(d,s,c,i) { fprintf (stdout,"<%d", i); fflush (stdout); \ memmove ((d),(s),(c)); \ fprintf (stdout,">"); fflush (stdout); } // ----- Globals / Externals extern const char* g_szRelease; // ----- Prototypes // ----- Inline #endif // __STANDARD_H__ buici-clock-0.4.9.2/.version_minor0000644000000000000000000000000211613344743013626 0ustar 4 buici-clock-0.4.9.2/.version_patch0000644000000000000000000000000211613344743013601 0ustar 9 buici-clock-0.4.9.2/info.sh0000755000000000000000000000074611613344743012245 0ustar #!/bin/sh echo "Informational dump for Buici" echo '$Id: info.sh,v 1.2 1997/10/23 02:30:35 elf Exp $' echo "Please send this data to elf@netcom.com if you are having problems." echo "Report from " ` whoami` on `hostname` of `domainname` on `date` uname -a gcc --version nm --version if [ -f o/buici ] ; then strings o/buici | grep libc ; else echo "no binary in o/buici" ; fi ls -l /lib/libc.so* xdpyinfo -display ${DISPLAY} -queryExtensions xprop -display ${DISPLAY} -root xrdb -query buici-clock-0.4.9.2/signal.h0000644000000000000000000000427611613344743012403 0ustar /* signal.h -*- C++ -*- $Id: signal.h,v 1.1 1997/10/12 19:57:37 elf Exp $ written by Marc Singer 19 Oct 1996 This file is part of the project CurVeS. See the file README for more information. Copyright (C) 1996 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #if !defined (__SIGNAL_H__) # define __SIGNAL_H__ /* ----- Includes */ #include /* ----- Globals */ typedef void* LSignalHandle; // Encapsulated signal handle typedef void (*LSignalHandler) (LSignalHandle, void*); // Encapsulated signal handler typedef struct _LSignalHandlerInstance { struct _LSignalHandlerInstance* pNext; // Link pointer (must be first) LSignalHandler pfn; // Caller's function pointer void* pv; // Caller's context pointer int rank; // Handler's rank among like handlers int flags; // Some flags, if we need them } LSignalHandlerInstance; class LSignal { protected: static LSignalHandlerInstance* g_rgpHandler[NSIG]; static struct sigaction g_rgAction[NSIG]; static sigset_t g_setEnable; // Set when our handler is enabled static void handler (int signal); // Reentrant, OS signal handler static void disable (int signal); static void enable (int signal); static void block (int signal); static void unblock (int signal); public: static int accept (int signal, LSignalHandler pfn, void* pv, int rank, int flags); static int release (int signal, LSignalHandler pfn, void* pv); static int signal_of (LSignalHandle handle); }; #endif /* __SIGNAL_H__ */ buici-clock-0.4.9.2/README0000644000000000000000000000755211613344743011635 0ustar ================== Buici-Clock README $Id: README,v 1.8 2001/10/31 04:55:54 elf Exp $ ================== version <> of <> by Marc Singer, elf@netcom.com 30 October 2001 (date of last revision) This document explains how to compile and configure the Buici clock. It also contains the release notes. 1. Introduction I would have used another clock if I could find one. I found none. The best available was swissclock-0.6, but it fails to draw a round face on my X servers. This release is somewhat limited. It keeps time and has an attractive face that displays almost correctly. There will be a couple of updates to add configurability and a date feature. 1.1. Copyright The Buici Clock program is Copyright (C) 1997 by Marc Singer. It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. 1.2 The most current release of the Buici-Clock This packages is included in the Debian releases. If your system has access to the Debian archives, the following command will install the latest version. apt-get install buici-clock Otherwise, it is available from the source. 1.4 Feedback and Bug Reports Bug reports may be sent to the author at . There is a plan to incorporate some form of automatic bug report generation within the application, but until that is available e-mail is likely to produce the best response. 1.5 Disclaimer 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. 2.0 Building the Buici-Clock from Source After unpacking the source archive, you will have a version numbered directory buici-clock-X.Y.Z. In this directory is an autoconfig script. This, building the program requires two steps. configure This script will evaluate your system and configure the directory for building. make This command will compile the application and put a link to it in the source directory. The program is called buici-clock. 3.0 Using the Buici-Clock This version accepts only one standard X toolkit option, -geometry. The most straighforward way to start the clock is to run a command such as this: ./buici-clock -geometry =100x100-4-4 3.1 Borderless Clock There is a command line option to suppress the window manager's ornaments. ./buici-clock --no-ornaments 4.0 Release Notes It has been a long time since the first release of this program. I believe there are some lingering problems, but none have been reported. If you experience problems, I appreciate an e-mail to elf@buici.com with a description of the problem and the output of the shell script info.sh. 4.1 Timezones The computation I use to display the time is incompatible with conventional C library calls that convert the system clock time to local time. The result is an algorithm that I believe is correct, but I cannot verify in all time zones. If anyone's buici clock fails to report the same time as the system "date" command please let me know. 4.2 X Server Resources There have been reports of crashes on some GNU/Linux machines, the same platform on which I develop. One person tracked the trouble to the ResourceManager database. This release includes a work-around, but I want to discover the cause of this anomoly. The configure script will test for what-I-believe-is-the-problem. If it displays a message about a suspicious X server, please send me the output of the info.sh Bourne shell script buici-clock-0.4.9.2/NOTES0000644000000000000000000000672111613344743011565 0ustar =========== Buici NOTES $Id: NOTES,v 1.3 1997/10/15 22:33:28 elf Exp $ =========== by Marc Singer, elf@netcom.com 12 October 1997 (date of last revision) Why write another clock program? Have you looked at the published ones? At the time I started on this track, the best one I found doesn't draw a round face. A clock must 1) Draw a correct representation of the clock face 2) Support configurable clock face elements 3) Respond to some sort of mousing request to display today's date Nothing came close, so I wrote Buici. The rest of this document describes some of the interesting design issues and notes about enhancements. - Fetching the current time I'm using gettimeofday () which returns the seconds since midnight, January 1, 1970, do the timezone and daylight savings corrections, and use this number of seconds to position the clock hands. I need to figure out how to do daylight savings corrections for non-US zones. I could use another call that already does the conversion, but this may add some calculation that I can omit if I do the math myself. - Rendering timer We set an interval timer to interrupt us every 100ms, or so. At this point we fetch the current value for seconds and decide if the time has changed. If so we draw into the m_pixmap and copy it to the screen. - Exposure Since we draw to the screen when the timer alarm fires we need to be concerned about race conditions. The simple solution is to set a flag when we receive an exposure and check this when we next receive a timer alarm. Thus, we draw the clock face when it changes or when we are exposed. - SIN COS and correct face representation The rendering routine uses floating point math to locate the positions of the clock face elements. I spent a few hours trying to make everything look good, but found that the hands were not always pointing straight at the hour marks. All of the default hands are longer than face radius, extending away from the mark that the hand indicates. For some reason not yet understood, the angle of this short line segment is not the same as the segment extending toward the mark. We solved the display problem by drawing lines that cross the face center in two pieces. - Efficiency There is something very inefficient about the drawing. For some reason the NCD pauses a lot when we use the Buici clock. I'm thinking we either need to batch the strokes, use more backing storage for the fixed face elements, or check that we are updating only once a second. * This has been resolved. On the NCD, the problem appears to be drawing. Batching the line segments into a fewer number of requests did not affect the clock performance. Using a backing pixmap for the clock marks does help. We note that this requires that the server has memory for the backing pixmap. Should the clock be very large, the backing pixmap may be excessively large. * We need to evaluate the drawing performance of other servers. It may be OK to fallback to drawing marks every second because more contemporary servers are more efficient. * An alternative solution to the size of the backing store is to use color mapped bitmaps for marks and BLT them by color instead of using XCopyArea. As long as we have fewer than depth layers, the extra work may be justified. buici-clock-0.4.9.2/.version_major0000644000000000000000000000000211613344743013612 0ustar 0 buici-clock-0.4.9.2/Makefile.in0000644000000000000000000002123711613344743013016 0ustar # -*- Makefile -*- # Makefile.in # $Id: Makefile.in,v 1.32 2006/01/18 03:41:01 elf Exp $ # # written by Marc Singer # 11 October 1997 # # This file is part of the project Buici. See the file README for # more information. # # Copyright (C) 1997 Marc Singer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # in a file called COPYING along with this program; if not, write to # the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA # 02139, USA. # # .PHONY: install clean all version revision patch # # --- Project specification # TARGET=buici-clock PACKAGE=buici-clock O_D=o/ SRC= \ main.cxx options.cxx version.cxx \ clock.cxx signal.cxx draw.cc # system.cxx video.cxx timebase.cxx renderx.cxx # lfile.cxx lstream.cxx lring.cxx lthread.cxx thread.s # report.cxx stats.cxx # dct.cxx OBJ:=$(SRC) OBJ:=$(OBJ:.c=.o) OBJ:=$(OBJ:.cxx=.o) OBJ:=$(OBJ:.cc=.o) OBJ:=$(OBJ:.s=.o) VERSION_HEADER=version.h RELEASE_PATH=${HOME}/release XO_PATH=@XO_PATH@ CC=@CXX@ CFLAGS_I=-I${XO_PATH} `pkg-config --cflags cairo` CXXFLAGS=@CXXFLAGS@ #CXXFLAGS=$(CXXFLAGS) -O #CXXFLAGS=$(CXXFLAGS) -O2 #CXXFLAGS=$(CXXFLAGS) -fomit-frame-pointer #CXXFLAGS=$(CXXFLAGS) -pg CXXFLAGS_=-g $(CFLAGS_I)@CFLAGS_W@@X_CFLAGS@ LFLAGS=-g @LDFLAGS@@X_LIBS@ -L${XO_PATH} @LIBS@ -lxo -lX11 -lXext@X_EXTRA_LIBS@ `pkg-config --libs cairo` #LFLAGS=-pg ${LFLAGS} DEPEND=depend.m ECHO=@/bin/echo INSTALL=@INSTALL@ INSTALL_PROGRAM=@INSTALL_PROGRAM@ INSTALL_DATA=@INSTALL_DATA@ # # --- Autoconf generated symbols # srcdir = @srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ docdir = $(prefix)/share/doc/$(PACKAGE) infodir = @infodir@ mandir = $(prefix)/share/man # This is removed because it generates a line in the Makefile.in that # breaks the use of 'make -f Makefile.in distclean' from # debian/rules. We do call make on subdirectories, so this may be a # problem. # @SET_MAKE@ # # --- Implicit rules # vpath %.o $(O_D) %.o: %.cc $(make_o) $(ECHO) $(CC) -c $(CXXFLAGS) -o $(O_D)$@ $< @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $(O_D)$@ $< %.o: %.cxx $(make_o) $(ECHO) $(CC) -c $(CXXFLAGS) -o $(O_D)$@ $< @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $(O_D)$@ $< $(O_D)%.o: %.cxx $(make_o) $(ECHO) $(CC) -c $(CXXFLAGS) -o $@ $< @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $@ $< $(O_D)%.o: %.cc $(make_o) $(ECHO) $(CC) -c $(CXXFLAGS) -o $@ $< @$(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -o $@ $< %.o: %.s $(make_o) $(ECHO) $(AS) $(AFLAGS) -o $(O_D)$@ $< @$(AS) $(AFLAGS) $(AFLAGS_) -o $(O_D)$@ $< $(O_D)%.o: %.s $(make_o) $(ECHO) $(AS) $(AFLAGS) -o $@ $< @$(AS) $(AFLAGS) $(AFLAGS_) -o $@ $< %.i: %.cxx $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -E -o $(notdir $@) $< %.s: %.cxx $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $< %.i: %.cc $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -E -o $(notdir $@) $< %.s: %.cc $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $< %.s: %.c $(CC) -c $(CXXFLAGS) $(CXXFLAGS_) -S -o $@ $< # # --- Primary targets # all: check_depend make_o _version.h xolib $(O_D)$(TARGET) $(TARGET) $(PACKAGE).README .PHONY: make_o make_o: @if test ! -e $(O_D) ;\ then echo === Creating \'$(O_D)\' output directory ; mkdir $(O_D) ; fi xolib: @if test ! "${XO_PATH}" = "../xo" ; \ then (cd ${XO_PATH} ; [ ! -f config.log ] || ./configure ; $(MAKE) all) ; fi $(O_D)$(TARGET): $(OBJ) $(XO_PATH)/libxo.a $(CC) -o $@ $(addprefix $(O_D),$(OBJ)) $(LFLAGS) $(TARGET): $(O_D)$(TARGET) @echo -- Linking $(TARGET) to $(O_D)$(TARGET) @ln -s $(O_D)$(TARGET) . #install: # cp $(TARGET).exe c:/usr/local clean: ifneq "$(O_D)" "" -rm -rf $(O_D) else -rm $(OBJ) endif -rm *.i @if test ! "${XO_PATH}" = "../xo" ; \ then $(MAKE) -C ${XO_PATH} clean ; fi .PHONY: debclean debclean: distclean .PHONY: distclean dist_clean distclean dist_clean: clean -rm -f \#* *~ *.sed *.i *.cod -rm -f config.cache config.status config.log -chmod +w Makefile config.h -rm Makefile config.h $(DEPEND) -rm _version.h .version # -rm build @if test ! "${XO_PATH}" = "../xo" ; \ then $(MAKE) -C ${XO_PATH} distclean ; fi # # --- Version and Build Engineering # .version: .version_major .version_minor .version_patch @/bin/echo -n `cat .version_major`.`cat .version_minor`.`cat \ .version_patch` > .version _version.h: .version @/bin/echo -e \#define SZ_VERSION \"`cat .version`\" > _version.h .PHONY: transmit transmit: # distribution-archive @/bin/sh -c "cd .. ;\ distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.tar.gz" @distftp.sh ${PACKAGE} ANNOUNCEMENT @distftp.sh ${PACKAGE} README @distftp.sh ${PACKAGE} ${PACKAGE}-`cat .version`.lsm version.sed: _version.h @echo Creating version-specific sed script... @/bin/echo s/\<\\>/`cat .version`/ > version.sed @/bin/echo s/\<\\>/`date +"%d %B %Y"`/ >> version.sed @/bin/echo s/\<\\>/${PACKAGE}-`cat .version`.tar.gz/ \ >> version.sed @/bin/echo s/\<\\>/${PACKAGE}-`cat .version`.lsm/ >> version.sed .PHONY: ${PACKAGE}.lsm ${PACKAGE}.lsm: version.sed LSM @echo Creating LSM file... @if test -f *.lsm ; then rm *.lsm ; fi @sed -f version.sed LSM > ${PACKAGE}-`cat .version`.lsm .PHONY: ${PACKAGE}.ANNOUNCEMENT ${PACKAGE}.ANNOUNCEMENT: version.sed ANNOUNCEMENT @echo Creating ANNOUNCEMENT file... @if test -f *.ANNOUNCEMENT ; then rm *.ANNOUNCEMENT ; fi @sed -f version.sed ANNOUNCEMENT \ > ${PACKAGE}-`cat .version`.ANNOUNCEMENT @cat ${PACKAGE}-`cat .version`.lsm \ >> ${PACKAGE}-`cat .version`.ANNOUNCEMENT .PHONY: ${PACKAGE}.README ${PACKAGE}.README: version.sed README @echo Creating README file... @if test -f *.README ; then rm *.README ; fi @sed -f version.sed README > ${PACKAGE}-`cat .version`.README .PHONY: distribution-archive da distribution-archive da: ${PACKAGE}.lsm ${PACKAGE}.ANNOUNCEMENT ${PACKAGE}.README dist_clean @echo Creating distribution archive... @/bin/sh -c "if test -x ../${PACKAGE}-`cat .version`;\ then rm ../${PACKAGE}-`cat .version` ; fi" @ln -s ${PACKAGE} ../${PACKAGE}-`cat .version` @find . -path CVS -prune\ -o -path o -prune\ -o -regex .\*/${PACKAGE} -prune\ -o -regex .\*/configure -prune\ -o -regex .\*/config.status -prune\ -o -regex .\*\.o -prune\ -o -type f -exec chmod 644 \{\} \; @/bin/sh -c 'cd .. ; V=`cat ${PACKAGE}/.version` ;\ tar zcf ${PACKAGE}-$$V.tar.gz\ `find ${PACKAGE}-$$V/\ -regex .\*/CVS -prune\ -o -regex .\*~ -prune\ -o -regex .\*/o -prune\ -o -regex .\*\\\\.o -prune\ -o -regex .\*\\\\.a -prune\ -o -regex .\*\\\\.m -prune\ -o -regex .\*\\\\.bmp -prune\ -o -regex .\*/${PACKAGE} -prune\ -o -regex .\*/Makefile -prune\ -o -regex .\*/config.cache -prune\ -o -regex .\*/config.h -prune\ -o -regex .\*/config.log -prune\ -o -regex .\*/config.status -prune\ -o -regex .\*/configure.scan -prune\ -o -regex .\*/log -prune\ -o -regex .\*/gmon.out -prune\ -o -regex .\*/\.cvsignore -prune\ -o -regex .\*/\.gdbinit -prune\ -o -regex .\*/NOTES -prune\ -o -regex .\*/patches -prune\ -o -regex .\*/buici-.\* -prune\ -o -type f -print | sort`' @-rm ../${PACKAGE}-`cat .version` @echo Moving distribution file to ${RELEASE_PATH}... @mv ../${PACKAGE}-`cat .version`.tar.gz ${RELEASE_PATH} @mv ${PACKAGE}-`cat .version`.* ${RELEASE_PATH} # # --- Installation # .PHONY: install installdirs install: installdirs $(TARGET) # hello.info $(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(bindir)/$(binprefix) # strip $(bindir)/$(binprefix)/$(TARGET) # -$(INSTALL_DATA) options $(docdir) $(INSTALL_DATA) $(TARGET).1 $(DESTDIR)$(mandir)/man1 # $(INSTALL_DATA) curves.5 $(mandir)/man5 $(INSTALL_DATA) ${PACKAGE}-`cat .version`.README $(DESTDIR)$(docdir)/README installdirs: $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(docdir) #$(docdir) #$(mandir)/man5 #$(infodir) # # --- Dependencies: depend.m # .PHONY: depend check_depend # *** removed _version.h to prevent forced dependency build depend: $(DEPEND) # _version.h $(DEPEND) depend: # _version.h $(SRC) $(CC) $(CFLAGS_I) -M $(SRC) > $(DEPEND) check_depend: @if test ! -s ${DEPEND} ; then \ echo "-- Use 'make depend' to create dependencies file." \ " Continuing without it." ; fi # # --- Include dependencies always. Configure creates an empty file # ifneq "$(wildcard depend.m)" "" include ${DEPEND} endif buici-clock-0.4.9.2/support.sh0000755000000000000000000000136711613344743013026 0ustar #!/bin/sh echo "Build dump for Buici" echo '$Id: support.sh,v 1.3 1998/10/26 19:03:44 elf Exp $' echo "Please send this data to elf@debian.org if you are having problems." echo "You can use a command link this to do it:" echo ' sh support.sh | mail -s "Support Log" elf@debian.org' echo '============================================' echo "Report from " ` whoami` on `hostname` of `domainname` on `date` uname -a gcc --version nm --version ./configure echo '============================================' cat config.log echo '============================================' make echo '============================================' cat config.h echo '============================================' cat Makefile echo '============================================' buici-clock-0.4.9.2/configure0000755000000000000000000051604311613344743012664 0ustar #! /bin/sh # From configure.in Id: configure.in,v 1.16 2001/03/31 21:18:12 elf Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # 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" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi 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 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } 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 if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset 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 ac_config_libobj_dir=. 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="buici.xbm" # 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" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT LN_S SET_MAKE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CXXCPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS EGREP XO_PATH CFLAGS_W LIBOBJS LTLIBOBJS' ac_subst_files='' # 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 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } 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_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_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_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP # # 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 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 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: CXX C++ compiler command CXXFLAGS 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 CXXCPP 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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac 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 (C) 2003 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.59. 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. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: 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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f 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_config_headers="$ac_config_headers config.h" 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 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); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5 echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 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= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].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, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C++ compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C++ compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext 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'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check 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 conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) 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 See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (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 | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err 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 \ '' \ '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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err 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=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 echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set 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 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" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $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' if test "${GXX}" = "yes" ; then CFLAGS_W=" -Wall -Wno-parentheses -Wno-unused" CFLAGS="${CFLAGS}" fi echo "$as_me:$LINENO: checking \"for XO class library\"" >&5 echo $ECHO_N "checking \"for XO class library\"... $ECHO_C" >&6 XO_PATH=`echo xo-*` if test "${XO_PATH}" = "" -o ! -d ${XO_PATH} ; then eval XO_PATH=xo ; fi if test "${XO_PATH}" = "" -o ! -d ${XO_PATH} ; then eval XO_PATH=xo ; fi if test "${XO_PATH}" = "" -o ! -d ${XO_PATH} ; then eval XO_PATH=../xo ; fi if test ! -d ${XO_PATH} ; then { { echo "$as_me:$LINENO: error: Unable to find xo library" >&5 echo "$as_me: error: Unable to find xo library" >&2;} { (exit 1); exit 1; }; } ; fi echo "$as_me:$LINENO: result: ${XO_PATH}" >&5 echo "${ECHO_T}${XO_PATH}" >&6 echo "$as_me:$LINENO: checking for cos in -lm" >&5 echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6 if test "${ac_cv_lib_m_cos+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any 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 cos (); int main () { cos (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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_m_cos=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_m_cos=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5 echo "${ECHO_T}$ac_cv_lib_m_cos" >&6 if test $ac_cv_lib_m_cos = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi 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 echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=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 "x$ac_path_x_has_been_run" != xyes; then echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6 ac_path_x_has_been_run=yes # 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 a specified header file. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' 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/libX11.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest.err 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" # It might be that x_includes is empty (headers are found in the # standard search path. Then output the corresponding message ac_out_x_includes=$x_includes test "x$x_includes" = x && ac_out_x_includes="in standard search path" echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6 fi 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_nospace=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_R_space=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_dnet_ntoa=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f conftest.err 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.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define gethostbyname to an innocuous variant, in case declares gethostbyname. For example, HP-UX 11i declares gettimeofday. */ #define gethostbyname innocuous_gethostbyname /* System header to define __stub macros and hopefully few prototypes, which can conflict with char gethostbyname (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef gethostbyname /* 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 (); /* 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 char (*f) () = gethostbyname; #endif #ifdef __cplusplus } #endif int main () { return f != 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_gethostbyname=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nsl_gethostbyname=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_bsd_gethostbyname=no fi rm -f conftest.err 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 name server (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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define connect to an innocuous variant, in case declares connect. For example, HP-UX 11i declares gettimeofday. */ #define connect innocuous_connect /* System header to define __stub macros and hopefully few prototypes, which can conflict with char connect (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef connect /* 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 (); /* 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 char (*f) () = connect; #endif #ifdef __cplusplus } #endif int main () { return f != 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_connect=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_socket_connect=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define remove to an innocuous variant, in case declares remove. For example, HP-UX 11i declares gettimeofday. */ #define remove innocuous_remove /* System header to define __stub macros and hopefully few prototypes, which can conflict with char remove (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef remove /* 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 (); /* 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 char (*f) () = remove; #endif #ifdef __cplusplus } #endif int main () { return f != 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_remove=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_posix_remove=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shmat to an innocuous variant, in case declares shmat. For example, HP-UX 11i declares gettimeofday. */ #define shmat innocuous_shmat /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shmat (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shmat /* 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 (); /* 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 char (*f) () = shmat; #endif #ifdef __cplusplus } #endif int main () { return f != 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shmat=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ipc_shmat=no fi rm -f conftest.err 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end 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 (); 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f conftest.err 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 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #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 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_func in memset strncmp 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any 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 (); /* 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 char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err 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 # 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err 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 unistd.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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_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 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------------ ## ## Report this to the AC_PACKAGE_NAME lists. ## ## ------------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if 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 for time_t" >&5 echo $ECHO_N "checking for time_t... $ECHO_C" >&6 if test "${ac_cv_type_time_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((time_t *) 0) return 0; if (sizeof (time_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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_time_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_time_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 echo "${ECHO_T}$ac_cv_type_time_t" >&6 if test $ac_cv_type_time_t = yes; then : else cat >>confdefs.h <<_ACEOF #define time_t long _ACEOF fi 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 /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include 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>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f conftest.err 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 echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6 if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_cv_struct_tm> int main () { static struct tm ac_aggr; if (ac_aggr.tm_zone) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_cv_struct_tm> int main () { static struct tm ac_aggr; if (sizeof ac_aggr.tm_zone) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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_member_struct_tm_tm_zone=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_tm_tm_zone=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6 if test $ac_cv_member_struct_tm_tm_zone = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 _ACEOF fi if test "$ac_cv_member_struct_tm_tm_zone" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TM_ZONE 1 _ACEOF else echo "$as_me:$LINENO: checking for tzname" >&5 echo $ECHO_N "checking for tzname... $ECHO_C" >&6 if test "${ac_cv_var_tzname+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif int main () { atoi(*tzname); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (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); }; } && { 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_var_tzname=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_var_tzname=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 echo "${ECHO_T}$ac_cv_var_tzname" >&6 if test $ac_cv_var_tzname = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_TZNAME 1 _ACEOF fi fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, 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 diff $cache_file confcache >/dev/null 2>&1; 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 ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # 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" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi 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 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } 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 if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset 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.59. 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 -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 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[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --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 ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # 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 ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _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" ;; "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 fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # 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. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&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,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@LN_S@,$LN_S,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CXXCPP@,$CXXCPP,;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,@EGREP@,$EGREP,;t t s,@XO_PATH@,$XO_PATH,;t t s,@CFLAGS_W@,$CFLAGS_W,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;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'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } 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 # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac # 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; } 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 _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; }; } # Do quote $f, to prevent DOS paths from being IFS'd. 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 grep "^[ ]*#[ ]*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 # grep' >>$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 diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else 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'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } 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 { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi chmod -w Makefile chmod -w config.h if test ! -f depend.m ; then touch depend.m ; fi if test ! "${XO_PATH}" = "../xo" ; then if test ! -e ${XO_PATH}/config.cache ; then cp config.cache ${XO_PATH} ; fi (cd ${XO_PATH} ; ./configure ) fi if test "${DISPLAY}" = "" ; then echo "-------------------------------------------------------------------" echo "I cannot make some configuration determinations because you are" echo "not currently running on an X Server. Buici will compile as is," echo "but certain display-specific errors can only be detected when" echo "configure is run in a window with access to the display. I" echo "encourage you to run configure again when the X display is active" echo "in order to complete the configuration tests." echo "-------------------------------------------------------------------" elif test \ "`xprop -display ${DISPLAY} -root | grep -l 'RESOURCE_MANAGER(STRING)'`"\ = "" ; then echo "-------------------------------------------------------------------" echo "Your X Server is not providing an expected property string used to" echo "store resources. Would you please consider sending the output of" echo "the info.sh script to me, the author, elf@netcom.com. It will help" echo "me understand why Buici doesn\'t work on some X Servers." echo "-------------------------------------------------------------------" else echo "-------------------------------------------------------------------" echo "Your X Server appears to operate as expected." echo "-------------------------------------------------------------------" fi echo echo "Run 'make' to build the application." echo buici-clock-0.4.9.2/patches/0000755000000000000000000000000011613344743012373 5ustar buici-clock-0.4.9.2/patches/patch.00000644000000000000000000000470411613344743013560 0ustar From julian@cesta.com Sun Oct 19 00:52:20 1997 Return-Path: Received: from gemini.cesta.com (gemini.cesta.com [206.127.255.218]) by mail3.netcom.com (8.8.5-r-beta/8.8.5/(NETCOM v1.01)) with ESMTP id AAA29311 for ; Sun, 19 Oct 1997 00:52:19 -0700 (PDT) Received: from localhost (julian@localhost) by gemini.cesta.com (8.8.5/8.8.5) with SMTP id VAA01485 for ; Sat, 18 Oct 1997 21:48:55 -1000 X-Authentication-Warning: gemini.cesta.com: julian owned process doing -bs Date: Sat, 18 Oct 1997 21:48:53 -1000 (HST) From: Julian Cowley Reply-To: Julian Cowley To: Marc Singer Subject: buici clock diffs Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: RO Hi Marc, Just tried your buici clock. Very nice! I have a couple of requests and a fix for a small bug. First, feature requests :) * option to leave out seconds hand * the -geometry option didn't seem to work right with regards to screen placement. I.e., using something like -geometry -0+0 still placed the clock in the upper-left hand corner. Now, a bug fix. I live in Hawaii, where we don't use daylight savings time (as opposed to most of the US). When I first tried the program, the clock was one hour ahead of local time. I tracked the error to gettimeofday() and the time zone data it reports. The zoneinfo library is better, as it handles exceptions such as Hawaii. A small note about the patch. localtime() sets two global variables, timezone and daylight. Originally, I used daylight to determine if daylight savings time is in effect, but it acts the same way as gettimeofday(). I solved this by using tm_isdst instead. ps. QOTD. What does Buici mean? --- clock..cxx.orig Fri Oct 17 18:20:27 1997 +++ clock.cxx Sat Oct 18 20:01:43 1997 @@ -373,13 +373,12 @@ { // -- Check time struct timeval tv; - struct timezone tz; + struct tm *tm; memset (&tv, 0, sizeof (tv)); - memset (&tz, 0, sizeof (tz)); - gettimeofday (&tv, &tz); - time_t seconds = tv.tv_sec - tz.tz_minuteswest*60; - if (tz.tz_dsttime == DST_USA) - seconds += 3600; + gettimeofday (&tv, 0); + time_t seconds = tv.tv_sec; + tm = localtime (&seconds); // -- Also sets timezone global variable + seconds = seconds - timezone + (tm->tm_isdst ? 3600 : 0); if (seconds == m_seconds) return false; m_seconds = seconds; buici-clock-0.4.9.2/main.cxx0000644000000000000000000000721011613344743012414 0ustar /* main.cxx $Id: main.cxx,v 1.5 2000/01/13 07:04:59 elf Exp $ written by Marc Singer 3 April 1997 This file is part of the project Buici. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- */ /* ----- Includes */ #include "standard.h" #include #include #include "version.h" #if !defined (O_BINARY) #define O_BINARY 0 #endif char* g_szApplication; // Name of application int do_unrecognized (OPTION*, const char*); int do_usage (OPTION*, const char*); int do_version (OPTION*, const char*); int do_clock (void); int g_fAsDesktop; int g_fAsToolbar; int g_fAsDock; int g_fOverrideRedirect; int g_showSecondHand = -1; // -1 means use the resource or default to true char* g_szGeometry; OPTION rgOptions[] = { { "geometry", OptArg | OptSetString | OptAllDash, &g_szGeometry }, { "as-dock", OptSetInt, &g_fAsDock }, { "as-desktop", OptSetInt, &g_fAsDesktop }, { "as-toolbar", OptSetInt, &g_fAsToolbar }, { "override-redirect", OptSetInt, &g_fOverrideRedirect }, { "show-second-hand", OptArg | OptSetInt, &g_showSecondHand }, { "help", 0, NULL, do_usage }, { "h", 0, NULL, do_usage }, { "version", 0, NULL, do_version }, { "V", 0, NULL, do_version }, { "", OptDefault, NULL, do_unrecognized }, { NULL }, }; /* ----- Methods */ int do_unrecognized (OPTION* /* pOption */, const char* pch) { printf ("%s: unrecognized option '%s'\n", g_szApplication, pch); printf ("Try '%s --help' for usage information.\n", g_szApplication); return 1; } /* do_unrecognized */ int do_usage (OPTION*, const char*) { printf ( "usage: %s [options]\n" " -geometry =WIDTHxHEIGHT+OFFSETX+OFFSETY\n" " Toolkit option to set size and position of window\n" " --as-desktop Set window type to DESKTOP via EWMH\n" " --as-toolbar Set window type to TOOLBAR via EWMH\n" " --as-dock Set window type to DOCK via EWMH\n" " --no-override Suppress window manager control by\n" " inhibiting override-redirect\n" " --show-second-hand=0|1 Hide or show the second hand. Overrides resource.\n" " --version, -V Display version and copyright\n" " --help, -h Usage message\n" /* " (*) Default option\n" */ , g_szApplication); return 1; } /* do_usage */ int do_version (OPTION*, const char*) { printf ("%s version %s -- %s\n", g_szApplication, g_szVersion, g_szCopyright); return 1; } /* do_version */ int main (int argc, char** argv) { g_szApplication = parse_application (*argv); int argc_used; int result = parse_options (argc - 1, argv + 1, rgOptions, &argc_used); if (result) { switch (result) { case 1: break; default: printf ("parse error %d at word %d\n", result, argc_used + 1); break; } /* switch */ return 1; } /* if */ do_clock (); return 0; } /* main */ buici-clock-0.4.9.2/clock.cxx0000644000000000000000000006557411613344743012604 0ustar /* clock.cxx $Id: clock.cxx,v 1.28 2001/10/31 04:55:54 elf Exp $ written by Marc Singer 3 April 1997 This file is part of the project Buici. See the file README for more information. Copyright (C) 1997 Marc Singer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License in a file called COPYING along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ----------- DESCRIPTION ----------- --------- Resources --------- buiciClock.showSecondHand: {true|false|yes|no|0|1} [true] Controls the display of the second hand. Disabling the second hand will not prevent an update every second. Such a feature requires a little more work to determine the position of the hands and re-render when these values change. */ /* ----- Includes */ #include "standard.h" #if defined (STDC_HEADERS) # include #endif #include #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #include "version.h" #include #include #include #include #include "ldisplay.h" #include "lwindow.h" #include "lres.h" #include "signal.h" // Our signal wrapper #include "buici.xbm" // Our name as a bitmap // FACE_BACKING uses a pixmap to construct the clock face before // sending the image to the display. It is the only method that // will show the Buici name on the clock. It is considered to be // the best. // BATCH_LINES sends the clock face markings to the server in one // protocol dispatch. This is done for efficiency and is probably the // most frugal use of bandwidth. It doesn't display the Buici name. // sends the face markings one at a time to the server. // Slow, and simple. #define USE_FACE_BACKING //#define USE_BATCH_LINES //#define USE_LOCAL_GC // Cache our own GC extern char* g_szApplication; // Name of application bool g_fQuit; extern int g_fAsDesktop; extern int g_fAsToolbar; extern int g_fAsDock; extern int g_fOverrideRedirect; extern int g_showSecondHand; int do_clock (void); void signal_alarm (LSignalHandle handle, void* pv); int x_after (Display*); time_t calc_delta (time_t); void draw_dial (Display* display, Visual* visual, Pixmap pixmap, int dx, int dy); void draw_hands (Display* display, Visual* visual, Pixmap pixmap, int dx, int dy, int seconds); void draw_dial_shape (Display* display, Pixmap pixmap, int dx, int dy); class WTopLevel : public LWindow { protected: // bool m_fSharedMemory; // XShmSegmentInfo m_shmInfo; Pixmap m_pixmap; // X drawable for rendering clock face #if defined (USE_FACE_BACKING) Pixmap m_pixmapFace; // X drawable for backing clock face #endif time_t m_seconds; // Last seconds value rendered bool m_fExpose; // Exposure event forces redraw int m_width; // Width we report int m_height; // Width we report unsigned32 m_pixelGray; // Gray pixel used for anti-aliasing #if defined (USE_LOCAL_GC) GC m_gc; // We cache our own GC to speed drawing #endif GC gc (void) { #if defined (USE_LOCAL_GC) if (m_gc) return m_gc; XGCValues xgcv; return m_gc = XCreateGC (xdisplay (), window (), 0, &xgcv); #else return display ()->gc (); #endif } public: bool m_fSecondHand; // true: display second hand WTopLevel (LDisplay* pDisplay) : LWindow (pDisplay) { zero (); } WTopLevel (LWindow* pWindow) : LWindow (pWindow) { zero (); } ~WTopLevel () { release_this (); } void release_this (void); void zero (void) { memset (((LWindow*) this) + 1, 0, sizeof (*this) - sizeof (LWindow)); } void allocate_colors (void); void buttondown (XButtonEvent* pEvent); int compute_segment (XSegment* pseg, double theta, float outside, float inside, float width); void draw (void); void expose (XExposeEvent* pEvent); bool is_expose (void) { return m_fExpose; } bool render (void); void render_buici (GC gc, Pixmap pixmap); void render_circle (GC gc, Pixmap pixmap, double theta, float offset, float diameter); void render_line (GC gc, Pixmap pixmap, double theta, float outside, float inside, float width); void setup_time (void); void shape (void); Pixmap get_pixmap (); #if defined (USE_FACE_BACKING) Pixmap get_pixmap_face (); #endif int line_width (double r) { int line_width = 1; if (r) line_width = int ((width () - 1.0 + height () - 1.0)/2.0*r); if (!line_width) line_width = 1; return line_width; } int width () { return m_width ? m_width : (m_width = ((LWindow::width () + 1)&~1) - 1); } int height () { return m_height ? m_height : (m_height = ((LWindow::height () + 1)&~1) - 1); } }; typedef enum { markLine = 1, markCircle = 2, } eMarkShape; typedef struct { int count; // Number of strokes, hands are zero int shape; // Shape of the mark float rInside; // Inside, outside, and stroke width as float rOutside; // fractions of the radius float rWidth; // Zero widths are one pixel int modSeconds; // Modulus for computing hand angle unsigned32 color; // Color (not presently implemented) unsigned32 pixel; // Pixel value returned by server } Mark; #define WIDTH_BORDER 0.05 #define WIDTH_BUICI 0.22 //#define THRESHOLD_BLACK 40 //#define THRESHOLD_GRAY 10 #define THRESHOLD_BLACK (40) #define THRESHOLD_GRAY (20) Mark g_rgMarks[] = { { 60, markLine, 0.82, 0.76, 0, 0, 0x000000 }, // Second marks { 12, markLine, 0.82, 0.62, 0.040, 0, 0x000000 }, // Hour marks { 0, markLine, 0.48, -0.12, 0.030, 43200, 0x000000 }, // Hour hand { 0, markLine, 0.70, -0.12, 0.030, 3600, 0x000000 }, // Minute hand { 0, markLine, 0.58, -0.2, 0, 60, 0xff0000 }, // Second hand { 0, markCircle, 0.58, 0.058, 0, 60, 0xff0000 }, // Second hand { -1 } }; EventMap g_rgEMTop[] = { { ButtonPress, (PFNEvent) &WTopLevel::buttondown }, { Expose, (PFNEvent) &WTopLevel::expose }, { 0, NULL }, }; /* ----- Methods */ /* calc_delta calculates/caches the timezone delta. It performs some caching checks to make sure it isn't calculated needlessly. It computes the delta when timeNow */ time_t calc_delta (time_t timeNow) { static time_t timeLastCalc; // Time delta was last computed static time_t timeDelta; // Last computed delta const int timeRecalc = 60*60; // Interval for recalc, aligned to 12:00:00am if (timeNow == 0) time (&timeNow); if (timeNow != timeLastCalc && ( timeNow - timeLastCalc > timeRecalc || (timeNow%timeRecalc) == 0)) { // fprintf (stderr, "recalc delta\n"); // -- Determine timezone correction struct tm tmGMT = *gmtime (&timeNow); struct tm tmLocal = *localtime (&timeNow); tmGMT.tm_isdst = 0; // We want the absolute difference tmLocal.tm_isdst = 0; timeDelta = mktime (&tmLocal) - mktime (&tmGMT); // fprintf (stderr, "deltaZone is %ld seconds or %d hours\n", // timeDelta, timeDelta/3600); timeLastCalc = timeNow; } return timeDelta; } int round_at (double r, double c, bool fInvert = false) { #if 1 if ((!fInvert && r < 0) || (fInvert && r > 0)) r -= 0.5; else r += 0.5; return int (r + c); #else return int (r + 0.5 + c); #endif } double round_up (double r) { if (r < 0) return double (int (r*1e8 - 5)/10)/1e7; else return double (int (r*1e8 + 5)/10)/1e7; } inline int point_on_circle (double v, int r) { if (v < 0) v -= 0.5; else v += 0.5; return int (v + r/2.0); } void exit_error (const char* sz, ...) { fprintf (stderr, "%s: ", g_szApplication); va_list ap; va_start (ap, sz); vfprintf (stderr, sz, ap); va_end (ap); fprintf (stderr, "\n"); exit (1); } int x_after (Display* /* pDisplay */) { static time_t timeStart; if (!timeStart) time (&timeStart); // fprintf (stderr, "protocol request %ld\n", time (NULL) - timeStart); return 0; } void WTopLevel::allocate_colors (void) { Colormap colormap = XDefaultColormap (xdisplay (), 0); XColor xcolor; memset (&xcolor, 0, sizeof (xcolor)); for (Mark* pMark = g_rgMarks; pMark->count != -1; ++pMark) { xcolor.red = (((pMark->color >> 16) & 0xff) << 8); xcolor.green = (((pMark->color >> 8) & 0xff) << 8); xcolor.blue = (((pMark->color >> 0) & 0xff) << 8); if (XAllocColor (xdisplay (), colormap, &xcolor)) pMark->pixel = xcolor.pixel; else pMark->pixel = XBlackPixel (xdisplay (), 0); } xcolor.red = xcolor.green = xcolor.blue = 0x8000; if (XAllocColor (xdisplay (), colormap, &xcolor)) m_pixelGray = xcolor.pixel; } void WTopLevel::buttondown (XButtonEvent* /* pEvent */) { // fprintf (stderr, "click\n"); // XUnmapWindow (pEvent->display, pEvent->window); // g_fQuit = true; } /* WTopLevel::compute_segment computes a line segment for clock marks or hands. It is a duplicate of the render_line code that writes the segment information to an array so that the segments may be submitted to the server in one command. The outside and inside parameters are real number representing the proportion of the outside and inside points of the line with respect to the radius of the clock face. A value of 0 is the center and a value of 1.0 is the outside edge of the face. The theta parameter a number from 0 to 1.0 that describes the angle of the line as a fraction of the circle. Zero is noon or midnight. 0.25 is three o'clock. This routine converts the number of radians for calculation--unless we choose to use a lookup table for angles. */ int WTopLevel::compute_segment (XSegment* pseg, double theta, float outside, float inside, float /*line_width_fraction */) { theta = M_PI_2 - theta*2.0*M_PI; double sin_t = -sin (theta); double cos_t = cos (theta); double rx = (width () - 0)/2.0; // radius along X axis double ry = (height () - 0)/2.0; // radius along Y axis if (outside*inside < 0) { pseg->x1 = round_at (outside*rx*cos_t, (width () + 1)/2.0); pseg->y1 = round_at (outside*ry*sin_t, (height () + 1)/2.0); pseg->x2 = (width () + 1)/2; pseg->y2 = (height () + 1)/2; pseg[1].x1 = pseg->x2; pseg[1].y1 = pseg->y2; ++pseg; pseg->x2 = round_at (inside*rx*cos_t, (width () + 1)/2.0, true); pseg->y2 = round_at (inside*ry*sin_t, (height () + 1)/2.0, true); return 2; } else { pseg->x1 = round_at (outside*rx*cos_t, (width () + 1)/2.0); pseg->y1 = round_at (outside*ry*sin_t, (height () + 1)/2.0); pseg->x2 = round_at (inside*rx*cos_t, (width () + 1)/2.0); pseg->y2 = round_at (inside*ry*sin_t, (height () + 1)/2.0); return 1; } } void WTopLevel::draw (void) { GC _gc = gc (); Pixmap pixmap = get_pixmap (); XCopyArea (xdisplay (), pixmap, window (), _gc, 0, 0, width (), height (), 0, 0); m_fExpose = false; } void WTopLevel::expose (XExposeEvent* /* pEvent */) { m_fExpose = true; // Force redraw next time. } Pixmap WTopLevel::get_pixmap (void) { if (m_pixmap) return m_pixmap; if (!window ()) return 0; m_pixmap = XCreatePixmap (xdisplay (), window (), width (), height (), display ()->depth ()); return m_pixmap; } #if defined (USE_FACE_BACKING) Pixmap WTopLevel::get_pixmap_face (void) { if (m_pixmapFace) return m_pixmapFace; if (!window ()) return 0; m_pixmapFace = XCreatePixmap (xdisplay (), window (), width (), height (), display ()->depth ()); return m_pixmapFace; } #endif bool WTopLevel::render (void) { // -- Check time #if 0 struct timeval tv; struct timezone tz; memset (&tv, 0, sizeof (tv)); memset (&tz, 0, sizeof (tz)); gettimeofday (&tv, &tz); time_t seconds = tv.tv_sec - tz.tz_minuteswest*60; if (tz.tz_dsttime == DST_USA) seconds += 3600; #else time_t seconds; time (&seconds); seconds += calc_delta (seconds); #endif // Return immediately if there is // nothing new to render. if (seconds == m_seconds) return false; m_seconds = seconds; // fprintf (stderr, "rendering\n"); // -- Do the rendering GC _gc = gc (); if (0) { XGCValues values; values.graphics_exposures = False; XChangeGC (display ()->display (), _gc, GCGraphicsExposures, &values); } #if defined (USE_FACE_BACKING) if (!m_pixmapFace) { Pixmap pixmap = get_pixmap_face (); // printf ("drawing the backing face\n"); draw_dial (xdisplay (), xvisual (), pixmap, width (), height ()); #if 0 XSetForeground (xdisplay (), _gc, XWhitePixel (xdisplay (), 0)); XFillRectangle (xdisplay (), pixmap, _gc, 0, 0, width (), height ()); XSetForeground (xdisplay (), _gc, XBlackPixel (xdisplay (), 0)); XSetBackground (xdisplay (), _gc, XWhitePixel (xdisplay (), 0)); // -- Draw name 'Buici' render_buici (_gc, pixmap); // -- Draw perimeter int width_border = line_width (WIDTH_BORDER); XSetLineAttributes (xdisplay (), _gc, width_border, LineSolid, CapButt, JoinMiter); --width_border; XDrawArc (xdisplay (), pixmap, _gc, width_border, width_border, width () - 1 - width_border*2, height () - 1 - width_border*2, 0*64, 360*64); // -- Draw marks for (Mark* pMark = g_rgMarks; pMark->count != -1; ++pMark) { if (!pMark->count) continue; XSetForeground (xdisplay (), _gc, pMark->pixel); for (int i = 0; i < pMark->count; ++i) render_line (_gc, pixmap, i/float (pMark->count), pMark->rInside, pMark->rOutside, pMark->rWidth); } #endif } else { XSetForeground (xdisplay (), _gc, XBlackPixel (xdisplay (), 0)); XSetBackground (xdisplay (), _gc, XWhitePixel (xdisplay (), 0)); } Pixmap pixmap = get_pixmap (); XCopyArea (xdisplay (), get_pixmap_face (), pixmap, _gc, 0, 0, width (), height (), 0, 0); draw_hands (xdisplay (), xvisual (), pixmap, width (), height (), seconds); #if 0 // -- Draw hands for (Mark* pMark = g_rgMarks; pMark->count != -1; ++pMark) { if (pMark->count) continue; if (pMark->modSeconds == 60 && !m_fSecondHand) continue; XSetForeground (xdisplay (), _gc, pMark->pixel); switch (pMark->shape) { default: case markLine: render_line (_gc, pixmap, (seconds%pMark->modSeconds) /float (pMark->modSeconds), pMark->rInside, pMark->rOutside, pMark->rWidth); break; case markCircle: render_circle (_gc, pixmap, (seconds%pMark->modSeconds) /float (pMark->modSeconds), pMark->rInside, pMark->rOutside); break; } } #endif #else Pixmap pixmap = get_pixmap (); XSetForeground (xdisplay (), _gc, XWhitePixel (xdisplay (), 0)); XFillRectangle (xdisplay (), pixmap, _gc, 0, 0, width (), height ()); XSetForeground (xdisplay (), _gc, XBlackPixel (xdisplay (), 0)); XSetBackground (xdisplay (), _gc, XWhitePixel (xdisplay (), 0)); // -- Draw perimeter int width_border = line_width (WIDTH_BORDER); XSetLineAttributes (xdisplay (), _gc, width_border, LineSolid, CapButt, JoinMiter); --width_border; XDrawArc (xdisplay (), pixmap, _gc, width_border, width_border, width () - 1 - width_border*2, height () - 1 - width_border*2, 0*64, 360*64); # if defined (USE_BATCH_LINES) XSegment rgseg[100]; // FIXME: bad hard limit int iSegment = 0; printf ("redrawing the marks batch\n"); // -- Draw marks for (Mark* pMark = g_rgMarks; pMark->count != -1; ++pMark, iSegment = 0) { if (pMark->count) for (int i = 0; i < pMark->count; ++i) iSegment += compute_segment (&rgseg[iSegment], i/float (pMark->count), pMark->rInside, pMark->rOutside, pMark->rWidth); else { if (pMark->modSeconds == 60 && !m_fSecondHand) continue; iSegment += compute_segment (&rgseg[iSegment], (seconds%pMark->modSeconds) /float (pMark->modSeconds), pMark->rInside, pMark->rOutside, pMark->rWidth); } XSetLineAttributes (xdisplay (), _gc, line_width (pMark->rWidth), LineSolid, CapButt, JoinMiter); XDrawSegments (xdisplay (), pixmap, _gc, rgseg, iSegment); } # else // printf ("redrawing the marks\n"); // -- Draw marks for (Mark* pMark = g_rgMarks; pMark->count != -1; ++pMark) { if (pMark->count) for (int i = 0; i < pMark->count; ++i) render_line (_gc, pixmap, i/float (pMark->count), pMark->rInside, pMark->rOutside, pMark->rWidth); else { if (pMark->modSeconds == 60 && !m_fSecondHand) continue; render_line (_gc, pixmap, (seconds%pMark->modSeconds) /float (pMark->modSeconds), pMark->rInside, pMark->rOutside, pMark->rWidth); } } # endif #endif return true; } void WTopLevel::release_this (void) { if (m_pixmap) { XFreePixmap (xdisplay (), m_pixmap); m_pixmap = 0; } #if defined (USE_FACE_BACKING) if (m_pixmapFace) { XFreePixmap (xdisplay (), m_pixmapFace); m_pixmapFace = 0; } #endif } void WTopLevel::render_buici (GC gc, Pixmap pixmap) { Pixmap pixmapBuici = 0; int dx = line_width (WIDTH_BUICI); int dy = (buici_height*dx + buici_width/2)/buici_width; int x = width ()/2 - dx/2; int y = height ()/3 - dy/2; int cbRowSrc = (buici_width + 7)/8; int cbRowDst = (dx + 7)/8; unsigned8* rgb = (unsigned8*) malloc (cbRowDst*dy); unsigned8* rgbGray = (unsigned8*) malloc (cbRowDst*dy); memset (rgb, 0, cbRowDst*dy); memset (rgbGray, 0, cbRowDst*dy); int rowOutput = 0; unsigned8 rgCount[800]; // FIXME: duh int countMax = (buici_width*buici_height)/(dx*dy); // fprintf (stderr, "countMax %d %dx%d -> %dx%d\n", countMax, // buici_width, buici_height, dx, dy); memset (rgCount, 0, sizeof (rgCount)); for (int j = 0; j < buici_height; ++j) { for (int i = 0; i < buici_width; ++i) { if (!(buici_bits[j*cbRowSrc + i/8] & (1 << (i % 8)))) continue; int x = (i*dx)/buici_width; ++rgCount[x]; } int y = ((j + 1)*dy)/buici_height; if (y != rowOutput) { for (int i = 0; i < dx; ++i) { if (rgCount[i] < countMax*THRESHOLD_GRAY/100) continue; rgbGray[rowOutput*cbRowDst + i/8] |= (1 << (i % 8)); if (rgCount[i] < countMax*THRESHOLD_BLACK/100) continue; rgb[rowOutput*cbRowDst + i/8] |= (1 << (i % 8)); } memset (rgCount, 0, sizeof (rgCount)); rowOutput = y; } } // dmalloc_validate (); // Paranoid check pixmapBuici = XCreateBitmapFromData (xdisplay (), window (), (const char*) rgbGray, dx, dy); XSetState (xdisplay (), gc, m_pixelGray, XWhitePixel (xdisplay (), 0), GXcopy, AllPlanes); XCopyPlane (xdisplay (), pixmapBuici, pixmap, gc, 0, 0, dx, dy, x, y, 0x1); XFreePixmap (xdisplay (), pixmapBuici); pixmapBuici = XCreateBitmapFromData (xdisplay (), window (), (const char*) rgb, dx, dy); XSetState (xdisplay (), gc, ~0, 0, GXandInverted, AllPlanes); XCopyPlane (xdisplay (),pixmapBuici, pixmap, gc, 0, 0, dx, dy, x, y, 0x1); XSetState (xdisplay (), gc, XBlackPixel (xdisplay (), 0), XWhitePixel (xdisplay (), 0), GXor, AllPlanes); XCopyPlane (xdisplay (),pixmapBuici, pixmap, gc, 0, 0, dx, dy, x, y, 0x1); XFreePixmap (xdisplay (), pixmapBuici); XSetState (xdisplay (), gc, XBlackPixel (xdisplay (), 0), XWhitePixel (xdisplay (), 0), GXcopy, AllPlanes); free (rgb); free (rgbGray); } /* WTopLevel::render_circle renders a circle for clock marks or hands. The offset and diameter parameters are real numbers representing the proportion of the circle center and diameter with respect to the radius of the clock face. An offset value of 0 is the center and a value of 1.0 is the outside edge of the face. The theta parameter a number from 0 to 1.0 that describes the angle of the line as a fraction of the circle. Zero is noon or midnight. 0.25 is three o'clock. This routine converts the number of radians for calculation--unless we choose to use a lookup table for angles. */ void WTopLevel::render_circle (GC gc, Pixmap pixmap, double theta, float offset, float diameter) { theta = M_PI_2 - theta*2.0*M_PI; double sin_t = -sin (theta); double cos_t = cos (theta); double rx = (width () - 0)/2.0; // radius along X axis double ry = (height () - 0)/2.0; // radius along Y axis double cx = offset*rx*cos_t; double cy = offset*ry*sin_t; double dx = diameter*width (); double dy = diameter*height (); int x = round_at (cx, (width () + 1)/2.0 - (dx + 0.5)/2.0); int y = round_at (cy, (height () + 1)/2.0 - (dy + 0.5)/2.0); XFillArc (xdisplay (), pixmap, gc, x, y, int (dx + 0.5), int (dy + 0.5), 0*64, 360*64); } /* WTopLevel::render_line renders a line for clock marks or hands. The outside and inside parameters are real number representing the proportion of the outside and inside points of the line with respect to the radius of the clock face. A value of 0 is the center and a value of 1.0 is the outside edge of the face. The theta parameter a number from 0 to 1.0 that describes the angle of the line as a fraction of the circle. Zero is noon or midnight. 0.25 is three o'clock. This routine converts the number of radians for calculation--unless we choose to use a lookup table for angles. */ void WTopLevel::render_line (GC gc, Pixmap pixmap, double theta, float outside, float inside, float line_width_fraction) { theta = M_PI_2 - theta*2.0*M_PI; double sin_t = -sin (theta); double cos_t = cos (theta); double rx = (width () - 0)/2.0; // radius along X axis double ry = (height () - 0)/2.0; // radius along Y axis XSetLineAttributes (xdisplay (), gc, line_width (line_width_fraction), LineSolid, CapButt, JoinMiter); if (outside*inside < 0) { XPoint rgPt[3]; rgPt[0].x = round_at (outside*rx*cos_t, (width () + 1)/2.0); rgPt[0].y = round_at (outside*ry*sin_t, (height () + 1)/2.0); rgPt[1].x = (width () + 1)/2; rgPt[1].y = (height () + 1)/2; rgPt[2].x = round_at (inside*rx*cos_t, (width () + 1)/2.0); rgPt[2].y = round_at (inside*ry*sin_t, (height () + 1)/2.0); XDrawLines (xdisplay (), pixmap, gc, rgPt, 3, CoordModeOrigin); } else XDrawLine (xdisplay (), pixmap, gc, round_at (outside*rx*cos_t, (width () + 1)/2.0), round_at (outside*ry*sin_t, (height () + 1)/2.0), round_at (inside*rx*cos_t, (width () + 1)/2.0), round_at (inside*ry*sin_t, (height () + 1)/2.0)); } void WTopLevel::setup_time (void) { // -- Configure interval timer LSignal::accept (SIGALRM, signal_alarm, (void*) this, 0, 0); { struct itimerval value; memset (&value, 0, sizeof (value)); value.it_interval.tv_sec = 0; value.it_interval.tv_usec = 100000; value.it_value.tv_usec = 1; // value.it_value = value.it_interval; setitimer (ITIMER_REAL, &value, NULL); } } void WTopLevel::shape (void) { int i; if (!XShapeQueryExtension (xdisplay (), &i, &i)) return; Pixmap pixmap = XCreatePixmap (xdisplay (), window (), width (), height (), 1); #if 0 XGCValues xgcv; GC gc = XCreateGC (xdisplay (), pixmap, 0, &xgcv); XSetForeground (xdisplay (), gc, 0); XFillRectangle (xdisplay (), pixmap, gc, 0, 0, width (), height ()); # if 0 XSetForeground (xdisplay (), gc, 1); int width_border = line_width (WIDTH_BORDER); XSetLineAttributes (xdisplay (), gc, width_border, LineSolid, CapRound, JoinMiter); --width_border; XFillArc (xdisplay (), pixmap, gc, width_border, width_border, width () - 1 - width_border*2, height () - 1 - width_border*2, 0*64, 360*64); XDrawArc (xdisplay (), pixmap, gc, width_border, width_border, width () - 1 - width_border*2, height () - 1 - width_border*2, 0*64, 360*64); # endif XFreeGC (xdisplay (), gc); #else draw_dial_shape (xdisplay (), pixmap, width (), height ()); #endif XShapeCombineMask (xdisplay (), window (), ShapeBounding, 0, 0, pixmap, ShapeSet); XShapeCombineMask (xdisplay (), window (), ShapeClip, 0, 0, pixmap, ShapeSet); XFreePixmap (xdisplay (), pixmap); } void register_base_classes (LDisplay* pDisplay) { LWindow* pWindow = new LWindow (pDisplay); pWindow->event_map (g_rgEMTop); pWindow->select_events (ButtonPressMask | ExposureMask); // pWindow->set_background_pixel (XBlackPixel (pDisplay->display (), 0)); pWindow->set_bit_gravity (NorthWestGravity); if (g_fOverrideRedirect) pWindow->set_override_redirect (true); // pWindow->notify ((PFNEvent) WTopLevel::child); if (!pDisplay->hash_template ("top-level", pWindow)) return; // WButton::register_template (pDisplay); // WTextEdit::register_template (pDisplay); // WDialog::register_template (pDisplay); } int do_clock (void) { extern char* g_szGeometry; int x = 0; int y = 0; unsigned int dx = 100; unsigned int dy = 100; { LDisplay display; display.set_visual_class (PseudoColor); if (!display.open ()) exit_error ("unable to open display"); register_base_classes (&display); WTopLevel* pWindow = new WTopLevel (display.find_template ("top-level")); switch (g_showSecondHand) { default: case -1: { XrmValue value; pWindow->m_fSecondHand = display.find_resource ("buiciClock.showSecondHand", NULL, NULL, &value) ? as_bool (value, true) : true; } break; case 0: pWindow->m_fSecondHand = false; break; case 1: pWindow->m_fSecondHand = true; break; } pWindow->position (x, y, dx, dy); pWindow->geometry (g_szGeometry); pWindow->qualify ("buiciClock", "buiciClock\0BuiciClock\0"); if (!pWindow->create (0)) exit_error ("unable to open window"); pWindow->shape (); pWindow->transient_for (pWindow); if (g_fAsDesktop) pWindow->net_window_type (windowTypeDesktop); if (g_fAsToolbar) pWindow->net_window_type (windowTypeToolbar); if (g_fAsDock) pWindow->net_window_type (windowTypeDock); pWindow->allocate_colors (); // First, create the colormap pWindow->setup_time (); pWindow->render (); pWindow->map (); // display.set_after_function (x_after); // fprintf (stderr, "starting dispatch\n"); while (!g_fQuit) { display.dispatch_next_event (); } fprintf (stderr, "exiting\n"); pWindow->unmap (); // Make a clean (looking) exit display.flush (); delete pWindow; } // dmalloc_exit (); // See what is left allocated return 0; } void signal_alarm (LSignalHandle /* handle */, void* pv) { // fprintf (stderr, "tick\n"); WTopLevel* pWindow = (WTopLevel*) pv; if (pWindow->render () || pWindow->is_expose ()) { pWindow->draw (); pWindow->display ()->flush (); } // fprintf (stderr, "tock\n"); } buici-clock-0.4.9.2/configure.in0000644000000000000000000000721111613344743013256 0ustar dnl Process this file with autoconf to produce a configure script. AC_REVISION([$Id: configure.in,v 1.16 2001/03/31 21:18:12 elf Exp $]) AC_PREREQ(2.12)dnl dnl Minimum Autoconf version required. AC_INIT(buici.xbm) dnl Name of unique file that must exist AC_CONFIG_HEADER(config.h) AC_LANG_CPLUSPLUS dnl Default to c++ cause that what we done. dnl Checks for programs. dnl AC_PROG_CC AC_PROG_CXX AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_INSTALL if test "${GXX}" = "yes" ; then CFLAGS_W=" -Wall -Wno-parentheses -Wno-unused" CFLAGS="${CFLAGS}" fi dnl Find our XO X class library AC_MSG_CHECKING("for XO class library") XO_PATH=`echo xo-*` if test "${XO_PATH}" = "" -o ! -d ${XO_PATH} ; then eval XO_PATH=xo ; fi if test "${XO_PATH}" = "" -o ! -d ${XO_PATH} ; then eval XO_PATH=xo ; fi if test "${XO_PATH}" = "" -o ! -d ${XO_PATH} ; then eval XO_PATH=../xo ; fi if test ! -d ${XO_PATH} ; then AC_MSG_ERROR(Unable to find xo library) ; fi AC_MSG_RESULT(${XO_PATH}) AC_CHECK_LIB(m, cos) dnl Checks for header files. dnl AC_HEADER_DIRENT AC_PATH_XTRA AC_HEADER_STDC AC_CHECK_FUNCS(memset strncmp) dnl AC_CHECK_HEADERS(fcntl.h ncurses/curses.h ncurses.h curses.h gpm.h) AC_CHECK_HEADERS(unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl -- Removed because it tends to interfere with headers dnl AC_C_CONST dnl -- Removed because it tends to interfere with headers dnl AC_C_INLINE dnl AC_TYPE_OFF_T AC_TYPE_TIME_T AC_HEADER_TIME dnl AC_TYPE_UMODE_T AC_STRUCT_TM AC_STRUCT_TIMEZONE dnl AC_CHECK_SIZEOF(long, 4) dnl -- Make sure to warn user dnl AC_CHECK_SIZEOF(int, 4) dnl -- about these defaults. dnl Checks for library functions. dnl AC_FUNC_MMAP dnl AC_FUNC_VPRINTF dnl -- We use vsprintf dnl AC_CHECK_FUNCS(mktime stime strftime) dnl -- Include in the source AC_SUBST(XO_PATH) AC_SUBST(CFLAGS_W) AC_OUTPUT(Makefile) dnl -- Prevent accidental edits. chmod -w Makefile chmod -w config.h dnl -- Create empty dependency file so that Make can include it if test ! -f depend.m ; then touch depend.m ; fi dnl -- Configure XO, too, if it is local if test ! "${XO_PATH}" = "../xo" ; then if test ! -e ${XO_PATH}/config.cache ; then cp config.cache ${XO_PATH} ; fi (cd ${XO_PATH} ; ./configure ) fi dnl -- Check for missing RESOURCE_MANAGER string if test "${DISPLAY}" = "" ; then echo "-------------------------------------------------------------------" echo "I cannot make some configuration determinations because you are" echo "not currently running on an X Server. Buici will compile as is," echo "but certain display-specific errors can only be detected when" echo "configure is run in a window with access to the display. I" echo "encourage you to run configure again when the X display is active" echo "in order to complete the configuration tests." echo "-------------------------------------------------------------------" elif test \ "`xprop -display ${DISPLAY} -root | grep -l 'RESOURCE_MANAGER(STRING)'`"\ = "" ; then echo "-------------------------------------------------------------------" echo "Your X Server is not providing an expected property string used to" echo "store resources. Would you please consider sending the output of" echo "the info.sh script to me, the author, elf@netcom.com. It will help" echo "me understand why Buici doesn\'t work on some X Servers." echo "-------------------------------------------------------------------" else echo "-------------------------------------------------------------------" echo "Your X Server appears to operate as expected." echo "-------------------------------------------------------------------" fi echo echo "Run 'make' to build the application." echo buici-clock-0.4.9.2/aclocal.m40000644000000000000000000000016711613344743012610 0ustar dnl Our local extensions to standard type and constant search AC_DEFUN(AC_TYPE_TIME_T, [AC_CHECK_TYPE(time_t, long)])