groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] www.tmac, pnmtops and MacOS 10.3


From: Gaius Mulley
Subject: [Groff] www.tmac, pnmtops and MacOS 10.3
Date: Fri, 21 Feb 2003 23:45:36 +0000

Hi Werner,

There is a problem with some versions of pnmtops in that later
versions (than those supplied by Debian unstable) take a -nosetpage
argument which suppresses the nosetpage command in the eps output.  It
seems from my limited testing that earlier pnmtops versions did not
generate the nosetpage command in the eps. So I've generated a patch
for configure, Makefile.in, doc/Makefile.sub and tmac/www.tmac to
handle this.

I've tested it on my Debian system but I don't currently have access to
MacOS 10.3 which uses the later version pnm tools. If anyone
does have MacOS 10.3 - perhaps they could check out the patch?

[
Basically under MacOS 10.3 one should see this during `./configure'

   checking whether pnmtops understands the -nosetpage option... yes

and tmac/www.tmac-sed should contain two references to `pnmtops -nosetpage'.
]

Anyway, the symptoms on MacOS 10.3 were that the .PIMG macro
was failing when invoked for -Tps. I know that using the -nosetpage
fixes the problem, the only unresolved issue is whether the
configure tests below ripple through to www.tmac-sed and generate
pnmtops -nosetpage..

Also I've included the www.tmac that Bernd and your good self
modified to handle better url line breaks.

hope these changes are useful?

Gaius


--- groff-cvs/tmac/www.tmac     2002-10-26 05:20:56.000000000 +0100
+++ groff-html/tmac/www.tmac    2003-02-21 23:13:47.000000000 +0000
@@ -1,8 +1,47 @@
-.\" www.tmac
-.\"
-.\" A simple set of macros to provide HTML documents with basic
-.\" www functionality.  It should work with any macro set.
-.\"
+.ig
+www.tmac - macro package for adding HTML elements to roff documents.
+
+File position: <groff_source_top>/tmac/www.tmac
+Installed position: groff's main macro directory.
+
+------------------------------------------------------------------------
+    Legalize
+------------------------------------------------------------------------
+
+This file is part of groff, the GNU roff type-setting system.
+
+Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+written by Gaius Mulley <address@hidden>, with additions by
+Werner Lemberg <address@hidden> and Bernd Warken <address@hidden>.
+
+groff is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2, or (at your option) any later
+version.
+
+groff is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with groff; see the file COPYING.  If not, write to the Free
+Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+02111-1307, USA.
+
+
+------------------------------------------------------------------------
+    Description
+------------------------------------------------------------------------
+
+A simple set of macros to provide HTML documents with basic
+www functionality.  It should work with any macro set.
+..
+.
+.\" --------------------------------------------------------------------
+.\" Setup
+.\" --------------------------------------------------------------------
+.
 .nr _C \n(.C
 .cp 0
 .
@@ -27,9 +66,187 @@
 .  .
 .\}
 .
+.
+.\" --------------------------------------------------------------------
+.\" Test for `.substring'; result in register `www.substring_ok'.
+.\" The automated break points in .URL addresses are only added if
+.\" this register is non-zero.
+.\"
+.nr www:substring_ok 0
+.de www:@test_substring
+.  if !d substring \
+.    return
+.  ds \\$0:s abcdefg\"
+.  substring \\$0:s 1 1
+.  if !'\\*[\\$0:s]'b' \{\
+.    rm \\$0:s
+.    return
+.  \}
+.  ds \\$0:s abcdefg\"
+.  substring \\$0:s 0 0
+.  if !'\\*[\\$0:s]'a' \{\
+.    rm \\$0:s
+.    return
+.  \}
+.  ds \\$0:s abcdefg\"
+.  substring \\$0:s 1 -1
+.  if !'\\*[\\$0:s]'bcdefg' \{\
+.    rm \\$0:s
+.    return
+.  \}
+.  nr www:substring_ok 1
+.  rm \\$0:s
+..
+.www:@test_substring
+.rm www:@test_substring
+.
+.
+.\" --------------------------------------------------------------------
+.\" Local Macros
+.\" --------------------------------------------------------------------
+.
+.\" --------------------------------------------------------------------
+.\" www:error (<test>...)
+.\"
+.\" Print error message
+.\"
 .de www-error
 .  tm \\n[.F]:\\n[.c]: macro error: \\$*
 ..
+.als www:error www-error
+.
+.\" --------------------------------------------------------------------
+.\" www:lenstr (<register_name> <string_name>)
+.\"
+.\" Store length of string named <string_name> into register named
+.\" <register_name>.
+.\"
+.de www:lenstr
+.  if !(\\n[.$] == 2) \{\
+.    tm .\\$0 expects 2 arguments.
+.    ab
+.  \}
+.  length \\$0:n x\\*[\\$2]
+.  nr \\$1 (\\n[\\$0:n]-1)
+.  rr \\$0:n
+..
+.\" --------------------------------------------------------------------
+.\" www:splitstr (<name>)
+.\"
+.\" Add a space character between any two adjacent characters in string
+.\" <name> and restore result into the string variable <name>; space
+.\" characters are first replaced by the word `space'.
+.\"
+.de www:splitstr
+.  if !(\\n[.$] == 1) \
+.    www:error .\\$0 expects 1 argument.
+.  if '\\*[\\$1]'' \
+.    return
+.  ds \\$0:r "\\*[\\$1]\""
+.  ds \\$0:s\"
+.  while 1 \{\
+.    ds \\$0:c "\\*[\\$0:r]\""
+.    substring \\$0:c 0 0\"
+.    ie '\\*[\\$0:c]' ' \
+.      as \\$0:s " space\""
+.    el \
+.      as \\$0:s " \\*[\\$0:c]\""
+.    www:lenstr \\$0:n \\$0:r
+.    if (\\n[\\$0:n] <= 1) \{\
+.      break
+.    \}
+.    substring \\$0:r 1 -1\"
+.  \}
+.  if !'\\*[\\$0:s]'' \
+.    substring \\$0:s 1 -1 
+.  ds \\$1 \\*[\\$0:s]
+.  rm \\$0:c
+.  rr \\$0:n
+.  rm \\$0:r
+.  rm \\$0:s
+..
+.\" --------------------------------------------------------------------
+.\" www:url_breaks (<string_name>)
+.\"
+.\" Add `\:' (possible break point) within URL strings after `/'.
+.\"
+.\" Smart about multiple `/', existing `\:', and space characters;
+.\" does not set a break point if less than 5 characters would go to
+.\" the next line.
+.\"
+.de www:url_breaks
+.  if !(\\n[.$] == 1) \
+.    www:error .\\$0 expects 1 argument.
+.  if !\n[www:substring_ok] \
+.    return
+.  ds \\$0:s "\\*[\\$1]\""
+.  www:splitstr \\$0:s
+.  www:url_breaks_splitted \\$0:s \\*[\\$0:s]
+.  ds \\$1 "\\*[\\$0:s]\""
+.  rm \\$0:s
+..
+.\" --------------------------------------------------------------------
+.\" www:url_breaks_splitted (<result> <char> [<char>...])
+.\"
+.\" Add `\:' within URL strings, but arguments are a splitted string.
+.\"
+.\" Arguments: >=2: <result> <char> [<char>...]
+.\"
+.de www:url_breaks_splitted
+.  nr \\$0:min 5       \" minimal number of characters for next line
+.  if (\\n[.$] < 2) \
+.    www:error .\\$0 expects at least 2 arguments.
+.  ds \\$0:res \\$1\"
+.  shift
+.  ds \\$0:s\"
+.  nr \\$0:done 0
+.  while !\\n[\\$0:done] \{\
+.    if (\\n[.$] <= 0) \{\
+.      nr \\$0:done 1
+.      break
+.    \}
+.    if '\\$1'space' \{\
+.      as \\$0:s " \""
+.      shift
+.      continue
+.    \}
+.    if (\\n[.$] < \\n[\\$0:min]) \{\
+.      as \\$0:s "\\$1\""
+.      shift
+.      continue
+.    \}
+.    if !'\\$1'/' \{\
+.      as \\$0:s "\\$1\""
+.      shift
+.      continue
+.    \}
+.    \" we are at a `/' character
+.    while '\\$1'/' \{\
+.      as \\$0:s /\"
+.      if (\\n[.$] == 0) \{\
+.        nr \\$0:done 1
+.        break
+.      \}
+.      shift
+.    \}
+.    if \\n[\\$0:done] \
+.      break
+.    if (\\n[.$] < \\n[\\$0:min]) \
+.      continue
+.    if '\\$1'\:' \
+.      shift
+.    as \\$0:s \:\"
+.  \}
+.  ds \\*[\\$0:res] \\*[\\$0:s]\"
+.  rm \\$0:res
+.  rm \\$0:s
+..
+.\" --------------------------------------------------------------------
+.\" User Interface
+.\" --------------------------------------------------------------------
+.
+.\" --------------------------------------------------------------------
+.\" HTML (<address> <description> [<punctuation>])
 .\"
 .\" the main auxiliary macro for the HTML interface
 .\"
@@ -47,47 +264,61 @@
 .  if \\n[www-html] \
 .    nop \X^html:\\$*^\c
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" HX n
 .\"
 .\"   Automatic heading level cut off.
 .\"
 .\"   N is the depth limit of automatically linked headings.  So a depth
-.\"   of 2 would cause grohtml to generate a list of links for `.NH 1' and
-.\"   `.NH 2' but not for `.NH 3'.
+.\"   of 2 would cause grohtml to generate a list of links for `.NH 1'
+.\"   and `.NH 2' but not for `.NH 3'.
 .\"
 .de HX
 .  if \\n[www-html] \
 .    nop \X^index:\\$*^
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" BCL foreground background active not-visited visited
 .\"
 .de BCL
 .  HTML <body text=\\$1 bgcolor=\\$2 link=\\$3 alink=\\$4 vlink=\\$5>
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" BGIMG imagefile
 .\"
 .de BGIMG
 .  HTML <body background=\\$1>
 ..
-.\"
-.\" URL url description [after]
+.\" --------------------------------------------------------------------
+.\" URL url [description] [after]
+.\"     if description is absent then the url becomes the anchor text
 .\"
 .de URL
-.  ie \\n[www-html] \
-.    HTML <a href="\\$1">\\$2</a>\\$3
-.  el \
-.    nop \m[blue]\\$2\m[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3
+.  ds \\$0:adr \\$1\"
+.  www:url_breaks \\$0:adr
+.  ie \\n[www-html] \{\
+.    ie '\\$2'' \
+.       HTML <a href="\\$1">\\$1</a>\\$3
+.    el \
+.       HTML <a href="\\$1">\\$2</a>\\$3
+.  \}
+.  el \{\
+.    if !r ps4html .ad l
+.    ie '\\$2'' \
+.       nop \%\[la]\m[blue]\f[C]\\*[\\$0:adr]\f[]\m[]\[ra]\\$3
+.    el \
+.       nop \m[blue]\\$2\m[] \%\[la]\f[C]\\*[\\$0:adr]\f[]\[ra]\\$3
+.    if !r ps4html .ad
+.  \}
+.  rm \\$0:adr
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" FTP url description [after]
 .\"
-.\"   Same as UTL.
+.\"   Same as URL.
 .\"
 .als FTP URL
-.\"
+.\" --------------------------------------------------------------------
 .\" MTO address description [after]
 .\"
 .\"   ADDRESS is the email address (without the `mailto:' prefix).
@@ -117,7 +348,7 @@
 .      nop \m[blue]\\$2\m[] \%\[la]\f[C]\\$1\f[]\[ra]\\$3
 .  \}
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" TAG name
 .\"
 .\"   Generate an html name NAME.
@@ -125,7 +356,7 @@
 .de TAG
 .  HTML <a name="\\$1"></a>
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" IMG [-R|-L|-C] filename [width] [height]
 .\"
 .\"   Include an image of any type (will only work for -Thtml).
@@ -155,7 +386,7 @@
 .  el \
 .    nop \[la]\f[C]\\$1\f[]\[ra]
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" HTML-TAG
 .\"
 .\"   Emit a tag for grohtml.  This is an internal macro.
@@ -167,7 +398,7 @@
 .    nop \X^html-tag:\\$*^
 .  \}
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" HTML-TAG-NS
 .\"
 .\"   Emit a tag for grohtml (without a space).  This is an internal macro.
@@ -176,7 +407,7 @@
 .  if \\n[www-html] \
 .    nop \X^html-tag:\\$*^\c
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" PIMG  [-R|-L|-C] filename [width] [height]
 .\"
 .\"   Include a png image.  It will work for -Tps and -Thtml.
@@ -219,7 +450,7 @@
 .  el \{\
 .    if !r ps4html \{\
 .      www-make-unique-name
-.      sy pngtopnm \\$2 | pnmcrop -white | pnmtops -noturn > 
\\*[www-unique-name].eps
+.      sy pngtopnm \\$2 | pnmcrop -white | @PNM_TO_PS_NOSETPAGE@ -noturn > 
\\*[www-unique-name].eps
 .      ie '\\$1'-C' \
 .        PSPIC \\*[www-unique-name].eps \\$3 \\$4
 .      el \
@@ -228,6 +459,9 @@
 .  \}
 ..
 .
+.\" --------------------------------------------------------------------
+.\" auxialiary definitions for MPIMG
+.\"
 .nr www-left-ll-trap 0
 .nr www-left-po-trap 0
 .nr www-right-ll-trap 0
@@ -274,7 +508,7 @@
 .  wh \\n[www-left-ll-trap]u
 .  nr www-left-ll-trap 0
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" MPIMG [-R|-L] filename [width] [height]
 .\"
 .\"   Include a png image and wrap text around it.  It will work for
@@ -303,7 +537,7 @@
 .  el \{\
 .    if !r ps4html \{\
 .      www-make-unique-name
-.      sy pngtopnm \\$2 | pnmcrop -white | pnmtops -noturn > 
\\*[www-unique-name].eps
+.      sy pngtopnm \\$2 | pnmcrop -white | @PNM_TO_PS_NOSETPAGE@ -noturn > 
\\*[www-unique-name].eps
 .      ie '\\$1'-R' \{\
 .        \" we must now disable a possible left image trap
 .        sp -1
@@ -343,7 +577,7 @@
 .    \}
 .  \}
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" HnS n
 .\"
 .\"   Begin heading.  Heading level is N.
@@ -371,7 +605,7 @@
 .    www-error "HnE found without a corresponding HnS"
 .  br
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" LK
 .\"
 .\"   Emit the automatically collected links derived from
@@ -380,7 +614,7 @@
 .de LK
 .  HTML-TAG ".links"
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" HR
 .\"
 .\"   Produce a horizontal line
@@ -393,7 +627,7 @@
 .  el \
 .    sp
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" NHR
 .\"
 .\"  Suppresses the generation of the top and bottom rules which grohtml
@@ -408,7 +642,7 @@
 .de www-end-nowhere
 .  di
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" HTL
 .\"
 .\"   Generate an HTML title only.  This differs from the -ms .TL macro
@@ -427,6 +661,9 @@
 .  \}
 ..
 .
+.\" --------------------------------------------------------------------
+.\" auxialiary definitions for ULS / ULE
+.\"
 .ds www-level1 \[bu]\ \ \"
 .ds www-level2 \[sq]\ \ \"
 .ds www-level3 \[ci]\ \ \"
@@ -449,7 +686,7 @@
 .    www-error "trying to terminate a list which does not exist"
 .  nr www-level -1
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" ULS
 .\"
 .\"   Start an unordered list.
@@ -464,7 +701,7 @@
 .    nr www-depth +\w'\\*[www-level\\n[www-level]]'u
 .  \}
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" ULE
 .\"
 .\"   End an unordered list.
@@ -478,7 +715,7 @@
 .  \}
 .  www-pop-level
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" LI
 .\"
 .\"   Insert a list item.
@@ -492,7 +729,7 @@
 .    nop \\*[www-level\\n[www-level]]\c
 .  \}
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" DC l text [color]
 .\"
 .\"   L is the letter to be dropped and enlarged.
@@ -537,6 +774,8 @@
 .  \}
 .  nop \\$2
 ..
+.\" --------------------------------------------------------------------
+.\" Setup around HTML-IMAGE and friends
 .\"
 .\" now set up TS, TE, EQ, EN default macros
 .\"
@@ -547,9 +786,10 @@
 .\"
 .\" supplementary macros used by other macro sets
 .\"
-.\" here are some tags specially for -Tps or -Thtml when invoked by pre-html
-.\" to generate png images from postscript.
-.\"
+.\" here are some tags specially for -Tps or -Thtml when invoked by
+.\" pre-html to generate png images from postscript.
+.
+.\" --------------------------------------------------------------------
 .\" HTML-DO-IMAGE - tells troff to issue an image marker which can be
 .\"                 read back by pre-html
 .\"
@@ -559,7 +799,7 @@
 .  if \\n[www-html] \
 .    nop \O[5\\$2\\$1.png]\O[0]\O[3]
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" HTML-IMAGE-END - terminates an image for html
 .\"
 .de HTML-IMAGE-END
@@ -571,7 +811,7 @@
 .
 .nr www-png-no 0
 .
-.\"
+.\" --------------------------------------------------------------------
 .\" www-make-unique-name - generates another unique name in string
 .\"                        `www-unique-name'
 .\"
@@ -579,7 +819,7 @@
 .  nr www-png-no +1
 .  ds www-unique-name \\*[www-image-template]\\n[www-png-no]
 ..
-.\"
+.\" --------------------------------------------------------------------
 .\" HTML-IMAGE and friends tell grohtml that this region of text needs
 .\"            to be rendered as an image.
 .\"
@@ -604,11 +844,42 @@
 .  HTML-DO-IMAGE \\*[www-unique-name] i
 ..
 .
+.\" --------------------------------------------------------------------
+.\" Final Setup
+.\" --------------------------------------------------------------------
+.
 .if \n[www-html] \{\
 .   nh
 .   nr HY 0
 .\}
+.
+.\"
+.\" start of some code
+.\"
+.
+.de CDS
+.ft C
+.nf
+..
+.\"
+.\" end of some code
+.\"
+.
+.de CDE
+.fi
+.ft P
+..
+.
 .if r ps4html .nop \O[0]
 .cp \n(_C
 .
+.\" now set
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
 .\" EOF
--- groff-cvs/Makefile.in       2003-02-15 07:24:05.000000000 +0000
+++ groff-html/Makefile.in      2003-02-21 20:58:55.000000000 +0000
@@ -142,6 +142,11 @@
 # `sys_tmac_prefix' is prefix (if any) for system macro packages.
 address@hidden@
 
+# `pnm_to_ps_nosetpag' is the command to be run to generate an eps
+# file. Some versions of pnmtops provide the -nosetpage option.
+# We detect this and use it if present.
address@hidden@
+
 # `tmac_wrap' is list of system macro packages that should be made
 # available to groff by creating a corresponding macro package
 # in the groff macro directory that references the system macro
@@ -391,6 +396,7 @@
   "prefix=$(prefix)" \
   "revision=$(revision)" \
   "sys_tmac_prefix=$(sys_tmac_prefix)" \
+  "pnm_to_ps_nosetpage=$(pnm_to_ps_nosetpage)" \
   "systemtmacdir=$(systemtmacdir)" \
   "tmac_an_prefix=$(tmac_an_prefix)" \
   "tmac_m_prefix=$(tmac_m_prefix)" \
--- groff-cvs/configure 2003-02-15 07:24:05.000000000 +0000
+++ groff-html/configure        2003-02-21 23:07:06.000000000 +0000
@@ -305,7 +305,7 @@
 # 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 
groff_top_builddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX 
CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS LPR LP LPQ PSPRINT DVIPRINT PERLPATH 
YACC RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT 
INSTALL_DATA LN_S SH_SCRIPT_SED_CMD CPP EGREP LIBM LIBOBJS BROKEN_SPOOLER_FLAGS 
PAGE g sys_tmac_prefix tmac_wrap pnmcut pnmcrop pnmtopng gs psselect make_html 
make_install_html 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 
groff_top_builddir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX 
CXXFLAGS ac_ct_CXX TTYDEVDIRS OTHERDEVDIRS LPR LP LPQ PSPRINT DVIPRINT PERLPATH 
YACC RANLIB ac_ct_RANLIB INSTALL_INFO INSTALL_PROGRAM INSTALL_SCRIPT 
INSTALL_DATA LN_S SH_SCRIPT_SED_CMD CPP EGREP LIBM LIBOBJS BROKEN_SPOOLER_FLAGS 
PAGE g sys_tmac_prefix tmac_wrap pnmcut pnmcrop pnmtopng pnmtops gs psselect 
make_html make_install_html LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -6001,19 +6001,118 @@
 echo "${ECHO_T}no" >&6
 fi
 
-case "x$pnmcut$pnmcrop$pnmtopng$gs$psselect" in
+# Extract the first word of "pstopnm", so it can be a program name with args.
+set dummy pstopnm; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_pstopnm+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$pstopnm"; then
+  ac_cv_prog_pstopnm="$pstopnm" # Let the user override the test.
+else
+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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_pstopnm="found"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_pstopnm" && ac_cv_prog_pstopnm="missing"
+fi
+fi
+pstopnm=$ac_cv_prog_pstopnm
+if test -n "$pstopnm"; then
+  echo "$as_me:$LINENO: result: $pstopnm" >&5
+echo "${ECHO_T}$pstopnm" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "pnmtops", so it can be a program name with args.
+set dummy pnmtops; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_pnmtops+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$pnmtops"; then
+  ac_cv_prog_pnmtops="$pnmtops" # Let the user override the test.
+else
+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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_pnmtops="found"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_pnmtops" && ac_cv_prog_pnmtops="missing"
+fi
+fi
+pnmtops=$ac_cv_prog_pnmtops
+if test -n "$pnmtops"; then
+  echo "$as_me:$LINENO: result: $pnmtops" >&5
+echo "${ECHO_T}$pnmtops" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+#
+# test whether pnmtops understands the -nosetpage option
+#
+echo $ECHO_N "checking whether pnmtops understands the -nosetpage option... 
$ECHO_C" >&6
+if test -n "$pnmtops" && test -n "$pstopnm" ; then
+   cat <<EOF | pstopnm > conftest.pnm 2>/dev/null
+%!PS-Adobe-3.0
+/Times-Bold findfont 16 scalefont setfont
+/inch {72 mul} def
+/Times-Roman findfont 10 scalefont setfont
+4.5 inch 0.812500 1 add inch moveto ( testing ) show
+showpage
+EOF
+   if pnmtops -nosetpage conftest.pnm >& /dev/null ; then
+       echo "${ECHO_T}yes" >&6
+       pnm_to_ps_nosetpage="pnmtops -nosetpage"
+   else
+       echo "${ECHO_T}no" >&6
+       pnm_to_ps_nosetpage="pnmtops"
+   fi
+   rm -f conftest.pnm
+else
+    echo "${ECHO_T}no" >&6
+    pnm_to_ps_nosetpage="pnmtops"
+fi
+echo "$as_me:$LINENO: result: $pnm_to_ps_nosetpage" >&5
+
+case "x$pnmcut$pnmcrop$pnmtopng$gs$psselect$pnmtops" in
 *missing*)
        make_html=
        make_install_html=
        { echo "$as_me:$LINENO: WARNING:
 
-  Since one or more of the above five programs can't be found in the path,
+  Since one or more of the above six programs can't be found in the path,
   the HTML backend of groff (grohtml) won't work properly.  Consequently,
   no documentation in HTML format is built and installed.
 " >&5
 echo "$as_me: WARNING:
 
-  Since one or more of the above five programs can't be found in the path,
+  Since one or more of the above six programs can't be found in the path,
   the HTML backend of groff (grohtml) won't work properly.  Consequently,
   no documentation in HTML format is built and installed.
 " >&2;} ;;
@@ -6650,6 +6749,7 @@
 s,@PAGE@,$PAGE,;t t
 s,@g@,$g,;t t
 s,@sys_tmac_prefix@,$sys_tmac_prefix,;t t
+s,@pnm_to_ps_nosetpage@,$pnm_to_ps_nosetpage,;t t
 s,@tmac_wrap@,$tmac_wrap,;t t
 s,@pnmcut@,$pnmcut,;t t
 s,@pnmcrop@,$pnmcrop,;t t
--- groff-cvs/./tmac/Makefile.sub       2003-01-25 16:57:47.000000000 +0000
+++ groff-html/./tmac/Makefile.sub      2003-02-21 23:37:29.000000000 +0000
@@ -22,7 +22,7 @@
   X.tmac Xps.tmac \
   lj4.tmac \
   lbp.tmac \
-  html.tmac www.tmac \
+  html.tmac \
   europs.tmac \
   eqnrc \
   troffrc troffrc-end \
@@ -32,13 +32,14 @@
 MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
 mdocdir=$(tmacdir)/mdoc
 CLEANADD=\
-  stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed \
+  stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed www.tmac-sed \
   stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \
   doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s
 tmac_s_prefix=
 tmac_an_prefix=
 tmac_wrap=
 sys_tmac_prefix=
+pnm_to_ps_nosetpage="pnmtops"
 
 all: stamp-strip stamp-wrap stamp-sed
 
@@ -64,6 +65,8 @@
        $(INSTALL_DATA) $(srcdir)/an.tmac $(tmacdir)/$(tmac_an_prefix)an.tmac
        -rm -f $(tmacdir)/man.tmac
        $(INSTALL_DATA) man.tmac-sed $(tmacdir)/man.tmac
+       -rm -f $(tmacdir)/www.tmac
+       $(INSTALL_DATA) www.tmac-sed $(tmacdir)/www.tmac
        for f in $(STRIPFILES); do \
          rm -f $(tmacdir)/$$f; \
          $(INSTALL_DATA) $$f-s $(tmacdir)/$$f; \
@@ -98,11 +101,12 @@
        fi
        touch $@
 
-stamp-sed: man.tmac ms.tmac
-       for f in man.tmac ms.tmac; do \
+stamp-sed: man.tmac ms.tmac www.tmac
+       for f in man.tmac ms.tmac www.tmac; do \
          rm -f $$f-sed; \
          sed -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
          -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
+         -e "s;@PNM_TO_PS_NOSETPAGE@;$(pnm_to_ps_nosetpage);g" \
          $(srcdir)/$$f > $$f-sed; \
        done
        touch $@

reply via email to

[Prev in Thread] Current Thread [Next in Thread]