Skip to content

Commit

Permalink
Enable Wall, allocate an arena for context
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Feb 12, 2024
1 parent 29b2ec1 commit 79d9163
Show file tree
Hide file tree
Showing 13 changed files with 422 additions and 52 deletions.
30 changes: 6 additions & 24 deletions config.m4
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

# vim: tabstop=4:softtabstop=4:shiftwidth=4:noexpandtab
m4_include(m4/ax_require_defined.m4)
m4_include(m4/ax_prepend_flag.m4)
m4_include(m4/ax_compiler_vendor.m4)
m4_include(m4/ax_cflags_warn_all.m4)

# args
PHP_ARG_ENABLE(vyrtue, whether to enable vyrtue support,
[AS_HELP_STRING([--enable-vyrtue], [Enable vyrtue support])])

Expand All @@ -12,29 +14,9 @@ AC_DEFUN([PHP_VYRTUE_ADD_SOURCES], [
PHP_VYRTUE_SOURCES="$PHP_VYRTUE_SOURCES $1"
])

# main
if test "$PHP_VYRTUE" != "no"; then
AC_MSG_CHECKING([if compiling with gcc])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [[
#ifndef __GNUC__
not gcc
#endif
]])],
[GCC=yes], [GCC=no])
AC_MSG_RESULT([$GCC])

AC_MSG_CHECKING([if compiling with clang])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [[
#ifndef __clang__
not clang
#endif
]])],
[CLANG=yes], [CLANG=no])
AC_MSG_RESULT([$CLANG])

AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
AX_CFLAGS_WARN_ALL([WARN_CFLAGS])
CFLAGS="$WARN_CFLAGS $CFLAGS"

if test "$PHP_VYRTUE_DEBUG" == "yes"; then
AC_DEFINE([VYRTUE_DEBUG], [1], [Enable vyrtue debug support])
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
inputsFrom = [package];
buildInputs = with pkgs; [
actionlint
autoconf-archive
clang-tools
lcov
gdb
Expand Down
158 changes: 158 additions & 0 deletions m4/ax_cflags_warn_all.m4

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

119 changes: 119 additions & 0 deletions m4/ax_compiler_vendor.m4

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 51 additions & 0 deletions m4/ax_prepend_flag.m4

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 79d9163

Please sign in to comment.