From 049a69a9bf570684df85306efc121b37ce9f511d Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 15 Jan 2000 02:00:24 +0000 Subject: [PATCH] - Added a test in configure for the version of libPropList that is installed on the system. Further compilation will be aborted if the version of libPropList that is found is older than expected. Hopefully this will make go away some annoying messages from people unable to read the release notes. - Implemented periodic synchronization of user defaults in WINGs and notification when user defaults gets changed. - Fixed the color panel to compile (someone in charge with it check if its ok, I only changed where the compiler complained, didn't go through the code). - Misc fixes, related to latest changes in wrlib. --- Makefile.in | 13 +-- WINGs/Resources/Makefile.in | 9 +- WINGs/WUtil.h | 4 + WINGs/userdefaults.c | 125 +++++++++++++++++++++--- WINGs/wcolorpanel.c | 18 ++-- WPrefs.app/Appearance.c | 23 ++--- WPrefs.app/Font.c | 6 +- WPrefs.app/Makefile.in | 6 +- WPrefs.app/TexturePanel.c | 4 +- WPrefs.app/po/Makefile.in | 13 +-- WPrefs.app/tiff/Makefile.in | 13 +-- WPrefs.app/xpm/Makefile.in | 13 +-- WindowMaker/Backgrounds/Makefile.in | 13 +-- WindowMaker/Defaults/Makefile.in | 13 +-- WindowMaker/IconSets/Makefile.in | 13 +-- WindowMaker/Icons/Makefile.in | 13 +-- WindowMaker/Makefile.in | 13 +-- WindowMaker/Pixmaps/Makefile.in | 13 +-- WindowMaker/Styles/Makefile.in | 13 +-- WindowMaker/Themes/Makefile.in | 13 +-- acinclude.m4 | 33 +++++++ aclocal.m4 | 33 +++++++ configure | 141 ++++++++++++++++++++-------- configure.in | 16 +++- contrib/Makefile.in | 13 +-- doc/Makefile.in | 13 +-- po/Makefile.in | 13 +-- src/Makefile.in | 6 +- test/Makefile.in | 6 +- util/Makefile.in | 6 +- wmlib/Makefile.in | 6 +- wrlib/CrCmap.c | 2 +- wrlib/Makefile.am | 2 +- wrlib/Makefile.in | 4 +- wrlib/raster.c | 19 ++-- 35 files changed, 407 insertions(+), 257 deletions(-) diff --git a/Makefile.in b/Makefile.in index d7284c03..c9482220 100644 --- a/Makefile.in +++ b/Makefile.in @@ -110,14 +110,14 @@ mkinstalldirs src/config.h.in src/stamp-h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -284,15 +284,10 @@ distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WINGs/Resources/Makefile.in b/WINGs/Resources/Makefile.in index a7c034aa..d3a32728 100644 --- a/WINGs/Resources/Makefile.in +++ b/WINGs/Resources/Makefile.in @@ -113,9 +113,9 @@ GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WINGs/Resources/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WINGs/Resources/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -147,11 +147,6 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WINGs/Resources distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WINGs/Resources/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ diff --git a/WINGs/WUtil.h b/WINGs/WUtil.h index c8a3052e..43f043f5 100644 --- a/WINGs/WUtil.h +++ b/WINGs/WUtil.h @@ -432,6 +432,8 @@ void WMSynchronizeUserDefaults(WMUserDefaults *database); void WMSaveUserDefaults(WMUserDefaults *database); +void WMEnableUDPeriodicSynchronization(WMUserDefaults *database, Bool enable); + proplist_t WMGetUDObjectForKey(WMUserDefaults *database, char *defaultName); void WMSetUDObjectForKey(WMUserDefaults *database, proplist_t object, @@ -464,6 +466,8 @@ proplist_t WMGetUDSearchList(WMUserDefaults *database); void WMSetUDSearchList(WMUserDefaults *database, proplist_t list); +extern char *WMUserDefaultsDidChangeNotification; + /*-------------------------------------------------------------------------*/ diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c index 62e95ffd..ec0577a2 100644 --- a/WINGs/userdefaults.c +++ b/WINGs/userdefaults.c @@ -3,11 +3,13 @@ #include #include #include +#include +#include #include "../src/config.h" -#include "WUtil.h" +#include "WINGs.h" #include @@ -22,8 +24,12 @@ typedef struct W_UserDefaults { char dirty; + char dontSync; + char *path; /* where is db located */ + time_t timestamp; /* last modification time */ + struct W_UserDefaults *next; } UserDefaults; @@ -31,7 +37,7 @@ typedef struct W_UserDefaults { static UserDefaults *sharedUserDefaults = NULL; -static Bool registeredSaveOnExit = False; +char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification"; @@ -39,6 +45,9 @@ extern char *WMGetApplicationName(); #define DEFAULTS_DIR "/Defaults" +#define UD_SYNC_INTERVAL 2000 + + char* wusergnusteppath() @@ -92,14 +101,11 @@ saveDefaultsChanges(void) #endif { /* save the user defaults databases */ - if (sharedUserDefaults) { - UserDefaults *tmp = sharedUserDefaults; + UserDefaults *tmp = sharedUserDefaults; - while (tmp) { - if (tmp->appDomain && tmp->dirty) - PLShallowSynchronize(tmp->appDomain); - tmp = tmp->next; - } + while (tmp) { + WMSynchronizeUserDefaults(tmp); + tmp = tmp->next; } } @@ -108,6 +114,8 @@ saveDefaultsChanges(void) static void registerSaveOnExit(void) { + static Bool registeredSaveOnExit = False; + if (!registeredSaveOnExit) { #ifndef HAVE_ATEXIT on_exit(saveDefaultsChanges, (void*)NULL); @@ -119,18 +127,96 @@ registerSaveOnExit(void) } +static void +synchronizeUserDefaults(void *foo) +{ + UserDefaults *database = sharedUserDefaults; + + while (database) { + if (!database->dontSync) + WMSynchronizeUserDefaults(database); + database = database->next; + } + WMAddTimerHandler(UD_SYNC_INTERVAL, synchronizeUserDefaults, NULL); +} + + +static void +addSynchronizeTimerHandler(void) +{ + static Bool initialized = False; + + if (!initialized) { + WMAddTimerHandler(UD_SYNC_INTERVAL, synchronizeUserDefaults, NULL); + initialized = True; + } +} + + +void +WMEnableUDPeriodicSynchronization(WMUserDefaults *database, Bool enable) +{ + database->dontSync = !enable; +} + + void WMSynchronizeUserDefaults(WMUserDefaults *database) { - /* TODO: check what it should really do */ - PLShallowSynchronize(database->appDomain); + Bool fileIsNewer = False, release = False; + char *path; + struct stat stbuf; + + if (!database->path) { + path = wdefaultspathfordomain(WMGetApplicationName()); + release = True; + } else { + path = database->path; + } + + if (stat(path, &stbuf) >= 0 && stbuf.st_mtime > database->timestamp) + fileIsNewer = True; + + /*printf("syncing: %s %d %d\n", path, database->dirty, fileIsNewer);*/ + + if (database->appDomain && (database->dirty || fileIsNewer)) { + PLShallowSynchronize(database->appDomain); + database->dirty = 0; + if (stat(path, &stbuf) >= 0) + database->timestamp = stbuf.st_mtime; + if (fileIsNewer) { + WMPostNotificationName(WMUserDefaultsDidChangeNotification, + database, NULL); + } + } + + if (release) + wfree(path); + } void WMSaveUserDefaults(WMUserDefaults *database) { - PLSave(database->appDomain, YES); + if (database->appDomain) { + struct stat stbuf; + char *path; + Bool release = False; + + PLSave(database->appDomain, YES); + database->dirty = 0; + if (!database->path) { + path = wdefaultspathfordomain(WMGetApplicationName()); + release = True; + } else { + path = database->path; + } + if (stat(path, &stbuf) >= 0) + database->timestamp = stbuf.st_mtime; + if (release) + wfree(path); + } } @@ -140,6 +226,7 @@ WMGetStandardUserDefaults(void) WMUserDefaults *defaults; proplist_t domain; proplist_t key; + struct stat stbuf; char *path; int i; @@ -172,6 +259,9 @@ WMGetStandardUserDefaults(void) } else { path = wdefaultspathfordomain(PLGetString(key)); + if (stat(path, &stbuf) >= 0) + defaults->timestamp = stbuf.st_mtime; + domain = PLGetProplistWithPath(path); } if (!domain) { @@ -215,8 +305,7 @@ WMGetStandardUserDefaults(void) /* terminate list */ defaults->searchList[2] = NULL; - defaults->searchListArray=PLMakeArrayFromElements(NULL,NULL); - + defaults->searchListArray = PLMakeArrayFromElements(NULL,NULL); i = 0; while (defaults->searchList[i]) { @@ -229,6 +318,7 @@ WMGetStandardUserDefaults(void) defaults->next = sharedUserDefaults; sharedUserDefaults = defaults; + addSynchronizeTimerHandler(); registerSaveOnExit(); return defaults; @@ -241,6 +331,7 @@ WMGetDefaultsFromPath(char *path) WMUserDefaults *defaults; proplist_t domain; proplist_t key; + struct stat stbuf; char *name; int i; @@ -273,6 +364,9 @@ WMGetDefaultsFromPath(char *path) key = PLMakeString(name); defaults->searchList[0] = key; + if (stat(path, &stbuf) >= 0) + defaults->timestamp = stbuf.st_mtime; + domain = PLGetProplistWithPath(path); if (!domain) { @@ -296,7 +390,7 @@ WMGetDefaultsFromPath(char *path) /* terminate list */ defaults->searchList[1] = NULL; - defaults->searchListArray=PLMakeArrayFromElements(NULL,NULL); + defaults->searchListArray = PLMakeArrayFromElements(NULL,NULL); i = 0; while (defaults->searchList[i]) { @@ -309,6 +403,7 @@ WMGetDefaultsFromPath(char *path) defaults->next = sharedUserDefaults; sharedUserDefaults = defaults; + addSynchronizeTimerHandler(); registerSaveOnExit(); return defaults; diff --git a/WINGs/wcolorpanel.c b/WINGs/wcolorpanel.c index 1bf8ebbd..5305612c 100644 --- a/WINGs/wcolorpanel.c +++ b/WINGs/wcolorpanel.c @@ -2171,9 +2171,9 @@ wheelRender(W_ColorPanel *panel) for (y = 0; y < colorWheelSize+4; y++) { for (x = 0; x < colorWheelSize+4; x++) { - rp = image->data[0] + (ofs << shift); - gp = image->data[1] + (ofs << shift); - bp = image->data[2] + (ofs << shift); + rp = image->data + (ofs << shift); + gp = image->data + (ofs << shift) + 1; + bp = image->data + (ofs << shift) + 2; if (wheelInsideColorWheel(panel, ofs)) { *rp = (unsigned char)(panel->wheelMtrx->values[ @@ -2931,9 +2931,9 @@ customRenderSpectrum(W_ColorPanel *panel) convertCPColor(&cpColor); - rp = spectrum->data[0] + ofs; - gp = spectrum->data[1] + ofs; - bp = spectrum->data[2] + ofs; + rp = spectrum->data + ofs; + gp = spectrum->data + ofs + 1; + bp = spectrum->data + ofs + 2; *rp = (unsigned char)cpColor.rgb.red; *gp = (unsigned char)cpColor.rgb.green; @@ -3014,9 +3014,9 @@ customPalettePositionSelection(W_ColorPanel *panel, int x, int y) ofs = rint(x * panel->palXRatio) + rint(y * panel->palYRatio) * panel->customPaletteImg->width; - panel->color.rgb.red = panel->customPaletteImg->data[0][ofs]; - panel->color.rgb.green = panel->customPaletteImg->data[1][ofs]; - panel->color.rgb.blue = panel->customPaletteImg->data[2][ofs]; + panel->color.rgb.red = panel->customPaletteImg->data[ofs]; + panel->color.rgb.green = panel->customPaletteImg->data[ofs+1]; + panel->color.rgb.blue = panel->customPaletteImg->data[ofs+2]; panel->color.set = cpRGB; updateSwatch(panel, panel->color); diff --git a/WPrefs.app/Appearance.c b/WPrefs.app/Appearance.c index 25985aa9..0932759f 100644 --- a/WPrefs.app/Appearance.c +++ b/WPrefs.app/Appearance.c @@ -410,20 +410,16 @@ static void dumpRImage(char *path, RImage *image) { FILE *f; + int channels = (image->format == RRGBAFormat ? 4 : 3); f = fopen(path, "w"); if (!f) { wsyserror(path); return; } - fprintf(f, "%02x%02x%1x", image->width, image->height, - image->data[3]!=NULL ? 4 : 3); + fprintf(f, "%02x%02x%1x", image->width, image->height, channels); - fwrite(image->data[0], 1, image->width * image->height, f); - fwrite(image->data[1], 1, image->width * image->height, f); - fwrite(image->data[2], 1, image->width * image->height, f); - if (image->data[3]) - fwrite(image->data[3], 1, image->width * image->height, f); + fwrite(image->data, 1, image->width * image->height * channels, f); if (fclose(f) < 0) { wsyserror(path); @@ -585,8 +581,8 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height, str = PLGetString(PLGetArrayElement(texture, 1)); - if (path = wfindfileinarray(GetObjectForKey("PixmapPath"), str)) - timage = RLoadImage(rc, path, 0); + if ((path=wfindfileinarray(GetObjectForKey("PixmapPath"), str))!=NULL) + timage = RLoadImage(rc, path, 0); if (!path || !timage) { wwarning("could not load file '%s': %s", path, @@ -645,8 +641,8 @@ renderTexture(WMScreen *scr, proplist_t texture, int width, int height, str = PLGetString(PLGetArrayElement(texture, 1)); - if (path = wfindfileinarray(GetObjectForKey("PixmapPath"), str)) - timage = RLoadImage(rc, path, 0); + if ((path=wfindfileinarray(GetObjectForKey("PixmapPath"), str))!=NULL) + timage = RLoadImage(rc, path, 0); if (!path || !timage) { wwarning("could not load file '%s': %s", path ? path : str, @@ -1327,7 +1323,6 @@ loadRImage(WMScreen *scr, char *path) FILE *f; RImage *image; int w, h, d; - int i; Pixmap pixmap; f = fopen(path, "r"); @@ -1337,9 +1332,7 @@ loadRImage(WMScreen *scr, char *path) fscanf(f, "%02x%02x%1x", &w, &h, &d); image = RCreateImage(w, h, d == 4); - for (i = 0; i < d; i++) { - fread(image->data[i], 1, w*h, f); - } + fread(image->data, 1, w*h*d, f); fclose(f); RConvertImage(WMScreenRContext(scr), image, &pixmap); diff --git a/WPrefs.app/Font.c b/WPrefs.app/Font.c index 5bdb6a37..1842273c 100644 --- a/WPrefs.app/Font.c +++ b/WPrefs.app/Font.c @@ -166,9 +166,9 @@ paintPreviewBox(Panel *panel) { int h, h2, fh, fh2; int i; - const mx = 20; - const my = 120; - const mw = 100; + const int mx = 20; + const int my = 120; + const int mw = 100; fh = WMFontHeight(panel->menuTitleFont); diff --git a/WPrefs.app/Makefile.in b/WPrefs.app/Makefile.in index afd9dd86..7c3a8c05 100644 --- a/WPrefs.app/Makefile.in +++ b/WPrefs.app/Makefile.in @@ -149,7 +149,7 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(WPrefs_SOURCES) OBJECTS = $(WPrefs_OBJECTS) @@ -158,7 +158,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -348,7 +348,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WPrefs.app/TexturePanel.c b/WPrefs.app/TexturePanel.c index a7880e5e..563d7f37 100644 --- a/WPrefs.app/TexturePanel.c +++ b/WPrefs.app/TexturePanel.c @@ -928,8 +928,8 @@ SetTexturePanelTexture(TexturePanel *panel, char *name, proplist_t texture) if (panel->imageFile) free(panel->imageFile); - if (panel->imageFile = wfindfileinarray(panel->pathList, - PLGetString(PLGetArrayElement(texture, 1)))) { + if ((panel->imageFile = wfindfileinarray(panel->pathList, + PLGetString(PLGetArrayElement(texture, 1)))) != NULL) { panel->image = RLoadImage(WMScreenRContext(scr), panel->imageFile, 0); updateTGradImage(panel); diff --git a/WPrefs.app/po/Makefile.in b/WPrefs.app/po/Makefile.in index a48b479f..742112e6 100644 --- a/WPrefs.app/po/Makefile.in +++ b/WPrefs.app/po/Makefile.in @@ -119,15 +119,15 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: .SUFFIXES: .mo .po $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/po/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/po/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -140,15 +140,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WPrefs.app/po distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WPrefs.app/po/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WPrefs.app/tiff/Makefile.in b/WPrefs.app/tiff/Makefile.in index c4752d1e..dc456409 100644 --- a/WPrefs.app/tiff/Makefile.in +++ b/WPrefs.app/tiff/Makefile.in @@ -109,14 +109,14 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/tiff/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/tiff/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -148,15 +148,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WPrefs.app/tiff distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WPrefs.app/tiff/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WPrefs.app/xpm/Makefile.in b/WPrefs.app/xpm/Makefile.in index 8379a2df..b71ed514 100644 --- a/WPrefs.app/xpm/Makefile.in +++ b/WPrefs.app/xpm/Makefile.in @@ -109,14 +109,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WPrefs.app/xpm/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WPrefs.app/xpm/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -148,15 +148,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WPrefs.app/xpm distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WPrefs.app/xpm/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Backgrounds/Makefile.in b/WindowMaker/Backgrounds/Makefile.in index b25e121a..e4cadf8f 100755 --- a/WindowMaker/Backgrounds/Makefile.in +++ b/WindowMaker/Backgrounds/Makefile.in @@ -108,14 +108,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Backgrounds/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Backgrounds/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -147,15 +147,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Backgrounds distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Backgrounds/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Defaults/Makefile.in b/WindowMaker/Defaults/Makefile.in index 1afb9858..d963884b 100755 --- a/WindowMaker/Defaults/Makefile.in +++ b/WindowMaker/Defaults/Makefile.in @@ -110,14 +110,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Defaults/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Defaults/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -149,15 +149,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Defaults distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Defaults/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/IconSets/Makefile.in b/WindowMaker/IconSets/Makefile.in index f17f4aa9..dfaa6cd1 100755 --- a/WindowMaker/IconSets/Makefile.in +++ b/WindowMaker/IconSets/Makefile.in @@ -110,14 +110,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/IconSets/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/IconSets/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -149,15 +149,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/IconSets distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/IconSets/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Icons/Makefile.in b/WindowMaker/Icons/Makefile.in index 28f42c46..70753477 100755 --- a/WindowMaker/Icons/Makefile.in +++ b/WindowMaker/Icons/Makefile.in @@ -109,14 +109,14 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Icons/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Icons/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -148,15 +148,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Icons distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Icons/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Makefile.in b/WindowMaker/Makefile.in index fd51ddee..04911d3e 100755 --- a/WindowMaker/Makefile.in +++ b/WindowMaker/Makefile.in @@ -111,14 +111,14 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -236,15 +236,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Pixmaps/Makefile.in b/WindowMaker/Pixmaps/Makefile.in index 5c17de83..fd7b5b2e 100755 --- a/WindowMaker/Pixmaps/Makefile.in +++ b/WindowMaker/Pixmaps/Makefile.in @@ -109,14 +109,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Pixmaps/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Pixmaps/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -148,15 +148,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Pixmaps distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Pixmaps/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Styles/Makefile.in b/WindowMaker/Styles/Makefile.in index 08af10e8..98884c0b 100755 --- a/WindowMaker/Styles/Makefile.in +++ b/WindowMaker/Styles/Makefile.in @@ -109,14 +109,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Styles/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Styles/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -148,15 +148,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Styles distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Styles/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/WindowMaker/Themes/Makefile.in b/WindowMaker/Themes/Makefile.in index 7e9f7b8e..ba05febe 100755 --- a/WindowMaker/Themes/Makefile.in +++ b/WindowMaker/Themes/Makefile.in @@ -108,14 +108,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu WindowMaker/Themes/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WindowMaker/Themes/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -147,15 +147,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = WindowMaker/Themes distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu WindowMaker/Themes/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/acinclude.m4 b/acinclude.m4 index 2b03013f..8c9e048b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -24,6 +24,39 @@ CPPFLAGS="$CPPFLAGS_old" ]) +dnl +dnl WM_CHECK_PROPLIST_VERSION(MIN_VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN(WM_CHECK_PROPLIST_VERSION, +[ +CPPFLAGS_old="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $inc_search_path" +lPL_major_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` +lPL_minor_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` +lPL_micro_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` +AC_MSG_CHECKING([whether libPropList is newer than $1]) +AC_CACHE_VAL(ac_cv_lib_proplist_version_ok, +[AC_TRY_LINK( +[/* Test version of libPropList we have */ +#include + +#if !defined(PROPLIST_VERSION) || PROPLIST_VERSION < $lPL_major_version*10000 + $lPL_minor_version*100 + $lPL_micro_version +#error libPropList on this system is too old. Consider upgrading to at least $1 +#endif +], [], +eval "ac_cv_lib_proplist_version_ok=yes", +eval "ac_cv_lib_proplist_version_ok=no")]) +if eval "test \"`echo '$ac_cv_lib_proplist_version_ok'`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) +ifelse([$3], , , [$3 +])dnl +fi +CPPFLAGS="$CPPFLAGS_old" +]) + dnl dnl WM_CHECK_REDCRAP_BUGS(prefix,bindir,libdir) diff --git a/aclocal.m4 b/aclocal.m4 index 8e98c4c8..f7dcb770 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -36,6 +36,39 @@ CPPFLAGS="$CPPFLAGS_old" ]) +dnl +dnl WM_CHECK_PROPLIST_VERSION(MIN_VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) +dnl +AC_DEFUN(WM_CHECK_PROPLIST_VERSION, +[ +CPPFLAGS_old="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $inc_search_path" +lPL_major_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` +lPL_minor_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` +lPL_micro_version=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` +AC_MSG_CHECKING([whether libPropList is newer than $1]) +AC_CACHE_VAL(ac_cv_lib_proplist_version_ok, +[AC_TRY_LINK( +[/* Test version of libPropList we have */ +#include + +#if !defined(PROPLIST_VERSION) || PROPLIST_VERSION < $lPL_major_version*10000 + $lPL_minor_version*100 + $lPL_micro_version +#error libPropList on this system is too old. Consider upgrading to at least $1 +#endif +], [], +eval "ac_cv_lib_proplist_version_ok=yes", +eval "ac_cv_lib_proplist_version_ok=no")]) +if eval "test \"`echo '$ac_cv_lib_proplist_version_ok'`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) +ifelse([$3], , , [$3 +])dnl +fi +CPPFLAGS="$CPPFLAGS_old" +]) + dnl dnl WM_CHECK_REDCRAP_BUGS(prefix,bindir,libdir) diff --git a/configure b/configure index 505f78d0..bd5848df 100755 --- a/configure +++ b/configure @@ -67,7 +67,7 @@ ac_help="$ac_help --enable-single-icon use single application icon per WM_INSTANCE+WM_CLASS " ac_help="$ac_help - --enable-usermenu user defined menus for applications + --enable-usermenu user defined menus for applications " # Initialize some variables set by options. @@ -2750,7 +2750,7 @@ else int main() { /* Ultrix mips cc rejects this. */ -typedef int charset[2]; const charset x; +typedef int charset[2]; const charset x = {0,0}; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; @@ -4749,6 +4749,65 @@ if test "x$LIBPL" = "x"; then fi +CPPFLAGS_old="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $inc_search_path" +lPL_major_version=`echo 0.9.5 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` +lPL_minor_version=`echo 0.9.5 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` +lPL_micro_version=`echo 0.9.5 | sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` +echo $ac_n "checking whether libPropList is newer than 0.9.5""... $ac_c" 1>&6 +echo "configure:4759: checking whether libPropList is newer than 0.9.5" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_proplist_version_ok'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < + +#if !defined(PROPLIST_VERSION) || PROPLIST_VERSION < $lPL_major_version*10000 + $lPL_minor_version*100 + $lPL_micro_version +#error libPropList on this system is too old. Consider upgrading to at least 0.9.5 +#endif + +int main() { + +; return 0; } +EOF +if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_proplist_version_ok=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_proplist_version_ok=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_lib_proplist_version_ok'`\" = yes"; then + echo "$ac_t""yes" 1>&6 + goodlPL=yes +else + echo "$ac_t""no" 1>&6 +goodlPL=no +fi +CPPFLAGS="$CPPFLAGS_old" + + +if test "$goodlPL" = no; then + echo + echo "ERROR!!! libPropList is an old version. Please consider upgrading" + echo " to at least version 0.9.5. Older versions have bugs that" + echo " may cause Window Maker to crash randomly." + echo " If your libPropList is older than 0.9.2 it will also prevent" + echo " Window Maker from compiling because new functions were" + echo " introduced since that version." + echo " Please read INSTALL to find where you can find libPropList," + echo " and upgrade it before you proceed." + exit 1 +fi + @@ -4772,7 +4831,7 @@ if test "$xpm" = yes; then LDFLAGS_old="$LDFLAGS" LDFLAGS="$LDFLAGS $lib_search_path" echo $ac_n "checking for XpmCreatePixmapFromData in -lXpm""... $ac_c" 1>&6 -echo "configure:4776: checking for XpmCreatePixmapFromData in -lXpm" >&5 +echo "configure:4835: checking for XpmCreatePixmapFromData in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmCreatePixmapFromData | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4780,7 +4839,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXpm $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4821,17 +4880,17 @@ CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $inc_search_path" ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6 -echo "configure:4825: checking for X11/xpm.h" >&5 +echo "configure:4884: checking for X11/xpm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4893,7 +4952,7 @@ if test "$png" = yes ; then LDFLAGS_old="$LDFLAGS" LDFLAGS="$LDFLAGS $lib_search_path" echo $ac_n "checking for png_get_valid in -lpng""... $ac_c" 1>&6 -echo "configure:4897: checking for png_get_valid in -lpng" >&5 +echo "configure:4956: checking for png_get_valid in -lpng" >&5 ac_lib_var=`echo png'_'png_get_valid | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4901,7 +4960,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4942,17 +5001,17 @@ CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $inc_search_path" ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:4946: checking for png.h" >&5 +echo "configure:5005: checking for png.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5003,7 +5062,7 @@ if test "$jpeg" = yes; then LDFLAGS_old="$LDFLAGS" LDFLAGS="$LDFLAGS $lib_search_path" echo $ac_n "checking for jpeg_destroy_compress in -ljpeg""... $ac_c" 1>&6 -echo "configure:5007: checking for jpeg_destroy_compress in -ljpeg" >&5 +echo "configure:5066: checking for jpeg_destroy_compress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5011,7 +5070,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5055,17 +5114,17 @@ CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $inc_search_path" ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:5059: checking for jpeglib.h" >&5 +echo "configure:5118: checking for jpeglib.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5116,7 +5175,7 @@ if test "$gif" = yes; then LDFLAGS_old="$LDFLAGS" LDFLAGS="$LDFLAGS $lib_search_path" echo $ac_n "checking for DGifOpenFileName in -lungif""... $ac_c" 1>&6 -echo "configure:5120: checking for DGifOpenFileName in -lungif" >&5 +echo "configure:5179: checking for DGifOpenFileName in -lungif" >&5 ac_lib_var=`echo ungif'_'DGifOpenFileName | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5124,7 +5183,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lungif $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5166,7 +5225,7 @@ LDFLAGS="$LDFLAGS_old" LDFLAGS_old="$LDFLAGS" LDFLAGS="$LDFLAGS $lib_search_path" echo $ac_n "checking for DGifOpenFileName in -lgif""... $ac_c" 1>&6 -echo "configure:5170: checking for DGifOpenFileName in -lgif" >&5 +echo "configure:5229: checking for DGifOpenFileName in -lgif" >&5 ac_lib_var=`echo gif'_'DGifOpenFileName | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5174,7 +5233,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgif $XLFLAGS $XLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5219,17 +5278,17 @@ CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $inc_search_path" ac_safe=`echo "gif_lib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gif_lib.h""... $ac_c" 1>&6 -echo "configure:5223: checking for gif_lib.h" >&5 +echo "configure:5282: checking for gif_lib.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5290,7 +5349,7 @@ if test "$tif" = yes; then LDFLAGS_old="$LDFLAGS" LDFLAGS="$LDFLAGS $lib_search_path" echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6 -echo "configure:5294: checking for TIFFGetVersion in -ltiff" >&5 +echo "configure:5353: checking for TIFFGetVersion in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5298,7 +5357,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltiff -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5341,7 +5400,7 @@ LDFLAGS="$LDFLAGS_old" LDFLAGS_old="$LDFLAGS" LDFLAGS="$LDFLAGS $lib_search_path" echo $ac_n "checking for TIFFGetVersion in -ltiff""... $ac_c" 1>&6 -echo "configure:5345: checking for TIFFGetVersion in -ltiff" >&5 +echo "configure:5404: checking for TIFFGetVersion in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFGetVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5349,7 +5408,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltiff $ljpeg -lz -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5393,7 +5452,7 @@ LDFLAGS="$LDFLAGS_old" LDFLAGS_old="$LDFLAGS" LDFLAGS="$LDFLAGS $lib_search_path" echo $ac_n "checking for TIFFGetVersion in -ltiff34""... $ac_c" 1>&6 -echo "configure:5397: checking for TIFFGetVersion in -ltiff34" >&5 +echo "configure:5456: checking for TIFFGetVersion in -ltiff34" >&5 ac_lib_var=`echo tiff34'_'TIFFGetVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -5401,7 +5460,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ltiff34 $ljpeg -lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5447,17 +5506,17 @@ CPPFLAGS_old="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $inc_search_path" ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:5451: checking for tiffio.h" >&5 +echo "configure:5510: checking for tiffio.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* diff --git a/configure.in b/configure.in index 60cf4a5d..34f34a86 100644 --- a/configure.in +++ b/configure.in @@ -507,6 +507,20 @@ if test "x$LIBPL" = "x"; then exit 1 fi +WM_CHECK_PROPLIST_VERSION(0.9.5, goodlPL=yes, goodlPL=no) + +if test "$goodlPL" = no; then + echo + echo "ERROR!!! libPropList is an old version. Please consider upgrading" + echo " to at least version 0.9.5. Older versions have bugs that" + echo " may cause Window Maker to crash randomly." + echo " If your libPropList is older than 0.9.2 it will also prevent" + echo " Window Maker from compiling because new functions were" + echo " introduced since that version." + echo " Please read INSTALL to find where you can find libPropList," + echo " and upgrade it before you proceed." + exit 1 +fi AC_SUBST(LIBPL) @@ -791,7 +805,7 @@ fi dnl Enable User Defined Menu thing dnl ================================== AC_ARG_ENABLE(usermenu, -[ --enable-usermenu user defined menus for applications +[ --enable-usermenu user defined menus for applications ], if test "$enableval" = yes; then AC_DEFINE(USER_MENU) diff --git a/contrib/Makefile.in b/contrib/Makefile.in index 5a15b748..d017063d 100644 --- a/contrib/Makefile.in +++ b/contrib/Makefile.in @@ -102,14 +102,14 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps contrib/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -122,15 +122,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = contrib distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu contrib/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/doc/Makefile.in b/doc/Makefile.in index 3bc586bb..bb89f27c 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -109,14 +109,14 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -168,15 +168,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = doc distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu doc/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/po/Makefile.in b/po/Makefile.in index cf59aafb..e8026dd4 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -119,15 +119,15 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: .SUFFIXES: .mo .po $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu po/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps po/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -140,15 +140,10 @@ distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = po distdir: $(DISTFILES) - here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && pwd`; \ - distdir=`cd $(distdir) && pwd`; \ - cd $(top_srcdir) \ - && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu po/Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/src/Makefile.in b/src/Makefile.in index 0bdf9436..06ab2d4d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -146,7 +146,7 @@ wconfig.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(wmaker_SOURCES) OBJECTS = $(wmaker_OBJECTS) @@ -155,7 +155,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -296,7 +296,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/test/Makefile.in b/test/Makefile.in index 78afb82d..11499b83 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -130,7 +130,7 @@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(wtest_SOURCES) OBJECTS = $(wtest_OBJECTS) @@ -139,7 +139,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu test/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps test/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -234,7 +234,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/util/Makefile.in b/util/Makefile.in index 6805e836..72ee96bc 100644 --- a/util/Makefile.in +++ b/util/Makefile.in @@ -192,7 +192,7 @@ DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(wxcopy_SOURCES) $(wxpaste_SOURCES) $(wdwrite_SOURCES) $(getstyle_SOURCES) $(setstyle_SOURCES) $(seticons_SOURCES) $(geticonset_SOURCES) $(wmsetbg_SOURCES) OBJECTS = $(wxcopy_OBJECTS) $(wxpaste_OBJECTS) $(wdwrite_OBJECTS) $(getstyle_OBJECTS) $(setstyle_OBJECTS) $(seticons_OBJECTS) $(geticonset_OBJECTS) $(wmsetbg_OBJECTS) @@ -201,7 +201,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu util/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps util/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -359,7 +359,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/wmlib/Makefile.in b/wmlib/Makefile.in index 81995944..9b6c0c21 100644 --- a/wmlib/Makefile.in +++ b/wmlib/Makefile.in @@ -131,7 +131,7 @@ DIST_COMMON = COPYING.LIB Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(libWMaker_a_SOURCES) OBJECTS = $(libWMaker_a_OBJECTS) @@ -140,7 +140,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu wmlib/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps wmlib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ @@ -274,7 +274,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/wrlib/CrCmap.c b/wrlib/CrCmap.c index 8522e7e7..d8f6dca3 100644 --- a/wrlib/CrCmap.c +++ b/wrlib/CrCmap.c @@ -123,7 +123,7 @@ Status XmuCreateColormap(dpy, colormap) } } else { unsigned int maxdepth = 0; - XVisualInfo *v; + XVisualInfo *v = vinfo; for (i=0; i < n; i++, vinfo++) if (vinfo->depth > maxdepth) { diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am index 69b88546..522d0e5e 100644 --- a/wrlib/Makefile.am +++ b/wrlib/Makefile.am @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = no-dependencies lib_LTLIBRARIES = libwraster.la -libwraster_la_LDFLAGS = -version-info 5:0:0 +libwraster_la_LDFLAGS = -version-info 2:0:0 bin_SCRIPTS = get-wraster-flags diff --git a/wrlib/Makefile.in b/wrlib/Makefile.in index 26834063..6ed1cec9 100644 --- a/wrlib/Makefile.in +++ b/wrlib/Makefile.in @@ -97,7 +97,7 @@ AUTOMAKE_OPTIONS = no-dependencies lib_LTLIBRARIES = libwraster.la -libwraster_la_LDFLAGS = -version-info 5:0:0 +libwraster_la_LDFLAGS = -version-info 2:0:0 bin_SCRIPTS = get-wraster-flags @@ -180,7 +180,7 @@ all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOMAKE) --gnu wrlib/Makefile + cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps wrlib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ diff --git a/wrlib/raster.c b/wrlib/raster.c index b2f1e3a8..3a527189 100644 --- a/wrlib/raster.c +++ b/wrlib/raster.c @@ -368,6 +368,7 @@ RCombineAreaWithOpaqueness(RImage *image, RImage *src, int sx, int sy, unsigned char *d; unsigned char *s; int dalpha = HAS_ALPHA(image); + int dch = (dalpha ? 4 : 3); assert(dy <= image->height); assert(dx <= image->width); @@ -382,7 +383,10 @@ RCombineAreaWithOpaqueness(RImage *image, RImage *src, int sx, int sy, if (height > image->height - dy) height = image->height - dy; - + + d = image->data + dy*image->width*dch + dx; + dwi = (image->width - width)*dch; + c_opaqueness = 255 - opaqueness; #define OP opaqueness if (!HAS_ALPHA(src)) { @@ -391,14 +395,6 @@ RCombineAreaWithOpaqueness(RImage *image, RImage *src, int sx, int sy, s = src->data + sy*src->width*3; swi = (src->width - width) * 3; - if (dalpha) { - d = image->data + dy*image->width*4 + dx; - dwi = (image->width - width)*4; - } else { - d = image->data + dy*image->width*3 + dx; - dwi = (image->width - width)*3; - } - for (y=0; y < height; y++) { for (x=0; x < width; x++) { *d = (((int)*d *(int)COP) + ((int)*s *(int)OP))/256; @@ -414,7 +410,10 @@ RCombineAreaWithOpaqueness(RImage *image, RImage *src, int sx, int sy, } #undef COP } else { - int tmp; + int tmp; + + s = src->data + sy*src->width*4; + swi = (src->width - width) * 4; for (y=0; y < height; y++) { for (x=0; x < width; x++) {