From 0e94fea288d7f29dfbd5bef38ccae12c3f050d73 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Sun, 5 Apr 2015 22:17:32 -0700 Subject: [PATCH] nproc is Linux-specific, but you can do the same with sysctl on a Mac --- libretro-config.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libretro-config.sh b/libretro-config.sh index c573e251..f28ea640 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -171,8 +171,11 @@ case "$platform" in config_log_build_host if [ -z "$JOBS" ]; then + # nproc is generally Linux-specific. if command -v nproc >/dev/null; then JOBS="$(nproc)" + elif [ "$pltaform" = "osx" ] && command -v sysctl >/dev/null; then + JOBS="$(sysctl -n hw.physicalcpu)" else JOBS=1 fi