diff src/configure.ac @ 19526:22f0dda71638 v8.2.0320

patch 8.2.0320: no Haiku support Commit: https://github.com/vim/vim/commit/b3f740695a0199d22cd97aee314f06c7ae32d2ea Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 26 16:16:53 2020 +0100 patch 8.2.0320: no Haiku support Problem: No Haiku support. Solution: Add support for Haiku. (Emir Sari, closes https://github.com/vim/vim/issues/5605)
author Bram Moolenaar <Bram@vim.org>
date Wed, 26 Feb 2020 16:30:04 +0100
parents 224fb493b72c
children e373843e2980
line wrap: on
line diff
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -154,6 +154,12 @@ case `uname` in
     *)		BEOS=no; AC_MSG_RESULT(no);;
 esac
 
+AC_MSG_CHECKING(for Haiku)
+case `uname` in
+    Haiku) HAIKU=yes; AC_MSG_RESULT(yes);;
+    *)     HAIKU=no; AC_MSG_RESULT(no);;
+esac
+
 dnl If QNX is found, assume we don't want to use Xphoton
 dnl unless it was specifically asked for (--with-x)
 AC_MSG_CHECKING(for QNX)
@@ -2033,7 +2039,13 @@ fi
 
 if test "$enable_channel" = "yes"; then
   dnl On Solaris we need the socket and nsl library.
-  AC_CHECK_LIB(socket, socket)
+
+  if test "x$HAIKU" = "xyes"; then
+	AC_CHECK_LIB(network, socket)
+  else
+	AC_CHECK_LIB(socket, socket)
+  fi
+
   AC_CHECK_LIB(nsl, gethostbyname)
   AC_MSG_CHECKING(whether compiling with process communication is possible)
   AC_TRY_LINK([
@@ -2311,11 +2323,11 @@ if test "x$with_x" = xno -a "x$with_x_ar
     AC_MSG_ERROR([could not configure X])
 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
 
 AC_MSG_CHECKING(--enable-gui argument)
 AC_ARG_ENABLE(gui,
- [  --enable-gui[=OPTS]       X11 GUI. [default=auto] [OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/photon/carbon]], , enable_gui="auto")
+ [  --enable-gui[=OPTS]       X11 GUI. [default=auto] [OPTS=auto/no/gtk2/gnome2/gtk3/motif/athena/neXtaw/haiku/photon/carbon]], , enable_gui="auto")
 
 dnl Canonicalize the --enable-gui= argument so that it can be easily compared.
 dnl Do not use character classes for portability with old tools.
@@ -2330,10 +2342,22 @@ 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)     AC_MSG_RESULT(no GUI support)
+            SKIP_HAIKU=YES ;;
+    yes|"") AC_MSG_RESULT(yes - automatic GUI support) ;;
+    auto)   AC_MSG_RESULT(auto - automatic GUI support) ;;
+    haiku)  AC_MSG_RESULT(Haiku GUI support) ;;
+    *)      AC_MSG_RESULT([Sorry, $enable_gui GUI is not supported])
+            SKIP_HAIKU=YES ;;
+    esac
+elif test "x$QNX" = "xyes" -a "x$with_x" = "xno" ; then
   SKIP_PHOTON=
   case "$enable_gui_canon" in
     no)		AC_MSG_RESULT(no GUI support)
@@ -2499,6 +2523,7 @@ if test "x$MACOS_X" = "xyes" -a -z "$SKI
   SKIP_ATHENA=YES;
   SKIP_NEXTAW=YES;
   SKIP_PHOTON=YES;
+  SKIP_HAIKU=YES;
   SKIP_CARBON=YES
 fi
 
@@ -3112,6 +3137,11 @@ if test "x$GUITYPE:$enable_fontset" = "x
   enable_fontset="no"
 fi
 
+dnl There is no test for the Haiku GUI, if it's selected it's used
+if test -z "$SKIP_HAIKU"; then
+  GUITYPE=HAIKUGUI
+fi
+
 if test -z "$SKIP_PHOTON"; then
   GUITYPE=PHOTONGUI
 fi