CONFIGURE: Only check Sparkle and NSDockTilePlugIn availability on OS X

This commit is contained in:
Thierry Crozat 2016-03-25 20:28:41 +00:00
parent e917971681
commit a2250d74ed

49
configure vendored
View file

@ -3937,11 +3937,16 @@ echo "$_mpeg2"
#
# Check for Sparkle if updates support is enabled
#
echocheck "Sparkle"
if test "$_updates" = no; then
#
# Check is NSDockTilePlugIn protocol is supported
#
case $_host_os in
darwin*)
echocheck "Sparkle"
if test "$_updates" = no; then
_sparkle=no
else
if test "$_sparkle" = auto ; then
else
if test "$_sparkle" = auto ; then
_sparkle=no
cat > $TMPC << EOF
#include <Cocoa/Cocoa.h>
@ -3949,21 +3954,28 @@ if test "$_sparkle" = auto ; then
int main(void) { SUUpdater *updater = [SUUpdater sharedUpdater]; return 0; }
EOF
cc_check $SPARKLE_CFLAGS $SPARKLE_LIBS -framework Sparkle -ObjC++ -lobjc && _sparkle=yes
fi
if test "$_sparkle" = yes ; then
fi
if test "$_sparkle" = yes ; then
append_var LIBS "$SPARKLE_LIBS -framework Sparkle"
append_var INCLUDES "$SPARKLE_CFLAGS"
fi
define_in_config_if_yes "$_sparkle" 'USE_SPARKLE'
fi
echo "$_sparkle"
fi
define_in_config_if_yes "$_sparkle" 'USE_SPARKLE'
fi
echo "$_sparkle"
;;
*)
_sparkle=no
;;
esac
#
# Check is NSDockTilePlugIn protocol is supported
#
# NSDockTilePlugIn was added in OS X 10.6, so will not be available when compiling on older OS X versions.
echocheck "DockTilePlugin"
if test "$_osxdockplugin" = auto ; then
case $_host_os in
darwin*)
# NSDockTilePlugIn was added in OS X 10.6, so will not be available when compiling on older OS X versions.
echocheck "DockTilePlugin"
if test "$_osxdockplugin" = auto ; then
_osxdockplugin=no
cat > $TMPC << EOF
#include <Cocoa/Cocoa.h>
@ -3972,9 +3984,14 @@ if test "$_osxdockplugin" = auto ; then
@end
EOF
cc_check -c -ObjC++ && _osxdockplugin=yes
fi
define_in_config_if_yes "$_osxdockplugin" 'USE_DOCKTILEPLUGIN'
echo "$_osxdockplugin"
fi
define_in_config_if_yes "$_osxdockplugin" 'USE_DOCKTILEPLUGIN'
echo "$_osxdockplugin"
;;
*)
_osxdockplugin=no
;;
esac
#
# Check for FluidSynth