From 769fcc5807be8cfa306d388c57f6b688ab8278be Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Tue, 30 Sep 2003 23:33:09 +0000 Subject: [PATCH] Check whether readelf supports -W. If it does, use it, otherwise assume wide listing by default. --- tools/codesighs/autosummary.unix.bash | 7 ++++++- tools/codesighs/basesummary.unix.bash | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/codesighs/autosummary.unix.bash b/tools/codesighs/autosummary.unix.bash index d3016469d55..7268e6c7c45 100755 --- a/tools/codesighs/autosummary.unix.bash +++ b/tools/codesighs/autosummary.unix.bash @@ -142,8 +142,13 @@ if test "$READELF_PROG"; then else READELF_PROG=`which readelf 2>/dev/null` if test "$READELF_PROG"; then + # Check whether we need -W + if readelf --help | grep "\--wide" >&/dev/null; then + READELF_PROG="readelf -W" + else + READELF_PROG="readelf" + fi USE_READELF=1 - READELF_PROG="readelf -W" else USE_READELF= fi diff --git a/tools/codesighs/basesummary.unix.bash b/tools/codesighs/basesummary.unix.bash index 708c4f0a86a..074af645c0d 100755 --- a/tools/codesighs/basesummary.unix.bash +++ b/tools/codesighs/basesummary.unix.bash @@ -141,7 +141,12 @@ if test "$READELF_PROG"; then else READELF_PROG=`which readelf 2>/dev/null` if test "$READELF_PROG"; then - READELF_PROG="readelf -W" + # Check whether we need -W + if readelf --help | grep "\--wide" >&/dev/null; then + READELF_PROG="readelf -W" + else + READELF_PROG="readelf" + fi USE_READELF=1 else USE_READELF=