dnl
AC_ARG_ENABLE(macosx,
[ --enable-macosx Mac OS X gui support (default enabled on Mac OS X)])
-if test "x${enable_macosx}" != "xno" &&
-(test "${SYS}" = "darwin" || test "${enable_macosx}" = "yes")
+if test "x${enable_macosx}" != "xno" -a "${SYS}" = "darwin"
then
- VLC_ADD_LIBS([macosx minimal_macosx],[-Wl,-framework,Cocoa])
- VLC_ADD_LIBS([macosx minimal_macosx],[-Wl,-framework,OpenGL])
- VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,Carbon])
- VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,CoreServices])
- VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,AGL])
- VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit])
- VLC_ADD_LIBS([macosx], [-Wl,-framework,IOKit])
- VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
- VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle])
- VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit -Wl,-framework,BGHUDAppKit])
- VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit])
- dnl For bug report
- VLC_ADD_LIBS([macosx], [-Wl,-framework,AddressBook])
- VLC_ADD_LIBS([macosx], [-Wl,-framework,WebKit])
+ VLC_ADD_LIBS([macosx minimal_macosx], [-Wl,-framework,Cocoa -Wl,-framework,OpenGL -Wl,-framework,Carbon -Wl,-framework,CoreServices -Wl,-framework,AGL])
VLC_ADD_OBJCFLAGS([macosx minimal_macosx], [-fobjc-exceptions] )
-
VLC_ADD_PLUGIN([macosx minimal_macosx])
+
+ VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit])
+ AC_CHECK_HEADERS(Sparkle/Sparkle.h, [
+ VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/Sparkle -Wl,-framework,Sparkle])
+ VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/Sparkle])
+ ])
+ if test -d ${CONTRIB_DIR}/BGHUDAppKit
+ then
+ VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit -Wl,-framework,BGHUDAppKit])
+ VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}/BGHUDAppKit])
+ fi
+
fi
dnl
/*****************************************************************************
* Preamble
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <stdlib.h> /* malloc(), free() */
#include <sys/param.h> /* for MAXPATHLEN */
#include <string.h>
#import "TrackSynchronization.h"
#import <AddressBook/AddressBook.h> /* for crashlog send mechanism */
-#import <Sparkle/Sparkle.h> /* we're the update delegate */
+#ifdef HAVE_SPARKLE_SPARKLE_H
+# import <Sparkle/Sparkle.h> /* we're the update delegate */
+#endif
/*****************************************************************************
* Local prototypes.
[self setIntf:nil];
}
+#ifdef HAVE_SPARKLE_SPARKLE_H
#pragma mark -
#pragma mark Sparkle delegate
/* received directly before the update gets installed, so let's shut down a bit */
[o_remote stopListening: self];
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_STOP );
}
+#endif
#pragma mark -
#pragma mark Media Key support
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#import "CompatibilityFixes.h"
#import "simple_prefs.h"
#import "misc.h"
#import "intf.h"
#import "AppleRemote.h"
-#import <Sparkle/Sparkle.h> //for o_intf_last_update_lbl
+
+#ifdef HAVE_SPARKLE_SPARKLE_H
+# import <Sparkle/Sparkle.h> //for o_intf_last_update_lbl
+#endif
static NSString* VLCSPrefsToolbarIdentifier = @"Our Simple Preferences Toolbar Identifier";
static NSString* VLCIntfSettingToolbarIdentifier = @"Intf Settings Item Identifier";
[self setupButton: o_intf_embedded_ckb forBoolValue: "embedded-video"];
[self setupButton: o_intf_appleremote_ckb forBoolValue: "macosx-appleremote"];
[self setupButton: o_intf_mediakeys_ckb forBoolValue: "macosx-mediakeys"];
+#ifdef HAVE_SPARKLE_SPARKLE_H
if( [[SUUpdater sharedUpdater] lastUpdateCheckDate] != NULL )
[o_intf_last_update_lbl setStringValue: [NSString stringWithFormat: _NS("Last check on: %@"), [[[SUUpdater sharedUpdater] lastUpdateCheckDate] descriptionWithLocale: [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]]]];
else
+#endif
[o_intf_last_update_lbl setStringValue: _NS("No check was performed yet.")];
psz_tmp = config_GetPsz( p_intf, "control" );
if (psz_tmp) {