dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.62)
AC_INIT([libeasyfc], 0.14.0, [http://github.com/tagoh/libeasyfc/issues])
. `dirname $0`/requires
AM_INIT_AUTOMAKE([1.11 -Wno-portability])
dnl silent build rules, requires at least automake-1.11.
dnl by either passing --enable-silent-rules to configure or
dnl V=0 to make.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4macros])
AX_CHECK_ENABLE_DEBUG
AM_CONDITIONAL(ENABLE_DEBUG, test $ax_enable_debug = yes)
LT_PREREQ([2.2])
LT_INIT([disable-static])
AC_PROG_CC
GNOME_COMPILE_WARNINGS
GNOME_COMMON_INIT
GNOME_MAINTAINER_MODE_DEFINES
CFLAGS="$CFLAGS $WARN_CFLAGS"
dnl ======================================================================
dnl Libraries versioning
dnl ======================================================================
dnl Quote from Updating library version information at libtool.info
dnl and renumbering
dnl
dnl 1. Update the version information only immediately before a public
dnl release of your software. More frequent updates are unnecessary,
dnl and only guarantee that the current interface number gets larger
dnl faster.
dnl 2. If the library source code has changed at all since the last
dnl update, then increment REVISION (`C:R:A' becomes `C:r+1:A')
dnl 3. If any interfaces have been added, removed, or changed since the
dnl last update, increment CURRENT, and set REVISION to 0.
dnl 4. If any interfaces have been added since the last public release,
dnl then increment AGE.
dnl 5. If any interfaces have been removed since the last public release,
dnl then set AGE to 0.
dnl
dnl for libeasyfc.la
LT_CURRENT=6
LT_REVISION=0
LT_AGE=6
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
AC_SUBST(LT_AGE)
dnl for libeasyfc-gobject.la
LT_G_CURRENT=6
LT_G_REVISION=0
LT_G_AGE=6
AC_SUBST(LT_G_CURRENT)
AC_SUBST(LT_G_REVISION)
AC_SUBST(LT_G_AGE)
dnl ======================================================================
dnl define variables
dnl ======================================================================
AM_MISSING_PROG([GIT], [git])
dnl ======================================================================
dnl functions testing
dnl ======================================================================
dnl ======================================================================
dnl gettext stuff
dnl ======================================================================
GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
AM_GLIB_GNU_GETTEXT
dnl ======================================================================
dnl check pkg-config stuff
dnl ======================================================================
PKG_CONFIG_REQUIRES=
PKG_CONFIG_REQUIRES_PRIVATELY=
PKG_CONFIG_REQUIRES_G="libeasyfc = $VERSION"
PKG_CONFIG_REQUIRES_G_PRIVATELY=
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= $FONTCONFIG_REQUIRED)
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES fontconfig >= $FONTCONFIG_REQUIRED"
PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_REQUIRED)
PKG_CONFIG_REQUIRES_PRIVATELY="$PKG_CONFIG_REQUIRES_PRIVATELY freetype2 >= $FREETYPE_REQUIRED"
PKG_CHECK_MODULES(GOBJECT, gobject-2.0 >= $GOBJECT_REQUIRED, has_gobject=yes, has_gobject=no)
PKG_CONFIG_REQUIRES_G="$PKG_CONFIG_REQUIRES_G gobject-2.0 >= $GOBJECT_REQUIRED"
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
PKG_CONFIG_REQUIRES_PRIVATELY="$PKG_CONFIG_REQUIRES_PRIVATELY libxml-2.0 >= $LIBXML2_REQUIRED"
PKG_CHECK_MODULES(HARFBUZZ, harfbuzz >= $HARFBUZZ_REQUIRED)
PKG_CONFIG_REQUIRES_PRIVATELY="$PKG_CONFIG_REQUIRES_PRIVATELY harfbuzz >= $HARFBUZZ_REQUIRED"
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES glib-2.0 >= $GLIB_REQUIRED"
AM_CONDITIONAL(ENABLE_GOBJECT, test x$has_gobject != xno)
AC_SUBST(PKG_CONFIG_REQUIRES)
AC_SUBST(PKG_CONFIG_REQUIRES_PRIVATELY)
AC_SUBST(PKG_CONFIG_REQUIRES_G)
AC_SUBST(PKG_CONFIG_REQUIRES_G_PRIVATELY)
dnl ======================================================================
dnl check another libraries
dnl ======================================================================
dnl AM_PATH_GLIB_2_0($GLIB_REQUIRED, :,
dnl AC_MSG_ERROR([
dnl *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of
dnl *** GLIB is always available from ftp://ftp.gtk.org/.]),
dnl glib)
GOBJECT_INTROSPECTION_CHECK([1.30.0])
GTK_DOC_CHECK(1.0)
dnl ======================================================================
dnl options
dnl ======================================================================
dnl ======================================================================
dnl output
dnl ======================================================================
AC_CONFIG_FILES([
Makefile
docs/Makefile
docs/version.xml
libeasyfc.pc
libeasyfc-gobject.pc
libeasyfc/Makefile
libeasyfc-gobject/Makefile
tests/Makefile
])
AC_OUTPUT
dnl ======================================================================
dnl result
dnl ======================================================================
echo ""
echo "========== Build Information =========="
echo " CFLAGS: $CFLAGS"
echo " LDFLAGS: $LDFLAGS"