Created
August 1, 2013 01:35
-
-
Save felixbuenemann/6127766 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/configure b/src/configure | |
index 26f1b4e..ca368d5 100755 | |
--- a/src/configure | |
+++ b/src/configure | |
@@ -6404,7 +6406,7 @@ $as_echo_n "checking Ruby rbconfig... " >&6; } | |
$as_echo "$ruby_rbconfig" >&6; } | |
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Ruby header files" >&5 | |
$as_echo_n "checking Ruby header files... " >&6; } | |
- rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir'] || \\$hdrdir" 2>/dev/null` | |
+ rubyhdrdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['rubyhdrdir'] || $ruby_rbconfig::CONFIG['archdir']" 2>/dev/null` | |
if test "X$rubyhdrdir" != "X"; then | |
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rubyhdrdir" >&5 | |
$as_echo "$rubyhdrdir" >&6; } | |
@@ -6426,8 +6428,9 @@ $as_echo "$rubyhdrdir" >&6; } | |
librubyarg="$librubyarg" | |
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" | |
elif test -d "/System/Library/Frameworks/Ruby.framework"; then | |
- RUBY_LIBS="-framework Ruby" | |
- RUBY_CFLAGS= | |
+ ruby_fw_ver=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG['ruby_version'][0,3]"` | |
+ RUBY_LIBS="/System/Library/Frameworks/Ruby.framework/Versions/$ruby_fw_ver/Ruby" | |
+ RUBY_CFLAGS="-I/System/Library/Frameworks/Ruby.framework/Versions/$ruby_fw_ver/Headers -DRUBY_VERSION=$rubyversion" | |
librubyarg= | |
fi | |
diff --git a/src/configure.in b/src/configure.in | |
index d1dd9a9..4aa83a2 100644 | |
--- a/src/configure.in | |
+++ b/src/configure.in | |
@@ -1500,7 +1503,7 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then | |
fi | |
AC_MSG_RESULT($ruby_rbconfig) | |
AC_MSG_CHECKING(Ruby header files) | |
- rubyhdrdir=`$vi_cv_path_ruby -r mkmf -e "print $ruby_rbconfig::CONFIG[['rubyhdrdir']] || $ruby_rbconfig::CONFIG[['archdir']] || \\$hdrdir" 2>/dev/null` | |
+ rubyhdrdir=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['rubyhdrdir']] || $ruby_rbconfig::CONFIG[['archdir']]" 2>/dev/null` | |
if test "X$rubyhdrdir" != "X"; then | |
AC_MSG_RESULT($rubyhdrdir) | |
RUBY_CFLAGS="-I$rubyhdrdir" | |
@@ -1521,10 +1524,9 @@ if test "$enable_rubyinterp" = "yes" -o "$enable_rubyinterp" = "dynamic"; then | |
librubyarg="$librubyarg" | |
RUBY_LIBS="$RUBY_LIBS -L$rubylibdir" | |
elif test -d "/System/Library/Frameworks/Ruby.framework"; then | |
- dnl On Mac OS X it is safer to just use the -framework flag | |
- RUBY_LIBS="-framework Ruby" | |
- dnl Don't include the -I flag when -framework is set | |
- RUBY_CFLAGS= | |
+ ruby_fw_ver=`$vi_cv_path_ruby -r rbconfig -e "print $ruby_rbconfig::CONFIG[['ruby_version']][[0,3]]"` | |
+ RUBY_LIBS="/System/Library/Frameworks/Ruby.framework/Versions/$ruby_fw_ver/Ruby" | |
+ RUBY_CFLAGS="-I/System/Library/Frameworks/Ruby.framework/Versions/$ruby_fw_ver/Headers -DRUBY_VERSION=$rubyversion" | |
librubyarg= | |
fi | |
diff --git a/src/if_ruby.c b/src/if_ruby.c | |
index 34e9a21..4ae2d90 100644 | |
--- a/src/if_ruby.c | |
+++ b/src/if_ruby.c | |
@@ -85,11 +85,7 @@ | |
# define rb_int2big rb_int2big_stub | |
#endif | |
-#ifdef FEAT_GUI_MACVIM | |
-# include <Ruby/ruby.h> | |
-#else | |
-# include <ruby.h> | |
-#endif | |
+#include <ruby.h> | |
#ifdef RUBY19_OR_LATER | |
# include <ruby/encoding.h> | |
#endif | |
diff --git a/src/os_mac.h b/src/os_mac.h | |
index cf575dd..8a9fa82 100644 | |
--- a/src/os_mac.h | |
+++ b/src/os_mac.h | |
@@ -16,6 +16,9 @@ | |
# define OPAQUE_TOOLBOX_STRUCTS 0 | |
#endif | |
+/* Include MAC_OS_X_VERSION_* macros */ | |
+#include <AvailabilityMacros.h> | |
+ | |
/* | |
* Macintosh machine-dependent things. | |
* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment