Skip to content

Build on macOS with Apple silicon (arm64) #3208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-12]
os: [macos-14]
configure:
- {label: "with parser generation", opt: "--enable-parser-generation" }
- {label: "wo curl", opt: "--without-curl" }
Expand All @@ -91,10 +91,12 @@ jobs:
- {label: "with pcre2", opt: "--with-pcre2" }
steps:
- name: Setup Dependencies
# autoconf, curl, pcre2 not installed because they're already
# curl, pcre2 not installed because they're already
# included in the image
run: |
brew install automake \
brew install autoconf \
automake \
libtool \
yajl \
lmdb \
lua \
Expand Down
49 changes: 30 additions & 19 deletions build/pcre.m4
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,41 @@ else

AC_MSG_CHECKING([for libpcre config script])

for x in ${test_paths}; do
dnl # Determine if the script was specified and use it directly
if test ! -d "$x" -a -e "$x"; then
PCRE_CONFIG=$x
pcre_path="no"
break
fi
AC_CHECK_PROG([PCRE_CONFIG_IN_ENV], [pcre-config], [yes], [no])

if test "$PCRE_CONFIG_IN_ENV" = "yes"; then
AC_MSG_NOTICE([pcre-config found in envinronment])

PCRE_CONFIG=pcre-config
pcre_path="no"
else
AC_MSG_NOTICE([pcre-config not found in environment. checking known paths])

dnl # Try known config script names/locations
for PCRE_CONFIG in pcre-config; do
if test -e "${x}/bin/${PCRE_CONFIG}"; then
pcre_path="${x}/bin"
for x in ${test_paths}; do
dnl # Determine if the script was specified and use it directly
if test ! -d "$x" -a -e "$x"; then
PCRE_CONFIG=$x
pcre_path="no"
break
elif test -e "${x}/${PCRE_CONFIG}"; then
pcre_path="${x}"
fi

dnl # Try known config script names/locations
for PCRE_CONFIG in pcre-config; do
if test -e "${x}/bin/${PCRE_CONFIG}"; then
pcre_path="${x}/bin"
break
elif test -e "${x}/${PCRE_CONFIG}"; then
pcre_path="${x}"
break
else
pcre_path=""
fi
done
if test -n "$pcre_path"; then
break
else
pcre_path=""
fi
done
if test -n "$pcre_path"; then
break
fi
done
fi

if test -n "${pcre_path}"; then
if test "${pcre_path}" != "no"; then
Expand Down
23 changes: 23 additions & 0 deletions build/yajl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,29 @@ else
# fi
fi

# FIX: if the include directory in CFLAGS ends with "include/yajl",
# remove the suffix "/yajl". the library header files are included
# using the prefix (for example, #include <yajl/yajl_tree.h>), and
# this is even the case for the library itself (for example,
# yajl_tree.h includes yajl/yajl_common.h).

new_cflags=""

for flag in $YAJL_CFLAGS; do
case "$flag" in
-I*/include/yajl)
new_flag="${flag%/yajl}"
new_cflags="$new_cflags $new_flag"
;;
*)
new_cflags="$new_cflags $flag"
;;
esac
done

YAJL_CFLAGS="$new_cflags"


if test -z "${YAJL_LDADD}"; then
if test -z "${YAJL_MANDATORY}"; then
if test -z "${YAJL_DISABLED}"; then
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ AC_CHECK_HEADERS([iostream])
AC_CHECK_HEADERS([sys/utsname.h])


# ??
LT_INIT([dlopen])
# Initialize libtool
LT_INIT

# Identify platform
AC_CANONICAL_HOST
Expand Down
Loading