grim/guifications3

Closing this branch since we moved to "default" for it a while ago now
org.guifications.gf3
2009-12-06, Gary Kramlich
3707becf4df7
Closing this branch since we moved to "default" for it a while ago now
dnl Process this file with autoconf to create configure.
dnl ################################################################
dnl # Initialize autoconf
dnl ################################################################
AC_INIT(purple-guifications, 3.0.0dev, guifications-devel@lists.guifications.org)
AC_PREREQ(2.50)
AC_CANONICAL_SYSTEM
AC_COPYRIGHT([Copyright 2003-2009 Gary Kramlich])
dnl ################################################################
dnl # Initialize automake
dnl ################################################################
AM_INIT_AUTOMAKE([gnu dist-bzip2])
AC_PATH_PROG(sedpath, sed)
AC_DISABLE_STATIC
dnl ################################################################
dnl # Configuration file
dnl ################################################################
AM_CONFIG_HEADER(config.h)
dnl # Stash configure args
AC_DEFINE_UNQUOTED(CONFIG_ARGS, "$ac_configure_args", [configure arguments])
# set our language to C
AC_LANG([C])
dnl #######################################################################
dnl # Make sure we have pkg-config
dnl #######################################################################
PKG_PROG_PKG_CONFIG
dnl #######################################################################
dnl # Setup libtool
dnl #######################################################################
AM_PROG_LIBTOOL
LIBTOOL="$LIBTOOL --silent"
dnl #######################################################################
dnl # I'm lazy and figured config.h is the best place for this ;)
dnl #######################################################################
AC_DEFINE_UNQUOTED(GUIFICATIONS_WEBSITE, "http://guifications.org/", [guifications website])
dnl #######################################################################
dnl # Our header
dnl #######################################################################
AH_TOP([ /* our header */
#ifndef CONFIG_H
#define CONFIG_H
])
AH_BOTTOM([
#endif /* CONFIG_H */
])
dnl #######################################################################
dnl # intltool
dnl #######################################################################
AC_PROG_INTLTOOL
GETTEXT_PACKAGE=purple-guifications
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT
dnl #######################################################################
dnl # Look for the C compiler
dnl #######################################################################
AC_MSG_CHECKING([WMD's])
AC_MSG_RESULT(no)
CFLAGS_save="$CFLAGS"
AC_PROG_CC
CFLAGS="$CFLAGS_save"
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[compile with debugging support])
,,enable_debug=no)
if test x"$enable_debug" = x"yes" ; then
AC_DEFINE(DEBUG, 1, [Define if debugging is enabled.])
fi
if test x"$GCC" = x"yes"; then
CFLAGS="$CFLAGS -Wall -g3"
fi
AC_SUBST(CFLAGS)
dnl #######################################################################
dnl # check for glib and other glib dependencies
dnl #######################################################################
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14.0)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
dnl #######################################################################
dnl # check for libpurple
dnl #######################################################################
PKG_CHECK_MODULES(PURPLE, purple)
AC_SUBST(PURPLE_CFLAGS)
AC_SUBST(PURPLE_LIBS)
PURPLE_LIBDIR="$libdir"
if test x"$prefix" = x"NONE" ; then
dnl # when no prefix is given, we grab the purple lib and data directories
dnl # and use those instead. If a prefix was given, we just use that.
PURPLE_LIBDIR=`pkg-config --variable=libdir purple`
fi
PURPLE_LIBDIR="$PURPLE_LIBDIR/purple-2/"
AC_SUBST(PURPLE_LIBDIR)
dnl #######################################################################
dnl # check for gflib goodies
dnl #######################################################################
PKG_CHECK_MODULES(GFLIB, gflib)
AC_SUBST(GFLIB_CFLAGS)
AC_SUBST(GFLIB_LIBS)
dnl #######################################################################
dnl # Finish up
dnl #######################################################################
AC_OUTPUT([Makefile
pixmaps/Makefile
po/Makefile.in
src/Makefile
])
dnl #######################################################################
dnl # Ouput!!
dnl #######################################################################
echo;
echo AC_PACKAGE_NAME AC_PACKAGE_VERSION Configuration complete
echo;
echo Installing to....................: $PURPLE_LIBDIR
echo;
echo Debugging enabled................: $enable_debug
echo;
echo Type make to compile
echo;