qulogic/libgnt

Convert to meson build system.
release-2.x.y
2018-11-22, Elliott Sales de Andrade
d132912d7cde
Parents 59760c779e5e
Children 630a11523889
Convert to meson build system.

Essentially backported from default, but with some version changes to
match what's in this branch.
  • +0 -229
    INSTALL
  • +0 -99
    Makefile.am
  • +0 -48
    autogen.sh
  • +0 -360
    configure.ac
  • +0 -14
    gnt.pc.in
  • +236 -0
    meson.build
  • +0 -16
    test/Makefile
  • +13 -0
    test/meson.build
  • +0 -40
    wms/Makefile.am
  • +14 -0
    wms/meson.build
  • --- a/INSTALL Thu Nov 22 01:12:15 2018 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,229 +0,0 @@
    -Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
    -Foundation, Inc.
    -
    - This file is free documentation; the Free Software Foundation gives
    -unlimited permission to copy, distribute and modify it.
    -
    -Basic Installation
    -==================
    -
    - These are generic installation instructions.
    -
    - The `configure' shell script attempts to guess correct values for
    -various system-dependent variables used during compilation. It uses
    -those values to create a `Makefile' in each directory of the package.
    -It may also create one or more `.h' files containing system-dependent
    -definitions. Finally, it creates a shell script `config.status' that
    -you can run in the future to recreate the current configuration, and a
    -file `config.log' containing compiler output (useful mainly for
    -debugging `configure').
    -
    - It can also use an optional file (typically called `config.cache'
    -and enabled with `--cache-file=config.cache' or simply `-C') that saves
    -the results of its tests to speed up reconfiguring. (Caching is
    -disabled by default to prevent problems with accidental use of stale
    -cache files.)
    -
    - If you need to do unusual things to compile the package, please try
    -to figure out how `configure' could check whether to do them, and mail
    -diffs or instructions to the address given in the `README' so they can
    -be considered for the next release. If you are using the cache, and at
    -some point `config.cache' contains results you don't want to keep, you
    -may remove or edit it.
    -
    - The file `configure.ac' (or `configure.in') is used to create
    -`configure' by a program called `autoconf'. You only need
    -`configure.ac' if you want to change it or regenerate `configure' using
    -a newer version of `autoconf'.
    -
    -The simplest way to compile this package is:
    -
    - 1. `cd' to the directory containing the package's source code and type
    - `./configure' to configure the package for your system. If you're
    - using `csh' on an old version of System V, you might need to type
    - `sh ./configure' instead to prevent `csh' from trying to execute
    - `configure' itself.
    -
    - Running `configure' takes awhile. While running, it prints some
    - messages telling which features it is checking for.
    -
    - 2. Type `make' to compile the package.
    -
    - 3. Optionally, type `make check' to run any self-tests that come with
    - the package.
    -
    - 4. Type `make install' to install the programs and any data files and
    - documentation.
    -
    - 5. You can remove the program binaries and object files from the
    - source code directory by typing `make clean'. To also remove the
    - files that `configure' created (so you can compile the package for
    - a different kind of computer), type `make distclean'. There is
    - also a `make maintainer-clean' target, but that is intended mainly
    - for the package's developers. If you use it, you may have to get
    - all sorts of other programs in order to regenerate files that came
    - with the distribution.
    -
    -Compilers and Options
    -=====================
    -
    - Some systems require unusual options for compilation or linking that
    -the `configure' script does not know about. Run `./configure --help'
    -for details on some of the pertinent environment variables.
    -
    - You can give `configure' initial values for configuration parameters
    -by setting variables in the command line or in the environment. Here
    -is an example:
    -
    - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
    -
    - *Note Defining Variables::, for more details.
    -
    -Compiling For Multiple Architectures
    -====================================
    -
    - You can compile the package for more than one kind of computer at the
    -same time, by placing the object files for each architecture in their
    -own directory. To do this, you must use a version of `make' that
    -supports the `VPATH' variable, such as GNU `make'. `cd' to the
    -directory where you want the object files and executables to go and run
    -the `configure' script. `configure' automatically checks for the
    -source code in the directory that `configure' is in and in `..'.
    -
    - If you have to use a `make' that does not support the `VPATH'
    -variable, you have to compile the package for one architecture at a
    -time in the source code directory. After you have installed the
    -package for one architecture, use `make distclean' before reconfiguring
    -for another architecture.
    -
    -Installation Names
    -==================
    -
    - By default, `make install' will install the package's files in
    -`/usr/local/bin', `/usr/local/man', etc. You can specify an
    -installation prefix other than `/usr/local' by giving `configure' the
    -option `--prefix=PATH'.
    -
    - You can specify separate installation prefixes for
    -architecture-specific files and architecture-independent files. If you
    -give `configure' the option `--exec-prefix=PATH', the package will use
    -PATH as the prefix for installing programs and libraries.
    -Documentation and other data files will still use the regular prefix.
    -
    - In addition, if you use an unusual directory layout you can give
    -options like `--bindir=PATH' to specify different values for particular
    -kinds of files. Run `configure --help' for a list of the directories
    -you can set and what kinds of files go in them.
    -
    - If the package supports it, you can cause programs to be installed
    -with an extra prefix or suffix on their names by giving `configure' the
    -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
    -
    -Optional Features
    -=================
    -
    - Some packages pay attention to `--enable-FEATURE' options to
    -`configure', where FEATURE indicates an optional part of the package.
    -They may also pay attention to `--with-PACKAGE' options, where PACKAGE
    -is something like `gnu-as' or `x' (for the X Window System). The
    -`README' should mention any `--enable-' and `--with-' options that the
    -package recognizes.
    -
    - For packages that use the X Window System, `configure' can usually
    -find the X include and library files automatically, but if it doesn't,
    -you can use the `configure' options `--x-includes=DIR' and
    -`--x-libraries=DIR' to specify their locations.
    -
    -Specifying the System Type
    -==========================
    -
    - There may be some features `configure' cannot figure out
    -automatically, but needs to determine by the type of machine the package
    -will run on. Usually, assuming the package is built to be run on the
    -_same_ architectures, `configure' can figure that out, but if it prints
    -a message saying it cannot guess the machine type, give it the
    -`--build=TYPE' option. TYPE can either be a short name for the system
    -type, such as `sun4', or a canonical name which has the form:
    -
    - CPU-COMPANY-SYSTEM
    -
    -where SYSTEM can have one of these forms:
    -
    - OS KERNEL-OS
    -
    - See the file `config.sub' for the possible values of each field. If
    -`config.sub' isn't included in this package, then this package doesn't
    -need to know the machine type.
    -
    - If you are _building_ compiler tools for cross-compiling, you should
    -use the `--target=TYPE' option to select the type of system they will
    -produce code for.
    -
    - If you want to _use_ a cross compiler, that generates code for a
    -platform different from the build platform, you should specify the
    -"host" platform (i.e., that on which the generated programs will
    -eventually be run) with `--host=TYPE'.
    -
    -Sharing Defaults
    -================
    -
    - If you want to set default values for `configure' scripts to share,
    -you can create a site shell script called `config.site' that gives
    -default values for variables like `CC', `cache_file', and `prefix'.
    -`configure' looks for `PREFIX/share/config.site' if it exists, then
    -`PREFIX/etc/config.site' if it exists. Or, you can set the
    -`CONFIG_SITE' environment variable to the location of the site script.
    -A warning: not all `configure' scripts look for a site script.
    -
    -Defining Variables
    -==================
    -
    - Variables not defined in a site shell script can be set in the
    -environment passed to `configure'. However, some packages may run
    -configure again during the build, and the customized values of these
    -variables may be lost. In order to avoid this problem, you should set
    -them in the `configure' command line, using `VAR=value'. For example:
    -
    - ./configure CC=/usr/local2/bin/gcc
    -
    -will cause the specified gcc to be used as the C compiler (unless it is
    -overridden in the site shell script).
    -
    -`configure' Invocation
    -======================
    -
    - `configure' recognizes the following options to control how it
    -operates.
    -
    -`--help'
    -`-h'
    - Print a summary of the options to `configure', and exit.
    -
    -`--version'
    -`-V'
    - Print the version of Autoconf used to generate the `configure'
    - script, and exit.
    -
    -`--cache-file=FILE'
    - Enable the cache: use and save the results of the tests in FILE,
    - traditionally `config.cache'. FILE defaults to `/dev/null' to
    - disable caching.
    -
    -`--config-cache'
    -`-C'
    - Alias for `--cache-file=config.cache'.
    -
    -`--quiet'
    -`--silent'
    -`-q'
    - Do not print messages saying which checks are being made. To
    - suppress all normal output, redirect it to `/dev/null' (any error
    - messages will still be shown).
    -
    -`--srcdir=DIR'
    - Look for the package's source code in directory DIR. Usually
    - `configure' can determine that directory automatically.
    -
    -`configure' also accepts some other, not widely useful, options. Run
    -`configure --help' for more details.
    -
    --- a/Makefile.am Thu Nov 22 01:12:15 2018 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,99 +0,0 @@
    -EXTRA_DIST=genmarshal
    -
    -SUBDIRS = . wms
    -pkgconfigdir = $(libdir)/pkgconfig
    -pkgconfig_DATA = gnt.pc
    -
    -lib_LTLIBRARIES = libgnt.la
    -
    -noinst_HEADERS = gntinternal.h
    -
    -BUILT_SOURCES = gntmarshal.h
    -
    -libgnt_la_SOURCES = \
    - gntmarshal.c \
    - gntwidget.c \
    - gntbindable.c \
    - gntbox.c \
    - gntbutton.c \
    - gntcheckbox.c \
    - gntclipboard.c \
    - gntcolors.c \
    - gntcombobox.c \
    - gntentry.c \
    - gntfilesel.c \
    - gntkeys.c \
    - gntlabel.c \
    - gntline.c \
    - gntmenu.c \
    - gntmenuitem.c \
    - gntmenuitemcheck.c \
    - gntprogressbar.c \
    - gntslider.c \
    - gntstyle.c \
    - gnttextview.c \
    - gnttree.c \
    - gntutils.c \
    - gntwindow.c \
    - gntwm.c \
    - gntws.c \
    - gntmain.c
    -
    -libgnt_la_headers = \
    - gntwidget.h \
    - gntbindable.h \
    - gntbox.h \
    - gntbutton.h \
    - gntcheckbox.h \
    - gntclipboard.h \
    - gntcolors.h \
    - gntcombobox.h \
    - gntentry.h \
    - gntfilesel.h \
    - gntkeys.h \
    - gntlabel.h \
    - gntline.h \
    - gntmarshal.h \
    - gntmenu.h \
    - gntmenuitem.h \
    - gntmenuitemcheck.h \
    - gntprogressbar.h \
    - gntslider.h \
    - gntstyle.h \
    - gnttextview.h \
    - gnttree.h \
    - gntutils.h \
    - gntwindow.h \
    - gntwm.h \
    - gntws.h \
    - gnt.h
    -
    -CLEANFILES = \
    - gntmarshal.h \
    - gntmarshal.c
    -
    -gntmarshal.c: $(srcdir)/genmarshal gntmarshal.h
    - echo "#include \"gntmarshal.h\"" > $@
    - glib-genmarshal --prefix=gnt_closure_marshal --body $(srcdir)/genmarshal >> $@
    -
    -gntmarshal.h: $(srcdir)/genmarshal
    - glib-genmarshal --prefix=gnt_closure_marshal --header $(srcdir)/genmarshal > $@
    -
    -libgnt_laincludedir=$(includedir)/gnt
    -libgnt_lainclude_HEADERS = \
    - $(libgnt_la_headers)
    -
    -libgnt_la_DEPENDENCIES =
    -libgnt_la_LDFLAGS = -export-dynamic -version-info $(GNT_LT_VERSION_INFO) -no-undefined
    -libgnt_la_LIBADD = \
    - $(GLIB_LIBS) \
    - $(GNT_LIBS) \
    - $(LIBXML_LIBS) \
    - $(PY_LIBS)
    -
    -AM_CPPFLAGS = \
    - $(GLIB_CFLAGS) \
    - $(GNT_CFLAGS) \
    - $(DEBUG_CFLAGS) \
    - $(LIBXML_CFLAGS) \
    - $(PY_CFLAGS)
    --- a/autogen.sh Thu Nov 22 01:12:15 2018 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,48 +0,0 @@
    -#!/bin/sh
    -
    -(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
    - echo;
    - echo "You must have libtool installed to compile LibGNT";
    - echo;
    - exit;
    -}
    -
    -(automake --version) < /dev/null > /dev/null 2>&1 || {
    - echo;
    - echo "You must have automake installed to compile LibGNT";
    - echo;
    - exit;
    -}
    -
    -(autoconf --version) < /dev/null > /dev/null 2>&1 || {
    - echo;
    - echo "You must have autoconf installed to compile LibGNT";
    - echo;
    - exit;
    -}
    -
    -echo "Generating configuration files for LibGNT, please wait...."
    -echo;
    -
    -echo "Running libtoolize, please ignore non-fatal messages...."
    -echo n | libtoolize --copy --force || exit;
    -
    -# Add other directories to this list if people continue to experience
    -# brokennesses ... Obviously the real answer is for them to fix it
    -# themselves, but for Luke's sake we have this.
    -for dir in "/usr/local/share/aclocal" \
    - "/opt/gnome-1.4/share/aclocal"
    -do
    - if test -d $dir ; then
    - ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I $dir"
    - fi
    -done
    -
    -libtoolize -c -f --automake
    -aclocal $ACLOCAL_FLAGS || exit;
    -autoheader || exit;
    -automake --add-missing --copy;
    -autoconf || exit;
    -automake || exit;
    -./configure $@
    -
    --- a/configure.ac Thu Nov 22 01:12:15 2018 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,360 +0,0 @@
    -dnl Process this file with autoconf to produce a configure script.
    -AC_PREREQ([2.50])
    -
    -# UPDATING VERSION NUMBERS FOR RELEASES
    -#
    -# gnt_micro_version += 1
    -#
    -# If any functions have been added to libgnt:
    -# gnt_micro_version = 0
    -# gnt_minor_version += 1
    -# gnt_lt_current += 1
    -#
    -# If backwards compatibility has been broken in libgnt:
    -# gnt_micro_version = 0
    -# gnt_minor_version = 0
    -# gnt_major_version += 1;
    -# gnt_lt_current += 1
    -#
    -# gnt_version_suffix should be similar to one of the following:
    -# For beta releases: [beta2]
    -# For code under development: [devel]
    -# For production releases: []
    -#
    -# Make sure to update ../../configure.ac with libgnt version changes.
    -#
    -
    -m4_define([gnt_lt_current], [8])
    -m4_define([gnt_major_version], [2])
    -m4_define([gnt_minor_version], [8])
    -m4_define([gnt_micro_version], [0])
    -m4_define([gnt_version_suffix], [devel])
    -m4_define([gnt_version],
    - [gnt_major_version.gnt_minor_version.gnt_micro_version])
    -m4_define([gnt_display_version], gnt_version[]m4_ifdef([gnt_version_suffix],[gnt_version_suffix]))
    -
    -AC_INIT([libgnt], [gnt_display_version], [devel@pidgin.im])
    -AC_CANONICAL_SYSTEM
    -AM_CONFIG_HEADER(gntconfig.h)
    -AC_CONFIG_AUX_DIR([.])
    -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
    -
    -GNT_MAJOR_VERSION=gnt_major_version
    -GNT_MINOR_VERSION=gnt_minor_version
    -GNT_MICRO_VERSION=gnt_micro_version
    -GNT_VERSION=[gnt_display_version]
    -AC_SUBST(GNT_MAJOR_VERSION)
    -AC_SUBST(GNT_MINOR_VERSION)
    -AC_SUBST(GNT_MICRO_VERSION)
    -AC_SUBST(GNT_VERSION)
    -
    -GNT_LT_VERSION_INFO="gnt_lt_current:gnt_micro_version:gnt_minor_version"
    -AC_SUBST(GNT_LT_VERSION_INFO)
    -
    -AC_PATH_PROG(sedpath, sed)
    -
    -dnl Storing configure arguments
    -AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
    -
    -dnl Checks for programs.
    -AC_PROG_CC
    -AC_DISABLE_STATIC
    -AM_PROG_LIBTOOL
    -LIBTOOL="$LIBTOOL --silent"
    -AC_PROG_INSTALL
    -
    -dnl we don't use autobreak on cygwin!!
    -dnl AC_CYGWIN
    -
    -dnl Checks for header files.
    -AC_HEADER_STDC
    -AC_HEADER_SYS_WAIT
    -AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h regex.h)
    -
    -dnl Checks for typedefs, structures, and compiler characteristics.
    -AC_C_CONST
    -AC_STRUCT_TM
    -
    -AC_C_BIGENDIAN
    -
    -dnl Checks for library functions.
    -AC_TYPE_SIGNAL
    -AC_FUNC_STRFTIME
    -AC_CHECK_FUNCS(strdup strstr atexit setlocale)
    -
    -dnl to prevent the g_stat()/g_unlink() crash,
    -dnl (09:50:07) Robot101: LSchiere2: it's easy. +LC_SYS_LARGEFILE somewhere in configure.ac
    -AC_SYS_LARGEFILE
    -
    -dnl FreeBSD doesn't have libdl, dlopen is provided by libc
    -AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")])
    -
    -AC_MSG_CHECKING(for the %z format string in strftime())
    -AC_TRY_RUN([
    -#ifdef HAVE_SYS_TIME_H
    -#include <sys/time.h>
    -#endif
    -#include <time.h>
    -#include <stdio.h>
    -
    -int main()
    -{
    - char buf[6];
    - time_t t = time(NULL);
    -
    - if (strftime(buf, sizeof(buf), "%z", localtime(&t)) != 5)
    - return 1;
    -
    - fprintf(stderr, "strftime(\"%%z\") yields: \"%s\"\n", buf);
    -
    - return !((buf[0] == '-' || buf[0] == '+') &&
    - (buf[1] >= '0' && buf[1] <= '9') &&
    - (buf[2] >= '0' && buf[2] <= '9') &&
    - (buf[3] >= '0' && buf[3] <= '9') &&
    - (buf[4] >= '0' && buf[4] <= '9')
    - );
    -}
    -],
    -[
    - AC_MSG_RESULT(yes)
    - AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
    - [Define to 1 if you have a strftime() that supports the %z format string.])
    -],
    -[
    - AC_MSG_RESULT(no)
    -],
    -[
    - # Fallback for Cross Compiling...
    - # This will enable the compatibility code.
    - AC_MSG_RESULT(no)
    -]
    -)
    -
    -
    -AC_CHECK_HEADER(sys/utsname.h)
    -AC_CHECK_FUNC(uname)
    -
    -if test "x$enable_debug" = "xyes" ; then
    - AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
    - enable_fatal_asserts="yes"
    -fi
    -
    -if test "x$enable_fatal_asserts" = "xyes" ; then
    - AC_DEFINE(GAIM_FATAL_ASSERTS, 1, [Define to make assertions fatal (useful for debugging).])
    -fi
    -
    -if test "x$enable_deprecated" = "xno"; then
    - DEBUG_CFLAGS="$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
    -fi
    -
    -if test "x$GCC" = "xyes"; then
    - dnl We enable -Wall later.
    - dnl If it's set after the warning CFLAGS in the compiler invocation, it counteracts the -Wno... flags.
    - dnl This leads to warnings we don't want.
    - CFLAGS=`echo $CFLAGS |$sedpath 's/-Wall//'`
    -
    - dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE
    - dnl
    - dnl Future Possibilities
    - dnl
    - dnl Consider adding -Wbad-function-cast.
    - dnl This leads to spurious warnings using GPOINTER_TO_INT(), et al. directly on a function call.
    - dnl We'd need an intermediate variable.
    - dnl
    - dnl Consider adding -Wfloat-equal.
    - dnl This leads to warnings with Perl.
    - dnl Perhaps we could write ugly configure magic and pass -Wno-float-equal down to that subdirectory.
    - dnl On the other hand, it's probably actually broken, so maybe the Perl folks should fix that?
    - dnl
    - dnl Consider removing -Wno-sign-compare (from the -Wextra set) and fixing all those cases.
    - dnl This is likely non-trivial.
    - dnl
    - for newflag in \
    - "-Waggregate-return" \
    - "-Wcast-align" \
    - "-Wdeclaration-after-statement" \
    - "-Werror-implicit-function-declaration" \
    - "-Wextra -Wno-sign-compare -Wno-unused-parameter" \
    - "-Winit-self" \
    - "-Wmissing-declarations" \
    - "-Wmissing-prototypes" \
    - "-Wnested-externs" \
    - "-Wpointer-arith" \
    - "-Wundef" \
    - ; do
    - orig_CFLAGS="$CFLAGS"
    - CFLAGS="$CFLAGS $newflag"
    - AC_MSG_CHECKING(for $newflag option to gcc)
    - AC_TRY_COMPILE([], [
    - int main() {return 0;}
    - ], [
    - AC_MSG_RESULT(yes)
    - CFLAGS="$orig_CFLAGS"
    - DEBUG_CFLAGS="$DEBUG_CFLAGS $newflag"
    - ], [
    - AC_MSG_RESULT(no)
    - CFLAGS="$orig_CFLAGS"
    - ])
    - done
    -
    - if test "x$enable_fortify" = "xyes"; then
    - AC_MSG_CHECKING(for FORTIFY_SOURCE support)
    - AC_TRY_COMPILE([#include <features.h>], [
    - int main() {
    - #if !(__GNUC_PREREQ (4, 1) \
    - || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
    - || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
    - && __GNUC_MINOR__ == 4 \
    - && (__GNUC_PATCHLEVEL__ > 2 \
    - || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8))))
    - #error No FORTIFY_SOURCE support
    - #endif
    - return 0;
    - }
    - ], [
    - AC_MSG_RESULT(yes)
    - DEBUG_CFLAGS="$DEBUG_CFLAGS -D_FORTIFY_SOURCE=2"
    - ], [
    - AC_MSG_RESULT(no)
    - ])
    - fi
    -
    - DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
    - CFLAGS="-g $CFLAGS"
    -fi
    -AC_SUBST(CFLAGS)
    -
    -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0],,
    - [
    - AC_MSG_ERROR([
    -*** GLib 2.0 is required to build LibGNT; please make sure you have the GLib
    -*** development headers installed. The latest version of GLib is
    -*** always available at http://www.gtk.org/.])
    - ])
    -AC_SUBST(GLIB_CFLAGS)
    -AC_SUBST(GLIB_LIBS)
    -
    -
    -AC_MSG_CHECKING(for me pot o' gold)
    -AC_MSG_RESULT(no)
    -AC_CHECK_FUNCS(gethostid lrand48)
    -AC_CHECK_FUNCS(memcpy memmove random strchr strerror vprintf)
    -AC_CHECK_HEADERS(malloc.h paths.h sgtty.h stdarg.h sys/cdefs.h)
    -AC_CHECK_HEADERS(sys/file.h sys/filio.h sys/ioctl.h sys/msgbuf.h)
    -AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
    -AC_CHECK_HEADERS(termios.h)
    -#AC_CHECK_FUNC(wcwidth, [AC_DEFINE([HAVE_WCWIDTH], [1], [Define to 1 if you have wcwidth function.])])
    -#AC_VAR_TIMEZONE_EXTERNALS
    -
    -GNT_CFLAGS=
    -GNT_LIBS=
    -AC_ARG_WITH(ncurses-headers, [AC_HELP_STRING([--with-ncurses-headers=DIR],
    - [compile finch against the ncurses includes in DIR])],
    - [ac_ncurses_includes="$withval"], [ac_ncurses_includes=""])
    -AC_CHECK_LIB(ncursesw, initscr, [GNT_LIBS="-lncursesw"], [enable_gnt=no])
    -AC_CHECK_LIB(panelw, update_panels, [GNT_LIBS="$GNT_LIBS -lpanelw"], [enable_gnt=no])
    -
    -# If ncursesw is not found, look for plain old ncurses
    -if test "x$enable_gnt" = "xno"; then
    - AC_CHECK_LIB(ncurses, initscr, [[GNT_LIBS="-lncurses"] [enable_gnt=yes]], [enable_gnt=no])
    - AC_CHECK_LIB(panel, update_panels, [[GNT_LIBS="$GNT_LIBS -lpanel"] [enable_gnt=yes]], [enable_gnt=no])
    - AC_DEFINE(NO_WIDECHAR, [1], [Define to 1 if you do not have ncursesw.])
    -else
    - dnl # Some distros put the headers in ncursesw/, some don't
    - found_ncurses_h=no
    - for location in $ac_ncurses_includes /usr/include/ncursesw /usr/include
    - do
    - f="$location/ncurses.h"
    - orig_CFLAGS="$CFLAGS"
    - orig_CPPFLAGS="$CPPFLAGS"
    - CFLAGS="$CFLAGS -I$location"
    - CPPFLAGS="$CPPFLAGS -I$location"
    - AC_CHECK_HEADER($f,[
    - AC_MSG_CHECKING([if $f supports wide characters])
    - AC_TRY_COMPILE([
    - #define _XOPEN_SOURCE_EXTENDED
    - #include <$f>
    - ], [
    - #ifndef get_wch
    - # error get_wch not found!
    - #endif
    - ], [
    - dir=$location
    - if test x"$dir" != x"." ; then
    - GNT_CFLAGS="-I$dir/"
    - else
    - GNT_CFLAGS=""
    - fi
    -
    - found_ncurses_h=yes
    - CFLAGS="$orig_CFLAGS"
    - CPPFLAGS="$orig_CPPFLAGS"
    - AC_MSG_RESULT([yes])
    - break
    - ], [
    - CFLAGS="$orig_CFLAGS"
    - CPPFLAGS="$orig_CPPFLAGS"
    - AC_MSG_RESULT([no])
    - ])
    - ])
    - done
    - if test x"$found_ncurses_h" != "xyes"; then
    - enable_gnt="no"
    - fi
    -fi
    -AC_SUBST(GNT_CFLAGS)
    -AC_SUBST(GNT_LIBS)
    -
    -if test "x$enable_gnt" = "xno"; then
    - AC_MSG_ERROR([
    -*** You need ncursesw or ncurses and its header files.])
    -fi
    -
    -dnl Check for Python headers (currently useful only for libgnt)
    -dnl (Thanks to XChat)
    -AC_PATH_PROG(pythonpath, python)
    -if test "_$pythonpath" != _ ; then
    - AC_MSG_CHECKING(for Python compile flags)
    - PY_PREFIX=`$pythonpath -c 'import sys ; print sys.prefix'`
    - PY_EXEC_PREFIX=`$pythonpath -c 'import sys ; print sys.exec_prefix'`
    - changequote(<<, >>)dnl
    - PY_VERSION=`$pythonpath -c 'import sys ; print sys.version[0:3]'`
    - PY_MAJOR=`$pythonpath -c 'import sys ; print sys.version[0:2]'`
    - changequote([, ])dnl
    - if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h -a "$PY_MAJOR" = "2."; then
    - AC_CHECK_LIB(pthread, pthread_create, )
    - AC_CHECK_LIB(util, openpty, )
    - AC_CHECK_LIB(db, dbopen, )
    - PY_LIBS="-lpython$PY_VERSION -L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config"
    - PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
    - AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
    - AC_MSG_RESULT(ok)
    - else
    - AC_MSG_RESULT([Can't find Python.h])
    - PY_LIBS=""
    - PY_CFLAGS=""
    - fi
    -fi
    -AC_SUBST(PY_CFLAGS)
    -AC_SUBST(PY_LIBS)
    -
    -dnl Check for libxml
    -have_libxml=yes
    -PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , [
    - AC_MSG_RESULT(no)
    - have_libxml=no
    - ])
    -AC_SUBST(LIBXML_CFLAGS)
    -AC_SUBST(LIBXML_LIBS)
    -
    -if test "x$have_libxml" = "xno"; then
    - AC_DEFINE(NO_LIBXML, 1, [Do not have libxml2.])
    -fi
    -
    -AM_CONDITIONAL(PURPLE_AVAILABLE, false)
    -
    -AC_OUTPUT([Makefile
    - gnt.pc
    - wms/Makefile
    - ])
    -
    --- a/gnt.pc.in Thu Nov 22 01:12:15 2018 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,14 +0,0 @@
    -prefix=@prefix@
    -exec_prefix=@exec_prefix@
    -libdir=@libdir@
    -includedir=@includedir@
    -datarootdir=@datarootdir@
    -datadir=@datadir@
    -sysconfdir=@sysconfdir@
    -
    -Name: LibGNT
    -Description: Glib Ncurses Toolkit is a collection of curses-widgets.
    -Version: @VERSION@
    -Requires: glib-2.0
    -Cflags: -I${includedir}/gnt
    -Libs: -L${libdir} -lgnt
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/meson.build Thu Nov 22 01:17:23 2018 -0500
    @@ -0,0 +1,236 @@
    +# UPDATING VERSION NUMBERS FOR RELEASES
    +#
    +# The version number is:
    +# <major>.<minor>.<micro><suffix>
    +#
    +# If any code has changed in libgnt:
    +# micro += 1
    +#
    +# If any functions have been added to libgnt:
    +# micro = 0
    +# minor += 1
    +#
    +# If backwards compatibility has been broken in libgnt:
    +# micro = 0
    +# minor = 0
    +# major += 1
    +# gnt_soversion += 1
    +#
    +# suffix should be similar to one of the following:
    +# For beta releases: '-beta2'
    +# For code under development: '-devel'
    +# For production releases: ''
    +#
    +
    +# the last version for Finch 2 was 2.8.10,
    +# the first version for Finch 3 was 2.9.0
    +
    +project('libgnt', 'c',
    + version : '2.8.10-devel',
    + meson_version : '>=0.37.0')
    +gnt_soversion = 0
    +
    +parts = meson.project_version().split('-')
    +if parts.length() > 1
    + gnt_extra_version = parts[1]
    +else
    + gnt_extra_version = ''
    +endif
    +
    +parts = parts[0].split('.')
    +gnt_major_version = parts[0]
    +gnt_minor_version = parts[1]
    +gnt_micro_version = parts[2]
    +
    +gnt_config = configuration_data()
    +gnt_config.set('GNT_MAJOR_VERSION', gnt_major_version)
    +gnt_config.set('GNT_MINOR_VERSION', gnt_minor_version)
    +gnt_config.set('GNT_MICRO_VERSION', gnt_micro_version)
    +gnt_config.set_quoted('GNT_EXTRA_VERSION', gnt_extra_version)
    +gnt_config.set_quoted('GNT_VERSION', meson.project_version())
    +
    +# FIXME Not available when independent.
    +PURPLE_AVAILABLE = false
    +
    +compiler = meson.get_compiler('c')
    +pkgconfig = import('pkgconfig')
    +
    +# #######################################################################
    +# # Check for GLib 2.16
    +# #######################################################################
    +glib = dependency('glib-2.0', version : '>= 2.16.0')
    +gobject = dependency('gobject-2.0')
    +gmodule = dependency('gmodule-2.0')
    +gnome = import('gnome')
    +
    +#######################################################################
    +# Check for LibXML2
    +#######################################################################
    +libxml = dependency('libxml-2.0', version : '>= 2.6.0', required : false)
    +gnt_config.set('NO_LIBXML', not libxml.found())
    +
    +#######################################################################
    +# Check for ncurses and other things used by it
    +#######################################################################
    +ncurses_available = true
    +ncurses_inc = []
    +ncurses_libs = [
    + compiler.find_library('ncursesw', required : false),
    + compiler.find_library('panelw', required : false)
    +]
    +if not ncurses_libs[0].found() or not ncurses_libs[1].found()
    + ncurses_available = false
    +endif
    +
    +if host_machine.system() == 'windows'
    + # FIXME: $host ?
    + ncurses_sys_prefix = '/usr/$host/sys-root/mingw'
    +else
    + ncurses_sys_prefix = '/usr'
    +endif
    +
    +ncurses_sys_dirs = [ncurses_sys_prefix + '/include/ncursesw',
    + ncurses_sys_prefix + '/include']
    +
    +if ncurses_available
    + # Some distros put the headers in ncursesw/, some don't
    + found_ncurses_h = false
    + foreach location : ncurses_sys_dirs
    + f = location + '/ncurses.h'
    + if not found_ncurses_h
    + if compiler.has_header_symbol(f, 'get_wch',
    + prefix : '#define _XOPEN_SOURCE_EXTENDED')
    + if location != '.'
    + ncurses_inc += [include_directories(location)]
    + endif
    + found_ncurses_h = true
    + endif
    + endif
    + endforeach
    +
    + if not found_ncurses_h
    + ncurses_inc = []
    + ncurses_libs = []
    + ncurses_available = false
    + endif
    +else
    + # ncursesw was not found. Look for plain old ncurses
    + ncurses_libs = [
    + compiler.find_library('ncurses', required : false),
    + compiler.find_library('panel', required : false)
    + ]
    + ncurses_available = ncurses_libs[0].found() and ncurses_libs[1].found()
    + gnt_config.set('NO_WIDECHAR', true)
    +endif
    +if not ncurses_available
    + error('ncurses could not be found!')
    +endif
    +
    +ncurses = declare_dependency(
    + include_directories : ncurses_inc,
    + dependencies : ncurses_libs
    +)
    +
    +libgnt_SOURCES = [
    + 'gntwidget.c',
    + 'gntbindable.c',
    + 'gntbox.c',
    + 'gntbutton.c',
    + 'gntcheckbox.c',
    + 'gntclipboard.c',
    + 'gntcolors.c',
    + 'gntcombobox.c',
    + 'gntentry.c',
    + 'gntfilesel.c',
    + 'gntkeys.c',
    + 'gntlabel.c',
    + 'gntline.c',
    + 'gntmenu.c',
    + 'gntmenuitem.c',
    + 'gntmenuitemcheck.c',
    + 'gntprogressbar.c',
    + 'gntslider.c',
    + 'gntstyle.c',
    + 'gnttextview.c',
    + 'gnttree.c',
    + 'gntutils.c',
    + 'gntwindow.c',
    + 'gntwm.c',
    + 'gntws.c',
    + 'gntmain.c'
    +]
    +
    +libgnt_headers = [
    + 'gntwidget.h',
    + 'gntbindable.h',
    + 'gntbox.h',
    + 'gntbutton.h',
    + 'gntcheckbox.h',
    + 'gntclipboard.h',
    + 'gntcolors.h',
    + 'gntcombobox.h',
    + 'gntentry.h',
    + 'gntfilesel.h',
    + 'gntkeys.h',
    + 'gntlabel.h',
    + 'gntline.h',
    + 'gntmenu.h',
    + 'gntmenuitem.h',
    + 'gntmenuitemcheck.h',
    + 'gntprogressbar.h',
    + 'gntslider.h',
    + 'gntstyle.h',
    + 'gnttextview.h',
    + 'gnttree.h',
    + 'gntutils.h',
    + 'gntwindow.h',
    + 'gntwm.h',
    + 'gntws.h',
    + 'gnt.h'
    +]
    +
    +# Check for Python headers
    +python_dep = dependency('python2', required : false)
    +gnt_config.set('USE_PYTHON', python_dep.found())
    +
    +configure_file(output : 'gntconfig.h',
    + configuration : gnt_config)
    +
    +install_headers(libgnt_headers, subdir : 'gnt')
    +
    +if host_machine.system() == 'windows'
    + libgnt_SOURCES += windows.compile_resources('libgnt_winres.rc')
    +endif
    +
    +gntmarshal = gnome.genmarshal('gntmarshal',
    + sources : 'genmarshal',
    + prefix : 'gnt_closure_marshal',
    + install_header : true,
    + install_dir : join_paths(get_option('includedir'), 'gnt'))
    +
    +libgnt_inc = include_directories('.')
    +libgnt = library('gnt',
    + libgnt_SOURCES + gntmarshal,
    + install : true,
    + version : '@0@.@1@.@2@'.format(gnt_soversion,
    + gnt_minor_version,
    + gnt_micro_version),
    + dependencies : [ncurses, libxml, glib, gobject, gmodule, python_dep])
    +libgnt_dep = declare_dependency(
    + include_directories : libgnt_inc,
    + link_with : libgnt,
    + dependencies : [ncurses, glib])
    +
    +pkgconfig.generate(
    + name : 'LibGNT',
    + description : 'Glib Ncurses Toolkit is a collection of curses-widgets.',
    + version : meson.project_version(),
    + filebase : 'gnt',
    + subdirs : 'gnt',
    + libraries : [libgnt],
    + requires : ['glib-2.0'],
    + variables : ['plugindir = ${libdir}/gnt'],
    + )
    +
    +subdir('wms')
    +subdir('test')
    --- a/test/Makefile Thu Nov 22 01:12:15 2018 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,16 +0,0 @@
    -CC=gcc
    -CFLAGS=`pkg-config --cflags gobject-2.0 gmodule-2.0` -g -I../ -DSTANDALONE -I/usr/include/ncursesw/
    -LDFLAGS=`pkg-config --libs gobject-2.0 gmodule-2.0 gnt` -pg
    -
    -EXAMPLES=combo focus tv multiwin keys menu parse
    -
    -all:
    - make examples
    -
    -clean:
    - rm -f $(EXAMPLES) *.so wm
    -
    -WM: wm
    - for i in $(EXAMPLES); do gcc -shared $(CFLAGS) -USTANDALONE $(LDFLAGS) $${i}.c -o $${i}.so ; done
    -
    -examples: $(EXAMPLES)
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/test/meson.build Thu Nov 22 01:17:23 2018 -0500
    @@ -0,0 +1,13 @@
    +foreach prog : ['combo', 'focus', 'tv', 'multiwin', 'keys', 'menu', 'parse']
    + executable(prog,
    + prog + '.c',
    + c_args : '-DSTANDALONE',
    + dependencies : [libgnt_dep, gobject, gmodule],
    + build_by_default : false)
    +endforeach
    +
    +shared_library('wm',
    + 'wm.c',
    + name_prefix : '',
    + dependencies : [libgnt_dep, gobject, gmodule],
    + build_by_default : false)
    --- a/wms/Makefile.am Thu Nov 22 01:12:15 2018 -0500
    +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
    @@ -1,40 +0,0 @@
    -wms = irssi.la
    -if PURPLE_AVAILABLE
    -# These custom wms depend on libpurple
    -purple_wms = s.la
    -else
    -purple_wms =
    -endif
    -
    -s_la_LDFLAGS = -module -avoid-version
    -irssi_la_LDFLAGS = -module -avoid-version
    -
    -plugin_LTLIBRARIES = \
    - $(wms) \
    - $(purple_wms)
    -
    -plugindir = $(libdir)/gnt
    -
    -irssi_la_SOURCES = irssi.c
    -irssi_la_LIBADD = \
    - $(GLIB_LIBS) \
    - ../libgnt.la
    -
    -s_la_SOURCES = s.c
    -s_la_LIBADD = \
    - $(GLIB_LIBS) \
    - ../libgnt.la \
    - $(top_builddir)/libpurple/libpurple.la
    -
    -EXTRA_DIST =
    -
    -AM_CPPFLAGS = \
    - -DDATADIR=\"$(datadir)\" \
    - -I$(top_srcdir)/libpurple \
    - -I$(top_srcdir)/finch \
    - -I$(top_srcdir)/finch/libgnt \
    - $(DEBUG_CFLAGS) \
    - $(GLIB_CFLAGS) \
    - $(GNT_CFLAGS) \
    - $(PLUGIN_CFLAGS)
    -
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/wms/meson.build Thu Nov 22 01:17:23 2018 -0500
    @@ -0,0 +1,14 @@
    +plugindir = get_option('libdir') + '/gnt'
    +
    +irssi = library('irssi', 'irssi.c',
    + dependencies : [ncurses, gobject, libgnt_dep],
    + name_prefix : '',
    + install : true, install_dir : plugindir)
    +
    +if PURPLE_AVAILABLE
    + # These custom wms depend on libpurple
    + s = library('s', 's.c',
    + dependencies : [ncurses, gobject, libgnt_dep, libpurple_dep],
    + name_prefix : '',
    + install : true, install_dir : plugindir)
    +endif