AC_INIT(xapp, 1.0.3)
AC_CONFIG_SRCDIR(libxapp)
m4_ifdef([AX_IS_RELEASE], [AX_IS_RELEASE([always])])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([ACLOCAL_AMFLAGS], ["-I $ac_macro_dir \${ACLOCAL_FLAGS}"])
# Before making a release, the LT_VERSION string should be modified.
# The string is of the form C:R:A.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1:0:A+1
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1:0:0
# - If the interface is the same as the previous version, change to C:R+1:A
LT_VERSION=1:0:0
AC_SUBST(LT_VERSION)
LT_PREREQ([2.2.6])
LT_INIT([dlopen win32-dll disable-static])
IT_PROG_INTLTOOL([0.40.6])
AC_PROG_CC
PKG_PROG_PKG_CONFIG
m4_ifdef([AX_COMPILER_FLAGS],
[AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])])
GTK_DOC_CHECK([1.0],[--flavour=no-tmpl])
AC_ARG_ENABLE(deprecation_flags,
[AC_HELP_STRING([--enable-deprecation-flags],
[use *_DISABLE_DEPRECATED flags @<:@default=no@:>@])],,
[enable_deprecation_flags=no])
if test "x$enable_deprecation_flags" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
dnl If you add a version number here, you *must* add an AC_SUBST line for
dnl it too, or it will never make it into the spec file!
GDK_PIXBUF_REQUIRED=2.22.0
GTK_REQUIRED=3.3.16
GLIB_REQUIRED=2.37.3
AC_SUBST(GTK_REQUIRED)
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GDK_PIXBUF_REQUIRED)
PKG_CHECK_MODULES(XLIB, x11,
X11_PACKAGE=x11,
[X11_PACKAGE=
AC_PATH_XTRA
if test "x$no_x" = xyes; then
AC_MSG_ERROR("no (requires X development libraries)")
else
XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
XLIB_CFLAGS=$X_CFLAGS
fi])
AC_SUBST(X11_PACKAGE)
AC_SUBST(XLIB_CFLAGS)
AC_SUBST(XLIB_LIBS)
AC_ARG_ENABLE([gtk-doc],
AC_HELP_STRING([--enable-gtk-doc],
[use gtk-doc to build documentation [[default=yes]]]),,
enable_gtk_doc=yes)
dnl pkg-config dependency checks
PKG_CHECK_MODULES(XAPP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
gtk+-3.0 >= $GTK_REQUIRED
glib-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED
cairo
libgnomekbdui)
dnl Language Support
GETTEXT_PACKAGE=xapp
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The gettext translation domain])
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
GLIB_GSETTINGS
GOBJECT_INTROSPECTION_CHECK([0.9.7])
AC_CONFIG_FILES([
Makefile
docs/Makefile
docs/reference/Makefile
libxapp/Makefile
libxapp/xapp.pc
libxapp/xapp-uninstalled.pc
schemas/Makefile
po/Makefile.in
files/Makefile
])
AC_OUTPUT
dnl ---------------------------------------------------------------------------
dnl - Show summary
dnl ---------------------------------------------------------------------------
echo "
prefix: ${prefix}
exec_prefix: ${exec_prefix}
libdir: ${libdir}
bindir: ${bindir}
sbindir: ${sbindir}
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
datadir: ${datadir}
source code location: ${srcdir}
compiler: ${CC}
cflags: ${CFLAGS}
Maintainer mode: ${USE_MAINTAINER_MODE}
Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}
"