#!/bin/sh -e

patch -p1 < posix-ptys.patch

./configure                \
   --prefix=/usr           \
   --mandir=/usr/share/man \
   --with-x                \
   --enable-doublechars    \
   --enable-widechars      \
   --enable-freetype       \
   --enable-ansi-color     \
   --enable-88-color       \
   --enable-256-color      \
   --disable-exec-xterm    \
   --enable-sixel-graphics \
   --enable-regis-graphics \
   --with-neXtaw           \
   --disable-desktop       \
   --disable-openpty       \
   --disable-setuid        \
   --disable-setgid        \
   --disable-active-icon   \
   --disable-sun-keys      \
   --disable-fifo-lines    \
   --disable-i18n          \
   --disable-initial-erase \
   --enable-readline-mouse \
   --disable-rightbar      \
   --disable-session-mgt   \
   --disable-tek4014       \
   --disable-vt52          \
   --enable-luit           \
   --disable-screen-dumps  \
   --disable-ziconbeep

make
make DESTDIR="$1" install
