summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwl <wl>2006-03-28 17:54:16 +0000
committerwl <wl>2006-03-28 17:54:16 +0000
commitb6bc1aa9ca7c4127199a088c33b0bd80ee90d863 (patch)
tree0ea2391f82aecd7a6835b2c441c9f31f23c6acb1
parent48aec1f008daad2e1e285defd2e4b536c3d15379 (diff)
downloadgroff-b6bc1aa9ca7c4127199a088c33b0bd80ee90d863.tar.gz
* configure.ac: Call AC_PROG_EGREP.
* configure: Regenerated. * Makefile.in (EGREP): New variable. (MDEFINES): Add $(EGREP). * src/roff/grog/grog.sh: Treat .TH between .TS and .TE properly (bug reported by Robert Goulding <Goulding.2@nd.edu>). Use @EGREP@. * src/roff/grog/Makefile.sub (grog, grog.old): Use $(EGREP).
-rw-r--r--ChangeLog14
-rw-r--r--Makefile.in3
-rwxr-xr-xconfigure410
-rw-r--r--configure.ac1
-rw-r--r--src/roff/grog/Makefile.sub2
-rw-r--r--src/roff/grog/grog.sh11
6 files changed, 232 insertions, 209 deletions
diff --git a/ChangeLog b/ChangeLog
index e6ce1473..ef9c0f3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-03-28 Werner LEMBERG <wl@gnu.org>
+
+ * configure.ac: Call AC_PROG_EGREP.
+ * configure: Regenerated.
+
+ * Makefile.in (EGREP): New variable.
+ (MDEFINES): Add $(EGREP).
+
+ * src/roff/grog/grog.sh: Treat .TH between .TS and .TE properly
+ (bug reported by Robert Goulding <Goulding.2@nd.edu>).
+ Use @EGREP@.
+
+ * src/roff/grog/Makefile.sub (grog, grog.old): Use $(EGREP).
+
2006-03-27 Werner LEMBERG <wl@gnu.org>
Add two request `.device' and `.devicem' which are equivalent to
diff --git a/Makefile.in b/Makefile.in
index 88efdab9..6f293cf8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -388,6 +388,8 @@ X_PRE_LIBS=@X_PRE_LIBS@
YACC=@YACC@
YACCFLAGS=-v
+EGREP=@EGREP@
+
MAKEINFO=@MAKEINFO@
EXEEXT=@EXEEXT@
@@ -441,6 +443,7 @@ MDEFINES= \
"CPPFLAGS=$(CPPFLAGS)" \
"DEVICE=$(DEVICE)" \
"DVIPRINT=$(DVIPRINT)" \
+ "EGREP=$(EGREP)" \
"ETAGS=$(ETAGS)" \
"ETAGSCCFLAG=$(ETAGSCCFLAG)" \
"ETAGSFLAGS=$(ETAGSFLAGS)" \
diff --git a/configure b/configure
index fde44575..655a8003 100755
--- a/configure
+++ b/configure
@@ -540,7 +540,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XDEVDIRS XPROGDIRS XLIBDIRS appresdir LPR LP LPQ PSPRINT DVIPRINT PERLPATH YACC MAKEINFO RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD GREP EGREP LIBC LIBM build build_cpu build_vendor build_os host host_cpu host_vendor host_os LIBICONV LTLIBICONV LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap GROFF_PATH_SEPARATOR ALT_GHOSTSCRIPT_PROGS GHOSTSCRIPT ac_ct_GHOSTSCRIPT pnmcut pnmcrop pnmtopng psselect pnmtops make_html make_install_html ALT_AWK_PROGS AWK ac_ct_AWK make_pdfdoc make_install_pdfdoc pnmtops_nosetpage GLIBC21 LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS XDEVDIRS XPROGDIRS XLIBDIRS appresdir LPR LP LPQ PSPRINT DVIPRINT GREP EGREP PERLPATH YACC MAKEINFO RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S SH_SCRIPT_SED_CMD LIBC LIBM build build_cpu build_vendor build_os host host_cpu host_vendor host_os LIBICONV LTLIBICONV LIBOBJS BROKEN_SPOOLER_FLAGS PAGE g sys_tmac_prefix tmac_wrap GROFF_PATH_SEPARATOR ALT_GHOSTSCRIPT_PROGS GHOSTSCRIPT ac_ct_GHOSTSCRIPT pnmcut pnmcrop pnmtopng psselect pnmtops make_html make_install_html ALT_AWK_PROGS AWK ac_ct_AWK make_pdfdoc make_install_pdfdoc pnmtops_nosetpage GLIBC21 LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -5395,6 +5395,208 @@ echo $ECHO_N "checking for command to use for printing dvi files... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $DVIPRINT" >&5
echo "${ECHO_T}$DVIPRINT" >&6
+echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/GREPXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/GREP$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/xpg4/bin"
+for as_dir in $as_dummy
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ test -f "$ac_path_GREP" || continue
+ $ac_path_GREP_found || if $as_executable_p "$ac_path_GREP"; then
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+if "$ac_path_GREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:
+else
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
+ while :
+ do
+ cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
+ mv "$tmp/conftest.tmp" "$tmp/conftest.in"
+ cp "$tmp/conftest.in" "$tmp/conftest.nl"
+ echo 'GREP' >> "$tmp/conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break
+ diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+fi
+
+fi
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+
+rm -rf "$tmp"
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6
+ GREP="$ac_cv_path_GREP"
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/EGREPXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/EGREP$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/xpg4/bin"
+for as_dir in $as_dummy
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ test -f "$ac_path_EGREP" || continue
+ $ac_path_EGREP_found || if $as_executable_p "$ac_path_EGREP"; then
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+if "$ac_path_EGREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:
+else
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
+ while :
+ do
+ cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
+ mv "$tmp/conftest.tmp" "$tmp/conftest.in"
+ cp "$tmp/conftest.in" "$tmp/conftest.nl"
+ echo 'EGREP' >> "$tmp/conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break
+ diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+fi
+
+fi
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+
+rm -rf "$tmp"
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6
+ EGREP="$ac_cv_path_EGREP"
+
+
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -5844,208 +6046,6 @@ echo "${ECHO_T}no" >&6
# checks for headers
-echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/GREPXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=$TMPDIR/GREP$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- { (exit 1); exit 1; }
-}
-ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/xpg4/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- test -f "$ac_path_GREP" || continue
- $ac_path_GREP_found || if $as_executable_p "$ac_path_GREP"; then
- # Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-if "$ac_path_GREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:
-else
- ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
- while :
- do
- cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
- mv "$tmp/conftest.tmp" "$tmp/conftest.in"
- cp "$tmp/conftest.in" "$tmp/conftest.nl"
- echo 'GREP' >> "$tmp/conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break
- diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
-fi
-
-fi
-
- $ac_path_GREP_found && break 3
- done
-done
-
-done
-
-rm -rf "$tmp"
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6
- GREP="$ac_cv_path_GREP"
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/EGREPXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=$TMPDIR/EGREP$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- { (exit 1); exit 1; }
-}
-ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="$PATH:/usr/xpg4/bin"
-for as_dir in $as_dummy
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- test -f "$ac_path_EGREP" || continue
- $ac_path_EGREP_found || if $as_executable_p "$ac_path_EGREP"; then
- # Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-if "$ac_path_EGREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:
-else
- ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
- while :
- do
- cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
- mv "$tmp/conftest.tmp" "$tmp/conftest.in"
- cp "$tmp/conftest.in" "$tmp/conftest.nl"
- echo 'EGREP' >> "$tmp/conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "$tmp/conftest.nl" >"$tmp/conftest.out" 2>/dev/null || break
- diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
- ac_count=`expr $ac_count + 1`
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
-fi
-
-fi
-
- $ac_path_EGREP_found && break 3
- done
-done
-
-done
-
-rm -rf "$tmp"
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH:/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-fi
-
-
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6
- EGREP="$ac_cv_path_EGREP"
-
-
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
@@ -12467,6 +12467,8 @@ s,@LP@,$LP,;t t
s,@LPQ@,$LPQ,;t t
s,@PSPRINT@,$PSPRINT,;t t
s,@DVIPRINT@,$DVIPRINT,;t t
+s,@GREP@,$GREP,;t t
+s,@EGREP@,$EGREP,;t t
s,@PERLPATH@,$PERLPATH,;t t
s,@YACC@,$YACC,;t t
s,@MAKEINFO@,$MAKEINFO,;t t
@@ -12478,8 +12480,6 @@ s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@LN_S@,$LN_S,;t t
s,@SH_SCRIPT_SED_CMD@,$SH_SCRIPT_SED_CMD,;t t
-s,@GREP@,$GREP,;t t
-s,@EGREP@,$EGREP,;t t
s,@LIBC@,$LIBC,;t t
s,@LIBM@,$LIBM,;t t
s,@build@,$build,;t t
diff --git a/configure.ac b/configure.ac
index ba4410bd..debe6ff2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,6 +36,7 @@ GROFF_X11
GROFF_APPRESDIR_OPTION
GROFF_APPRESDIR_DEFAULT
GROFF_PRINT
+AC_PROG_EGREP
AC_PATH_PROG([PERLPATH], [perl], [/usr/bin/perl])
GROFF_PROG_YACC
GROFF_MAKEINFO
diff --git a/src/roff/grog/Makefile.sub b/src/roff/grog/Makefile.sub
index 43dec8fb..765d9285 100644
--- a/src/roff/grog/Makefile.sub
+++ b/src/roff/grog/Makefile.sub
@@ -6,6 +6,7 @@ all: grog
grog: grog.sh
rm -f $@
sed -e "s|@g@|$(g)|g" \
+ -e "s|@EGREP@|$(EGREP)|g" \
-e "s|@VERSION@|$(version)$(revision)|" \
-e $(SH_SCRIPT_SED_CMD) $(srcdir)/grog.sh >$@
chmod +x $@
@@ -18,6 +19,7 @@ grog.old: grog.pl grog.sh
else \
rm -f $@; \
sed -e "s|@g@|$(g)|g" \
+ -e "s|@EGREP@|$(EGREP)|g" \
-e "s|@VERSION@|$(version)$(revision)|" \
-e $(SH_SCRIPT_SED_CMD) $(srcdir)/grog.sh >$@; \
fi
diff --git a/src/roff/grog/grog.sh b/src/roff/grog/grog.sh
index 1a937cb1..3323763f 100644
--- a/src/roff/grog/grog.sh
+++ b/src/roff/grog/grog.sh
@@ -29,16 +29,19 @@ do
esac
done
-egrep -h "^\.(\[|\])|((P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|.* Oo|Oc|.* Oc|TS|EQ|TH|SH|so|\[|R1|GS|G1|PH|SA)$sp)" $* \
+@EGREP@ -h \
+ "^\.(\[|\])|((P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|.* Oo|Oc|.* Oc|TS|TE|EQ|TH|SH|so|\[|R1|GS|G1|PH|SA)$sp)" $* \
| sed -e '/^\.so/s/^.*$/.SO_START\
&\
.SO_END/' \
| $soelim \
-| egrep '^\.(P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|.* Oo|Oc|.* Oc|TS|EQ|TH|SH|\[|\]|R1|GS|G1|PH|SA|SO_START|SO_END)' \
+| @EGREP@ \
+ '^\.(P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|.* Oo|Oc|.* Oc|TS|TE|EQ|TH|SH|\[|\]|R1|GS|G1|PH|SA|SO_START|SO_END)' \
| awk '
/^\.SO_START$/ { so = 1 }
/^\.SO_END$/ { so = 0 }
-/^\.TS/ { tbl++; if (so > 0) soelim++ }
+/^\.TS/ { tbl++; in_tbl = 1; if (so > 0) soelim++; }
+/^\.TE/ { in_tbl = 0 }
/^\.PS([ 0-9.<].*)?$/ { pic++; if (so > 0) soelim++ }
/^\.EQ/ { eqn++; if (so > 0) soelim++ }
/^\.R1/ { refer++; if (so > 0) soelim++ }
@@ -46,7 +49,7 @@ egrep -h "^\.(\[|\])|((P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|.* Oo|Oc|.* O
/^\.\]/ {refer_end++; if (so > 0) soelim++ }
/^\.GS/ { grn++; if (so > 0) soelim++ }
/^\.G1/ { grap++; pic++; if (so > 0) soelim++ }
-/^\.TH/ { TH++ }
+/^\.TH/ { if (in_tbl != 1) TH++ }
/^\.[PLI]P/ { PP++ }
/^\.P$/ { P++ }
/^\.SH/ { SH++ }