diff --git a/libwebsockets.sh b/libwebsockets.sh index 126e59cf91..1dbb4c3f86 100644 --- a/libwebsockets.sh +++ b/libwebsockets.sh @@ -8,10 +8,21 @@ build_requires: - "OpenSSL:(?!osx)" - ninja - alibuild-recipe-tools -prefer_system: .* +# On Mac, Brew's libwebsockets loads Brew's Python, which confuses ROOT. +prefer_system: "(?!osx_)" prefer_system_check: | - printf '#if !__has_include()\n#error \"Cannot find libwebsocket\"\n#endif\n' | cc -I$(brew --prefix libwebsockets)/include -c -xc - -o /dev/null - printf '#include \n#if LWS_LIBRARY_VERSION_NUMBER < 4000000 \n#error \"JAliEn-ROOT requires libwebsockets >= 4.0 but lesser version was detected\"\n#endif\n' | cc -c -x c -I$(brew --prefix libwebsockets)/include - -o /dev/null || exit 1 + #!/bin/bash -e + cc -c -xc - -o /dev/null <<\EOF + #if !__has_include() + #error "Cannot find libwebsocket" + #endif + EOF + cc -c -xc - -o /dev/null <<\EOF + #include + #if LWS_LIBRARY_VERSION_NUMBER < 4000000 + #error "JAliEn-ROOT requires libwebsockets >= 4.0 but lesser version was detected" + #endif + EOF --- #!/bin/bash -e SONAME=so