Codebase list gtkwave / debian/3.3.32-1 configure.ac
debian/3.3.32-1

Tree @debian/3.3.32-1 (Download .tar.gz)

configure.ac @debian/3.3.32-1raw · history · blame

  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
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(gtkwave, 3.3.32, bybell@nc.rr.com)
AC_CONFIG_SRCDIR([src/vcd.c])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE

# ------------- GCONF -------------------

AC_ARG_WITH([gconf],
    [AS_HELP_STRING([--with-gconf],
        [Use GConf to store preferences])],
        [],
        [with_gconf=check])

# ------------- XDG -------------------
AC_ARG_WITH(xdgdatadir, [  --with-xdgdatadir=path  Change where the theme icons and mime registrations are installed [[DATADIR]]], [opt_xdgdatadir=$withval])

if test x$opt_xdgdatadir = x; then
        # path was not specified with --with-xdgdatadir
        XDGDATADIR='${datadir}'
 else
        # path WAS specified with --with-xdgdatadir
        XDGDATADIR="$opt_xdgdatadir"
 fi
AC_SUBST(XDGDATADIR)



AC_MSG_CHECKING([if MIME and desktop updates should be disabled])

EMIM=yes
DMIM=no
AC_ARG_ENABLE([mime_update],
[  --disable-mime-update   Disables MIME type and desktop/icon updating],
[
if test "X$enable_mime_update" = "Xno" ; then
        EMIM=no
        DMIM=yes
else
    	EMIM=yes
        DMIM=no
fi
],
[
EMIM=yes
])
AC_MSG_RESULT([$DMIM])


AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database, no)
AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database, no)
if test "X$DMIM" = "Xyes" ; then
	UPDATE_MIME_DATABASE=:
	UPDATE_DESKTOP_DATABASE=:
fi


AM_CONDITIONAL(FDO_MIME, test x$UPDATE_MIME_DATABASE != xno -a x$UPDATE_DESKTOP_DATABASE != xno)

# ------------- Set simarama base -------------------
if test "X$SIMARAMA_BASE" = "X" ; then
	SIMARAMA_BASE="/afs/awd/projects/simarama/releases/latest"
fi

# Checks for build options
# ------------- Inline -------------------

AC_MSG_CHECKING([if inline assembly should be enabled])

INL=yes
INLINE_ASM=-DUSE_INLINE_ASM
AC_ARG_ENABLE([inline_asm],
[  --disable-inline-asm    Disables usage of inline x86 assembly],
[
if test "X$enable_inline_asm" = "Xno" ; then
	INL=no
        INLINE_ASM=
fi
])
AC_MSG_RESULT([$INL])
AC_SUBST(INLINE_ASM)


# ------------- Structure Packing -------------------

AC_MSG_CHECKING([if structure packing should be enabled])

ESTP=no
STRUCT_PACK=
AC_ARG_ENABLE([struct_pack],
[  --enable-struct-pack    Enables C language structure packing pragmas
                          intended for use on architectures which support
                          misaligned loads and stores (x86/x86_64/AVR32/
                          M68K/PowerPC/S390).  This can reduce memory on 
                          traces with very many signals.],
[
if test "X$enable_struct_pack" = "Xyes" ; then
	ESTP=yes
	STRUCT_PACK=-DWAVE_USE_STRUCT_PACKING
fi
])
AC_MSG_RESULT([$ESTP])
AC_SUBST(STRUCT_PACK)


# ------------- Tcl -------------------

AC_MSG_CHECKING([if Tcl usage should be disabled])

ETCL=yes
DTCL=no
AC_ARG_ENABLE([tcl],
[  --disable-tcl           Disables Tcl if found],
[
if test "X$enable_tcl" = "Xno" ; then
	ETCL=no
	DTCL=yes
else
	ETCL=yes
	DTCL=no
fi
],
[
ETCL=yes
])
AC_MSG_RESULT([$DTCL])


if test "X$ETCL" = "Xyes" ; then
	SC_PATH_TCLCONFIG
	if test "X$TCL_BIN_DIR" = "X# no Tcl configs found" ; then
		AC_MSG_WARN([Tcl not found, skipping.])
		ETCL=no
	        DTCL=yes
	else
		SC_LOAD_TCLCONFIG
		AC_SUBST(TCL_INCLUDE_SPEC)
		AC_SUBST(TCL_LIB_SPEC)

		AC_SUBST(TCL_MAJOR_VERSION)
		AC_SUBST(TCL_MINOR_VERSION)

		if test "$TCL_MAJOR_VERSION" -lt "8" ; then
			 AC_MSG_ERROR([Upgrade to at least Tcl version 8.4.])
		else
			if test "$TCL_MAJOR_VERSION" -eq "8" ; then
				if test "$TCL_MINOR_VERSION" -lt "4" ; then
					 AC_MSG_ERROR([Upgrade to at least Tcl version 8.4.])
				fi
			fi
		fi
	fi
fi

if test "X$ETCL" = "Xyes" ; then
	SC_PATH_TKCONFIG
	if test "X$TK_BIN_DIR" = "X# no Tk configs found" ; then
		AC_MSG_WARN([Tk not found, skipping.])
		ETCL=no
	        DTCL=yes
	else
		SC_LOAD_TKCONFIG
		AC_SUBST(TK_INCLUDE_SPEC)
		AC_SUBST(TK_LIB_SPEC)
	fi
fi

AC_MSG_CHECKING([if Tcl/Tk (if present) should be stubified])

STUBIFY=no
AC_ARG_ENABLE([stubify],
[  --enable-stubify        Causes the Tcl/Tk libraries to be dynamically loaded.],
[
if test "X$enable_stubify" = "Xno" ; then
	STUBIFY=no
else
	STUBIFY=yes
fi
],
[
STUBIFY=no
])

AC_MSG_RESULT([$STUBIFY])


AC_MSG_CHECKING([if gtk1 or gtk2 should be used])

GTK1=no
AC_ARG_ENABLE([gtk1],
[  --enable-gtk1           Causes the GTK+ frontend to be built with gtk1 
                          instead of gtk2.],
[
if test "X$enable_gtk1" = "Xno" ; then
	GTK1=no
else
	GTK1=yes
fi
],
[
GTK1=no
])

if test "X$GTK1" = "Xyes" ; then
	AC_MSG_RESULT([gtk1])
	CPPFLAGS="$CPPFLAGS"
else
	AC_MSG_RESULT([gtk2])
	CPPFLAGS="-DWAVE_USE_GTK2 $CPPFLAGS"
fi


# check for "fisher price" (simvision rendering style) mode
AC_MSG_CHECKING([if fatlines should be used])

FLN=no
AC_ARG_ENABLE([fatlines],
[  --enable-fatlines       Renders lines as double width in gtkwave.],
[
if test "X$enable_fatlines" = "Xno" ; then
	FLN=no
else
	FLN=yes
fi
],
[
FLN=no
])

if test "X$FLN" = "Xno" ; then
	AC_MSG_RESULT([no])
else
	AC_MSG_RESULT([yes])
	CPPFLAGS="-DWAVE_DOUBLE_LINE_WIDTH_MODE $CPPFLAGS"
fi


AC_MSG_CHECKING([if ae2 support should be used])

AE2_CFLAGS=
AET2_LDADD=
AE2=no
AC_ARG_ENABLE([ae2],
[  --enable-ae2            Compiles in AE2 from env var SIMARAMA_BASE location.],
[
if test "X$enable_ae2" = "Xno" ; then
	AE2=no
else
	AE2=yes
fi
],
[
AE2=no
])

if test "X$AE2" = "Xyes" ; then
	AC_CHECK_FILE("$SIMARAMA_BASE/libae2rw.so", AET2_SO=yes, AET2_SO=no)

	if test "X$AET2_SO" = "Xyes" ; then
		AET2_CFLAGS="-DAET2_IS_PRESENT -I$SIMARAMA_BASE"
		AET2_LDADD="$SIMARAMA_BASE/libae2rw.so"
	else

		AC_CHECK_FILE("$SIMARAMA_BASE/libae2rw.a", AET2_A=yes, AET2_A=no)
		if test "X$AET2_A" = "Xyes" ; then
			AET2_CFLAGS="-DAET2_IS_PRESENT -I$SIMARAMA_BASE"
			AET2_LDADD="$SIMARAMA_BASE/libae2rw.a"
		else

		AC_MSG_WARN([AET2 library not found, skipping.])

		fi
	fi

	AC_CHECK_FILE("$SIMARAMA_BASE/libaliasdb.so", AAET2_SO=yes, AAET2_SO=no)

	if test "X$AAET2_SO" = "Xyes" ; then
		AC_CHECK_FILE("$SIMARAMA_BASE/aliasdb.h", AAET2_SOY=yes, AAET2_SOY=no)
		if test "X$AAET2_SOY" = "Xyes" ; then
			AET2_CFLAGS="-DAET2_ALIASDB_IS_PRESENT $AET2_CFLAGS"
			AET2_LDADD="$SIMARAMA_BASE/libaliasdb.so $AET2_LDADD"
		else
			AC_MSG_WARN([AET2 alias header not found, skipping.])
		fi
	else

		AC_CHECK_FILE("$SIMARAMA_BASE/libaliasdb.a", AET2_A=yes, AET2_A=no)
		if test "X$AAET2_A" = "Xyes" ; then
			AC_CHECK_FILE("$SIMARAMA_BASE/aliasdb.h", AAET2_SOY=yes, AAET2_SOY=no)
			if test "X$AAET2_SOY" = "Xyes" ; then
				AET2_CFLAGS="-DAET2_ALIASDB_IS_PRESENT $AET2_CFLAGS"
				AET2_LDADD="$SIMARAMA_BASE/libaliasdb.a $AET2_LDADD"
			else
				AC_MSG_WARN([AET2 alias header not found, skipping.])
			fi
		else

		AC_MSG_WARN([AET2 alias library not found, skipping.])

		fi
	fi

	AC_CHECK_FILE("$SIMARAMA_BASE/ae2rw.h", AET2_SOY=yes, AET2_SOY=no)
	if test "X$AET2_SOY" = "Xno" ; then
		AET2_CFLAGS=
		AET2_LDADD=
		AC_MSG_WARN([AET2 header not found, skipping.])
	fi

else
	AC_MSG_RESULT([no])
fi

AC_SUBST(AET2_CFLAGS)
AC_SUBST(AET2_LDADD)


# Checks for programs.
# AC_PROG_CXX  # not needed as gtkwave and related programs don't use c++
AC_PROG_AWK
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_LEX
AC_PROG_RANLIB

#
# only needed if user wishes to process various files with an external reader
#
AC_PATH_PROG(EXTDEBUG, [fsdbdebug], [notfound])
if test "$EXTDEBUG" = "notfound" ; then
	EXTLOAD_CFLAGS=
else
	EXTLOAD_CFLAGS="-DEXTLOAD_PATH=\\\"$EXTDEBUG\\\" -DEXTLOAD_SUFFIX=\\\"fsdb\\\""
fi

AC_SUBST(EXTLOAD_CFLAGS)

#
# gperf only needed if the user updates the gperf data
# files which only developers will be doing...
#
AC_PATH_PROG(GPERF, [gperf], [notfound])
if test "$GPERF" = "notfound" ; then
	AC_MSG_ERROR([Couldn't find a usable gperf program.
Please install gperf which is available from
ftp://ftp.gnu.org/pub/gnu/gperf/
])
fi

# Checks for libraries.
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([m], [sqrt])
AC_CHECK_LIB([pthread], [main])

# included or system libz and libbz2.  By default, we search for the
# system libz and libbz2.  If not found, build the included ones.  
# The --enable-local-libz and --enable-local_libbz2 arguments can be
# used to force the use of the included libs.  --disable-local-libz
# and --disable-local-libbz2 can be used to force the use of system
# libs
AC_ARG_ENABLE([local-libz],
[  --enable-local-libz     Use the bundled libz instead of any libz which may
                          already be installed on your system.  Default is to
                          first look for an installed libz and fall back to
                          using the bundled one.],
[
if test "X$enable_local_libz" = "Xno" ; then
	force_system_libz=yes
else
	force_bundled_libz=yes
fi
], , )

need_libz=no
LIBZ_LDADD=
LIBZ_CFLAGS=
if test "X$force_bundled_libz" != "Xyes" ; then
        AC_TRY_COMPILE([#include <zlib.h>], [gzdopen(0,"rb");],, [need_libz=yes])
	if test "$need_libz" = "yes" -a "X$force_system_libz" = "Xyes" ; then
		AC_MSG_ERROR([
You have disabled building the bundled libz but no system libz headers 
could be found.  Either allow building the bundled libz (by not using
--disable-local-libz) or make sure your system has a libz installed])
	fi
	AC_CHECK_LIB([z], [gzread], [LIBZ_LDADD=-lz] , [need_libz=yes])
	if test "$need_libz" = "yes" -a "X$force_system_libz" = "Xyes" ; then
		AC_MSG_ERROR([
You have disabled building the bundled libz but no system libz could
be found.  Either allow building the bundled libz (by not using
--disable-local-libz) or make sure your system has a libz installed])
	fi
else
	need_libz=yes
fi

AC_ARG_ENABLE([local-libbz2],
[  --enable-local-libbz2   Use the bundled libbz2 instead of any libbz2 which may
                          already be installed on your system.  Default is to
                          first look for an installed libbz2 and fall back to
                          using the bundled one.],
[
if test "X$enable_local_libbz2" = "Xno" ; then
	force_system_libbz2=yes
else
	force_bundled_libbz2=yes
fi
], , )

need_libbz2=no
LIBBZ2_LDADD=
LIBBZ2_CFLAGS=
if test "X$force_bundled_libbz2" != "Xyes" ; then
        AC_TRY_COMPILE([#include <bzlib.h>], [BZ2_bzdopen(0,"rb");],, [need_libbz2=yes])
	if test "$need_libbz2" = "yes" -a "X$force_system_libbz2" = "Xyes" ; then
		AC_MSG_ERROR([
You have disabled building the bundled libbz2 but no system libbz2 headers
could be found.  Either allow building the bundled libbz2 (by not using
--disable-local-libbz2) or make sure your system has a libbz2 installed])
	fi
	AC_CHECK_LIB([bz2], [BZ2_bzread], [LIBBZ2_LDADD=-lbz2], [need_libbz2=yes])
	if test "$need_libbz2" = "yes" -a "X$force_system_libbz2" = "Xyes" ; then
		AC_MSG_ERROR([
You have disabled building the bundled libbz2 but no system libbz2 could
be found.  Either allow building the bundled libbz2 (by not using
--disable-local-libbz2) or make sure your system has a libbz2 installed])
	fi
else
	need_libbz2=yes
fi

LIBZ_DIR=
if test "$need_libz" = "yes" ; then
	LIBZ_CFLAGS='-I$(top_srcdir)/src/libz'
	LIBZ_LDADD='$(top_builddir)/src/libz/libz.a'
	LIBZ_DIR=libz
fi
AC_SUBST(LIBZ_CFLAGS)
AC_SUBST(LIBZ_LDADD)
AC_SUBST(LIBZ_DIR)

LIBBZ2_DIR=
if test "$need_libbz2" = "yes" ; then
	LIBBZ2_CFLAGS='-I$(top_srcdir)/src/libbz2'
	LIBBZ2_LDADD='$(top_builddir)/src/libbz2/libbz2.a'
	LIBBZ2_DIR=libbz2
fi
AC_SUBST(LIBBZ2_CFLAGS)
AC_SUBST(LIBBZ2_LDADD)
AC_SUBST(LIBBZ2_DIR)

# ------------- LZMA / XZ -------------------

AC_MSG_CHECKING([if XZ should be enabled])

EXZ=yes
AC_ARG_ENABLE([xz],
[  --disable-xz            Disables LZMA support for VZT],
[
if test "X$enable_xz" = "Xno" ; then
	EXZ=no
fi
])
AC_MSG_RESULT([$EXZ])

LIBXZ_LDADD=
LIBXZ_CFLAGS=
if test "X$EXZ" == "Xyes"; then
	have_liblzma=no
	AC_TRY_COMPILE([#include <lzma.h>], [lzma_end(NULL);],, [have_liblzma=yes])
	AC_CHECK_LIB([lzma], [lzma_end], [LIBLZMA_LDADD=-llzma] , [have_liblzma=yes])
	if test "$have_liblzma" = "yes" ; then
		AC_MSG_ERROR([LZMA support for VZT is enabled, but xz could not be found.
Please install xz, see the http://tukaani.org/xz website or use the --disable-xz flag.])
	fi
	LIBXZ_LDADD='-llzma'
	LIBXZ_CFLAGS='-D_WAVE_HAVE_XZ'
fi
AC_SUBST(LIBXZ_LDADD)
AC_SUBST(LIBXZ_CFLAGS)

# ------------- Fast Tree -------------------

AC_MSG_CHECKING([if Fast SST Tree should be enabled])

FASTTREE=yes
AC_ARG_ENABLE([fasttree],
[  --disable-fasttree      Disables experimental Fast SST Tree widget code],
[
if test "X$enable_fasttree" = "Xno" ; then
	FASTTREE=no
fi
])
AC_MSG_RESULT([$FASTTREE])

FASTTREE_CFLAGS=
if test "X$FASTTREE" == "Xno"; then
	FASTTREE_CFLAGS='-DWAVE_DISABLE_FAST_TREE'
fi
AC_SUBST(FASTTREE_CFLAGS)

# ------------- Judy -------------------

AC_MSG_CHECKING([if Judy array support should be enabled])

EJUDY=no
AC_ARG_ENABLE([judy],
[  --enable-judy           Enables Judy array support],
[
if test "X$enable_judy" = "Xno" ; then
	EJUDY=no
else
	EJUDY=yes
fi
])
AC_MSG_RESULT([$EJUDY])

LIBJUDY_LDADD=
LIBJUDY_CFLAGS=
if test "X$EJUDY" == "Xyes"; then
	have_libjudy=no
	AC_TRY_COMPILE([#include <Judy.h>], [ JudySLIns (NULL, NULL, NULL);],, [have_libjudy=yes])
	AC_CHECK_LIB([Judy], [JudySLIns], [LIBJUDY_LDADD=-lJudy] , [have_libjudy=yes])
	if test "$have_libjudy" = "yes" ; then
		AC_MSG_ERROR([Judy support is enabled, but could not be found.
Please install Judy, see the http://judy.sourceforge.net website or use the --disable-judy flag.])
	fi
	LIBJUDY_LDADD='-lJudy'
	LIBJUDY_CFLAGS='-D_WAVE_HAVE_JUDY'
fi
AC_SUBST(LIBJUDY_LDADD)
AC_SUBST(LIBJUDY_CFLAGS)

# ------------- GTK -------------------
if test "X$GTK1" = "Xyes" ; then
	AC_PATH_PROG(GTK_CONFIG, [gtk-config], [notfound])
	if test "$GTK_CONFIG" = "notfound"; then
		AC_MSG_ERROR([You must have gtk installed on your system])
	else
		AC_MSG_CHECKING([gtk1 version])
		GTK_VER=`$GTK_CONFIG --version`
		AC_MSG_RESULT([$GTK_VER])

		case $GTK_VER in
			1.2.* )
				AC_MSG_CHECKING([for gtk1 CFLAGS])
				GTK_CFLAGS=`$GTK_CONFIG --cflags`
				AC_MSG_RESULT([$GTK_CFLAGS])
				AC_MSG_CHECKING([for gtk1 libs])
				GTK_LIBS=`$GTK_CONFIG --libs`
				AC_MSG_RESULT([$GTK_LIBS])
				;;

			* )
				AC_MSG_ERROR([when building with gtk1, you need version 1.2.*])
				;;
		esac
	fi
else
	PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.2.0)
	GTK_VER=`$PKG_CONFIG gtk+-2.0 --modversion`

	_gdk_tgt=`$PKG_CONFIG --variable=target gdk-2.0`
# removed...causes problems with gtk-1.2...
# AM_CONDITIONAL([GDK_TARGET_QUARTZ], [test x$_gdk_tgt = xquartz])
	if test "x$_gdk_tgt" = xquartz; then
	   PKG_CHECK_MODULES(GTK_MAC, gtk-mac-integration)
	   AC_SUBST(GTK_MAC_LIBS)
	   AC_SUBST(GTK_MAC_CFLAGS)

	   COCOA_GTK_CFLAGS="-xobjective-c -DWAVE_COCOA_GTK"
	   AC_SUBST(COCOA_GTK_CFLAGS)

	   COCOA_GTK_LDADD="-lobjc"
	   AC_SUBST(COCOA_GTK_LDADD)

	   COCOA_GTK_LDFLAGS="-framework Cocoa -framework ApplicationServices"
	   AC_SUBST(COCOA_GTK_LDFLAGS)
	fi

	if test x$with_gconf = xyes; then
          PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.0)
	  GCONF_CFLAGS="-DWAVE_HAVE_GCONF $GCONF_CFLAGS"
  	  AC_SUBST(GCONF_CFLAGS)
	  AC_SUBST(GCONF_LIBS)
	fi

	PKG_CHECK_MODULES(GTK_UNIX_PRINT,gtk+-unix-print-2.0, GUP_F="yes", GUP_F="no")
	if test "x$GUP_F" = xyes; then
		GTK_UNIX_PRINT_CFLAGS="${GTK_UNIX_PRINT_CFLAGS} -DWAVE_GTK_UNIX_PRINT"
	fi
        AC_SUBST(GTK_UNIX_PRINT_LIBS)
        AC_SUBST(GTK_UNIX_PRINT_CFLAGS)

fi 

# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h inttypes.h libintl.h limits.h malloc.h stddef.h stdint.h stdlib.h string.h strings.h sys/time.h unistd.h wchar.h wctype.h getopt.h])

# rpc workaround for cygwin
AC_CHECK_HEADERS([rpc/types.h rpc/xdr.h], [], [],
     [[#ifdef HAVE_RPC_TYPES_H
     # include <rpc/types.h>
     #endif
     ]])


# Checks for operand sizes.
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(double)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_CHECK_TYPES([ptrdiff_t])
AC_SYS_LARGEFILE

# Checks for library functions. (malloc/realloc removed to get rid of rpl_xxx substitutions)
# AC_FUNC_MALLOC
# AC_FUNC_REALLOC
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_FUNC_FSEEKO
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_STAT
AC_FUNC_STRTOD
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit btowc bzero dup2 memmove memset munmap pow putenv re_comp realpath regcomp select setenv strcasecmp strchr strdup strerror strncasecmp strrchr strstr getopt_long setenv unsetenv])
AC_CHECK_LIB(nsl,xdrmem_create)
AC_CHECK_LIB(rpc,xdrmem_create)

# some AIX adds (linker flag for 32 bit compiles)
if test "X$OSTYPE" = "Xaix" ; then
if test "X$MACHTYPE" = "Xrs6000" ; then
	CFLAGS="${CFLAGS} -D_WAVE_BE32"
	if test "X$CC" = "Xxlc" ; then
	LDFLAGS="${LDFLAGS} -bmaxdata:0xd0000000/dsa"
	else
	LDFLAGS="${LDFLAGS} -Wl,-bmaxdata:0xd0000000/dsa"
	fi
fi
fi

CFLAGS="${CFLAGS} ${STRUCT_PACK}"


if test "X$ETCL" = "Xyes" ; then
if test "X$OSTYPE" = "Xcygwin" ; then
# skip Tcl_CreateInterp check on cygwin...
	if test "X$STUBIFY" = "Xyes" ; then
	TCL_DEFADD="-DHAVE_LIBTCL -DWAVE_TCL_STUBIFY -DUSE_TCL_STUBS -DUSE_TK_STUBS"
	TCL_LDADD="${TCL_STUB_LIB_SPEC}"
	TK_LDADD="${TK_STUB_LIB_SPEC}"
	else
	TCL_DEFADD="-DHAVE_LIBTCL"
	TCL_LDADD="${TCL_LIB_SPEC}"
	TK_LDADD="${TK_LIB_SPEC}"
        # cygwin tkConfig.sh has issues...
        if test "X$TK_LDADD" = "X" ; then
                TK_LDADD="${TK_BUILD_LIB_SPEC}"
        fi
	fi
else
if test "X$OSTYPE" = "Xdarwin" ; then
# skip Tcl_CreateInterp check on darwin (until we figure out)...
	if test "X$STUBIFY" = "Xyes" ; then
	TCL_DEFADD="-DHAVE_LIBTCL -DWAVE_TCL_STUBIFY -DUSE_TCL_STUBS -DUSE_TK_STUBS"
	TCL_LDADD="${TCL_STUB_LIB_SPEC}"
	TK_LDADD="${TK_STUB_LIB_SPEC}"
	else
	TCL_DEFADD="-DHAVE_LIBTCL"
	TCL_LDADD="${TCL_LIB_SPEC}"
	TK_LDADD="${TK_LIB_SPEC}"
	fi
else
if test "X$OSTYPE" = "Xmsys" ; then
# skip Tcl_CreateInterp check on mingw (until we figure out)...
	if test "X$STUBIFY" = "Xyes" ; then
	TCL_DEFADD="-DHAVE_LIBTCL -DWAVE_TCL_STUBIFY -DUSE_TCL_STUBS -DUSE_TK_STUBS"
	TCL_LDADD="${TCL_STUB_LIB_SPEC}"
	TK_LDADD="${TK_STUB_LIB_SPEC}"
	else
	TCL_DEFADD="-DHAVE_LIBTCL"
	TCL_LDADD="${TCL_LIB_SPEC}"
	TK_LDADD="${TK_LIB_SPEC}"
	fi
else
OLD_LDFLAGS="${LDFLAGS}"
TCLSPEC_LHS="${TCL_LIB_SPEC% *}"
TKLSPEC_LHS="${TK_LIB_SPEC% *}"
LDFLAGS="${LDFLAGS} ${TCLSPEC_LHS} ${TKLSPEC_LHS}"
AC_CHECK_LIB(tcl${TCL_VERSION},Tcl_CreateInterp, [TCL_LDADD=${TCL_LIB_SPEC}], [need_tcl=yes])
if test "$need_tcl" = "yes" ; then
                AC_MSG_WARN([
Tcl support not enabled.])
else
	if test "X$STUBIFY" = "Xyes" ; then
	TCL_DEFADD="-DHAVE_LIBTCL -DWAVE_TCL_STUBIFY -DUSE_TCL_STUBS -DUSE_TK_STUBS"
	TCL_LDADD="${TCL_STUB_LIB_SPEC}"
	TK_LDADD="${TK_STUB_LIB_SPEC}"
	else
	TCL_DEFADD="-DHAVE_LIBTCL"
	TCL_LDADD="${TCL_LIB_SPEC}"
	TK_LDADD="${TK_LIB_SPEC}"
	fi
	fi
LDFLAGS="${OLD_LDFLAGS}"
fi
fi
fi
fi


AC_SUBST(TCL_LDADD)
AC_SUBST(TCL_DEFADD)
AC_SUBST(TK_LDADD)

AC_CONFIG_FILES([Makefile
		doc/Makefile
		contrib/Makefile
		contrib/pccts/IBM_VISUAL_AGE_PROJECTS/Makefile
		contrib/pccts/Makefile
		contrib/pccts/antlr/Makefile
		contrib/pccts/dlg/Makefile
		contrib/pccts/h/Makefile
		contrib/pccts/sorcerer/Makefile
		contrib/pccts/sorcerer/h/Makefile
		contrib/pccts/sorcerer/lib/Makefile
		contrib/pccts/sorcerer/test/Makefile
		contrib/pccts/sorcerer/test/test7/Makefile
		contrib/pccts/sorcerer/testcpp/Makefile
		contrib/pccts/support/DECmms/Makefile
		contrib/pccts/support/Makefile
		contrib/pccts/support/genmk/Makefile
		contrib/pccts/support/rexpr/Makefile
		contrib/pccts/support/set/Makefile
		contrib/pccts/support/sym/Makefile
		contrib/pccts/testcpp/Makefile
		contrib/rtlbrowse/Makefile
		contrib/vermin/Makefile
		examples/Makefile
		man/Makefile
		src/Makefile
		src/cocoa/Makefile
		src/helpers/Makefile
		src/liblzma/Makefile
		src/libbz2/Makefile
		src/libz/Makefile
		src/helpers/fst/Makefile
		share/Makefile
		share/mime/Makefile
		share/mime/packages/Makefile
		share/icons/Makefile
		share/icons/gnome/Makefile
		share/icons/gnome/16x16/Makefile
		share/icons/gnome/16x16/mimetypes/Makefile
		share/icons/gnome/32x32/Makefile
		share/icons/gnome/32x32/mimetypes/Makefile
		share/icons/gnome/48x48/Makefile
		share/icons/gnome/48x48/mimetypes/Makefile
		share/applications/Makefile
])


AC_MSG_NOTICE([         
--------------------------------------------
  Configuration summary:

  FASTTREE_CFLAGS       : $FASTTREE_CFLAGS

  gtk1                  : $GTK1
  gtk version           : $GTK_VER
  GTK_CFLAGS            : $GTK_CFLAGS
  GTK_LIBS              : $GTK_LIBS

  LIBZ_CFLAGS           : $LIBZ_CFLAGS
  LIBZ_LDADD            : $LIBZ_LDADD

  LIBBZ2_CFLAGS         : $LIBBZ2_CFLAGS
  LIBBZ2_LDADD          : $LIBBZ2_LDADD

  LIBXZ_CFLAGS          : $LIBXZ_CFLAGS
  LIBXZ_LDADD           : $LIBXZ_LDADD

  LIBJUDY_CFLAGS        : $LIBJUDY_CFLAGS
  LIBJUDY_LDADD         : $LIBJUDY_LDADD

  AET2_CFLAGS           : $AET2_CFLAGS
  AET2_LDADD            : $AET2_LDADD

  EXTLOAD_CFLAGS        : $EXTLOAD_CFLAGS

  TCL_INCLUDE_SPEC      : $TCL_INCLUDE_SPEC
  TCL_LIB_SPEC          : $TCL_LIB_SPEC
  TCL_LDADD             : $TCL_LDADD
  TCL_DEFADD            : $TCL_DEFADD  

  TK_INCLUDE_SPEC       : $TK_INCLUDE_SPEC
  TK_LIB_SPEC           : $TK_LIB_SPEC
  TK_LDADD              : $TK_LDADD

  CPPFLAGS              : $CPPFLAGS
  CFLAGS                : $CFLAGS
  LDFLAGS               : $LDFLAGS
  LIBS                  : $LIBS
  INLINE_ASM            : $INLINE_ASM

  GTK_MAC_CFLAGS        : $GTK_MAC_CFLAGS
  GTK_MAC_LIBS          : $GTK_MAC_LIBS
  COCOA_GTK_CFLAGS      : $COCOA_GTK_CFLAGS
  COCOA_GTK_LDADD       : $COCOA_GTK_LDADD
  COCOA_GTK_LDFLAGS     : $COCOA_GTK_LDFLAGS

  GCONF_CFLAGS          : $GCONF_CFLAGS
  GCONF_LIBS            : $GCONF_LIBS

  GTK_UNIX_PRINT_CFLAGS : $GTK_UNIX_PRINT_CFLAGS
  GTK_UNIX_PRINT_LIBS   : $GTK_UNIX_PRINT_LIBS
--------------------------------------------
])

AC_OUTPUT