Skip to content

Commit 8133aa2

Browse files
committed
Fix Homebrew build
1 parent 290ed88 commit 8133aa2

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/auto/configure

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7233,6 +7233,12 @@ $as_echo "$rubyhdrdir" >&6; }
72337233
rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG['rubyarchhdrdir'] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG['arch']"`
72347234
if test -d "$rubyarchdir"; then
72357235
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
7236+
else
7237+
dnl rbconfig says darwin15 but 10.12 SDK has darwin16
7238+
rubyarchdir=${rubyarchdir/darwin15/darwin16}
7239+
if test -d "$rubyarchdir"; then
7240+
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
7241+
fi
72367242
fi
72377243
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'].gsub(/\./, '')[0,2]"`
72387244
if test "X$rubyversion" = "X"; then

src/configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,6 +1904,12 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then
19041904
rubyarchdir=`$vi_cv_path_ruby -r rbconfig -e "print ($ruby_rbconfig::CONFIG.has_key? 'rubyarchhdrdir') ? $ruby_rbconfig::CONFIG[['rubyarchhdrdir']] : '$rubyhdrdir/'+$ruby_rbconfig::CONFIG[['arch']]"`
19051905
if test -d "$rubyarchdir"; then
19061906
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
1907+
else
1908+
dnl rbconfig says darwin15 but 10.12 SDK has darwin16
1909+
rubyarchdir=${rubyarchdir/darwin15/darwin16}
1910+
if test -d "$rubyarchdir"; then
1911+
RUBY_CFLAGS="$RUBY_CFLAGS -I$rubyarchdir"
1912+
fi
19071913
fi
19081914
rubyversion=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
19091915
if test "X$rubyversion" = "X"; then

0 commit comments

Comments
 (0)