From: Jorge Pereira Date: Fri, 2 Aug 2019 19:15:17 +0000 (-0400) Subject: Add configure checks for doxygen and graphviz X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0970828a703ad3ddff00541be9549761c41dbcf7;p=thirdparty%2Ffreeradius-server.git Add configure checks for doxygen and graphviz --- diff --git a/Make.inc.in b/Make.inc.in index 406569f8324..d1b3fcd6ace 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -180,3 +180,5 @@ TESTBIN = $(JLIBTOOL) --quiet --mode=execute $(TESTBINDIR) ASCIIDOCTOR := @ASCIIDOCTOR@ PANDOC := @PANDOC@ PANDOC_ENGINE := @PANDOC_ENGINE@ +DOXYGEN := @DOXYGEN@ +GRAPHVIZ_DOT := @GRAPHVIZ_DOT@ diff --git a/configure b/configure index b14c45dba85..eb4a8fd37d0 100755 --- a/configure +++ b/configure @@ -692,6 +692,8 @@ build_os build_vendor build_cpu build +GRAPHVIZ_DOT +DOXYGEN PERL PANDOC_ENGINE PANDOC @@ -2819,6 +2821,96 @@ $as_echo "$as_me: WARNING: could not find perl" >&2;} fi fi +# Extract the first word of "doxygen", so it can be a program name with args. +set dummy doxygen; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_DOXYGEN+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $DOXYGEN in + [\\/]* | ?:[\\/]*) + ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +DOXYGEN=$ac_cv_path_DOXYGEN +if test -n "$DOXYGEN"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 +$as_echo "$DOXYGEN" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test "x$ac_cv_path_DOXYGEN" != "x"; then + # Extract the first word of "dot", so it can be a program name with args. +set dummy dot; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GRAPHVIZ_DOT+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GRAPHVIZ_DOT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GRAPHVIZ_DOT="$GRAPHVIZ_DOT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GRAPHVIZ_DOT="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GRAPHVIZ_DOT=$ac_cv_path_GRAPHVIZ_DOT +if test -n "$GRAPHVIZ_DOT"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GRAPHVIZ_DOT" >&5 +$as_echo "$GRAPHVIZ_DOT" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$ac_cv_path_GRAPHVIZ_DOT" = "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - Please install the graphviz if you want to build the docs/source" >&5 +$as_echo "$as_me: WARNING: dot not found - Please install the graphviz if you want to build the docs/source" >&2;} + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - Please install if you want build the docs/source" >&5 +$as_echo "$as_me: WARNING: doxygen not found - Please install if you want build the docs/source" >&2;} +fi + # Check whether --enable-developer was given. if test "${enable_developer+set}" = set; then : enableval=$enable_developer; case "$enableval" in diff --git a/configure.ac b/configure.ac index e45bcbbb7eb..6cbef0bffe7 100644 --- a/configure.ac +++ b/configure.ac @@ -111,6 +111,19 @@ if test "x$ac_cv_path_PANDOC" != "x" && test "x$ac_cv_path_ASCIIDOCTOR" != "x"; AX_PROG_PERL_MODULES(JSON, , AC_MSG_WARN([Perl JSON module not found - Please install if you want build the docs])) fi +dnl # +dnl # check for doxygen +dnl # +AC_PATH_PROG(DOXYGEN, doxygen) +if test "x$ac_cv_path_DOXYGEN" != "x"; then + AC_PATH_PROG(GRAPHVIZ_DOT, dot) + if test "x$ac_cv_path_GRAPHVIZ_DOT" = "x"; then + AC_MSG_WARN([dot not found - Please install the graphviz if you want to build the docs/source]) + fi +else + AC_MSG_WARN([doxygen not found - Please install if you want build the docs/source]) +fi + dnl # dnl # Enable developer features like debugging symbols. dnl # These checks must be done before expanding the AC_PROG_CC