Commit 7566ad67 authored by Christian Persch's avatar Christian Persch

build: Port to meson build system

Based on a patch by Iñigo Martínez.

Drop the glade catalogue, which was unmaintained.
Remove the config.h define for the default terminfo name to use,
and just hardcode it.

#78
parent 9bdf87c1
NULL =
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src bindings po doc perf
EXTRA_DIST = \
COPYING.GPL3 \
COPYING.LGPL2 \
COPYING.LGPL3 \
autogen.sh \
ChangeLog.pre-git \
$(NULL)
DISTCLEANFILES =
if ENABLE_GLADE_CATALOGUE
SUBDIRS += glade
endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = vte-$(VTE_API_VERSION).pc
DISTCHECK_CONFIGURE_FLAGS = \
--enable-gtk-doc \
--enable-introspection \
--disable-vala \
--disable-test-application \
--disable-silent-rules \
--with-gtk=$(GTK_API_VERSION)
MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
$(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
$(NULL)
# Build ChangeLog from GIT history
ChangeLog:
$(AM_V_GEN) if test -d $(top_srcdir)/.git; then \
GIT_DIR="$(top_srcdir)/.git" git log --stat > $@; \
fi
dist: ChangeLog
.PHONY: ChangeLog
-include $(top_srcdir)/git.mk
# Copyright © 2019 Christian Persch
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This library 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 Lesser
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <https://www.gnu.org/licenses/>.
srcdir=@srcdir@
builddir=@builddir@
vte_gtk3_api_version = @vte_gtk3_api_version@
vte_gtk4_api_version = @vte_gtk4_api_version@
#
NTHREADS = 1
NJOBS = -j$(NTHREADS)
NINJA = ninja $(NJOBS)
#
all:
$(NINJA)
check:
MESON_TESTTHREADS=$(NTHREADS) $(NINJA) test
clean:
$(NINJA) clean
coverage:
$(NINJA) coverage
doc:
$(NINJA) vte-$(vte_gtk3_api_version)-doc
install:
$(NINJA) install
uninstall:
$(NINJA) uninstall
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
set -e
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
cd "$srcdir"
mkdir -p m4 >/dev/null 2>&1 || true
gtkdocize --copy --flavour no-tmpl
autoreconf --verbose --force --install
intltoolize --force
cd -
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
SUBDIRS =
if HAVE_INTROSPECTION
SUBDIRS += gir
endif
if ENABLE_VAPIGEN
SUBDIRS += vala
endif
.DELETE_ON_ERROR:
-include $(top_srcdir)/git.mk
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
INTROSPECTION_GIRS = Vte-$(VTE_API_VERSION).gir
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
Vte-@VTE_API_VERSION@.gir: $(top_builddir)/src/libvte-$(VTE_API_VERSION).la
Vte_@VTE_API_VERSION_U@_gir_INCLUDES = Pango-1.0 Gdk-$(GTK_API_VERSION) Gtk-$(GTK_API_VERSION)
Vte_@VTE_API_VERSION_U@_gir_CFLAGS = $(VTE_CFLAGS) -DVTE_COMPILATION -I$(top_builddir)/src/vte -I$(top_srcdir)/src/vte
Vte_@VTE_API_VERSION_U@_gir_LIBS = $(top_builddir)/src/libvte-$(VTE_API_VERSION).la
Vte_@VTE_API_VERSION_U@_gir_EXPORT_PACKAGES = vte-$(VTE_API_VERSION)
Vte_@VTE_API_VERSION_U@_gir_SCANNERFLAGS = --c-include "vte/vte.h"
Vte_@VTE_API_VERSION_U@_gir_FILES = \
$(wildcard $(top_srcdir)/src/vte/*.h) \
$(wildcard $(top_builddir)/src/vte/*.h) \
$(top_srcdir)/src/pty.cc \
$(top_srcdir)/src/vtegtk.cc \
$(top_builddir)/src/vtetypebuiltins.cc \
$(NULL)
girdir = $(datadir)/gir-1.0
nodist_gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
nodist_typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(nodist_gir_DATA) $(nodist_typelib_DATA)
.DELETE_ON_ERROR:
include $(INTROSPECTION_MAKEFILE)
-include $(top_srcdir)/git.mk
# Copyright © 2018, 2019 Iñigo Martínez
# Copyright © 2019 Christian Persch
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This library 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 Lesser
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <https://www.gnu.org/licenses/>.
gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.9.0')
if get_option('gtk3')
libvte_gtk3_gir_includes = [
'Gdk-3.0',
'Gtk-3.0',
'Pango-1.0',
]
libvte_gtk3_gir = gnome.generate_gir(
libvte_gtk3,
sources: libvte_gtk3_public_headers + libvte_common_doc_sources,
includes: libvte_gtk3_gir_includes,
dependencies: libvte_gtk3_dep,
extra_args: '-DVTE_COMPILATION',
nsversion: vte_gtk3_api_version,
namespace: 'Vte',
export_packages: vte_gtk3_api_name,
header: 'vte' / 'vte.h',
install: true,
)
endif
noinst_PROGRAMS = app
CLEANFILES =
DISTCLEANFILES =
EXTRA_DIST =
# VAPI
VAPIGEN_VAPIS = vte-$(VTE_API_VERSION).vapi
vte-@VTE_API_VERSION@.vapi: $(top_builddir)/bindings/gir/Vte-$(VTE_API_VERSION).gir
vte_@VTE_API_VERSION_U@_vapi_DEPS = \
glib-2.0 \
gio-2.0 \
pango \
gdk-$(GTK_API_VERSION) \
gtk+-$(GTK_API_VERSION) \
$(NULL)
vte_@VTE_API_VERSION_U@_vapi_METADATADIRS = $(srcdir)
vte_@VTE_API_VERSION_U@_vapi_FILES = $(top_builddir)/bindings/gir/Vte-$(VTE_API_VERSION).gir
vapidir = $(datadir)/vala/vapi
nodist_vapi_DATA = $(VAPIGEN_VAPIS)
CLEANFILES += $(nodist_vapi_DATA)
# VALA Test application
app_SOURCES = \
$(NULL)
nodist_app_SOURCES = \
app.c \
appresources.c \
$(NULL)
app_CPPFLAGS = \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/vte \
-I$(top_builddir)/src/vte \
$(AM_CPPFLAGS) \
$(NULL)
app_CFLAGS = \
-Wno-unused-variable \
-Wno-unused-but-set-variable \
$(VTE_CFLAGS) \
$(AM_CFLAGS) \
$(NULL)
app_LDFLAGS = \
$(AM_LDFLAGS) \
$(NULL)
app_LDADD = \
$(top_builddir)/src/libvte-$(VTE_API_VERSION).la \
$(VTE_LIBS) \
$(NULL)
app_valaflags = \
--target-glib=2.38 \
--pkg=posix \
--pkg=gio-2.0 \
--pkg=gtk+-$(GTK_API_VERSION) \
--gresources $(srcdir)/app.gresource.xml \
$(AM_VALAFLAGS)
if HAVE_VALA_0_31
app_valaflags += --disable-since-check
endif
if HAVE_GTK_3_16
app_valaflags += -D GTK_3_16
endif
CLEANFILES += \
app.c \
appresources.c \
$(NULL)
EXTRA_DIST += \
app.gresource.xml \
app.ui \
app.vala \
config.vapi \
search-popover.ui \
$(NULL)
appresources.c: app.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/app.gresource.xml)
$(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name app $<
app.c: $(srcdir)/app.vala $(srcdir)/config.vapi vte-$(VTE_API_VERSION).vapi Makefile
$(AM_V_GEN)$(VALAC) $(app_valaflags) -C $(srcdir)/app.vala $(srcdir)/config.vapi vte-$(VTE_API_VERSION).vapi
.DELETE_ON_ERROR:
include $(VAPIGEN_MAKEFILE)
-include $(top_srcdir)/git.mk
# Copyright © 2018, 2019 Iñigo Martínez
# Copyright © 2019 Christian Persch
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This library 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 Lesser
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <https://www.gnu.org/licenses/>.
assert(get_option('gir'), 'gir is required for vala support')
assert(get_option('gtk3'), 'vala support only available for gtk3')
add_languages('vala', required: true)
valac = meson.get_compiler('vala')
assert(valac.version().version_compare('>= 0.24.0'), 'vala >= 0.24 required')
posix_dep = valac.find_library('posix')
libvte_gtk3_vapi_deps = [
'gio-2.0',
'glib-2.0',
'pango',
'gtk+-3.0',
]
libvte_gtk3_vapi_dep = gnome.generate_vapi(
vte_gtk3_api_name,
sources: libvte_gtk3_gir[0],
packages: libvte_gtk3_vapi_deps,
install: true,
)
# Vala test application
vapp_resource_data = files(
'app.ui',
'search-popover.ui',
)
vapp_resource_sources = gnome.compile_resources(
'appresources',
'app.gresource.xml',
c_name: 'app',
dependencies: vapp_resource_data,
export: true,
)
vapp_sources = vapp_resource_sources + files(
'config.vapi',
'app.vala'
)
vapp_cflags = [
'-Wno-unused-but-set-variable',
'-Wno-unused-variable',
]
vapp_valaflags = []
if valac.version().version_compare('>= 0.31.1')
vapp_valaflags += '--disable-since-check'
endif
if gtk3_dep.version().version_compare('>= 3.16')
vapp_valaflags += '--define=GTK_3_16'
endif
vapp_incs = [
top_inc,
src_inc,
vte_inc,
]
vapp_deps = [
gio_dep,
glib_dep,
gtk3_dep,
libvte_gtk3_vapi_dep,
posix_dep,
]
vapp = executable(
'vala-test',
sources: vapp_sources,
include_directories: vapp_incs,
dependencies: vapp_deps,
c_args: vapp_cflags,
vala_args: vapp_valaflags,
install: false,
)
m4_define([version_major],0)
m4_define([version_minor],57)
m4_define([version_micro],0)
m4_define([version_triplet],version_major.version_minor.version_micro)
AC_PREREQ([2.63])
AC_INIT([vte],
[version_triplet],
[http://bugzilla.gnome.org/enter_bug.cgi?product=vte],
[vte])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/app/app.cc])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2 -Wno-portability])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
if test -z "$enable_maintainer_mode"; then
enable_maintainer_mode=yes
fi
AM_MAINTAINER_MODE([enable])
################################################################################
# GTK+
################################################################################
AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
[AS_HELP_STRING([--with-gtk=3.0|3.90],[which gtk+ version to compile against (default: 3.0)])],
[case "$with_gtk" in
3.0) ;;
3.9[02468]) ;;
2.0) AC_MSG_ERROR([unsupported gtk version $with_gtk specified]) ;;
*) AC_MSG_ERROR([invalid gtk version $with_gtk specified]) ;;
esac],
[with_gtk=3.0])
AC_MSG_RESULT([$with_gtk])
case "$with_gtk" in
3.0) GTK_API_VERSION=3.0
GTK_API_MAJOR_VERSION=3
GTK_API_MINOR_VERSION=0
GTK_REQUIRED=3.8.0
GTK_MIN_REQUIRED=3.8
GTK_MAX_ALLOWED=3.20
VTE_API_MAJOR_VERSION=2
VTE_API_MINOR_VERSION=91
GLADE_API_VERSION=2.0
;;
3.9[02468]) GTK_API_VERSION=4.0
GTK_API_MAJOR_VERSION=4
GTK_API_MINOR_VERSION=0
GTK_REQUIRED=3.89.0
GTK_MIN_REQUIRED=3.8
GTK_MAX_ALLOWED=3.20
VTE_API_MAJOR_VERSION=3
VTE_API_MINOR_VERSION=91
# GLADE_API_VERSION=4.0 ?
# remove the following when they're ready
enable_glade_catalogue=no
enable_introspection=no
enable_vala=no
;;
esac
VTE_API_VERSION=$VTE_API_MAJOR_VERSION.$VTE_API_MINOR_VERSION
AC_SUBST([VTE_API_VERSION])
AC_SUBST([VTE_API_VERSION_U],[AS_TR_SH([$VTE_API_VERSION])])
AC_SUBST([VTE_API_MAJOR_VERSION])
AC_SUBST([VTE_API_MINOR_VERSION])
AC_SUBST([GTK_API_VERSION])
AC_SUBST([GTK_API_MAJOR_VERSION])
AC_SUBST([GTK_API_MINOR_VERSION])
################################################################################
# Libtool versioning
################################################################################
m4_define([lt_revision], m4_if(m4_eval(version_minor%2),1,0,version_micro))
m4_define([lt_age], m4_eval(version_minor*100+version_micro-lt_revision))
m4_define([lt_current], m4_eval(version_major+lt_age))
m4_define([lt_triplet],lt_current:lt_revision:lt_age)
LT_VERSION_INFO="lt_triplet()"
AC_SUBST([LT_VERSION_INFO])
################################################################################
# Check for programs
PKG_PROG_PKG_CONFIG
AC_PROG_CC
AC_PROG_CXX
AC_USE_SYSTEM_EXTENSIONS
AC_HEADER_STDC
AM_PROG_CC_C_O
AC_PROG_SED
AX_CXX_COMPILE_STDCXX([17])
AC_SYS_LARGEFILE
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT
LT_LANG([C])
LT_LANG([C++])
AM_CONDITIONAL([HAVE_GCC],[test "$GCC" = "yes"])
AM_CONDITIONAL([HAVE_GXX],[test "$GXX" = "yes"])
################################################################################
# Enable debugging messages and additional run-time checks.
################################################################################
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable extra debugging checks and logging messages])],
[],[enable_debug=no])
if test "x$enable_debug" = "xyes" ; then
AC_MSG_RESULT([enabling debug checks and messages])
AC_DEFINE(VTE_DEBUG,1,[Enable debugging messages.])
fi
################################################################################
# i18n
################################################################################
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=vte-$VTE_API_VERSION
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
[Package translatable messages domain name.])
AM_GLIB_GNU_GETTEXT
AC_CHECK_DECLS(bind_textdomain_codeset,,,[#include "libintl.h"])
################################################################################
# Compilation
################################################################################
m4_define([compiler_flags_common],[ dnl
-pipe dnl
-Wall dnl
-Wcast-align dnl
-Wendif-labels dnl
-Werror=declaration-after-statement dnl
"-Werror=format=2 -Werror=format-nonliteral -Werror=format-security" dnl
-Werror=implicit-function-declaration dnl
-Werror=init-self dnl
-Werror=missing-include-dirs dnl
-Werror=missing-prototypes dnl
-Werror=pointer-arith dnl
-Wextra dnl
-Wfloat-equal dnl
-Wlogical-op dnl
-Wmisleading-indentation dnl
-Wmissing-declarations dnl
-Wmissing-include-dirs dnl
-Wmissing-format-attribute dnl
-Wmissing-noreturn dnl
-Wno-missing-field-initializers dnl
-Wno-switch-enum dnl
-Wno-unused-parameter dnl
-Wno-packed dnl
-Wshadow dnl
-Wsign-compare dnl
-Wstrict-aliasing=2 dnl
-Wundef dnl
-Wuninitialized dnl
-Wunsafe-loop-optimizations dnl
-Wvla dnl
-Wwrite-strings dnl
-fno-common dnl
-fdiagnostics-show-option dnl
-fno-strict-aliasing dnl
-fstack-protector dnl
-fstack-protector-strong dnl
-fno-semantic-interposition dnl
-Wno-deprecated-declarations dnl
])
m4_define([compiler_flags_only_c],[ dnl
-Waggregate-return dnl
-Wimplicit dnl
-Wimplicit-fallthrough=3 dnl
-Wnested-externs dnl
-Wold-style-definition dnl
-Wstrict-prototypes dnl
])
m4_define([compiler_flags_only_cxx],[ dnl
-Wstrict-null-sentinel dnl
-Wimplicit-fallthrough=5 dnl
-fno-rtti dnl
-fno-exceptions dnl
-fvisibility=hidden dnl
-fvisibility-inlines-hidden dnl
])
CC_CHECK_FLAGS_APPEND([AM_CFLAGS],[CFLAGS],[compiler_flags_common compiler_flags_only_c])
AC_LANG_PUSH([C++])
CC_CHECK_FLAGS_APPEND([AM_CXXFLAGS],[CXXFLAGS],[compiler_flags_common compiler_flags_only_cxx])
AC_LANG_POP([C++])
if test "$cc_cv_cxx_CXXFLAGS__fvisibility_hidden" != "yes"; then
AC_MSG_ERROR([$CXX doesn't support required flag -fvisibility=hidden])
fi
##########################################################
# Check for -Bsymbolic-functions linker flag used to avoid
# intra-library PLT jumps, if available.
##########################################################
AC_ARG_ENABLE([Bsymbolic],
[AS_HELP_STRING([--disable-Bsymbolic],
[disable linking with -Bsymbolic])],
[],[enable_Bsymbolic=yes])
VTE_LDFLAGS=
if test "$enable_Bsymbolic" != "no"; then
CC_CHECK_LDFLAGS(["-Wl,-Bsymbolic-functions"],
[VTE_LDFLAGS="$VTE_LDFLAGS -Wl,-Bsymbolic-functions"],
[if test "$enable_Bsymbolic" = "auto"; then
AC_MSG_WARN([-Bsymbolic not supported by ld; disabling])
enable_Bsymbolic=no
else
AC_MSG_ERROR([-Bsymbolic requested but not supported by ld. Use --disable-Bsymbolic to disable])
fi])
AC_LANG_PUSH([C++])
CC_CHECK_LDFLAGS(["-Wl,-Bsymbolic-functions"],
[VTE_CXXLDFLAGS="$VTE_CXXLDFLAGS -Wl,-Bsymbolic-functions"],
[if test "$enable_Bsymbolic" = "auto"; then
AC_MSG_WARN([-Bsymbolic not supported by cxx ld; disabling])
enable_Bsymbolic=no
else
AC_MSG_ERROR([-Bsymbolic requested but not supported by cxx ld. Use --disable-Bsymbolic to disable])
fi])
AC_LANG_POP([C++])
fi
AC_SUBST([VTE_LDFLAGS])
AC_SUBST([VTE_CXXLDFLAGS])
################################################################################
# Core
################################################################################
GLIB_REQUIRED=2.40.0
GIO_REQUIRED=2.40.0
PANGO_REQUIRED=1.22.0
GNUTLS_REQUIRED=3.2.7
PCRE2_REQUIRED=10.21
# GNUTLS
AC_MSG_CHECKING([whether GnuTLS support is requested])
AC_ARG_WITH([gnutls],
[AS_HELP_STRING([--without-gnutls],[Disable GnuTLS support])],
[],[with_gnutls=yes])
AC_MSG_RESULT([$with_gnutls])
GNUTLS_PKGS=
if test "$with_gnutls" = "yes"; then
GNUTLS_PKGS="gnutls >= $GNUTLS_REQUIRED"
AC_DEFINE([WITH_GNUTLS],[1],[Define to 1 to enable GnuTLS support])
fi
AM_CONDITIONAL([WITH_GNUTLS],[test "$with_gnutls" = "yes"])
# GLIB tools
AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
VTE_DEFAULT_TERM=xterm-256color
AC_DEFINE_UNQUOTED(VTE_DEFAULT_TERM,"$VTE_DEFAULT_TERM",[The default value $TERM is set to.])
# Check for headers.
AC_CHECK_HEADERS([sys/select.h sys/syslimits.h sys/termios.h sys/wait.h stropts.h termios.h util.h wchar.h pty.h])
AC_HEADER_TIOCGWINSZ
# Check for how to open a new PTY. We support posix_openpt and BSDs openpty
AC_CHECK_FUNCS([posix_openpt grantpt unlockpt ptsname],[],
[AC_MSG_ERROR([no support for Unix98 PTY found])])
# Misc PTY handling functions
AC_CHECK_FUNCS([cfmakeraw fork setsid setpgid getpgid tcgetattr tcsetattr])
# Misc I/O routines.
AC_CHECK_FUNCS([pread pwrite])
AC_CHECK_FUNCS([explicit_bzero])
# Misc string routines.
AC_CHECK_FUNCS([strchrnul])
# for vtespawn
AC_CHECK_HEADERS([sys/resource.h])
AC_CHECK_FUNCS([fdwalk])
# Math functions
AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"]))
AC_CHECK_FUNCS([ceil floor round])
# Search for the required modules.
VTE_PKGS="glib-2.0 >= $GLIB_REQUIRED gobject-2.0 pango >= $PANGO_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gobject-2.0 gio-2.0 gio-unix-2.0 zlib libpcre2-8 >= $PCRE2_REQUIRED $GNUTLS_PKGS"
PKG_CHECK_MODULES([VTE],[$VTE_PKGS])
AC_SUBST([VTE_PKGS])
PKG_CHECK_MODULES([GLIB],[glib-2.0 >= $GLIB_REQUIRED])
PKG_CHECK_MODULES([GOBJECT],[gobject-2.0])
PKG_CHECK_MODULES([GTK],[gtk+-$GTK_API_VERSION >= $GTK_REQUIRED])
PKG_CHECK_MODULES([APP],[
glib-2.0 >= $GLIB_REQUIRED
gobject-2.0
cairo-gobject
pango >= $PANGO_REQUIRED
gdk-pixbuf-2.0
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED])
########################
# Legacy Charset Support
########################
AC_MSG_CHECKING([whether to enable legacy charset support using iconv])
AC_ARG_WITH([iconv],
[AS_HELP_STRING([--without-iconv],
[Disable legacy charset support using iconv])],
[],[with_iconv=yes])
AC_MSG_RESULT([$with_iconv])
if test "$with_iconv" = "yes"; then
AC_DEFINE([WITH_ICONV],[1],[Enable legacy charset support using iconv])
fi
################################################################################
# Glade catalogue
################################################################################
AC_MSG_CHECKING([whether to install the glade catalogue])
AC_ARG_ENABLE([glade-catalogue],
[AS_HELP_STRING([--disable-glade],[Disable installing the glade catalogue])],
[],[enable_glade_catalogue=no])
AC_MSG_RESULT([$enable_glade_catalogue])
if test "$enable_glade_catalogue" = "yes"; then
GLADE_CATALOGUE_DIR="$($PKG_CONFIG --variable=catalogdir gladeui-$GLADE_API_VERSION)"
GLADE_ICON_DIR="$($PKG_CONFIG --variable=pixmapdir gladeui-$GLADE_API_VERSION)"
GLADE_MODULE_DIR="$($PKG_CONFIG --variable=moduledir gladeui-$GLADE_API_VERSION)"
if test -z "$GLADE_CATALOGUE_DIR" -o -z "$GLADE_MODULE_DIR"; then
AC_MSG_ERROR([gladeui-$GLADE_API_VERSION not found])
fi
AC_SUBST([GLADE_CATALOGUE_DIR])
AC_SUBST([GLADE_ICON_DIR])
AC_SUBST([GLADE_MODULE_DIR])
fi
AM_CONDITIONAL([ENABLE_GLADE_CATALOGUE],[test "$enable_glade_catalogue" = "yes"])
# ********
# Bindings
# ********
# No automagic please!
if test -z "$enable_introspection"; then
enable_introspection=yes
fi