diff --git a/ChangeLog b/ChangeLog index 9d93a22cc4..45620274d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2025-05-29 Gregory John Casamento + + * config.make.in + * configure + * configure.ac + * Headers/Additions/GNUstepGUI/config.h.in + * Headers/AppKit/NSMovie.h + * Headers/AppKit/NSMovieView.h + * Source/GNUmakefile + * Source/GNUmakefile.preamble + * Source/GSMovieView.h + * Source/GSMovieView.m + * Source/NSMovie.m + * Source/NSMovieView.m + * Source/NSSound.m: Cleanup NSSound, add support for playing ffmpeg + movies using NSMovie, NSMovieView. + 2025-04-30 Gregory John Casamento * Headers/AppKit/NSColorSpace.h: Add NSColorSpaceModel* enumerated values. diff --git a/Headers/Additions/GNUstepGUI/config.h.in b/Headers/Additions/GNUstepGUI/config.h.in index 64f2cbcab1..a99ede2be4 100644 --- a/Headers/Additions/GNUstepGUI/config.h.in +++ b/Headers/Additions/GNUstepGUI/config.h.in @@ -148,6 +148,9 @@ /* MagickCore >= 7 */ #undef MAGICKCORE_7_OR_NEWER +/* avcodec */ +#undef HAVE_AVCODEC + /* mntent structure member name */ #undef MNT_FSNAME diff --git a/Headers/AppKit/NSMovie.h b/Headers/AppKit/NSMovie.h index 657be1159c..f3df3a489d 100644 --- a/Headers/AppKit/NSMovie.h +++ b/Headers/AppKit/NSMovie.h @@ -4,6 +4,8 @@ Copyright (C) 2003 Free Software Foundation, Inc. + Author: Gregory John Casamento + Date: May 2025 Author: Fred Kiefer Date: March 2003 @@ -41,19 +43,49 @@ APPKIT_EXPORT_CLASS @interface NSMovie : NSObject { @private - NSData* _movie; - NSURL* _url; + NSData* _movie; + NSURL* _url; + BOOL _tmp; } +/** + * An array of all of the types NSMovie can support. + */ + (NSArray*) movieUnfilteredFileTypes; + +/** + * An array of all of the pasteboard types NSMovie can support. + */ + (NSArray*) movieUnfilteredPasteboardTypes; + +/** + * Returns YES, if the object can be initialized with the given pasteboard. + */ + (BOOL) canInitWithPasteboard: (NSPasteboard*)pasteboard; -- (id) initWithMovie: (void*)movie; -- (id) initWithURL: (NSURL*)url byReference: (BOOL)byRef; -- (id) initWithPasteboard: (NSPasteboard*)pasteboard; +/** + * Returns an NSMovie with the raw data pointed to by movie. + */ +- (instancetype) initWithMovie: (void*)movie; + +/** + * Returns an NSMovie with the given URL. byRef should be YES if it is by reference. + */ +- (instancetype) initWithURL: (NSURL*)url byReference: (BOOL)byRef; +/** + * Returns an NSMovie initialized with the pasteboard passed in. + */ +- (instancetype) initWithPasteboard: (NSPasteboard*)pasteboard; + +/** + * Returns the raw data for the movie. + */ - (void*) QTMovie; + +/** + * Returns the URL of the movie to be played. + */ - (NSURL*) URL; @end diff --git a/Headers/AppKit/NSMovieView.h b/Headers/AppKit/NSMovieView.h index dc96935b3c..ea6202dcfd 100644 --- a/Headers/AppKit/NSMovieView.h +++ b/Headers/AppKit/NSMovieView.h @@ -4,6 +4,8 @@ Copyright (C) 2003 Free Software Foundation, Inc. + Author: Gregory John Casamento + Date: May 2025 Author: Fred Kiefer Date: March 2003 @@ -28,10 +30,12 @@ #ifndef _GNUstep_H_NSMovieView #define _GNUstep_H_NSMovieView -#import +#import +#import #import +@class NSTextField; @class NSMovie; typedef enum { @@ -43,66 +47,213 @@ typedef enum { APPKIT_EXPORT_CLASS @interface NSMovieView : NSView { - @protected - NSMovie* _movie; - float _rate; - float _volume; - struct NSMovieViewFlags { - unsigned int muted: 1; - unsigned int loopMode: 3; - unsigned int plays_selection_only: 1; - unsigned int plays_every_frame: 1; - unsigned int is_controller_visible: 1; - unsigned int editable: 1; - unsigned int reserved: 24; - } _flags; + IBOutlet NSTextField *_statusField; + NSMovie* _movie; + + float _rate; + float _volume; + BOOL _playing; + struct NSMovieViewFlags { + unsigned int muted: 1; + unsigned int loopMode: 3; + unsigned int plays_selection_only: 1; + unsigned int plays_every_frame: 1; + unsigned int is_controller_visible: 1; + unsigned int editable: 1; + unsigned int reserved: 24; + } _flags; } +/** + * Set the movie to be displayed in the view. + */ - (void) setMovie: (NSMovie*)movie; + +/** + * Get the current movie displayed in the view. + */ - (NSMovie*) movie; -- (void) start: (id)sender; -- (void) stop: (id)sender; +/** + * Start movie playback. + */ +- (IBAction) start: (id)sender; + +/** + * Stop movie playback. + */ +- (IBAction) stop: (id)sender; + +/** + * Check whether the movie is currently playing. + */ - (BOOL) isPlaying; -- (void) gotoPosterFrame: (id)sender; -- (void) gotoBeginning: (id)sender; -- (void) gotoEnd: (id)sender; -- (void) stepForward: (id)sender; -- (void) stepBack: (id)sender; +/** + * Go to the movie's poster frame. + */ +- (IBAction) gotoPosterFrame: (id)sender; + +/** + * Move to the beginning of the movie. + */ +- (IBAction) gotoBeginning: (id)sender; + +/** + * Move to the end of the movie. + */ +- (IBAction) gotoEnd: (id)sender; + +/** + * Step forward one frame in the movie. + */ +- (IBAction) stepForward: (id)sender; +/** + * Step backward one frame in the movie. + */ +- (IBAction) stepBack: (id)sender; + +/** + * Set the playback rate for the movie. + */ - (void) setRate: (float)rate; + +/** + * Get the current playback rate. + */ - (float) rate; +/** + * Set the playback volume. + */ - (void) setVolume: (float)volume; + +/** + * Get the current playback volume. + */ - (float) volume; + +/** + * Mute or unmute the playback. + */ - (void) setMuted: (BOOL)mute; + +/** + * Return whether the playback is muted. + */ - (BOOL) isMuted; +/** + * Set the loop mode for playback. + */ - (void) setLoopMode: (NSQTMovieLoopMode)mode; + +/** + * Get the current loop mode. + */ - (NSQTMovieLoopMode) loopMode; + +/** + * Set whether only the selected portion should play. + */ - (void) setPlaysSelectionOnly: (BOOL)flag; + +/** + * Return whether only the selection is played. + */ - (BOOL) playsSelectionOnly; + +/** + * Set whether to play every frame regardless of timing. + */ - (void) setPlaysEveryFrame: (BOOL)flag; + +/** + * Return whether every frame is being played. + */ - (BOOL) playsEveryFrame; +/** + * Show or hide the movie controller and optionally adjust view size. + */ - (void) showController: (BOOL)show adjustingSize: (BOOL)adjustSize; + +/** + * Get a pointer to the movie controller. + */ - (void*) movieController; + +/** + * Check whether the controller is currently visible. + */ - (BOOL) isControllerVisible; +/** + * Get the rectangle in which the movie is displayed. + */ - (NSRect) movieRect; + +/** + * Resize the view based on a magnification factor. + */ - (void) resizeWithMagnification: (float)magnification; + +/** + * Calculate the size of the view at a given magnification. + */ - (NSSize) sizeForMagnification: (float)magnification; +/** + * Set whether the movie view is editable. + */ - (void) setEditable: (BOOL)editable; + +/** + * Return whether the movie view is editable. + */ - (BOOL) isEditable; -- (void) cut: (id)sender; -- (void) copy: (id)sender; -- (void) paste: (id)sender; -- (void) clear: (id)sender; -- (void) undo: (id)sender; -- (void) selectAll: (id)sender; +/** + * Cut the selected movie content. + */ +- (IBAction) cut: (id)sender; + +/** + * Copy the selected movie content. + */ +- (IBAction) copy: (id)sender; + +/** + * Paste movie content from the pasteboard. + */ +- (IBAction) paste: (id)sender; + +/** + * Clear the selected movie content. + */ +- (IBAction) clear: (id)sender; + +/** + * Undo the last operation. + */ +- (IBAction) undo: (id)sender; + +/** + * Select all content in the movie view. + */ +- (IBAction) selectAll: (id)sender; + +/** + * GNUstep extension, this allows the user to set a + * text field to monitor the status of the movie view. + */ +- (void) setStatusField: (id)field; + +/** + * GNUstep extension, get the status field. + */ +- (id) statusField; @end diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 51fb140bb8..b8fad0d7c8 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -376,6 +376,12 @@ GSCSEditVariableManager.m \ GSCSTableau.m \ GSColorSliderCell.m +ifeq ($(BUILD_MOVIE), yes) +libgnustep-gui_OBJC_FILES += GSMovieView.m +libgnustep-gui_OBJC_FILES += GSAudioPlayer.m +libgnustep-gui_OBJC_FILES += GSAVUtils.m +endif + # Turn off NSMenuItem warning that NSMenuItem conforms to , # but does not implement 's methods itself (it inherits # their implementation) diff --git a/Source/GNUmakefile.preamble b/Source/GNUmakefile.preamble index 183a8b073a..e6feaad3fb 100644 --- a/Source/GNUmakefile.preamble +++ b/Source/GNUmakefile.preamble @@ -52,7 +52,7 @@ endif ADDITIONAL_OBJCFLAGS = -Wall # Additional flags to pass to the C compiler -# ADDITIONAL_CFLAGS = +ADDITIONAL_CFLAGS += $(MOVIE_BASE_CFLAGS) $(SOUND_CFLAGS) # Additional include directories the compiler should search ADDITIONAL_INCLUDE_DIRS += -I../Headers/Additions -I../Headers \ @@ -62,7 +62,7 @@ ADDITIONAL_INCLUDE_DIRS += -I../Headers/Additions -I../Headers \ # ADDITIONAL_LDFLAGS = # Additional library directories the linker should search -# ADDITIONAL_LIB_DIRS = +ADDITIONAL_LIB_DIRS += $(MOVIE_BASE_LIBS) $(SOUND_LIBS) # # Sparc systems cannot load tiff files due to some problem compiling diff --git a/Source/GSAVUtils.h b/Source/GSAVUtils.h new file mode 100644 index 0000000000..a251def3dd --- /dev/null +++ b/Source/GSAVUtils.h @@ -0,0 +1,39 @@ +/** GSAVUtils + + Utilities to handle AVPacket structs + + Copyright (C) 2025 Free Software Foundation, Inc. + + Author: Gregory Casamento + Date: May 2025 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _GNUstep_H_GSAVUtils +#define _GNUstep_H_GSAVUtils + +/* FFmpeg headers */ +#include +#include + +NSDictionary *NSDictionaryFromAVPacket(AVPacket *packet); +AVPacket AVPacketFromNSDictionary(NSDictionary *dict); + +#endif // GSAVUtils... diff --git a/Source/GSAVUtils.m b/Source/GSAVUtils.m new file mode 100644 index 0000000000..8179335008 --- /dev/null +++ b/Source/GSAVUtils.m @@ -0,0 +1,65 @@ +/** GSAVUtils + + Utilities to handle AVPacket structs + + Copyright (C) 2025 Free Software Foundation, Inc. + + Author: Gregory Casamento + Date: May 2025 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#import +#import +#import + +#import "GSAVUtils.h" + +NSDictionary *NSDictionaryFromAVPacket(AVPacket *packet) +{ + NSData *data = [NSData dataWithBytes:packet->data length:packet->size]; + NSNumber *pts = [NSNumber numberWithLongLong:packet->pts]; + NSNumber *duration = [NSNumber numberWithInt:packet->duration]; + NSNumber *flags = [NSNumber numberWithInt:packet->flags]; + + return [NSDictionary dictionaryWithObjectsAndKeys: + data, @"data", + pts, @"pts", + duration, @"duration", + flags, @"flags", + nil]; +} + +AVPacket AVPacketFromNSDictionary(NSDictionary *dict) +{ + NSData *data = [dict objectForKey:@"data"]; + NSNumber *pts = [dict objectForKey:@"pts"]; + NSNumber *duration = [dict objectForKey:@"duration"]; + NSNumber *flags = [dict objectForKey:@"flags"]; + + AVPacket *packet = av_packet_alloc(); + packet->data = (uint8_t *)[data bytes]; + packet->size = (int)[data length]; + packet->pts = [pts longLongValue]; + packet->duration = [duration intValue]; + packet->flags = [flags intValue]; + + return *packet; +} diff --git a/Source/GSAudioPlayer.h b/Source/GSAudioPlayer.h new file mode 100644 index 0000000000..80a858ec5f --- /dev/null +++ b/Source/GSAudioPlayer.h @@ -0,0 +1,94 @@ +/** GSAudioPlayer + + This class is just a quick sound player for GSMovieView + + Copyright (C) 2003 Free Software Foundation, Inc. + + Author: Gregory John Casamento + Date: May 2025 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _GNUstep_H_GSAudioPlayer +#define _GNUstep_H_GSAudioPlayer + +#import "config.h" + +#import +#import "AppKit/NSMovieView.h" + +#include +#include + +/* FFmpeg headers */ +#include +#include +#include +#include +#include +#include +#include + +@class NSMutableArray; +@class NSThread; + +// Audio player for NSMovieView... +@interface GSAudioPlayer : NSObject +{ + AVCodecContext *_audioCodecCtx; + AVFrame *_audioFrame; + SwrContext *_swrCtx; + ao_device *_aoDev; + ao_sample_format _aoFmt; + int64_t _audioClock; + AVRational _timeBase; + float _volume; /* 0.0 to 1.0 */ + unsigned int _loopMode:3; + + NSMutableArray *_audioPackets; + NSThread *_audioThread; + + BOOL _running; + BOOL _started; + BOOL _muted; +} + +- (void) prepareWithFormatContext: (AVFormatContext *)formatCtx + streamIndex: (int)audioStreamIndex; + +- (void) decodePacket: (AVPacket *)packet; +- (void) submitPacket: (AVPacket *)packet; +- (void) startAudio; +- (void) stopAudio; + +- (float) volume; +- (void) setVolume: (float)volume; + +- (NSQTMovieLoopMode) loopMode; +- (void) setLoopMode: (NSQTMovieLoopMode)mode; + +- (void) setMuted: (BOOL)muted; +- (BOOL) isMuted; +- (void) setPlaying: (BOOL)f; +- (BOOL) isPlaying; + +@end + +#endif // end of _GNUstep_H_GSAudioPlayer diff --git a/Source/GSAudioPlayer.m b/Source/GSAudioPlayer.m new file mode 100644 index 0000000000..d1109a292f --- /dev/null +++ b/Source/GSAudioPlayer.m @@ -0,0 +1,314 @@ +/** GSAudioPlayer + + Encapsulate a movie + + Copyright (C) 2025 Free Software Foundation, Inc. + + Author: Gregory Casamento + Date: May 2025 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#import "GSAudioPlayer.h" +#import "GSAVUtils.h" + +@implementation GSAudioPlayer +- (instancetype) init +{ + self = [super init]; + if (self != nil) + { + _audioCodecCtx = NULL; + _audioFrame = NULL; + _swrCtx = NULL; + _audioClock = 0; + _audioPackets = nil; + _audioThread = nil; + _running = NO; + _volume = 1.0; + _started = NO; + _loopMode = NSQTMovieNormalPlayback; + } + return self; +} + +- (void)dealloc +{ + [self stopAudio]; + + if (_audioFrame) + { + av_frame_free(&_audioFrame); + } + + if (_audioCodecCtx) + { + avcodec_free_context(&_audioCodecCtx); + } + + if (_swrCtx) + { + swr_free(&_swrCtx); + } + + if (_aoDev) + { + ao_close(_aoDev); + } + + RELEASE(_audioPackets); + + ao_shutdown(); + [super dealloc]; +} + +- (void) setPlaying: (BOOL)f +{ + _running = f; +} + +- (BOOL) isPlaying +{ + return _running; +} + +- (NSQTMovieLoopMode) loopMode +{ + return _loopMode; +} + +- (void) setLoopMode: (NSQTMovieLoopMode)mode +{ + _loopMode = mode; +} + +- (void) prepareWithFormatContext: (AVFormatContext *)formatCtx + streamIndex: (int)audioStreamIndex +{ + ao_initialize(); + int driver = ao_default_driver_id(); + int out_channels = 2; + + AVCodecParameters *audioPar = formatCtx->streams[audioStreamIndex]->codecpar; + const AVCodec *audioCodec = avcodec_find_decoder(audioPar->codec_id); + + if (!audioCodec) + { + NSLog(@"Audio codec not found."); + return; + } + + _audioCodecCtx = avcodec_alloc_context3(audioCodec); + avcodec_parameters_to_context(_audioCodecCtx, audioPar); + + if (avcodec_open2(_audioCodecCtx, audioCodec, NULL) < 0) + { + NSLog(@"Failed to open audio codec."); + return; + } + + _audioFrame = av_frame_alloc(); + swr_alloc_set_opts2(&_swrCtx, + &(AVChannelLayout){ .order = AV_CHANNEL_ORDER_NATIVE, + .nb_channels = out_channels, + .u.mask = AV_CH_LAYOUT_STEREO }, + AV_SAMPLE_FMT_S16, + _audioCodecCtx->sample_rate, + &_audioCodecCtx->ch_layout, + _audioCodecCtx->sample_fmt, + _audioCodecCtx->sample_rate, + 0, NULL); + int r = swr_init(_swrCtx); + if (r == 0) + { + NSLog(@"[GSAudioPlayer] WARNING: swr_init returned 0"); + } + + memset(&_aoFmt, 0, sizeof(ao_sample_format)); + _aoFmt.bits = 16; + _aoFmt.channels = out_channels; + _aoFmt.rate = _audioCodecCtx->sample_rate; + _aoFmt.byte_format = AO_FMT_NATIVE; + + _aoDev = ao_open_live(driver, &_aoFmt, NULL); + _timeBase = formatCtx->streams[audioStreamIndex]->time_base; + _audioClock = av_gettime(); + _audioPackets = [[NSMutableArray alloc] init]; + _running = YES; +} + +- (void)audioThreadEntry +{ + while (_running) + { + // create pool... + CREATE_AUTORELEASE_POOL(pool); + { + NSDictionary *dict = nil; + + @synchronized (_audioPackets) + { + if ([_audioPackets count] > 0) + { + dict = [[_audioPackets objectAtIndex:0] retain]; + [_audioPackets removeObjectAtIndex:0]; + } + } + + if (!_started && dict) + { + _audioClock = av_gettime(); + _started = YES; + } + + if (dict) + { + AVPacket packet = AVPacketFromNSDictionary(dict); + int64_t packetTime = av_rescale_q(packet.pts, _timeBase, (AVRational){1, 1000000}); + int64_t now = av_gettime() - _audioClock; + int64_t delay = packetTime - now; + + if (delay > 0) + { + usleep((useconds_t)delay); // + 50000); + } + + [self decodePacket:&packet]; + [dict release]; + } + else + { + usleep(1000); + } + } + RELEASE(pool); + } +} + +- (void)decodePacket: (AVPacket *)packet +{ + if (!_audioCodecCtx || !_swrCtx || !_aoDev) + { + return; + } + + if (avcodec_send_packet(_audioCodecCtx, packet) < 0) + { + return; + } + + if (packet->flags & AV_PKT_FLAG_CORRUPT) + { + NSLog(@"Skipping corrupt audio packet"); + return; + } + + while (avcodec_receive_frame(_audioCodecCtx, _audioFrame) == 0) + { + int outSamples = _audioFrame->nb_samples; + int outBytes = av_samples_get_buffer_size(NULL, 2, outSamples, AV_SAMPLE_FMT_S16, 1); + uint8_t *outBuf = (uint8_t *) malloc(outBytes); + uint8_t *outPtrs[] = { outBuf }; + + swr_convert(_swrCtx, outPtrs, outSamples, + (const uint8_t **) _audioFrame->data, + outSamples); + + // Apply volume + int16_t *samples = (int16_t *)outBuf; + int i = 0; + for (i = 0; i < outBytes / 2; ++i) + { + if ([self isMuted]) + { + samples[i] = 0.0; + } + else + { + samples[i] = samples[i] * _volume; + } + } + + ao_play(_aoDev, (char *) outBuf, outBytes); + free(outBuf); + } +} + +- (void) submitPacket: (AVPacket *)packet +{ + NSDictionary *dict = NSDictionaryFromAVPacket(packet); + @synchronized (_audioPackets) + { + [_audioPackets addObject: dict]; + } +} + +- (void) startAudio +{ + _running = YES; + NSLog(@"[GSAudioPlayer] Starting audio thread | Timestamp: %ld", av_gettime()); + _audioThread = [[NSThread alloc] initWithTarget:self selector:@selector(audioThreadEntry) object:nil]; + [_audioThread start]; +} + +- (void) stopAudio +{ + _running = NO; + [_audioThread cancel]; + + while ([_audioThread isFinished] == NO) + { + usleep(1000); + } + + DESTROY(_audioThread); +} + +- (void) setVolume: (float)volume +{ + if (volume < 0.0) + { + volume = 0.0; + } + + if (volume > 1.0) + { + volume = 1.0; + } + + _volume = volume; +} + +- (float) volume +{ + return _volume; +} + +- (void) setMuted: (BOOL)muted +{ + _muted = muted; +} + +- (BOOL) isMuted +{ + return _muted; +} + +@end diff --git a/Source/GSMovieView.h b/Source/GSMovieView.h new file mode 100644 index 0000000000..b437a9f58f --- /dev/null +++ b/Source/GSMovieView.h @@ -0,0 +1,94 @@ +/** NSMovieView + + Encapsulate a view for Quicktime movies + + Copyright (C) 2003 Free Software Foundation, Inc. + + Author: Gregory John Casamento + Date: May 2025 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _GNUstep_H_GSMovieView +#define _GNUstep_H_GSMovieView + +#import "config.h" +#import "AppKit/NSMovieView.h" + +#include +#include + +/* FFmpeg headers */ +#include +#include +#include +#include +#include +#include +#include + +@class NSImage; +@class NSTimer; +@class GSAudioPlayer; + +APPKIT_EXPORT_CLASS +@interface GSMovieView : NSMovieView +{ + NSMutableArray *_videoPackets; + NSThread *_videoThread; + NSThread *_feedThread; + NSImage *_currentFrame; + NSString *_statusString; + GSAudioPlayer *_audioPlayer; + + AVCodecContext *_videoCodecCtx; + AVFrame *_videoFrame; + AVFormatContext *_formatCtx; + AVStream *_stream; + struct SwsContext *_swsCtx; + AVRational _timeBase; + + BOOL _running; // is the loop currently running... + BOOL _started; // has the video started... + int64_t _videoClock; + int _videoStreamIndex; + int _audioStreamIndex; + int64_t _lastPts; + CGFloat _fps; +} + +// Initialization... +- (void) prepareWithFormatContext: (AVFormatContext *)formatCtx + streamIndex: (int)videoStreamIndex; + +// Submit packets... +- (void) submitPacket: (AVPacket *)packet; +- (void) decodePacket: (AVPacket *)packet; + +// Main loop to process packets... +- (void) renderFrame: (AVFrame *)videoFrame; +- (void) feed; +- (BOOL) setup; +- (void) loop; +- (void) close; + +@end + +#endif /* _GNUstep_H_GSMovieView */ diff --git a/Source/GSMovieView.m b/Source/GSMovieView.m new file mode 100644 index 0000000000..339b506741 --- /dev/null +++ b/Source/GSMovieView.m @@ -0,0 +1,661 @@ +/** GSMovieView + + Encapsulate a movie + + Copyright (C) 2025 Free Software Foundation, Inc. + + Author: Gregory Casamento + Date: May 2025 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; see the file COPYING.LIB. + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#import "config.h" + +#import +#import +#import +#import +#import + +#import "AppKit/NSApplication.h" +#import "AppKit/NSColor.h" +#import "AppKit/NSGraphics.h" +#import "AppKit/NSImage.h" +#import "AppKit/NSImageRep.h" +#import "AppKit/NSMovie.h" +#import "AppKit/NSPasteboard.h" + +#import "GSMovieView.h" +#import "GSAudioPlayer.h" +#import "GSAVUtils.h" + +#define BUFFER_SIZE 2048 + +// Ignore the warning this will produce as it is intentional. +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation" + +// Category smash this method to get the proper types. +@interface NSMovie (AVCodec) +@end + +@implementation NSMovie (AVCodec) + ++ (NSArray*) movieUnfilteredFileTypes +{ + NSMutableSet *extensionsSet = [NSMutableSet set]; + void *opaque = NULL; + const AVOutputFormat *ofmt = NULL; + + // Iterate over all muxers + while ((ofmt = av_muxer_iterate(&opaque))) + { + if (ofmt->extensions) + { + NSString *extString = [NSString stringWithUTF8String:ofmt->extensions]; + NSArray *exts = [extString componentsSeparatedByString:@","]; + [extensionsSet addObjectsFromArray: exts]; + } + } + + // Convert to sorted array + return [[extensionsSet allObjects] sortedArrayUsingSelector:@selector(compare:)]; +} + ++ (NSArray*) movieUnfilteredPasteboardTypes +{ + NSMutableSet *result = [NSMutableSet set]; + const AVCodec *codec = NULL; + void *i = 0; + + while ((codec = av_codec_iterate(&i))) + { + if (av_codec_is_decoder(codec) && codec->type == AVMEDIA_TYPE_VIDEO) + { + [result addObject: [NSString stringWithUTF8String: codec->name]]; + } + } + + // Convert to sorted array + return [[result allObjects] sortedArrayUsingSelector:@selector(compare:)]; +} + +@end + +#pragma clang diagnostic pop + +// NSMovieView subclass that does all of the actual work of decoding... +@implementation GSMovieView + +- (instancetype) initWithFrame: (NSRect)frame +{ + self = [super initWithFrame: frame]; + if (self != nil) + { + // Objects... + _currentFrame = nil; + _videoThread = nil; + _feedThread = nil; + _audioPlayer = [[GSAudioPlayer alloc] init]; + _videoPackets = [[NSMutableArray alloc] init]; + + // AV... + _videoClock = 0; + _videoCodecCtx = NULL; + _formatCtx = NULL; + _swsCtx = NULL; + _stream = NULL; + _lastPts = 0; + _fps = 0.0; + + // Flags... + _running = NO; + _started = NO; + } + return self; +} + +- (void)dealloc +{ + [self stop: nil]; + + // Cancel thread, dealloc av structs... + if (_feedThread) + { + [_feedThread cancel]; + } + + if (_videoFrame) + { + av_frame_free(&_videoFrame); + } + + if (_videoCodecCtx) + { + avcodec_free_context(&_videoCodecCtx); + } + + if (_swsCtx) + { + sws_freeContext(_swsCtx); + } + + // Destroy objects + DESTROY(_feedThread); + DESTROY(_videoPackets); + DESTROY(_audioPlayer); + DESTROY(_currentFrame); + + [super dealloc]; +} + +// Private methods... +- (void) _startFeed +{ + if (_running == NO) + { + [self setRate: 1.0 / 30.0]; + [self setVolume: 1.0]; + + _feedThread = [[NSThread alloc] initWithTarget:self selector:@selector(feed) object:nil]; + [_feedThread start]; + [_audioPlayer startAudio]; + } +} + +- (void) _stopFeed +{ + if (_running == YES) + { + [_feedThread cancel]; + [_audioPlayer stopAudio]; + } +} + +// Overridden methods from the superclass... +- (BOOL) isPlaying +{ + return _running; +} + +- (IBAction) start: (id)sender +{ + NSLog(@"[GSMovieView] Starting video thread | Timestamp: %ld, lastPts = %ld", + av_gettime(), _lastPts); + + if (_feedThread != nil) + { + if (!_running) + { + _running = YES; + _videoThread = [[NSThread alloc] initWithTarget:self + selector:@selector(videoThreadEntry) + object:nil]; + [_videoThread start]; + [_audioPlayer startAudio]; + } + } + else + { + [self _startFeed]; + } +} + +- (IBAction) stop: (id)sender +{ + NSLog(@"[GSMovieView] Stopping video thread | Timestamp: %ld, lastPts = %ld", + av_gettime(), _lastPts); + + if (_running) + { + _running = NO; + + [_videoThread cancel]; + [_audioPlayer stopAudio]; + [self _stopFeed]; + while (![_videoThread isFinished]) + { + usleep(1000); + } + + DESTROY(_videoThread); + avformat_close_input(&_formatCtx); + } +} + +- (void) setMuted: (BOOL)muted +{ + [super setMuted: muted]; + [_audioPlayer setMuted: muted]; +} + +- (void) setVolume: (float)volume +{ + [super setVolume: volume]; + [_audioPlayer setVolume: volume]; +} + +/* +- (void) setLoopMode: (NSQTMovieLoopMode)mode +{ + [super setLoopMode: mode]; +} +*/ + +- (void) setMovie: (NSMovie *)movie +{ + @synchronized(_movie) + { + [super setMovie: movie]; + [self setup]; + } +} + +- (NSRect) movieRect +{ + NSRect result = NSZeroRect; + + if (_stream != NULL) + { + // Retrieve codec parameters + AVCodecParameters* codecpar = _stream->codecpar; + + // These are your video dimensions: + CGFloat width = (CGFloat)(codecpar->width); + CGFloat height = (CGFloat)(codecpar->height); + + result = NSMakeRect(0.0, 0.0, width, height); + } + + return result; +} + +- (IBAction)gotoPosterFrame: (id)sender +{ + [self stop: sender]; + // [self _startAtPts: 0]; + NSLog(@"[GSMovieView] gotoPosterFrame called | Timestamp: %ld", av_gettime()); +} + +- (IBAction)gotoBeginning: (id)sender +{ + [self stop: sender]; + // [self _startAtPts: 0]; + NSLog(@"[GSMovieView] gotoBeginning called | Timestamp: %ld", av_gettime()); +} + +- (IBAction)gotoEnd: (id)sender +{ +} + +- (IBAction) stepForward: (id)sender +{ +} + +- (IBAction) stepBack: (id)sender +{ +} + +// Video playback methods... +- (void) updateImage: (NSImage *)image +{ + ASSIGN(_currentFrame, image); + [self setNeedsDisplay:YES]; +} + +- (void) drawRect: (NSRect)dirtyRect +{ + [super drawRect: dirtyRect]; + if (_currentFrame) + { + [_currentFrame drawInRect: [self bounds]]; + } +} + +- (BOOL) setup +{ + NSMovie *movie = [self movie]; + + if (movie != nil) + { + NSURL *url = [movie URL]; + + if (url != nil) + { + const char *path = [[url path] UTF8String]; + + NSLog(@"[Info] Opening file: %s | Timestamp: %ld", path, av_gettime()); + avformat_network_init(); + if (avformat_open_input(&_formatCtx, path, NULL, NULL) != 0) + { + NSLog(@"[Error] Could not open file: %s | Timestamp: %ld", path, av_gettime()); + return NO; + } + + if (avformat_find_stream_info(_formatCtx, NULL) < 0) + { + NSLog(@"[Error] Could not find stream info. | Timestamp: %ld", av_gettime()); + avformat_close_input(&_formatCtx); + return NO; + } + + _videoStreamIndex = -1; + for (unsigned int i = 0; i < _formatCtx->nb_streams; i++) + { + if (_formatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) + { + _stream = _formatCtx->streams[i]; + _videoStreamIndex = i; + break; + } + } + + _audioStreamIndex = -1; + for (unsigned int i = 0; i < _formatCtx->nb_streams; i++) + { + if (_formatCtx->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) + { + _audioStreamIndex = i; + break; + } + } + + // Video stream... + if (_videoStreamIndex == -1) + { + NSLog(@"[Info] No video stream found. | Timestamp: %ld", av_gettime()); + } + else + { + [self prepareWithFormatContext: _formatCtx + streamIndex: _videoStreamIndex]; + } + + // Audio stream... + if (_audioStreamIndex == -1) // if we do have an audio stream, initialize it... otherwise log it + { + NSLog(@"[Info] No audio stream found. | Timestamp: %ld", av_gettime()); + } + else + { + [_audioPlayer prepareWithFormatContext: _formatCtx + streamIndex: _audioStreamIndex]; + } + + // Video and Audio stream not present... + if (_videoStreamIndex == -1 && _audioStreamIndex == -1) + { + NSLog(@"[Error] No video or audio stream detected, exiting"); + avformat_close_input(&_formatCtx); + return NO; + } + } + } + + return YES; +} + +- (void) loop +{ + if (_formatCtx != NULL) + { + AVPacket packet; + int64_t i = 0; + + while (av_read_frame(_formatCtx, &packet) >= 0) + { + // After BUFFER_SIZE frames, start the thread... + if (i == BUFFER_SIZE) + { + [self start: nil]; + } + + if (packet.stream_index == _videoStreamIndex) + { + [self submitPacket: &packet]; + } + + if (packet.stream_index == _audioStreamIndex) + { + [_audioPlayer submitPacket: &packet]; + } + + av_packet_unref(&packet); + i++; + } + + // if we had a very short video... play it. + if (i < BUFFER_SIZE) + { + NSLog(@"[GSMovieView] Starting short video... | Timestamp: %ld", av_gettime()); + [self start: nil]; + } + } +} + +- (void) close +{ + if (_formatCtx != NULL) + { + avformat_close_input(&_formatCtx); + } +} + +- (void) feed +{ + if (_stream != NULL) + { + [self loop]; + [self close]; + } +} + +- (void)prepareWithFormatContext: (AVFormatContext *)formatCtx streamIndex: (int)videoStreamIndex +{ + AVStream *videoStream = formatCtx->streams[videoStreamIndex]; + AVCodecParameters *videoPar = videoStream->codecpar; + const AVCodec *videoCodec = avcodec_find_decoder(videoPar->codec_id); + AVRational fr = videoStream->avg_frame_rate; + + _stream = videoStream; + _fps = av_q2d(fr); + if (!videoCodec) + { + NSLog(@"[Error] Unsupported video codec. | Timestamp: %ld", av_gettime()); + return; + } + + _videoCodecCtx = avcodec_alloc_context3(videoCodec); + avcodec_parameters_to_context(_videoCodecCtx, videoPar); + if (avcodec_open2(_videoCodecCtx, videoCodec, NULL) < 0) + { + NSLog(@"[Error] Failed to open video codec. | Timestamp: %ld", av_gettime()); + return; + } + + // Configure the codec... + _videoCodecCtx->thread_count = 4; + _videoCodecCtx->thread_type = FF_THREAD_FRAME; + _videoFrame = av_frame_alloc(); + _swsCtx = sws_getContext(videoPar->width, + videoPar->height, + _videoCodecCtx->pix_fmt, + videoPar->width, + videoPar->height, + AV_PIX_FMT_RGB24, + SWS_BILINEAR, + NULL, NULL, NULL); + + _timeBase = formatCtx->streams[videoStreamIndex]->time_base; + _videoPackets = [[NSMutableArray alloc] init]; + _videoClock = av_gettime(); + _running = NO; + _started = NO; +} + +- (void) setPlaying: (BOOL)f +{ + _running = f; +} + +- (void)submitPacket: (AVPacket *)packet +{ + NSDictionary *dict = NSDictionaryFromAVPacket(packet); + @synchronized (_videoPackets) + { + [_videoPackets addObject: dict]; + } +} + +- (void)videoThreadEntry +{ + while (_running) + { + // Create pool... + CREATE_AUTORELEASE_POOL(pool); + { + NSDictionary *dict = nil; + + // Pop the video packet off _videoPackets, sync on + // the array. + @synchronized (_videoPackets) + { + if ([_videoPackets count] > 0) + { + dict = RETAIN([_videoPackets objectAtIndex: 0]); + [_videoPackets removeObjectAtIndex: 0]; + } + } + + // If the dict is present and the thread is started, get + // the clock. + if (!_started && dict) + { + _videoClock = av_gettime(); + _started = YES; + } + + // If dict is not nil, decode it and get the frame... + if (dict) + { + AVPacket packet = AVPacketFromNSDictionary(dict); + + // If the current pts is at or after the saved, + // then alow it to be decoded and displayed... + int64_t packetTime = av_rescale_q(packet.pts, + _timeBase, + (AVRational){1, 1000000}); + int64_t now = av_gettime() - _videoClock; + int64_t delay = packetTime - now; + + if (_statusField != nil) + { + // Show the information... + _statusString = [NSString stringWithFormat: @"Rendering video frame PTS: %ld | Delay: %ld us | %@", + packet.pts, delay, _running ? @"Running" : @"Stopped"]; + [_statusField setStringValue: _statusString]; + } + + // Show status on the command line... + fprintf(stderr, "[GSMovieView] Rendering video frame PTS: %ld | Delay: %ld us\r", + packet.pts, delay); + if (delay > 0) + { + usleep((useconds_t)delay); + } + + // Decode the packet, display it and play the sound... + [self decodePacket: &packet]; + RELEASE(dict); + } + } + RELEASE(pool); + } +} + +- (void) renderFrame: (AVFrame *)videoFrame +{ + uint8_t *rgbData[1]; + int rgbLineSize[1]; + int width = _videoCodecCtx->width; + int height = _videoCodecCtx->height; + + rgbLineSize[0] = width * 3; + rgbData[0] = (uint8_t *)malloc(height * rgbLineSize[0]); + + sws_scale(_swsCtx, + (const uint8_t * const *)videoFrame->data, + videoFrame->linesize, + 0, + height, + rgbData, + rgbLineSize); + + NSBitmapImageRep *bitmap = [[NSBitmapImageRep alloc] + initWithBitmapDataPlanes: &rgbData[0] + pixelsWide: width + pixelsHigh: height + bitsPerSample: 8 + samplesPerPixel: 3 + hasAlpha: NO + isPlanar: NO + colorSpaceName: NSCalibratedRGBColorSpace + bytesPerRow: rgbLineSize[0] + bitsPerPixel: 24]; + + NSImage *image = [[NSImage alloc] initWithSize: NSMakeSize(width, height)]; + [image addRepresentation: bitmap]; + [self performSelectorOnMainThread: @selector(updateImage:) + withObject: image + waitUntilDone: NO]; + + RELEASE(image); + RELEASE(bitmap); + free(rgbData[0]); +} + +- (void) decodePacket: (AVPacket *)packet +{ + if (!_videoCodecCtx || !_swsCtx) + { + return; + } + + if (avcodec_send_packet(_videoCodecCtx, packet) < 0) + { + return; + } + + if (packet->flags & AV_PKT_FLAG_CORRUPT) + { + NSLog(@"Skipping corrupt video packet"); + return; + } + + // Record last pts... + _lastPts = packet->pts; + + while (avcodec_receive_frame(_videoCodecCtx, _videoFrame) == 0) + { + [self renderFrame: _videoFrame]; + } +} + +@end diff --git a/Source/NSMovie.m b/Source/NSMovie.m index 2c5a8ded27..32273825b9 100644 --- a/Source/NSMovie.m +++ b/Source/NSMovie.m @@ -4,6 +4,8 @@ Copyright (C) 2003 Free Software Foundation, Inc. + Author: Gregory John Casamento + Date: May 2025 Author: Fred Kiefer Date: March 2003 @@ -21,8 +23,8 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ @@ -30,20 +32,38 @@ #import #import #import +#import +#import + #import "AppKit/NSMovie.h" #import "AppKit/NSPasteboard.h" +NSString *_writeDataToTempFile(NSData *data) +{ + NSString *tempDirectory = NSTemporaryDirectory(); + NSString *filename = [NSString stringWithFormat: @"tmpfile-%@.dat", [[NSUUID UUID] UUIDString]]; + NSString *filepath = [tempDirectory stringByAppendingPathComponent: filename]; + NSError *error = nil; + + BOOL success = [data writeToFile: filepath options: NSDataWritingAtomic error: &error]; + if (success) + { + return nil; + } + + return filepath; +} + @implementation NSMovie + (NSArray*) movieUnfilteredFileTypes { - return [NSArray arrayWithObject: @"mov"]; + return [NSArray array]; } + (NSArray*) movieUnfilteredPasteboardTypes { - // FIXME - return [NSArray arrayWithObject: @"QuickTimeMovie"]; + return [NSArray array]; } + (BOOL) canInitWithPasteboard: (NSPasteboard*)pasteboard @@ -54,55 +74,61 @@ + (BOOL) canInitWithPasteboard: (NSPasteboard*)pasteboard return ([pbTypes firstObjectCommonWithArray: myTypes] != nil); } -- (id) initWithData: (NSData *)movie +- (instancetype) initWithData: (NSData *)movie { if (movie == nil) { RELEASE(self); return nil; } - - [super init]; - ASSIGN(_movie, movie); - return self; -} + self = [super init]; + if (self != nil) + { + NSString *filepath = _writeDataToTempFile(_movie); -- (id) initWithMovie: (void*)movie -{ - //FIXME + _url = [NSURL fileURLWithPath: filepath]; + _tmp = YES; + ASSIGN(_movie, movie); + } return self; } -- (id) initWithURL: (NSURL*)url byReference: (BOOL)byRef +- (instancetype) initWithMovie: (void*)movie { - NSData* data = [url resourceDataUsingCache: YES]; - - self = [self initWithData: data]; + return [self initWithData: movie]; +} - if (byRef) +- (instancetype) initWithURL: (NSURL*)url byReference: (BOOL)byRef +{ + self = [super init]; + if (self != nil) { + if (url == nil) + { + return nil; + } + ASSIGN(_url, url); } return self; } -- (id) initWithPasteboard: (NSPasteboard*)pasteboard +- (instancetype) initWithPasteboard: (NSPasteboard*)pasteboard { NSString *type; NSData* data; - type = [pasteboard availableTypeFromArray: - [object_getClass(self) movieUnfilteredPasteboardTypes]]; + type = + [pasteboard availableTypeFromArray: + [object_getClass(self) movieUnfilteredPasteboardTypes]]; if (type == nil) { - //NSArray *array = [pasteboard propertyListForType: NSFilenamesPboardType]; - // FIXME data = nil; } - else + else { data = [pasteboard dataForType: type]; } @@ -120,9 +146,11 @@ - (id) initWithPasteboard: (NSPasteboard*)pasteboard - (void) dealloc { + _tmp = NO; + [[NSFileManager defaultManager] removeFileAtPath: [_url path] handler: nil]; TEST_RELEASE(_url); TEST_RELEASE(_movie); - + [super dealloc]; } @@ -160,7 +188,7 @@ - (void) encodeWithCoder: (NSCoder*)aCoder } } -- (id) initWithCoder: (NSCoder*)aDecoder +- (instancetype) initWithCoder: (NSCoder*)aDecoder { if ([aDecoder allowsKeyedCoding]) { diff --git a/Source/NSMovieView.m b/Source/NSMovieView.m index a337a05529..93b6d5d3d3 100644 --- a/Source/NSMovieView.m +++ b/Source/NSMovieView.m @@ -4,6 +4,8 @@ Copyright (C) 2003 Free Software Foundation, Inc. + Author: Gregory John Casamento + Date: May 2025 Author: Fred Kiefer Date: March 2003 @@ -21,20 +23,63 @@ You should have received a copy of the GNU Lesser General Public License along with this library; see the file COPYING.LIB. - If not, see or write to the - Free Software Foundation, 51 Franklin Street, Fifth Floor, + If not, see or write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#import "config.h" + #import #import +#import #import + +#import "AppKit/NSColor.h" +#import "AppKit/NSGraphics.h" +#import "AppKit/NSImage.h" +#import "AppKit/NSImageRep.h" #import "AppKit/NSMovie.h" #import "AppKit/NSMovieView.h" #import "AppKit/NSPasteboard.h" +#ifdef HAVE_AVCODEC +#import "GSMovieView.h" +#endif + @implementation NSMovieView +#ifdef HAVE_AVCODEC ++ (id) allocWithZone: (NSZone *)zone +{ + if (self == [NSMovieView class]) + { + return [GSMovieView allocWithZone: zone]; + } + return [super allocWithZone: zone]; +} +#endif + +- (instancetype) initWithFrame: (NSRect)frame +{ + self = [super initWithFrame: frame]; + if (self != nil) + { + _movie = nil; + _rate = 1.0; + _volume = 1.0; + + // Flags... + _flags.muted = NO; + _flags.loopMode = NSQTMovieNormalPlayback; + _flags.plays_selection_only = NO; + _flags.plays_every_frame = YES; + _flags.is_controller_visible = YES; + _flags.editable = NO; + } + return self; +} + - (void) setMovie: (NSMovie*)movie { ASSIGN(_movie, movie); @@ -45,45 +90,37 @@ - (NSMovie*) movie return _movie; } -- (void) start: (id)sender +- (IBAction) start: (id)sender { - //FIXME } -- (void) stop: (id)sender +- (IBAction) stop: (id)sender { - //FIXME } - (BOOL) isPlaying { - //FIXME - return NO; + return NO; } -- (void) gotoPosterFrame: (id)sender +- (IBAction) gotoPosterFrame: (id)sender { - //FIXME } -- (void) gotoBeginning: (id)sender +- (IBAction) gotoBeginning: (id)sender { - //FIXME } -- (void) gotoEnd: (id)sender +- (IBAction) gotoEnd: (id)sender { - //FIXME } -- (void) stepForward: (id)sender +- (IBAction) stepForward: (id)sender { - //FIXME } -- (void) stepBack: (id)sender +- (IBAction) stepBack: (id)sender { - //FIXME } - (void) setRate: (float)rate @@ -99,6 +136,14 @@ - (float) rate - (void) setVolume: (float)volume { _volume = volume; + if (volume <= 0.0) + { + _flags.muted = YES; + } + else if (volume > 0.0) + { + _flags.muted = NO; + } } - (float) volume @@ -148,13 +193,11 @@ - (BOOL) playsEveryFrame - (void) showController: (BOOL)show adjustingSize: (BOOL)adjustSize { - //FIXME - _flags.is_controller_visible = show; + _flags.is_controller_visible = show; } - (void*) movieController { - //FIXME return NULL; } @@ -170,11 +213,10 @@ - (NSRect) movieRect - (void) resizeWithMagnification: (float)magnification { - //FIXME } + - (NSSize) sizeForMagnification: (float)magnification { - //FIXME return NSMakeSize(0, 0); } @@ -188,34 +230,38 @@ - (BOOL) isEditable return _flags.editable; } -- (void) cut: (id)sender +- (IBAction) cut: (id)sender +{ +} + +- (IBAction) copy: (id)sender +{ +} + +- (IBAction) paste: (id)sender { - //FIXME } -- (void) copy: (id)sender +- (IBAction) clear: (id)sender { - //FIXME } -- (void) paste: (id)sender +- (IBAction) undo: (id)sender { - //FIXME } -- (void) clear: (id)sender +- (IBAction) selectAll: (id)sender { - //FIXME } -- (void) undo: (id)sender +- (void) setStatusField: (id)field { - //FIXME + ASSIGN(_statusField, field); } -- (void) selectAll: (id)sender +- (id) statusField { - //FIXME + return _statusField; } @end diff --git a/Source/NSSound.m b/Source/NSSound.m index 92ce12956c..d51adbcf3d 100644 --- a/Source/NSSound.m +++ b/Source/NSSound.m @@ -277,9 +277,9 @@ - (id) initWithData: (NSData *)data NSEnumerator *enumerator; Class sourceClass, sinkClass; - - _data = data; - RETAIN(_data); + + // Use new data... + ASSIGN(_data, data); // Search for an GSSoundSource bundle that can play this data. enumerator = [sourcePlugIns objectEnumerator]; @@ -298,9 +298,9 @@ - (id) initWithData: (NSData *)data } } - enumerator = [sinkPlugIns objectEnumerator]; /* FIXME: Grab the first available sink/device for now. In the future - look for what is set in the GSSoundDeviceBundle default first. */ + look for what is set in the GSSoundDeviceBundle default first. */ + enumerator = [sinkPlugIns objectEnumerator]; while ((sinkClass = [enumerator nextObject]) != nil) { if ([sinkClass canInitWithPlaybackDevice: nil]) @@ -335,7 +335,7 @@ - (id) initWithPasteboard: (NSPasteboard *)pasteboard if ([object_getClass(self) canInitWithPasteboard: pasteboard] == YES) { /* FIXME: Should this be @"NSGeneralPboardType" or @"NSSoundPboardType"? - Apple also defines "NSString *NSSoundPboardType". */ + Apple also defines "NSString *NSSoundPboardType". */ NSData *d = [pasteboard dataForType: @"NSGeneralPboardType"]; return [self initWithData: d]; } diff --git a/config.make.in b/config.make.in index f948caa0b6..a6c6b704c2 100644 --- a/config.make.in +++ b/config.make.in @@ -14,6 +14,16 @@ RECOGNIZER_BASE_LIBS=@RECOGNIZER_BASE_LIBS@ RECOGNIZER_BASE_CFLAGS=@RECOGNIZER_BASE_CFLAGS@ RECOGNIZER_ENGINE_CLASS=@RECOGNIZER_ENGINE_CLASS@ +# NSMovie +BUILD_MOVIE=@BUILD_MOVIE@ +MOVIE_BASE_LIBS=@MOVIE_BASE_LIBS@ +MOVIE_BASE_CFLAGS=@MOVIE_BASE_CFLAGS@ + +# Sound +BUILD_SOUND=@BUILD_SOUND@ +SOUND_LIBS=@SOUND_LIBS@ +SOUND_CFLAGS=@SOUND_CFLAGS@ + # CUPS GSCUPS_CFLAGS = @GSCUPS_CFLAGS@ GSCUPS_LDFLAGS = @GSCUPS_LDFLAGS@ diff --git a/configure b/configure index 70dc2161b3..9d5d1abc45 100755 --- a/configure +++ b/configure @@ -1,9 +1,10 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69. +# Generated by GNU Autoconf 2.71. # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -14,14 +15,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -31,46 +34,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -79,13 +82,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -94,8 +90,12 @@ case $0 in #(( 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -107,30 +107,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -152,20 +132,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -185,42 +167,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false 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 #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -228,14 +220,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -253,18 +252,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -291,6 +291,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -308,6 +309,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -322,7 +331,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -331,7 +340,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -370,12 +379,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -387,18 +397,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -410,9 +429,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -439,7 +458,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -483,7 +502,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -497,6 +516,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -510,6 +533,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -575,50 +605,46 @@ MFLAGS= MAKEFLAGS= # Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= -PACKAGE_URL= +PACKAGE_NAME='' +PACKAGE_TARNAME='' +PACKAGE_VERSION='' +PACKAGE_STRING='' +PACKAGE_BUGREPORT='' +PACKAGE_URL='' ac_unique_file="Source/NSApplication.m" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # 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_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= ac_subst_vars='LTLIBOBJS LIBOBJS cross_compiling @@ -637,11 +663,16 @@ GSCUPS_LIBS GSCUPS_LDFLAGS GSCUPS_CFLAGS have_cups +BUILD_MOVIE +MOVIE_BASE_CFLAGS +MOVIE_BASE_LIBS RECOGNIZER_ENGINE_CLASS RECOGNIZER_BASE_CFLAGS RECOGNIZER_BASE_LIBS BUILD_SPEECH_RECOGNIZER BUILD_SPEECH +SOUND_CFLAGS +SOUND_LIBS BUILD_SOUND HAVE_ICU ICU_CFLAGS @@ -654,8 +685,6 @@ IMAGEMAGICK_CFLAGS HAVE_LIBPNG_CONFIG TIFF_LIBS TIFF_CFLAGS -EGREP -GREP XMKMF PKG_CONFIG_LIBDIR PKG_CONFIG_PATH @@ -700,6 +729,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -740,6 +770,7 @@ enable_aspell enable_sound enable_speech enable_speech_recognizer +enable_movie enable_cups ' ac_precious_vars='build_alias @@ -801,6 +832,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -830,8 +862,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -872,9 +902,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -898,9 +928,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1053,6 +1083,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1102,9 +1141,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1118,9 +1157,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1164,9 +1203,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1182,7 +1221,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1190,7 +1229,7 @@ fi 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 + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1246,7 +1285,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1343,6 +1382,7 @@ Fine tuning of the installation directories: --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] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1389,6 +1429,7 @@ Optional Features: --disable-sound Disable sound --disable-speech Disable speech server --disable-speech-recognizer Disable speech recognition server + --disable-movie Disable NSMovie/NSMovieView functionality --disable-cups Disable cups printing support Optional Packages: @@ -1451,9 +1492,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -1481,7 +1522,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1489,7 +1531,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1499,9 +1541,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1518,14 +1560,14 @@ fi ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1533,14 +1575,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1562,7 +1605,7 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1570,14 +1613,15 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1593,14 +1637,14 @@ fi ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1608,17 +1652,18 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1639,11 +1684,12 @@ fi ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -1651,16 +1697,9 @@ else #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $2 (); below. */ +#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1678,157 +1717,29 @@ choke me #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1836,26 +1747,28 @@ fi ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1867,16 +1780,17 @@ $as_echo "$ac_res" >&6; } ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +printf %s "checking for $2.$3... " >&6; } +if eval test \${$4+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (ac_aggr.$3) @@ -1885,14 +1799,15 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int -main () +main (void) { static $2 ac_aggr; if (sizeof ac_aggr.$3) @@ -1901,29 +1816,50 @@ return 0; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$4=yes" -else +else $as_nop eval "$4=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + 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.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -1956,8 +1892,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -1992,7 +1932,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2027,11 +1967,13 @@ done # 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=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2042,8 +1984,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2067,7 +2009,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2075,14 +2017,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2090,15 +2032,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2106,8 +2048,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2121,63 +2063,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2187,129 +2114,517 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif -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 +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' -# If GNUSTEP_MAKEFILES is undefined, try to use gnustep-config to determine it. -if test -z "$GNUSTEP_MAKEFILES"; then - GNUSTEP_MAKEFILES=`gnustep-config --variable=GNUSTEP_MAKEFILES 2>&5` -fi +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' -if test -z "$GNUSTEP_MAKEFILES"; then - as_fn_error $? "You must have the gnustep-make package installed and set up the GNUSTEP_MAKEFILES environment variable to contain the path to the makefiles directory before configuring!" "$LINENO" 5 -fi +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif -#-------------------------------------------------------------------- -# Use config.guess, config.sub and install-sh provided by gnustep-make -#-------------------------------------------------------------------- -ac_aux_dir= -for ac_dir in $GNUSTEP_MAKEFILES "$srcdir"/$GNUSTEP_MAKEFILES; 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 +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="$GNUSTEP_MAKEFILES" + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in $GNUSTEP_MAKEFILES \"$srcdir\"/$GNUSTEP_MAKEFILES" "$LINENO" 5 +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 fi + # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +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,) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`printf "%s\n" "$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. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + +# If GNUSTEP_MAKEFILES is undefined, try to use gnustep-config to determine it. +if test -z "$GNUSTEP_MAKEFILES"; then + GNUSTEP_MAKEFILES=`gnustep-config --variable=GNUSTEP_MAKEFILES 2>&5` +fi + +if test -z "$GNUSTEP_MAKEFILES"; then + as_fn_error $? "You must have the gnustep-make package installed and set up the GNUSTEP_MAKEFILES environment variable to contain the path to the makefiles directory before configuring!" "$LINENO" 5 +fi + +#-------------------------------------------------------------------- +# Use config.guess, config.sub and install-sh provided by gnustep-make +#-------------------------------------------------------------------- ac_config_headers="$ac_config_headers Headers/Additions/GNUstepGUI/config.h" @@ -2318,26 +2633,30 @@ ac_config_headers="$ac_config_headers Headers/Additions/GNUstepGUI/config.h" #-------------------------------------------------------------------- # Determine the host, build, and target systems #-------------------------------------------------------------------- -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else + + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -2356,21 +2675,22 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -2389,21 +2709,22 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if ${ac_cv_target+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +printf %s "checking target system type... " >&6; } +if test ${ac_cv_target+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 + ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +printf "%s\n" "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; @@ -2439,10 +2760,10 @@ if test "$CC" = ""; then CC=$MAKECC else if test "$CC" != "$MAKECC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the compiler ($CC) set to a different value from that used by gnustep-make ($MAKECC). To a + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the compiler ($CC) set to a different value from that used by gnustep-make ($MAKECC). To a void conflicts/problems, reconfigure/reinstall gnustep-make to use $CC or run the gnustep-base configure again with your CC environment var iable set to $MAKECC" >&5 -$as_echo "$as_me: WARNING: You are running configure with the compiler ($CC) set to a different value from that used by gnustep-make ($MAKECC). To a +printf "%s\n" "$as_me: WARNING: You are running configure with the compiler ($CC) set to a different value from that used by gnustep-make ($MAKECC). To a void conflicts/problems, reconfigure/reinstall gnustep-make to use $CC or run the gnustep-base configure again with your CC environment var iable set to $MAKECC" >&2;} fi @@ -2451,10 +2772,10 @@ if test "$CPP" = ""; then CPP=$MAKECPP else if test "$CPP" != "$MAKECPP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the preprocessor ($CPP) set to a different value from that used by gnustep-make ($MAKECPP). + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the preprocessor ($CPP) set to a different value from that used by gnustep-make ($MAKECPP). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use $CPP or run the gnustep-base configure again with your CPP environ ment variable set to $MAKECPP" >&5 -$as_echo "$as_me: WARNING: You are running configure with the preprocessor ($CPP) set to a different value from that used by gnustep-make ($MAKECPP). +printf "%s\n" "$as_me: WARNING: You are running configure with the preprocessor ($CPP) set to a different value from that used by gnustep-make ($MAKECPP). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use $CPP or run the gnustep-base configure again with your CPP environ ment variable set to $MAKECPP" >&2;} fi @@ -2463,14 +2784,23 @@ if test "$CXX" = ""; then CXX=$MAKECXX else if test "$CXX" != "$MAKECXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the compiler ($CXX) set to a different value from that used by gnustep-make ($MAKECXX). To + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You are running configure with the compiler ($CXX) set to a different value from that used by gnustep-make ($MAKECXX). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use $CXX or run the gnustep-base configure again with your CXX environment variable set to $MAKECXX" >&5 -$as_echo "$as_me: WARNING: You are running configure with the compiler ($CXX) set to a different value from that used by gnustep-make ($MAKECXX). To +printf "%s\n" "$as_me: WARNING: You are running configure with the compiler ($CXX) set to a different value from that used by gnustep-make ($MAKECXX). To avoid conflicts/problems, reconfigure/reinstall gnustep-make to use $CXX or run the gnustep-base configure again with your CXX environment variable set to $MAKECXX" >&2;} fi fi + + + + + + + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2479,11 +2809,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2491,11 +2822,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2506,11 +2841,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2519,11 +2854,12 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -2531,11 +2867,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2546,11 +2886,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2558,8 +2898,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2572,11 +2912,12 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2584,11 +2925,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2599,11 +2944,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2612,11 +2957,12 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2625,15 +2971,19 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2649,18 +2999,18 @@ if test $ac_prog_rejected = yes; then # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2671,11 +3021,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -2683,11 +3034,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2698,11 +3053,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2715,11 +3070,12 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -2727,11 +3083,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2742,11 +3102,11 @@ fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2758,8 +3118,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2767,25 +3127,129 @@ esac fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2795,7 +3259,7 @@ $as_echo "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -2803,7 +3267,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -2815,9 +3279,9 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -2838,11 +3302,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +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, @@ -2859,7 +3324,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2875,44 +3340,46 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +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 @@ -2926,15 +3393,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -2943,7 +3410,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -2955,8 +3422,8 @@ _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -2964,10 +3431,10 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -2975,39 +3442,40 @@ $as_echo "$ac_try_echo"; } >&5 *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3021,11 +3489,12 @@ case "(($ac_try" in *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3034,31 +3503,32 @@ $as_echo "$ac_try_echo"; } >&5 break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3068,29 +3538,33 @@ main () return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -3099,57 +3573,60 @@ else /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -3164,94 +3641,144 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -3265,40 +3792,36 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif +#include Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -3310,10 +3833,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -3323,7 +3847,8 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : break fi @@ -3335,29 +3860,24 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif +#include Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : -else +else $as_nop # Broken: fails on valid input. continue fi @@ -3369,10 +3889,11 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # Broken: success on invalid input. continue -else +else $as_nop # Passes both tests. ac_preproc_ok=: break @@ -3382,11 +3903,12 @@ rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : +if $ac_preproc_ok +then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -3403,11 +3925,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu #-------------------------------------------------------------------- # Extract the first word of "whoami", so it can be a program name with args. set dummy whoami; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_WHOAMI+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_WHOAMI+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $WHOAMI in [\\/]* | ?:[\\/]*) ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path. @@ -3418,11 +3941,15 @@ as_dummy="$PATH:/usr/ucb" for as_dir in $as_dummy do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_WHOAMI="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_WHOAMI="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3435,11 +3962,11 @@ esac fi WHOAMI=$ac_cv_path_WHOAMI if test -n "$WHOAMI"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHOAMI" >&5 -$as_echo "$WHOAMI" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WHOAMI" >&5 +printf "%s\n" "$WHOAMI" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3454,11 +3981,12 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -3468,11 +3996,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3484,11 +4016,11 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3497,11 +4029,12 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. @@ -3511,11 +4044,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3527,11 +4064,11 @@ esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -3539,8 +4076,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -3552,14 +4089,14 @@ fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi @@ -3568,11 +4105,12 @@ fi if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -3582,11 +4120,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3598,11 +4140,11 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3623,12 +4165,13 @@ esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +printf %s "checking for X... " >&6; } # Check whether --with-x was given. -if test "${with_x+set}" = set; then : +if test ${with_x+y} +then : withval=$with_x; fi @@ -3639,12 +4182,41 @@ if test "x$with_x" = xno; then else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( - *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : - $as_echo_n "(cached) " >&6 -else + *,NONE | NONE,*) if test ${ac_cv_have_x+y} +then : + printf %s "(cached) " >&6 +else $as_nop # 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 +ac_x_includes=no +ac_x_libraries=no +# Do we need to do anything special at all? +ac_save_LIBS=$LIBS +LIBS="-lX11 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ +XrmInitialize () + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + # We can compile and link X programs with no special options. + ac_x_includes= + ac_x_libraries= +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS="$ac_save_LIBS" +# If that didn't work, only try xmkmf and file system searches +# for native compilation. +if test x"$ac_x_includes" = xno && test "$cross_compiling" = no +then : + rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' @@ -3683,7 +4255,7 @@ _ACEOF rm -f -r conftest.dir fi -# Standard set of common directories for X headers. + # 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 @@ -3710,6 +4282,8 @@ ac_x_header_dirs=' /usr/local/include/X11R5 /usr/local/include/X11R4 +/opt/X11/include + /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 @@ -3731,10 +4305,11 @@ if test "$ac_x_includes" = no; then /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : +if ac_fn_c_try_cpp "$LINENO" +then : # We can compile using X headers with no special include directory. ac_x_includes= -else +else $as_nop for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir @@ -3755,20 +4330,21 @@ if test "$ac_x_libraries" = no; then /* end confdefs.h. */ #include int -main () +main (void) { XrmInitialize () ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= -else +else $as_nop LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` +for ac_dir in `printf "%s\n" "$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 dylib la dll; do @@ -3779,19 +4355,21 @@ do done done fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no +fi +# Record the results. case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) + no,* | *,no | *\'*) : # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) + 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'" + ac_x_libraries='$ac_x_libraries'" ;; esac fi ;; #( @@ -3801,8 +4379,8 @@ fi fi # $with_x != no if test "$have_x" != yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 -$as_echo "$have_x" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +printf "%s\n" "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. @@ -3812,8 +4390,8 @@ else ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; } fi # Added for checking the existence of ungif. Note that # -gui uses the API of the underlying window system ONLY IF @@ -3857,11 +4435,12 @@ CPPFLAGS="$CPPFLAGS -I$GNUSTEP_HDIR" LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO -L$GNUSTEP_LDIR" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 -$as_echo_n "checking for main in -lm... " >&6; } -if ${ac_cv_lib_m_main+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 +printf %s "checking for main in -lm... " >&6; } +if test ${ac_cv_lib_m_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3869,372 +4448,150 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext int -main () +main (void) { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_m_main=yes -else +else $as_nop ac_cv_lib_m_main=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 -$as_echo "$ac_cv_lib_m_main" >&6; } -if test "x$ac_cv_lib_m_main" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBM 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 +printf "%s\n" "$ac_cv_lib_m_main" >&6; } +if test "x$ac_cv_lib_m_main" = xyes +then : + printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h LIBS="-lm $LIBS" fi -for ac_func in rint rintf atan2f floorf -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "rint" "ac_cv_func_rint" +if test "x$ac_cv_func_rint" = xyes +then : + printf "%s\n" "#define HAVE_RINT 1" >>confdefs.h fi -done - +ac_fn_c_check_func "$LINENO" "rintf" "ac_cv_func_rintf" +if test "x$ac_cv_func_rintf" = xyes +then : + printf "%s\n" "#define HAVE_RINTF 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "atan2f" "ac_cv_func_atan2f" +if test "x$ac_cv_func_atan2f" = xyes +then : + printf "%s\n" "#define HAVE_ATAN2F 1" >>confdefs.h -#-------------------------------------------------------------------- -# Support for determining mountpoints -#-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP fi +ac_fn_c_check_func "$LINENO" "floorf" "ac_cv_func_floorf" +if test "x$ac_cv_func_floorf" = xyes +then : + printf "%s\n" "#define HAVE_FLOORF 1" >>confdefs.h fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin + +#-------------------------------------------------------------------- +# Support for determining mountpoints +#-------------------------------------------------------------------- +ac_header= ac_cache= +for ac_item in $ac_header_c_list 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" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - 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 + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - +done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -int -main () -{ - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h -else - ac_cv_header_stdc=no fi -rm -f conftest* +ac_fn_c_check_header_compile "$LINENO" "mntent.h" "ac_cv_header_mntent_h" "$ac_includes_default" +if test "x$ac_cv_header_mntent_h" = xyes +then : + printf "%s\n" "#define HAVE_MNTENT_H 1" >>confdefs.h 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 confdefs.h - <<_ACEOF >conftest.$ac_ext -/* 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 -if ac_fn_c_try_run "$LINENO"; then : +ac_fn_c_check_header_compile "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_mntent_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_MNTENT_H 1" >>confdefs.h -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext fi -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in mntent.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "mntent.h" "ac_cv_header_mntent_h" "$ac_includes_default" -if test "x$ac_cv_header_mntent_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MNTENT_H 1 -_ACEOF - -fi - -done - -for ac_header in sys/mntent.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_mntent_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_MNTENT_H 1 -_ACEOF - -fi - -done - ac_fn_c_check_member "$LINENO" "struct mntent" "mnt_fsname" "ac_cv_member_struct_mntent_mnt_fsname" "#include " -if test "x$ac_cv_member_struct_mntent_mnt_fsname" = xyes; then : +if test "x$ac_cv_member_struct_mntent_mnt_fsname" = xyes +then : -$as_echo "#define MNT_FSNAME mnt_fsname" >>confdefs.h +printf "%s\n" "#define MNT_FSNAME mnt_fsname" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct mntent" "mnt_fsname" "ac_cv_member_struct_mntent_mnt_fsname" "#include " -if test "x$ac_cv_member_struct_mntent_mnt_fsname" = xyes; then : +if test "x$ac_cv_member_struct_mntent_mnt_fsname" = xyes +then : -$as_echo "#define MNT_FSNAME mnt_fsname" >>confdefs.h +printf "%s\n" "#define MNT_FSNAME mnt_fsname" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct mntent" "mnt_dir" "ac_cv_member_struct_mntent_mnt_dir" "#include " -if test "x$ac_cv_member_struct_mntent_mnt_dir" = xyes; then : +if test "x$ac_cv_member_struct_mntent_mnt_dir" = xyes +then : -$as_echo "#define MNT_MEMB mnt_dir" >>confdefs.h +printf "%s\n" "#define MNT_MEMB mnt_dir" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct mntent" "mnt_mountp" "ac_cv_member_struct_mntent_mnt_mountp" "#include " -if test "x$ac_cv_member_struct_mntent_mnt_mountp" = xyes; then : +if test "x$ac_cv_member_struct_mntent_mnt_mountp" = xyes +then : -$as_echo "#define MNT_MEMB mnt_mountp" >>confdefs.h +printf "%s\n" "#define MNT_MEMB mnt_mountp" >>confdefs.h fi # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, # -lseq on Dynix/PTX, -lgen on Unixware. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 -$as_echo_n "checking for library containing getmntent... " >&6; } -if ${ac_cv_search_getmntent+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5 +printf %s "checking for library containing getmntent... " >&6; } +if test ${ac_cv_search_getmntent+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4242,113 +4599,93 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 getmntent (); int -main () +main (void) { return getmntent (); ; return 0; } _ACEOF -for ac_lib in '' sun seq gen; do +for ac_lib in '' sun seq gen +do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi - if ac_fn_c_try_link "$LINENO"; then : + if ac_fn_c_try_link "$LINENO" +then : ac_cv_search_getmntent=$ac_res fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext - if ${ac_cv_search_getmntent+:} false; then : + if test ${ac_cv_search_getmntent+y} +then : break fi done -if ${ac_cv_search_getmntent+:} false; then : +if test ${ac_cv_search_getmntent+y} +then : -else +else $as_nop ac_cv_search_getmntent=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5 -$as_echo "$ac_cv_search_getmntent" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5 +printf "%s\n" "$ac_cv_search_getmntent" >&6; } ac_res=$ac_cv_search_getmntent -if test "$ac_res" != no; then : +if test "$ac_res" != no +then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_func_getmntent=yes -$as_echo "#define HAVE_GETMNTENT 1" >>confdefs.h +printf "%s\n" "#define HAVE_GETMNTENT 1" >>confdefs.h -else +else $as_nop ac_cv_func_getmntent=no fi -for ac_func in getmntinfo -do : - ac_fn_c_check_func "$LINENO" "getmntinfo" "ac_cv_func_getmntinfo" -if test "x$ac_cv_func_getmntinfo" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETMNTINFO 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "getmntinfo" "ac_cv_func_getmntinfo" +if test "x$ac_cv_func_getmntinfo" = xyes +then : + printf "%s\n" "#define HAVE_GETMNTINFO 1" >>confdefs.h fi -done -for ac_func in statfs -do : - ac_fn_c_check_func "$LINENO" "statfs" "ac_cv_func_statfs" -if test "x$ac_cv_func_statfs" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STATFS 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "statfs" "ac_cv_func_statfs" +if test "x$ac_cv_func_statfs" = xyes +then : + printf "%s\n" "#define HAVE_STATFS 1" >>confdefs.h fi -done -for ac_func in statvfs -do : - ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs" -if test "x$ac_cv_func_statvfs" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STATVFS 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs" +if test "x$ac_cv_func_statvfs" = xyes +then : + printf "%s\n" "#define HAVE_STATVFS 1" >>confdefs.h fi -done -for ac_header in sys/statvfs.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_statvfs_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_STATVFS_H 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "sys/statvfs.h" "ac_cv_header_sys_statvfs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_statvfs_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_STATVFS_H 1" >>confdefs.h fi -done - -for ac_header in sys/vfs.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/vfs.h" "ac_cv_header_sys_vfs_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_vfs_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_VFS_H 1 -_ACEOF +ac_fn_c_check_header_compile "$LINENO" "sys/vfs.h" "ac_cv_header_sys_vfs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_vfs_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_VFS_H 1" >>confdefs.h fi -done - ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" " #if defined(HAVE_GETMNTINFO) @@ -4363,11 +4700,10 @@ ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_st #endif " -if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_flags" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_FLAGS 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATFS_F_FLAGS 1" >>confdefs.h fi @@ -4384,11 +4720,10 @@ ac_fn_c_check_member "$LINENO" "struct statfs" "f_owner" "ac_cv_member_struct_st #endif " -if test "x$ac_cv_member_struct_statfs_f_owner" = xyes; then : +if test "x$ac_cv_member_struct_statfs_f_owner" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATFS_F_OWNER 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATFS_F_OWNER 1" >>confdefs.h fi @@ -4399,11 +4734,10 @@ ac_fn_c_check_member "$LINENO" "struct statvfs" "f_flag" "ac_cv_member_struct_st #endif " -if test "x$ac_cv_member_struct_statvfs_f_flag" = xyes; then : +if test "x$ac_cv_member_struct_statvfs_f_flag" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATVFS_F_FLAG 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATVFS_F_FLAG 1" >>confdefs.h fi @@ -4413,11 +4747,10 @@ ac_fn_c_check_member "$LINENO" "struct statvfs" "f_owner" "ac_cv_member_struct_s #endif " -if test "x$ac_cv_member_struct_statvfs_f_owner" = xyes; then : +if test "x$ac_cv_member_struct_statvfs_f_owner" = xyes +then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STATVFS_F_OWNER 1 -_ACEOF +printf "%s\n" "#define HAVE_STRUCT_STATVFS_F_OWNER 1" >>confdefs.h fi @@ -4428,9 +4761,10 @@ fi #-------------------------------------------------------------------- # Check whether --with-include-flags was given. -if test "${with_include_flags+set}" = set; then : +if test ${with_include_flags+y} +then : withval=$with_include_flags; include_flags="$withval" -else +else $as_nop include_flags="no" fi @@ -4441,9 +4775,10 @@ fi # Check whether --with-library-flags was given. -if test "${with_library_flags+set}" = set; then : +if test ${with_library_flags+y} +then : withval=$with_library_flags; library_flags="$withval" -else +else $as_nop library_flags="no" fi @@ -4459,9 +4794,10 @@ GRAPHIC_CFLAGS= GRAPHIC_LFLAGS= # Check whether --enable-jpeg was given. -if test "${enable_jpeg+set}" = set; then : +if test ${enable_jpeg+y} +then : enableval=$enable_jpeg; -else +else $as_nop enable_jpeg=yes fi @@ -4469,17 +4805,19 @@ fi if test $enable_jpeg = yes; then # Check whether --with-jpeg_library was given. -if test "${with_jpeg_library+set}" = set; then : +if test ${with_jpeg_library+y} +then : withval=$with_jpeg_library; -else +else $as_nop with_jpeg_library= fi # Check whether --with-jpeg_include was given. -if test "${with_jpeg_include+set}" = set; then : +if test ${with_jpeg_include+y} +then : withval=$with_jpeg_include; -else +else $as_nop with_jpeg_include= fi @@ -4493,26 +4831,25 @@ fi CPPFLAGS="$with_jpeg_include ${CPPFLAGS}" LDFLAGS="$with_jpeg_library ${LDFLAGS}" - for ac_header in jpeglib.h + for ac_header in jpeglib.h do : - ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" -if test "x$ac_cv_header_jpeglib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_JPEGLIB_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" +if test "x$ac_cv_header_jpeglib_h" = xyes +then : + printf "%s\n" "#define HAVE_JPEGLIB_H 1" >>confdefs.h have_jpeg=yes -else +else $as_nop have_jpeg=no fi done - if test "$have_jpeg" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_decompress in -ljpeg" >&5 -$as_echo_n "checking for jpeg_destroy_decompress in -ljpeg... " >&6; } -if ${ac_cv_lib_jpeg_jpeg_destroy_decompress+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_decompress in -ljpeg" >&5 +printf %s "checking for jpeg_destroy_decompress in -ljpeg... " >&6; } +if test ${ac_cv_lib_jpeg_jpeg_destroy_decompress+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4521,33 +4858,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 jpeg_destroy_decompress (); int -main () +main (void) { return jpeg_destroy_decompress (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_jpeg_jpeg_destroy_decompress=yes -else +else $as_nop ac_cv_lib_jpeg_jpeg_destroy_decompress=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_decompress" >&5 -$as_echo "$ac_cv_lib_jpeg_jpeg_destroy_decompress" >&6; } -if test "x$ac_cv_lib_jpeg_jpeg_destroy_decompress" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBJPEG 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_decompress" >&5 +printf "%s\n" "$ac_cv_lib_jpeg_jpeg_destroy_decompress" >&6; } +if test "x$ac_cv_lib_jpeg_jpeg_destroy_decompress" = xyes +then : + printf "%s\n" "#define HAVE_LIBJPEG 1" >>confdefs.h LIBS="-ljpeg $LIBS" @@ -4575,17 +4909,19 @@ fi #-------------------------------------------------------------------- # Check whether --with-tiff_library was given. -if test "${with_tiff_library+set}" = set; then : +if test ${with_tiff_library+y} +then : withval=$with_tiff_library; -else +else $as_nop with_tiff_library= fi # Check whether --with-tiff_include was given. -if test "${with_tiff_include+set}" = set; then : +if test ${with_tiff_include+y} +then : withval=$with_tiff_include; -else +else $as_nop with_tiff_include= fi @@ -4599,11 +4935,12 @@ fi CPPFLAGS="$with_tiff_include ${CPPFLAGS}" LDFLAGS="$with_tiff_library ${LDFLAGS}" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5 -$as_echo_n "checking for main in -lz... " >&6; } -if ${ac_cv_lib_z_main+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lz" >&5 +printf %s "checking for main in -lz... " >&6; } +if test ${ac_cv_lib_z_main+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4611,47 +4948,48 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext int -main () +main (void) { return main (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_z_main=yes -else +else $as_nop ac_cv_lib_z_main=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_main" >&5 -$as_echo "$ac_cv_lib_z_main" >&6; } -if test "x$ac_cv_lib_z_main" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBZ 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_main" >&5 +printf "%s\n" "$ac_cv_lib_z_main" >&6; } +if test "x$ac_cv_lib_z_main" = xyes +then : + printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h LIBS="-lz $LIBS" fi -ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" -if test "x$ac_cv_header_tiffio_h" = xyes; then : +ac_fn_c_check_header_compile "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" +if test "x$ac_cv_header_tiffio_h" = xyes +then : have_tiff=yes -else +else $as_nop have_tiff=no fi - if test "$have_tiff" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFReadScanline in -ltiff" >&5 -$as_echo_n "checking for TIFFReadScanline in -ltiff... " >&6; } -if ${ac_cv_lib_tiff_TIFFReadScanline+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIFFReadScanline in -ltiff" >&5 +printf %s "checking for TIFFReadScanline in -ltiff... " >&6; } +if test ${ac_cv_lib_tiff_TIFFReadScanline+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ltiff $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4660,33 +4998,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 TIFFReadScanline (); int -main () +main (void) { return TIFFReadScanline (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_tiff_TIFFReadScanline=yes -else +else $as_nop ac_cv_lib_tiff_TIFFReadScanline=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFReadScanline" >&5 -$as_echo "$ac_cv_lib_tiff_TIFFReadScanline" >&6; } -if test "x$ac_cv_lib_tiff_TIFFReadScanline" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBTIFF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFReadScanline" >&5 +printf "%s\n" "$ac_cv_lib_tiff_TIFFReadScanline" >&6; } +if test "x$ac_cv_lib_tiff_TIFFReadScanline" = xyes +then : + printf "%s\n" "#define HAVE_LIBTIFF 1" >>confdefs.h LIBS="-ltiff $LIBS" @@ -4698,17 +5033,17 @@ fi else pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtiff-4" >&5 -$as_echo_n "checking for libtiff-4... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libtiff-4" >&5 +printf %s "checking for libtiff-4... " >&6; } if test -n "$TIFF_CFLAGS"; then pkg_cv_TIFF_CFLAGS="$TIFF_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtiff-4") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TIFF_CFLAGS=`$PKG_CONFIG --cflags "libtiff-4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -4722,10 +5057,10 @@ if test -n "$TIFF_LIBS"; then pkg_cv_TIFF_LIBS="$TIFF_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libtiff-4\""; } >&5 ($PKG_CONFIG --exists --print-errors "libtiff-4") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_TIFF_LIBS=`$PKG_CONFIG --libs "libtiff-4" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -4739,8 +5074,8 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -4759,16 +5094,16 @@ fi have_tiff=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } have_tiff=no else TIFF_CFLAGS=$pkg_cv_TIFF_CFLAGS TIFF_LIBS=$pkg_cv_TIFF_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } GRAPHIC_LFLAGS="$TIFF_LIBS $GRAPHIC_LFLAGS" GRAPHIC_CFLAGS="$TIFF_CFLAGS $GRAPHIC_CFLAGS" @@ -4778,8 +5113,8 @@ fi fi if test "$have_tiff" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libtiff header and/or library" >&5 -$as_echo "$as_me: WARNING: Cannot find libtiff header and/or library" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libtiff header and/or library" >&5 +printf "%s\n" "$as_me: WARNING: Cannot find libtiff header and/or library" >&2;} echo "* The GUI library reqiures the TIFF library" echo "* Use --with-tiff-library to specify the tiff library" echo "* directory if it is not in the usual place(s)" @@ -4792,9 +5127,10 @@ fi # Find PNG #-------------------------------------------------------------------- # Check whether --enable-png was given. -if test "${enable_png+set}" = set; then : +if test ${enable_png+y} +then : enableval=$enable_png; -else +else $as_nop enable_png=yes fi @@ -4803,11 +5139,12 @@ if test $enable_png = yes; then # use libpng-config if available # Extract the first word of "libpng-config", so it can be a program name with args. set dummy libpng-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_HAVE_LIBPNG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_HAVE_LIBPNG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$HAVE_LIBPNG_CONFIG"; then ac_cv_prog_HAVE_LIBPNG_CONFIG="$HAVE_LIBPNG_CONFIG" # Let the user override the test. else @@ -4815,11 +5152,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_HAVE_LIBPNG_CONFIG="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4830,11 +5171,11 @@ fi fi HAVE_LIBPNG_CONFIG=$ac_cv_prog_HAVE_LIBPNG_CONFIG if test -n "$HAVE_LIBPNG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPNG_CONFIG" >&5 -$as_echo "$HAVE_LIBPNG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAVE_LIBPNG_CONFIG" >&5 +printf "%s\n" "$HAVE_LIBPNG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4843,23 +5184,19 @@ fi PNG_LDFLAGS="`libpng-config --ldflags`" CPPFLAGS="${CPPFLAGS} $PNG_CFLAGS" LDFLAGS="$PNG_LDFLAGS ${LDFLAGS}" - for ac_header in png.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default" -if test "x$ac_cv_header_png_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PNG_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default" +if test "x$ac_cv_header_png_h" = xyes +then : + printf "%s\n" "#define HAVE_PNG_H 1" >>confdefs.h fi -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_sig_cmp in -lpng" >&5 -$as_echo_n "checking for png_sig_cmp in -lpng... " >&6; } -if ${ac_cv_lib_png_png_sig_cmp+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for png_sig_cmp in -lpng" >&5 +printf %s "checking for png_sig_cmp in -lpng... " >&6; } +if test ${ac_cv_lib_png_png_sig_cmp+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpng $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4868,33 +5205,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 png_sig_cmp (); int -main () +main (void) { return png_sig_cmp (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_png_png_sig_cmp=yes -else +else $as_nop ac_cv_lib_png_png_sig_cmp=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_sig_cmp" >&5 -$as_echo "$ac_cv_lib_png_png_sig_cmp" >&6; } -if test "x$ac_cv_lib_png_png_sig_cmp" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPNG 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_sig_cmp" >&5 +printf "%s\n" "$ac_cv_lib_png_png_sig_cmp" >&6; } +if test "x$ac_cv_lib_png_png_sig_cmp" = xyes +then : + printf "%s\n" "#define HAVE_LIBPNG 1" >>confdefs.h LIBS="-lpng $LIBS" @@ -4903,29 +5237,25 @@ fi if test "$ac_cv_search_png_sig_cmp" != no; then GRAPHIC_CFLAGS="$PNG_CFLAGS $GRAPHIC_CFLAGS" GRAPHIC_LFLAGS="$PNG_LDFLAGS $GRAPHIC_LFLAGS" - $as_echo "#define HAVE_LIBPNG 1" >>confdefs.h + printf "%s\n" "#define HAVE_LIBPNG 1" >>confdefs.h fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find libpng-config, guessing required headers and libraries." >&5 -$as_echo "$as_me: WARNING: Can't find libpng-config, guessing required headers and libraries." >&2;} - for ac_header in png.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default" -if test "x$ac_cv_header_png_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PNG_H 1 -_ACEOF + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't find libpng-config, guessing required headers and libraries." >&5 +printf "%s\n" "$as_me: WARNING: Can't find libpng-config, guessing required headers and libraries." >&2;} + ac_fn_c_check_header_compile "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default" +if test "x$ac_cv_header_png_h" = xyes +then : + printf "%s\n" "#define HAVE_PNG_H 1" >>confdefs.h fi -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for png_sig_cmp in -lpng" >&5 -$as_echo_n "checking for png_sig_cmp in -lpng... " >&6; } -if ${ac_cv_lib_png_png_sig_cmp+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for png_sig_cmp in -lpng" >&5 +printf %s "checking for png_sig_cmp in -lpng... " >&6; } +if test ${ac_cv_lib_png_png_sig_cmp+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpng $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -4934,33 +5264,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 png_sig_cmp (); int -main () +main (void) { return png_sig_cmp (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_png_png_sig_cmp=yes -else +else $as_nop ac_cv_lib_png_png_sig_cmp=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_sig_cmp" >&5 -$as_echo "$ac_cv_lib_png_png_sig_cmp" >&6; } -if test "x$ac_cv_lib_png_png_sig_cmp" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBPNG 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_sig_cmp" >&5 +printf "%s\n" "$ac_cv_lib_png_png_sig_cmp" >&6; } +if test "x$ac_cv_lib_png_png_sig_cmp" = xyes +then : + printf "%s\n" "#define HAVE_LIBPNG 1" >>confdefs.h LIBS="-lpng $LIBS" @@ -4983,16 +5310,18 @@ fi # Find additional image libs #-------------------------------------------------------------------- # Check whether --enable-ungif was given. -if test "${enable_ungif+set}" = set; then : +if test ${enable_ungif+y} +then : enableval=$enable_ungif; -else +else $as_nop enable_ungif=yes fi # Check whether --enable-libgif was given. -if test "${enable_libgif+set}" = set; then : +if test ${enable_libgif+y} +then : enableval=$enable_libgif; -else +else $as_nop enable_libgif=no fi @@ -5002,11 +5331,12 @@ fi have_ungif=no if test "${enable_ungif}" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifOpen in -lungif" >&5 -$as_echo_n "checking for DGifOpen in -lungif... " >&6; } -if ${ac_cv_lib_ungif_DGifOpen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DGifOpen in -lungif" >&5 +printf %s "checking for DGifOpen in -lungif... " >&6; } +if test ${ac_cv_lib_ungif_DGifOpen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lungif $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5015,33 +5345,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 DGifOpen (); int -main () +main (void) { return DGifOpen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ungif_DGifOpen=yes -else +else $as_nop ac_cv_lib_ungif_DGifOpen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_DGifOpen" >&5 -$as_echo "$ac_cv_lib_ungif_DGifOpen" >&6; } -if test "x$ac_cv_lib_ungif_DGifOpen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUNGIF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_DGifOpen" >&5 +printf "%s\n" "$ac_cv_lib_ungif_DGifOpen" >&6; } +if test "x$ac_cv_lib_ungif_DGifOpen" = xyes +then : + printf "%s\n" "#define HAVE_LIBUNGIF 1" >>confdefs.h LIBS="-lungif $LIBS" @@ -5055,8 +5382,8 @@ fi orig_CPPFLAGS="${CPPFLAGS}" orig_LDFLAGS="${LDFLAGS}" orig_LIBS="${LIBS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: Checking if ungif is linked against -lX11" >&5 -$as_echo "$as_me: Checking if ungif is linked against -lX11" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking if ungif is linked against -lX11" >&5 +printf "%s\n" "$as_me: Checking if ungif is linked against -lX11" >&6;} # This implies either that ungif is not installed at all, or that it # explicitly refers to the symbols defined in X11. Now see if the latter # is the case. @@ -5064,11 +5391,12 @@ $as_echo "$as_me: Checking if ungif is linked against -lX11" >&6;} LDFLAGS="${LDFLAGS} -L${ac_x_libraries}" LIBS="${LIBS} -lX11" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifCloseFile in -lungif" >&5 -$as_echo_n "checking for DGifCloseFile in -lungif... " >&6; } -if ${ac_cv_lib_ungif_DGifCloseFile+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DGifCloseFile in -lungif" >&5 +printf %s "checking for DGifCloseFile in -lungif... " >&6; } +if test ${ac_cv_lib_ungif_DGifCloseFile+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lungif $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5077,33 +5405,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 DGifCloseFile (); int -main () +main (void) { return DGifCloseFile (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_ungif_DGifCloseFile=yes -else +else $as_nop ac_cv_lib_ungif_DGifCloseFile=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_DGifCloseFile" >&5 -$as_echo "$ac_cv_lib_ungif_DGifCloseFile" >&6; } -if test "x$ac_cv_lib_ungif_DGifCloseFile" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBUNGIF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ungif_DGifCloseFile" >&5 +printf "%s\n" "$ac_cv_lib_ungif_DGifCloseFile" >&6; } +if test "x$ac_cv_lib_ungif_DGifCloseFile" = xyes +then : + printf "%s\n" "#define HAVE_LIBUNGIF 1" >>confdefs.h LIBS="-lungif $LIBS" @@ -5119,8 +5444,8 @@ fi # This indicates ungif actually refers to the X11's symbols. We modify # the flags so that -gui gets linked against the X11 library to support # ungif. - { $as_echo "$as_me:${as_lineno-$LINENO}: -gui will be linked against -lX11 to support ungif images" >&5 -$as_echo "$as_me: -gui will be linked against -lX11 to support ungif images" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -gui will be linked against -lX11 to support ungif images" >&5 +printf "%s\n" "$as_me: -gui will be linked against -lX11 to support ungif images" >&6;} GRAPHIC_CFLAGS="-I${ac_x_includes} $GRAPHIC_CFLAGS" GRAPHIC_LFLAGS="-L${ac_x_libraries} $GRAPHIC_LFLAGS" have_ungif=yes @@ -5129,11 +5454,12 @@ $as_echo "$as_me: -gui will be linked against -lX11 to support ungif images" >&6 fi if test "$have_ungif" = no -o "${enable_libgif}" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifOpen in -lgif" >&5 -$as_echo_n "checking for DGifOpen in -lgif... " >&6; } -if ${ac_cv_lib_gif_DGifOpen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DGifOpen in -lgif" >&5 +printf %s "checking for DGifOpen in -lgif... " >&6; } +if test ${ac_cv_lib_gif_DGifOpen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lgif $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5142,33 +5468,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 DGifOpen (); int -main () +main (void) { return DGifOpen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_gif_DGifOpen=yes -else +else $as_nop ac_cv_lib_gif_DGifOpen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifOpen" >&5 -$as_echo "$ac_cv_lib_gif_DGifOpen" >&6; } -if test "x$ac_cv_lib_gif_DGifOpen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGIF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifOpen" >&5 +printf "%s\n" "$ac_cv_lib_gif_DGifOpen" >&6; } +if test "x$ac_cv_lib_gif_DGifOpen" = xyes +then : + printf "%s\n" "#define HAVE_LIBGIF 1" >>confdefs.h LIBS="-lgif $LIBS" @@ -5179,8 +5502,8 @@ fi orig_CPPFLAGS="${CPPFLAGS}" orig_LDFLAGS="${LDFLAGS}" orig_LIBS="${LIBS}" - { $as_echo "$as_me:${as_lineno-$LINENO}: Checking if libgif is linked against -lX11" >&5 -$as_echo "$as_me: Checking if libgif is linked against -lX11" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Checking if libgif is linked against -lX11" >&5 +printf "%s\n" "$as_me: Checking if libgif is linked against -lX11" >&6;} # This implies either that libgif is not installed at all, or that it # explicitly refers to the symbols defined in X11. Now see if the latter # is the case. @@ -5188,11 +5511,12 @@ $as_echo "$as_me: Checking if libgif is linked against -lX11" >&6;} LDFLAGS="${LDFLAGS} -L${ac_x_libraries}" LIBS="${LIBS} -lX11" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifCloseFile in -lgif" >&5 -$as_echo_n "checking for DGifCloseFile in -lgif... " >&6; } -if ${ac_cv_lib_gif_DGifCloseFile+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for DGifCloseFile in -lgif" >&5 +printf %s "checking for DGifCloseFile in -lgif... " >&6; } +if test ${ac_cv_lib_gif_DGifCloseFile+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lgif $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5201,33 +5525,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 DGifCloseFile (); int -main () +main (void) { return DGifCloseFile (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_gif_DGifCloseFile=yes -else +else $as_nop ac_cv_lib_gif_DGifCloseFile=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifCloseFile" >&5 -$as_echo "$ac_cv_lib_gif_DGifCloseFile" >&6; } -if test "x$ac_cv_lib_gif_DGifCloseFile" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBGIF 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifCloseFile" >&5 +printf "%s\n" "$ac_cv_lib_gif_DGifCloseFile" >&6; } +if test "x$ac_cv_lib_gif_DGifCloseFile" = xyes +then : + printf "%s\n" "#define HAVE_LIBGIF 1" >>confdefs.h LIBS="-lgif $LIBS" @@ -5243,8 +5564,8 @@ fi # This indicates libgif actually refers to the X11's symbols. We modify # the flags so that -gui gets linked against the X11 library to support # libgif. - { $as_echo "$as_me:${as_lineno-$LINENO}: -gui will be linked against -lX11 to support libgif images" >&5 -$as_echo "$as_me: -gui will be linked against -lX11 to support libgif images" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: -gui will be linked against -lX11 to support libgif images" >&5 +printf "%s\n" "$as_me: -gui will be linked against -lX11 to support libgif images" >&6;} GRAPHIC_CFLAGS="-I${ac_x_includes} $GRAPHIC_CFLAGS" GRAPHIC_LFLAGS="-L${ac_x_libraries} $GRAPHIC_LFLAGS" fi @@ -5254,27 +5575,19 @@ fi # QuantizeBuffer was removed from giflib in version 4.2 but was reintroduced # in the 5.0 release with a new name. If this function is not present # we disable the support to create gif image representations. -for ac_func in QuantizeBuffer -do : - ac_fn_c_check_func "$LINENO" "QuantizeBuffer" "ac_cv_func_QuantizeBuffer" -if test "x$ac_cv_func_QuantizeBuffer" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_QUANTIZEBUFFER 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "QuantizeBuffer" "ac_cv_func_QuantizeBuffer" +if test "x$ac_cv_func_QuantizeBuffer" = xyes +then : + printf "%s\n" "#define HAVE_QUANTIZEBUFFER 1" >>confdefs.h fi -done -for ac_func in GifQuantizeBuffer -do : - ac_fn_c_check_func "$LINENO" "GifQuantizeBuffer" "ac_cv_func_GifQuantizeBuffer" -if test "x$ac_cv_func_GifQuantizeBuffer" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GIFQUANTIZEBUFFER 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "GifQuantizeBuffer" "ac_cv_func_GifQuantizeBuffer" +if test "x$ac_cv_func_GifQuantizeBuffer" = xyes +then : + printf "%s\n" "#define HAVE_GIFQUANTIZEBUFFER 1" >>confdefs.h fi -done #-------------------------------------------------------------------- @@ -5282,25 +5595,27 @@ done #-------------------------------------------------------------------- # Check whether --enable-imagemagick was given. -if test "${enable_imagemagick+set}" = set; then : +if test ${enable_imagemagick+y} +then : enableval=$enable_imagemagick; fi -if test "x$enable_imagemagick" = "xyes"; then : +if test "x$enable_imagemagick" = "xyes" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MagickCore" >&5 -$as_echo_n "checking for MagickCore... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MagickCore" >&5 +printf %s "checking for MagickCore... " >&6; } if test -n "$IMAGEMAGICK_CFLAGS"; then pkg_cv_IMAGEMAGICK_CFLAGS="$IMAGEMAGICK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickCore\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickCore\""; } >&5 ($PKG_CONFIG --exists --print-errors "MagickCore") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_IMAGEMAGICK_CFLAGS=`$PKG_CONFIG --cflags "MagickCore" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -5314,10 +5629,10 @@ if test -n "$IMAGEMAGICK_LIBS"; then pkg_cv_IMAGEMAGICK_LIBS="$IMAGEMAGICK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickCore\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickCore\""; } >&5 ($PKG_CONFIG --exists --print-errors "MagickCore") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_IMAGEMAGICK_LIBS=`$PKG_CONFIG --libs "MagickCore" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -5331,8 +5646,8 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -5348,44 +5663,45 @@ fi echo "$IMAGEMAGICK_PKG_ERRORS" >&5 -$as_echo "#define HAVE_IMAGEMAGICK 0" >>confdefs.h +printf "%s\n" "#define HAVE_IMAGEMAGICK 0" >>confdefs.h elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } -$as_echo "#define HAVE_IMAGEMAGICK 0" >>confdefs.h +printf "%s\n" "#define HAVE_IMAGEMAGICK 0" >>confdefs.h else IMAGEMAGICK_CFLAGS=$pkg_cv_IMAGEMAGICK_CFLAGS IMAGEMAGICK_LIBS=$pkg_cv_IMAGEMAGICK_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } GRAPHIC_CFLAGS="$IMAGEMAGICK_CFLAGS $GRAPHIC_CFLAGS" GRAPHIC_LFLAGS="$IMAGEMAGICK_LIBS $GRAPHIC_LFLAGS" -$as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h +printf "%s\n" "#define HAVE_IMAGEMAGICK 1" >>confdefs.h fi fi -if test "x$enable_imagemagick" = "xyes"; then : +if test "x$enable_imagemagick" = "xyes" +then : pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MagickCore >= 7" >&5 -$as_echo_n "checking for MagickCore >= 7... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MagickCore >= 7" >&5 +printf %s "checking for MagickCore >= 7... " >&6; } if test -n "$MAGICKCORE_CFLAGS"; then pkg_cv_MAGICKCORE_CFLAGS="$MAGICKCORE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickCore >= 7\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickCore >= 7\""; } >&5 ($PKG_CONFIG --exists --print-errors "MagickCore >= 7") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICKCORE_CFLAGS=`$PKG_CONFIG --cflags "MagickCore >= 7" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -5399,10 +5715,10 @@ if test -n "$MAGICKCORE_LIBS"; then pkg_cv_MAGICKCORE_LIBS="$MAGICKCORE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickCore >= 7\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"MagickCore >= 7\""; } >&5 ($PKG_CONFIG --exists --print-errors "MagickCore >= 7") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MAGICKCORE_LIBS=`$PKG_CONFIG --libs "MagickCore >= 7" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -5416,8 +5732,8 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -5433,21 +5749,21 @@ fi echo "$MAGICKCORE_PKG_ERRORS" >&5 -$as_echo "#define MAGICKCORE_7_OR_NEWER 0" >>confdefs.h +printf "%s\n" "#define MAGICKCORE_7_OR_NEWER 0" >>confdefs.h elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } -$as_echo "#define MAGICKCORE_7_OR_NEWER 0" >>confdefs.h +printf "%s\n" "#define MAGICKCORE_7_OR_NEWER 0" >>confdefs.h else MAGICKCORE_CFLAGS=$pkg_cv_MAGICKCORE_CFLAGS MAGICKCORE_LIBS=$pkg_cv_MAGICKCORE_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } -$as_echo "#define MAGICKCORE_7_OR_NEWER 1" >>confdefs.h +printf "%s\n" "#define MAGICKCORE_7_OR_NEWER 1" >>confdefs.h fi @@ -5459,23 +5775,26 @@ fi #-------------------------------------------------------------------- HAVE_ICU=0 # Check whether --enable-icu was given. -if test "${enable_icu+set}" = set; then : +if test ${enable_icu+y} +then : enableval=$enable_icu; -else +else $as_nop enable_icu=yes fi # Check whether --with-icu-library was given. -if test "${with_icu_library+set}" = set; then : +if test ${with_icu_library+y} +then : withval=$with_icu_library; icu_libdir="$withval" -else +else $as_nop icu_libdir="no" fi -if test "x$enable_icu" = "xyes"; then : +if test "x$enable_icu" = "xyes" +then : # First attempt, icu-config @@ -5484,11 +5803,12 @@ if test "x$enable_icu" = "xyes"; then : if test -z "$ICU_CONFIG"; then # Extract the first word of "icu-config", so it can be a program name with args. set dummy icu-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ICU_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ICU_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ICU_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ICU_CONFIG="$ICU_CONFIG" # Let the user override the test with a path. @@ -5498,11 +5818,15 @@ else for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ICU_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ICU_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5515,11 +5839,11 @@ esac fi ICU_CONFIG=$ac_cv_path_ICU_CONFIG if test -n "$ICU_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_CONFIG" >&5 -$as_echo "$ICU_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ICU_CONFIG" >&5 +printf "%s\n" "$ICU_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5531,24 +5855,24 @@ fi echo "See http://site.icu-project.org/ for help." else ICU_VERSION=`$ICU_CONFIG --version` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU >= 4.0" >&5 -$as_echo_n "checking for ICU >= 4.0... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ICU >= 4.0" >&5 +printf %s "checking for ICU >= 4.0... " >&6; } found=`expr $ICU_VERSION \>= 4.0` if test "$found" = "1" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ok=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU_LIBS" >&5 -$as_echo_n "checking ICU_LIBS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ICU_LIBS" >&5 +printf %s "checking ICU_LIBS... " >&6; } ICU_LIBS=`$ICU_CONFIG --ldflags-libsonly` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_LIBS" >&5 -$as_echo "$ICU_LIBS" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU_LDFLAGS" >&5 -$as_echo_n "checking ICU_LDFLAGS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ICU_LIBS" >&5 +printf "%s\n" "$ICU_LIBS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ICU_LDFLAGS" >&5 +printf %s "checking ICU_LDFLAGS... " >&6; } ICU_LDFLAGS=`$ICU_CONFIG --ldflags-searchpath` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_LDFLAGS" >&5 -$as_echo "$ICU_LDFLAGS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ICU_LDFLAGS" >&5 +printf "%s\n" "$ICU_LDFLAGS" >&6; } else ICU_LIBS="" ICU_LDFLAGS="" @@ -5570,17 +5894,17 @@ $as_echo "$ICU_LDFLAGS" >&6; } if test $HAVE_ICU = 0; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-i18n > 49.0" >&5 -$as_echo_n "checking for icu-i18n > 49.0... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for icu-i18n > 49.0" >&5 +printf %s "checking for icu-i18n > 49.0... " >&6; } if test -n "$ICU_CFLAGS"; then pkg_cv_ICU_CFLAGS="$ICU_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n > 49.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n > 49.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "icu-i18n > 49.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n > 49.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -5594,10 +5918,10 @@ if test -n "$ICU_LIBS"; then pkg_cv_ICU_LIBS="$ICU_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n > 49.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n > 49.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "icu-i18n > 49.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-i18n > 49.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -5611,8 +5935,8 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -5629,35 +5953,35 @@ fi HAVE_ICU=0 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } HAVE_ICU=0 else ICU_CFLAGS=$pkg_cv_ICU_CFLAGS ICU_LIBS=$pkg_cv_ICU_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } - for ac_header in unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unorm2.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/ucnv.h unicode/utext.h unicode/ubrk.h unicode/utypes.h + for ac_header in unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unorm2.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/ucnv.h unicode/utext.h unicode/ubrk.h unicode/utypes.h do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes" +then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF HAVE_ICU=1 fi done - fi fi if test $HAVE_ICU = 0; then HAVE_ICU=0; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libicu (icu-config disabled)..." >&5 -$as_echo "$as_me: checking for libicu (icu-config disabled)..." >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libicu (icu-config disabled)..." >&5 +printf "%s\n" "$as_me: checking for libicu (icu-config disabled)..." >&6;} if test "$icu_libdir" != "no"; then ICU_LDFLAGS="-L$icu_libdir"; fi @@ -5667,19 +5991,20 @@ $as_echo "$as_me: checking for libicu (icu-config disabled)..." >&6;} /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : HAVE_ICU=1 -else +else $as_nop HAVE_ICU=0 fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext; LDFLAGS="$saved_LDFLAGS"; ICU_LIBS="-licui18n -licuuc -licudata -lm" @@ -5687,28 +6012,28 @@ rm -f core conftest.err conftest.$ac_objext \ if test $HAVE_ICU = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - for ac_header in unicode/uchar.h unicode/ustring.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + ac_fn_c_check_header_compile "$LINENO" "unicode/uchar.h" "ac_cv_header_unicode_uchar_h" "$ac_includes_default" +if test "x$ac_cv_header_unicode_uchar_h" = xyes +then : + printf "%s\n" "#define HAVE_UNICODE_UCHAR_H 1" >>confdefs.h fi +ac_fn_c_check_header_compile "$LINENO" "unicode/ustring.h" "ac_cv_header_unicode_ustring_h" "$ac_includes_default" +if test "x$ac_cv_header_unicode_ustring_h" = xyes +then : + printf "%s\n" "#define HAVE_UNICODE_USTRING_H 1" >>confdefs.h -done +fi GRAPHIC_LFLAGS="$ICU_LDFLAGS $ICU_LIBS $GRAPHIC_LFLAGS" HAVE_ICU=1 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The International Components for Unicode (ICU) development headers and libraries do not appear to be available on this system." >&5 -$as_echo "$as_me: WARNING: The International Components for Unicode (ICU) development headers and libraries do not appear to be available on this system." >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The International Components for Unicode (ICU) development headers and libraries do not appear to be available on this system." >&5 +printf "%s\n" "$as_me: WARNING: The International Components for Unicode (ICU) development headers and libraries do not appear to be available on this system." >&2;} fi fi @@ -5720,18 +6045,20 @@ fi # Apple's libobjc.A, screwing up the links to the GNU libobjc. #-------------------------------------------------------------------- # Check whether --enable-aspell was given. -if test "${enable_aspell+set}" = set; then : +if test ${enable_aspell+y} +then : enableval=$enable_aspell; -else +else $as_nop enable_aspell=yes fi if test "$enable_aspell" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for new_aspell_document_checker in -laspell" >&5 -$as_echo_n "checking for new_aspell_document_checker in -laspell... " >&6; } -if ${ac_cv_lib_aspell_new_aspell_document_checker+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for new_aspell_document_checker in -laspell" >&5 +printf %s "checking for new_aspell_document_checker in -laspell... " >&6; } +if test ${ac_cv_lib_aspell_new_aspell_document_checker+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-laspell $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5740,33 +6067,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 new_aspell_document_checker (); int -main () +main (void) { return new_aspell_document_checker (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_aspell_new_aspell_document_checker=yes -else +else $as_nop ac_cv_lib_aspell_new_aspell_document_checker=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aspell_new_aspell_document_checker" >&5 -$as_echo "$ac_cv_lib_aspell_new_aspell_document_checker" >&6; } -if test "x$ac_cv_lib_aspell_new_aspell_document_checker" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBASPELL 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_aspell_new_aspell_document_checker" >&5 +printf "%s\n" "$ac_cv_lib_aspell_new_aspell_document_checker" >&6; } +if test "x$ac_cv_lib_aspell_new_aspell_document_checker" = xyes +then : + printf "%s\n" "#define HAVE_LIBASPELL 1" >>confdefs.h LIBS="-laspell $LIBS" @@ -5774,31 +6098,27 @@ fi fi if test "${ac_cv_lib_aspell_new_aspell_document_checker}" = yes; then - for ac_header in aspell.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "aspell.h" "ac_cv_header_aspell_h" "$ac_includes_default" -if test "x$ac_cv_header_aspell_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ASPELL_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "aspell.h" "ac_cv_header_aspell_h" "$ac_includes_default" +if test "x$ac_cv_header_aspell_h" = xyes +then : + printf "%s\n" "#define HAVE_ASPELL_H 1" >>confdefs.h fi -done - -$as_echo "#define HAVE_ASPELL 1" >>confdefs.h +printf "%s\n" "#define HAVE_ASPELL 1" >>confdefs.h fi #-------------------------------------------------------------------- # Check for ICNS library. #-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for icns_read_family_from_file in -licns" >&5 -$as_echo_n "checking for icns_read_family_from_file in -licns... " >&6; } -if ${ac_cv_lib_icns_icns_read_family_from_file+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for icns_read_family_from_file in -licns" >&5 +printf %s "checking for icns_read_family_from_file in -licns... " >&6; } +if test ${ac_cv_lib_icns_icns_read_family_from_file+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-licns $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5807,33 +6127,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 icns_read_family_from_file (); int -main () +main (void) { return icns_read_family_from_file (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_icns_icns_read_family_from_file=yes -else +else $as_nop ac_cv_lib_icns_icns_read_family_from_file=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_icns_icns_read_family_from_file" >&5 -$as_echo "$ac_cv_lib_icns_icns_read_family_from_file" >&6; } -if test "x$ac_cv_lib_icns_icns_read_family_from_file" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBICNS 1 -_ACEOF +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_icns_icns_read_family_from_file" >&5 +printf "%s\n" "$ac_cv_lib_icns_icns_read_family_from_file" >&6; } +if test "x$ac_cv_lib_icns_icns_read_family_from_file" = xyes +then : + printf "%s\n" "#define HAVE_LIBICNS 1" >>confdefs.h LIBS="-licns $LIBS" @@ -5844,67 +6161,70 @@ fi # NSSound #-------------------------------------------------------------------- # Check whether --enable-sound was given. -if test "${enable_sound+set}" = set; then : +if test ${enable_sound+y} +then : enableval=$enable_sound; -else +else $as_nop enable_sound=yes fi # Initialize to nothing... BUILD_SOUND= # Check for the headers... -for ac_header in sndfile.h + for ac_header in sndfile.h do : - ac_fn_c_check_header_mongrel "$LINENO" "sndfile.h" "ac_cv_header_sndfile_h" "$ac_includes_default" -if test "x$ac_cv_header_sndfile_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SNDFILE_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "sndfile.h" "ac_cv_header_sndfile_h" "$ac_includes_default" +if test "x$ac_cv_header_sndfile_h" = xyes +then : + printf "%s\n" "#define HAVE_SNDFILE_H 1" >>confdefs.h have_sndfile=yes -else +else $as_nop have_sndfile=no fi done - -for ac_header in ao/ao.h + for ac_header in ao/ao.h do : - ac_fn_c_check_header_mongrel "$LINENO" "ao/ao.h" "ac_cv_header_ao_ao_h" "$ac_includes_default" -if test "x$ac_cv_header_ao_ao_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_AO_AO_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "ao/ao.h" "ac_cv_header_ao_ao_h" "$ac_includes_default" +if test "x$ac_cv_header_ao_ao_h" = xyes +then : + printf "%s\n" "#define HAVE_AO_AO_H 1" >>confdefs.h have_ao=yes -else +else $as_nop have_ao=no fi done - # Only if we have both... if test $have_sndfile = yes -a $have_ao = yes -a $enable_sound = yes; then BUILD_SOUND="sound" + SOUND_LIBS=`pkg-config --libs sndfile ao` + SOUND_CFLAGS=`pkg-config --cflags sndfile ao` fi + + #-------------------------------------------------------------------- # NSSpeechSynthesizer #-------------------------------------------------------------------- # Check whether --enable-speech was given. -if test "${enable_speech+set}" = set; then : +if test ${enable_speech+y} +then : enableval=$enable_speech; -else +else $as_nop enable_speech=yes fi BUILD_SPEECH= # has flite, for speech synthesis. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for new_utterance in -lflite" >&5 -$as_echo_n "checking for new_utterance in -lflite... " >&6; } -if ${ac_cv_lib_flite_new_utterance+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for new_utterance in -lflite" >&5 +printf %s "checking for new_utterance in -lflite... " >&6; } +if test ${ac_cv_lib_flite_new_utterance+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lflite $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5913,57 +6233,55 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 new_utterance (); int -main () +main (void) { return new_utterance (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_flite_new_utterance=yes -else +else $as_nop ac_cv_lib_flite_new_utterance=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_flite_new_utterance" >&5 -$as_echo "$ac_cv_lib_flite_new_utterance" >&6; } -if test "x$ac_cv_lib_flite_new_utterance" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_flite_new_utterance" >&5 +printf "%s\n" "$ac_cv_lib_flite_new_utterance" >&6; } +if test "x$ac_cv_lib_flite_new_utterance" = xyes +then : have_speech=yes -else +else $as_nop have_speech=no fi -for ac_header in flite/flite.h + for ac_header in flite/flite.h do : - ac_fn_c_check_header_mongrel "$LINENO" "flite/flite.h" "ac_cv_header_flite_flite_h" "$ac_includes_default" -if test "x$ac_cv_header_flite_flite_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_FLITE_FLITE_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "flite/flite.h" "ac_cv_header_flite_flite_h" "$ac_includes_default" +if test "x$ac_cv_header_flite_flite_h" = xyes +then : + printf "%s\n" "#define HAVE_FLITE_FLITE_H 1" >>confdefs.h have_flite=yes -else +else $as_nop have_flite=no fi done - if test $have_flite = yes -a $have_speech = yes -a $enable_speech = yes; then BUILD_SPEECH="speech say" FLITE_BASE_LIBS="-lflite_usenglish -lflite_cmulex -lflite" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for register_cmu_us_kal16 in -lflite_cmu_us_kal16" >&5 -$as_echo_n "checking for register_cmu_us_kal16 in -lflite_cmu_us_kal16... " >&6; } -if ${ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for register_cmu_us_kal16 in -lflite_cmu_us_kal16" >&5 +printf %s "checking for register_cmu_us_kal16 in -lflite_cmu_us_kal16... " >&6; } +if test ${ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lflite_cmu_us_kal16 $FLITE_BASE_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -5972,32 +6290,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 register_cmu_us_kal16 (); int -main () +main (void) { return register_cmu_us_kal16 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16=yes -else +else $as_nop ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16" >&5 -$as_echo "$ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16" >&6; } -if test "x$ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16" >&5 +printf "%s\n" "$ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16" >&6; } +if test "x$ac_cv_lib_flite_cmu_us_kal16_register_cmu_us_kal16" = xyes +then : have_kal16=yes -else +else $as_nop have_kal16=no fi @@ -6011,20 +6328,22 @@ fi # NSSpeechRecognizer #-------------------------------------------------------------------- # Check whether --enable-speech-recognizer was given. -if test "${enable_speech_recognizer+set}" = set; then : +if test ${enable_speech_recognizer+y} +then : enableval=$enable_speech_recognizer; -else +else $as_nop enable_speech_recognizer=yes fi BUILD_SPEECH_RECOGNIZER= # has pocketsphinx, for speech recognition. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ps_start_utt in -lpocketsphinx" >&5 -$as_echo_n "checking for ps_start_utt in -lpocketsphinx... " >&6; } -if ${ac_cv_lib_pocketsphinx_ps_start_utt+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ps_start_utt in -lpocketsphinx" >&5 +printf %s "checking for ps_start_utt in -lpocketsphinx... " >&6; } +if test ${ac_cv_lib_pocketsphinx_ps_start_utt+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lpocketsphinx $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6033,49 +6352,46 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 ps_start_utt (); int -main () +main (void) { return ps_start_utt (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_pocketsphinx_ps_start_utt=yes -else +else $as_nop ac_cv_lib_pocketsphinx_ps_start_utt=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pocketsphinx_ps_start_utt" >&5 -$as_echo "$ac_cv_lib_pocketsphinx_ps_start_utt" >&6; } -if test "x$ac_cv_lib_pocketsphinx_ps_start_utt" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pocketsphinx_ps_start_utt" >&5 +printf "%s\n" "$ac_cv_lib_pocketsphinx_ps_start_utt" >&6; } +if test "x$ac_cv_lib_pocketsphinx_ps_start_utt" = xyes +then : have_speech_recognizer=yes -else +else $as_nop have_speech_recognizer=no fi -for ac_header in pocketsphinx/pocketsphinx_export.h + for ac_header in pocketsphinx/pocketsphinx_export.h do : - ac_fn_c_check_header_mongrel "$LINENO" "pocketsphinx/pocketsphinx_export.h" "ac_cv_header_pocketsphinx_pocketsphinx_export_h" "$ac_includes_default" -if test "x$ac_cv_header_pocketsphinx_pocketsphinx_export_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_POCKETSPHINX_POCKETSPHINX_EXPORT_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "pocketsphinx/pocketsphinx_export.h" "ac_cv_header_pocketsphinx_pocketsphinx_export_h" "$ac_includes_default" +if test "x$ac_cv_header_pocketsphinx_pocketsphinx_export_h" = xyes +then : + printf "%s\n" "#define HAVE_POCKETSPHINX_POCKETSPHINX_EXPORT_H 1" >>confdefs.h have_pocketsphinx=yes -else +else $as_nop have_pocketsphinx=no fi done - if test $have_pocketsphinx = yes -a $have_speech_recognizer = yes -a $enable_speech_recognizer = yes; then BUILD_SPEECH_RECOGNIZER="speech_recognizer" RECOGNIZER_BASE_LIBS=`pkg-config --libs pocketsphinx sphinxbase` @@ -6087,6 +6403,86 @@ fi +#-------------------------------------------------------------------- +# NSMovie / NSMovieView +#-------------------------------------------------------------------- +# Check whether --enable-movie was given. +if test ${enable_movie+y} +then : + enableval=$enable_movie; +else $as_nop + enable_movie=yes +fi + +BUILD_MOVIE= + +# has avcodec +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avcodec_find_decoder in -lavcodec" >&5 +printf %s "checking for avcodec_find_decoder in -lavcodec... " >&6; } +if test ${ac_cv_lib_avcodec_avcodec_find_decoder+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_check_lib_save_LIBS=$LIBS +LIBS="-lavcodec $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* 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. */ +char avcodec_find_decoder (); +int +main (void) +{ +return avcodec_find_decoder (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_lib_avcodec_avcodec_find_decoder=yes +else $as_nop + ac_cv_lib_avcodec_avcodec_find_decoder=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_avcodec_find_decoder" >&5 +printf "%s\n" "$ac_cv_lib_avcodec_avcodec_find_decoder" >&6; } +if test "x$ac_cv_lib_avcodec_avcodec_find_decoder" = xyes +then : + have_avcodec=yes +else $as_nop + have_avcodec=no +fi + + for ac_header in libavcodec/avcodec.h +do : + ac_fn_c_check_header_compile "$LINENO" "libavcodec/avcodec.h" "ac_cv_header_libavcodec_avcodec_h" "$ac_includes_default" +if test "x$ac_cv_header_libavcodec_avcodec_h" = xyes +then : + printf "%s\n" "#define HAVE_LIBAVCODEC_AVCODEC_H 1" >>confdefs.h + have_codec=yes +else $as_nop + have_codec=no +fi + +done +if test $have_avcodec = yes -a $have_codec = yes -a $enable_movie = yes; then + +printf "%s\n" "#define HAVE_AVCODEC 1" >>confdefs.h + + BUILD_MOVIE="yes" + MOVIE_BASE_LIBS=`pkg-config --libs libavcodec libavformat libavutil libswscale` + MOVIE_BASE_CFLAGS=`pkg-config --cflags libavcodec libavformat libavutil libswscale` +fi + + + + #-------------------------------------------------------------------- # Find CUPS #-------------------------------------------------------------------- @@ -6097,9 +6493,10 @@ GSCUPS_DATADIR= BUILD_GSCUPS=NO # Check whether --enable-cups was given. -if test "${enable_cups+set}" = set; then : +if test ${enable_cups+y} +then : enableval=$enable_cups; -else +else $as_nop enable_cups=yes fi @@ -6108,11 +6505,12 @@ if test $enable_cups = yes; then BUILD_GSCUPS=YES # Extract the first word of "cups-config", so it can be a program name with args. set dummy cups-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_have_cups+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_have_cups+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$have_cups"; then ac_cv_prog_have_cups="$have_cups" # Let the user override the test. else @@ -6120,11 +6518,15 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_have_cups="yes" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6136,11 +6538,11 @@ fi fi have_cups=$ac_cv_prog_have_cups if test -n "$have_cups"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_cups" >&5 -$as_echo "$have_cups" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_cups" >&5 +printf "%s\n" "$have_cups" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6160,30 +6562,29 @@ fi CPPFLAGS="$GSCUPS_CFLAGS ${CPPFLAGS}" LDFLAGS="$GSCUPS_LDFLAGS ${LDFLAGS}" - for ac_header in cups/cups.h + for ac_header in cups/cups.h do : - ac_fn_c_check_header_mongrel "$LINENO" "cups/cups.h" "ac_cv_header_cups_cups_h" "$ac_includes_default" -if test "x$ac_cv_header_cups_cups_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_CUPS_CUPS_H 1 -_ACEOF + ac_fn_c_check_header_compile "$LINENO" "cups/cups.h" "ac_cv_header_cups_cups_h" "$ac_includes_default" +if test "x$ac_cv_header_cups_cups_h" = xyes +then : + printf "%s\n" "#define HAVE_CUPS_CUPS_H 1" >>confdefs.h have_cups=yes -else +else $as_nop have_cups=no fi done - if test "$have_cups" = no; then enable_cups=no BUILD_GSCUPS=NO echo "Could not find cups.h, cups printing support will not be built." fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cupsServer in -lcups" >&5 -$as_echo_n "checking for cupsServer in -lcups... " >&6; } -if ${ac_cv_lib_cups_cupsServer+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cupsServer in -lcups" >&5 +printf %s "checking for cupsServer in -lcups... " >&6; } +if test ${ac_cv_lib_cups_cupsServer+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lcups $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6192,32 +6593,31 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 cupsServer (); int -main () +main (void) { return cupsServer (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_cups_cupsServer=yes -else +else $as_nop ac_cv_lib_cups_cupsServer=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cups_cupsServer" >&5 -$as_echo "$ac_cv_lib_cups_cupsServer" >&6; } -if test "x$ac_cv_lib_cups_cupsServer" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cups_cupsServer" >&5 +printf "%s\n" "$ac_cv_lib_cups_cupsServer" >&6; } +if test "x$ac_cv_lib_cups_cupsServer" = xyes +then : have_cups=yes -else +else $as_nop have_cups=no fi @@ -6239,8 +6639,8 @@ fi #-------------------------------------------------------------------- # Check for -Wdeclaration-after-statement #-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wdeclaration-after-statement" >&5 -$as_echo_n "checking whether the compiler supports -Wdeclaration-after-statement... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wdeclaration-after-statement" >&5 +printf %s "checking whether the compiler supports -Wdeclaration-after-statement... " >&6; } saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wdeclaration-after-statement" @@ -6248,23 +6648,24 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : HAS_W_DECL_AFTER_STATEMENT=yes -else +else $as_nop HAS_W_DECL_AFTER_STATEMENT=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$saved_CFLAGS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_W_DECL_AFTER_STATEMENT" >&5 -$as_echo "$HAS_W_DECL_AFTER_STATEMENT" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $HAS_W_DECL_AFTER_STATEMENT" >&5 +printf "%s\n" "$HAS_W_DECL_AFTER_STATEMENT" >&6; } if test x"$HAS_W_DECL_AFTER_STATEMENT" = x"yes"; then WARN_FLAGS="-Wall -Wdeclaration-after-statement" @@ -6285,13 +6686,13 @@ GUILIBS=`gnustep-config --gui-libs` #-------------------------------------------------------------------- # Record the version #-------------------------------------------------------------------- -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the version of gnustep-gui we are compiling" >&5 -$as_echo_n "checking for the version of gnustep-gui we are compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the version of gnustep-gui we are compiling" >&5 +printf %s "checking for the version of gnustep-gui we are compiling... " >&6; } if test -f "Version"; then . ./Version fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNUSTEP_GUI_VERSION" >&5 -$as_echo "$GNUSTEP_GUI_VERSION" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GNUSTEP_GUI_VERSION" >&5 +printf "%s\n" "$GNUSTEP_GUI_VERSION" >&6; } @@ -6338,8 +6739,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -6369,15 +6770,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ 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 if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -6391,8 +6792,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -6409,7 +6810,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$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. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -6425,8 +6826,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -6449,14 +6850,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -6466,46 +6869,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -6514,13 +6917,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -6529,8 +6925,12 @@ case $0 in #(( 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 + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -6542,30 +6942,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -6578,13 +6958,14 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -6611,18 +6992,20 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -6634,12 +7017,13 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -6670,7 +7054,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -6692,6 +7076,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -6705,6 +7093,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -6746,7 +7140,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -6755,7 +7149,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -6818,7 +7212,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -6876,14 +7270,16 @@ $config_headers Report bugs to the package provider." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -6920,15 +7316,15 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -6936,7 +7332,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -6945,7 +7341,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -6973,7 +7369,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -6987,7 +7383,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -7016,8 +7412,8 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree @@ -7353,7 +7749,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -7361,17 +7757,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -7388,7 +7784,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -7412,9 +7808,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$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/ ;; @@ -7467,8 +7863,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -7510,9 +7906,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$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 "$ac_tmp/stdin" @@ -7528,20 +7924,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -7582,7 +7978,8 @@ if test "$no_create" != yes; then $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + diff --git a/configure.ac b/configure.ac index 98640cb6b6..952f7d612f 100644 --- a/configure.ac +++ b/configure.ac @@ -543,8 +543,12 @@ AC_CHECK_HEADERS(ao/ao.h, have_ao=yes, have_ao=no) # Only if we have both... if test $have_sndfile = yes -a $have_ao = yes -a $enable_sound = yes; then BUILD_SOUND="sound" + SOUND_LIBS=`pkg-config --libs sndfile ao` + SOUND_CFLAGS=`pkg-config --cflags sndfile ao` fi AC_SUBST(BUILD_SOUND) +AC_SUBST(SOUND_LIBS) +AC_SUBST(SOUND_CFLAGS) #-------------------------------------------------------------------- # NSSpeechSynthesizer @@ -589,6 +593,27 @@ AC_SUBST(RECOGNIZER_BASE_LIBS) AC_SUBST(RECOGNIZER_BASE_CFLAGS) AC_SUBST(RECOGNIZER_ENGINE_CLASS) +#-------------------------------------------------------------------- +# NSMovie / NSMovieView +#-------------------------------------------------------------------- +AC_ARG_ENABLE(movie, + [ --disable-movie Disable NSMovie/NSMovieView functionality],, + enable_movie=yes) +BUILD_MOVIE= + +# has avcodec +AC_CHECK_LIB(avcodec, avcodec_find_decoder, have_avcodec=yes, have_avcodec=no) +AC_CHECK_HEADERS(libavcodec/avcodec.h, have_codec=yes, have_codec=no) +if test $have_avcodec = yes -a $have_codec = yes -a $enable_movie = yes; then + AC_DEFINE(HAVE_AVCODEC,1,[Define if you have avcodec for NSMovie]) + BUILD_MOVIE="yes" + MOVIE_BASE_LIBS=`pkg-config --libs libavcodec libavformat libavutil libswscale` + MOVIE_BASE_CFLAGS=`pkg-config --cflags libavcodec libavformat libavutil libswscale` +fi +AC_SUBST(MOVIE_BASE_LIBS) +AC_SUBST(MOVIE_BASE_CFLAGS) +AC_SUBST(BUILD_MOVIE) + #-------------------------------------------------------------------- # Find CUPS #--------------------------------------------------------------------