/[groff]/groff/aclocal.m4
ViewVC logotype

Diff of /groff/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.44 by wl, Sat Feb 19 04:23:40 2005 UTC revision 1.45 by wl, Mon Feb 28 13:57:53 2005 UTC
# Line 60  AC_DEFUN([GROFF_PROG_YACC], Line 60  AC_DEFUN([GROFF_PROG_YACC],
60  # The following programs are needed for grohtml.  # The following programs are needed for grohtml.
61    
62  AC_DEFUN([GROFF_HTML_PROGRAMS],  AC_DEFUN([GROFF_HTML_PROGRAMS],
63    [make_html=html    [AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
64       make_html=html
65     make_install_html=install_html     make_install_html=install_html
66    
67     missing=     missing=
68     AC_FOREACH([groff_prog],     AC_FOREACH([groff_prog],
69       [pnmcut pnmcrop pnmtopng psselect pnmtops gs],       [pnmcut pnmcrop pnmtopng psselect pnmtops],
70       [AC_CHECK_PROG(groff_prog, groff_prog, [found], [missing])       [AC_CHECK_PROG(groff_prog, groff_prog, [found], [missing])
71        if test $[]groff_prog = missing; then        if test $[]groff_prog = missing; then
72          missing="$missing groff_prog"          missing="$missing \`groff_prog'"
73        fi;])        fi;])
74    
75       test "$GHOSTSCRIPT" = "missing" && missing="$missing \`gs'"
76    
77     if test -n "$missing"; then     if test -n "$missing"; then
78       cnt=0       plural=`set $missing; test $[#] -gt 1 && echo s`
79       for i in $missing       missing=`set $missing
80       do         missing=""
81         cnt=`expr $cnt + 1`         while test $[#] -gt 0
82         eval "prog$cnt=$i"           do
83       done             case $[#] in
84       plural="s"               1) missing="$missing$[1]" ;;
85       case $cnt in               2) missing="$missing$[1] and " ;;
86       1)               *) missing="$missing$[1], " ;;
87         plural=""             esac
88         progs="\`$prog1'" ;;             shift
89       2)           done
90         progs="\`$prog1' and \`$prog2'" ;;           echo $missing`
      3)  
        progs="\`$prog1', \`$prog2', and \`$prog3'" ;;  
      4)  
        progs="\`$prog1', \`$prog2', \`$prog3', and \`$prog4'" ;;  
      5)  
        progs="\`$prog1', \`$prog2', \`$prog3', \`$prog4', and \`$prog5'" ;;  
      6)  
        progs="\`$prog1', \`$prog2', \`$prog3', \`$prog4', \`$prog5', and \`$prog6'" ;;  
      esac  
91    
92       make_html=       make_html=
93       make_install_html=       make_install_html=
94    
95       AC_MSG_WARN([       AC_MSG_WARN([missing program$plural:
96    
97    The program$plural    The program$plural
98      $progs       $missing
99    can't be found in the path, thus the HTML backend of groff (grohtml)    cannot be found in the PATH.
100    won't work properly.  Consequently, no documentation in HTML format    Consequently, groff's HTML backend (grohtml) will not work properly;
101    is built and installed.    therefore, it will neither be possible to prepare, nor to install,
102      documentation in HTML format.
103       ])       ])
104     fi     fi
105    
106     AC_SUBST([make_html])     AC_SUBST([make_html])
107     AC_SUBST([make_install_html])])     AC_SUBST([make_install_html])])
108    
109    # To produce PDF docs, we need both awk and ghostscript.
110    
111    AC_DEFUN([GROFF_PDFDOC_PROGRAMS],
112      [AC_REQUIRE([GROFF_AWK_PATH])
113       AC_REQUIRE([GROFF_GHOSTSCRIPT_PATH])
114    
115       make_pdfdoc=pdfdoc
116       make_install_pdfdoc=install_pdfdoc
117    
118       missing=""
119       test "$AWK" = missing && missing="\`awk'"
120       test "$GHOSTSCRIPT" = missing && missing="$missing \`gs'"
121       if test -n "$missing"; then
122         plural=`set $missing; test $[#] -eq 2 && echo s`
123         test x$plural = xs \
124           && missing=`set $missing; echo "$[1] and $[2]"` \
125           || missing=`echo $missing`
126    
127         make_pdfdoc=
128         make_install_pdfdoc=
129    
130         AC_MSG_WARN([missing program$plural:
131    
132      The program$plural $missing cannot be found in the PATH.
133      Consequently, groff's PDF formatter (pdfroff) will not work properly;
134      therefore, it will neither be possible to prepare, nor to install,
135      documentation in PDF format.
136         ])
137       fi
138    
139       AC_SUBST([make_pdfdoc])
140       AC_SUBST([make_install_pdfdoc])])
141    
142  # Check whether pnmtops can handle the -nosetpage option.  # Check whether pnmtops can handle the -nosetpage option.
143    
144  AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE],  AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE],
# Line 124  AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE], Line 152  AC_DEFUN([GROFF_PNMTOPS_NOSETPAGE],
152     fi     fi
153     AC_SUBST([pnmtops_nosetpage])])     AC_SUBST([pnmtops_nosetpage])])
154    
155  # Check location of `gs'.  # Check location of `gs'; allow `--with-gs=PROG' option to override.
156    
157  AC_DEFUN([GROFF_GHOSTSCRIPT_PATH],  AC_DEFUN([GROFF_GHOSTSCRIPT_PATH],
158    [AC_PATH_TOOL(GHOSTSCRIPT, gs gsos2, missing)    [AC_REQUIRE([GROFF_GHOSTSCRIPT_PREFS])
159     AC_SUBST(GHOSTSCRIPT)])     AC_ARG_WITH([gs],
160         [AS_HELP_STRING([--with-gs=PROG],
161           [actual [/path/]name of ghostscript executable])],
162         [GHOSTSCRIPT=$withval],
163         [AC_CHECK_TOOLS(GHOSTSCRIPT, [$ALT_GHOSTSCRIPT_PROGS], [missing])])
164       test "$GHOSTSCRIPT" = "no" && GHOSTSCRIPT=missing])
165    
166    # Preferences for choice of `gs' program...
167    # (allow --with-alt-gs="LIST" to override).
168    
169    AC_DEFUN([GROFF_GHOSTSCRIPT_PREFS],
170      [AC_ARG_WITH([alt-gs],
171        [AS_HELP_STRING([--with-alt-gs=LIST],
172          [alternative names for ghostscript executable])],
173        [ALT_GHOSTSCRIPT_PROGS="$withval"],
174        [ALT_GHOSTSCRIPT_PROGS="gs gswin32c gsos2"])
175       AC_SUBST([ALT_GHOSTSCRIPT_PROGS])])
176    
177    # Check location of `awk'; allow `--with-awk=PROG' option to override.
178    
179    AC_DEFUN([GROFF_AWK_PATH],
180      [AC_REQUIRE([GROFF_AWK_PREFS])
181       AC_ARG_WITH([awk],
182         [AS_HELP_STRING([--with-awk=PROG],
183           [actual [/path/]name of awk executable])],
184         [AWK=$withval],
185         [AC_CHECK_TOOLS(AWK, [$ALT_AWK_PROGS], [missing])])
186       test "$AWK" = "no" && AWK=missing])
187    
188    # Preferences for choice of `awk' program; allow --with-alt-awk="LIST"
189    # to override.
190    
191    AC_DEFUN([GROFF_AWK_PREFS],
192      [AC_ARG_WITH([alt-awk],
193        [AS_HELP_STRING([--with-alt-awk=LIST],
194          [alternative names for awk executable])],
195        [ALT_AWK_PROGS="$withval"],
196        [ALT_AWK_PROGS="gawk mawk nawk awk"])
197       AC_SUBST([ALT_AWK_PROGS])])
198    
199  # GROFF_CSH_HACK(if hack present, if not present)  # GROFF_CSH_HACK(if hack present, if not present)
200    

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26