From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2041) id ABD943858412; Tue, 26 Jul 2022 23:51:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ABD943858412 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Vladimir Mezentsev To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb/binutils-2_39-branch] gprofng: check for the makeinfo version X-Act-Checkin: binutils-gdb X-Git-Author: Vladimir Mezentsev X-Git-Refname: refs/heads/binutils-2_39-branch X-Git-Oldrev: 41b6fc466ce51f094c53b60f767cd000c41d4c2d X-Git-Newrev: fc9672939576752123aebfa3e6f4d4f1b9674dd2 Message-Id: <20220726235127.ABD943858412@sourceware.org> Date: Tue, 26 Jul 2022 23:51:27 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jul 2022 23:51:27 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dfc9672939576= 752123aebfa3e6f4d4f1b9674dd2 commit fc9672939576752123aebfa3e6f4d4f1b9674dd2 Author: Vladimir Mezentsev Date: Mon Jul 25 23:57:46 2022 -0700 gprofng: check for the makeinfo version =20 gprofng/ChangeLog 2022-07-25 Vladimir Mezentsev =20 PR gprofng/29368 * configure.ac: Check for the makeinfo version. * configure: Rebuild. Diff: --- gprofng/configure | 64 ++++++++++++++++++++++++++++++++++++++++++++++++= ++-- gprofng/configure.ac | 22 +++++++++++++++--- 2 files changed, 81 insertions(+), 5 deletions(-) diff --git a/gprofng/configure b/gprofng/configure index 9ea2416f41e..2cddf9dc88f 100755 --- a/gprofng/configure +++ b/gprofng/configure @@ -16709,13 +16709,73 @@ fi =20 =20 # Generate manpages, if possible. +build_man=3Dfalse if test $cross_compiling =3D no; then =20 HELP2MAN=3D${HELP2MAN-"${am_missing_run}help2man"} =20 - build_man=3Dtrue + for ac_prog in makeinfo +do + # Extract the first word of "$ac_prog", so it can be a program name with= args. +set dummy $ac_prog; ac_word=3D$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MAKEINFO+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MAKEINFO"; then + ac_cv_prog_MAKEINFO=3D"$MAKEINFO" # Let the user override the test. else - build_man=3Dfalse +as_save_IFS=3D$IFS; IFS=3D$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=3D$as_save_IFS + test -z "$as_dir" && as_dir=3D. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_MAKEINFO=3D"$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_= ext" >&5 + break 2 + fi +done + done +IFS=3D$as_save_IFS + +fi +fi +MAKEINFO=3D$ac_cv_prog_MAKEINFO +if test -n "$MAKEINFO"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEINFO" >&5 +$as_echo "$MAKEINFO" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$MAKEINFO" && break +done +test -n "$MAKEINFO" || MAKEINFO=3D""@echo makeinfo missing; true"" + + case "$MAKEINFO" in + *true) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: makeinfo = is missing. Info documentation will not be built." >&5 +$as_echo "$as_me: WARNING: gprofng: makeinfo is missing. Info documentatio= n will not be built." >&2;} + ;; + *) + case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in + x*\ [1-5].*|x*\ 6.[0-4].* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: $MAKEINFO is= too old. Info documentation will not be built." >&5 +$as_echo "$as_me: WARNING: gprofng: $MAKEINFO is too old. Info documentati= on will not be built." >&2;} + MAKEINFO=3D"@echo $MAKEINFO is too old, 6.5 or newer required; true" + ;; + x* ) + build_man=3Dtrue + ;; + esac + ;; + esac + fi if test x$build_man =3D xtrue; then BUILD_MAN_TRUE=3D diff --git a/gprofng/configure.ac b/gprofng/configure.ac index 5a0fe1ea477..e9453109602 100644 --- a/gprofng/configure.ac +++ b/gprofng/configure.ac @@ -184,11 +184,27 @@ AM_CONDITIONAL(TCL_TRY, test "${ac_cv_libctf_tcl_try}= " =3D yes) AM_ZLIB =20 # Generate manpages, if possible. +build_man=3Dfalse if test $cross_compiling =3D no; then AM_MISSING_PROG(HELP2MAN, help2man) - build_man=3Dtrue -else - build_man=3Dfalse + AC_CHECK_PROGS([MAKEINFO], makeinfo, ["@echo makeinfo missing; true"]) + case "$MAKEINFO" in + *true) + AC_MSG_WARN([gprofng: makeinfo is missing. Info documentation will n= ot be built.]) + ;; + *) + case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in + x*\ [[1-5]].*|x*\ 6.[[0-4]].* ) + AC_MSG_WARN([gprofng: $MAKEINFO is too old. Info documentation will not= be built.]) + MAKEINFO=3D"@echo $MAKEINFO is too old, 6.5 or newer required; true" + ;; + x* ) + build_man=3Dtrue + ;; + esac + ;; + esac + AC_SUBST(MAKEINFO) fi AM_CONDITIONAL([BUILD_MAN], [test x$build_man =3D xtrue])