mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
Merge branch 'master' into NSBrowser_bindings_branch
This commit is contained in:
commit
2bcc354972
11 changed files with 422 additions and 203 deletions
|
@ -34,7 +34,7 @@ BUNDLE_NAME = StandardPicker NamedPicker WheelPicker
|
|||
|
||||
BUNDLE_INSTALL_DIR = $(GNUSTEP_LIBRARY)/ColorPickers
|
||||
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../Headers/Additions -I../Headers
|
||||
ADDITIONAL_INCLUDE_DIRS += -I../Headers/Additions -I../Headers -I../Source
|
||||
|
||||
ADDITIONAL_LIB_DIRS += -L../Source/$(GNUSTEP_OBJ_DIR) -L../Models/$(GNUSTEP_OBJ_DIR)
|
||||
|
||||
|
@ -43,10 +43,9 @@ StandardPicker_OBJC_FILES = GSStandardColorPicker.m \
|
|||
GSRGBColorPicker.m \
|
||||
GSCMYKColorPicker.m \
|
||||
GSHSBColorPicker.m \
|
||||
GSGrayColorPicker.m \
|
||||
GSColorSliderCell.m
|
||||
GSGrayColorPicker.m
|
||||
NamedPicker_OBJC_FILES = GSNamedColorPicker.m
|
||||
WheelPicker_OBJC_FILES = GSWheelColorPicker.m GSColorSliderCell.m
|
||||
WheelPicker_OBJC_FILES = GSWheelColorPicker.m
|
||||
|
||||
# The class to load
|
||||
StandardPicker_PRINCIPAL_CLASS = GSStandardColorPicker
|
||||
|
|
|
@ -373,7 +373,8 @@ GSCSLinearExpression.m \
|
|||
GSCSStrength.m \
|
||||
GSCSEditInfo.m \
|
||||
GSCSEditVariableManager.m \
|
||||
GSCSTableau.m
|
||||
GSCSTableau.m \
|
||||
GSColorSliderCell.m
|
||||
|
||||
# Turn off NSMenuItem warning that NSMenuItem conforms to <NSObject>,
|
||||
# but does not implement <NSObject>'s methods itself (it inherits
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <AppKit/NSSliderCell.h>
|
||||
|
||||
APPKIT_EXPORT_CLASS
|
||||
@interface GSColorSliderCell : NSSliderCell
|
||||
{
|
||||
int mode;
|
|
@ -1,4 +1,4 @@
|
|||
/* GSStandardColorPicker.m
|
||||
/* GSColorSliderCell.m
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
|
|
@ -287,14 +287,21 @@ static CGFloat default_miter_limit = 10.0;
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
GSIArrayEmpty(_pathElements);
|
||||
NSZoneFree([self zone], _pathElements);
|
||||
if (_pathElements)
|
||||
{
|
||||
GSIArrayEmpty(_pathElements);
|
||||
NSZoneFree([self zone], _pathElements);
|
||||
}
|
||||
|
||||
if (_cacheImage != nil)
|
||||
RELEASE(_cacheImage);
|
||||
if (_cacheImage)
|
||||
{
|
||||
RELEASE(_cacheImage);
|
||||
}
|
||||
|
||||
if (_dash_pattern != NULL)
|
||||
NSZoneFree([self zone], _dash_pattern);
|
||||
if (_dash_pattern)
|
||||
{
|
||||
NSZoneFree([self zone], _dash_pattern);
|
||||
}
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
@ -2066,22 +2073,36 @@ static int winding_curve(double_point from, double_point to, double_point c1,
|
|||
//
|
||||
// NSCopying Protocol
|
||||
//
|
||||
- (id)copyWithZone:(NSZone *)zone
|
||||
- (id) copyWithZone: (NSZone *)zone
|
||||
{
|
||||
NSBezierPath *path = (NSBezierPath*)NSCopyObject (self, 0, zone);
|
||||
NSBezierPath *path = (NSBezierPath*)NSCopyObject(self, 0, zone);
|
||||
|
||||
/* Get the zone actually usd by the copy so we can use it consistently.
|
||||
*/
|
||||
zone = [path zone];
|
||||
|
||||
if (_cachesBezierPath && _cacheImage)
|
||||
path->_cacheImage = [_cacheImage copy];
|
||||
{
|
||||
// FIXME ... should this retain rather than copy?
|
||||
path->_cacheImage = [_cacheImage copyWithZone: zone];
|
||||
}
|
||||
else
|
||||
{
|
||||
path->_cacheImage = nil;
|
||||
}
|
||||
|
||||
if (_dash_pattern != NULL)
|
||||
if (_dash_pattern)
|
||||
{
|
||||
CGFloat *pattern = NSZoneMalloc(zone, _dash_count * sizeof(CGFloat));
|
||||
|
||||
memcpy(pattern, _dash_pattern, _dash_count * sizeof(CGFloat));
|
||||
_dash_pattern = pattern;
|
||||
path->_dash_pattern = pattern;
|
||||
}
|
||||
|
||||
path->_pathElements = GSIArrayCopyWithZone(_pathElements, zone);
|
||||
if (_pathElements)
|
||||
{
|
||||
path->_pathElements = GSIArrayCopyWithZone(_pathElements, zone);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
|
|
@ -565,9 +565,24 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
|
|||
|
||||
- (void) setFrame: (NSRect)rect
|
||||
{
|
||||
BOOL changedOrigin = NO;
|
||||
BOOL changedSize = NO;
|
||||
if (NSEqualPoints(_frame.origin, rect.origin) == NO)
|
||||
{
|
||||
changedOrigin = YES;
|
||||
}
|
||||
if (NSEqualSizes(_frame.size, rect.size) == NO)
|
||||
{
|
||||
changedSize = YES;
|
||||
}
|
||||
[super setFrame: rect];
|
||||
[self setBoundsOrigin: [self constrainScrollPoint: _bounds.origin]];
|
||||
[_super_view reflectScrolledClipView: self];
|
||||
|
||||
if (changedOrigin || changedSize)
|
||||
{
|
||||
NSPoint proposedPoint = [self constrainScrollPoint: _bounds.origin];
|
||||
[self setBoundsOrigin: proposedPoint];
|
||||
[_super_view reflectScrolledClipView: self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) translateOriginToPoint: (NSPoint)aPoint
|
||||
|
|
|
@ -688,7 +688,7 @@ static NSString *_placeholderItem = nil;
|
|||
NSRect itemFrame = NSMakeRect (0,0,0,0);
|
||||
NSInteger index;
|
||||
NSUInteger count = [_items count];
|
||||
CGFloat x = _horizontalMargin;
|
||||
CGFloat x = 0;
|
||||
CGFloat y = -_itemSize.height;
|
||||
|
||||
if (_maxNumberOfColumns > 0 && _maxNumberOfRows > 0)
|
||||
|
@ -700,7 +700,7 @@ static NSString *_placeholderItem = nil;
|
|||
{
|
||||
if (index % _numberOfColumns == 0)
|
||||
{
|
||||
x = _horizontalMargin;
|
||||
x = 0;
|
||||
y += _verticalMargin + _itemSize.height;
|
||||
}
|
||||
|
||||
|
@ -731,6 +731,9 @@ static NSString *_placeholderItem = nil;
|
|||
|
||||
x += _itemSize.width + _horizontalMargin;
|
||||
}
|
||||
if(_maxNumberOfColumns == 1) {
|
||||
itemFrame.size.width = self.frame.size.width;
|
||||
}
|
||||
return itemFrame;
|
||||
}
|
||||
|
||||
|
|
|
@ -1832,6 +1832,11 @@ static float menuBarHeight = 0.0;
|
|||
inMode: NSEventTrackingRunLoopMode
|
||||
dequeue: YES];
|
||||
type = [event type];
|
||||
if (type == NSLeftMouseUp || type == NSRightMouseUp || type == NSOtherMouseUp)
|
||||
{
|
||||
shouldFinish = YES;
|
||||
break; // Exit the loop to proceed to StopPeriodicEvents
|
||||
}
|
||||
if (type == NSAppKitDefined)
|
||||
{
|
||||
[[event window] sendEvent: event];
|
||||
|
|
|
@ -21,20 +21,14 @@ int main()
|
|||
mask.flags.useUserKeyEquivalent = 1;
|
||||
mask.flags.truncateLastLine = 1;
|
||||
|
||||
#if GS_WORDS_BIGENDIAN == 1
|
||||
pass(mask.value == 0b00010010000000000001110000001001, "mask.flags translates to mask.value");
|
||||
#else
|
||||
pass(mask.value == 0b10010000001110000000000001001000, "mask.flags translates to mask.value");
|
||||
#endif
|
||||
|
||||
// reset mask
|
||||
mask.value = 0;
|
||||
mask.flags = (GSCellFlags){0};
|
||||
|
||||
// now make sure values translate to flags
|
||||
#if GS_WORDS_BIGENDIAN == 1
|
||||
mask.value = 0b00010010000000000001110000001001;
|
||||
#else
|
||||
mask.value = 0b10010000001110000000000001001000;
|
||||
#endif
|
||||
|
||||
pass(mask.flags.state == 1, "state is correctly set");
|
||||
pass(mask.flags.selectable == 1, "selectable is correctly set");
|
||||
|
@ -48,4 +42,4 @@ int main()
|
|||
|
||||
DESTROY(arp);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
483
configure
vendored
483
configure
vendored
|
@ -644,6 +644,7 @@ BUILD_SPEECH_RECOGNIZER
|
|||
BUILD_SPEECH
|
||||
BUILD_SOUND
|
||||
HAVE_ICU
|
||||
ICU_CFLAGS
|
||||
ICU_LIBS
|
||||
ICU_CONFIG
|
||||
MAGICKCORE_LIBS
|
||||
|
@ -653,12 +654,13 @@ IMAGEMAGICK_CFLAGS
|
|||
HAVE_LIBPNG_CONFIG
|
||||
TIFF_LIBS
|
||||
TIFF_CFLAGS
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
EGREP
|
||||
GREP
|
||||
XMKMF
|
||||
PKG_CONFIG_LIBDIR
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG
|
||||
WHOAMI
|
||||
CPP
|
||||
OBJEXT
|
||||
EXEEXT
|
||||
|
@ -698,7 +700,6 @@ infodir
|
|||
docdir
|
||||
oldincludedir
|
||||
includedir
|
||||
runstatedir
|
||||
localstatedir
|
||||
sharedstatedir
|
||||
sysconfdir
|
||||
|
@ -734,7 +735,6 @@ enable_ungif
|
|||
enable_libgif
|
||||
enable_imagemagick
|
||||
enable_icu
|
||||
enable_icu_config
|
||||
with_icu_library
|
||||
enable_aspell
|
||||
enable_sound
|
||||
|
@ -751,16 +751,18 @@ LDFLAGS
|
|||
LIBS
|
||||
CPPFLAGS
|
||||
CPP
|
||||
XMKMF
|
||||
PKG_CONFIG
|
||||
PKG_CONFIG_PATH
|
||||
PKG_CONFIG_LIBDIR
|
||||
XMKMF
|
||||
TIFF_CFLAGS
|
||||
TIFF_LIBS
|
||||
IMAGEMAGICK_CFLAGS
|
||||
IMAGEMAGICK_LIBS
|
||||
MAGICKCORE_CFLAGS
|
||||
MAGICKCORE_LIBS'
|
||||
MAGICKCORE_LIBS
|
||||
ICU_CFLAGS
|
||||
ICU_LIBS'
|
||||
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -799,7 +801,6 @@ datadir='${datarootdir}'
|
|||
sysconfdir='${prefix}/etc'
|
||||
sharedstatedir='${prefix}/com'
|
||||
localstatedir='${prefix}/var'
|
||||
runstatedir='${localstatedir}/run'
|
||||
includedir='${prefix}/include'
|
||||
oldincludedir='/usr/include'
|
||||
docdir='${datarootdir}/doc/${PACKAGE}'
|
||||
|
@ -1052,15 +1053,6 @@ 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=* \
|
||||
|
@ -1198,7 +1190,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 runstatedir
|
||||
libdir localedir mandir
|
||||
do
|
||||
eval ac_val=\$$ac_var
|
||||
# Remove trailing slashes.
|
||||
|
@ -1351,7 +1343,6 @@ 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]
|
||||
|
@ -1394,8 +1385,6 @@ Optional Features:
|
|||
--enable-libgif Enable libgif-based GIF support
|
||||
--enable-imagemagick Enable ImageMagick support
|
||||
--disable-icu Disable International Components for Unicode
|
||||
--disable-icu-config Do not use the icu-config script to check
|
||||
for ICU.
|
||||
--disable-aspell Disable aspell for spellchecker
|
||||
--disable-sound Disable sound
|
||||
--disable-speech Disable speech server
|
||||
|
@ -1424,12 +1413,12 @@ Some influential environment variables:
|
|||
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
|
||||
you have headers in a nonstandard directory <include dir>
|
||||
CPP C preprocessor
|
||||
XMKMF Path to xmkmf, Makefile generator for X Window System
|
||||
PKG_CONFIG path to pkg-config utility
|
||||
PKG_CONFIG_PATH
|
||||
directories to add to pkg-config's search path
|
||||
PKG_CONFIG_LIBDIR
|
||||
path overriding pkg-config's built-in search path
|
||||
XMKMF Path to xmkmf, Makefile generator for X Window System
|
||||
TIFF_CFLAGS C compiler flags for TIFF, overriding pkg-config
|
||||
TIFF_LIBS linker flags for TIFF, overriding pkg-config
|
||||
IMAGEMAGICK_CFLAGS
|
||||
|
@ -1440,6 +1429,8 @@ Some influential environment variables:
|
|||
C compiler flags for MAGICKCORE, overriding pkg-config
|
||||
MAGICKCORE_LIBS
|
||||
linker flags for MAGICKCORE, overriding pkg-config
|
||||
ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
|
||||
ICU_LIBS linker flags for ICU, overriding pkg-config
|
||||
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
@ -3407,6 +3398,216 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
|||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for pkg-config
|
||||
#--------------------------------------------------------------------
|
||||
# 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
|
||||
case $WHOAMI in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
as_dummy="$PATH:/usr/ucb"
|
||||
for as_dir in $as_dummy
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
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
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
test -z "$ac_cv_path_WHOAMI" && ac_cv_path_WHOAMI="echo"
|
||||
;;
|
||||
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; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
case $PKG_CONFIG in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_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
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
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; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
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
|
||||
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.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_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
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
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; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_pt_PKG_CONFIG" = x; then
|
||||
PKG_CONFIG=""
|
||||
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;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
PKG_CONFIG=$ac_pt_PKG_CONFIG
|
||||
fi
|
||||
else
|
||||
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
|
||||
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; }
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi
|
||||
# If the modern mechanism fails we may have an older pkg-config
|
||||
# so try looking it up the old fashioned way.
|
||||
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
|
||||
case $PKG_CONFIG in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_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
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
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; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Add target OS directories as necessary
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -4496,126 +4697,6 @@ fi
|
|||
GRAPHIC_CFLAGS="$with_tiff_include $GRAPHIC_CFLAGS"
|
||||
else
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
case $PKG_CONFIG in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_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
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
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; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
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
|
||||
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.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_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
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
;;
|
||||
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; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_pt_PKG_CONFIG" = x; then
|
||||
PKG_CONFIG=""
|
||||
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;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
PKG_CONFIG=$ac_pt_PKG_CONFIG
|
||||
fi
|
||||
else
|
||||
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
|
||||
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; }
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
PKG_CONFIG=""
|
||||
fi
|
||||
fi
|
||||
|
||||
pkg_failed=no
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libtiff-4" >&5
|
||||
$as_echo_n "checking for libtiff-4... " >&6; }
|
||||
|
@ -5385,14 +5466,6 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# Check whether --enable-icu-config was given.
|
||||
if test "${enable_icu_config+set}" = set; then :
|
||||
enableval=$enable_icu_config;
|
||||
else
|
||||
enable_icu_config=yes
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-icu-library was given.
|
||||
if test "${with_icu_library+set}" = set; then :
|
||||
|
@ -5402,8 +5475,9 @@ else
|
|||
fi
|
||||
|
||||
|
||||
if test $enable_icu = yes; then
|
||||
if test "$enable_icu_config" = "yes"; then
|
||||
if test "x$enable_icu" = "xyes"; then :
|
||||
|
||||
# First attempt, icu-config
|
||||
|
||||
ok=no
|
||||
|
||||
|
@ -5486,13 +5560,102 @@ $as_echo "$ICU_LDFLAGS" >&6; }
|
|||
fi
|
||||
|
||||
if test $ok = yes; then
|
||||
have_icu=yes
|
||||
HAVE_ICU=1
|
||||
else
|
||||
have_icu=no
|
||||
HAVE_ICU=0
|
||||
fi
|
||||
|
||||
else
|
||||
have_icu=no;
|
||||
|
||||
# If no icu-config, attempt pkg-config
|
||||
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; }
|
||||
|
||||
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
|
||||
($PKG_CONFIG --exists --print-errors "icu-i18n > 49.0") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$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
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
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
|
||||
($PKG_CONFIG --exists --print-errors "icu-i18n > 49.0") 2>&5
|
||||
ac_status=$?
|
||||
$as_echo "$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
|
||||
else
|
||||
pkg_failed=yes
|
||||
fi
|
||||
else
|
||||
pkg_failed=untried
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test $pkg_failed = yes; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||
_pkg_short_errors_supported=yes
|
||||
else
|
||||
_pkg_short_errors_supported=no
|
||||
fi
|
||||
if test $_pkg_short_errors_supported = yes; then
|
||||
ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-i18n > 49.0" 2>&1`
|
||||
else
|
||||
ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-i18n > 49.0" 2>&1`
|
||||
fi
|
||||
# Put the nasty error message in config.log where it belongs
|
||||
echo "$ICU_PKG_ERRORS" >&5
|
||||
|
||||
HAVE_ICU=0
|
||||
elif test $pkg_failed = untried; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "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; }
|
||||
|
||||
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 :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `$as_echo "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;}
|
||||
if test "$icu_libdir" != "no"; then
|
||||
|
@ -5512,9 +5675,9 @@ main ()
|
|||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
have_icu="yes"
|
||||
HAVE_ICU=1
|
||||
else
|
||||
have_icu="no"
|
||||
HAVE_ICU=0
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext;
|
||||
|
@ -5522,7 +5685,8 @@ rm -f core conftest.err conftest.$ac_objext \
|
|||
ICU_LIBS="-licui18n -licuuc -licudata -lm"
|
||||
fi
|
||||
|
||||
if test "$have_icu" = "yes"; then
|
||||
|
||||
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
|
||||
|
@ -5546,6 +5710,7 @@ $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;}
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
|
41
configure.ac
41
configure.ac
|
@ -87,6 +87,17 @@ fi
|
|||
AC_PROG_CC
|
||||
AC_PROG_CPP
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for pkg-config
|
||||
#--------------------------------------------------------------------
|
||||
AC_PATH_PROG(WHOAMI, whoami, echo, $PATH:/usr/ucb)
|
||||
PKG_PROG_PKG_CONFIG
|
||||
# If the modern mechanism fails we may have an older pkg-config
|
||||
# so try looking it up the old fashioned way.
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG,pkg-config,,)
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Add target OS directories as necessary
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -455,33 +466,37 @@ AC_ARG_ENABLE(icu,
|
|||
[ --disable-icu Disable International Components for Unicode],,
|
||||
enable_icu=yes)
|
||||
|
||||
AC_ARG_ENABLE(icu-config,
|
||||
[ --disable-icu-config Do not use the icu-config script to check
|
||||
for ICU.],,
|
||||
enable_icu_config=yes)
|
||||
|
||||
AC_ARG_WITH(icu-library,
|
||||
[ --with-icu-library=PATH library path for ICU libraries (only checked
|
||||
if not using icu-config)],
|
||||
icu_libdir="$withval", icu_libdir="no")
|
||||
|
||||
if test $enable_icu = yes; then
|
||||
if test "$enable_icu_config" = "yes"; then
|
||||
AC_CHECK_ICU(4.0, have_icu=yes, have_icu=no)
|
||||
else
|
||||
have_icu=no;
|
||||
AS_IF([test "x$enable_icu" = "xyes"], [
|
||||
# First attempt, icu-config
|
||||
AC_CHECK_ICU(4.0, [HAVE_ICU=1], [HAVE_ICU=0])
|
||||
|
||||
# If no icu-config, attempt pkg-config
|
||||
if test $HAVE_ICU = 0; then
|
||||
PKG_CHECK_MODULES([ICU], [icu-i18n > 49.0], [
|
||||
AC_CHECK_HEADERS([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],
|
||||
HAVE_ICU=1)], [HAVE_ICU=0])
|
||||
fi
|
||||
|
||||
if test $HAVE_ICU = 0; then
|
||||
HAVE_ICU=0;
|
||||
AC_CHECKING([for libicu (icu-config disabled)])
|
||||
if test "$icu_libdir" != "no"; then
|
||||
ICU_LDFLAGS="-L$icu_libdir";
|
||||
fi
|
||||
saved_LDFLAGS="$LDFLAGS";
|
||||
LDFLAGS="$LDFLAGS $LIBS $ICU_LDFLAGS -licui18n -licuuc -licudata -lm"
|
||||
AC_TRY_LINK([],[], have_icu="yes", have_icu="no");
|
||||
AC_TRY_LINK([],[], HAVE_ICU=1, HAVE_ICU=0);
|
||||
LDFLAGS="$saved_LDFLAGS";
|
||||
ICU_LIBS="-licui18n -licuuc -licudata -lm"
|
||||
fi
|
||||
|
||||
|
||||
if test "$have_icu" = "yes"; then
|
||||
if test $HAVE_ICU = 1; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_CHECK_HEADERS(unicode/uchar.h unicode/ustring.h)
|
||||
GRAPHIC_LFLAGS="$ICU_LDFLAGS $ICU_LIBS $GRAPHIC_LFLAGS"
|
||||
|
@ -490,7 +505,7 @@ if test $enable_icu = yes; then
|
|||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([The International Components for Unicode (ICU) development headers and libraries do not appear to be available on this system.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
AC_SUBST(HAVE_ICU)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue