grim/guifications2

a bunch of cleanups for configure.ac

2011-12-04, Gary Kramlich
70b5ebc7b69a
Parents 369fa665c856
Children 3d05b66b03f8
a bunch of cleanups for configure.ac
  • +22 -39
    configure.ac
  • --- a/configure.ac Sun Dec 04 21:15:54 2011 -0600
    +++ b/configure.ac Sun Dec 04 21:16:07 2011 -0600
    @@ -1,13 +1,8 @@
    -#
    -# Most of this configure script was ripped from pidgin or the
    -# pidgin-encryption configure script, thanks guys ;)
    -#
    -
    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])
    +AM_INIT_AUTOMAKE([1.11 gnu dist-bzip2 dist-zip dist-xz])
    AM_SILENT_RULES([yes])
    AC_PREREQ([2.50])
    @@ -15,25 +10,18 @@
    AC_PATH_PROG(sedpath, sed)
    AC_DISABLE_STATIC
    -dnl # Make sure we have pkg-config
    +# 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
    @@ -42,9 +30,7 @@
    #endif /* _GF_CONFIG_H */
    ])
    -#
    # Good o' gettext
    -#
    AC_PROG_INTLTOOL
    GETTEXT_PACKAGE=guifications
    @@ -54,15 +40,13 @@
    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, [ --enable-debug compile with debugging support],,enable_debug=no)
    -AC_ARG_ENABLE(deprecated, [ --disable-deprecated compile without deprecated API usage],,enable_deprecated=yes)
    +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.])
    @@ -74,21 +58,26 @@
    AC_SUBST(DEBUG_CFLAGS)
    if test "x$GCC" = "xyes"; then
    - CFLAGS="$CFLAGS -Wall -g3"
    + CFLAGS="$CFLAGS -Wall -g -g3"
    fi
    AC_SUBST(CFLAGS)
    -# check for purple
    +###############################################################################
    +# Dependencies
    +###############################################################################
    +
    +# purple
    PKG_CHECK_MODULES(PURPLE, purple-3)
    AC_SUBST(PURPLE_CFLAGS)
    AC_SUBST(PURPLE_LIBS)
    -#
    -# Check for pidgin
    -#
    +# pidgin
    +PKG_CHECK_MODULES(PIDGIN, pidgin-3)
    +AC_SUBST(PIDGIN_CFLAGS)
    +AC_SUBST(PIDGIN_LIBS)
    -PKG_CHECK_MODULES(PIDGIN, pidgin-3)
    -
    +# 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`
    @@ -96,31 +85,25 @@
    PIDGIN_LIBDIR="$libdir"
    PIDGIN_DATADIR="$datadir"
    fi
    -
    -AC_SUBST(PIDGIN_CFLAGS)
    -AC_SUBST(PIDGIN_LIBS)
    AC_SUBST(PIDGIN_LIBDIR)
    AC_SUBST(PIDGIN_DATADIR)
    -#
    -# check for gtk and other dependencies
    -#
    +# 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)
    -#
    -# check for freetype 2
    -#
    -
    +# freetype 2
    PKG_CHECK_MODULES(PANGOFT2, pangoft2 >= 1.1.0,
    [
    AC_DEFINE(HAVE_PANGOFT2, 1, [Define if we have found pangoft2.])
    @@ -128,14 +111,14 @@
    AC_SUBST(PANGOFT2_CFLAGS)
    AC_SUBST(PANGOFT2_LIBS)
    -dnl This is a hack since the win32 build doesn't use autotools
    +# 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, AC_HELP_STRING([--enable-nls], [enable installation of translation files]), enable_i18n="$enableval", enable_i18n=yes)
    +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")