Skip to content

Commit b8a9c8b

Browse files
authored
[Build-System] Fix build for m1 and m2 chips on macOS
1 parent ca9430e commit b8a9c8b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,8 @@ case "$host" in
740740
APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
741741
APR_ADDTO(CPPFLAGS, -I/usr/local/opt/openssl/include)
742742
APR_ADDTO(LDFLAGS, -L/usr/local/opt/openssl/lib)
743+
APR_ADDTO(CPPFLAGS, -I/opt/homebrew/include)
744+
APR_ADDTO(LDFLAGS, -L/opt/homebrew/lib)
743745
if test "x$enable_core_odbc_support" != "xno"; then
744746
APR_ADDTO([PLATFORM_CORE_LDFLAGS], [--framework CoreFoundation])
745747
fi
@@ -838,6 +840,8 @@ AM_CONDITIONAL([SYSTEM_APR],[test "${use_system_apr}" = "yes"])
838840

839841
save_LIBS="$LIBS"
840842
LIBS=
843+
844+
AC_CHECK_HEADERS([jpeglib.h])
841845
AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent]))
842846

843847
AC_CHECK_LIB(jbig, jbg_enc_out, have_libjbig=yes, have_libjbig=no)
@@ -1262,6 +1266,8 @@ case $host in
12621266
path_push_unique PKG_CONFIG_PATH /usr/local/opt/sqlite/lib/pkgconfig/
12631267
path_push_unique PKG_CONFIG_PATH /usr/local/opt/ldns/lib/pkgconfig/
12641268
path_push_unique PKG_CONFIG_PATH /usr/local/opt/ffmpeg/lib/pkgconfig/
1269+
path_push_unique PKG_CONFIG_PATH /opt/homebrew/lib/pkgconfig/
1270+
path_push_unique PKG_CONFIG_PATH /opt/homebrew/opt/sqlite/lib/pkgconfig/
12651271
;;
12661272
esac
12671273

libs/libvpx/build/make/configure.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,10 @@ process_common_toolchain() {
767767

768768
# detect tgt_os
769769
case "$gcctarget" in
770+
arm64-apple-darwin*)
771+
tgt_isa=arm64
772+
tgt_os=darwin
773+
;;
770774
*darwin*)
771775
tgt_isa=x86_64
772776
tgt_os=darwin
@@ -845,7 +849,7 @@ process_common_toolchain() {
845849
# Handle darwin variants. Newer SDKs allow targeting older
846850
# platforms, so use the newest one available.
847851
case ${toolchain} in
848-
arm*-darwin*)
852+
DISABLE-arm*-darwin*)
849853
add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
850854
iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
851855
if [ -d "${iphoneos_sdk_dir}" ]; then
@@ -1046,7 +1050,7 @@ EOF
10461050
soft_enable unit_tests
10471051
;;
10481052

1049-
darwin*)
1053+
DISABLE-darwin*)
10501054
XCRUN_FIND="xcrun --sdk iphoneos --find"
10511055
CXX="$(${XCRUN_FIND} clang++)"
10521056
CC="$(${XCRUN_FIND} clang)"

0 commit comments

Comments
 (0)