Configure GNOME Terminal as feature

This commit is contained in:
Alex Kotov 2021-11-17 03:41:34 +05:00
parent 488bbf13be
commit 7068f76ebc
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
4 changed files with 31 additions and 12 deletions

View file

@ -3,6 +3,10 @@ PKGCONFIG = pkg-config
PKGS += fontconfig freetype2 x11 x11-xcb xcb xcb-res xft
.if "$(ENABLE_GNOME_TERMINAL)" == 'yes'
CPPFLAGS += -DENABLE_GNOME_TERMINAL
.endif
.if "$(ENABLE_XINERAMA)" == 'yes'
CPPFLAGS += -DENABLE_XINERAMA
PKGS += xinerama

View file

@ -3,6 +3,10 @@ PKGCONFIG = pkg-config
PKGS += fontconfig freetype2 x11 x11-xcb xcb xcb-res xft
ifeq (yes,$(ENABLE_GNOME_TERMINAL))
CPPFLAGS += -DENABLE_GNOME_TERMINAL
endif
ifeq (yes,$(ENABLE_XINERAMA))
CPPFLAGS += -DENABLE_XINERAMA
PKGS += xinerama

31
configure vendored
View file

@ -32,6 +32,7 @@ File tuning of the installation directories:
--mandir DIR man documentation [DATAROOTDIR/man]
Optional Features:
--enable-gnome-terminal use GNOME Terminal instead of ptterm
--disable-xinerama disable Xinerama
HELP
}
@ -41,6 +42,7 @@ eprefix=''
bindir=''
datarootdir=''
mandir=''
enable_gnome_terminal='no'
enable_xinerama='yes'
while [ $# -gt 0 ]; do
@ -69,6 +71,9 @@ while [ $# -gt 0 ]; do
shift
mandir="$1"
;;
--enable-gnome-terminal)
enable_gnome_terminal='yes'
;;
--disable-xinerama)
enable_xinerama='no'
;;
@ -97,24 +102,26 @@ if [ "$mandir" = '' ]; then
mandir="$datarootdir/man"
fi
echo "PREFIX = $prefix"
echo "EPREFIX = $eprefix"
echo "BINDIR = $bindir"
echo "DATAROOTDIR = $datarootdir"
echo "MANDIR = $mandir"
echo "ENABLE_XINERAMA = $enable_xinerama"
echo "PREFIX = $prefix"
echo "EPREFIX = $eprefix"
echo "BINDIR = $bindir"
echo "DATAROOTDIR = $datarootdir"
echo "MANDIR = $mandir"
echo "ENABLE_GNOME_TERMINAL = $enable_gnome_terminal"
echo "ENABLE_XINERAMA = $enable_xinerama"
touch 'config/1-custom.mk'
touch 'config/3-custom.mk'
touch 'config/5-custom.mk'
cat > 'config/2-generated.mk' << MAKE
PREFIX = $prefix
EPREFIX = $eprefix
BINDIR = $bindir
DATAROOTDIR = $datarootdir
MANDIR = $mandir
ENABLE_XINERAMA = $enable_xinerama
PREFIX = $prefix
EPREFIX = $eprefix
BINDIR = $bindir
DATAROOTDIR = $datarootdir
MANDIR = $mandir
ENABLE_GNOME_TERMINAL = $enable_gnome_terminal
ENABLE_XINERAMA = $enable_xinerama
MAKE
make_help_result="$(make --help)"

View file

@ -35,7 +35,11 @@ static struct Command commands[] = {
{
.name = "term",
.monitor_arg_index = 0,
#ifdef ENABLE_GNOME_TERMINAL
.args = { "gnome-terminal", "--wait", NULL },
#else
.args = { "ptterm", NULL },
#endif
},
{
.name = "firefox",