If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
-# ===========================================================================
+# ============================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
+# ============================================================================
#
# SYNOPSIS
#
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
+# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 5
+#serial 6
AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
])dnl AX_APPEND_COMPILE_FLAGS
# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
+# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
# ===========================================================================
#
# SYNOPSIS
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
+# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 5
+#serial 6
AC_DEFUN([AX_APPEND_LINK_FLAGS],
[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
])dnl AX_APPEND_LINK_FLAGS
# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
+# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
# ===========================================================================
#
# SYNOPSIS
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
+# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 4
+#serial 5
AC_DEFUN([AX_CHECK_LINK_FLAG],
[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
])dnl AX_CHECK_LINK_FLAGS
# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html
+# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html
# ===========================================================================
#
# SYNOPSIS
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 13
+#serial 14
# _AX_COMPILER_FLAGS_LANG([LANGNAME])
m4_defun([_AX_COMPILER_FLAGS_LANG],
AX_COMPILER_FLAGS_GIR([WARN_SCANNERFLAGS],[$ax_compiler_flags_is_release])
])dnl AX_COMPILER_FLAGS
-# ============================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html
-# ============================================================================
+# =============================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html
+# =============================================================================
#
# SYNOPSIS
#
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 11
+#serial 14
AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[
AC_REQUIRE([AC_PROG_SED])
AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
# Variable names
- m4_define(ax_warn_cflags_variable,
+ m4_define([ax_warn_cflags_variable],
[m4_normalize(ifelse([$1],,[WARN_CFLAGS],[$1]))])
AC_LANG_PUSH([C])
ax_compiler_flags_test=""
])
+ # Check that -Wno-suggest-attribute=format is supported
+ AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[
+ ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format"
+ ],[
+ ax_compiler_no_suggest_attribute_flags=""
+ ])
+
# Base flags
AX_APPEND_COMPILE_FLAGS([ dnl
-fno-strict-aliasing dnl
AX_APPEND_FLAG([-Werror],ax_warn_cflags_variable)
AX_APPEND_COMPILE_FLAGS([ dnl
- -Wno-suggest-attribute=format dnl
+ [$ax_compiler_no_suggest_attribute_flags] dnl
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
])
AC_SUBST(ax_warn_cflags_variable)
])dnl AX_COMPILER_FLAGS
-# ==============================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cxxflags.html
-# ==============================================================================
+# ===============================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cxxflags.html
+# ===============================================================================
#
# SYNOPSIS
#
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 7
+#serial 10
AC_DEFUN([AX_COMPILER_FLAGS_CXXFLAGS],[
AC_REQUIRE([AC_PROG_SED])
AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
# Variable names
- m4_define(ax_warn_cxxflags_variable,
+ m4_define([ax_warn_cxxflags_variable],
[m4_normalize(ifelse([$1],,[WARN_CXXFLAGS],[$1]))])
AC_LANG_PUSH([C++])
ax_compiler_flags_test=""
])
+ # Check that -Wno-suggest-attribute=format is supported
+ AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[
+ ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format"
+ ],[
+ ax_compiler_no_suggest_attribute_flags=""
+ ])
+
# Base flags
AX_APPEND_COMPILE_FLAGS([ dnl
-fno-strict-aliasing dnl
AX_APPEND_FLAG([-Werror],ax_warn_cxxflags_variable)
AX_APPEND_COMPILE_FLAGS([ dnl
- -Wno-suggest-attribute=format dnl
+ [$ax_compiler_no_suggest_attribute_flags] dnl
],ax_warn_cxxflags_variable,[$ax_compiler_flags_test])
])
])dnl AX_COMPILER_FLAGS_CXXFLAGS
# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html
+# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html
# ===========================================================================
#
# SYNOPSIS
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 4
+#serial 6
AC_DEFUN([AX_COMPILER_FLAGS_GIR],[
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
# Variable names
- m4_define(ax_warn_scannerflags_variable,
+ m4_define([ax_warn_scannerflags_variable],
[m4_normalize(ifelse([$1],,[WARN_SCANNERFLAGS],[$1]))])
# Base flags
AC_SUBST(ax_warn_scannerflags_variable)
])dnl AX_COMPILER_FLAGS
-# =============================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html
-# =============================================================================
+# ==============================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html
+# ==============================================================================
#
# SYNOPSIS
#
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 5
+#serial 8
AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[
AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS])
AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
+ AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
# Variable names
- m4_define(ax_warn_ldflags_variable,
+ m4_define([ax_warn_ldflags_variable],
[m4_normalize(ifelse([$1],,[WARN_LDFLAGS],[$1]))])
# Always pass -Werror=unknown-warning-option to get Clang to fail on bad
ax_compiler_flags_test=""
])
+ # macOS linker does not have --as-needed
+ AX_CHECK_LINK_FLAG([-Wl,--no-as-needed], [
+ ax_compiler_flags_as_needed_option="-Wl,--no-as-needed"
+ ], [
+ ax_compiler_flags_as_needed_option=""
+ ])
+
+ # macOS linker speaks with a different accent
+ ax_compiler_flags_fatal_warnings_option=""
+ AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings], [
+ ax_compiler_flags_fatal_warnings_option="-Wl,--fatal-warnings"
+ ])
+ AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings], [
+ ax_compiler_flags_fatal_warnings_option="-Wl,-fatal_warnings"
+ ])
+
# Base flags
AX_APPEND_LINK_FLAGS([ dnl
- -Wl,--no-as-needed dnl
+ $ax_compiler_flags_as_needed_option dnl
$3 dnl
],ax_warn_ldflags_variable,[$ax_compiler_flags_test])
# suggest-attribute=format is disabled because it gives too many false
# positives
AX_APPEND_LINK_FLAGS([ dnl
- -Wl,--fatal-warnings dnl
+ $ax_compiler_flags_fatal_warnings_option dnl
],ax_warn_ldflags_variable,[$ax_compiler_flags_test])
])