forked from minhngoc25a/freetype2
[build] Move mac support code to `mac-support.h'.
* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h, include/freetype/config/ftconfig.h: Split off mac-specific stuff to... * include/freetype/config/mac-support.h: ...this new file. * CMakeLists.txt, builds/unix/configure.raw: Remove `/undef -> #undef' string replacement; the affected code is no longer part of the `ftconfig.h' template.
This commit is contained in:
parent
bd7251ac97
commit
0322efb5e5
|
@ -253,8 +253,6 @@ if (UNIX)
|
|||
"#undef +(HAVE_FCNTL_H)" "#define \\1 1"
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
endif ()
|
||||
string(REPLACE "/undef " "#undef "
|
||||
FTCONFIG_H "${FTCONFIG_H}")
|
||||
else ()
|
||||
file(READ "${PROJECT_SOURCE_DIR}/include/freetype/config/ftconfig.h"
|
||||
FTCONFIG_H)
|
||||
|
|
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2020-07-05 David Turner <david@freetype.org>
|
||||
|
||||
[build] Move mac support code to `mac-support.h'.
|
||||
|
||||
* builds/unix/ftconfig.h.in, builds/vms/ftconfig.h,
|
||||
include/freetype/config/ftconfig.h: Split off mac-specific stuff
|
||||
to...
|
||||
* include/freetype/config/mac-support.h: ...this new file.
|
||||
|
||||
* CMakeLists.txt, builds/unix/configure.raw: Remove `/undef ->
|
||||
#undef' string replacement; the affected code is no longer part of
|
||||
the `ftconfig.h' template.
|
||||
|
||||
2020-07-05 David Turner <david@freetype.org>
|
||||
|
||||
[build] Put integer type definitions into `integer-types.h'.
|
||||
|
|
|
@ -1158,13 +1158,7 @@ AC_CONFIG_FILES([ftoption.h:${srcdir}/../../include/freetype/config/ftoption.h],
|
|||
rm ftoption.tmp],
|
||||
[FTOPTION_H_SED="$FTOPTION_H_SED"])
|
||||
|
||||
# since #undef doesn't survive in configuration header files we replace
|
||||
# `/undef' with `#undef' after creating the output file
|
||||
|
||||
AC_CONFIG_HEADERS([ftconfig.h],
|
||||
[mv ftconfig.h ftconfig.tmp
|
||||
sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
|
||||
rm ftconfig.tmp])
|
||||
AC_CONFIG_HEADERS([ftconfig.h])
|
||||
|
||||
# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
|
||||
# and `builds/unix/unix-cc.mk' that will be used by the build system
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#endif /* FT_USE_AUTOCONF_SIZEOF_TYPES */
|
||||
|
||||
#include <freetype/config/integer-types.h>
|
||||
|
||||
#include <freetype/config/mac-support.h>
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
@ -76,47 +76,6 @@ FT_BEGIN_HEADER
|
|||
#endif
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* AUTOMATIC CONFIGURATION MACROS
|
||||
*
|
||||
* These macros are computed from the ones defined above. Don't touch
|
||||
* their definition, unless you know precisely what you are doing. No
|
||||
* porter should need to mess with them.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Mac support
|
||||
*
|
||||
* This is the only necessary change, so it is defined here instead
|
||||
* providing a new configuration file.
|
||||
*/
|
||||
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
/* No Carbon frameworks for 64bit 10.4.x. */
|
||||
/* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
|
||||
/* so guess the system version by maximum errno before inclusion. */
|
||||
#include <errno.h>
|
||||
#ifdef ECANCELED /* defined since 10.2 */
|
||||
#include "AvailabilityMacros.h"
|
||||
#endif
|
||||
#if defined( __LP64__ ) && \
|
||||
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
|
||||
#undef FT_MACINTOSH
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
/* Classic MacOS compilers */
|
||||
#include "ConditionalMacros.h"
|
||||
#if TARGET_OS_MAC
|
||||
#define FT_MACINTOSH 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Fix compiler warning with sgi compiler. */
|
||||
#if defined( __sgi ) && !defined( __GNUC__ )
|
||||
#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#define FT_SIZEOF_LONG 4
|
||||
|
||||
#include <freetype/config/integer-types.h>
|
||||
#include <freetype/config/mac-support.h>
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
@ -81,36 +82,6 @@ FT_BEGIN_HEADER
|
|||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Mac support
|
||||
*
|
||||
* This is the only necessary change, so it is defined here instead
|
||||
* providing a new configuration file.
|
||||
*/
|
||||
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
/* No Carbon frameworks for 64bit 10.4.x. */
|
||||
/* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
|
||||
/* so guess the system version by maximum errno before inclusion. */
|
||||
#include <errno.h>
|
||||
#ifdef ECANCELED /* defined since 10.2 */
|
||||
#include "AvailabilityMacros.h"
|
||||
#endif
|
||||
#if defined( __LP64__ ) && \
|
||||
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
|
||||
#undef FT_MACINTOSH
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
/* Classic MacOS compilers */
|
||||
#include "ConditionalMacros.h"
|
||||
#if TARGET_OS_MAC
|
||||
#define FT_MACINTOSH 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Fix compiler warning with sgi compiler. */
|
||||
#if defined( __sgi ) && !defined( __GNUC__ )
|
||||
#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
#include FT_CONFIG_STANDARD_LIBRARY_H
|
||||
|
||||
#include <freetype/config/integer-types.h>
|
||||
#include <freetype/config/mac-support.h>
|
||||
|
||||
FT_BEGIN_HEADER
|
||||
|
||||
|
@ -63,36 +64,6 @@ FT_BEGIN_HEADER
|
|||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Mac support
|
||||
*
|
||||
* This is the only necessary change, so it is defined here instead
|
||||
* providing a new configuration file.
|
||||
*/
|
||||
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
/* No Carbon frameworks for 64bit 10.4.x. */
|
||||
/* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
|
||||
/* so guess the system version by maximum errno before inclusion. */
|
||||
#include <errno.h>
|
||||
#ifdef ECANCELED /* defined since 10.2 */
|
||||
#include "AvailabilityMacros.h"
|
||||
#endif
|
||||
#if defined( __LP64__ ) && \
|
||||
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
|
||||
#undef FT_MACINTOSH
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
/* Classic MacOS compilers */
|
||||
#include "ConditionalMacros.h"
|
||||
#if TARGET_OS_MAC
|
||||
#define FT_MACINTOSH 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Fix compiler warning with sgi compiler. */
|
||||
#if defined( __sgi ) && !defined( __GNUC__ )
|
||||
#if defined( _COMPILER_VERSION ) && ( _COMPILER_VERSION >= 730 )
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
/****************************************************************************
|
||||
*
|
||||
* config/mac-support.h
|
||||
*
|
||||
* Mac/OS X support configuration header.
|
||||
*
|
||||
* Copyright (C) 1996-2020 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
* modified, and distributed under the terms of the FreeType project
|
||||
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
* this file you indicate that you have read the license and
|
||||
* understand and accept it fully.
|
||||
*
|
||||
*/
|
||||
#ifndef FREETYPE_CONFIG_MAC_SUPPORT_H_
|
||||
#define FREETYPE_CONFIG_MAC_SUPPORT_H_
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* Mac support
|
||||
*
|
||||
* This is the only necessary change, so it is defined here instead
|
||||
* providing a new configuration file.
|
||||
*/
|
||||
#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
|
||||
/* No Carbon frameworks for 64bit 10.4.x. */
|
||||
/* `AvailabilityMacros.h` is available since Mac OS X 10.2, */
|
||||
/* so guess the system version by maximum errno before inclusion. */
|
||||
#include <errno.h>
|
||||
#ifdef ECANCELED /* defined since 10.2 */
|
||||
#include "AvailabilityMacros.h"
|
||||
#endif
|
||||
#if defined( __LP64__ ) && \
|
||||
( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 )
|
||||
#undef FT_MACINTOSH
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
/* Classic MacOS compilers */
|
||||
#include "ConditionalMacros.h"
|
||||
#if TARGET_OS_MAC
|
||||
#define FT_MACINTOSH 1
|
||||
#endif
|
||||
|
||||
#endif /* Mac support */
|
||||
|
||||
#endif /* FREETYPE_CONFIG_MAC_SUPPORT_H_ */
|
Loading…
Reference in New Issue