home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.118 < prev    next >
Encoding:
Internet Message Format  |  2003-10-12  |  49.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.118 (extra)
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.118 (extra)
  11. Problem:    Mac: Compiling is done in a non-standard way.
  12. Solution:   Use the Unix method for Mac OS X, with autoconf.  Add "CARBONGUI"
  13.         to Makefile and configure. (Eric Kow)
  14.         Move a few prototypes from os_mac.pro to gui_mac.pro.
  15. Files:        src/Makefile, src/auto/configure, src/configure.in,
  16.         src/config.mk.in, src/gui_mac.c, src/os_mac.h, src/os_macosx.c,
  17.         src/proto/gui_mac.pro, src/proto/os_mac.pro,
  18.         src/infplist.xml, src/vim.h
  19.  
  20.  
  21. *** ../vim-6.2.117/src/Makefile    Sun Oct 12 17:06:26 2003
  22. --- src/Makefile    Mon Sep 22 19:22:52 2003
  23. ***************
  24. *** 1010,1019 ****
  25. --- 1010,1023 ----
  26.   #GUI_LIBS_DIR    = $(NONE_LIBS_DIR)
  27.   #GUI_LIBS1    = $(NONE_LIBS1)
  28.   #GUI_LIBS2    = $(NONE_LIBS2)
  29. + #GUI_INSTALL    = $(NONE_INSTALL)
  30.   #GUI_TARGETS    = $(NONE_TARGETS)
  31.   #GUI_MAN_TARGETS= $(NONE_MAN_TARGETS)
  32.   #GUI_TESTTARGET = $(NONE_TESTTARGET)
  33.   
  34. + # Without a GUI install the normal way.
  35. + NONE_INSTALL = install_normal
  36.   ### GTK GUI
  37.   GTK_SRC        = gui.c gui_gtk.c gui_gtk_x11.c pty.c gui_gtk_f.c \
  38.               gui_beval.c
  39. ***************
  40. *** 1025,1030 ****
  41. --- 1029,1035 ----
  42.   GTK_LIBS_DIR    = $(GUI_LIB_LOC)
  43.   GTK_LIBS1    =
  44.   GTK_LIBS2    = $(GTK_LIBNAME)
  45. + GTK_INSTALL     = install_normal
  46.   GTK_TARGETS    = installglinks
  47.   GTK_MAN_TARGETS = installghelplinks
  48.   GTK_TESTTARGET = gui
  49. ***************
  50. *** 1038,1043 ****
  51. --- 1043,1049 ----
  52.   MOTIF_LIBS_DIR    = $(GUI_LIB_LOC)
  53.   MOTIF_LIBS1    =
  54.   MOTIF_LIBS2    = $(MOTIF_LIBNAME) -lXt
  55. + MOTIF_INSTALL   = install_normal
  56.   MOTIF_TARGETS    = installglinks
  57.   MOTIF_MAN_TARGETS = installghelplinks
  58.   MOTIF_TESTTARGET = gui
  59. ***************
  60. *** 1066,1072 ****
  61.   ATHENA_LIBS_DIR = $(GUI_LIB_LOC)
  62.   ATHENA_LIBS1    = $(XAW_LIB)
  63.   ATHENA_LIBS2    = -lXt
  64. ! ATHENA_TARGETS    =  installglinks
  65.   ATHENA_MAN_TARGETS = installghelplinks
  66.   ATHENA_TESTTARGET = gui
  67.   
  68. --- 1072,1079 ----
  69.   ATHENA_LIBS_DIR = $(GUI_LIB_LOC)
  70.   ATHENA_LIBS1    = $(XAW_LIB)
  71.   ATHENA_LIBS2    = -lXt
  72. ! ATHENA_INSTALL  = install_normal
  73. ! ATHENA_TARGETS    = installglinks
  74.   ATHENA_MAN_TARGETS = installghelplinks
  75.   ATHENA_TESTTARGET = gui
  76.   
  77. ***************
  78. *** 1082,1087 ****
  79. --- 1089,1095 ----
  80.   NEXTAW_LIBS_DIR = $(GUI_LIB_LOC)
  81.   NEXTAW_LIBS1    = $(NEXTAW_LIB)
  82.   NEXTAW_LIBS2    = -lXt
  83. + NEXTAW_INSTALL  =  install_normal
  84.   NEXTAW_TARGETS    =  installglinks
  85.   NEXTAW_MAN_TARGETS = installghelplinks
  86.   NEXTAW_TESTTARGET = gui
  87. ***************
  88. *** 1105,1110 ****
  89. --- 1113,1119 ----
  90.   BEOSGUI_LIBS_DIR =
  91.   BEOSGUI_LIBS1    = -lbe -lroot
  92.   BEOSGUI_LIBS2    =
  93. + BEOSGUI_INSTALL = install_normal
  94.   BEOSGUI_TARGETS    = installglinks
  95.   BEOSGUI_MAN_TARGETS = installghelplinks
  96.   BEOSGUI_TESTTARGET = gui
  97. ***************
  98. *** 1117,1126 ****
  99. --- 1126,1151 ----
  100.   PHOTONGUI_LIBS_DIR =
  101.   PHOTONGUI_LIBS1    = -lph -lphexlib
  102.   PHOTONGUI_LIBS2    =
  103. + PHOTONGUI_INSTALL = install_normal
  104.   PHOTONGUI_TARGETS = installglinks
  105.   PHOTONGUI_MAN_TARGETS = installghelplinks
  106.   PHOTONGUI_TESTTARGET = gui
  107.   
  108. + # CARBON GUI
  109. + CARBONGUI_SRC    =  gui.c gui_mac.c
  110. + CARBONGUI_OBJ    =  objects/gui.o objects/gui_mac.o objects/pty.o
  111. + CARBONGUI_DEFS    =  -arch ppc -fno-common -fpascal-strings \
  112. +                   -Wall -Wno-unknown-pragmas \
  113. +                   -mdynamic-no-pic -pipe
  114. + CARBONGUI_IPATH    = -I. -Iproto -I/Developer/Headers/FlatCarbon
  115. + CARBONGUI_LIBS_DIR =
  116. + CARBONGUI_LIBS1    = -framework Carbon
  117. + CARBONGUI_LIBS2    = -ltermcap
  118. + CARBONGUI_INSTALL = gui_mac.rsrc install_macosx
  119. + CARBONGUI_TARGETS =
  120. + CARBONGUI_MAN_TARGETS =
  121. + CARBONGUI_TESTTARGET =
  122.   # All GUI files
  123.   ALL_GUI_SRC  = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c pty.c
  124.   ALL_GUI_PRO  = gui.pro gui_gtk.pro gui_motif.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w16.pro gui_w32.pro gui_amiga.pro gui_photon.pro
  125. ***************
  126. *** 1573,1579 ****
  127.   # If you want to keep an older version, rename it before running "make
  128.   # install".
  129.   #
  130. ! install: installvim installtools install-languages install-icons
  131.   
  132.   installvim: installvimbin installruntime installlinks installhelplinks installmacros installtutor
  133.   
  134. --- 1598,1606 ----
  135.   # If you want to keep an older version, rename it before running "make
  136.   # install".
  137.   #
  138. ! install: $(GUI_INSTALL)
  139. ! install_normal: installvim installtools install-languages install-icons
  140.   
  141.   installvim: installvimbin installruntime installlinks installhelplinks installmacros installtutor
  142.   
  143. ***************
  144. *** 2135,2140 ****
  145. --- 2162,2170 ----
  146.   objects/gui_photon.o: gui_photon.c
  147.       $(CCC) -o $@ gui_photon.c
  148.   
  149. + objects/gui_mac.o: gui_mac.c
  150. +     $(CCC) -o $@ gui_mac.c
  151.   objects/hangulin.o: hangulin.c
  152.       $(CCC) -o $@ hangulin.c
  153.   
  154. ***************
  155. *** 2210,2215 ****
  156. --- 2240,2248 ----
  157.   objects/os_qnx.o: os_qnx.c
  158.       $(CCC) -o $@ os_qnx.c
  159.   
  160. + objects/os_macosx.o: os_macosx.c
  161. +     $(CCC) -o $@ os_macosx.c
  162.   objects/os_unix.o: os_unix.c
  163.       $(CCC) -o $@ os_unix.c
  164.   
  165. ***************
  166. *** 2269,2274 ****
  167. --- 2302,2393 ----
  168.   
  169.   Makefile:
  170.       @echo The name of the makefile MUST be "Makefile" (with capital M)!!!!
  171. + ###############################################################################
  172. + ### MacOS X installation
  173. + ###
  174. + ### This creates a runnable Vim.app in the src directory
  175. + ###
  176. + ### TODO: install the runtime files in Vim.app instead of
  177. + ### requiring that they be in a seperate directory.
  178. + REZ    = /Developer/Tools/Rez
  179. + RESMRG = /Developer/Tools/ResMerger
  180. + APPDIR = $(VIMNAME).app
  181. + RESDIR = $(APPDIR)/Contents/Resources
  182. + # FIXME: i'm sure someone else can do something clever with grep
  183. + # sed and version.h here
  184. + VERSION = 6.2
  185. + ### Common flags
  186. + M4FLAGS += -DAPP_EXE=$(VIMNAME) -DAPP_NAME=$(VIMNAME) -DAPP_VER=$(VERSION) \
  187. +        -DICON_APP=$(ICON_APP)
  188. + ### Icons
  189. + # You can download Douglas Stebila's icons:
  190. + #    http://homepage.mac.com/dstebila/code/vim/
  191. + # TODO: Honestly, why don't we just go ahead and do this? OS 9?
  192. + # If you place those *.icns at src directory, it will be detected by this
  193. + # Makefile automatically, and used for Vim.
  194. + ICON_APP = $(shell if [ -e app.icns ] ; then echo app.icns ; else echo gui_mac.icns ; fi)
  195. + ICON_DOC = $(shell if [ -e doc.icns ] ; then echo doc.icns ; else echo ; fi)
  196. + ICON_DOCTXT = $(shell if [ -e doc-txt.icns ] ; then echo doc-txt.icns ; else echo ; fi)
  197. + ICONS = $(addprefix $(RESDIR)/, $(ICON_APP) $(ICON_DOC) $(ICON_DOCTXT))
  198. + install_macosx: bundle-dir bundle-executable bundle-info bundle-resource \
  199. +     bundle-language
  200. + bundle-dir: $(APPDIR)/Contents
  201. +     cp -R ../runtime $(APPDIR)
  202. + bundle-executable: $(VIMTARGET)
  203. +     cp $(VIMTARGET) $(APPDIR)/Contents/MacOS/$(VIMTARGET)
  204. + bundle-info:  bundle-dir
  205. +     @echo "Creating PkgInfo"
  206. +     @echo -n "APPLVIM!" > $(APPDIR)/Contents/PkgInfo
  207. +     @echo "Creating Info.plist"
  208. +     m4 $(M4FLAGS) infplist.xml > $(APPDIR)/Contents/Info.plist
  209. + bundle-resource: bundle-dir bundle-icons bundle-rsrc
  210. + bundle-icons: $(ICONS)
  211. + ### Classic resources
  212. + # Resource fork (in the form of a .rsrc file) for Classic Vim (Mac OS 9)
  213. + # This file is also required for OS X Vim.
  214. + bundle-rsrc: gui_mac.rsrc
  215. +     @echo "Creating resource fork"
  216. +     $(RESMRG) gui_mac.rsrc -dstIs DF -o $(RESDIR)/$(VIMNAME).rsrc
  217. + gui_mac.rsrc:
  218. +     open os_mac.rsr.hqx
  219. +     sleep 1
  220. +     @echo
  221. +     @echo "--------------------"
  222. +     @echo "If this fails, run make install again after StuffIt Expander quits."
  223. +     @echo "--------------------"
  224. +     @echo
  225. + # po/Make_osx.pl says something about generating a Mac message file
  226. + # for Ukrananian.  Would somebody using Mac OS X in Ukranian
  227. + # *really* be upset that Carbon Vim was not localised in
  228. + # Ukranian?
  229. + #
  230. + #bundle-language: bundle-dir po/Make_osx.pl
  231. + #    cd po && perl Make_osx.pl --outdir ../$(RESDIR) $(MULTILANG)
  232. + bundle-language: bundle-dir
  233. + $(APPDIR)/Contents:
  234. +     mkdir $(APPDIR)
  235. +     mkdir $(APPDIR)/Contents
  236. +     mkdir $(APPDIR)/Contents/MacOS
  237. +     mkdir $(RESDIR)
  238. +     mkdir $(RESDIR)/English.lproj
  239. + $(RESDIR)/%.icns: %.icns
  240. +     cp $< $@
  241.   
  242.   ###############################################################################
  243.   ### (automatically generated by 'make depend')
  244. *** ../vim-6.2.117/src/auto/configure    Sat Sep 27 19:20:53 2003
  245. --- src/auto/configure    Sat Sep 13 21:22:56 2003
  246. ***************
  247. *** 60,66 ****
  248.   ac_help="$ac_help
  249.     --with-x                use the X Window System"
  250.   ac_help="$ac_help
  251. !   --enable-gui[=OPTS]     X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon]"
  252.   ac_help="$ac_help
  253.     --enable-gtk-check      If auto-select GUI, check for GTK [default=yes]"
  254.   ac_help="$ac_help
  255. --- 60,66 ----
  256.   ac_help="$ac_help
  257.     --with-x                use the X Window System"
  258.   ac_help="$ac_help
  259. !   --enable-gui[=OPTS]     X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon/carbon]"
  260.   ac_help="$ac_help
  261.     --enable-gtk-check      If auto-select GUI, check for GTK [default=yes]"
  262.   ac_help="$ac_help
  263. ***************
  264. *** 74,79 ****
  265. --- 74,81 ----
  266.   ac_help="$ac_help
  267.     --enable-nextaw-check   If auto-select GUI, check for neXtaw [default=yes]"
  268.   ac_help="$ac_help
  269. +   --enable-carbon-check   If auto-select GUI, check for Carbon [default=yes]"
  270. + ac_help="$ac_help
  271.     --with-gtk-prefix=PFX   Prefix where GTK is installed (optional)"
  272.   ac_help="$ac_help
  273.     --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)"
  274. ***************
  275. *** 1169,1174 ****
  276. --- 1171,1229 ----
  277.       *)        QNX=no; echo "$ac_t""no" 1>&6;;
  278.   esac
  279.   
  280. + DEFAULT_VIMNAME=vim
  281. + echo $ac_n "checking for Darwin (Mac OS X)""... $ac_c" 1>&6
  282. + echo "configure:1177: checking for Darwin (Mac OS X)" >&5
  283. + if test "`(uname) 2>/dev/null`" = Darwin; then
  284. +   echo "$ac_t""yes" 1>&6
  285. +   MACOSX=yes
  286. +   OS_EXTRA_SCR="os_macosx.c"; 
  287. +   OS_EXTRA_OBJ="objects/os_macosx.o"
  288. +   CFLAGS="$CFLAGS -DMACOS_X_UNIX"
  289. +       ac_safe=`echo "Carbon/Carbon.h" | sed 'y%./+-%__p_%'`
  290. + echo $ac_n "checking for Carbon/Carbon.h""... $ac_c" 1>&6
  291. + echo "configure:1187: checking for Carbon/Carbon.h" >&5
  292. + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  293. +   echo $ac_n "(cached) $ac_c" 1>&6
  294. + else
  295. +   cat > conftest.$ac_ext <<EOF
  296. + #line 1192 "configure"
  297. + #include "confdefs.h"
  298. + #include <Carbon/Carbon.h>
  299. + EOF
  300. + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  301. + { (eval echo configure:1197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  302. + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  303. + if test -z "$ac_err"; then
  304. +   rm -rf conftest*
  305. +   eval "ac_cv_header_$ac_safe=yes"
  306. + else
  307. +   echo "$ac_err" >&5
  308. +   echo "configure: failed program was:" >&5
  309. +   cat conftest.$ac_ext >&5
  310. +   rm -rf conftest*
  311. +   eval "ac_cv_header_$ac_safe=no"
  312. + fi
  313. + rm -f conftest*
  314. + fi
  315. + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  316. +   echo "$ac_t""yes" 1>&6
  317. +   CARBON=yes
  318. + else
  319. +   echo "$ac_t""no" 1>&6
  320. + fi
  321. +          
  322. +   if test "x$CARBON" = "xyes"; then
  323. +     if test -z "$with_x"; then
  324. +       with_x=no
  325. +       DEFAULT_VIMNAME=Vim
  326. +     fi
  327. +   fi
  328. + else
  329. +   echo "$ac_t""no" 1>&6
  330. + fi
  331.   
  332.   
  333.   
  334. ***************
  335. *** 1194,1211 ****
  336.   fi
  337.   
  338.   echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6
  339. ! echo "configure:1198: checking --with-vim-name argument" >&5
  340.   # Check whether --with-vim-name or --without-vim-name was given.
  341.   if test "${with_vim_name+set}" = set; then
  342.     withval="$with_vim_name"
  343.     VIMNAME="$withval"; echo "$ac_t""$VIMNAME" 1>&6
  344.   else
  345. !   VIMNAME="vim"; echo "$ac_t""Defaulting to vim" 1>&6
  346.   fi
  347.   
  348.   
  349.   echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6
  350. ! echo "configure:1209: checking --with-ex-name argument" >&5
  351.   # Check whether --with-ex-name or --without-ex-name was given.
  352.   if test "${with_ex_name+set}" = set; then
  353.     withval="$with_ex_name"
  354. --- 1249,1266 ----
  355.   fi
  356.   
  357.   echo $ac_n "checking --with-vim-name argument""... $ac_c" 1>&6
  358. ! echo "configure:1253: checking --with-vim-name argument" >&5
  359.   # Check whether --with-vim-name or --without-vim-name was given.
  360.   if test "${with_vim_name+set}" = set; then
  361.     withval="$with_vim_name"
  362.     VIMNAME="$withval"; echo "$ac_t""$VIMNAME" 1>&6
  363.   else
  364. !   VIMNAME="$DEFAULT_VIMNAME"; echo "$ac_t""Defaulting to $VIMNAME" 1>&6
  365.   fi
  366.   
  367.   
  368.   echo $ac_n "checking --with-ex-name argument""... $ac_c" 1>&6
  369. ! echo "configure:1264: checking --with-ex-name argument" >&5
  370.   # Check whether --with-ex-name or --without-ex-name was given.
  371.   if test "${with_ex_name+set}" = set; then
  372.     withval="$with_ex_name"
  373. ***************
  374. *** 1515,1520 ****
  375. --- 1570,1595 ----
  376.         echo "$ac_t"">>> too old; need Perl version 5.003_01 or later <<<" 1>&6
  377.       fi
  378.     fi
  379. +   if test "x$MACOSX" == "xyes"; then 
  380. +         dir=/System/Library/Perl
  381. +     darwindir=$dir/darwin
  382. +     if test -d $darwindir; then 
  383. +       PERL=/usr/bin/perl
  384. +     else
  385. +             dir=/System/Library/Perl/5.8.1
  386. +       darwindir=$dir/darwin-thread-multi-2level
  387. +       if test -d $darwindir; then 
  388. +     PERL=/usr/bin/perl
  389. +       fi
  390. +     fi
  391. +     if test -n "$PERL"; then
  392. +       PERL_DIR=$dir
  393. +       PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE
  394. +       PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a
  395. +       PERL_LIBS=-lperl -L$darwindir/CORE
  396. +     fi
  397. +   fi
  398.   fi
  399.   
  400.   
  401. ***************
  402. *** 2345,2351 ****
  403.   echo "$ac_t""$enable_fontset" 1>&6
  404.   
  405.   test -z "$with_x" && with_x=yes
  406. ! test "${enable_gui-yes}" != no -a "x$QNX" != "xyes" && with_x=yes
  407.   if test "$with_x" = no; then
  408.     echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6
  409.   else
  410. --- 2420,2426 ----
  411.   echo "$ac_t""$enable_fontset" 1>&6
  412.   
  413.   test -z "$with_x" && with_x=yes
  414. ! test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
  415.   if test "$with_x" = no; then
  416.     echo "$ac_t""defaulting to: don't HAVE_X11" 1>&6
  417.   else
  418. ***************
  419. *** 3458,3467 ****
  420.     fi
  421.   fi
  422.   
  423. ! test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
  424.   
  425.   echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6
  426. ! echo "configure:3465: checking --enable-gui argument" >&5
  427.   # Check whether --enable-gui or --disable-gui was given.
  428.   if test "${enable_gui+set}" = set; then
  429.     enableval="$enable_gui"
  430. --- 3533,3542 ----
  431.     fi
  432.   fi
  433.   
  434. ! test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
  435.   
  436.   echo $ac_n "checking --enable-gui argument""... $ac_c" 1>&6
  437. ! echo "configure:3540: checking --enable-gui argument" >&5
  438.   # Check whether --enable-gui or --disable-gui was given.
  439.   if test "${enable_gui+set}" = set; then
  440.     enableval="$enable_gui"
  441. ***************
  442. *** 3471,3553 ****
  443.   fi
  444.   
  445.   
  446. - ## Canonicalize the --enable-gui= argument so that it can be easily compared.
  447. - ## Do not use character classes for portability with old tools.
  448.   enable_gui_canon=`echo "_$enable_gui" | \
  449.       sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  450.   
  451. ! if test "x$BEOS" = "xyes"; then
  452.   
  453. !   SKIP_GTK=YES
  454. !   SKIP_GTK2=YES
  455. !   SKIP_GNOME=YES
  456. !   SKIP_MOTIF=YES
  457. !   SKIP_ATHENA=YES
  458. !   SKIP_NEXTAW=YES
  459. !   SKIP_PHOTON=YES
  460.     SKIP_BEOS=
  461. -   GUITYPE=NONE
  462.     case "$enable_gui_canon" in
  463.       no)        echo "$ac_t""no GUI support" 1>&6
  464.           SKIP_BEOS=YES ;;
  465.       yes|"")    echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
  466.       auto)    echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
  467.       beos)    echo "$ac_t""BeOS GUI support" 1>&6 ;;
  468. !     *)        echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
  469.     esac
  470.   
  471.   elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
  472. -   SKIP_GTK=YES
  473. -   SKIP_GTK2=YES
  474. -   SKIP_GNOME=YES
  475. -   SKIP_MOTIF=YES
  476. -   SKIP_ATHENA=YES
  477. -   SKIP_NEXTAW=YES
  478. -   SKIP_BEOS=YES
  479.     SKIP_PHOTON=
  480. -   GUITYPE=NONE
  481.     case "$enable_gui_canon" in
  482.       no)        echo "$ac_t""no GUI support" 1>&6
  483.           SKIP_PHOTON=YES ;;
  484.       yes|"")    echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
  485.       auto)    echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
  486.       photon)    echo "$ac_t""Photon GUI support" 1>&6 ;;
  487. !     *)        echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
  488.     esac
  489.   
  490.   else
  491.   
  492. -   SKIP_GTK=
  493. -   SKIP_GTK2=
  494. -   SKIP_GNOME=
  495. -   SKIP_MOTIF=
  496. -   SKIP_ATHENA=
  497. -   SKIP_NEXTAW=
  498. -   SKIP_BEOS=YES
  499. -   SKIP_PHOTON=YES
  500. -   GUITYPE=NONE
  501.   
  502.     case "$enable_gui_canon" in
  503. !     no|none)    echo "$ac_t""no GUI support" 1>&6
  504. !         SKIP_GTK=YES; SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  505.       yes|"")    echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
  506. !     auto)    echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
  507.       gtk)    echo "$ac_t""GTK+ 1.x GUI support" 1>&6
  508. !         SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  509.       gtk2)    echo "$ac_t""GTK+ 2.x GUI support" 1>&6
  510. !         SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  511.       gnome)    echo "$ac_t""GNOME 1.x GUI support" 1>&6
  512. !         SKIP_GTK2=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  513.       gnome2)    echo "$ac_t""GNOME 2.x GUI support" 1>&6
  514. !         SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  515.       motif)    echo "$ac_t""Motif GUI support" 1>&6
  516. !         SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  517.       athena)    echo "$ac_t""Athena GUI support" 1>&6
  518. !         SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_NEXTAW=YES ;;
  519.       nextaw)    echo "$ac_t""neXtaw GUI support" 1>&6
  520. !         SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES ;;
  521.       *)        echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
  522.     esac
  523.   
  524. --- 3546,3633 ----
  525.   fi
  526.   
  527.   
  528.   enable_gui_canon=`echo "_$enable_gui" | \
  529.       sed 's/[ _+-]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  530.   
  531. ! SKIP_GTK=YES
  532. ! SKIP_GTK2=YES
  533. ! SKIP_GNOME=YES
  534. ! SKIP_MOTIF=YES
  535. ! SKIP_ATHENA=YES
  536. ! SKIP_NEXTAW=YES
  537. ! SKIP_PHOTON=YES
  538. ! SKIP_BEOS=YES
  539. ! SKIP_CARBON=YES
  540. ! GUITYPE=NONE
  541.   
  542. ! if test "x$BEOS" = "xyes"; then
  543.     SKIP_BEOS=
  544.     case "$enable_gui_canon" in
  545.       no)        echo "$ac_t""no GUI support" 1>&6
  546.           SKIP_BEOS=YES ;;
  547.       yes|"")    echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
  548.       auto)    echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
  549.       beos)    echo "$ac_t""BeOS GUI support" 1>&6 ;;
  550. !     *)        echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
  551. !         SKIP_BEOS=YES ;;
  552.     esac
  553.   
  554.   elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
  555.     SKIP_PHOTON=
  556.     case "$enable_gui_canon" in
  557.       no)        echo "$ac_t""no GUI support" 1>&6
  558.           SKIP_PHOTON=YES ;;
  559.       yes|"")    echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
  560.       auto)    echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
  561.       photon)    echo "$ac_t""Photon GUI support" 1>&6 ;;
  562. !     *)        echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
  563. !         SKIP_PHOTON=YES ;;
  564. !   esac
  565. ! elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
  566. !   SKIP_CARBON=
  567. !   case "$enable_gui_canon" in
  568. !     no)        echo "$ac_t""no GUI support" 1>&6
  569. !         SKIP_CARBON=YES ;;
  570. !     yes|"")    echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
  571. !     auto)    echo "$ac_t""auto - automatic GUI support" 1>&6 ;;
  572. !     carbon)    echo "$ac_t""Carbon GUI support" 1>&6 ;;
  573. !     *)        echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6
  574. !         SKIP_CARBON=YES ;;
  575.     esac
  576.   
  577.   else
  578.   
  579.   
  580.     case "$enable_gui_canon" in
  581. !     no|none)    echo "$ac_t""no GUI support" 1>&6 ;;
  582.       yes|"")    echo "$ac_t""yes - automatic GUI support" 1>&6 ;;
  583. !     auto)    echo "$ac_t""auto - automatic GUI support" 1>&6
  584. !         SKIP_GTK=
  585. !         SKIP_GTK2=
  586. !         SKIP_GNOME=
  587. !         SKIP_MOTIF=
  588. !         SKIP_ATHENA=
  589. !         SKIP_NEXTAW=
  590. !         SKIP_CARBON=;;
  591.       gtk)    echo "$ac_t""GTK+ 1.x GUI support" 1>&6
  592. !         SKIP_GTK=;;
  593.       gtk2)    echo "$ac_t""GTK+ 2.x GUI support" 1>&6
  594. !         SKIP_GTK=
  595. !         SKIP_GTK2=;;
  596.       gnome)    echo "$ac_t""GNOME 1.x GUI support" 1>&6
  597. !         SKIP_GNOME=
  598. !         SKIP_GTK=;;
  599.       gnome2)    echo "$ac_t""GNOME 2.x GUI support" 1>&6
  600. !         SKIP_GNOME=
  601. !         SKIP_GTK=
  602. !         SKIP_GTK2=;;
  603.       motif)    echo "$ac_t""Motif GUI support" 1>&6
  604. !         SKIP_MOTIF=;;
  605.       athena)    echo "$ac_t""Athena GUI support" 1>&6
  606. !         SKIP_ATHENA=;;
  607.       nextaw)    echo "$ac_t""neXtaw GUI support" 1>&6
  608. !         SKIP_NEXTAW=;;
  609.       *)        echo "$ac_t""Sorry, $enable_gui GUI is not supported" 1>&6 ;;
  610.     esac
  611.   
  612. ***************
  613. *** 3658,3663 ****
  614. --- 3738,3776 ----
  615.     fi
  616.   fi
  617.   
  618. + if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
  619. +   echo $ac_n "checking whether or not to look for Carbon""... $ac_c" 1>&6
  620. + echo "configure:3744: checking whether or not to look for Carbon" >&5
  621. +   # Check whether --enable-carbon-check or --disable-carbon-check was given.
  622. + if test "${enable_carbon_check+set}" = set; then
  623. +   enableval="$enable_carbon_check"
  624. +   :
  625. + else
  626. +   enable_carbon_check="yes"
  627. + fi
  628. +   echo "$ac_t""$enable_carbon_check" 1>&6;
  629. +   if test "x$enable_carbon_check" = "xno"; then
  630. +     SKIP_CARBON=YES
  631. +   fi
  632. + fi
  633. + if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
  634. +   echo $ac_n "checking for Carbon GUI""... $ac_c" 1>&6
  635. + echo "configure:3761: checking for Carbon GUI" >&5
  636. +     echo "$ac_t""yes" 1>&6;
  637. +   GUITYPE=CARBONGUI
  638. +     SKIP_GTK=YES;
  639. +   SKIP_GTK2=YES;
  640. +   SKIP_GNOME=YES;
  641. +   SKIP_MOTIF=YES;
  642. +   SKIP_ATHENA=YES;
  643. +   SKIP_NEXTAW=YES;
  644. +   SKIP_PHOTON=YES;
  645. +   SKIP_BEOS=YES;
  646. +   SKIP_CARBON=YES
  647. + fi
  648.   
  649.   
  650.   
  651. ***************
  652. *** 5292,5298 ****
  653.   
  654.   for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
  655.       termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
  656. !     iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \
  657.       sys/resource.h sys/systeminfo.h locale.h \
  658.       sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
  659.       poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
  660. --- 5408,5414 ----
  661.   
  662.   for ac_hdr in stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
  663.       termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
  664. !     iconv.h langinfo.h unistd.h stropts.h errno.h \
  665.       sys/resource.h sys/systeminfo.h locale.h \
  666.       sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
  667.       poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
  668. ***************
  669. *** 5301,5317 ****
  670.   do
  671.   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  672.   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  673. ! echo "configure:5305: checking for $ac_hdr" >&5
  674.   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  675.     echo $ac_n "(cached) $ac_c" 1>&6
  676.   else
  677.     cat > conftest.$ac_ext <<EOF
  678. ! #line 5310 "configure"
  679.   #include "confdefs.h"
  680.   #include <$ac_hdr>
  681.   EOF
  682.   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  683. ! { (eval echo configure:5315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  684.   ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  685.   if test -z "$ac_err"; then
  686.     rm -rf conftest*
  687. --- 5417,5433 ----
  688.   do
  689.   ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  690.   echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  691. ! echo "configure:5421: checking for $ac_hdr" >&5
  692.   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  693.     echo $ac_n "(cached) $ac_c" 1>&6
  694.   else
  695.     cat > conftest.$ac_ext <<EOF
  696. ! #line 5426 "configure"
  697.   #include "confdefs.h"
  698.   #include <$ac_hdr>
  699.   EOF
  700.   ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  701. ! { (eval echo configure:5431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  702.   ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  703.   if test -z "$ac_err"; then
  704.     rm -rf conftest*
  705. ***************
  706. *** 5338,5349 ****
  707.   done
  708.   
  709.   
  710.   echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6
  711. ! echo "configure:5343: checking if strings.h can be included after string.h" >&5
  712.   cppflags_save=$CPPFLAGS
  713.   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  714.   cat > conftest.$ac_ext <<EOF
  715. ! #line 5347 "configure"
  716.   #include "confdefs.h"
  717.   
  718.   #if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
  719. --- 5454,5508 ----
  720.   done
  721.   
  722.   
  723. + if test "x$MACOSX" != "xyes"; then
  724. +   for ac_hdr in strings.h
  725. + do
  726. + ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  727. + echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  728. + echo "configure:5463: checking for $ac_hdr" >&5
  729. + if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  730. +   echo $ac_n "(cached) $ac_c" 1>&6
  731. + else
  732. +   cat > conftest.$ac_ext <<EOF
  733. + #line 5468 "configure"
  734. + #include "confdefs.h"
  735. + #include <$ac_hdr>
  736. + EOF
  737. + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  738. + { (eval echo configure:5473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  739. + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  740. + if test -z "$ac_err"; then
  741. +   rm -rf conftest*
  742. +   eval "ac_cv_header_$ac_safe=yes"
  743. + else
  744. +   echo "$ac_err" >&5
  745. +   echo "configure: failed program was:" >&5
  746. +   cat conftest.$ac_ext >&5
  747. +   rm -rf conftest*
  748. +   eval "ac_cv_header_$ac_safe=no"
  749. + fi
  750. + rm -f conftest*
  751. + fi
  752. + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  753. +   echo "$ac_t""yes" 1>&6
  754. +     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  755. +   cat >> confdefs.h <<EOF
  756. + #define $ac_tr_hdr 1
  757. + EOF
  758. +  
  759. + else
  760. +   echo "$ac_t""no" 1>&6
  761. + fi
  762. + done
  763. + fi
  764.   echo $ac_n "checking if strings.h can be included after string.h""... $ac_c" 1>&6
  765. ! echo "configure:5502: checking if strings.h can be included after string.h" >&5
  766.   cppflags_save=$CPPFLAGS
  767.   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
  768.   cat > conftest.$ac_ext <<EOF
  769. ! #line 5506 "configure"
  770.   #include "confdefs.h"
  771.   
  772.   #if defined(_AIX) && !defined(_AIX51) && !defined(_NO_PROTO)
  773. *** ../vim-6.2.117/src/configure.in    Sat Sep 27 19:20:53 2003
  774. --- src/configure.in    Sun Oct 12 22:41:30 2003
  775. ***************
  776. *** 75,80 ****
  777. --- 75,105 ----
  778.       *)        QNX=no; AC_MSG_RESULT(no);;
  779.   esac
  780.   
  781. + dnl Check for Darwin and MacOS X
  782. + dnl We do a check for MacOS X in the very beginning because there
  783. + dnl are a lot of other things we need to change besides GUI stuff
  784. + DEFAULT_VIMNAME=vim
  785. + AC_MSG_CHECKING([for Darwin (Mac OS X)])
  786. + if test "`(uname) 2>/dev/null`" = Darwin; then
  787. +   AC_MSG_RESULT(yes)
  788. +   MACOSX=yes
  789. +   OS_EXTRA_SCR="os_macosx.c"; 
  790. +   OS_EXTRA_OBJ="objects/os_macosx.o"
  791. +   CFLAGS="$CFLAGS -DMACOS_X_UNIX"
  792. +   dnl If Carbon is found, assume we don't want X11
  793. +   dnl unless it was specifically asked for (--with-x)
  794. +   AC_CHECK_HEADER(Carbon/Carbon.h, CARBON=yes)         
  795. +   if test "x$CARBON" = "xyes"; then
  796. +     if test -z "$with_x"; then
  797. +       with_x=no
  798. +       DEFAULT_VIMNAME=Vim
  799. +     fi
  800. +   fi
  801. + else
  802. +   AC_MSG_RESULT(no)
  803. + fi
  804.   AC_SUBST(OS_EXTRA_SRC)
  805.   AC_SUBST(OS_EXTRA_OBJ)
  806.   
  807. ***************
  808. *** 106,112 ****
  809.   AC_MSG_CHECKING(--with-vim-name argument)
  810.   AC_ARG_WITH(vim-name, [  --with-vim-name=NAME    what to call the Vim executable],
  811.       VIMNAME="$withval"; AC_MSG_RESULT($VIMNAME),
  812. !     VIMNAME="vim"; AC_MSG_RESULT(Defaulting to vim))
  813.   AC_SUBST(VIMNAME)
  814.   AC_MSG_CHECKING(--with-ex-name argument)
  815.   AC_ARG_WITH(ex-name, [  --with-ex-name=NAME     what to call the Ex executable],
  816. --- 131,137 ----
  817.   AC_MSG_CHECKING(--with-vim-name argument)
  818.   AC_ARG_WITH(vim-name, [  --with-vim-name=NAME    what to call the Vim executable],
  819.       VIMNAME="$withval"; AC_MSG_RESULT($VIMNAME),
  820. !     VIMNAME="$DEFAULT_VIMNAME"; AC_MSG_RESULT(Defaulting to $VIMNAME))
  821.   AC_SUBST(VIMNAME)
  822.   AC_MSG_CHECKING(--with-ex-name argument)
  823.   AC_ARG_WITH(ex-name, [  --with-ex-name=NAME     what to call the Ex executable],
  824. ***************
  825. *** 295,300 ****
  826. --- 320,347 ----
  827.         AC_MSG_RESULT(>>> too old; need Perl version 5.003_01 or later <<<)
  828.       fi
  829.     fi
  830. +   if test "x$MACOSX" == "xyes"; then 
  831. +     dnl Mac OS X 10.2 or 10.3
  832. +     dir=/System/Library/Perl
  833. +     darwindir=$dir/darwin
  834. +     if test -d $darwindir; then 
  835. +       PERL=/usr/bin/perl
  836. +     else
  837. +       dnl Mac OS X 10.3
  838. +       dir=/System/Library/Perl/5.8.1
  839. +       darwindir=$dir/darwin-thread-multi-2level
  840. +       if test -d $darwindir; then 
  841. +     PERL=/usr/bin/perl
  842. +       fi
  843. +     fi
  844. +     if test -n "$PERL"; then
  845. +       PERL_DIR=$dir
  846. +       PERL_CFLAGS=-DFEAT_PERL -I$darwindir/CORE
  847. +       PERL_OBJ=if_perl.o if_perlsfio.o $darwindir/auto/DynaLoader/DynaLoader.a
  848. +       PERL_LIBS=-lperl -L$darwindir/CORE
  849. +     fi
  850. +   fi
  851.   fi
  852.   AC_SUBST(shrpenv)
  853.   AC_SUBST(PERL_SRC)
  854. ***************
  855. *** 715,721 ****
  856.   dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI
  857.   
  858.   test -z "$with_x" && with_x=yes
  859. ! test "${enable_gui-yes}" != no -a "x$QNX" != "xyes" && with_x=yes
  860.   if test "$with_x" = no; then
  861.     AC_MSG_RESULT(defaulting to: don't HAVE_X11)
  862.   else
  863. --- 762,768 ----
  864.   dnl defining FEAT_XFONTSET is delayed, so that it can be disabled for no GUI
  865.   
  866.   test -z "$with_x" && with_x=yes
  867. ! test "${enable_gui-yes}" != no -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && with_x=yes
  868.   if test "$with_x" = no; then
  869.     AC_MSG_RESULT(defaulting to: don't HAVE_X11)
  870.   else
  871. ***************
  872. *** 815,903 ****
  873.     fi
  874.   fi
  875.   
  876. ! test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
  877.   
  878.   AC_MSG_CHECKING(--enable-gui argument)
  879.   AC_ARG_ENABLE(gui,
  880. !  [  --enable-gui[=OPTS]     X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon]], , enable_gui="auto")
  881.   
  882. ! ## Canonicalize the --enable-gui= argument so that it can be easily compared.
  883. ! ## Do not use character classes for portability with old tools.
  884.   enable_gui_canon=`echo "_$enable_gui" | \
  885.       sed 's/[[ _+-]]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  886.   
  887. ! if test "x$BEOS" = "xyes"; then
  888.   
  889. !   SKIP_GTK=YES
  890. !   SKIP_GTK2=YES
  891. !   SKIP_GNOME=YES
  892. !   SKIP_MOTIF=YES
  893. !   SKIP_ATHENA=YES
  894. !   SKIP_NEXTAW=YES
  895. !   SKIP_PHOTON=YES
  896.     SKIP_BEOS=
  897. -   GUITYPE=NONE
  898.     case "$enable_gui_canon" in
  899.       no)        AC_MSG_RESULT(no GUI support)
  900.           SKIP_BEOS=YES ;;
  901.       yes|"")    AC_MSG_RESULT(yes - automatic GUI support) ;;
  902.       auto)    AC_MSG_RESULT(auto - automatic GUI support) ;;
  903.       beos)    AC_MSG_RESULT(BeOS GUI support) ;;
  904. !     *)        AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;;
  905.     esac
  906.   
  907.   elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
  908. -   SKIP_GTK=YES
  909. -   SKIP_GTK2=YES
  910. -   SKIP_GNOME=YES
  911. -   SKIP_MOTIF=YES
  912. -   SKIP_ATHENA=YES
  913. -   SKIP_NEXTAW=YES
  914. -   SKIP_BEOS=YES
  915.     SKIP_PHOTON=
  916. -   GUITYPE=NONE
  917.     case "$enable_gui_canon" in
  918.       no)        AC_MSG_RESULT(no GUI support)
  919.           SKIP_PHOTON=YES ;;
  920.       yes|"")    AC_MSG_RESULT(yes - automatic GUI support) ;;
  921.       auto)    AC_MSG_RESULT(auto - automatic GUI support) ;;
  922.       photon)    AC_MSG_RESULT(Photon GUI support) ;;
  923. !     *)        AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;;
  924.     esac
  925.   
  926.   else
  927.   
  928. -   SKIP_GTK=
  929. -   SKIP_GTK2=
  930. -   SKIP_GNOME=
  931. -   SKIP_MOTIF=
  932. -   SKIP_ATHENA=
  933. -   SKIP_NEXTAW=
  934. -   SKIP_BEOS=YES
  935. -   SKIP_PHOTON=YES
  936. -   GUITYPE=NONE
  937.   
  938.     case "$enable_gui_canon" in
  939. !     no|none)    AC_MSG_RESULT(no GUI support)
  940. !         SKIP_GTK=YES; SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  941. !     yes|"")    AC_MSG_RESULT(yes - automatic GUI support) ;;
  942. !     auto)    AC_MSG_RESULT(auto - automatic GUI support) ;;
  943.       gtk)    AC_MSG_RESULT(GTK+ 1.x GUI support)
  944. !         SKIP_GTK2=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  945.       gtk2)    AC_MSG_RESULT(GTK+ 2.x GUI support)
  946. !         SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  947.       gnome)    AC_MSG_RESULT(GNOME 1.x GUI support)
  948. !         SKIP_GTK2=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  949.       gnome2)    AC_MSG_RESULT(GNOME 2.x GUI support)
  950. !         SKIP_MOTIF=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  951.       motif)    AC_MSG_RESULT(Motif GUI support)
  952. !         SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_ATHENA=YES; SKIP_NEXTAW=YES ;;
  953.       athena)    AC_MSG_RESULT(Athena GUI support)
  954. !         SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_NEXTAW=YES ;;
  955.       nextaw)    AC_MSG_RESULT(neXtaw GUI support)
  956. !         SKIP_GTK=YES; SKIP_GNOME=YES; SKIP_MOTIF=YES; SKIP_ATHENA=YES ;;
  957.       *)        AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;;
  958.     esac
  959.   
  960. --- 862,957 ----
  961.     fi
  962.   fi
  963.   
  964. ! test "x$with_x" = xno -a "x$BEOS" != "xyes" -a "x$MACOSX" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no
  965.   
  966.   AC_MSG_CHECKING(--enable-gui argument)
  967.   AC_ARG_ENABLE(gui,
  968. !  [  --enable-gui[=OPTS]     X11 GUI [default=auto] [OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/beos/photon/carbon]], , enable_gui="auto")
  969.   
  970. ! dnl Canonicalize the --enable-gui= argument so that it can be easily compared.
  971. ! dnl Do not use character classes for portability with old tools.
  972.   enable_gui_canon=`echo "_$enable_gui" | \
  973.       sed 's/[[ _+-]]//g;y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  974.   
  975. ! dnl Skip everything by default.
  976. ! SKIP_GTK=YES
  977. ! SKIP_GTK2=YES
  978. ! SKIP_GNOME=YES
  979. ! SKIP_MOTIF=YES
  980. ! SKIP_ATHENA=YES
  981. ! SKIP_NEXTAW=YES
  982. ! SKIP_PHOTON=YES
  983. ! SKIP_BEOS=YES
  984. ! SKIP_CARBON=YES
  985. ! GUITYPE=NONE
  986.   
  987. ! if test "x$BEOS" = "xyes"; then
  988.     SKIP_BEOS=
  989.     case "$enable_gui_canon" in
  990.       no)        AC_MSG_RESULT(no GUI support)
  991.           SKIP_BEOS=YES ;;
  992.       yes|"")    AC_MSG_RESULT(yes - automatic GUI support) ;;
  993.       auto)    AC_MSG_RESULT(auto - automatic GUI support) ;;
  994.       beos)    AC_MSG_RESULT(BeOS GUI support) ;;
  995. !     *)        AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
  996. !         SKIP_BEOS=YES ;;
  997.     esac
  998.   
  999.   elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
  1000.     SKIP_PHOTON=
  1001.     case "$enable_gui_canon" in
  1002.       no)        AC_MSG_RESULT(no GUI support)
  1003.           SKIP_PHOTON=YES ;;
  1004.       yes|"")    AC_MSG_RESULT(yes - automatic GUI support) ;;
  1005.       auto)    AC_MSG_RESULT(auto - automatic GUI support) ;;
  1006.       photon)    AC_MSG_RESULT(Photon GUI support) ;;
  1007. !     *)        AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
  1008. !         SKIP_PHOTON=YES ;;
  1009. !   esac
  1010. ! elif test "x$MACOSX" = "xyes" -a "x$with_x" = "xno" ; then
  1011. !   SKIP_CARBON=
  1012. !   case "$enable_gui_canon" in
  1013. !     no)        AC_MSG_RESULT(no GUI support)
  1014. !         SKIP_CARBON=YES ;;
  1015. !     yes|"")    AC_MSG_RESULT(yes - automatic GUI support) ;;
  1016. !     auto)    AC_MSG_RESULT(auto - automatic GUI support) ;;
  1017. !     carbon)    AC_MSG_RESULT(Carbon GUI support) ;;
  1018. !     *)        AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
  1019. !         SKIP_CARBON=YES ;;
  1020.     esac
  1021.   
  1022.   else
  1023.   
  1024.   
  1025.     case "$enable_gui_canon" in
  1026. !     no|none)    AC_MSG_RESULT(no GUI support) ;;
  1027. !     yes|""|auto)    AC_MSG_RESULT(yes/auto - automatic GUI support)
  1028. !         SKIP_GTK=
  1029. !         SKIP_GTK2=
  1030. !         SKIP_GNOME=
  1031. !         SKIP_MOTIF=
  1032. !         SKIP_ATHENA=
  1033. !         SKIP_NEXTAW=
  1034. !         SKIP_CARBON=;;
  1035.       gtk)    AC_MSG_RESULT(GTK+ 1.x GUI support)
  1036. !         SKIP_GTK=;;
  1037.       gtk2)    AC_MSG_RESULT(GTK+ 2.x GUI support)
  1038. !         SKIP_GTK=
  1039. !         SKIP_GTK2=;;
  1040.       gnome)    AC_MSG_RESULT(GNOME 1.x GUI support)
  1041. !         SKIP_GNOME=
  1042. !         SKIP_GTK=;;
  1043.       gnome2)    AC_MSG_RESULT(GNOME 2.x GUI support)
  1044. !         SKIP_GNOME=
  1045. !         SKIP_GTK=
  1046. !         SKIP_GTK2=;;
  1047.       motif)    AC_MSG_RESULT(Motif GUI support)
  1048. !         SKIP_MOTIF=;;
  1049.       athena)    AC_MSG_RESULT(Athena GUI support)
  1050. !         SKIP_ATHENA=;;
  1051.       nextaw)    AC_MSG_RESULT(neXtaw GUI support)
  1052. !         SKIP_NEXTAW=;;
  1053.       *)        AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported]) ;;
  1054.     esac
  1055.   
  1056. ***************
  1057. *** 972,977 ****
  1058. --- 1026,1059 ----
  1059.     fi
  1060.   fi
  1061.   
  1062. + if test "x$SKIP_CARBON" != "xYES" -a "$enable_gui_canon" != "carbon"; then
  1063. +   AC_MSG_CHECKING(whether or not to look for Carbon)
  1064. +   AC_ARG_ENABLE(carbon-check,
  1065. +     [  --enable-carbon-check   If auto-select GUI, check for Carbon [default=yes]],
  1066. +     , enable_carbon_check="yes")
  1067. +   AC_MSG_RESULT($enable_carbon_check);
  1068. +   if test "x$enable_carbon_check" = "xno"; then
  1069. +     SKIP_CARBON=YES
  1070. +   fi
  1071. + fi
  1072. + if test "x$MACOSX" = "xyes" -a -z "$SKIP_CARBON" -a "x$CARBON" = "xyes"; then
  1073. +   AC_MSG_CHECKING(for Carbon GUI)
  1074. +   dnl already did this
  1075. +   AC_MSG_RESULT(yes);
  1076. +   GUITYPE=CARBONGUI
  1077. +   dnl skip everything else
  1078. +   SKIP_GTK=YES;
  1079. +   SKIP_GTK2=YES;
  1080. +   SKIP_GNOME=YES;
  1081. +   SKIP_MOTIF=YES;
  1082. +   SKIP_ATHENA=YES;
  1083. +   SKIP_NEXTAW=YES;
  1084. +   SKIP_PHOTON=YES;
  1085. +   SKIP_BEOS=YES;
  1086. +   SKIP_CARBON=YES
  1087. + fi
  1088.   
  1089.   dnl
  1090.   dnl Get the cflags and libraries from the gtk-config script
  1091. ***************
  1092. *** 1567,1572 ****
  1093. --- 1649,1660 ----
  1094.     AC_DEFINE(FEAT_XFONTSET)
  1095.   fi
  1096.   
  1097. + dnl ---------------------------------------------------------------------------
  1098. + dnl end of GUI-checking 
  1099. + dnl ---------------------------------------------------------------------------
  1100.   dnl Only really enable hangul input when GUI and XFONTSET are available
  1101.   if test "$enable_hangulinput" = "yes"; then
  1102.     if test "x$GUITYPE" = "xNONE"; then
  1103. ***************
  1104. *** 1622,1633 ****
  1105.   
  1106.   AC_CHECK_HEADERS(stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
  1107.       termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
  1108. !     iconv.h langinfo.h unistd.h stropts.h errno.h strings.h \
  1109.       sys/resource.h sys/systeminfo.h locale.h \
  1110.       sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
  1111.       poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
  1112.       libgen.h util/debug.h util/msg18n.h frame.h \
  1113.       sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h)
  1114.   
  1115.   dnl Check if strings.h and string.h can both be included when defined.
  1116.   AC_MSG_CHECKING([if strings.h can be included after string.h])
  1117. --- 1710,1726 ----
  1118.   
  1119.   AC_CHECK_HEADERS(stdarg.h stdlib.h string.h sys/select.h sys/utsname.h \
  1120.       termcap.h fcntl.h sgtty.h sys/ioctl.h sys/time.h termio.h \
  1121. !     iconv.h langinfo.h unistd.h stropts.h errno.h \
  1122.       sys/resource.h sys/systeminfo.h locale.h \
  1123.       sys/stream.h sys/ptem.h termios.h libc.h sys/statfs.h \
  1124.       poll.h sys/poll.h pwd.h utime.h sys/param.h libintl.h \
  1125.       libgen.h util/debug.h util/msg18n.h frame.h \
  1126.       sys/acl.h sys/access.h sys/sysctl.h sys/sysinfo.h)
  1127. + dnl On Mac OS X strings.h exists but produces a warning message :-(
  1128. + if test "x$MACOSX" != "xyes"; then
  1129. +   AC_CHECK_HEADERS(strings.h)
  1130. + fi
  1131.   
  1132.   dnl Check if strings.h and string.h can both be included when defined.
  1133.   AC_MSG_CHECKING([if strings.h can be included after string.h])
  1134. *** ../vim-6.2.117/src/config.mk.in    Sun Apr 20 16:10:18 2003
  1135. --- src/config.mk.in    Sun Sep  7 20:25:02 2003
  1136. ***************
  1137. *** 116,121 ****
  1138. --- 116,122 ----
  1139.   GUI_LIBS_DIR    = $(@GUITYPE@_LIBS_DIR)
  1140.   GUI_LIBS1    = $(@GUITYPE@_LIBS1)
  1141.   GUI_LIBS2    = $(@GUITYPE@_LIBS2)
  1142. + GUI_INSTALL    = $(@GUITYPE@_INSTALL)
  1143.   GUI_TARGETS    = $(@GUITYPE@_TARGETS)
  1144.   GUI_MAN_TARGETS    = $(@GUITYPE@_MAN_TARGETS)
  1145.   GUI_TESTTARGET    = $(@GUITYPE@_TESTTARGET)
  1146. *** ../vim-6.2.117/src/gui_mac.c    Sat Jul 26 21:25:27 2003
  1147. --- src/gui_mac.c    Sun Oct 12 21:59:11 2003
  1148. ***************
  1149. *** 206,212 ****
  1150.   #endif
  1151.   
  1152.   /* Colors Macros */
  1153. ! #define RGB(r,g,b)    (r << 16) + (g << 8) + b
  1154.   #define Red(c)        ((c & 0x00FF0000) >> 16)
  1155.   #define Green(c)    ((c & 0x0000FF00) >>  8)
  1156.   #define Blue(c)        ((c & 0x000000FF) >>  0)
  1157. --- 206,212 ----
  1158.   #endif
  1159.   
  1160.   /* Colors Macros */
  1161. ! #define RGB(r,g,b)    ((r) << 16) + ((g) << 8) + (b)
  1162.   #define Red(c)        ((c & 0x00FF0000) >> 16)
  1163.   #define Green(c)    ((c & 0x0000FF00) >>  8)
  1164.   #define Blue(c)        ((c & 0x000000FF) >>  0)
  1165. ***************
  1166. *** 613,622 ****
  1167.       }
  1168.   
  1169.       for (buf = firstbuf; buf != NULL; buf = buf->b_next)
  1170. !     if (buf->b_ml.ml_mfp != NULL)
  1171. !         if (SearchData.theFile.parID == buf->b_FSSpec.parID)
  1172. !           if (SearchData.theFile.name[0] = buf->b_FSSpec.name[0])
  1173. !         if (STRNCMP(SearchData.theFile.name, buf->b_FSSpec.name, buf->b_FSSpec.name[0]+1))
  1174.           {
  1175.           foundFile = true;
  1176.           break;
  1177. --- 613,622 ----
  1178.       }
  1179.   
  1180.       for (buf = firstbuf; buf != NULL; buf = buf->b_next)
  1181. !     if (buf->b_ml.ml_mfp != NULL
  1182. !         && SearchData.theFile.parID == buf->b_FSSpec.parID
  1183. !         && SearchData.theFile.name[0] == buf->b_FSSpec.name[0]
  1184. !         && STRNCMP(SearchData.theFile.name, buf->b_FSSpec.name, buf->b_FSSpec.name[0] + 1) == 0)
  1185.           {
  1186.           foundFile = true;
  1187.           break;
  1188. ***************
  1189. *** 822,828 ****
  1190.       CW_GetText    GetTextData;
  1191.       Size    actualSize;
  1192.       char_u    *line;
  1193. !     char_u    *fullbuffer;
  1194.       long    linesize;
  1195.       long    lineStart;
  1196.       long    BufferSize;
  1197. --- 822,828 ----
  1198.       CW_GetText    GetTextData;
  1199.       Size    actualSize;
  1200.       char_u    *line;
  1201. !     char_u    *fullbuffer = NULL;
  1202.       long    linesize;
  1203.       long    lineStart;
  1204.       long    BufferSize;
  1205. ***************
  1206. *** 875,883 ****
  1207.           HUnlock (GetTextData.theText);
  1208.           }
  1209.       }
  1210. !     HLock (GetTextData.theText);
  1211. !     fullbuffer[BufferSize-1] = 0;
  1212. !     HUnlock (GetTextData.theText);
  1213.       if (foundFile == false)
  1214.           *GetTextData.theDate = fnfErr;
  1215.       else
  1216. --- 875,886 ----
  1217.           HUnlock (GetTextData.theText);
  1218.           }
  1219.       }
  1220. !     if (fullbuffer != NULL)
  1221. !     {
  1222. !         HLock (GetTextData.theText);
  1223. !         fullbuffer[BufferSize-1] = 0;
  1224. !         HUnlock (GetTextData.theText);
  1225. !     }
  1226.       if (foundFile == false)
  1227.           *GetTextData.theDate = fnfErr;
  1228.       else
  1229. ***************
  1230. *** 3160,3166 ****
  1231.       if (STRICMP (name, "hilite") == 0)
  1232.       {
  1233.           LMGetHiliteRGB (&MacColor);
  1234. !         return (RGB (MacColor.red >> 8, MacColor.green >> 8, MacColor.blue >>8));
  1235.       }
  1236.       /* Check if the name is one of the colors we know */
  1237.       for (i = 0; i < sizeof(table) / sizeof(table[0]); i++)
  1238. --- 3163,3169 ----
  1239.       if (STRICMP (name, "hilite") == 0)
  1240.       {
  1241.           LMGetHiliteRGB (&MacColor);
  1242. !         return (RGB (MacColor.red >> 8, MacColor.green >> 8, MacColor.blue >> 8));
  1243.       }
  1244.       /* Check if the name is one of the colors we know */
  1245.       for (i = 0; i < sizeof(table) / sizeof(table[0]); i++)
  1246. ***************
  1247. *** 3214,3220 ****
  1248.           if (STRICMP(color, name) == 0)
  1249.           {
  1250.           fclose(fd);
  1251. !         return (guicolor_T) RGB(r,g,b);
  1252.           }
  1253.       }
  1254.       fclose(fd);
  1255. --- 3217,3223 ----
  1256.           if (STRICMP(color, name) == 0)
  1257.           {
  1258.           fclose(fd);
  1259. !         return (guicolor_T) RGB(r, g, b);
  1260.           }
  1261.       }
  1262.       fclose(fd);
  1263. ***************
  1264. *** 5086,5091 ****
  1265. --- 5089,5095 ----
  1266.       status = ContextualMenuSelect(CntxMenu, where, false, kCMHelpItemNoHelp, HelpName, NULL, &CntxType, &CntxMenuID, &CntxMenuItem);
  1267.   
  1268.       if (status == noErr)
  1269. +     {
  1270.       if (CntxType == kCMMenuItemSelected)
  1271.       {
  1272.           /* Handle the menu CntxMenuID, CntxMenuItem */
  1273. ***************
  1274. *** 5097,5102 ****
  1275. --- 5101,5107 ----
  1276.       {
  1277.           /* Should come up with the help */
  1278.       }
  1279. +     }
  1280.   
  1281.       /* Restore original Port */
  1282.       SetPort (savePort); /*OSX*/
  1283. *** ../vim-6.2.117/src/os_mac.h    Mon Jul 28 14:38:38 2003
  1284. --- src/os_mac.h    Sun Oct 12 21:14:34 2003
  1285. ***************
  1286. *** 147,165 ****
  1287.   #endif
  1288.   #define HAVE_AVAIL_MEM
  1289.   
  1290.   /* #define SYNC_DUP_CLOSE       sync() a file with dup() and close() */
  1291. ! #define HAVE_STRING_H
  1292. ! #define HAVE_STRCSPN
  1293. ! #define HAVE_MEMSET
  1294. ! #define USE_TMPNAM        /* use tmpnam() instead of mktemp() */
  1295. ! #define HAVE_FCNTL_H
  1296. ! #define HAVE_QSORT
  1297. ! #define HAVE_ST_MODE        /* have stat.st_mode */
  1298.   
  1299. ! #if defined(__DATE__) && defined(__TIME__)
  1300. ! # define HAVE_DATE_TIME
  1301.   #endif
  1302. - #define HAVE_STRFTIME
  1303.   
  1304.   
  1305.   /*
  1306. --- 147,167 ----
  1307.   #endif
  1308.   #define HAVE_AVAIL_MEM
  1309.   
  1310. + #ifndef HAVE_CONFIG_H
  1311.   /* #define SYNC_DUP_CLOSE       sync() a file with dup() and close() */
  1312. ! # define HAVE_STRING_H
  1313. ! # define HAVE_STRCSPN
  1314. ! # define HAVE_MEMSET
  1315. ! # define USE_TMPNAM        /* use tmpnam() instead of mktemp() */
  1316. ! # define HAVE_FCNTL_H
  1317. ! # define HAVE_QSORT
  1318. ! # define HAVE_ST_MODE        /* have stat.st_mode */
  1319.   
  1320. ! # if defined(__DATE__) && defined(__TIME__)
  1321. ! #  define HAVE_DATE_TIME
  1322. ! # endif
  1323. ! # define HAVE_STRFTIME
  1324.   #endif
  1325.   
  1326.   
  1327.   /*
  1328. ***************
  1329. *** 333,358 ****
  1330.   /**************/
  1331.   #define mch_rename(src, dst) rename(src, dst)
  1332.   #define mch_remove(x) unlink((char *)(x))
  1333. ! #if defined(__MRC__) || defined(__SC__)
  1334. ! # define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
  1335. ! # define mch_setenv(name, val, x) setenv((name), (val))
  1336. ! #elif defined(__APPLE_CC__)
  1337. ! # define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
  1338.   /*# define mch_setenv(name, val, x) setenv((name), (val)) */ /* Obsoleted by Dany on Oct 30, 2001 */
  1339. ! # define mch_setenv(name, val, x) setenv(name, val, x)
  1340. ! #else
  1341. !  /* vim_getenv() is in pty.c */
  1342. ! # define USE_VIMPTY_GETENV
  1343. ! # define mch_getenv(x) vimpty_getenv(x)
  1344. ! # define mch_setenv(name, val, x) setenv(name, val, x)
  1345.   #endif
  1346.   
  1347. ! #ifdef __APPLE_CC__
  1348.   /* Assuming compiling for MacOS X */
  1349.   /* Trying to take advantage of the prebinding */
  1350. ! # define HAVE_TGETENT
  1351. ! # define OSPEED_EXTERN
  1352. ! # define UP_BC_PC_EXTERN
  1353.   #endif
  1354.   
  1355.   /* Some "prep work" definition to be able to compile the MacOS X
  1356. --- 335,364 ----
  1357.   /**************/
  1358.   #define mch_rename(src, dst) rename(src, dst)
  1359.   #define mch_remove(x) unlink((char *)(x))
  1360. ! #ifndef mch_getenv
  1361. ! # if defined(__MRC__) || defined(__SC__)
  1362. ! #  define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
  1363. ! #  define mch_setenv(name, val, x) setenv((name), (val))
  1364. ! # elif defined(__APPLE_CC__)
  1365. ! #  define mch_getenv(name)  ((char_u *)getenv((char *)(name)))
  1366.   /*# define mch_setenv(name, val, x) setenv((name), (val)) */ /* Obsoleted by Dany on Oct 30, 2001 */
  1367. ! #  define mch_setenv(name, val, x) setenv(name, val, x)
  1368. ! # else
  1369. !   /* vim_getenv() is in pty.c */
  1370. ! #  define USE_VIMPTY_GETENV
  1371. ! #  define mch_getenv(x) vimpty_getenv(x)
  1372. ! #  define mch_setenv(name, val, x) setenv(name, val, x)
  1373. ! # endif
  1374.   #endif
  1375.   
  1376. ! #ifndef HAVE_CONFIG_H
  1377. ! # ifdef __APPLE_CC__
  1378.   /* Assuming compiling for MacOS X */
  1379.   /* Trying to take advantage of the prebinding */
  1380. ! #  define HAVE_TGETENT
  1381. ! #  define OSPEED_EXTERN
  1382. ! #  define UP_BC_PC_EXTERN
  1383. ! # endif
  1384.   #endif
  1385.   
  1386.   /* Some "prep work" definition to be able to compile the MacOS X
  1387. ***************
  1388. *** 361,385 ****
  1389.    */
  1390.   
  1391.   #ifdef MACOS_X_UNIX
  1392. - # define RETSIGTYPE void
  1393. - # define SIGRETURN  return
  1394.   # define SIGPROTOARG    (int)
  1395.   # define SIGDEFARG(s)    (s) int s;
  1396.   # define SIGDUMMYARG    0
  1397. - /*# define USE_SYSTEM */  /* Output ship do debugger :(, but ot compile */
  1398. - # define HAVE_SYS_WAIT_H 1 /* Attempt */
  1399. - # define HAVE_TERMIOS_H 1
  1400. - # define SYS_SELECT_WITH_SYS_TIME 1
  1401. - # define HAVE_SELECT 1
  1402. - # define HAVE_SYS_SELECT_H 1
  1403.   # undef  HAVE_AVAIL_MEM
  1404. ! # define HAVE_PUTENV
  1405. ! # define HAVE_SETENV
  1406. ! # define HAVE_RENAME
  1407.   # define mch_chdir(s) chdir(s)
  1408.   #endif
  1409.   
  1410. ! #ifdef MACOS_X
  1411.   # define HAVE_PUTENV
  1412.   #endif
  1413.   
  1414. --- 367,393 ----
  1415.    */
  1416.   
  1417.   #ifdef MACOS_X_UNIX
  1418.   # define SIGPROTOARG    (int)
  1419.   # define SIGDEFARG(s)    (s) int s;
  1420.   # define SIGDUMMYARG    0
  1421.   # undef  HAVE_AVAIL_MEM
  1422. ! # ifndef HAVE_CONFIG_H
  1423. ! #  define RETSIGTYPE void
  1424. ! #  define SIGRETURN  return
  1425. ! /*# define USE_SYSTEM */  /* Output ship do debugger :(, but ot compile */
  1426. ! #  define HAVE_SYS_WAIT_H 1 /* Attempt */
  1427. ! #  define HAVE_TERMIOS_H 1
  1428. ! #  define SYS_SELECT_WITH_SYS_TIME 1
  1429. ! #  define HAVE_SELECT 1
  1430. ! #  define HAVE_SYS_SELECT_H 1
  1431. ! #  define HAVE_PUTENV
  1432. ! #  define HAVE_SETENV
  1433. ! #  define HAVE_RENAME
  1434. ! # endif
  1435.   # define mch_chdir(s) chdir(s)
  1436.   #endif
  1437.   
  1438. ! #if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
  1439.   # define HAVE_PUTENV
  1440.   #endif
  1441.   
  1442. *** ../vim-6.2.117/src/os_macosx.c    Sun May 11 17:26:37 2003
  1443. --- src/os_macosx.c    Sun Sep  7 21:45:56 2003
  1444. ***************
  1445. *** 13,19 ****
  1446.    */
  1447.   
  1448.   #ifdef MACOS_X_UNIX
  1449. ! # include "os_unix.c"
  1450.   #else
  1451.   # include "os_mac.c"
  1452.   # include <TextEncodingConverter.h>
  1453. --- 13,19 ----
  1454.    */
  1455.   
  1456.   #ifdef MACOS_X_UNIX
  1457. ! # include "vim.h"
  1458.   #else
  1459.   # include "os_mac.c"
  1460.   # include <TextEncodingConverter.h>
  1461. *** ../vim-6.2.117/src/proto/gui_mac.pro    Sat Jul 26 21:25:27 2003
  1462. --- src/proto/gui_mac.pro    Sun Sep  7 23:42:13 2003
  1463. ***************
  1464. *** 135,138 ****
  1465. --- 135,142 ----
  1466.   void gui_mac_doMouseMovedEvent __ARGS((EventRecord *event));
  1467.   void gui_mac_doMouseUpEvent __ARGS((EventRecord *theEvent));
  1468.   
  1469. + int C2PascalString (char_u *CString, Str255 *PascalString);
  1470. + int GetFSSpecFromPath ( char_u *file, FSSpec *fileFSSpec);
  1471. + char_u *FullPathFromFSSpec_save (FSSpec file);
  1472.   /* vim: set ft=c : */
  1473. *** ../vim-6.2.117/src/proto/os_mac.pro    Sun Sep 16 20:33:15 2001
  1474. --- src/proto/os_mac.pro    Sun Sep  7 23:42:47 2003
  1475. ***************
  1476. *** 45,55 ****
  1477.   int mch_has_exp_wildcard __ARGS((char_u *p));
  1478.   
  1479.   void slash_n_colon_adjust __ARGS((char_u *buf));
  1480. - char_u *FullPathFromFSSpec_save (FSSpec file);
  1481.   int mch_copy_file(char_u *from, char_u *to);
  1482.   
  1483. - int C2PascalString (char_u *CString, Str255 *PascalString);
  1484. - int GetFSSpecFromPath ( char_u *file, FSSpec *fileFSSpec);
  1485.   int mch_has_resource_fork (char_u *file);
  1486.   int mch_copy_file_attribute(char_u *from, char_u *to);
  1487.   
  1488. --- 45,52 ----
  1489. *** ../vim-6.2.117/src/infplist.xml    Mon Oct 13 22:09:37 2003
  1490. --- src/infplist.xml    Thu Aug 14 13:36:03 2003
  1491. ***************
  1492. *** 0 ****
  1493. --- 1,51 ----
  1494. + <?xml version="1.0" encoding="UTF-8"?>
  1495. + <!-- vim:set ts=2 sts=2 sw=2 tw=0: -->
  1496. + <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
  1497. + <plist version="0.9">
  1498. +     <dict>
  1499. +         <key>CFBundleInfoDictionaryVersion</key>
  1500. +         <string>6.0</string>
  1501. +         <key>CFBundleExecutable</key>
  1502. +         <string>APP_EXE</string>
  1503. +         <key>CFBundleName</key>
  1504. +         <string>APP_NAME</string>
  1505. +         <key>CFBundlePackageType</key>
  1506. +         <string>APPL</string>
  1507. +         <key>CFBundleVersion</key>
  1508. +         <string>APP_VER</string>
  1509. +         <key>CFBundleShortVersionString</key>
  1510. +         <string>APP_VER</string>
  1511. +         <key>CFBundleSignature</key>
  1512. +         <string>VIM!</string>
  1513. +         <key>CFBundleDevelopmentRegion</key>
  1514. +         <string>English</string>
  1515. +         <key>CSResourcesFileMapped</key>
  1516. +         <true/>
  1517. +         <key>CFBundleIconFile</key>
  1518. +         <string>ICON_APP</string>
  1519. +         <key>CFBundleDocumentTypes</key>
  1520. +         <array>
  1521. +             <dict>
  1522. +                 <key>CFBundleTypeExtensions</key>
  1523. +                 <array>
  1524. +                     <string>*</string>
  1525. +                 </array>
  1526. +                 <key>CFBundleTypeIconFile</key>
  1527. +                 <string>doc-txt.icns</string>
  1528. +                 <key>CFBundleTypeName</key>
  1529. +                 <string>NSStringPboardType</string>
  1530. +                 <key>CFBundleTypeOSTypes</key>
  1531. +                 <array>
  1532. +                     <string>****</string>
  1533. +                 </array>
  1534. +                 <key>CFBundleTypeRole</key>
  1535. +                 <string>Editor</string>
  1536. +             </dict>
  1537. +         </array>
  1538. +     </dict>
  1539. + </plist>
  1540. *** ../vim-6.2.117/src/vim.h    Sun Oct 12 17:25:14 2003
  1541. --- src/vim.h    Sun Oct 12 21:10:15 2003
  1542. ***************
  1543. *** 63,70 ****
  1544.   #  define MACOS_CLASSIC
  1545.   #endif
  1546.   #if defined(MACOS_X_UNIX)
  1547. ! #  define MACOS_X
  1548.   #  define UNIX
  1549.   #endif
  1550.   #if defined(MACOS_X) || defined(MACOS_CLASSIC)
  1551.   #  define MACOS
  1552. --- 63,72 ----
  1553.   #  define MACOS_CLASSIC
  1554.   #endif
  1555.   #if defined(MACOS_X_UNIX)
  1556. ! # define MACOS_X
  1557. ! # ifndef HAVE_CONFIG_H
  1558.   #  define UNIX
  1559. + # endif
  1560.   #endif
  1561.   #if defined(MACOS_X) || defined(MACOS_CLASSIC)
  1562.   #  define MACOS
  1563. ***************
  1564. *** 187,193 ****
  1565.   # define __ARGS(x)  x
  1566.   #endif
  1567.   
  1568. ! #if (defined(UNIX) || defined(__EMX__) || defined(VMS)) && !defined(MACOS_X)
  1569.   # include "os_unix.h"        /* bring lots of system header files */
  1570.   #endif
  1571.   
  1572. --- 189,196 ----
  1573.   # define __ARGS(x)  x
  1574.   #endif
  1575.   
  1576. ! #if (defined(UNIX) || defined(__EMX__) || defined(VMS)) \
  1577. !     && (!defined(MACOS_X) || defined(HAVE_CONFIG_H))
  1578.   # include "os_unix.h"        /* bring lots of system header files */
  1579.   #endif
  1580.   
  1581. *** ../vim-6.2.117/src/version.c    Sun Oct 12 20:20:38 2003
  1582. --- src/version.c    Mon Oct 13 22:08:37 2003
  1583. ***************
  1584. *** 639,640 ****
  1585. --- 639,642 ----
  1586.   {   /* Add new patch number below this line */
  1587. + /**/
  1588. +     118,
  1589.   /**/
  1590.  
  1591. -- 
  1592. hundred-and-one symptoms of being an internet addict:
  1593. 197. Your desk collapses under the weight of your computer peripherals.
  1594.  
  1595.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  1596. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  1597. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  1598.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  1599.