1 # ===========================================================================
2 # http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html
3 # ===========================================================================
7 # AX_COMPILER_FLAGS_GIR([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-MINIMUM-FLAGS], [EXTRA-YES-FLAGS], [EXTRA-MAXIMUM-FLAGS], [EXTRA-ERROR-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"],[
46 ],ax_warn_scannerflags_variable)
48 AS_IF([test "$ax_enable_compile_warnings" != "no" -a \
49 "$ax_enable_compile_warnings" != "minimum"],[
51 AX_APPEND_FLAG([$5],ax_warn_scannerflags_variable)
53 AS_IF([test "$ax_enable_compile_warnings" = "maximum" -o \
54 "$ax_enable_compile_warnings" = "error"],[
56 AX_APPEND_FLAG([$6],ax_warn_scannerflags_variable)
58 AS_IF([test "$ax_enable_compile_warnings" = "error"],[
63 ],ax_warn_scannerflags_variable)
66 # Substitute the variables
67 AC_SUBST(ax_warn_scannerflags_variable)
68 ])dnl AX_COMPILER_FLAGS