fix prepoc dir for compilation on mac silicon - autogen, cmake, build.command (#1688)

Co-authored-by: vats004 <=>
This commit is contained in:
Vatsal Keshav
2025-04-11 11:14:08 +05:30
committed by GitHub
parent 3851d24315
commit 888ffa4ee0
3 changed files with 15 additions and 6 deletions

View File

@@ -133,6 +133,7 @@ Dependencies can be installed via Homebrew as:
```bash
brew install pkg-config
brew install autoconf automake libtool
brew install cmake gpac
# optional if you want OCR:
brew install tesseract
brew install leptonica

View File

@@ -506,8 +506,7 @@
# define png_aligncastconst(type, value) ((const void*)(value))
#endif /* __cplusplus */
#if defined(PNG_FLOATING_POINT_SUPPORTED) ||\
defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)
#if defined(PNG_FLOATING_POINT_SUPPORTED) || defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)
/* png.c requires the following ANSI-C constants if the conversion of
* floating point to ASCII is implemented therein:
*
@@ -515,10 +514,13 @@
* DBL_MIN Smallest normalized fp number (can be set to an arbitrary value)
* DBL_MAX Maximum floating point number (can be set to an arbitrary value)
*/
# include <float.h>
# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
/* Handle floating-point headers depending on the platform */
# if ((defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)) && \
!(defined(__APPLE__) && defined(__MACH__)) // this if block gets executed for older macOS versions
/* We need to check that <math.h> hasn't already been included earlier
* as it seems it doesn't agree with <fp.h>, yet we should really use
* <fp.h> if possible.
@@ -526,15 +528,19 @@
# if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
# include <fp.h>
# endif
# else
# else // this if block gets executed for newer macOS versions(Ventura/Sonoma/Sequoia) OR other platforms
/* if (defined(__APPLE__) && defined(__MACH__)) or other cases */
/* Include math.h for macOS and all other platforms */
# include <math.h>
# endif
# if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
/* Amiga SAS/C: We must include builtin FPU functions when compiling using
* MATH=68881
*/
# include <m68881.h>
# endif
#endif
/* This provides the non-ANSI (far) memory allocation routines. */

View File

@@ -130,7 +130,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
#if defined(MACOS) || defined(TARGET_OS_MAC)
#if defined(MACOS) // for older macOS
# define OS_CODE 7
# ifndef Z_SOLO
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
@@ -141,6 +141,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
# endif
# endif
#elif defined(__MACH__) && defined(__APPLE__) && defined(TARGET_OS_MAC) // for newer macOS(Ventura/Sonoma/Sequoia)
// do nothing because fdopen is defined already by XCode command-line-tools in these macOS versions
#endif
#ifdef __acorn