mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 05:40:18 +00:00
Configure: do not export OS_VERSION_{MAJOR,MINOR}
* this is only used for macOS so use built-in defines instead * the version is still used for some feature check in configure itself
This commit is contained in:
committed by
Martin Pulec
parent
3745cf8fb9
commit
d6523202af
10
configure.ac
10
configure.ac
@@ -175,9 +175,6 @@ then
|
||||
OBJS="$OBJS src/utils/autorelease_pool.o"
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED([OS_VERSION_MAJOR], $os_version_major, [OS kernel major version])
|
||||
AC_DEFINE_UNQUOTED([OS_VERSION_MINOR], $os_version_minor, [OS kernel minor version])
|
||||
|
||||
LINKER=$CXX
|
||||
|
||||
AC_SUBST(LINKER)
|
||||
@@ -236,7 +233,9 @@ AH_BOTTOM([
|
||||
* so supplying a fake one (Macs allocate always aligned pointers
|
||||
* to a 16 byte boundry.
|
||||
*/
|
||||
#if defined HAVE_MACOSX && OS_VERSION_MAJOR <= 9
|
||||
#if defined HAVE_MACOSX
|
||||
#include <Availability.h>
|
||||
#ifndef __MAC_10_9
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#ifndef POSIX_MEMALIGN
|
||||
@@ -251,7 +250,8 @@ static inline int posix_memalign(void **memptr, size_t alignment, size_t size)
|
||||
return 0;
|
||||
}
|
||||
#endif // POSIX_MEMALIGN
|
||||
#endif // defined HAVE_MACOSX && OS_VERSION_MAJOR <= 9
|
||||
#endif // !defined __MAC_10_9
|
||||
#endif // defined HAVE_MACOSX
|
||||
|
||||
#undef MIN
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#ifdef HAVE_COREAUDIO
|
||||
|
||||
#include <Availability.h>
|
||||
#include <AudioUnit/AudioUnit.h>
|
||||
#include <CoreAudio/AudioHardware.h>
|
||||
#include <pthread.h>
|
||||
@@ -64,7 +65,7 @@
|
||||
#define MODULE_NAME "[CoreAudio] "
|
||||
|
||||
struct state_ca_capture {
|
||||
#if OS_VERSION_MAJOR <= 9
|
||||
#ifndef __MAC_10_9
|
||||
ComponentInstance
|
||||
#else
|
||||
AudioComponentInstance
|
||||
@@ -246,7 +247,7 @@ static void * audio_cap_ca_init(const char *cfg)
|
||||
}
|
||||
struct state_ca_capture *s;
|
||||
OSErr ret = noErr;
|
||||
#if OS_VERSION_MAJOR <= 9
|
||||
#ifndef __MAC_10_9
|
||||
Component comp;
|
||||
ComponentDescription desc;
|
||||
#else
|
||||
@@ -326,7 +327,7 @@ static void * audio_cap_ca_init(const char *cfg)
|
||||
desc.componentFlags = 0;
|
||||
desc.componentFlagsMask = 0;
|
||||
|
||||
#if OS_VERSION_MAJOR > 9
|
||||
#ifdef __MAC_10_9
|
||||
comp = AudioComponentFindNext(NULL, &desc);
|
||||
if(!comp) {
|
||||
fprintf(stderr, "Error finding AUHAL component.\n");
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#ifdef HAVE_COREAUDIO
|
||||
|
||||
#include <AudioUnit/AudioUnit.h>
|
||||
#include <Availability.h>
|
||||
#include <chrono>
|
||||
#include <CoreAudio/AudioHardware.h>
|
||||
#include <iostream>
|
||||
@@ -64,7 +65,7 @@ using std::cout;
|
||||
#define CA_DIS_AD_B "ca-disable-adaptive-buf"
|
||||
|
||||
struct state_ca_playback {
|
||||
#if OS_VERSION_MAJOR <= 9
|
||||
#ifndef __MAC_10_9
|
||||
ComponentInstance
|
||||
#else
|
||||
AudioComponentInstance
|
||||
@@ -297,7 +298,7 @@ static void * audio_play_ca_init(const char *cfg)
|
||||
{
|
||||
struct state_ca_playback *s;
|
||||
OSErr ret = noErr;
|
||||
#if OS_VERSION_MAJOR <= 9
|
||||
#ifndef __MAC_10_9
|
||||
Component comp;
|
||||
ComponentDescription comp_desc;
|
||||
#else
|
||||
@@ -325,7 +326,7 @@ static void * audio_play_ca_init(const char *cfg)
|
||||
comp_desc.componentFlags = 0;
|
||||
comp_desc.componentFlagsMask = 0;
|
||||
|
||||
#if OS_VERSION_MAJOR <= 9
|
||||
#ifndef __MAC_10_9
|
||||
comp = FindNextComponent(NULL, &comp_desc);
|
||||
if(!comp) goto error;
|
||||
ret = OpenAComponent(comp, &s->auHALComponentInstance);
|
||||
|
||||
@@ -13,11 +13,15 @@
|
||||
#include <OpenGL/GL.h>
|
||||
#endif /* HAVE_LINUX */
|
||||
|
||||
#ifdef HAVE_MACOSX
|
||||
#include <Availability.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#if defined HAVE_MACOSX && OS_VERSION_MAJOR < 11
|
||||
#if defined HAVE_MACOSX && ! defined__MAC_10_11
|
||||
#define glGenFramebuffers glGenFramebuffersEXT
|
||||
#define glBindFramebuffer glBindFramebufferEXT
|
||||
#define GL_FRAMEBUFFER GL_FRAMEBUFFER_EXT
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
#include "mac_gl_common.h"
|
||||
|
||||
#include <Availability.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <OpenGL/gl.h>
|
||||
#include <sys/param.h>
|
||||
@@ -59,7 +60,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#if OS_VERSION_MAJOR < 11
|
||||
#ifndef __MAC_10_11
|
||||
#warning "You are compling on pre-10.7 Mac OS X version. Core OpenGL 3.2 profile won't work"
|
||||
#warning "in case you'll try to use this binary with Lion or higher (only legacy OpenGL)."
|
||||
#endif
|
||||
@@ -113,7 +114,7 @@ void *mac_gl_init(mac_opengl_version_t ogl_version)
|
||||
mac_version_major = get_mac_kernel_version_major();
|
||||
|
||||
if(ogl_version == MAC_GL_PROFILE_3_2) { /* Lion or later */
|
||||
#if OS_VERSION_MAJOR >= 11
|
||||
#ifdef __MAC_10_11
|
||||
if(mac_version_major < 11) {
|
||||
fprintf(stderr, "[Mac OpenGL] Unable to activate OpenGL 3.2 for pre-Lion Macs.\n");
|
||||
return NULL;
|
||||
@@ -126,7 +127,7 @@ void *mac_gl_init(mac_opengl_version_t ogl_version)
|
||||
return NULL;
|
||||
#endif
|
||||
} else if(ogl_version == MAC_GL_PROFILE_LEGACY) {
|
||||
#if OS_VERSION_MAJOR >= 11
|
||||
#ifdef __MAC_10_11
|
||||
if(mac_version_major >= 11) {
|
||||
attrs[0] = kCGLPFAOpenGLProfile;
|
||||
attrs[1] = kCGLOGLPVersion_Legacy; // kCGLOGLPVersion_Legacy;
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "tv.h"
|
||||
#include "video.h"
|
||||
|
||||
#include "Availability.h"
|
||||
#ifdef HAVE_MACOSX
|
||||
#include <Carbon/Carbon.h>
|
||||
#include <QuickTime/QuickTime.h>
|
||||
@@ -214,7 +215,7 @@ const quicktime_mode_t quicktime_modes[] = {
|
||||
/* for audio see TN2091 (among others) */
|
||||
struct state_quicktime {
|
||||
ComponentInstance videoDisplayComponentInstance[MAX_DEVICES];
|
||||
#if OS_VERSION_MAJOR <= 9
|
||||
#ifndef __MAC_10_9
|
||||
ComponentInstance
|
||||
#else
|
||||
AudioComponentInstance
|
||||
@@ -807,7 +808,7 @@ static void *display_quicktime_init(struct module *parent, const char *fmt, unsi
|
||||
static void display_quicktime_audio_init(struct state_quicktime *s)
|
||||
{
|
||||
OSErr ret = noErr;
|
||||
#if OS_VERSION_MAJOR <= 9
|
||||
#ifndef __MAC_10_9
|
||||
Component comp;
|
||||
ComponentDescription desc;
|
||||
#else
|
||||
@@ -830,7 +831,7 @@ static void display_quicktime_audio_init(struct state_quicktime *s)
|
||||
desc.componentFlags = 0;
|
||||
desc.componentFlagsMask = 0;
|
||||
|
||||
#if OS_VERSION_MAJOR <= 9
|
||||
#ifndef __MAC_10_9
|
||||
comp = FindNextComponent(NULL, &desc);
|
||||
if(!comp) goto audio_error;
|
||||
ret = OpenAComponent(comp, &s->auHALComponentInstance);
|
||||
|
||||
Reference in New Issue
Block a user