This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
After Yosemite there's no /usr/include.
[perl5.git] / hints / darwin.sh
index da79297..3e92add 100644 (file)
@@ -129,9 +129,11 @@ ccflags="${ccflags} -fno-common -DPERL_DARWIN"
 # stdint.h defining INT32_MIN as (-INT32_MAX-1)
 # -- Edward Moy
 #
-case "$(grep '^#define INT32_MIN' /usr/include/stdint.h)" in
+if test -f /usr/include/stdint.h; then
+  case "$(grep '^#define INT32_MIN' /usr/include/stdint.h)" in
   *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;;
-esac
+  esac
+fi
 
 # Avoid Apple's cpp precompiler, better for extensions
 if [ "X`echo | ${cc} -no-cpp-precomp -E - 2>&1 >/dev/null`" = "X" ]; then