--- ddbd.m.orig 2004-12-03 06:33:39.742385824 +0100 +++ ddbd.m 2004-12-03 06:40:15.835170568 +0100 @@ -80,7 +80,9 @@ fm = [NSFileManager defaultManager]; nc = [NSNotificationCenter defaultCenter]; +#ifdef HAVE_SQLITE db = NULL; +#endif conn = [NSConnection defaultConnection]; [conn setRootObject: self]; @@ -181,7 +183,11 @@ - (BOOL)dbactive { +#ifdef HAVE_SQLITE return (db != NULL); +#else + return NO; +#endif } - (BOOL)insertPath:(NSString *)path @@ -504,9 +510,10 @@ toPath:(NSString *)dst { CREATE_AUTORELEASE_POOL(pool); - NSDictionary *attrs = [fm fileAttributesAtPath: dst traverseLink: NO]; BOOL resok = NO; - +#ifdef HAVE_SQLITE + NSDictionary *attrs = [fm fileAttributesAtPath: dst traverseLink: NO]; + if (attrs) { NSMutableString *query = [NSMutableString string]; NSArray *results = nil; @@ -556,7 +563,8 @@ resok = [self performWriteQuery: query]; } } - +#endif + RELEASE (pool); return resok; @@ -573,6 +581,8 @@ [lock unlock]; return YES; +#else + return NO; #endif } @@ -622,7 +632,11 @@ - (BOOL)checkPath:(NSString *)path { +#ifdef HAVE_SQLITE return ((db != NULL) && checkPathInDb(db, path)); +#else + return NO; +#endif } - (void)connectionBecameInvalid:(NSNotification *)notification @@ -717,6 +731,7 @@ - (void)testCreateDB { +#ifdef HAVE_SQLITE NSString *dbPath = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) lastObject]; NSString *testpath = @"/home/enrico/Butt/GNUstep/CopyPix"; NSString *imgpath = @"/home/enrico/Butt/GNUstep/CopyPix/Calculator.tiff"; @@ -767,6 +782,7 @@ NSLog(@"DONE"); exit(0); +#endif } - (void)testWriteImage