diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2015-07-21 11:01:46 +0100 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-07-28 07:37:35 -0300 |
commit | 3799b85c5cad9ec688a61b36a9d1d201b1845207 (patch) | |
tree | 6fab95b1ae5b39bb742953f3d870ebe4d4b62703 /configure.ac | |
parent | f9ce96d51dd94064b06d22a76953ea2ce1c98f28 (diff) | |
download | gnome-todo-3799b85c5cad9ec688a61b36a9d1d201b1845207.tar.gz |
build: Refactor using standard macros
We should use the AX_* macros from autoconf-archive to improve the
readability and maintainability of the build system.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 55 |
1 files changed, 24 insertions, 31 deletions
diff --git a/configure.ac b/configure.ac index cec28512..8b5d51b6 100644 --- a/configure.ac +++ b/configure.ac @@ -14,21 +14,20 @@ AM_SILENT_RULES([yes]) # Releases do not have git directories AX_IS_RELEASE([git-directory]) -dnl *************************************************************************** -dnl Internationalization -dnl *************************************************************************** -IT_PROG_INTLTOOL([0.40.6]) -PKG_PROG_PKG_CONFIG([0.22]) - -GETTEXT_PACKAGE=AC_PACKAGE_TARNAME -AC_SUBST(GETTEXT_PACKAGE) -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) - ## don't rerun to this point if we abort AC_CACHE_SAVE -AM_PROG_CC_C_O -AC_PROG_CXX +# We require additional macros later on +AX_REQUIRE_DEFINED([APPSTREAM_XML]) +AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL]) + +# Add debug symbol +AX_CHECK_ENABLE_DEBUG([yes], [GNOME_TODO_ENABLE_DEBUG]) + +# Enable compiler warnings +AX_COMPILER_FLAGS([GNOME_TODO_WARN_CFLAGS], [GNOME_TODO_WARN_LDFLAGS]) + +AC_PROG_CC_C_O AC_PROG_INSTALL # enable libtool @@ -38,32 +37,26 @@ LT_INIT([disable-static]) ## don't rerun to this point if we abort AC_CACHE_SAVE +PKG_PROG_PKG_CONFIG + GLIB_GSETTINGS AM_GLIB_GNU_GETTEXT -# We require additional macros -AX_REQUIRE_DEFINED([APPSTREAM_XML]) +dnl *************************************************************************** +dnl Internationalization +dnl *************************************************************************** +IT_PROG_INTLTOOL([0.40.6]) + +GETTEXT_PACKAGE=AC_PACKAGE_TARNAME +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name]) dnl ================================================================ dnl Misc dnl ================================================================ -AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums) - -GNOME_COMPILE_WARNINGS(maximum) - -MAINTAINER_COMPILER_FLAGS="\ - $MAINTAINER_COMPILER_FLAGS\ - -Wall -Wcast-align -Wuninitialized\ - -Wno-strict-aliasing -Wempty-body -Wformat\ - -Wformat-security -Wformat-nonliteral -Winit-self\ - -Wdeclaration-after-statement -Wvla\ - -Wpointer-arith -Wmissing-declarations\ - -Wcast-align -Wmissing-prototypes\ - -Wredundant-decls" - -# strip leading spaces -MAINTAINER_COMPILER_FLAGS=${MAINTAINER_COMPILER_FLAGS#* } -AC_SUBST(MAINTAINER_COMPILER_FLAGS) + +GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0` +AC_SUBST([GLIB_COMPILE_RESOURCES]) PKG_CHECK_MODULES(GNOME_TODO, gmodule-export-2.0 |