]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Build-System] Fix build for m1 and m2 chips on macOS
authorSeven Du <dujinfang@x-y-t.cn>
Tue, 14 Jan 2025 11:06:11 +0000 (19:06 +0800)
committerGitHub <noreply@github.com>
Tue, 14 Jan 2025 11:06:11 +0000 (14:06 +0300)
configure.ac
libs/libvpx/build/make/configure.sh

index 7f3f2e92f7cc2bfb000b496adec6f2826de0dd8e..49232f5c6009e7d0c9adcf065c4e67ab00a74eef 100755 (executable)
@@ -740,6 +740,8 @@ case "$host" in
         APR_REMOVEFROM(SWITCH_AM_CFLAGS, -fPIC)
         APR_ADDTO(CPPFLAGS, -I/usr/local/opt/openssl/include)
         APR_ADDTO(LDFLAGS, -L/usr/local/opt/openssl/lib)
+        APR_ADDTO(CPPFLAGS, -I/opt/homebrew/include)
+        APR_ADDTO(LDFLAGS, -L/opt/homebrew/lib)
         if test "x$enable_core_odbc_support" != "xno"; then
           APR_ADDTO([PLATFORM_CORE_LDFLAGS], [--framework CoreFoundation])
        fi
@@ -838,6 +840,8 @@ AM_CONDITIONAL([SYSTEM_APR],[test "${use_system_apr}" = "yes"])
 
 save_LIBS="$LIBS"
 LIBS=
+
+AC_CHECK_HEADERS([jpeglib.h])
 AC_CHECK_LIB(jpeg, jpeg_std_error,, AC_MSG_ERROR([no usable libjpeg; please install libjpeg devel package or equivalent]))
 
 AC_CHECK_LIB(jbig, jbg_enc_out, have_libjbig=yes, have_libjbig=no)
@@ -1262,6 +1266,8 @@ case $host in
         path_push_unique PKG_CONFIG_PATH /usr/local/opt/sqlite/lib/pkgconfig/
         path_push_unique PKG_CONFIG_PATH /usr/local/opt/ldns/lib/pkgconfig/
         path_push_unique PKG_CONFIG_PATH /usr/local/opt/ffmpeg/lib/pkgconfig/
+        path_push_unique PKG_CONFIG_PATH /opt/homebrew/lib/pkgconfig/
+        path_push_unique PKG_CONFIG_PATH /opt/homebrew/opt/sqlite/lib/pkgconfig/
        ;;
 esac
 
index b1f7804a5973b71590f36ef17184f5ca6f99e98f..140c1d7e0d6ddef05019a20eec8948c102fa4fbf 100644 (file)
@@ -767,6 +767,10 @@ process_common_toolchain() {
 
     # detect tgt_os
     case "$gcctarget" in
+      arm64-apple-darwin*)
+        tgt_isa=arm64
+        tgt_os=darwin
+        ;;
       *darwin*)
         tgt_isa=x86_64
         tgt_os=darwin
@@ -845,7 +849,7 @@ process_common_toolchain() {
   # Handle darwin variants. Newer SDKs allow targeting older
   # platforms, so use the newest one available.
   case ${toolchain} in
-    arm*-darwin*)
+    DISABLE-arm*-darwin*)
       add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
       iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
       if [ -d "${iphoneos_sdk_dir}" ]; then
@@ -1046,7 +1050,7 @@ EOF
           soft_enable unit_tests
           ;;
 
-        darwin*)
+        DISABLE-darwin*)
           XCRUN_FIND="xcrun --sdk iphoneos --find"
           CXX="$(${XCRUN_FIND} clang++)"
           CC="$(${XCRUN_FIND} clang)"