A versatile graphical DSL and army knife to make and modify GUIs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

284 lines
9.6 KiB

########################################################################
# Copyright (C) 2022 Francesco Palumbo <phranz@subfc.net>, Naples (Italy)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
########################################################################
AC_INIT([guish], 1.0.7, [phranz@subfc.net])
AM_INIT_AUTOMAKE([foreign])
AC_PREREQ(2.69)
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_FILES([Makefile])
AC_PROG_CXX
AC_PROG_CC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
AC_CHECK_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_FUNC_ERROR_AT_LINE
AC_FUNC_STRTOD
AC_CHECK_FUNCS([memset select strtol strtoull])
CFLAGS=
CXXFLAGS=
CPPFLAGS="-O2 -std=gnu++11 -Wall -Wextra -D_REENTRANT -fPIC"
LIBS="-L/usr/X11R6/lib -lX11"
AC_ARG_ENABLE([debug],
[AS_HELP_STRING(
[--enable-debug],
[build with debugging capabilities @<:@default=no@:>@])],
[enable_debug=yes])
AS_IF([test "x$enable_debug" = "xyes"], [
CPPFLAGS="-g $CPPFLAGS"
AC_DEFINE([DEBUG], 1, [enables debug code])
])
AM_CONDITIONAL([DEBUG], [test "x$enable_debug" != "xno"])
AC_ARG_WITH([qt],
[AS_HELP_STRING(
[--with-qt],
[use Qt5 as backend @<:@default=yes@:>@])],
[],
[with_qt=yes])
AS_IF([test "x$with_qt" != "xno"], [
PKG_CHECK_MODULES(QT, [Qt5Core, Qt5Gui, Qt5Widgets],
[], [AC_MSG_ERROR([Qt libraries are required.])])
AC_CHECK_PROGS(MOC, [moc-qt5 moc])
AC_DEFINE([QT_BACKEND], 1, [use qt implementation for elements])
CPPFLAGS="`$PKG_CONFIG --cflags Qt5Core Qt5Gui Qt5Widgets` $CPPFLAGS"
MOCFLAGS="`$PKG_CONFIG --cflags-only-I Qt5Core Qt5Gui Qt5Widgets`"
LIBS="$LIBS `$PKG_CONFIG --libs Qt5Core Qt5Gui Qt5Widgets`"
])
AM_CONDITIONAL([QT_BACKEND], [test x${with_qt} = xyes])
AC_ARG_ENABLE([webkit],
[AS_HELP_STRING(
[--enable-webkit],
[build webview element @<:@default=no@:>@])],
[enable_webkit=yes],
[enable_webkit=no])
AM_CONDITIONAL([ENABLE_WEBKIT], [test "x$enable_webkit" != "xno"])
AS_IF([test "x$enable_webkit" != "xno"], [
PKG_CHECK_MODULES(QT, [Qt5WebKitWidgets],
[], [AC_MSG_ERROR([QtWebkit libraries are required.])])
CPPFLAGS="`$PKG_CONFIG --cflags Qt5WebKitWidgets` $CPPFLAGS"
MOCFLAGS="`$PKG_CONFIG --cflags-only-I Qt5WebKitWidgets` $MOCFLAGS"
LIBS="$LIBS `$PKG_CONFIG --libs Qt5WebKitWidgets`"
AC_DEFINE([ENABLE_WEBKIT], 1, [builds webview element])
])
AC_ARG_ENABLE([button],
[AS_HELP_STRING(
[--enable-button],
[build button element @<:@default=yes@:>@])],
[],
[enable_button=yes])
AS_IF([test "x$enable_button" != "xno"], [
AC_DEFINE([ENABLE_BUTTON], 1, [build button element])
])
AM_CONDITIONAL([ENABLE_BUTTON], [test "x$enable_button" != "xno"])
AC_ARG_ENABLE([input],
[AS_HELP_STRING(
[--enable-input],
[build input element @<:@default=yes@:>@])],
[],
[enable_input=yes])
AS_IF([test "x$input_button" != "xno"], [
AC_DEFINE([ENABLE_INPUT], 1, [build input element])
])
AM_CONDITIONAL([ENABLE_INPUT], [test "x$enable_input" != "xno"])
AC_ARG_ENABLE([label],
[AS_HELP_STRING(
[--enable-label],
[build label element @<:@default=yes@:>@])],
[],
[enable_label=yes])
AS_IF([test "x$enable_label" != "xno"], [
AC_DEFINE([ENABLE_LABEL], 1, [build label element])
])
AM_CONDITIONAL([ENABLE_LABEL], [test "x$enable_label" != "xno"])
AC_ARG_ENABLE([textblock],
[AS_HELP_STRING(
[--enable-textblock],
[build textblock element @<:@default=yes@:>@])],
[],
[enable_textblock=yes])
AS_IF([test "x$enable_textblock" != "xno"], [
AC_DEFINE([ENABLE_TEXTBLOCK], 1, [build textblock element])
])
AM_CONDITIONAL([ENABLE_TEXTBLOCK], [test "x$enable_textblock" != "xno"])
AC_ARG_ENABLE([editor],
[AS_HELP_STRING(
[--enable-editor],
[build editor element @<:@default=no@:>@])],
[enable_editor=yes],
[enable_editor=no])
AS_IF([test "x$enable_editor" != "xno"], [
AC_DEFINE([ENABLE_EDITOR], 1, [build editor element])
])
AM_CONDITIONAL([ENABLE_EDITOR], [test "x$enable_editor" != "xno"])
AC_ARG_ENABLE([page],
[AS_HELP_STRING(
[--enable-page],
[build page element @<:@default=yes@:>@])],
[],
[enable_page=yes])
AS_IF([test "x$enable_page" != "xno"], [
AC_DEFINE([ENABLE_PAGE], 1, [build page element])
])
AM_CONDITIONAL([ENABLE_PAGE], [test "x$enable_page" != "xno"])
AC_ARG_ENABLE([menu],
[AS_HELP_STRING(
[--enable-menu],
[build menu element @<:@default=yes@:>@])],
[],
[enable_menu=yes])
AS_IF([test "x$enable_menu" != "xno"], [
AC_DEFINE([ENABLE_MENU], 1, [build menu element])
])
AM_CONDITIONAL([ENABLE_MENU], [test "x$enable_menu" != "xno"])
AC_ARG_ENABLE([tabpage],
[AS_HELP_STRING(
[--enable-tabpage],
[build tabpage element @<:@default=yes@:>@])],
[],
[enable_tabpage=yes])
AS_IF([test "x$enable_tabpage" != "xno"], [
AC_DEFINE([ENABLE_TABPAGE], 1, [build tabpage element])
])
AM_CONDITIONAL([ENABLE_TABPAGE], [test "x$enable_tabpage" != "xno"])
AC_ARG_ENABLE([slider],
[AS_HELP_STRING(
[--enable-slider],
[build slider element @<:@default=yes@:>@])],
[],
[enable_slider=yes])
AS_IF([test "x$enable_slider" != "xno"], [
AC_DEFINE([ENABLE_SLIDER], 1, [build slider element])
])
AM_CONDITIONAL([ENABLE_SLIDER], [test "x$enable_slider" != "xno"])
AC_ARG_ENABLE([splitter],
[AS_HELP_STRING(
[--enable-splitter],
[build splitter element @<:@default=yes@:>@])],
[],
[enable_splitter=yes])
AS_IF([test "x$enable_splitter" != "xno"], [
AC_DEFINE([ENABLE_SPLITTER], 1, [build splitter element])
])
AM_CONDITIONAL([ENABLE_SPLITTER], [test "x$enable_splitter" != "xno"])
AC_ARG_ENABLE([progress],
[AS_HELP_STRING(
[--enable-progress],
[build progress element @<:@default=yes@:>@])],
[],
[enable_progress=yes])
AS_IF([test "x$enable_progress" != "xno"], [
AC_DEFINE([ENABLE_PROGRESS], 1, [build progress element])
])
AM_CONDITIONAL([ENABLE_PROGRESS], [test "x$enable_progress" != "xno"])
AC_ARG_ENABLE([tree],
[AS_HELP_STRING(
[--enable-tree],
[build tree element @<:@default=yes@:>@])],
[],
[enable_tree=yes])
AS_IF([test "x$enable_tree" != "xno"], [
AC_DEFINE([ENABLE_TREE], 1, [build tree element])
])
AM_CONDITIONAL([ENABLE_TREE], [test "x$enable_tree" != "xno"])
AC_ARG_ENABLE([trayicon],
[AS_HELP_STRING(
[--enable-trayicon],
[build trayicon element @<:@default=yes@:>@])],
[],
[enable_trayicon=yes])
AS_IF([test "x$enable_trayicon" != "xno"], [
AC_DEFINE([ENABLE_TRAYICON], 1, [build trayicon element])
])
AM_CONDITIONAL([ENABLE_TRAYICON], [test "x$enable_trayicon" != "xno"])
AC_ARG_ENABLE([menubar],
[AS_HELP_STRING(
[--enable-menubar],
[build menubar element @<:@default=yes@:>@])],
[],
[enable_menubar=yes])
AS_IF([test "x$enable_menubar" != "xno"], [
AC_DEFINE([ENABLE_MENUBAR], 1, [build menubar element])
])
AM_CONDITIONAL([ENABLE_MENUBAR], [test "x$enable_menubar" != "xno"])
AC_ARG_ENABLE([checkbox],
[AS_HELP_STRING(
[--enable-checkbox],
[build checkbox element @<:@default=yes@:>@])],
[],
[enable_checkbox=yes])
AS_IF([test "x$enable_checkbox" != "xno"], [
AC_DEFINE([ENABLE_CHECKBOX], 1, [build checkbox element])
])
AM_CONDITIONAL([ENABLE_CHECKBOX], [test "x$enable_checkbox" != "xno"])
AC_ARG_ENABLE([icon],
[AS_HELP_STRING(
[--enable-icon],
[build icon element @<:@default=yes@:>@])],
[],
[enable_icon=yes])
AS_IF([test "x$enable_icon" != "xno"], [
AC_DEFINE([ENABLE_ICON], 1, [build icon element])
])
AM_CONDITIONAL([ENABLE_ICON], [test "x$enable_icon" != "xno"])
AC_ARG_ENABLE([spinbox],
[AS_HELP_STRING(
[--enable-spinbox],
[build spinbox element @<:@default=yes@:>@])],
[],
[enable_spinbox=yes])
AS_IF([test "x$enable_spinbox" != "xno"], [
AC_DEFINE([ENABLE_SPINBOX], 1, [build spinbox element])
])
AM_CONDITIONAL([ENABLE_SPINBOX], [test "x$enable_spinbox" != "xno"])
AC_ARG_ENABLE([listbox],
[AS_HELP_STRING(
[--enable-listbox],
[build listbox element @<:@default=yes@:>@])],
[],
[enable_listbox=yes])
AS_IF([test "x$enable_listbox" != "xno"], [
AC_DEFINE([ENABLE_LISTBOX], 1, [build listbox element])
])
AM_CONDITIONAL([ENABLE_LISTBOX], [test "x$enable_listbox" != "xno"])
AC_ARG_ENABLE([grip],
[AS_HELP_STRING(
[--enable-grip],
[build grip element @<:@default=yes@:>@])],
[],
[enable_grip=yes])
AS_IF([test "x$enable_grip" != "xno"], [
AC_DEFINE([ENABLE_GRIP], 1, [build grip element])
])
AM_CONDITIONAL([ENABLE_GRIP], [test "x$enable_grip" != "xno"])
AC_ARG_ENABLE([embedded-control],
[AS_HELP_STRING(
[--enable-embedded-control],
[enables page element to control external program with virtual keypresses @<:@default=yes@:>@])],
[],
[enable_control_embedded=yes])
AS_IF([test "x$enable_control_embedded" != "xno"], [
AC_DEFINE([CONTROL_EMBEDDED], 1, [enables page element to control external program with virtual keypresses])
LIBS="$LIBS -lXtst"
])
AM_CONDITIONAL([CONTROLEMBEDDED], [test "x$enable_control_embedded" != "xno"])
AC_OUTPUT