grim/guifications2

5e56343a7607
A bunch of gtk3 updates, need to figure out the transition to cairo though :-/
AC_INIT([pidgin-guifications], [2.17dev], [guifications-devel@lists.guifications.org])
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(pre_config.h)
AM_INIT_AUTOMAKE([1.11 gnu dist-bzip2 dist-zip dist-xz])
AM_SILENT_RULES([yes])
AC_PREREQ([2.50])
AC_PATH_PROG(sedpath, sed)
AC_DISABLE_STATIC
# Make sure we have pkg-config
PKG_PROG_PKG_CONFIG()
# Setup libtool
LT_INIT
LT_LANG([C])
LIBTOOL="$LIBTOOL --silent"
# I'm lazy and figured config.h is the best place for this ;)
AC_DEFINE_UNQUOTED(GF_WEBSITE, "https://www.guifications.org/projects/gf2", [Guifications Website])
# Our header
AH_TOP([ /* our header */
#ifndef _GF_CONFIG_H
#define _GF_CONFIG_H
])
AH_BOTTOM([
#endif /* _GF_CONFIG_H */
])
# Good o' gettext
AC_PROG_INTLTOOL
GETTEXT_PACKAGE=guifications
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used.])
ALL_LINGUAS="bn cs de en_AU en_GB es fr gl he hu it ja mk nl no pt pt_BR ru sk sr sr@Latn sv uk zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
# Look for the C compiler
CFLAGS_save="$CFLAGS"
AC_PROG_CC
CFLAGS="$CFLAGS_save"
AC_ARG_ENABLE(debug,AS_HELP_STRING([--enable-debug],[compile with debugging support]),,enable_debug=no)
AC_ARG_ENABLE(deprecated,AS_HELP_STRING([--disable-deprecated],[compile without deprecated API usage]),,enable_deprecated=yes)
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
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
AC_SUBST(DEBUG_CFLAGS)
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall -g -g3"
fi
AC_SUBST(CFLAGS)
###############################################################################
# Dependencies
###############################################################################
# purple
PKG_CHECK_MODULES(PURPLE, purple-3)
AC_SUBST(PURPLE_CFLAGS)
AC_SUBST(PURPLE_LIBS)
# pidgin
PKG_CHECK_MODULES(PIDGIN, pidgin-3)
AC_SUBST(PIDGIN_CFLAGS)
AC_SUBST(PIDGIN_LIBS)
# if the user has given as a prefix, we use that, otherwise we install to the
# prefix that pidgin was installed with
if test x"$prefix" = x"NONE" ; then
PIDGIN_LIBDIR=`pkg-config --variable=libdir pidgin`
PIDGIN_DATADIR=`pkg-config --variable=datadir pidgin`
else
PIDGIN_LIBDIR="$libdir"
PIDGIN_DATADIR="$datadir"
fi
AC_SUBST(PIDGIN_LIBDIR)
AC_SUBST(PIDGIN_DATADIR)
# glib
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.14])
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
# gtk
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.14])
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)
# cairo
PKG_CHECK_MODULES(CAIRO, [cairo])
AC_SUBST(CAIRO_LIBS)
AC_SUBST(CAIRO_CFLAGS)
# freetype 2
PKG_CHECK_MODULES(PANGOFT2, pangoft2 >= 1.1.0,
[
AC_DEFINE(HAVE_PANGOFT2, 1, [Define if we have found pangoft2.])
])
AC_SUBST(PANGOFT2_CFLAGS)
AC_SUBST(PANGOFT2_LIBS)
# this is a hack since the win32 build doesn't use autotools
AM_CONDITIONAL(USE_X11, true)
AM_CONDITIONAL(USE_WIN32, false)
dnl #######################################################################
dnl # Disable installation of translation files
dnl #######################################################################
AC_ARG_ENABLE(nls,AS_HELP_STRING([--enable-nls],[enable installation of translation files]),enable_i18n="$enableval",enable_i18n=yes)
AM_CONDITIONAL(INSTALL_I18N, test "x$enable_i18n" = "xyes")
#
# Version stuff
#
AC_CONFIG_COMMANDS_PRE([
if test -e VERSION; then
cp -p VERSION VERSION.ac-save
fi
])
AC_CONFIG_COMMANDS_POST([
cmp VERSION VERSION.ac-save || touch -r VERSION.ac-save VERSION
rm -f VERSION.ac-save
])
#
# Finish up
#
AC_OUTPUT([Makefile
VERSION
pidgin-guifications.spec
doc/Makefile
nsis/Makefile
nsis/translations/Makefile
pixmaps/Makefile
po/Makefile.in
src/Makefile
src/win32/Makefile
src/x11/Makefile
themes/Makefile
])
cat << EOF
Configuration complete
Debugging enabled..............: $enable_debug
Deprecated API enabled.........: $enable_deprecated
Type make to compile
Thank you for using Guifications!
EOF