diff --git a/autotools/m4/phpjson.m4 b/autotools/m4/phpjson.m4 new file mode 100644 index 000000000..32fc6bc2a --- /dev/null +++ b/autotools/m4/phpjson.m4 @@ -0,0 +1,17 @@ +# +# This macro test for php-json (used by webgui) +# +AC_DEFUN([AX_PHPJSON_CHECK], +[ + chkfile="/usr/lib64/php/modules/json.so" + + AC_CHECK_FILE([$chkfile], + [ + ], [ + AC_MSG_WARN(***********************************************) + AC_MSG_WARN(php-json not found under $chkfile) + AC_MSG_WARN(webgui will build however it may fail to render) + AC_MSG_WARN(graphs yum install php-json?) + AC_MSG_WARN(***********************************************) + ]) +]) diff --git a/configure.ac b/configure.ac index 367d93312..e05923ae3 100644 --- a/configure.ac +++ b/configure.ac @@ -128,6 +128,12 @@ AX_ENABLE_FLAG([gprof], [test only: add gprof info to the binaries], [-g -pg]) AX_ENABLE_FLAG([gcov], [test only: add gcov info to the binaries], [--coverage]) AX_VALGRIND_CHECK +# +# Check for php-json +# +AX_PHPJSON_CHECK + + # behavior flags AX_DISABLE_FLAG([atfunc], [Don't use 'at' functions for scanning], [-D_NO_AT_FUNC])