public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gprofng: check for the makeinfo version
@ 2022-07-26  7:19 vladimir.mezentsev
  0 siblings, 0 replies; 2+ messages in thread
From: vladimir.mezentsev @ 2022-07-26  7:19 UTC (permalink / raw)
  To: binutils

From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

Sorry.
I forgot to rerun `git format-patch $(git merge-base master HEAD)`
and sent a non-updated version of the patch in my previous email.


gprofng/ChangeLog
2022-07-25  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29368
	* configure.ac: Check for the makeinfo version.
	* configure: Rebuild.
---
 gprofng/configure    | 64 ++++++++++++++++++++++++++++++++++++++++++--
 gprofng/configure.ac | 22 ++++++++++++---
 2 files changed, 81 insertions(+), 5 deletions(-)

diff --git a/gprofng/configure b/gprofng/configure
index 54db918b2a5..fad5b030072 100755
--- a/gprofng/configure
+++ b/gprofng/configure
@@ -16709,13 +16709,73 @@ fi
 
 
 # Generate manpages, if possible.
+build_man=false
 if test $cross_compiling = no; then
 
 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
 
-  build_man=true
+  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=$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="$MAKEINFO" # Let the user override the test.
 else
-  build_man=false
+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_prog_MAKEINFO="$ac_prog"
+    $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
+
+fi
+fi
+MAKEINFO=$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=""@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 documentation 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 documentation will not be built." >&2;}
+	  MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true"
+	  ;;
+	x* )
+	  build_man=true
+	  ;;
+	esac
+      ;;
+    esac
+
 fi
  if test x$build_man = xtrue; then
   BUILD_MAN_TRUE=
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}" = yes)
 AM_ZLIB
 
 # Generate manpages, if possible.
+build_man=false
 if test $cross_compiling = no; then
   AM_MISSING_PROG(HELP2MAN, help2man)
-  build_man=true
-else
-  build_man=false
+  AC_CHECK_PROGS([MAKEINFO], makeinfo, ["@echo makeinfo missing; true"])
+  case "$MAKEINFO" in
+    *true)
+      AC_MSG_WARN([gprofng: makeinfo is missing. Info documentation will not 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="@echo $MAKEINFO is too old, 6.5 or newer required; true"
+	  ;;
+	x* )
+	  build_man=true
+	  ;;
+	esac
+      ;;
+    esac
+  AC_SUBST(MAKEINFO)
 fi
 AM_CONDITIONAL([BUILD_MAN], [test x$build_man = xtrue])
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] gprofng: check for the makeinfo version
@ 2022-07-26  6:49 vladimir.mezentsev
  0 siblings, 0 replies; 2+ messages in thread
From: vladimir.mezentsev @ 2022-07-26  6:49 UTC (permalink / raw)
  To: binutils

From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>

gprofng/ChangeLog
2022-07-25  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

	PR gprofng/29368
	* configure.ac: Check for the makeinfo version.
	* configure: Rebuild.
---
 gprofng/configure    | 63 +++++++++++++++++++++++++++++++++++++++++++-
 gprofng/configure.ac | 21 +++++++++++++--
 2 files changed, 81 insertions(+), 3 deletions(-)

diff --git a/gprofng/configure b/gprofng/configure
index 54db918b2a5..79fa2b838b4 100755
--- a/gprofng/configure
+++ b/gprofng/configure
@@ -16709,13 +16709,74 @@ fi
 
 
 # Generate manpages, if possible.
+build_man=false
 if test $cross_compiling = no; then
 
 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
 
   build_man=true
+  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=$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="$MAKEINFO" # Let the user override the test.
 else
-  build_man=false
+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_prog_MAKEINFO="$ac_prog"
+    $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
+
+fi
+fi
+MAKEINFO=$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=""@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 documentation 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 documentation will not be built." >&2;}
+	  MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true"
+	  ;;
+	x* )
+	  build_man=true
+	  ;;
+	esac
+      ;;
+    esac
+
 fi
  if test x$build_man = xtrue; then
   BUILD_MAN_TRUE=
diff --git a/gprofng/configure.ac b/gprofng/configure.ac
index 5a0fe1ea477..ed97c4f61bd 100644
--- a/gprofng/configure.ac
+++ b/gprofng/configure.ac
@@ -184,11 +184,28 @@ AM_CONDITIONAL(TCL_TRY, test "${ac_cv_libctf_tcl_try}" = yes)
 AM_ZLIB
 
 # Generate manpages, if possible.
+build_man=false
 if test $cross_compiling = no; then
   AM_MISSING_PROG(HELP2MAN, help2man)
   build_man=true
-else
-  build_man=false
+  AC_CHECK_PROGS([MAKEINFO], makeinfo, ["@echo makeinfo missing; true"])
+  case "$MAKEINFO" in
+    *true)
+      AC_MSG_WARN([gprofng: makeinfo is missing. Info documentation will not 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="@echo $MAKEINFO is too old, 6.5 or newer required; true"
+	  ;;
+	x* )
+	  build_man=true
+	  ;;
+	esac
+      ;;
+    esac
+  AC_SUBST(MAKEINFO)
 fi
 AM_CONDITIONAL([BUILD_MAN], [test x$build_man = xtrue])
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-26  7:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26  7:19 [PATCH] gprofng: check for the makeinfo version vladimir.mezentsev
  -- strict thread matches above, loose matches on Subject: below --
2022-07-26  6:49 vladimir.mezentsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).