diff options
41 files changed, 6312 insertions, 151 deletions
@@ -599,6 +599,14 @@ SRC_AMI = \ src/testdir/amiga.vim \ src/xxd/Make_amiga.mak \ +# source files for Haiku (also in the extra archive) +SRC_HAIKU = \ + src/os_haiku.h \ + src/os_haiku.rdef \ + src/gui_haiku.cc \ + src/gui_haiku.h \ + src/proto/gui_haiku.pro \ + # source files for the Mac (also in the extra archive) SRC_MAC = \ src/INSTALLmac.txt \ @@ -634,13 +642,13 @@ SRC_QNX = \ src/proto/gui_photon.pro \ src/proto/os_qnx.pro \ - # source files for the extra archive (all sources that are not for Unix) SRC_EXTRA = \ $(SRC_AMI) \ $(SRC_AMI_DOS) \ $(SRC_DOS) \ $(SRC_DOS_BIN) \ + $(SRC_HAIKU) \ $(SRC_MAC) \ $(SRC_QNX) \ $(SRC_VMS) \ diff --git a/runtime/doc/Makefile b/runtime/doc/Makefile index 65dc8436c6..b1b4c8ec72 100644 --- a/runtime/doc/Makefile +++ b/runtime/doc/Makefile @@ -64,6 +64,7 @@ DOCS = \ os_amiga.txt \ os_beos.txt \ os_dos.txt \ + os_haiku.txt \ os_mac.txt \ os_mint.txt \ os_msdos.txt \ @@ -204,6 +205,7 @@ HTMLS = \ os_amiga.html \ os_beos.html \ os_dos.html \ + os_haiku.html \ os_mac.html \ os_mint.html \ os_msdos.html \ @@ -422,6 +424,9 @@ os_beos.txt: os_dos.txt: touch os_dos.txt +os_haiku.txt: + touch os_haiku.txt + os_mac.txt: touch os_mac.txt diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 508c59a150..fb4db5d407 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -10766,12 +10766,14 @@ gui_gnome Compiled with Gnome support (gui_gtk is also defined). gui_gtk Compiled with GTK+ GUI (any version). gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined). gui_gtk3 Compiled with GTK+ 3 GUI (gui_gtk is also defined). +gui_haiku Compiled with Haiku GUI. gui_mac Compiled with Macintosh GUI. gui_motif Compiled with Motif GUI. gui_photon Compiled with Photon GUI. gui_running Vim is running in the GUI, or it will start soon. gui_win32 Compiled with MS Windows Win32 GUI. gui_win32s idem, and Win32s system being used (Windows 3.1) +haiku Haiku version of Vim. hangul_input Compiled with Hangul input support. |hangul| hpux HP-UX version of Vim. iconv Can use iconv() for conversion. diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 93e01ef6c5..1a38496040 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -99,6 +99,7 @@ Recommended place for your personal GUI initializations: or $VIM/_gvimrc Amiga s:.gvimrc, home:.gvimrc, home:vimfiles:gvimrc or $VIM/.gvimrc + Haiku $HOME/config/settings/vim/gvimrc The personal initialization files are searched in the order specified above and only the first one that is found is read. diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 8f67ef5c98..f2b78466ee 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -204,6 +204,7 @@ Remarks about specific systems ~ |os_os2.txt| OS/2 |os_qnx.txt| QNX |os_risc.txt| RISC-OS +|os_haiku.txt| Haiku |os_unix.txt| Unix |os_vms.txt| VMS |os_win32.txt| MS-Windows diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index a48e9ea4a5..df8aba2a55 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3769,7 +3769,7 @@ A jump table for the options with a short description can be found at |Q_op|. 'guitablabel' can be used to change the text in the labels. When 'e' is missing a non-GUI tab pages line may be used. The GUI tabs are only supported on some systems, currently - GTK, Motif, Mac OS/X and MS-Windows. + GTK, Motif, Mac OS/X, Haiku, and MS-Windows. *'go-f'* 'f' Foreground: Don't use fork() to detach the GUI from the shell where it was started. Use this for programs that wait for the @@ -6207,6 +6207,11 @@ A jump table for the options with a short description can be found at |Q_op|. Macintosh: "$VIM:vimfiles, $VIMRUNTIME, $VIM:vimfiles:after" + Haiku: "$BE_USER_SETTINGS/vim, + $VIM/vimfiles, + $VIMRUNTIME, + $VIM/vimfiles/after, + $BE_USER_SETTINGS/vim/after") VMS: "sys$login:vimfiles, $VIM/vimfiles, $VIMRUNTIME, @@ -7665,6 +7670,7 @@ A jump table for the options with a short description can be found at |Q_op|. in the GUI: "builtin_gui" on Amiga: "amiga" on BeOS: "beos-ansi" + on Haiku: "xterm" on Mac: "mac-ansi" on MiNT: "vt52" on Unix: "ansi" diff --git a/runtime/doc/os_haiku.txt b/runtime/doc/os_haiku.txt new file mode 100644 index 0000000000..1154ea7556 --- /dev/null +++ b/runtime/doc/os_haiku.txt @@ -0,0 +1,228 @@ +*os_haiku.txt* For Vim version 8.2. Last change: 2020 Feb 26 + + + VIM REFERENCE MANUAL by Bram Moolenaar + + + *Haiku* +This file contains the particularities for the Haiku version of Vim. For +matters not discussed in this file, Vim behaves very much like the Unix +|os_unix.txt| version. + +Haiku is an open-source operating system inspired by BeOS, that specifically +targets personal computing. + + 1. General |haiku-general| + 2. Compiling Vim |haiku-compiling| + 3. The Haiku GUI |haiku-gui| + 4. The $VIM directory |haiku-vimdir| + 5. The $BE_USER_SETTINGS + directory |haiku-user-settings-dir| + 6. Drag & Drop |haiku-dragndrop| + 7. Single Launch vs. Multiple + Launch |haiku-launch| + 8. Fonts |haiku-fonts| + 9. The meta key modifier |haiku-meta| +10. Mouse key mappings |haiku-mouse| +11. Color names |haiku-colors| +12. Credits |haiku-support-credits| +13. Bugs & things To Do |haiku-bugs| + + +1. General *haiku-general* + +The default syntax highlighting mostly works with different foreground colors +to highlight items. This works best if you set your Terminal window to a +darkish background and light letters. Some middle-grey background (for +instance (r,g,b)=(168,168,168)) with black letters also works nicely. + + +2. Compiling Vim *haiku-compiling* + +Vim can be compiled using the standard configure/make approach. Running +./configure without any arguments or passing --enable-gui=haiku, will compile +vim with the Haiku GUI support. Run ./configure --help , to find out other +features you can enable/disable. + +Now you should use "make" to compile Vim, then "make install" to install it. +For seamless integration into the Haiku the GUI-less vim binary should be +additionally installed over the GUI version. Typical build commands are: > + + ./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \ + --datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \ + --mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \ + make clean + make install + + ./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \ + --datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \ + --mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \ + --disable-gui + make clean + make install + + +3. The Haiku GUI *haiku-gui* + +Normally Vim starts with the GUI if you start it as gvim or vim -g. The vim +version with GUI tries to determine if it was started from the Tracker instead +of the Terminal, and if so, uses the GUI anyway. However, the current detection +scheme is fooled if you use the command "vim - </dev/null". + +Stuff that does not work yet: + +- Mouse up events are not generated when outside the window. This may be a bug in + Haiku. You can notice this when selecting text and moving the cursor outside + the window, then letting go of the mouse button. Another way is when you + drag the scrollbar and do the same thing. Because Vim still thinks you are + still playing with the scrollbar it won't change it itself. I provided a + workaround which kicks in when the window is activated or deactivated (so it + works best with focus- follows-mouse turned on). +- The cursor does not flash (very low priority; I'm not sure I even like it + when it flashes) + + +4. The $VIM directory *haiku-vimdir* + +$VIM is the symbolic name for the place where Vims support files are stored. +The default value for $VIM is set at compile time and can be determined with > + + :version + +The normal value is /boot/common/data/vim. If you don't like it you can +set the VIM environment variable to override this, or set 'helpfile' in your +.vimrc: > + + :if version >= 500 + : set helpfile=~/vim/runtime/doc/help.txt + : syntax on + :endif + + +5. The $USER_SETTINGS_DIR directory *haiku-user-settings-dir* + +$USER_SETTINGS_DIR is the symbolic name for the place where Haiku +configuration and settings files are stored. + +The normal value is /boot/home/config/settings. + + +6. Drag & Drop *haiku-dragndrop* + +You can drop files and directories on either the Vim icon (starts a new Vim +session, unless you use the File Types application to set Vim to be "Single +Launch") or on the Vim window (starts editing the files). Dropping a folder +sets Vim's current working directory. |:cd| |:pwd| If you drop files or +folders with either SHIFT key pressed, Vim changes directory to the folder +that contains the first item dropped. When starting Vim, there is no need to +press shift: Vim behaves as if you do. + +Files dropped set the current argument list. |argument-list| + + +7. Single Launch vs. Multiple Launch *haiku-launch* + +As distributed Vim's Application Flags (as seen in the FileTypes preference) +are set to Multiple Launch. If you prefer, you can set them to Single Launch +instead. Attempts to start a second copy of Vim will cause the first Vim to +open the files instead. This works from the Tracker but also from the command +line. In the latter case, non-file (option) arguments are not supported. +Another drawback of the Single Launch is silent ignore of "Open With ..." +requests by vim instance that running as non-GUI application even GUI support +was compiled in. Vim instance running with GUI has no such problems. + +NB: Only the GUI version has a BApplication (and hence Application Flags). +This section does not apply to the GUI-less version, should you compile one. + + +8. Fonts *haiku-fonts* + +Set fonts with > + + :set guifont=DejaVu_Sans_Mono/Book/12 + +where the first part is the font family, the second part the style, and the +third part the size. You can use underscores instead of spaces in family and +style. + +Best results are obtained with monospaced fonts. Vim attempts to use all +fonts in B_FIXED_SPACING mode but apparently this does not work for +proportional fonts (despite what the BeBook says). + +To verify which encodings are supported by the current font give the > + + :digraphs + +command, which lists a bunch of characters with their ISO Latin 1 encoding. +If, for instance, there are "box" characters among them, or the last character +isn't a dotted-y, then for this font the encoding does not work. + +If the font you specify is unavailable, you get the system fixed font. + +GUI Font Selection Dialog is available at giving the > + + :set guifont=* + +command. + + +9. The meta key modifier *haiku-meta* + +The META key modifier is obtained by the left or right OPTION keys. This is +because the ALT (aka COMMAND) keys are not passed to applications. + + +10. Mouse key mappings *haiku-mouse* + +Vim calls the various mouse buttons LeftMouse, MiddleMouse and RightMouse. If +you use the default Mouse preference settings these names indeed correspond to +reality. Vim uses this mapping: + + Button 1 -> LeftMouse, + Button 2 -> RightMouse, + Button 3 -> MiddleMouse. + +If your mouse has fewer than 3 buttons you can provide your own mapping from +mouse clicks with modifier(s) to other mouse buttons. See the file +$VIM/macros/swapmous.vim for an example. |gui-mouse-mapping| + + +11. Color names *haiku-colors* + +Vim has a number of color names built-in. Additional names are read from the +file $VIMRUNTIME/rgb.txt, if present. This file is basically the color +database from X. Names used from this file are cached for efficiency. + + +12. GUI Toolbar Images *haiku-toolbar-images* + +Alternative set of toolbar images should be the PNG image of any height you +like. Image width is calculated to contain at least 32 buttons in one-row +cells. +The image should be stored under the name $VIRUNTIME/bitmaps/builtin-tools.png +More info about the buttons assignment are at |builtin-tools|. + + +13. Credits *haiku-support-credits* + +Haiku port is based on work done for BeOS version by many people + - BeBox GUI support Copyright 1998 by Olaf Seibert; + - Ported to R4 by Richard Offer <richard@whitequeen.com> Jul 99; + - Those who contributed, not listed above but not forgotten; + - Haiku support by Siarzhuk Zharski <imker@gmx.li> Apr-Mai 2009. + +All the changes and patches released under vim-license. + +Thank you, all! + + +13. Bugs & things To Do *haiku-bugs* + +The port is under development now and far away from the perfect state. Bug +reports, patches and wishes are welcome. + + + -Siarzhuk Zharski <imker@gmx.li> + + + vim:tw=78:ts=8:ft=help:norl: diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index b9a2370711..f437c0e034 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -790,6 +790,7 @@ accordingly. Vim proceeds in this order: or $VIM/_vimrc Amiga s:.vimrc, home:.vimrc, home:vimfiles:vimrc or $VIM/.vimrc + Haiku $HOME/config/settings/vim/vimrc The files are searched in the order specified above and only the first one that is found is read. @@ -835,6 +836,8 @@ accordingly. Vim proceeds in this order: "$HOME/_vimrc" (for Win32) (*) "$HOME/vimfiles/vimrc" (for Win32) (*) "$VIM/_vimrc" (for Win32) (*) + "$HOME/config/settings/vim/vimrc" (for Haiku) (*) + Note: For Unix and Amiga, when ".vimrc" does not exist, "_vimrc" is also tried, in case an MS-DOS compatible file system is used. For MS-Windows ".vimrc" is checked after @@ -950,6 +953,8 @@ sessions. Put it in a place so that it will be found by 3b: ~/.vimrc (Unix) s:.vimrc (Amiga) $VIM\_vimrc (Win32) + ~/config/settings/vim/vimrc (Haiku) + Note that creating a vimrc file will cause the 'compatible' option to be off by default. See |compatible-default|. diff --git a/runtime/doc/tags b/runtime/doc/tags index 735fb2d0c7..fdba199a04 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4871,6 +4871,7 @@ GetLatestVimScripts-copyright pi_getscript.txt /*GetLatestVimScripts-copyright* GetLatestVimScripts_dat pi_getscript.txt /*GetLatestVimScripts_dat* Gnome gui_x11.txt /*Gnome* H motion.txt /*H* +Haiku os_haiku.txt /*Haiku* I insert.txt /*I* ICCF uganda.txt /*ICCF* IM-server mbyte.txt /*IM-server* @@ -7053,6 +7054,20 @@ g~ change.txt /*g~* g~g~ change.txt /*g~g~* g~~ change.txt /*g~~* h motion.txt /*h* +haiku-bugs os_haiku.txt /*haiku-bugs* +haiku-colors os_haiku.txt /*haiku-colors* +haiku-compiling os_haiku.txt /*haiku-compiling* +haiku-dragndrop os_haiku.txt /*haiku-dragndrop* +haiku-fonts os_haiku.txt /*haiku-fonts* +haiku-general os_haiku.txt /*haiku-general* +haiku-gui os_haiku.txt /*haiku-gui* +haiku-launch os_haiku.txt /*haiku-launch* +haiku-meta os_haiku.txt /*haiku-meta* +haiku-mouse os_haiku.txt /*haiku-mouse* +haiku-support-credits os_haiku.txt /*haiku-support-credits* +haiku-toolbar-images os_haiku.txt /*haiku-toolbar-images* +haiku-user-settings-dir os_haiku.txt /*haiku-user-settings-dir* +haiku-vimdir os_haiku.txt /*haiku-vimdir* hangul hangulin.txt /*hangul* hangulin.txt hangulin.txt /*hangulin.txt* has() eval.txt /*has()* @@ -8211,6 +8226,7 @@ os_390.txt os_390.txt /*os_390.txt* os_amiga.txt os_amiga.txt /*os_amiga.txt* os_beos.txt os_beos.txt /*os_beos.txt* os_dos.txt os_dos.txt /*os_dos.txt* +os_haiku.txt os_haiku.txt /*os_haiku.txt* os_mac.txt os_mac.txt /*os_mac.txt* os_mint.txt os_mint.txt /*os_mint.txt* os_msdos.txt os_msdos.txt /*os_msdos.txt* diff --git a/runtime/gvimrc_example.vim b/runtime/gvimrc_example.vim index cc3e791e87..083dacee90 100644 --- a/runtime/gvimrc_example.vim +++ b/runtime/gvimrc_example.vim @@ -6,10 +6,11 @@ " Last change: 2016 Apr 05 " " To use it, copy it to -" for Unix: ~/.gvimrc -" for Amiga: s:.gvimrc -" for MS-DOS and Win32: $VIM\_gvimrc -" for OpenVMS: sys$login:.gvimrc +" for Unix: ~/.gvimrc +" for Amiga: s:.gvimrc +" for MS-Windows: $VIM\_gvimrc +" for Haiku: ~/config/settings/vim/gvimrc +" for OpenVMS: sys$login:.gvimrc " Make external commands work through a pipe instead of a pseudo-tty "set noguipty diff --git a/runtime/vimrc_example.vim b/runtime/vimrc_example.vim index 3017a6cf93..e11e4cff55 100644 --- a/runtime/vimrc_example.vim +++ b/runtime/vimrc_example.vim @@ -7,6 +7,7 @@ " for Unix: ~/.vimrc " for Amiga: s:.vimrc " for MS-Windows: $VIM\_vimrc +" for Haiku: ~/config/settings/vim/vimrc " for OpenVMS: sys$login:.vimrc " When started as "evim", evim.vim will already have done these settings, bail diff --git a/src/INSTALL b/src/INSTALL index 3da9141d22..a404833c8d 100644 --- a/src/INSTALL +++ b/src/INSTALL @@ -16,7 +16,7 @@ See INSTALLvms.txt for VMS See INSTALLx.txt for cross-compiling on Unix See ../READMEdir/README_390.txt for z/OS and OS/390 Unix See ../runtime/doc/os_beos.txt for BeBox - +See ../runtime/doc/os_haiku.txt for Haiku 1. Generic ========== diff --git a/src/Makefile b/src/Makefile index e284530164..d66b270483 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1385,6 +1385,20 @@ CARBONGUI_BUNDLE = gui_bundle APPDIR = $(VIMNAME).app CARBONGUI_TESTARG = VIMPROG=../$(APPDIR)/Contents/MacOS/$(VIMTARGET) +### Haiku GUI +HAIKUGUI_SRC = gui.c gui_haiku.cc +HAIKUGUI_OBJ = objects/gui.o objects/gui_haiku.o +HAIKUGUI_DEFS = -DFEAT_GUI_HAIKU +HAIKUGUI_IPATH = +HAIKUGUI_LIBS_DIR = +HAIKUGUI_LIBS1 = -lbe -lroot -ltracker -ltranslation -lsupc++ -lstdc++ +HAIKUGUI_LIBS2 = +HAIKUGUI_INSTALL = install_normal install_haiku_extra +HAIKUGUI_TARGETS = installglinks_haiku +HAIKUGUI_MAN_TARGETS = +HAIKUGUI_TESTTARGET = gui +HAIKUGUI_BUNDLE = + # All GUI files ALL_GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_motif.c gui_xmdlg.c gui_xmebw.c gui_athena.c gui_gtk_x11.c gui_x11.c gui_at_sb.c gui_at_fs.c ALL_GUI_PRO = gui.pro gui_gtk.pro gui_motif.pro gui_xmdlg.pro gui_athena.pro gui_gtk_x11.pro gui_x11.pro gui_w32.pro gui_photon.pro @@ -3217,6 +3231,9 @@ objects/gui_gtk_gresources.o: auto/gui_gtk_gresources.c objects/gui_gtk_x11.o: gui_gtk_x11.c $(CCC) -o $@ gui_gtk_x11.c +objects/gui_haiku.o: gui_haiku.cc + $(CCC) -o $@ gui_haiku.cc + objects/gui_motif.o: gui_motif.c $(CCC) -o $@ gui_motif.c @@ -3349,6 +3366,9 @@ objects/os_beos.o: os_beos.c objects/os_qnx.o: os_qnx.c $(CCC) -o $@ os_qnx.c +objects/os_haiku.rsrc: os_haiku.rdef + cat $< | $(CCC) -E - | grep -v '^#' | rc -o "$@" - + objects/os_macosx.o: os_macosx.m $(CCC) -o $@ os_macosx.m @@ -3617,6 +3637,61 @@ $(APPDIR)/Contents: objects/gui_gtk_x11.o: version.h ############################################################################### +# +# Haiku installation +# +# This rule: +# - add resources to already installed vim binary to avoid +# stripping them during install; +# - copy rgb.txt to runtime directory; +# - update system MIME database with info about vim application. +# +install_haiku_extra: $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc + xres -o $(DEST_BIN)/$(VIMTARGET) objects/os_haiku.rsrc + $(INSTALL_DATA) $(SCRIPTSOURCE)/rgb.txt $(DEST_RT) + mimeset $(DEST_BIN)/$(VIMTARGET) + +# List of g*-links that should be replaced with shell script equivalents. +# This solves the problem of them from Tracker. +# +HAIKU_GLINKS = $(DEST_BIN)/$(GVIMTARGET) \ + $(DEST_BIN)/$(GVIEWTARGET) \ + $(DEST_BIN)/$(GVIMDIFFTARGET) \ + $(DEST_BIN)/$(RGVIMTARGET) \ + $(DEST_BIN)/$(RGVIEWTARGET) + +# This rule: +# - Replace gvim link with copy of vim binary. +# - Replace g*-links with shell script equivalents to solve the +# problem of calling them from Tracker, +# - Add icon resources to mentioned g*-link shell scripts +# - in case gui-less vim.con executable available use it. +# +installglinks_haiku: $(HAIKU_GLINKS) install_haiku_extra + @catattr -r "BEOS:ICON" $(DEST_BIN)/$(GVIMTARGET) > ~icon.attr + for i in $(HAIKU_GLINKS); do \ + rm $$i ; \ + echo "#!/bin/sh" > $$i ; \ + case $$i in \ + $(DEST_BIN)/$(GVIMTARGET)) \ + cp $(DEST_BIN)/$(VIMTARGET) $$i ; \ + if [ -f $(VIMTARGET).con ] ; then \ + $(STRIP) $(VIMTARGET).con ; \ + mv $(VIMTARGET).con $(DEST_BIN)/$(VIMTARGET) ; \ + fi ;; \ + $(DEST_BIN)/$(GVIEWTARGET)) printf "%s -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + $(DEST_BIN)/$(GVIMDIFFTARGET)) printf "%s -d %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + $(DEST_BIN)/$(RGVIMTARGET)) printf "%s -Z %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + $(DEST_BIN)/$(RGVIEWTARGET)) printf "%s -Z -R %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + *) printf "%s %c%c" $(GVIMTARGET) '$$' '*' >> $$i;; \ + esac ; \ + chmod $(BINMOD) $$i ; \ + addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $$i ; \ + done + addattr -f ~icon.attr -t \'VICN\' BEOS:ICON $(DEST_BIN)/$(VIMNAME)tutor + @rm ~icon.attr + +############################################################################### ### (automatically generated by 'make depend') ### Dependencies: objects/arabic.o: arabic.c vim.h protodef.h auto/config.h feature.h os_unix.h \ diff --git a/src/auto/configure b/src/auto/configure index ff2739c86f..0a140eed8b 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -1501,7 +1501,7 @@ Optional Features: --disable-farsi Deprecated. --enable-xim Include XIM input support. --enable-fontset Include X fontset output support. - --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon + --enable-gui=OPTS X11 GUI. default=auto OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/haiku/photon/carbon --enable-gtk2-check If auto-select GUI, check for GTK+ 2 default=yes --enable-gnome-check If GTK GUI, check for GNOME default=no --enable-gtk3-check If auto-select GUI, check for GTK+ 3 default=yes @@ -4543,6 +4543,15 @@ $as_echo "yes" >&6; };; $as_echo "no" >&6; };; esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Haiku" >&5 +$as_echo_n "checking for Haiku... " >&6; } +case `uname` in + Haiku) HAIKU=yes; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; };; + *) HAIKU=no; { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; };; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for QNX" >&5 $as_echo_n "checking for QNX... " >&6; } case `uname` in @@ -7714,7 +7723,55 @@ $as_echo "yes" >&6; } fi if test "$enable_channel" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 + + if test "x$HAIKU" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5 +$as_echo_n "checking for socket in -lnetwork... " >&6; } +if ${ac_cv_lib_network_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnetwork $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_network_socket=yes +else + ac_cv_lib_network_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 +$as_echo "$ac_cv_lib_network_socket" >&6; } +if test "x$ac_cv_lib_network_socket" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBNETWORK 1 +_ACEOF + + LIBS="-lnetwork $LIBS" + +fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 @@ -7759,6 +7816,8 @@ _ACEOF fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : @@ -9034,7 +9093,7 @@ if test "x$with_x" = xno -a "x$with_x_arg" = xyes; then as_fn_error $? "could not configure X" "$LINENO" 5 fi -test "x$with_x" = xno -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no +test "x$with_x" = xno -a "x$HAIKU" != "xyes" -a "x$MACOS_X" != "xyes" -a "x$QNX" != "xyes" && enable_gui=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-gui argument" >&5 $as_echo_n "checking --enable-gui argument... " >&6; } @@ -9056,10 +9115,27 @@ SKIP_MOTIF=YES SKIP_ATHENA=YES SKIP_NEXTAW=YES SKIP_PHOTON=YES +SKIP_HAIKU=YES SKIP_CARBON=YES GUITYPE=NONE -if test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then +if test "x$HAIKU" = "xyes"; then + SKIP_HAIKU= + case "$enable_gui_canon" in + no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no GUI support" >&5 +$as_echo "no GUI support" >&6; } + SKIP_HAIKU=YES ;; + yes|"") { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes - automatic GUI support" >&5 +$as_echo "yes - automatic GUI support" >&6; } ;; + auto) { $as_echo "$as_me:${as_lineno-$LINENO}: result: auto - automatic GUI support" >&5 +$as_echo "auto - automatic GUI support" >&6; } ;; + haiku) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Haiku GUI support" >&5 +$as_echo "Haiku GUI support" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sorry, $enable_gui GUI is not supported" >&5 +$as_echo "Sorry, $enable_gui GUI is not supported" >&6; } + SKIP_HAIKU=YES ;; + esac +elif test "x$QNX" = "xyes" -a "x |