about summary refs log tree commit diff stats
path: root/picat
ModeNameSize
-rw-r--r--basic.pi12839log stats plain blame
-rw-r--r--cp.pi13118log stats plain blame
-rw-r--r--exs.pi14421log stats plain blame
-rw-r--r--fib.pi357log stats plain blame
-rw-r--r--planner.pi13806log stats plain blame
-rw-r--r--sys.pi1172log stats plain blame
-rw-r--r--util.pi9893log stats plain blame
key <dickey@invisible-island.net> 1997-09-12 09:32:20 -0400 snapshot of project "lynx", label v2-7-1ac_0-64' href='/ingrix/lynx-snapshots/commit/configure.in?id=2f5222ea2a4d549b4f269c11d34016fc7dc58dde'>2f5222ea ^
b6c832d0 ^
2f5222ea ^





























e4409c40 ^

















e4409c40 ^










55ebd12c ^










e4409c40 ^






1a2ac66b ^
d2e46bbf ^
1a2ac66b ^
e4409c40 ^

c4e90d70 ^
e4409c40 ^
945e8eb6 ^












c4e90d70 ^





945e8eb6 ^














36863953 ^



945e8eb6 ^
e4409c40 ^


945e8eb6 ^










c4e90d70 ^














eef116fe ^





2f5222ea ^



945e8eb6 ^








e4409c40 ^

050803d4 ^
e4409c40 ^
2f5222ea ^
e4409c40 ^









549ec595 ^
e4409c40 ^














e47cfd56 ^
2f5222ea ^


e47cfd56 ^



e4409c40 ^







e4409c40 ^




e47cfd56 ^


ab8b1f12 ^
e47cfd56 ^
8f8c57cc ^
e47cfd56 ^
549ec595 ^
8f8c57cc ^
549ec595 ^
e4409c40 ^






97d3287a ^
e4409c40 ^






945e8eb6 ^
e4409c40 ^





8f8c57cc ^
97d3287a ^
e4409c40 ^





899516a7 ^
e4409c40 ^



97d3287a ^
e4409c40 ^
c4e90d70 ^
b6c832d0 ^
2f5222ea ^
e4409c40 ^
97d3287a ^





55ebd12c ^


e4409c40 ^




945e8eb6 ^
e4409c40 ^
e4409c40 ^
945e8eb6 ^

e4409c40 ^





945e8eb6 ^

e4409c40 ^





b6c832d0 ^

e4409c40 ^





2f5222ea ^



945e8eb6 ^
549ec595 ^



945e8eb6 ^
549ec595 ^
945e8eb6 ^


36863953 ^


8f8c57cc ^
945e8eb6 ^


549ec595 ^
945e8eb6 ^

55ebd12c ^
945e8eb6 ^
945e8eb6 ^


8f8c57cc ^

e47cfd56 ^
8f8c57cc ^

55ebd12c ^
945e8eb6 ^

55ebd12c ^
945e8eb6 ^
899516a7 ^







b6c832d0 ^





55ebd12c ^









ab8b1f12 ^







55ebd12c ^














b6c832d0 ^
549ec595 ^
1a2ac66b ^
549ec595 ^





1a2ac66b ^






2f5222ea ^






c4e90d70 ^


549ec595 ^






c4e90d70 ^

050803d4 ^
c4e90d70 ^
2f5222ea ^
c4e90d70 ^



2f5222ea ^
c4e90d70 ^



2f5222ea ^
c4e90d70 ^



2f5222ea ^
c4e90d70 ^

ab8b1f12 ^
c4e90d70 ^
ab8b1f12 ^
c4e90d70 ^

ab8b1f12 ^
c4e90d70 ^
ab8b1f12 ^
c4e90d70 ^

ab8b1f12 ^
c4e90d70 ^
ab8b1f12 ^
c4e90d70 ^

ab8b1f12 ^
c4e90d70 ^
ab8b1f12 ^
c4e90d70 ^




ab8b1f12 ^
c4e90d70 ^


e4409c40 ^
c4e90d70 ^
e4409c40 ^
ab8b1f12 ^
c4e90d70 ^

e4409c40 ^
e4409c40 ^

e47cfd56 ^
97d3287a ^
e47cfd56 ^



97d3287a ^
e47cfd56 ^
97d3287a ^

e4409c40 ^




e47cfd56 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567





















                                                                              
                                                  
 






                                                                              
               
















                                                                   
                     







                                            
                          





























                                                                              

















                                                                                    










                                 










                                                                         






                                                                              
                        
                        
  

          
                                                                           
                












                                               





                                                                             














                                                                                      



                                                                              
          


                                 










                                                                        














                                                                              





                                                                



                                            








                                                

                                                                        
                                                              
                                  
                                                                   









                                                                              
                                                                       














                                                                       
                                       


                                                                                



                     







                           




                         


                                                                                
                                                                                            
 
                                            
                                 
                                                  
                             
 






                                                                              
                                                                        






                     
                     





                     
            
              





                                                                              
          



                 
                   
                
                 
                  
                 
 





                                                 


                                     




                                                                              
            
        
         

              





                                                                  

                          





                         

                                    





                                                                              



                       
                                                   



                                                                  
 
                                     


                                                                     


                                                                     
                           


                               
                        

                         
                    
          


                                   

                                                         
                                         

                                                          
                               

          
                     
 







                                                              





                                                     









                                                                        







                                                                            














                                                                           
 
                                                                             
                 





                                                                          






                                        






                                                                              


                                                                      






                                                                     

                                
                                                                                
                                     
                                                                                            



                                                                          
                                                                                       



                                                                            
                                                                                          



                                                                                      
                                                                                                       

                                 
                                                                       
                                 
                                                                               

                                 
                                                                            
                                      
                                                                                          

                                 
                                                                                   
                                 
                                                                                          

                                 
                                                                                     
                                  
                                                                                            




                                                    
                                                                     


                               
                                                             
                               
                            
                                                                       

                                             
 

                                             
                
                



                                          
                                                
  

                      




                                   
 
dnl Process this file with autoconf to produce a configure script.
dnl written jan/1997
dnl by T.E.Dickey <dickey@clark.net>
dnl and Jim Spath <jspath@mail.bcpl.lib.md.us>

AC_PREREQ(2.12)
AC_INIT(userdefs.h)
AC_CONFIG_HEADER(lynx_cfg.h:config.hin)

AC_PREFIX_DEFAULT(/usr/local)
AC_CANONICAL_HOST

dnl --------------------------------------------------------------------------
dnl Checks for location of programs
dnl --------------------------------------------------------------------------

AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_MAKE_SET
CF_MAKE_INCLUDE
AC_PROG_INSTALL
AC_CHECK_PROGS(LINT, lint alint lclint tdlint, [])

dnl --------------------------------------------------------------------------
dnl Debug/development/test
dnl --------------------------------------------------------------------------

CF_HELP_MESSAGE(
Development Options:)

CF_DISABLE_ECHO

AC_MSG_CHECKING(if you want to check memory-leaks)
CF_ARG_ENABLE(find-leaks,
	[  --enable-find-leaks     logic for testing memory leaks],
	[with_leak_checks=yes],
	[with_leak_checks=no])
AC_MSG_RESULT($with_leak_checks)
test "$with_leak_checks" = "yes" && AC_DEFINE(LY_FIND_LEAKS)

AC_MSG_CHECKING(if you want to enable debug-code)
CF_ARG_ENABLE(debug,
	[  --enable-debug          logic for traces/debugging],
	[with_debug=yes],
	[with_debug=no])
AC_MSG_RESULT($with_debug)
if test "$with_debug" = "yes" ; then
	case $host_os in
	ultrix*|osf*)
		CF_STRIP_O_OPT(CFLAGS)
		if test -z "$GCC" ; then
			CFLAGS="$CFLAGS -g3"
		fi
		;;
	esac
else
	case $host_os in
	ultrix*|osf*) #(vi
		CF_STRIP_G_OPT(CFLAGS)
		;;
	*)
		if test -n "$GCC" ; then
			CF_STRIP_G_OPT(CFLAGS)
		fi
		;;
	esac
fi

if test -n "$GCC"
then
AC_MSG_CHECKING(if you want to turn on gcc warnings)
CF_ARG_ENABLE(warnings,
	[  --enable-warnings       GCC compiler warnings],
	[with_warnings=yes],
	[with_warnings=no])
AC_MSG_RESULT($with_warnings)
if test "$with_warnings" = "yes"
then
	CF_GCC_WARNINGS
fi
fi

dnl --------------------------------------------------------------------------
dnl --------------------------------------------------------------------------

CF_HELP_MESSAGE(
Basic Configuration Options:)

AC_MSG_CHECKING(if you want full utility pathnames)
CF_ARG_DISABLE(full-paths,
	[  --disable-full-paths    control whether full utility pathnames are used],
	[with_full_paths=no],
	[with_full_paths=yes])
AC_MSG_RESULT($with_full_paths)

CF_DEFINE_PROG(system mailer, SYSTEM_MAIL,
	/usr/mmdf/bin/submit \
	/usr/sbin/sendmail \
	/usr/lib/sendmail  \
	)
CF_SYSTEM_MAIL_FLAGS

CF_PATH_PROG(CHMOD,	chmod)
CF_PATH_PROG(COMPRESS,	compress)
CF_PATH_PROG(COPY,	cp)
CF_PATH_PROG(GZIP,	gzip)
CF_PATH_PROG(MKDIR,	mkdir)
CF_PATH_PROG(MV,	mv)
CF_PATH_PROG(RM,	rm)
CF_PATH_PROG(TAR,	tar)
CF_PATH_PROG(TOUCH,	touch)
CF_PATH_PROG(UNCOMPRESS,gunzip)
CF_PATH_PROG(UNZIP,	unzip)
CF_PATH_PROG(UUDECODE,	uudecode)
CF_PATH_PROG(ZCAT,	zcat)
CF_PATH_PROG(ZIP,	zip)

dnl 'INSTALL' is a special case, since the configure script has to find a
dnl BSD-compatible one so the build/install works properly.
case "$INSTALL" in
$srcdir*) # (vi
	AC_DEFINE_UNQUOTED(INSTALL_PATH,"install")
	;;
*) # (vi
	AC_DEFINE_UNQUOTED(INSTALL_PATH,"$INSTALL")
	;;
esac

dnl --------------------------------------------------------------------------
dnl Checks for compiler & standard-library characteristics
dnl --------------------------------------------------------------------------

dnl If we're able to run this script, this is true!
AC_DEFINE(UNIX)

if test -z "$GCC" ; then
	CF_ANSI_CC_CHECK
fi
AC_C_CONST

dnl Only add to this case statement things that we cannot design tests for.
case $host_os in
aix4*)
	CFLAGS="$CFLAGS -DAIX4 -D_BSD=44" 
	LIBS="$LIBS -lbsd"
	;;
aix*)
	LIBS="$LIBS -lbsd"
	;;
apollo*)
	CFLAGS="$CFLAGS -D_BUILTINS -W0,-opt,4"
	;;
bsdi*)
	CFLAGS="$CFLAGS -DBSDI" 
	;;
clix*)
	# Tested on CLIX 3.1 (T.Dickey).  The original makefile entry
	# contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also
	# references -lmalloc and -lbsd.
	AC_CHECK_LIB(c_s,strcmp)
	;;
convex*)
	CFLAGS="$CFLAGS -D__STDC__ -Dunix"
	;;
dgux*)
	CFLAGS="$CFLAGS -DDGUX" 
	;;
hpux*)
	CFLAGS="$CFLAGS -DSNAKE" 
	;;
isc*)
	# -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
	CFLAGS="$CFLAGS -DISC -DPOSIX_JC"
	LIBS="$LIBS -linet -lnsl_s -lcposix"
	;;
irix*)
	# The original makefile used the $CFLAGS option -cckr for some form
	# of K&R compatibility.  However, this causes compilation warnings for
	# varargs on IRIX 5.2, and does not appear to be needed.
	#removed: CFLAGS="$CFLAGS -cckr" 
	;;
linux*)
	CFLAGS="$CFLAGS -DLINUX" 
	;;
next*)
	CFLAGS="$CFLAGS -DNEXT -DXMOSAIC_HACK"
	;;
openbsd*)
	LIBS="$LIBS -lcompat"
	;;
osf*)
	# Increase the maximum size of functions that will be optimized.
	test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 4000"
	CFLAGS="$CFLAGS -DDSYS5"
	;;
sco3.2v5*)
	test $ac_cv_prog_gcc != yes && CC="cc -belf"
	;;
sco*)
	LIBS="$LIBS -lmalloc"
	# It's a little late to do much, but try to warn user if he's using
	# SCO's cc (which is reported to have broken const/volatile).
	case "$CC" in #(vi
	cc|*/cc)
		AC_MSG_WARN(You should consider using gcc or rcc if available)
		unset ac_cv_prog_CC
		AC_CHECK_PROGS(CC,gcc rcc,$CC)
		;;
	esac
	;;
sequent-ptx)
	CFLAGS="$CFLAGS -DSVR4_BSDSELECT -DNO_IOCTL -DUSE_FCNTL"
	;;
sequent-ptx2)
	CFLAGS="$CFLAGS -DSVR4_BSDSELECT"
	;;
sony-newsos*)
	CFLAGS="$CFLAGS -I/usr/sony/include"
	AC_CHECK_HEADERS(jcurses.h)
	;;
svr4)
	CFLAGS="$CFLAGS -DSVR4_BSDSELECT -DSVR4"
	;;
sunos3*)
	CFLAGS="$CFLAGS -DSUN"
	;;
sunos4*)
	CFLAGS="$CFLAGS -DSUN -DSUN4"
	;;
ultrix*)
	# Increase the maximum size of functions that will be optimized.
	test -z "$GCC" && CFLAGS="$CFLAGS -O -Olimit 600 -G 7"
	CFLAGS="$CFLAGS -DULTRIX" 
	AC_CHECK_HEADERS(cursesX.h, cf_cv_ncurses_header=cursesX.h)
	;;
esac

dnl --------------------------------------------------------------------------
dnl Checks for library configuration (added right-to-left)
dnl --------------------------------------------------------------------------

CF_NETLIBS

AC_MSG_CHECKING(for screen type)
dnl This has to be cached, since there's a lot of interdependent tests.
AC_CACHE_VAL(cf_cv_screen,[
AC_ARG_WITH(screen,
[  --with-screen=XXX       select screen type
                          (XXX is curses (default), ncurses or slang)],
	[
case $withval in
curses|ncurses|slang)
	cf_cv_screen=$withval
	;;
*)	AC_ERROR(Unexpected value)
	;;
esac],
	[cf_cv_screen=curses])])
AC_MSG_RESULT($cf_cv_screen)

if test $cf_cv_screen != ncurses ; then
	if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" != set"; then
		cf_cv_ncurses_header=curses.h
	fi
fi

case $cf_cv_screen in
curses)
	CF_CURSES_LIBS
	CF_CURS_PERFORMANCE
	;;
ncurses)
	CF_NCURSES_CPPFLAGS
	CF_NCURSES_LIBS
	;;
slang)
	CF_SLANG_CPPFLAGS
	CF_SLANG_LIBS
	;;
esac

dnl Get the actual value for $libdir, which we will compile into Lynx as part of
dnl the config pathnames.
eval cf_libdir=$libdir
cf_libdir=`echo $cf_libdir | sed -e s@'^NONE/'@$prefix/@ -e s@'^NONE/'@$ac_default_prefix/@`

AC_MSG_CHECKING(for location of config-file)
LYNX_CFG_FILE=$cf_libdir/lynx.cfg
AC_DEFINE_UNQUOTED(LYNX_CFG_FILE,"$LYNX_CFG_FILE")
AC_MSG_RESULT($LYNX_CFG_FILE)

dnl --------------------------------------------------------------------------
dnl Checks for standard headers
dnl --------------------------------------------------------------------------

AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_DIRENT
dnl Don't check for sys/wait.h here since it is covered by another test.
AC_CHECK_HEADERS( \
	fcntl.h \
	limits.h \
	string.h \
	sys/fcntl.h \
	sys/filio.h \
	sys/ioctl.h \
	sys/param.h \
	sys/time.h \
	termio.h \
	termios.h \
	unistd.h \
)
CF_TERMIO_AND_TERMIOS
CF_FUNC_WAIT
AC_TYPE_MODE_T

dnl --------------------------------------------------------------------------
dnl Checks for library units
dnl --------------------------------------------------------------------------

AC_FUNC_VFORK
CF_FIONBIO
CF_REMOVE_BROKEN
AC_CHECK_FUNCS( \
	cuserid \
	getcwd \
	getgroups \
	putenv \
	readdir \
	strerror \
	waitpid \
)
AC_REPLACE_FUNCS( \
	mktime \
	strstr \
)

CF_CHECK_FUNCDECLS([#include <string.h>], strstr)
CF_CHECK_FUNCDECLS([
#include <stdio.h>
#include <grp.h>], getgrgid getgrnam)

dnl --------------------------------------------------------------------------
dnl Checks for external-data
dnl --------------------------------------------------------------------------

CF_BOOL_DEFS
CF_ERRNO
CF_LOCALE
CF_NGROUPS
CF_SYS_ERRLIST
CF_UTMP

### These tests must be run after establishing the curses library.
if test $cf_cv_screen != slang ; then
	CF_ALT_CHAR_SET
	CF_FANCY_CURSES
	CF_NCURSES_VERSION
	CF_NCURSES_BROKEN
	CF_COLOR_CURSES
	CF_SIZECHANGE
	CF_TTYTYPE
	AC_CHECK_FUNCS( \
		cbreak \
		keypad \
		use_default_colors \
		wborder \
	)
fi

dnl --------------------------------------------------------------------------
dnl Miscellaneous options that don't need to test system features
dnl --------------------------------------------------------------------------

CF_HELP_MESSAGE(
Miscellaneous Options:)

AC_MSG_CHECKING(if color-style code should be used)
CF_ARG_ENABLE(color-style,
[  --enable-color-style    use optional/experimental color style],
	[use_color_style=$enableval],
	[use_color_style=no])

if test $use_color_style != no ; then
	if test .$cf_cv_color_curses != .yes ; then
		AC_ERROR(Configuration does not support color-styles)
	fi
	if test $cf_cv_screen = slang ; then
		AC_ERROR(Configuration does not support color-styles)
	fi
	AC_DEFINE(USE_HASH)
	AC_DEFINE(LINKEDSTYLES)
fi

case $use_color_style in
no)
	AC_MSG_RESULT(no)
	INSTALL_LSS=
	;;
*)
	AC_DEFINE(USE_COLOR_STYLE)
	AC_MSG_RESULT(curses-style)

	AC_MSG_CHECKING(for location of style-sheet file)
	LYNX_LSS_FILE=$cf_libdir/lynx.lss
	AC_DEFINE_UNQUOTED(LYNX_LSS_FILE,"$LYNX_LSS_FILE")
	AC_MSG_RESULT($LYNX_LSS_FILE)
	INSTALL_LSS=install-lss
	;;
esac
AC_SUBST(INSTALL_LSS)

AC_MSG_CHECKING(if you want to use extended HTML DTD logic)
CF_ARG_DISABLE(extended-dtd,
[  --disable-extended-dtd  disable extended HTML DTD logic],
	[use_ext_htmldtd=no],
	[use_ext_htmldtd=yes])
AC_MSG_RESULT($use_ext_htmldtd)
test $use_ext_htmldtd = "no" && AC_DEFINE(NO_EXTENDED_HTMLDTD)

AC_MSG_CHECKING(if you want to use external commands)
CF_ARG_ENABLE(externs,
[  --enable-externs        use external commands],
	[use_externs=yes],
	[use_externs=no])
AC_MSG_RESULT($use_externs)
test $use_externs != ".no" && AC_DEFINE(USE_EXTERNALS)

AC_MSG_CHECKING(if you want to use setfont support)
CF_ARG_ENABLE(font-switch,
[  --enable-font-switch    use Linux setfont for character-translation],
	[use_setfont=yes],
	[use_setfont=no])
AC_MSG_RESULT($use_setfont)
test $use_setfont = yes && AC_DEFINE(EXP_CHARTRANS_AUTOSWITCH)

AC_MSG_CHECKING(if you want internal-links feature)
CF_ARG_DISABLE(internal-links,
[  --disable-internal-links handle following links to same doc differently],
	[use_internal_links=no],
	[use_internal_links=yes])
AC_MSG_RESULT($use_internal_links)
test $use_internal_links = no && AC_DEFINE(DONT_TRACK_INTERNAL_LINKS)

AC_MSG_CHECKING(if you want to fork NSL requests)
CF_ARG_ENABLE(nsl-fork,
[  --enable-nsl-fork       fork NSL requests, allowing them to be aborted],
	[use_nsl_fork=yes],
	[use_nsl_fork=no])
AC_MSG_RESULT($use_nsl_fork)
test $use_nsl_fork = yes && AC_DEFINE(NSL_FORK)

AC_MSG_CHECKING(if you want to underline links)
CF_ARG_ENABLE(underlines,
[  --enable-underlines     underline links rather than using boldface],
	[use_underline=yes],
	[use_underline=no])
AC_MSG_RESULT($use_underline)
test $use_underline = yes && AC_DEFINE(UNDERLINE_LINKS)

AC_MSG_CHECKING(if you want to use zlib for decompression of some gzip files)
AC_ARG_WITH(zlib,
[  --with-zlib             use zlib for decompression of some gzip files],
	[use_zlib=$withval],
	[use_zlib=no])
AC_MSG_RESULT($use_zlib)

if test ".$use_zlib" != ".no" ; then
	CF_FIND_LIBRARY(z,
		[#include <zlib.h>],
		[gzopen("name","mode")],
		gzopen)
	AC_DEFINE(USE_ZLIB)
fi

dnl --------------------------------------------------------------------------
dnl DirEd (directory-editor) options
dnl --------------------------------------------------------------------------

CF_HELP_MESSAGE(
Directory Editor Options:)

# All DirEd functions that were enabled on compilation can be disabled
# or modified at run time via DIRED_MENU symbols in lynx.cfg.
AC_MSG_CHECKING(if directory-editor code should be used)
CF_ARG_DISABLE(dired,
[  --disable-dired          enable optional directory-editor, DirEd],
	[use_dired=$enableval],
	[use_dired=yes])
AC_MSG_RESULT($use_dired)

if test ".$use_dired" != ".no" ; then
	AC_DEFINE(DIRED_SUPPORT)

	AC_MSG_CHECKING(if you wish to allow extracting from archives via DirEd)
	CF_ARG_DISABLE(dired-archive,
	[  --disable-dired-archive  disable dearchiving commands],[AC_DEFINE(ARCHIVE_ONLY)])
	AC_MSG_RESULT($enableval)

	AC_MSG_CHECKING(if you wish to allow users to redefine DirEd keys)
	CF_ARG_DISABLE(dired-override,
	[  --disable-dired-override disable private keymaps],,[AC_DEFINE(OK_OVERRIDE)])
	AC_MSG_RESULT($enableval)

	AC_MSG_CHECKING(if you wish to allow permissions commands via DirEd)
	CF_ARG_DISABLE(dired-permit,
	[  --disable-dired-permit  disable chmod/attrib commands],,[AC_DEFINE(OK_PERMIT)])
	AC_MSG_RESULT($enableval)

	AC_MSG_CHECKING(if you wish to allow executable-permission commands via DirEd)
	CF_ARG_DISABLE(dired-xpermit,
	[  --disable-dired-xpermit disable chmod/attrib commands],[AC_DEFINE(NO_CHANGE_EXECUTE_PERMS)])
	AC_MSG_RESULT($enableval)

	AC_MSG_CHECKING(if you wish to allow "tar" commands from DirEd)
	CF_ARG_DISABLE(dired-tar,
	[  --disable-dired-tar     disable "tar" command],,[AC_DEFINE(OK_TAR)])
	AC_MSG_RESULT($enableval)

	AC_MSG_CHECKING(if you wish to allow "uudecode" commands from DirEd)
	CF_ARG_DISABLE(dired-uudecode,
	[  --disable-dired-uudecode disable "uudecode" command],,[AC_DEFINE(OK_UUDECODE)])
	AC_MSG_RESULT($enableval)

	AC_MSG_CHECKING(if you wish to allow "zip" and "unzip" commands from DirEd)
	CF_ARG_DISABLE(dired-zip,
	[  --disable-dired-zip     disable "zip", "unzip"  commands],,[AC_DEFINE(OK_ZIP)])
	AC_MSG_RESULT($enableval)

	AC_MSG_CHECKING(if you wish to allow "gzip" and "gunzip" commands from DirEd)
	CF_ARG_DISABLE(dired-gzip,
	[  --disable-dired-gzip    disable "gzip", "gunzip" commands],,[AC_DEFINE(OK_GZIP)])
	AC_MSG_RESULT($enableval)
fi

AC_MSG_CHECKING(if you want long-directory listings)
CF_ARG_DISABLE(long-list,
[  --disable-long-list     disable long "ls -l" directory listings],,
	[AC_DEFINE(LONG_LIST)])
AC_MSG_RESULT($enableval)

AC_MSG_CHECKING(if parent-directory references are permitted)
CF_ARG_DISABLE(parent-dir-refs,
[  --disable-parent-dir-refs
                          disable "Up-to" links in directory listings],
	[AC_DEFINE(NO_PARENT_DIR_REFERENCE)])
AC_MSG_RESULT($enableval)

### Finally, build config.h and the makefiles
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
srcdir="$srcdir"
SRCDIR_CLEAN="#"
if test -n "$srcdir" ; then
	echo srcdir is $srcdir
	$srcdir/mkdirs.sh WWW/Library/unix
	$srcdir/mkdirs.sh src/chrtrans
	test "$srcdir" != "." && SRCDIR_CLEAN=""
fi

AC_SUBST(SRCDIR_CLEAN)
AC_OUTPUT(
	makefile \
	WWW/Library/unix/makefile \
	src/makefile \
	src/chrtrans/makefile \
)