|
Packit |
aa0600 |
dnl Process this file with autoconf to produce a configure script.
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AC_PREREQ(2.64)
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Package version of the form 'major.minor.micro'.
|
|
Packit |
aa0600 |
m4_define(gspell_package_version, 1.8.1)
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AC_INIT([gspell],
|
|
Packit |
aa0600 |
[gspell_package_version],
|
|
Packit |
aa0600 |
[https://gitlab.gnome.org/GNOME/gspell/issues],
|
|
Packit |
aa0600 |
[gspell],
|
|
Packit |
aa0600 |
[https://wiki.gnome.org/Projects/gspell])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([AX_IS_RELEASE])
|
|
Packit |
aa0600 |
AX_IS_RELEASE([git-directory])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Libtool versioning
|
|
Packit |
aa0600 |
#
|
|
Packit |
aa0600 |
# For development releases (if the minor package version is odd), keep the same
|
|
Packit |
aa0600 |
# Libtool version.
|
|
Packit |
aa0600 |
#
|
|
Packit |
aa0600 |
# For a new minor stable release (when incrementing the minor package version
|
|
Packit |
aa0600 |
# to an even number), apply the following algorithm step by step:
|
|
Packit |
aa0600 |
# 1. If the library source code has changed at all since the last
|
|
Packit |
aa0600 |
# update, then increment REVISION.
|
|
Packit |
aa0600 |
# 2. If any exported functions or data have been added, removed, or
|
|
Packit |
aa0600 |
# changed since the last update, increment CURRENT and set REVISION
|
|
Packit |
aa0600 |
# to 0.
|
|
Packit |
aa0600 |
# 3. If any exported functions or data have been added since the last
|
|
Packit |
aa0600 |
# public release, increment AGE.
|
|
Packit |
aa0600 |
# 4. If any exported functions or data have been removed since the last
|
|
Packit |
aa0600 |
# public release, set AGE to 0.
|
|
Packit |
aa0600 |
#
|
|
Packit |
aa0600 |
# When incrementing the API version (usually for a new major package version),
|
|
Packit |
aa0600 |
# set CURRENT, REVISION and AGE to 0 since it's like a new library.
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
GSPELL_LT_CURRENT=5
|
|
Packit |
aa0600 |
GSPELL_LT_REVISION=0
|
|
Packit |
aa0600 |
GSPELL_LT_AGE=3
|
|
Packit |
aa0600 |
GSPELL_LT_VERSION="$GSPELL_LT_CURRENT:$GSPELL_LT_REVISION:$GSPELL_LT_AGE"
|
|
Packit |
aa0600 |
AC_SUBST(GSPELL_LT_VERSION)
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# API version, used for parallel installability.
|
|
Packit |
aa0600 |
# Not used in:
|
|
Packit |
aa0600 |
# - po/Makevars
|
|
Packit |
aa0600 |
# - the docs/reference/gspell-1.0-sections.txt filename
|
|
Packit |
aa0600 |
# Because as far as I've tested, it is not easily feasible to not hardcode the
|
|
Packit |
aa0600 |
# API version in those places (swilmet).
|
|
Packit |
aa0600 |
GSPELL_API_VERSION=1
|
|
Packit |
aa0600 |
AC_SUBST(GSPELL_API_VERSION)
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Dependencies
|
|
Packit |
aa0600 |
enchant_req=2.1.3
|
|
Packit |
aa0600 |
glib_req=2.44
|
|
Packit |
aa0600 |
gtk_req=3.20
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AC_CONFIG_SRCDIR([gspell/gspell-checker.c])
|
|
Packit |
aa0600 |
AC_CONFIG_HEADER([config.h])
|
|
Packit |
aa0600 |
AC_CONFIG_MACRO_DIR([m4])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# gnu strictness to generate the INSTALL file
|
|
Packit |
aa0600 |
AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip gnu -Wno-portability])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Check for programs
|
|
Packit |
aa0600 |
AC_PROG_CC
|
|
Packit |
aa0600 |
AC_PROG_INSTALL
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([PKG_PROG_PKG_CONFIG])
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([PKG_INSTALLDIR])
|
|
Packit |
aa0600 |
PKG_PROG_PKG_CONFIG
|
|
Packit |
aa0600 |
PKG_INSTALLDIR
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
|
|
Packit |
aa0600 |
AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Needed on Mac OS X
|
|
Packit |
aa0600 |
AC_PROG_OBJC
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Initialize libtool
|
|
Packit |
aa0600 |
LT_PREREQ([2.2.6])
|
|
Packit |
aa0600 |
LT_INIT([disable-static])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Compile warnings. There can be deprecation warnings at any time, so disable
|
|
Packit |
aa0600 |
# -Werror by default with the [yes] argument.
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS])
|
|
Packit |
aa0600 |
AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS], [yes])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Dynamic linking dependencies
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([AX_PKG_CHECK_MODULES])
|
|
Packit |
aa0600 |
AX_PKG_CHECK_MODULES([DEP],
|
|
Packit |
aa0600 |
[glib-2.0 >= $glib_req gtk+-3.0 >= $gtk_req enchant-2 >= $enchant_req],
|
|
Packit |
aa0600 |
[])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# iso-codes
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([PKG_CHECK_EXISTS])
|
|
Packit |
aa0600 |
PKG_CHECK_EXISTS([iso-codes],
|
|
Packit |
aa0600 |
[have_iso_codes=yes],
|
|
Packit |
aa0600 |
[have_iso_codes=no])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
if test "x$have_iso_codes" = "xyes"; then
|
|
Packit |
aa0600 |
AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
|
|
Packit |
aa0600 |
if $PKG_CONFIG --variable=domains iso-codes | grep 639 > /dev/null && \
|
|
Packit |
aa0600 |
$PKG_CONFIG --variable=domains iso-codes | grep 3166 > /dev/null ; then
|
|
Packit |
aa0600 |
result=yes
|
|
Packit |
aa0600 |
else
|
|
Packit |
aa0600 |
result=no
|
|
Packit |
aa0600 |
have_iso_codes=no
|
|
Packit |
aa0600 |
fi
|
|
Packit |
aa0600 |
AC_MSG_RESULT([$result])
|
|
Packit |
aa0600 |
fi
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
if test "x$have_iso_codes" = "xyes"; then
|
|
Packit |
aa0600 |
AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],
|
|
Packit |
aa0600 |
["`$PKG_CONFIG --variable=prefix iso-codes`"],
|
|
Packit |
aa0600 |
[ISO codes prefix])
|
|
Packit |
aa0600 |
else
|
|
Packit |
aa0600 |
AC_MSG_ERROR([iso-codes is required.])
|
|
Packit |
aa0600 |
fi
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# i18n
|
|
Packit |
aa0600 |
AM_GNU_GETTEXT([external])
|
|
Packit |
aa0600 |
AM_GNU_GETTEXT_VERSION([0.19.4])
|
|
Packit |
aa0600 |
AC_SUBST([GETTEXT_PACKAGE], [gspell-$GSPELL_API_VERSION])
|
|
Packit |
aa0600 |
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Define to the gettext package name.])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Documentation
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([GTK_DOC_CHECK])
|
|
Packit |
aa0600 |
GTK_DOC_CHECK([1.25], [--flavour=no-tmpl])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Installed Tests for gnome continuous integration
|
|
Packit |
aa0600 |
AC_ARG_ENABLE(installed_tests,
|
|
Packit |
aa0600 |
AS_HELP_STRING([--enable-installed-tests],
|
|
Packit |
aa0600 |
[Install test programs (default: no)]),,
|
|
Packit |
aa0600 |
[enable_installed_tests=no])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AM_CONDITIONAL(INSTALLED_TESTS, test "x$enable_installed_tests" = "xyes")
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Introspection
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([GOBJECT_INTROSPECTION_CHECK])
|
|
Packit |
aa0600 |
GOBJECT_INTROSPECTION_CHECK([1.42.0])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Vala
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([VAPIGEN_CHECK])
|
|
Packit |
aa0600 |
VAPIGEN_CHECK
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Code coverage for unit tests
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([AX_CODE_COVERAGE])
|
|
Packit |
aa0600 |
AX_CODE_COVERAGE
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Valgrind check
|
|
Packit |
aa0600 |
AX_REQUIRE_DEFINED([AX_VALGRIND_CHECK])
|
|
Packit |
aa0600 |
AX_VALGRIND_CHECK
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Symbol visibility handling.
|
|
Packit |
aa0600 |
#
|
|
Packit |
aa0600 |
# This requires to #include config.h in every *.c file where there is a public
|
|
Packit |
aa0600 |
# symbol. As a simpler rule, it's easier to #include config.h in all gspell/*.c
|
|
Packit |
aa0600 |
# files, to be sure that we don't miss any public symbol.
|
|
Packit |
aa0600 |
GSPELL_HIDDEN_VISIBILITY_CFLAGS=""
|
|
Packit |
aa0600 |
case "$host" in
|
|
Packit |
aa0600 |
*-*-mingw*)
|
|
Packit |
aa0600 |
dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport)
|
|
Packit |
aa0600 |
AC_DEFINE([_GSPELL_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern],
|
|
Packit |
aa0600 |
[defines how to decorate public symbols while building])
|
|
Packit |
aa0600 |
GSPELL_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
|
|
Packit |
aa0600 |
;;
|
|
Packit |
aa0600 |
*)
|
|
Packit |
aa0600 |
dnl on other compilers, check if we can do -fvisibility=hidden
|
|
Packit |
aa0600 |
SAVED_CFLAGS="${CFLAGS}"
|
|
Packit |
aa0600 |
CFLAGS="-fvisibility=hidden"
|
|
Packit |
aa0600 |
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
|
|
Packit |
aa0600 |
AC_TRY_COMPILE([], [return 0],
|
|
Packit |
aa0600 |
AC_MSG_RESULT(yes)
|
|
Packit |
aa0600 |
enable_fvisibility_hidden=yes,
|
|
Packit |
aa0600 |
AC_MSG_RESULT(no)
|
|
Packit |
aa0600 |
enable_fvisibility_hidden=no)
|
|
Packit |
aa0600 |
CFLAGS="${SAVED_CFLAGS}"
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AS_IF([test "${enable_fvisibility_hidden}" = "yes"], [
|
|
Packit |
aa0600 |
AC_DEFINE([_GSPELL_EXTERN], [__attribute__((visibility("default"))) extern],
|
|
Packit |
aa0600 |
[defines how to decorate public symbols while building])
|
|
Packit |
aa0600 |
GSPELL_HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
|
|
Packit |
aa0600 |
])
|
|
Packit |
aa0600 |
;;
|
|
Packit |
aa0600 |
esac
|
|
Packit |
aa0600 |
AC_SUBST(GSPELL_HIDDEN_VISIBILITY_CFLAGS)
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Check for Mac OS X platform
|
|
Packit |
aa0600 |
AC_MSG_CHECKING([for Mac OS X platform])
|
|
Packit |
aa0600 |
case "$host" in
|
|
Packit |
aa0600 |
*-*-darwin*)
|
|
Packit |
aa0600 |
platform_osx=yes
|
|
Packit |
aa0600 |
;;
|
|
Packit |
aa0600 |
*)
|
|
Packit |
aa0600 |
platform_osx=no
|
|
Packit |
aa0600 |
;;
|
|
Packit |
aa0600 |
esac
|
|
Packit |
aa0600 |
AC_MSG_RESULT([$platform_osx])
|
|
Packit |
aa0600 |
AM_CONDITIONAL(PLATFORM_OSX, test "$platform_osx" = "yes")
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Check for native Mac OS X
|
|
Packit |
aa0600 |
gdk_targets=`$PKG_CONFIG --variable=targets gdk-3.0`
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
gdk_windowing="x11"
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
for target in $gdk_targets;
|
|
Packit |
aa0600 |
do
|
|
Packit |
aa0600 |
case "$target" in
|
|
Packit |
aa0600 |
quartz)
|
|
Packit |
aa0600 |
gdk_windowing=quartz
|
|
Packit |
aa0600 |
;;
|
|
Packit |
aa0600 |
win32)
|
|
Packit |
aa0600 |
gdk_windowing=win32
|
|
Packit |
aa0600 |
;;
|
|
Packit |
aa0600 |
esac
|
|
Packit |
aa0600 |
done
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AC_MSG_CHECKING([for native Mac OS X])
|
|
Packit |
aa0600 |
if test "$gdk_windowing" = "quartz"; then
|
|
Packit |
aa0600 |
os_osx=yes
|
|
Packit |
aa0600 |
else
|
|
Packit |
aa0600 |
os_osx=no
|
|
Packit |
aa0600 |
fi
|
|
Packit |
aa0600 |
AC_MSG_RESULT([$os_osx])
|
|
Packit |
aa0600 |
AM_CONDITIONAL(OS_OSX, test "$os_osx" = "yes")
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
if test "$os_osx" = "yes"; then
|
|
Packit |
aa0600 |
AC_DEFINE([OS_OSX], [1], [Defined if OS is Mac OSX])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AX_PKG_CHECK_MODULES([GTK_MAC],
|
|
Packit |
aa0600 |
[],
|
|
Packit |
aa0600 |
[gtk-mac-integration-gtk3 >= 2.0.8])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AC_SUBST(GTK_MAC_CFLAGS)
|
|
Packit |
aa0600 |
AC_SUBST(GTK_MAC_LIBS)
|
|
Packit |
aa0600 |
fi
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
# Output files
|
|
Packit |
aa0600 |
AC_CONFIG_FILES([
|
|
Packit |
aa0600 |
gspell-${GSPELL_API_VERSION}.pc:gspell.pc.in
|
|
Packit |
aa0600 |
Makefile
|
|
Packit |
aa0600 |
docs/Makefile
|
|
Packit |
aa0600 |
docs/reference/gspell-docs.xml
|
|
Packit |
aa0600 |
docs/reference/intro.xml
|
|
Packit |
aa0600 |
docs/reference/Makefile
|
|
Packit |
aa0600 |
gspell/Makefile
|
|
Packit |
aa0600 |
gspell/resources/Makefile
|
|
Packit |
aa0600 |
gspell-app/Makefile
|
|
Packit |
aa0600 |
po/Makefile.in
|
|
Packit |
aa0600 |
tests/Makefile
|
|
Packit |
aa0600 |
testsuite/Makefile
|
|
Packit |
aa0600 |
])
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
AC_OUTPUT
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
echo "
|
|
Packit |
aa0600 |
Configuration:
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
${PACKAGE_NAME} version ${PACKAGE_VERSION}
|
|
Packit |
aa0600 |
|
|
Packit |
aa0600 |
Source code location: ${srcdir}
|
|
Packit |
aa0600 |
Prefix: ${prefix}
|
|
Packit |
aa0600 |
Compiler: ${CC}
|
|
Packit |
aa0600 |
Documentation: ${enable_gtk_doc}
|
|
Packit |
aa0600 |
GObject introspection: ${found_introspection}
|
|
Packit |
aa0600 |
Vala: ${enable_vala}
|
|
Packit |
aa0600 |
Code coverage: ${enable_code_coverage}
|
|
Packit |
aa0600 |
Valgrind check: ${enable_valgrind}
|
|
Packit |
aa0600 |
Installed tests: ${enable_installed_tests}
|
|
Packit |
aa0600 |
"
|