diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9f1e536..9484418 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -181,6 +181,16 @@ if(USE_TOR_EMBEDDED) # OpenSSL objects that duplicate the DLL import lib already linked above. # These GNU ld options are not supported on macOS (which uses lld) — # guard with NOT APPLE so the build still works on macOS. + # On macOS, the libevent/openssl/zlib install paths are not on the + # default linker search path. Pull them in from the standard + # homebrew locations so -levent / -lssl / -lssl etc. resolve. + if(APPLE) + target_link_directories(triangles_common PUBLIC + /opt/homebrew/opt/libevent/lib + /opt/homebrew/opt/openssl@3/lib + /opt/homebrew/opt/zlib/lib + ) + endif() if(NOT APPLE) target_link_libraries(triangles_common PUBLIC -Wl,--allow-multiple-definition diff --git a/src/tor/build-libtor.sh b/src/tor/build-libtor.sh index c7bf959..5be8a28 100644 --- a/src/tor/build-libtor.sh +++ b/src/tor/build-libtor.sh @@ -11,9 +11,9 @@ fi cd "$TOR_SRC_DIR" -if [[ ! -x "./configure" ]]; then - echo "Running autogen.sh" - ./autogen.sh +if [[ ! -x "./configure" ]] || [[ "${AUTORECONF_FORCE:-0}" == "1" ]]; then + echo "Running autoreconf with -W no-error (autogen.sh -W all,error is too strict for autoconf 2.73+)" + autoreconf -i -f -W no-error fi echo "Configuring Tor static library build from: $TOR_SRC_DIR"