1diff --git a/src/MacVim/MacVim.xcodeproj/project.pbxproj b/src/MacVim/MacVim.xcodeproj/project.pbxproj
2index c384bf7..bf1ce96 100644
3--- a/src/MacVim/MacVim.xcodeproj/project.pbxproj
4+++ b/src/MacVim/MacVim.xcodeproj/project.pbxproj
5@@ -437,6 +437,8 @@
6 /* Begin PBXProject section */
7 29B97313FDCFA39411CA2CEA /* Project object */ = {
8 isa = PBXProject;
9+ attributes = {
10+ };
11 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacVim" */;
12 compatibilityVersion = "Xcode 2.4";
13 developmentRegion = English;
14@@ -632,6 +634,7 @@
15 INSTALL_PATH = "$(HOME)/Applications";
16 MACOSX_DEPLOYMENT_TARGET = "";
17 ONLY_ACTIVE_ARCH = YES;
18+ OTHER_LDFLAGS = "-headerpad_max_install_names";
19 PRODUCT_NAME = MacVim;
20 VERSIONING_SYSTEM = "apple-generic";
21 WARNING_CFLAGS = "-Wall";
22@@ -662,6 +665,7 @@
23 INSTALL_PATH = "$(HOME)/Applications";
24 MACOSX_DEPLOYMENT_TARGET = "";
25 ONLY_ACTIVE_ARCH = YES;
26+ OTHER_LDFLAGS = "-headerpad_max_install_names";
27 PRODUCT_NAME = MacVim;
28 VERSIONING_SYSTEM = "apple-generic";
29 WRAPPER_EXTENSION = app;
30diff --git a/src/Makefile b/src/Makefile
31index 84a93f7..e23196d 100644
32--- a/src/Makefile
33+++ b/src/Makefile
34@@ -1306,7 +1306,7 @@ MACVIMGUI_SRC = gui.c gui_beval.c MacVim/gui_macvim.m MacVim/MMBackend.m \
35 MacVim/MacVim.m
36 MACVIMGUI_OBJ = objects/gui.o objects/gui_beval.o objects/pty.o \
37 objects/gui_macvim.o objects/MMBackend.o objects/MacVim.o
38-MACVIMGUI_DEFS = -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
39+MACVIMGUI_DEFS = -DMACOS_X_UNIX -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe
40 MACVIMGUI_IPATH =
41 MACVIMGUI_LIBS_DIR =
42 MACVIMGUI_LIBS1 = -framework Cocoa -framework Carbon
43diff --git a/src/auto/configure b/src/auto/configure
44index cdc0819..8e2fd16 100755
45--- a/src/auto/configure
46+++ b/src/auto/configure
47@@ -5383,10 +5383,7 @@ $as_echo "no" >&6; }
48 fi
49
50 if test "X$vi_cv_path_mzscheme_pfx" != "X"; then
51- if test "x$MACOSX" = "xyes"; then
52- MZSCHEME_LIBS="-framework Racket"
53- MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
54- elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
55+ if test -f "${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"; then
56 MZSCHEME_LIBS="${vi_cv_path_mzscheme_pfx}/lib/libmzscheme3m.a"
57 MZSCHEME_CFLAGS="-DMZ_PRECISE_GC"
58 elif test -f "${vi_cv_path_mzscheme_pfx}/lib/libracket3m.a"; then
59@@ -5731,23 +5728,6 @@ $as_echo ">>> too old; need Perl version 5.003_01 or later <<<" >&6; }
60 fi
61
62 if test "x$MACOSX" = "xyes"; then
63- dir=/System/Library/Perl
64- darwindir=$dir/darwin
65- if test -d $darwindir; then
66- PERL=/usr/bin/perl
67- else
68- dir=/System/Library/Perl/5.8.1
69- darwindir=$dir/darwin-thread-multi-2level
70- if test -d $darwindir; then
71- PERL=/usr/bin/perl
72- fi
73- fi
74- if test -n "$PERL"; then
75- PERL_DIR="$dir"
76- PERL_CFLAGS="-DFEAT_PERL -I$darwindir/CORE"
77- PERL_OBJ="objects/if_perl.o objects/if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a"
78- PERL_LIBS="-L$darwindir/CORE -lperl"
79- fi
80 PERL_LIBS=`echo "$PERL_LIBS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
81 PERL_CFLAGS=`echo "$PERL_CFLAGS" | sed -e 's/-arch\ ppc//' -e 's/-arch\ i386//' -e 's/-arch\ x86_64//'`
82 fi
83@@ -5954,13 +5934,6 @@ __:
84 eof
85 eval "`cd ${PYTHON_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
86 rm -f -- "${tmp_mkf}"
87- if test "x$MACOSX" = "xyes" && ${vi_cv_path_python} -c \
88- "import sys; sys.exit(${vi_cv_var_python_version} < 2.3)"; then
89- vi_cv_path_python_plibs="-framework Python"
90- if test "x${vi_cv_path_python}" != "x/usr/bin/python" && test -n "${python_PYTHONFRAMEWORKPREFIX}"; then
91- vi_cv_path_python_plibs="-F${python_PYTHONFRAMEWORKPREFIX} -framework Python"
92- fi
93- else
94 if test "${vi_cv_var_python_version}" = "1.4"; then
95 vi_cv_path_python_plibs="${PYTHON_CONFDIR}/libModules.a ${PYTHON_CONFDIR}/libPython.a ${PYTHON_CONFDIR}/libObjects.a ${PYTHON_CONFDIR}/libParser.a"
96 else
97@@ -5979,7 +5952,6 @@ eof
98 fi
99 vi_cv_path_python_plibs="${vi_cv_path_python_plibs} ${python_BASEMODLIBS} ${python_LIBS} ${python_SYSLIBS} ${python_LINKFORSHARED}"
100 vi_cv_path_python_plibs=`echo $vi_cv_path_python_plibs | sed s/-ltermcap//`
101- fi
102
103 fi
104
105@@ -6055,13 +6027,6 @@ rm -f core conftest.err conftest.$ac_objext \
106 $as_echo "no" >&6; }
107 fi
108
109- if test -n "$MACSDK"; then
110- PYTHON_CFLAGS=
111- PYTHON_LIBS=-framework Python
112- PYTHON_CONFDIR=
113- PYTHON_GETPATH_CFLAGS=
114- fi
115-
116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
117 $as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
118 cflags_save=$CFLAGS
119@@ -6919,11 +6884,7 @@ $as_echo "$tclver - OK" >&6; };
120
121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of Tcl include" >&5
122 $as_echo_n "checking for location of Tcl include... " >&6; }
123- if test "x$MACOSX" != "xyes"; then
124 tclinc="$tclloc/include $tclloc/include/tcl $tclloc/include/tcl$tclver /usr/local/include /usr/local/include/tcl$tclver /usr/include /usr/include/tcl$tclver"
125- else
126- tclinc="/System/Library/Frameworks/Tcl.framework/Headers"
127- fi
128 TCL_INC=
129 for try in $tclinc; do
130 if test -f "$try/tcl.h"; then
131@@ -6941,12 +6902,8 @@ $as_echo "<not found>" >&6; }
132 if test -z "$SKIP_TCL"; then
133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for location of tclConfig.sh script" >&5
134 $as_echo_n "checking for location of tclConfig.sh script... " >&6; }
135- if test "x$MACOSX" != "xyes"; then
136 tclcnf=`echo $tclinc | sed s/include/lib/g`
137 tclcnf="$tclcnf `echo $tclinc | sed s/include/lib64/g`"
138- else
139- tclcnf="/System/Library/Frameworks/Tcl.framework"
140- fi
141 for try in $tclcnf; do
142 if test -f $try/tclConfig.sh; then
143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $try/tclConfig.sh" >&5
144@@ -7120,10 +7077,6 @@ $as_echo "$rubyhdrdir" >&6; }
145 if test -f "$rubylibdir/$librubya"; then
146 librubyarg="$librubyarg"
147 RUBY_LIBS="$RUBY_LIBS -L$rubylibdir"
148- elif test -d "/System/Library/Frameworks/Ruby.framework"; then
149- RUBY_LIBS="-framework Ruby"
150- RUBY_CFLAGS="-DRUBY_VERSION=$rubyversion"
151- librubyarg=
152 fi
153
154 if test "X$librubyarg" != "X"; then
155diff --git a/src/if_python.c b/src/if_python.c
156index 1d87cac..9d28df0 100644
157--- a/src/if_python.c
158+++ b/src/if_python.c
159@@ -55,11 +55,7 @@
160
161 #define PY_SSIZE_T_CLEAN
162
163-#ifdef FEAT_GUI_MACVIM
164-# include <Python/Python.h>
165-#else
166-# include <Python.h>
167-#endif
168+#include <Python.h>
169
170 #if !defined(PY_VERSION_HEX) || PY_VERSION_HEX < 0x02050000
171 # undef PY_SSIZE_T_CLEAN
172diff --git a/src/if_ruby.c b/src/if_ruby.c
173index 1deb83e..ac23878 100644
174--- a/src/if_ruby.c
175+++ b/src/if_ruby.c
176@@ -106,17 +106,9 @@
177 # define rb_check_type rb_check_type_stub
178 #endif
179
180-#ifdef FEAT_GUI_MACVIM
181-# include <Ruby/ruby.h>
182-#else
183-# include <ruby.h>
184-#endif
185+#include <ruby.h>
186 #ifdef RUBY19_OR_LATER
187-# ifdef FEAT_GUI_MACVIM
188-# include <Ruby/ruby/encoding.h>
189-# else
190-# include <ruby/encoding.h>
191-# endif
192+# include <ruby/encoding.h>
193 #endif
194
195 #undef off_t /* ruby defines off_t as _int64, Mingw uses long */
196diff --git a/src/vim.h b/src/vim.h
197index 4c93908..edc6bd7 100644
198--- a/src/vim.h
199+++ b/src/vim.h
200@@ -308,18 +308,6 @@
201 # define UNUSED
202 #endif
203
204-/* if we're compiling in C++ (currently only KVim), the system
205- * headers must have the correct prototypes or nothing will build.
206- * conversely, our prototypes might clash due to throw() specifiers and
207- * cause compilation failures even though the headers are correct. For
208- * a concrete example, gcc-3.2 enforces exception specifications, and
209- * glibc-2.2.5 has them in their system headers.
210- */
211-#if !defined(__cplusplus) && defined(UNIX) \
212- && !defined(MACOS_X) /* MACOS_X doesn't yet support osdef.h */
213-# include "auto/osdef.h" /* bring missing declarations in */
214-#endif
215-
216 #ifdef __EMX__
217 # define getcwd _getcwd2
218 # define chdir _chdir2
219diff --git a/src/vimtutor b/src/vimtutor
220index 70d9ec7..b565a1a 100755
221--- a/src/vimtutor
222+++ b/src/vimtutor
223@@ -16,7 +16,7 @@ seq="vim vim8 vim75 vim74 vim73 vim72 vim71 vim70 vim7 vim6 vi"
224 if test "$1" = "-g"; then
225 # Try to use the GUI version of Vim if possible, it will fall back
226 # on Vim if Gvim is not installed.
227- seq="gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
228+ seq="mvim gvim gvim8 gvim75 gvim74 gvim73 gvim72 gvim71 gvim70 gvim7 gvim6 $seq"
229 shift
230 fi
231