"Fossies" - the Fresh Open Source Software Archive 
Member "ftnchek-3.3.1/configure.in" (29 Dec 2004, 13286 Bytes) of package /linux/misc/old/ftnchek-3.3.1.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 dnl configure.in Process with autoconf to produce a configure script.
2 dnl This autoconf input file is for ftnchek version 2.9, April 1996
3 dnl Acknowledgement and thanks to Judah Milgram for help producing this file.
4
5 AC_INIT(ftnchek.c)
6 AC_CONFIG_HEADER(config.h)
7
8 AC_CANONICAL_HOST
9
10 dnl Look for yacc or bison. If bison, then -y used, so don't need
11 dnl to worry about YSTEM. (but what if it finds byacc?)
12 dnl For consistency with all other configured programs, we eventually
13 dnl replace YACC by a path-qualified name. Here we split the value of
14 dnl YACC returned by this test (which may be "yacc", "bison -y", or
15 dnl "byacc") into the program name in YACC_NAME and flags in YFLAGS.
16
17 AC_PROG_YACC
18 if test -z "$YACC"; then
19 AC_MSG_WARN([Didn't find yacc or bison])
20 YACC=yacc
21 fi
22 YACC_NAME=`echo "$YACC" | sed 's/ .*$//'`
23 changequote(<<, >>)dnl
24 YFLAGS=`echo "$YACC" | sed 's/^[^ ]* //'`
25 changequote([, ])dnl
26
27 dnl Look for mawk/nawk/awk:
28
29 AC_PROG_AWK
30 if test "$AWK" = "awk"; then
31 case $host_os in
32 aix*)
33 AC_MSG_WARN([This awk might not work in dcl2inc. Need gawk or nawk]) ;;
34 esac
35 fi
36
37 dnl Provide the workaround for redirection of output with nawk as
38 dnl described in comments at the end of dcl2inc.awk.in.
39 if test "$AWK" = "gawk"; then
40 DCL2INC_REDIRECT='> "/dev/stderr"'
41 else
42 DCL2INC_REDIRECT='| "cat 1>&2"'
43 fi
44
45 dnl The above test sets AWK to pathless name. Later we will add a path
46 dnl and AWK_NAME will keep the pathless name to simplify flavor tests.
47 AWK_NAME=${AWK=awk}
48
49 dnl Check for gcc/cc
50
51 AC_PROG_CC
52
53 dnl Check for floating point option (really on applies to Suns, I
54 dnl think, and probably only Solaris at that).
55
56 AC_CHECK_PROGS(FPVERSION,fpversion)
57 if test "$FPVERSION" ; then
58 AC_MSG_CHECKING([for a floating point option])
59 CG_FLAG=`$FPVERSION -foption`
60 if test "CG_FLAG"; then CG_FLAG=-$CG_FLAG; fi
61 AC_MSG_RESULT([ $CG_FLAG ])
62 fi
63
64
65 dnl The following system utilities should be standard on all UNIX systems.
66 dnl If they are not found on standard path, they are left pathless.
67
68 STDPATH=/bin:/usr/bin:/usr/ucb:/usr/5bin
69 LOCALPATH=$STDPATH:/usr/local/bin
70
71 AC_PATH_PROG(AWK,$AWK_NAME,$AWK_NAME,$STDPATH)
72 AC_PATH_PROG(CC,${CC-cc},cc,$STDPATH)
73 AC_PATH_PROG(CHMOD,chmod,chmod,$STDPATH)
74 AC_PATH_PROG(CMP,cmp,cmp,$STDPATH)
75 AC_PATH_PROG(CP,cp,cp,$STDPATH)
76 AC_PATH_PROG(CTAGS,ctags,ctags,$STDPATH)
77 AC_PATH_PROG(DIFF,diff,diff,$STDPATH)
78 AC_PATH_PROG(EQN,eqn,eqn,$STDPATH)
79 AC_PATH_PROG(ETAGS,etags,etags,$STDPATH)
80 AC_PATH_PROG(GREP,grep,grep,$STDPATH)
81 AC_PATH_PROG(LINT,lint,lint,$STDPATH)
82 AC_CHECK_PROGS(MAKE,make,make,$STDPATH)
83 AC_PATH_PROG(MKDIR,mkdir,mkdir,$STDPATH)
84 AC_PATH_PROG(MV,mv,mv,$STDPATH)
85 AC_PATH_PROG(PATCH,patch,patch,$STDPATH)
86 AC_PATH_PROG(PRINTENV,printenv,printenv,$STDPATH)
87 AC_PATH_PROG(PWD_PROG,pwd,pwd,$STDPATH)
88 AC_PATH_PROG(RM,rm,rm,$STDPATH)
89 AC_PATH_PROG(RMDIR,rmdir,rmdir,$STDPATH)
90 AC_PATH_PROG(SED,sed,sed,$STDPATH)
91 AC_PATH_PROG(SH,sh,sh,$STDPATH)
92 AC_PATH_PROG(SOELIM,soelim,soelim,$STDPATH)
93 AC_PATH_PROG(TAR,tar,tar,$STDPATH)
94 AC_PATH_PROG(TBL,tbl,tbl,$STDPATH)
95 AC_PATH_PROG(YACC,$YACC_NAME,$YACC_NAME,$STDPATH)
96 AC_PATH_PROG(ZIP,zip,zip,$STDPATH)
97
98 dnl Add the necessary flag to RM.
99 RM="$RM -f"
100
101 dnl Look for pack (needed only for make install-man-sgi)
102 AC_PATH_PROG(PACK,pack,pack,$STDPATH)
103
104 dnl Check for nroff; groff will do too.
105 AC_PATH_PROGS(NROFF,nroff groff, nroff)
106
107 dnl If this is GNU nroff, need to use -c flag (no colors) to get plain
108 dnl text w/o escape codes, for VMS help document and similar things.
109 if test -x "$NROFF" && "$NROFF" --version | grep 'GNU nroff (groff)' >/dev/null 2>/dev/null ; then
110 NROFFPLAIN="$NROFF -c"
111 else
112 NROFFPLAIN="$NROFF"
113 fi
114
115 dnl Look for man-to-ps filter. Take groff if present but settle for others.
116
117 AC_PATH_PROGS(TROFF,groff)
118 if test -n "$TROFF" ; then
119 MANtoPS="$TROFF -man"
120 else
121 AC_PATH_PROGS(TROFF,psroff)
122 if test -n "$TROFF" ; then
123 MANtoPS="$TROFF -t -man"
124 else
125 dnl Solaris 2.1
126 if test -f /usr/lib/lp/postscript/dpost ; then
127 MANtoPS='troff -man | /usr/lib/lp/postscript/dpost'
128 else
129 dnl Nothing found: say groff and let them figure it out.
130 MANtoPS='groff -man'
131 fi
132 fi
133 fi
134
135
136 dnl Look for man-to-html filter. The scripts for converting the raw html
137 dnl into the files in the html directory depend on the specific
138 dnl filter's output style, so another converter probably won't do.
139 dnl At present the scripts require man2html, a.k.a. vh-man2html, which
140 dnl is now part of the standard RedHat distribution. We won't worry much
141 dnl about this since users generally won't be messing with the docs.
142 AC_PATH_PROGS(MANtoHTMLPROG,man2html rman)
143
144 case "$MANtoHTMLPROG" in
145 dnl There are at least two man2html's out there, and probably many more,
146 dnl so we try to detect whether we have the one that works with the converters.
147 *man2html)
148 if "$MANtoHTMLPROG" -version < /dev/null 2>&1 | grep 'Content-type: text/html' 1>/dev/null 2>&1
149 then
150 true
151 else
152 WRONG_MANtoHTML=true
153 fi
154 MANtoHTML="$MANtoHTMLPROG"
155 ;;
156 dnl rman is ok to make ftnchek.html, but "make htmldocs" won't work
157 *rman)
158 MANtoHTML="$MANtoHTMLPROG -f HTML -r '/cgi-bin/man2html?%s&%s'"
159 WRONG_MANtoHTML=true
160 ;;
161 *)
162 MANtoHTML="man2html"
163 AC_MSG_WARN([man-to-html converter not found: cannot re-make htmldocs if deleted])
164 ;;
165 esac
166 if test -n "$WRONG_MANtoHTML"
167 then
168 AC_MSG_WARN([man-to-html converter does not appear to be the right one])
169 AC_MSG_WARN([for re-making html docs if deleted. Need vh-man2html.])
170 fi
171
172
173 dnl Look for strip. If not, use a harmless substitute
174
175 AC_PATH_PROGS(STRIP,strip,[echo >/dev/null])
176
177
178 dnl See if col is on the path. If not, it may be BSD-like and user may
179 dnl not have /usr/5bin on path.
180
181 AC_PATH_PROGS(COL,col)
182 if test -n "$COL" ; then
183 COL="$COL -bx"
184 else
185 AC_MSG_CHECKING([for /usr/5bin/col])
186 if test -f /usr/5bin/col ; then
187 AC_MSG_RESULT([found it])
188 COL='/usr/5bin/col -bx'
189 else
190 AC_MSG_RESULT([col not found -- using cat instead])
191 COL=cat
192 fi
193 fi
194
195
196 dnl Look for ftnpp and if it is installed, it will be tested for compatibility
197 dnl as a filter for ftnchek.
198 AC_PATH_PROG(FTNPP,ftnpp,ftnpp,$LOCALPATH)
199
200 dnl Look for perl
201 AC_PATH_PROGS(PERL,perl,perl)
202
203 dnl Get sizes needed for declarations of some bit vectors.
204 dnl These tests generate autoconf warning ``AC_TRY_RUN called without
205 dnl default to allow cross compiling.'' Ignore unless you plan to
206 dnl cross-compile ftnchek.
207
208 AC_CHECK_SIZEOF(short)
209 AC_CHECK_SIZEOF(int)
210 AC_CHECK_SIZEOF(long)
211
212 dnl Sanity test (can fail if compiler bombs on the above tests)
213 if test "$ac_cv_sizeof_short" -le 2 -a "$ac_cv_sizeof_int" -le 2 -a "$ac_cv_sizeof_long" -le 2; then
214 AC_MSG_ERROR(Unable to find an integer datatype with more than 16 bits);
215 fi
216
217 dnl If unistd.h is found, it is used to define unlink().
218 AC_CHECK_HEADERS(unistd.h)
219
220 dnl If stdlib.h is found, it is used to declare malloc() and free().
221 AC_CHECK_HEADERS(stdlib.h)
222
223 dnl If strings.h is found, it is used to declare str[n]casecmp().
224 AC_CHECK_HEADERS(strings.h)
225
226 dnl Check for memset. This should be pretty universal by now, but you
227 dnl never know. The alternative is bzero.
228 AC_CHECK_FUNCS( memset, break, AC_DEFINE(HAVE_MEMSET,0) )
229 AC_CHECK_FUNCS( bzero, break, AC_DEFINE(HAVE_BZERO,0) )
230
231 dnl Check for strcasecmp or its common equivalents.
232 AC_CHECK_FUNCS( strcasecmp, break, AC_DEFINE(HAVE_STRCASECMP,0) )
233 AC_CHECK_FUNCS( stricmp, break, AC_DEFINE(HAVE_STRICMP,0) )
234 AC_CHECK_FUNCS( strcmpi, break, AC_DEFINE(HAVE_STRCMPI,0) )
235
236
237 dnl Sanity test (can fail if compiler bombs on the above tests)
238 if test -z "$ac_cv_func_memset" -a -z "$ac_cv_func_bzero"; then
239 AC_MSG_ERROR(Unable to find if memset or bzero available);
240 fi
241
242 dnl Define emacs site-lisp directory to install ftnchek.el in.
243 lispdir='${datadir}/emacs/site-lisp'
244 dnl Check for emacs. If it is present, ftnchek.el will be byte-compiled.
245 AC_PATH_PROG(EMACS,emacs,emacs)
246
247 dnl Set compiler options depending on operating system:
248
249 dnl Here's the place to tweak compiler settings, not in
250 dnl Makefile.in, (and certainly not in Makefile!)
251
252 INSTALL_MAN='install-man'
253 sgimansubdir="/manl"
254
255 if test -n "$CC_SAVE"; then
256 CC=$CC_SAVE
257 fi
258
259 OS_FLAGS=
260 OPT=
261 LDLIBS=
262 LDFLAGS=
263 case $host_os in
264 aix*)
265 if test -z "$GCC"; then
266 if test "$CC" = cc ; then
267 CC=c89
268 fi
269 dnl _XOPEN_SOURCE seems to be needed to get pipe() properly declared.
270 OS_FLAGS="-DAIXC -D_BSD -D_XOPEN_SOURCE"
271 OPT="-O"
272 else
273 OPT="-O2"
274 fi;;
275 hpux*)
276 if test -z "$GCC"; then
277 if test "$CC" = cc ; then
278 CC=c89
279 fi
280 OPT=" +O2 +Onolimit"
281 else
282 OPT="-O2"
283 fi;;
284 irix*)
285 dnl If gcc is being used, then all is simple.
286 if test -n "$GCC"; then
287 OPT="-O2"
288 else
289 dnl The optimization flag for IRIX changed at some point. The following
290 dnl test for where the transition occurred is based on advice of Guido Germano.
291 if cc -version 1>/dev/null 2>&1 ; then
292 ccnew=`cc -version 2>&1 | awk '{if($4 >= "7.2.1") print 1; else print 0}'`
293 else
294 ccnew=0
295 fi
296 if test "$ccnew" = "1"; then
297 OPT="-O2 -OPT:Olimit=5000"
298 else
299 OPT="-O2 -Olimit 5000"
300 fi
301 fi
302 INSTALL_MAN='install-man-sgi'
303 dnl old, old SGI systems put man pages into $mandir. Recent versions use
304 dnl $mandir/man1 or $mandir/manl. We look for these and use
305 dnl them if they exist.
306 eval MANDIR=$mandir
307 MANDIR=`echo "$MANDIR" | sed "s%NONE%$ac_default_prefix%"`
308 if test -d "$MANDIR/manl"; then
309 sgimansubdir="/manl"
310 elif test -d "$MANDIR/man1"; then
311 sgimansubdir="/man1"
312 else
313 sgimansubdir=""
314 fi;;
315 linux*)
316 if test -n "$GCC"; then
317 OPT="-O2";
318 fi;;
319 next*)
320 OPT="-O2";;
321
322 dnl OSF non-GCC options from John Faricelli of DEC:
323 dnl The option -ieee_with_inexact will cause earlier Alpha implementations
324 dnl to trap to software on floating operations that are not exact,
325 dnl in the mathematical sense (e.g. 2/7). This can be a large performance
326 dnl penalty. If all you wish to do is allow IEEE exceptional values
327 dnl (e.g. NaN, Infinity, etc), the correct option to use is
328 dnl -ieee_with_no_inexact.
329 dnl Also, in Digital Unix 4.0, the default C compiler has changed.
330 dnl The option "-Olimit 1000" is no longer needed, but is silently accepted
331 dnl by the compiler.
332 osf*)
333 if test -z "$GCC"; then
334 OS_FLAGS="-ieee_with_no_inexact"
335 OPT="-O -Olimit 1000"
336 else
337 OPT="-O2"
338 fi;;
339 sunos*)
340 OPT="-O2";;
341 solaris*)
342 cpucc="$host_cpu"-"$CC"
343 case $cpucc in
344 sparc-cc) OS_FLAGS="-Xc"
345 OPT="-xO4 $CG_FLAG";;
346 *gcc) OPT="-O2";;
347 *cc) OPT="-O";;
348 esac;;
349 ultrix*)
350 if test -z "$GCC"; then
351 OPT="-O2 -Olimit 1000"
352 else
353 OPT="-O2"
354 fi;;
355 *)
356 AC_MSG_WARN([Operating system not determined. Using generic flags.])
357 OPT="-O";;
358 esac
359
360 dnl If using gcc on Intel x86, add suitable submodel flag.
361 dnl This can be suppressed by --disable-submodel configure option.
362 use_submodel_flag="yes"
363 AC_ARG_ENABLE(submodel,dnl
364 changequote(<<, >>)dnl
365 << --enable-submodel provide gcc -march submodel flag [yes]>>,
366 changequote([, ])dnl
367 use_submodel_flag="$enableval",
368 use_submodel_flag="yes")
369 if test "$use_submodel_flag" = "yes" -a -n "$GCC"; then
370 case "$host_cpu" in
371 i386*)
372 OPT="$OPT -march=i386"
373 ;;
374 i486*)
375 OPT="$OPT -march=i486"
376 ;;
377 i586*)
378 OPT="$OPT -march=i586"
379 ;;
380 i686*)
381 OPT="$OPT -march=i686"
382 ;;
383 k6*)
384 OPT="$OPT -march=k6"
385 ;;
386 esac
387 fi
388
389 AC_MSG_CHECKING([whether $CC accepts function prototypes])
390 dnl the test prog includes specific code that chokes some compilers
391 AC_CACHE_VAL(ac_cv_prog_CC_protos,[
392 AC_TRY_COMPILE([],
393 [extern int foo(int arg); /* basic prototype */
394 static int (*ii_fun[]) ( int *args )={ 0, };],
395 ac_cv_prog_CC_protos=yes,ac_cv_prog_CC_protos=no)])
396 AC_MSG_RESULT([$ac_cv_prog_CC_protos])
397 if test $ac_cv_prog_CC_protos = yes ; then
398 PROTOFLAG=""
399 else
400 PROTOFLAG="-DNO_PROTOTYPES"
401 fi
402
403
404 CFLAGS="-DUNIX \$(OPT) $OS_FLAGS $PROTOFLAG \$(OPTIONS)"
405 AC_MSG_RESULT([Compile command is $CC $CFLAGS])
406 AC_MSG_RESULT([\$(OPT) is $OPT])
407 AC_MSG_RESULT([\$(OPTIONS) is for optional defines, normally blank])
408 if test $GCC; then
409 AC_MSG_RESULT([If you prefer using cc, setenv CC cc and re-run configure])
410 fi
411
412 dnl Here we define EXE and CMD prefixes to be null, as needed by Unix.
413 dnl Do this way just so they can be substituted otherwise for OS/2 et al.
414
415 EXE=
416 CMD=
417 AC_SUBST(EXE)
418 AC_SUBST(CMD)
419
420 AC_SUBST(NROFF)
421 AC_SUBST(NROFFPLAIN)
422 AC_SUBST(MANtoPS)
423 AC_SUBST(MANtoHTML)
424 AC_SUBST(STRIP)
425 AC_SUBST(DCL2INC_REDIRECT)
426 AC_SUBST(COL)
427 AC_SUBST(SED)
428 AC_SUBST(CC)
429 AC_SUBST(CFLAGS)
430 AC_SUBST(OPT)
431 AC_SUBST(LDLIBS)
432 AC_SUBST(LDFLAGS)
433 AC_SUBST(INSTALL_MAN)
434 AC_SUBST(lispdir)
435 AC_SUBST(sgimansubdir)
436
437 AC_SUBST(AWK)
438 AC_SUBST(AWK_NAME)
439 AC_SUBST(CHMOD)
440 AC_SUBST(CMP)
441 AC_SUBST(CP)
442 AC_SUBST(DIFF)
443 AC_SUBST(EMACS)
444 AC_SUBST(EQN)
445 AC_SUBST(FTNPP)
446 AC_SUBST(GREP)
447 AC_SUBST(LINT)
448 AC_SUBST(MAKE)
449 AC_SUBST(MKDIR)
450 AC_SUBST(MV)
451 AC_SUBST(PACK)
452 AC_SUBST(PATCH)
453 AC_SUBST(PERL)
454 AC_SUBST(PRINTENV)
455 AC_SUBST(PWD_PROG)
456 AC_SUBST(RM)
457 AC_SUBST(RMDIR)
458 AC_SUBST(SHELL)
459 AC_SUBST(SOELIM)
460 AC_SUBST(TAR)
461 AC_SUBST(TBL)
462 AC_SUBST(ZIP)
463 AC_SUBST(YACC)
464 AC_SUBST(YACC_NAME)
465 AC_SUBST(YFLAGS)
466 AC_SUBST(FILTER_H)
467
468 AC_OUTPUT( Makefile dcl2inc.awk dcl2inc make_blockmatch.pl test/Makefile test/Compare.sh )
469 chmod +x dcl2inc make_blockmatch.pl test/Compare.sh