File: configure.in

package info (click to toggle)
aterm 0.4.2-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,540 kB
  • ctags: 1,462
  • sloc: ansic: 14,669; sh: 582; makefile: 315
file content (794 lines) | stat: -rw-r--r-- 21,222 bytes parent folder | download | duplicates (2)
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
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
dnl# -*- sh -*-
dnl#
dnl# $Id: configure.in,v 1.4 2001/09/06 15:57:04 sashav Exp $
dnl#
dnl# Process this file with autoconf to produce a configure script.
dnl#
AC_INIT(src/feature.h)
AC_CONFIG_AUX_DIR(autoconf)
AC_CONFIG_HEADER(config.h:autoconf/config.h.in)

dnl ATERM version
VERSION=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
DATE=`sed -n -e 's/^.*[ \t]*DATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
LSMDATE=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
AC_SUBST(VERSION)dnl
AC_SUBST(DATE)dnl
AC_SUBST(LSMDATE)dnl
echo "configuring for aterm $VERSION"

MALLOC_TYPE=S

dnl# --------------------------------------------------------------------------
dnl# CHECKING COMMAND LINE OPTIONS
dnl# --------------------------------------------------------------------------
AC_ARG_ENABLE(utmp,
  [  --enable-utmp           enable utmp/utmpx support],
  [if test x$enableval = xyes; then
    AC_DEFINE(UTMP_SUPPORT) utmp_support=yes
  fi])

AC_ARG_ENABLE(wtmp,
  [  --enable-wtmp           enable wtmp support if you have utmp/utmpx support],
  [if test x$enableval = xyes; then
    AC_DEFINE(WTMP_SUPPORT) wtmp_support=yes
  fi])

AC_ARG_ENABLE(background-image,
  [  --enable-background-image enable background pixmaps],
  [if test x$enableval = xyes; then
    background_image=yes
  fi])

AC_ARG_ENABLE(transparency,
  [  --enable-transparency enable transparent background [yes] ],
  enable_transparency=$enableval,
  enable_transparency="yes")

if test "x$enable_transparency" = "xyes";
then AC_DEFINE(TRANSPARENT) transparent=yes;
fi

AC_ARG_ENABLE(,
  [  --enable-fading enable colors fading when off focus [no] ],
  [if test x$enableval = xyes; then
    enable_fading=yes ;
  fi])

if test "x$enable_fading" = "xyes";
then AC_DEFINE(OFF_FOCUS_FADING) fading=yes;
fi

AC_ARG_ENABLE(menubar,
  [  --enable-menubar        enable Menubar],
  [if test x$enableval = xyes; then
    AC_DEFINE(MENUBAR)
  fi])

AC_ARG_ENABLE(graphics,
  [  --enable-graphics       enable aterm own graphics mode (see src/graphics)],
  [if test x$enableval = xyes; then
    AC_DEFINE(RXVT_GRAPHICS)
  fi])

AC_ARG_ENABLE(next-scroll,
  [  --enable-next-scroll    enable NeXT style scrollbar [yes] ],
  enable_next_scroll=$enableval,
  enable_next_scroll="yes")

if test "x$enable_next_scroll" = "xyes";
then
    AC_DEFINE(NEXT_SCROLLBAR)
    SBARFILE=scrollbar2
fi

AC_ARG_ENABLE(xterm-scroll,
  [  --enable-xterm-scroll   revert to Xterm style scrollbar],
  [if test x$enableval = xyes; then
    AC_DEFINE(XTERM_SCROLLBAR)
  fi])

AC_ARG_ENABLE(half-shadow,
  [  --enable-half-shadow    use half width/height shadows on non-Xterm scrollbar],
  [if test x$enableval = xyes; then
    AC_DEFINE(HALFSHADOW)
  fi])

AC_ARG_ENABLE(kanji,
  [  --enable-kanji          enable kanji support],
  [if test x$enableval = xyes; then
    AC_DEFINE(KANJI)
  fi])

AC_ARG_ENABLE(big5,
  [  --enable-big5           enable big5 support],
  [if test x$enableval = xyes; then
    AC_DEFINE(ZH)
  fi])

AC_ARG_ENABLE(greek,
  [  --enable-greek          enable greek keyboard support],
  [if test x$enableval = xyes; then
    AC_DEFINE(GREEK_SUPPORT)
  fi])

AC_ARG_ENABLE(thai,
  [  --enable-thai           enable thai support],
  [if test x$enableval = xyes; then
    AC_DEFINE(THAI)
  fi])

AC_ARG_ENABLE(ttygid,
  [  --enable-ttygid         enable tty setting to group \"tty\" - use only if
                          your system uses this type of security],
  [if test x$enableval = xyes; then
    AC_DEFINE(TTY_GID_SUPPORT)
  fi])

AC_ARG_ENABLE(backspace-key,
  [  --disable-backspace-key disable handling of the backspace key],
  [if test x$enableval = xno; then
    AC_DEFINE(NO_BACKSPACE_KEY)
  fi])

AC_ARG_ENABLE(delete-key,
  [  --disable-delete-key    disable handling of the delete key],
  [if test x$enableval = xno; then
    AC_DEFINE(NO_DELETE_KEY)
  fi])

AC_ARG_ENABLE(resources,
  [  --disable-resources     disable all resource checking],
  [if test x$enableval = xno; then
    AC_DEFINE(NO_RESOURCES)
  fi])

AC_ARG_ENABLE(xgetdefault,
  [  --enable-xgetdefault    enable resources via X instead of our small version],
  [if test x$enableval = xyes; then
    AC_DEFINE(USE_XGETDEFAULT)
  fi])

AC_ARG_ENABLE(memset,
  [  --disable-memset        disable memset() function, use your system's instead],
  [if test x$enableval = xno; then
    AC_DEFINE(NO_RMEMSET)
  fi])

AC_ARG_ENABLE(swapscreen,
  [  --disable-swapscreen    disable swap screen support],
  [if test x$enableval = xno; then
    AC_DEFINE(NO_SECONDARY_SCREEN)
  fi])

AC_ARG_ENABLE(keepscrolling,
  [  --disable-keepscrolling disable continual scrolling on scrollbar arrow press],
  [if test x$enableval = xno; then
    AC_DEFINE(NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING)
  fi])

AC_ARG_ENABLE(mousewheel,
  [  --disable-mousewheel    disable scrolling via mouse wheel or buttons 4 & 5],
  [if test x$enableval = xno; then
    AC_DEFINE(NO_MOUSE_WHEEL)
  fi])

AC_ARG_ENABLE(old-selection,
  [  --enable-old-selection  enable v2.20 (and prior) mouse selection
                          - this implies old word selection],
  [if test x$enableval = xyes; then
    AC_DEFINE(OLD_SELECTION)
  fi])

AC_ARG_ENABLE(old-wordselect,
  [  --enable-old-wordselect enable v2.20 (and prior) mouse selection of words],
  [if test x$enableval = xyes; then
    AC_DEFINE(OLD_WORD_SELECTION)
  fi])

AC_ARG_ENABLE(dmalloc,
  [  --enable-dmalloc        enable Gray Watson's malloc - for debugging use],
  [if test x$enableval = xyes; then
    MALLOC_TYPE=G
    DEBUG=-DDEBUG_MALLOC
    DLIB="-L/usr/local/lib -ldmalloc"
    DINCLUDE=-I/usr/local/include
  fi])

AC_ARG_ENABLE(dlmalloc,
  [  --enable-dlmalloc       enable Doug Lea's malloc - for production use
                          - enable only one malloc package],
  [if test x$enableval = xyes; then
    MALLOC_TYPE=D
    DEBUG=
    DLIB="-L/usr/local/lib -ldlmalloc"
    DINCLUDE=
  fi])

AC_ARG_WITH(term,
  [  --with-term=NAME        set the terminal to NAME (default \"xterm\")],
  [if test x$withval != x; then
    AC_DEFINE_UNQUOTED(TERMENV,"$withval") term="$withval"
  fi])

AC_ARG_WITH(terminfo,
  [  --with-terminfo=PATH    set the path to the terminfo tree to PATH],
  [if test x$withval != x; then
    AC_DEFINE_UNQUOTED(RXVT_TERMINFO,"$withval") terminfo="$withval"
  fi])

AC_ARG_ENABLE(aftersteplibs,
[  --enable-aftersteplibs     enable usage of libafterstep and libasimage (if found) for imaging purposes [yes] ],
enable_aftersteplibs=$enableval,
enable_aftersteplibs="yes")

dnl# --------------------------------------------------------------------------

AC_DEFINE(PROTOTYPES)

dnl# --------------------------------------------------------------------------
dnl# Supply default CFLAGS, if not specified by `CFLAGS=flags ./configure'
dnl#
if test -z "$CFLAGS"; then
    if test -z "$CCOPTS"; then
	CCOPTS='-O'
dnl>	if test "x$GCC" = xyes; then
dnl>	    if test x$system = xLinux; then
dnl>		CCOPTS="$CCOPTS "'-O2 -fno-strength-reduce'
dnl>	    fi
dnl>	fi
    fi
    CFLAGS="$CCOPTS"
fi

dnl# Checks for programs.
dnl AC_MAKE_SET

AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL

AC_PATH_PROG(MV, mv, mv)
AC_PATH_PROG(RM, rm, rm)
AC_PATH_PROG(CP, cp, cp)
AC_PATH_PROG(SED, sed, sed)

dnl# system hacks
AC_AIX
AC_ISC_POSIX

dnl# need a neat way to detect SVR4 or its features
dnl# in src/command.c we use these functions:
dnl# grantpt(), unlockpt(), ptsname(), which are defined in <sys/ptms.h>
dnl# - but are these also defined for other systems?

dnl# hack to find if this is SVR4 -- who knows?
dnl## AC_MSG_CHECKING(for SVR4)
dnl## AC_EGREP_CPP(yes,
dnl## [#if defined (SVR4) || defined (_SVR4) || defined (__svr4__)
dnl##   yes;
dnl## #endif
dnl## ], [AC_MSG_RESULT(yes); AC_DEFINE(PERHAPS_SVR4)], AC_MSG_RESULT(perhaps not?))

AC_PATH_XTRA		dnl# find the X includes and libraries

dnl> ************* original rxvt code ***********************
dnl>
dnl# the only reasonable way to find libXpm is do-it-yourself
dnl# only check if we want xpm-background
dnl> if test x$xpm_background = xyes; then
dnl>  VT_FIND_LIBXPM
dnl> fi
dnl> ************* end original rxvt code *******************

dnl> new Check for image libraries NNNNNNNNNNNNNNNNNNNNNNNNNNNNNN

if test x$background_image = xyes || test x$enable_aftersteplibs = xyes ; then

saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"

VT_FIND_LIBXPM
if test "x$have_xpm" = "xyes"; then
     AC_DEFINE(XPM)
else
     echo "You need the libXpm v 3.4k or later, in order to use XPM support in aterm";
fi

for x in $X_CFLAGS; do
  XPM_CFLAGS=`echo " $XPM_CFLAGS " | sed "s@ $x @ @"`
done

dnl AS_XIMAGE_UTILS=ximage_utils

if test x$enable_aftersteplibs = xyes; then
dnl> and here checking for other libs needed by libasimage

CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
saved_LIBS=$LIBS
LIBS=""

dnl# Check for libjpeg

VT_FIND_LIBJPEG

if test "x$have_jpeg" = "xyes"; then
    for x in $X_CFLAGS; do
      JPEG_CFLAGS=`echo " $JPEG_CFLAGS " | sed "s@ $x @ @"`
    done
fi

CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
LIBS=""

dnl# Check for libpng

VT_FIND_LIBPNG
if test "x$have_png" = "xyes"; then
    for x in $X_CFLAGS; do
      PNG_CFLAGS=`echo " $PNG_CFLAGS " | sed "s@ $x @ @"`
    done
fi

dnl# remove the same include directories for png and jpeg
if test "x$have_jpeg$have_png" = "xyesyes"; then
  if test "x$PNG_CFLAGS" = "x$JPEG_CFLAGS"; then
    PNG_CFLAGS=""
  fi
fi

LIBS=$saved_LIBS

dnl> end of graphix afterstep libs check
fi
fi

if test x$enable_aftersteplibs = xyes; then
dnl> here goes the check for AfterStep libs

AC_MSG_CHECKING(for AfterStep libraries)

AC_CACHE_VAL(ac_cv_afterstep_libs_found,[
    vt_afterstep_is_here=no
    LIBS="-lafterstep $LIBS -lX11"
    AC_TRY_LINK([int *dpy;int screen;char* MyName;int DeadPipe(int nonsens){return 0;}],
	        [safemalloc()],
    	        [LIBS="-lasimage $LIBS $XPM_LIBS $JPEG_LIBS $PNG_LIBS";
		 AC_TRY_LINK([int screen;int *dpy;char* MyName;int Scr;int DeadPipe(int nonsens){return 0;}],
            	             [LoadImageWithMask()],
			     [vt_afterstep_is_here=yes])
		])
    ac_cv_afterstep_libs_found="vt_afterstep_is_here=$vt_afterstep_is_here"
])
eval "$ac_cv_afterstep_libs_found"

dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
dnl AC_CHECK_LIB(afterstep, safemalloc, [$AFTERSTEP_LIBS="-lafterstep $AFTERSTEP_LIBS";afterstep_is_here=yes],,$afterstep_libs)
dnl if test "x$afterstep_is_here" = "xyes" ; then
dnl  $AFTERSTEP_LIBS="$AFTERSTEP_LIBS $JPEG_LIBS $PNG_LIBS"
dnl  AC_CHECK_LIB(asimage, LoadImage, [$AFTERSTEP_LIBS="-lasimage $AFTERSTEP_LIBS"],[AFTERSTEP_LIBS="";afterstep_is_here=no],[$AFTERSTEP_LIBS $XPM_LIBS])
dnl fi
dnl !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

if test "x$vt_afterstep_is_here" = "xyes" ; then

    if test "x$have_xpm" = "xyes" -a "x$have_jpeg" = "xyes" -a "x$have_png" = "xyes"; then
	AFTERSTEP_LIBS="-lasimage -lafterstep $JPEG_LIBS $PNG_LIBS"
        AC_MSG_RESULT(yes : $AFTERSTEP_LIBS)
	AC_DEFINE(USE_LIBASIMAGE)

	if test "x$have_jpeg" = "xyes"; then
	    AC_DEFINE(JPEG)
        else
	    echo "You need the libJPEG v 6.0 or later, in order to use JPEG support in aterm";
        fi

	if test "x$have_png" = "xyes"; then
	    AC_DEFINE(PNG)
        else
		echo "You need the libPNG v 1.0.2 or later, in order to use PNG support in aterm";
        fi
    else
	AFTERSTEP_LIBS="-lasimage -lafterstep"
    fi
	LIBS="$AFTERSTEP_LIBS $LIBS"
    AC_TRY_LINK([int screen;int *dpy;char* MyName;int Scr;int DeadPipe(int nonsens){return 0;}],
	        [CopyXImageLine()],
		[AC_DEFINE(LIBAFTERSTEP_HAS_XIMAGE_UTILS)])

    AC_TRY_LINK([int screen;int *dpy;char* MyName;int Scr;int DeadPipe(int nonsens){return 0;}],
	        [ScaleXImage()],
		[AC_DEFINE(LIBAFTERSTEP_HAS_SCALEXIMAGE)])

    AC_TRY_LINK([int screen;int *dpy;char* MyName;int Scr;int DeadPipe(int nonsens){return 0;}],
	        [ShadeXImage()],
		[AC_DEFINE(LIBAFTERSTEP_HAS_SHADEXIMAGE)])
    AC_CHECK_HEADER(afterstep/afterstep.h,
		    [AC_DEFINE(LIBASIMAGE_HEADERS) vt_afterstep_h_is_here=yes],
		    vt_afterstep_h_is_here=no)

else
    AFTERSTEP_LIBS=
    AC_MSG_RESULT("no")
fi

LIBS=$saved_LIBS

dnl# >if test x$enable_aftersteplibs = xyes; then
fi

AC_SUBST(XPM_LIBS)
AC_SUBST(AFTERSTEP_LIBS)
if test x$background_image = xyes && test "x$have_xpm" = "xyes" ; then
    AC_DEFINE(BACKGROUND_IMAGE)
fi

dnl> end new Check for image libraries NNNNNNNNNNNNNNNNNNNNNNNNNN

if test x$SBARFILE = x; then
  SBARFILE=scrollbar
fi

dnl# --------------------------------------------------------------------------
dnl# CHECKING FOR HEADER FILES
dnl# --------------------------------------------------------------------------
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS( \
	assert.h \
	fcntl.h \
	grp.h \
	libc.h \
	lastlog.h \
	stdarg.h \
	stdlib.h \
	string.h \
	termios.h \
	unistd.h \
	utmpx.h \
	sys/byteorder.h \
	sys/ioctl.h \
	sys/select.h \
	sys/sockio.h \
	sys/time.h \
)

AC_HEADER_TIME

AC_CHECK_FUNCS(getpt)

AC_C_CONST
AC_C_INLINE

dnl> AC_HEADER_STDC	 dnl# skip this test, Sun always fails anyhow.

dnl# --------------------------------------------------------------------------
dnl# CHECKING FOR MISSING TYPEDEFS
dnl# --------------------------------------------------------------------------
dnl# Missing typedefs and replacements
AC_TYPE_MODE_T
dnl> AC_CHECK_TYPE(umode_t, int)
dnl> AC_CHECK_TYPE(off_t, long)
AC_TYPE_PID_T
AC_TYPE_UID_T

AC_CHECK_SIZEOF(char, 1)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(int *, 4)
dnl# ugly
if test "$cross_compiling" = yes; then
    echo "configure: warning: Define SIZEOF_* values in config.h manually"
fi
dnl# we could probably pull this info from Xmd.h
dnl# and these tests are ugly: depending on specials
if test $ac_cv_sizeof_char -ge 2; then
  RINT16T=char
  AC_DEFINE(RINT16T,  char)
  AC_DEFINE(RUINT16T, unsigned char)
else
  if test $ac_cv_sizeof_short -ge 2; then
    RINT16T=short
    AC_DEFINE(RINT16T,  short)
    AC_DEFINE(RUINT16T, unsigned short)
  else
    if test $ac_cv_sizeof_int -ge 2; then
      RINT16T=int
      AC_DEFINE(RINT16T,  int)
      AC_DEFINE(RUINT16T, unsigned int)
    else	dnl What a fantastic system ?
      RINT16T=long
      AC_DEFINE(RINT16T,  long)
      AC_DEFINE(RUINT16T, unsigned long)
    fi
  fi
fi
if test $ac_cv_sizeof_char -ge 4; then
  RINT32T=char
  AC_DEFINE(RINT32T,  char)
  AC_DEFINE(RUINT32T, unsigned char)
else
  if test $ac_cv_sizeof_short -ge 4; then
    RINT32T=short
    AC_DEFINE(RINT32T,  short)
    AC_DEFINE(RUINT32T, unsigned short)
  else
    if test $ac_cv_sizeof_int -ge 4; then
      RINT32T=int
      AC_DEFINE(RINT32T,  int)
      AC_DEFINE(RUINT32T, unsigned int)
    else	dnl What a fantastic system ?
      RINT32T=long
      AC_DEFINE(RINT32T,  long)
      AC_DEFINE(RUINT32T, unsigned long)
    fi
  fi
fi
if test $ac_cv_sizeof_char -eq $ac_cv_sizeof_int_p; then
  RINTPT=char
  AC_DEFINE(RINTPT,  char)
  AC_DEFINE(RUINTPT, unsigned char)
else
  if test $ac_cv_sizeof_short -eq $ac_cv_sizeof_int_p; then
    RINTPT=short
    AC_DEFINE(RINTPT,  short)
    AC_DEFINE(RUINTPT, unsigned short)
  else
    if test $ac_cv_sizeof_int -eq $ac_cv_sizeof_int_p; then
      RINTPT=int
      AC_DEFINE(RINTPT,  int)
      AC_DEFINE(RUINTPT, unsigned int)
    else	dnl what next? long long? quad?
      RINTPT=long
      AC_DEFINE(RINTPT,  long)
      AC_DEFINE(RUINTPT, unsigned long)
    fi
  fi
fi

dnl# --------------------------------------------------------------------------
dnl# CHECKING FOR LIBRARY FUNCTIONS
dnl# --------------------------------------------------------------------------
AC_TYPE_SIGNAL
dnl> AC_FUNC_VPRINTF
AC_CHECK_FUNCS( \
	atexit \
	unsetenv \
	setutent \
	seteuid \
)

dnl# check for host field in utmp structure

AC_CACHE_CHECK(for host in utmp struct, rxvt_cv_struct_utmp_host,
[AC_TRY_COMPILE([#include <sys/types.h>
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
#else
#include <utmp.h>
#endif], [
#ifdef HAVE_UTMPX_H
struct utmpx ut;
#else
struct utmp ut;
#endif
ut.ut_host;],
  rxvt_cv_struct_utmp_host=yes, rxvt_cv_struct_utmp_host=no)])
if test "$rxvt_cv_struct_utmp_host" = yes; then
  AC_DEFINE(HAVE_UTMP_HOST)
fi

dnl# find utmp
if test "$ac_cv_header_utmpx_h" = yes; then
  AC_CACHE_CHECK(where utmp is located, rxvt_cv_path_utmp,
  [for utmp_file in   dnl
    /var/run/utmp /var/adm/utmpx /etc/utmpx;
  do
    if test -f "$utmp_file" ; then
      rxvt_cv_path_utmp=$utmp_file
      break
    fi
  done
  ])
  AC_DEFINE(_GNU_SOURCE)
else
  AC_CACHE_CHECK(where utmp is located, rxvt_cv_path_utmp,
  [for utmp_file in   dnl
    /var/run/utmp /var/adm/utmp /etc/utmp /usr/etc/utmp /usr/adm/utmp;
  do
    if test -f "$utmp_file" ; then
      rxvt_cv_path_utmp=$utmp_file
      break
    fi
  done
  ])
fi
if test "${rxvt_cv_path_utmp+set}" = set; then
  AC_DEFINE_UNQUOTED(RXVT_UTMP_FILE, "$rxvt_cv_path_utmp")
fi

dnl# find wtmp
AC_CACHE_CHECK(where wtmp is located, rxvt_cv_path_wtmp,
[for wtmp_file in   dnl
  /var/log/wtmp /var/adm/wtmp /etc/wtmp /usr/etc/wtmp /usr/adm/wtmp;
do
  if test -f "$wtmp_file" ; then
    rxvt_cv_path_wtmp=$wtmp_file
    break
  fi
done
])
if test "${rxvt_cv_path_wtmp+set}" = set; then
  AC_DEFINE_UNQUOTED(RXVT_WTMP_FILE, "$rxvt_cv_path_wtmp")
fi

dnl# find ttys/ttytab
AC_CACHE_CHECK(where ttys/ttytab is located, rxvt_cv_path_ttytab,
[for ttys_file in   dnl
  /etc/ttys /etc/ttytab;
do
  if test -f "$ttys_file" ; then
    rxvt_cv_path_ttytab=$ttys_file
    break
  fi
done
])
if test "${rxvt_cv_path_ttytab+set}" = set; then
  AC_DEFINE_UNQUOTED(TTYTAB_FILENAME, "$rxvt_cv_path_ttytab")
fi

dnl# this is a really hack test for some basic Xlocale stuff
SAVETHELIBS=$LIBS
LIBS="$LIBS $X_LIBS $X_PRE_LIBS $X_EXTRA_LIBS -lX11"
AC_CACHE_CHECK(for working Xlocale, rxvt_cv_func_xlocale,
[AC_TRY_RUN(
[#define X_LOCALE 1
#include <X11/Xlocale.h>
#include <X11/Xlib.h>
main() {
char *p;
if ((p = XSetLocaleModifiers("@im=none")) != NULL && *p)
exit (XSupportsLocale() ? 0 : 1);
else
exit (1);}
],rxvt_cv_func_xlocale=yes, rxvt_cv_func_xlocale=no,
AC_MSG_WARN([Define NO_XLOCALE in config.h manually]))])

if test "${rxvt_cv_func_xlocale}" = no; then
  AC_DEFINE(NO_XLOCALE)
fi
LIBS=$SAVETHELIBS

AC_CACHE_CHECK(for working setlocale, rxvt_cv_func_xsetlocale,
[AC_TRY_LINK([#define X_LOCALE 1
#include <X11/Xlocale.h>],
  [setlocale(LC_CTYPE, "");],
  rxvt_cv_func_xsetlocale=yes, rxvt_cv_func_xsetlocale=no)])
if test "${rxvt_cv_func_xsetlocale}" = no; then
  AC_DEFINE(NO_SETLOCALE)
fi

dnl> AC_CHECK_FUNCS(gettimeofday putenv select socket)

CFLAGS=${CFLAGS--O}
LDFLAGS=${LDFLAGS--O}

CPPFLAGS="$CPPFLAGS"
AC_SUBST(DEBUG)
AC_SUBST(DLIB)
AC_SUBST(DINCLUDE)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
AC_SUBST(SBARFILE)

dnl# common parts of the Makefile
MCOMMON=./autoconf/Make.common
AC_SUBST_FILE(MCOMMON)

AC_OUTPUT(autoconf/Make.common \
Makefile \
doc/Makefile \
src/Makefile \
src/graphics/Makefile \
scripts/random_colors
)

chmod 755 scripts/random_colors

echo "Configuration:

  Aterm version:              ${VERSION} : ${DATE}
  Source code location:       ${srcdir}
  Install path:               ${prefix}/bin
  Compiler:                   ${CC}
  Compiler flags:             ${CFLAGS}"

if test "${background_image}" = yes; then
echo "
  Background image support :"
if test "${have_xpm}" = yes; then
  echo "    Xpm library:              ${XPM_LIBS}"
fi
echo
fi

if test "${vt_afterstep_is_here}" = yes; then
if test "${have_jpeg}" = yes; then
  echo "    JPEG library:             ${JPEG_LIBS}"
fi
if test "${have_png}" = yes; then
  echo "    PNG library:              ${PNG_LIBS}"
fi
echo   "    AfterStep libraries:      -lafterstep -lasimage"

if test "${vt_afterstep_h_is_here}" = yes; then
echo   "       with AfterStep headers installed,"
echo   "       with AfterStep MyStyles support available"
else
echo   "       without AfterStep headers installed,"
echo   "       without AfterStep MyStyles support"
fi

else

echo   "    without any AfterStep integration."

fi
echo


if test "${enable_transparency}" = yes; then
echo "  Transparency :		enabled"
else
echo "  Transparency :		disabled"
fi

if test "x$enable_fading" = "xyes"; then
echo "  Off focus fading :		enabled
"
else
echo "  Off focus fading :		disabled
"
fi


if test "$MALLOC_TYPE" = S; then
  echo "  malloc support:             system default"
fi
if test "$MALLOC_TYPE" = G; then
  echo "  malloc support:             Gray Watson's dmalloc"
fi
if test "$MALLOC_TYPE" = D; then
  echo "  malloc support:             Doug Lea's malloc"
fi
echo "
The following are set in config.h
"
if test "${utmp_support}" != yes; then
  echo "  utmp support:               disabled
"
else
  echo "  utmp support:               enabled
  utmp file:                  ${rxvt_cv_path_utmp}
  wtmp file:                  ${rxvt_cv_path_wtmp}
  ttys/ttytab file:           ${rxvt_cv_path_ttytab}
"
fi
if test "x${term}" != x; then
  echo "  set TERM to:                ${term}
"
fi
if test "x${terminfo}" != x; then
  echo "  set TERMINFO to:            ${terminfo}
"
fi
echo "  Type of 16bit:               ${RINT16T}
          32bit:               ${RINT32T}
          pointer:             (same as) ${RINTPT}
"
echo "  *** Please check src/feature.h for further options ***
"