1 # ===========================================================================
2 # https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html
3 # ===========================================================================
7 # AX_COMPILER_FLAGS_GIR([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS])
11 # Add warning flags for the g-ir-scanner (from GObject Introspection) to
12 # VARIABLE, which defaults to WARN_SCANNERFLAGS. VARIABLE is AC_SUBST-ed
13 # by this macro, but must be manually added to the SCANNERFLAGS variable
14 # for each GIR target in the code base.
16 # This macro depends on the environment set up by AX_COMPILER_FLAGS.
17 # Specifically, it uses the value of $ax_enable_compile_warnings to decide
18 # which flags to enable.
22 # Copyright (c) 2015 Philip Withnall <philip@tecnocode.co.uk>
24 # Copying and distribution of this file, with or without modification, are
25 # permitted in any medium without royalty provided the copyright notice
26 # and this notice are preserved. This file is offered as-is, without any
31 AC_DEFUN([AX_COMPILER_FLAGS_GIR],[
32 AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
35 m4_define([ax_warn_scannerflags_variable],
36 [m4_normalize(ifelse([$1],,[WARN_SCANNERFLAGS],[$1]))])
39 AX_APPEND_FLAG([$3],ax_warn_scannerflags_variable)
41 AS_IF([test "$ax_enable_compile_warnings" != "no"],[
49 ],ax_warn_scannerflags_variable)
51 AS_IF([test "$ax_enable_compile_warnings" = "error"],[
55 ],ax_warn_scannerflags_variable)
58 # Substitute the variables
59 AC_SUBST(ax_warn_scannerflags_variable)
60 ])dnl AX_COMPILER_FLAGS