mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Clean Python and Ruby flags when macsdk is set
Most importantly there are no explicit -I.. flags that break the --with-macsdk functionality. Also use -framework Ruby and include Ruby properly.
This commit is contained in:
Vendored
+18
-1
@@ -3745,6 +3745,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
{ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
MACSDK=""
|
||||
CFLAGS="$save_cflags"
|
||||
LDFLAGS="$save_ldflags"
|
||||
fi
|
||||
@@ -5254,6 +5255,13 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
|
||||
echo "${ECHO_T}no" >&6; }
|
||||
fi
|
||||
|
||||
if test -n "$MACSDK"; then
|
||||
PYTHON_CFLAGS=
|
||||
PYTHON_LIBS=-framework Python
|
||||
PYTHON_CONFDIR=
|
||||
PYTHON_GETPATH_CFLAGS=
|
||||
fi
|
||||
|
||||
{ echo "$as_me:$LINENO: checking if compile and link flags for Python are sane" >&5
|
||||
echo $ECHO_N "checking if compile and link flags for Python are sane... $ECHO_C" >&6; }
|
||||
cflags_save=$CFLAGS
|
||||
@@ -5751,7 +5759,10 @@ echo "${ECHO_T}$rubyhdrdir" >&6; }
|
||||
librubyarg="$rubyhdrdir/$librubyarg"
|
||||
else
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG["libdir"])'`
|
||||
if test -f "$rubylibdir/$librubyarg"; then
|
||||
if test -d "/System/Library/Frameworks/Ruby.framework"; then
|
||||
RUBY_LIBS="-framework Ruby"
|
||||
librubyarg=
|
||||
elif test -f "$rubylibdir/$librubyarg"; then
|
||||
librubyarg="$rubylibdir/$librubyarg"
|
||||
elif test "$librubyarg" = "libruby.a"; then
|
||||
librubyarg="-lruby"
|
||||
@@ -5773,6 +5784,12 @@ echo "${ECHO_T}$rubyhdrdir" >&6; }
|
||||
RUBY_SRC="if_ruby.c"
|
||||
RUBY_OBJ="objects/if_ruby.o"
|
||||
RUBY_PRO="if_ruby.pro"
|
||||
|
||||
if test -n "$MACSDK"; then
|
||||
RUBY_CFLAGS=
|
||||
RUBY_LIBS="-framework Ruby"
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define FEAT_RUBY 1
|
||||
_ACEOF
|
||||
|
||||
+27
-1
@@ -133,6 +133,9 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
|
||||
[ AC_MSG_RESULT([yes])
|
||||
XCODEFLAGS="$XCODEFLAGS -sdk macosx$MACSDK MACOSX_DEPLOYMENT_TARGET=$MACSDK" ],
|
||||
[ AC_MSG_RESULT([no])
|
||||
dnl Important to clear MACSDK so later on in the script we can assume
|
||||
dnl that no SDK was chosen if it is empty.
|
||||
MACSDK=""
|
||||
CFLAGS="$save_cflags"
|
||||
LDFLAGS="$save_ldflags" ])
|
||||
fi
|
||||
@@ -797,6 +800,16 @@ eof
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl On Mac OS X, when an SDK has been explicitly chosen we can't rely
|
||||
dnl on any of the search paths set above. The -framework flag does it
|
||||
dnl all for us.
|
||||
if test -n "$MACSDK"; then
|
||||
PYTHON_CFLAGS=
|
||||
PYTHON_LIBS=-framework Python
|
||||
PYTHON_CONFDIR=
|
||||
PYTHON_GETPATH_CFLAGS=
|
||||
fi
|
||||
|
||||
dnl check that compiling a simple program still works with the flags
|
||||
dnl added for Python.
|
||||
AC_MSG_CHECKING([if compile and link flags for Python are sane])
|
||||
@@ -984,7 +997,11 @@ if test "$enable_rubyinterp" = "yes"; then
|
||||
librubyarg="$rubyhdrdir/$librubyarg"
|
||||
else
|
||||
rubylibdir=`$vi_cv_path_ruby -r rbconfig -e 'print Config.expand(Config::CONFIG[["libdir"]])'`
|
||||
if test -f "$rubylibdir/$librubyarg"; then
|
||||
if 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"
|
||||
librubyarg=
|
||||
elif test -f "$rubylibdir/$librubyarg"; then
|
||||
librubyarg="$rubylibdir/$librubyarg"
|
||||
elif test "$librubyarg" = "libruby.a"; then
|
||||
dnl required on Mac OS 10.3 where libruby.a doesn't exist
|
||||
@@ -1010,6 +1027,15 @@ if test "$enable_rubyinterp" = "yes"; then
|
||||
RUBY_SRC="if_ruby.c"
|
||||
RUBY_OBJ="objects/if_ruby.o"
|
||||
RUBY_PRO="if_ruby.pro"
|
||||
|
||||
dnl On Mac OS X, when an SDK has been explicitly chosen we can't rely
|
||||
dnl on any of the search paths set above. The -framework flag does it
|
||||
dnl all for us.
|
||||
if test -n "$MACSDK"; then
|
||||
RUBY_CFLAGS=
|
||||
RUBY_LIBS="-framework Ruby"
|
||||
fi
|
||||
|
||||
AC_DEFINE(FEAT_RUBY)
|
||||
else
|
||||
AC_MSG_RESULT(not found, disabling Ruby)
|
||||
|
||||
+6
-1
@@ -40,7 +40,12 @@
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
|
||||
#include <Python.h>
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
# include <Python/Python.h>
|
||||
#else
|
||||
# include <Python.h>
|
||||
#endif
|
||||
|
||||
#if defined(MACOS) && !defined(MACOS_X_UNIX)
|
||||
# include "macglue.h"
|
||||
# include <CodeFragments.h>
|
||||
|
||||
+5
-1
@@ -48,7 +48,11 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <ruby.h>
|
||||
#ifdef FEAT_GUI_MACVIM
|
||||
# include <Ruby/Ruby.h>
|
||||
#else
|
||||
# include <ruby.h>
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
#undef _
|
||||
|
||||
Reference in New Issue
Block a user