1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.12
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15  --with-snack=DIR        use Snack files from DIR"
16ac_help="$ac_help
17  --with-tcl              directory containing tcl configuration (tclConfig.sh)"
18ac_help="$ac_help
19  --with-tk               directory containing tk configuration (tkConfig.sh)"
20ac_help="$ac_help
21  --enable-plugin         Enable Plugin"
22ac_help="$ac_help
23  --with-mozilla=DIR      will install in DIR/plugins and DIR/tclplug"
24ac_help="$ac_help
25  --disable-stubs         disable stub support"
26
27# Initialize some variables set by options.
28# The variables have the same names as the options, with
29# dashes changed to underlines.
30build=NONE
31cache_file=./config.cache
32exec_prefix=NONE
33host=NONE
34no_create=
35nonopt=NONE
36no_recursion=
37prefix=NONE
38program_prefix=NONE
39program_suffix=NONE
40program_transform_name=s,x,x,
41silent=
42site=
43srcdir=
44target=NONE
45verbose=
46x_includes=NONE
47x_libraries=NONE
48bindir='${exec_prefix}/bin'
49sbindir='${exec_prefix}/sbin'
50libexecdir='${exec_prefix}/libexec'
51datadir='${prefix}/share'
52sysconfdir='${prefix}/etc'
53sharedstatedir='${prefix}/com'
54localstatedir='${prefix}/var'
55libdir='${exec_prefix}/lib'
56includedir='${prefix}/include'
57oldincludedir='/usr/include'
58infodir='${prefix}/info'
59mandir='${prefix}/man'
60
61# Initialize some other variables.
62subdirs=
63MFLAGS= MAKEFLAGS=
64# Maximum number of lines to put in a shell here document.
65ac_max_here_lines=12
66
67ac_prev=
68for ac_option
69do
70
71  # If the previous option needs an argument, assign it.
72  if test -n "$ac_prev"; then
73    eval "$ac_prev=\$ac_option"
74    ac_prev=
75    continue
76  fi
77
78  case "$ac_option" in
79  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
80  *) ac_optarg= ;;
81  esac
82
83  # Accept the important Cygnus configure options, so we can diagnose typos.
84
85  case "$ac_option" in
86
87  -bindir | --bindir | --bindi | --bind | --bin | --bi)
88    ac_prev=bindir ;;
89  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
90    bindir="$ac_optarg" ;;
91
92  -build | --build | --buil | --bui | --bu)
93    ac_prev=build ;;
94  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
95    build="$ac_optarg" ;;
96
97  -cache-file | --cache-file | --cache-fil | --cache-fi \
98  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
99    ac_prev=cache_file ;;
100  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
101  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
102    cache_file="$ac_optarg" ;;
103
104  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
105    ac_prev=datadir ;;
106  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
107  | --da=*)
108    datadir="$ac_optarg" ;;
109
110  -disable-* | --disable-*)
111    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
112    # Reject names that are not valid shell variable names.
113    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
114      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
115    fi
116    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
117    eval "enable_${ac_feature}=no" ;;
118
119  -enable-* | --enable-*)
120    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
121    # Reject names that are not valid shell variable names.
122    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
123      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
124    fi
125    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
126    case "$ac_option" in
127      *=*) ;;
128      *) ac_optarg=yes ;;
129    esac
130    eval "enable_${ac_feature}='$ac_optarg'" ;;
131
132  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
133  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
134  | --exec | --exe | --ex)
135    ac_prev=exec_prefix ;;
136  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
137  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
138  | --exec=* | --exe=* | --ex=*)
139    exec_prefix="$ac_optarg" ;;
140
141  -gas | --gas | --ga | --g)
142    # Obsolete; use --with-gas.
143    with_gas=yes ;;
144
145  -help | --help | --hel | --he)
146    # Omit some internal or obsolete options to make the list less imposing.
147    # This message is too long to be a string in the A/UX 3.1 sh.
148    cat << EOF
149Usage: configure [options] [host]
150Options: [defaults in brackets after descriptions]
151Configuration:
152  --cache-file=FILE       cache test results in FILE
153  --help                  print this message
154  --no-create             do not create output files
155  --quiet, --silent       do not print \`checking...' messages
156  --version               print the version of autoconf that created configure
157Directory and file names:
158  --prefix=PREFIX         install architecture-independent files in PREFIX
159                          [$ac_default_prefix]
160  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
161                          [same as prefix]
162  --bindir=DIR            user executables in DIR [EPREFIX/bin]
163  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
164  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
165  --datadir=DIR           read-only architecture-independent data in DIR
166                          [PREFIX/share]
167  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
168  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
169                          [PREFIX/com]
170  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
171  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
172  --includedir=DIR        C header files in DIR [PREFIX/include]
173  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
174  --infodir=DIR           info documentation in DIR [PREFIX/info]
175  --mandir=DIR            man documentation in DIR [PREFIX/man]
176  --srcdir=DIR            find the sources in DIR [configure dir or ..]
177  --program-prefix=PREFIX prepend PREFIX to installed program names
178  --program-suffix=SUFFIX append SUFFIX to installed program names
179  --program-transform-name=PROGRAM
180                          run sed PROGRAM on installed program names
181EOF
182    cat << EOF
183Host type:
184  --build=BUILD           configure for building on BUILD [BUILD=HOST]
185  --host=HOST             configure for HOST [guessed]
186  --target=TARGET         configure for TARGET [TARGET=HOST]
187Features and packages:
188  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
189  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
190  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
191  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
192  --x-includes=DIR        X include files are in DIR
193  --x-libraries=DIR       X library files are in DIR
194EOF
195    if test -n "$ac_help"; then
196      echo "--enable and --with options recognized:$ac_help"
197    fi
198    exit 0 ;;
199
200  -host | --host | --hos | --ho)
201    ac_prev=host ;;
202  -host=* | --host=* | --hos=* | --ho=*)
203    host="$ac_optarg" ;;
204
205  -includedir | --includedir | --includedi | --included | --include \
206  | --includ | --inclu | --incl | --inc)
207    ac_prev=includedir ;;
208  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
209  | --includ=* | --inclu=* | --incl=* | --inc=*)
210    includedir="$ac_optarg" ;;
211
212  -infodir | --infodir | --infodi | --infod | --info | --inf)
213    ac_prev=infodir ;;
214  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
215    infodir="$ac_optarg" ;;
216
217  -libdir | --libdir | --libdi | --libd)
218    ac_prev=libdir ;;
219  -libdir=* | --libdir=* | --libdi=* | --libd=*)
220    libdir="$ac_optarg" ;;
221
222  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
223  | --libexe | --libex | --libe)
224    ac_prev=libexecdir ;;
225  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
226  | --libexe=* | --libex=* | --libe=*)
227    libexecdir="$ac_optarg" ;;
228
229  -localstatedir | --localstatedir | --localstatedi | --localstated \
230  | --localstate | --localstat | --localsta | --localst \
231  | --locals | --local | --loca | --loc | --lo)
232    ac_prev=localstatedir ;;
233  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
234  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
235  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
236    localstatedir="$ac_optarg" ;;
237
238  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
239    ac_prev=mandir ;;
240  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
241    mandir="$ac_optarg" ;;
242
243  -nfp | --nfp | --nf)
244    # Obsolete; use --without-fp.
245    with_fp=no ;;
246
247  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
248  | --no-cr | --no-c)
249    no_create=yes ;;
250
251  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
252  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
253    no_recursion=yes ;;
254
255  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
256  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
257  | --oldin | --oldi | --old | --ol | --o)
258    ac_prev=oldincludedir ;;
259  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
260  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
261  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
262    oldincludedir="$ac_optarg" ;;
263
264  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
265    ac_prev=prefix ;;
266  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
267    prefix="$ac_optarg" ;;
268
269  -program-prefix | --program-prefix | --program-prefi | --program-pref \
270  | --program-pre | --program-pr | --program-p)
271    ac_prev=program_prefix ;;
272  -program-prefix=* | --program-prefix=* | --program-prefi=* \
273  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
274    program_prefix="$ac_optarg" ;;
275
276  -program-suffix | --program-suffix | --program-suffi | --program-suff \
277  | --program-suf | --program-su | --program-s)
278    ac_prev=program_suffix ;;
279  -program-suffix=* | --program-suffix=* | --program-suffi=* \
280  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
281    program_suffix="$ac_optarg" ;;
282
283  -program-transform-name | --program-transform-name \
284  | --program-transform-nam | --program-transform-na \
285  | --program-transform-n | --program-transform- \
286  | --program-transform | --program-transfor \
287  | --program-transfo | --program-transf \
288  | --program-trans | --program-tran \
289  | --progr-tra | --program-tr | --program-t)
290    ac_prev=program_transform_name ;;
291  -program-transform-name=* | --program-transform-name=* \
292  | --program-transform-nam=* | --program-transform-na=* \
293  | --program-transform-n=* | --program-transform-=* \
294  | --program-transform=* | --program-transfor=* \
295  | --program-transfo=* | --program-transf=* \
296  | --program-trans=* | --program-tran=* \
297  | --progr-tra=* | --program-tr=* | --program-t=*)
298    program_transform_name="$ac_optarg" ;;
299
300  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
301  | -silent | --silent | --silen | --sile | --sil)
302    silent=yes ;;
303
304  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
305    ac_prev=sbindir ;;
306  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
307  | --sbi=* | --sb=*)
308    sbindir="$ac_optarg" ;;
309
310  -sharedstatedir | --sharedstatedir | --sharedstatedi \
311  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
312  | --sharedst | --shareds | --shared | --share | --shar \
313  | --sha | --sh)
314    ac_prev=sharedstatedir ;;
315  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
316  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
317  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
318  | --sha=* | --sh=*)
319    sharedstatedir="$ac_optarg" ;;
320
321  -site | --site | --sit)
322    ac_prev=site ;;
323  -site=* | --site=* | --sit=*)
324    site="$ac_optarg" ;;
325
326  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
327    ac_prev=srcdir ;;
328  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
329    srcdir="$ac_optarg" ;;
330
331  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
332  | --syscon | --sysco | --sysc | --sys | --sy)
333    ac_prev=sysconfdir ;;
334  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
335  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
336    sysconfdir="$ac_optarg" ;;
337
338  -target | --target | --targe | --targ | --tar | --ta | --t)
339    ac_prev=target ;;
340  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
341    target="$ac_optarg" ;;
342
343  -v | -verbose | --verbose | --verbos | --verbo | --verb)
344    verbose=yes ;;
345
346  -version | --version | --versio | --versi | --vers)
347    echo "configure generated by autoconf version 2.12"
348    exit 0 ;;
349
350  -with-* | --with-*)
351    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
352    # Reject names that are not valid shell variable names.
353    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
354      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
355    fi
356    ac_package=`echo $ac_package| sed 's/-/_/g'`
357    case "$ac_option" in
358      *=*) ;;
359      *) ac_optarg=yes ;;
360    esac
361    eval "with_${ac_package}='$ac_optarg'" ;;
362
363  -without-* | --without-*)
364    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
365    # Reject names that are not valid shell variable names.
366    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
367      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
368    fi
369    ac_package=`echo $ac_package| sed 's/-/_/g'`
370    eval "with_${ac_package}=no" ;;
371
372  --x)
373    # Obsolete; use --with-x.
374    with_x=yes ;;
375
376  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
377  | --x-incl | --x-inc | --x-in | --x-i)
378    ac_prev=x_includes ;;
379  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
380  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
381    x_includes="$ac_optarg" ;;
382
383  -x-libraries | --x-libraries | --x-librarie | --x-librari \
384  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
385    ac_prev=x_libraries ;;
386  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
387  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
388    x_libraries="$ac_optarg" ;;
389
390  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
391    ;;
392
393  *)
394    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
395      echo "configure: warning: $ac_option: invalid host type" 1>&2
396    fi
397    if test "x$nonopt" != xNONE; then
398      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
399    fi
400    nonopt="$ac_option"
401    ;;
402
403  esac
404done
405
406if test -n "$ac_prev"; then
407  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
408fi
409
410trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
411
412# File descriptor usage:
413# 0 standard input
414# 1 file creation
415# 2 errors and warnings
416# 3 some systems may open it to /dev/tty
417# 4 used on the Kubota Titan
418# 6 checking for... messages and results
419# 5 compiler messages saved in config.log
420if test "$silent" = yes; then
421  exec 6>/dev/null
422else
423  exec 6>&1
424fi
425exec 5>./config.log
426
427echo "\
428This file contains any messages produced by compilers while
429running configure, to aid debugging if configure makes a mistake.
430" 1>&5
431
432# Strip out --no-create and --no-recursion so they do not pile up.
433# Also quote any args containing shell metacharacters.
434ac_configure_args=
435for ac_arg
436do
437  case "$ac_arg" in
438  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
439  | --no-cr | --no-c) ;;
440  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
441  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
442  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
443  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
444  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
445  esac
446done
447
448# NLS nuisances.
449# Only set these to C if already set.  These must not be set unconditionally
450# because not all systems understand e.g. LANG=C (notably SCO).
451# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
452# Non-C LC_CTYPE values break the ctype check.
453if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
454if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
455if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
456if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
457
458# confdefs.h avoids OS command line length limits that DEFS can exceed.
459rm -rf conftest* confdefs.h
460# AIX cpp loses on an empty file, so make sure it contains at least a newline.
461echo > confdefs.h
462
463# A filename unique to this package, relative to the directory that
464# configure is in, which we can look for to find out if srcdir is correct.
465ac_unique_file=square.c
466
467# Find the source files, if location was not specified.
468if test -z "$srcdir"; then
469  ac_srcdir_defaulted=yes
470  # Try the directory containing this script, then its parent.
471  ac_prog=$0
472  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
473  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
474  srcdir=$ac_confdir
475  if test ! -r $srcdir/$ac_unique_file; then
476    srcdir=..
477  fi
478else
479  ac_srcdir_defaulted=no
480fi
481if test ! -r $srcdir/$ac_unique_file; then
482  if test "$ac_srcdir_defaulted" = yes; then
483    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
484  else
485    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
486  fi
487fi
488srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
489
490# Prefer explicitly selected file to automatically selected ones.
491if test -z "$CONFIG_SITE"; then
492  if test "x$prefix" != xNONE; then
493    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
494  else
495    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
496  fi
497fi
498for ac_site_file in $CONFIG_SITE; do
499  if test -r "$ac_site_file"; then
500    echo "loading site script $ac_site_file"
501    . "$ac_site_file"
502  fi
503done
504
505if test -r "$cache_file"; then
506  echo "loading cache $cache_file"
507  . $cache_file
508else
509  echo "creating cache $cache_file"
510  > $cache_file
511fi
512
513ac_ext=c
514# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
515ac_cpp='$CPP $CPPFLAGS'
516ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
517ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
518cross_compiling=$ac_cv_prog_cc_cross
519
520if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
521  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
522  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
523    ac_n= ac_c='
524' ac_t='	'
525  else
526    ac_n=-n ac_c= ac_t=
527  fi
528else
529  ac_n= ac_c='\c' ac_t=
530fi
531
532
533
534#--------------------------------------------------------------------
535#       See if there was a command-line option for where Snack is; if
536#       not, assume that its top-level directory is a sibling of ours.
537#--------------------------------------------------------------------
538
539# Check whether --with-snack or --without-snack was given.
540if test "${with_snack+set}" = set; then
541  withval="$with_snack"
542  SNACK_DIR=$withval
543else
544  SNACK_DIR=`cd ..; pwd`
545fi
546
547
548if test "x$SNACK_DIR" = "x"; then
549    { echo "configure: error: Could not find Snack directory" 1>&2; exit 1; }
550fi
551if test ! -d $SNACK_DIR; then
552    { echo "configure: error: Snack directory $SNACK_DIR doesn't exist" 1>&2; exit 1; }
553fi
554
555SNACK_INC_DIR="${SNACK_DIR}/generic"
556SNACK_OBJ_DIR="${SNACK_DIR}/unix"
557file=$SNACK_OBJ_DIR/snackConfig.sh
558. $file
559SNACK_STUB_LIB_FLAG=$SNACK_STUB_LIB_FLAG
560
561
562#--------------------------------------------------------------------
563#       See if there was a command-line option for where Tcl is;  if
564#       not, assume that its top-level directory is a sibling of ours.
565#--------------------------------------------------------------------
566
567
568    #
569    # Ok, lets find the tcl configuration
570    # First, look for one uninstalled.
571    # the alternative search directory is invoked by --with-tcl
572    #
573
574    if test x"${no_tcl}" = x ; then
575	# we reset no_tcl in case something fails here
576	no_tcl=true
577	# Check whether --with-tcl or --without-tcl was given.
578if test "${with_tcl+set}" = set; then
579  withval="$with_tcl"
580  with_tclconfig=${withval}
581fi
582
583	echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
584echo "configure:585: checking for Tcl configuration" >&5
585	if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
586  echo $ac_n "(cached) $ac_c" 1>&6
587else
588
589
590	    # First check to see if --with-tcl was specified.
591	    if test x"${with_tclconfig}" != x ; then
592		if test -f "${with_tclconfig}/tclConfig.sh" ; then
593		    ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
594		else
595		    { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
596		fi
597	    fi
598
599	    # then check for a private Tcl installation
600	    if test x"${ac_cv_c_tclconfig}" = x ; then
601		for i in \
602			../tcl \
603			`ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
604			../../tcl \
605			`ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
606			../../../tcl \
607			`ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
608		    if test -f "$i/unix/tclConfig.sh" ; then
609			ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
610			break
611		    fi
612		done
613	    fi
614
615	    # check in a few common install locations
616	    if test x"${ac_cv_c_tclconfig}" = x ; then
617		for i in `ls -d ${prefix}/lib 2>/dev/null` \
618			`ls -d /usr/local/lib 2>/dev/null` ; do
619		    if test -f "$i/tclConfig.sh" ; then
620			ac_cv_c_tclconfig=`(cd $i; pwd)`
621			break
622		    fi
623		done
624	    fi
625
626	    # check in a few other private locations
627	    if test x"${ac_cv_c_tclconfig}" = x ; then
628		for i in \
629			${srcdir}/../tcl \
630			`ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
631		    if test -f "$i/unix/tclConfig.sh" ; then
632		    ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
633		    break
634		fi
635		done
636	    fi
637
638fi
639
640
641	if test x"${ac_cv_c_tclconfig}" = x ; then
642	    TCL_BIN_DIR="# no Tcl configs found"
643	    echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
644	    exit 0
645	else
646	    no_tcl=
647	    TCL_BIN_DIR=${ac_cv_c_tclconfig}
648	    echo "$ac_t""found $TCL_BIN_DIR/tclConfig.sh" 1>&6
649	fi
650    fi
651
652
653#--------------------------------------------------------------------
654#       See if there was a command-line option for where Tk is;  if
655#       not, assume that its top-level directory is a sibling of ours.
656#--------------------------------------------------------------------
657
658
659    #
660    # Ok, lets find the tk configuration
661    # First, look for one uninstalled.
662    # the alternative search directory is invoked by --with-tk
663    #
664
665    if test x"${no_tk}" = x ; then
666	# we reset no_tk in case something fails here
667	no_tk=true
668	# Check whether --with-tk or --without-tk was given.
669if test "${with_tk+set}" = set; then
670  withval="$with_tk"
671  with_tkconfig=${withval}
672fi
673
674	echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
675echo "configure:676: checking for Tk configuration" >&5
676	if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
677  echo $ac_n "(cached) $ac_c" 1>&6
678else
679
680
681	    # First check to see if --with-tkconfig was specified.
682	    if test x"${with_tkconfig}" != x ; then
683		if test -f "${with_tkconfig}/tkConfig.sh" ; then
684		    ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
685		else
686		    { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
687		fi
688	    fi
689
690	    # then check for a private Tk library
691	    if test x"${ac_cv_c_tkconfig}" = x ; then
692		for i in \
693			../tk \
694			`ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
695			../../tk \
696			`ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
697			../../../tk \
698			`ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
699		    if test -f "$i/unix/tkConfig.sh" ; then
700			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
701			break
702		    fi
703		done
704	    fi
705	    # check in a few common install locations
706	    if test x"${ac_cv_c_tkconfig}" = x ; then
707		for i in `ls -d ${prefix}/lib 2>/dev/null` \
708			`ls -d /usr/local/lib 2>/dev/null` ; do
709		    if test -f "$i/tkConfig.sh" ; then
710			ac_cv_c_tkconfig=`(cd $i; pwd)`
711			break
712		    fi
713		done
714	    fi
715	    # check in a few other private locations
716	    if test x"${ac_cv_c_tkconfig}" = x ; then
717		for i in \
718			${srcdir}/../tk \
719			`ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
720		    if test -f "$i/unix/tkConfig.sh" ; then
721			ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
722			break
723		    fi
724		done
725	    fi
726
727fi
728
729	if test x"${ac_cv_c_tkconfig}" = x ; then
730	    TK_BIN_DIR="# no Tk configs found"
731	    echo "configure: warning: Can't find Tk configuration definitions" 1>&2
732	    exit 0
733	else
734	    no_tk=
735	    TK_BIN_DIR=${ac_cv_c_tkconfig}
736	    echo "$ac_t""found $TK_BIN_DIR/tkConfig.sh" 1>&6
737	fi
738    fi
739
740
741
742#--------------------------------------------------------------------
743
744if test "x${prefix}" = "xNONE"; then
745    prefix=/usr/local
746fi
747
748SQUARE_INSTALL_PATH=${prefix}/lib
749
750#--------------------------------------------------------------------
751#       Read in configuration information generated by Tcl and
752#       arrange for it to be substituted into our Makefile.
753#--------------------------------------------------------------------
754
755file=$TCL_BIN_DIR/tclConfig.sh
756. $file
757CFLAGS=$TCL_SHLIB_CFLAGS
758SHLIB_LD=$TCL_SHLIB_LD
759SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
760CC=$TCL_CC
761
762#--------------------------------------------------------------------
763#       Read in configuration information generated by Tk and arrange
764#       for it to be substituted into our Makefile.
765#--------------------------------------------------------------------
766
767file=$TK_BIN_DIR/tkConfig.sh
768. $file
769XINCLUDES=$TK_XINCLUDES
770
771#--------------------------------------------------------------------
772#	Set audio related variables for the supported systems
773#--------------------------------------------------------------------
774
775system=`uname -s`-`uname -r`
776
777AINC=""
778ALIB=""
779
780case $system in
781    HP-UX-*.10.*)
782	if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
783	    CFLAGS=$CFLAGS
784	else
785	    CFLAGS="-Ae +z"
786	fi
787	AINC="-I/opt/audio/include"
788	AFLAG="-DHPUX"
789	ALIB="-L/opt/audio/lib -lAlib"
790	;;
791    IRIX*)
792	AFLAG="-DIRIX"
793        ALIB="-laudio"
794	;;
795    IRIX64-6.*)
796	AFLAG="-DIRIX"
797        ALIB="-laudio"
798	;;
799    Linux*)
800	AFLAG="-DLinux"
801	;;
802    SunOS*)
803	AFLAG="-DSolaris"
804	;;
805    *)
806	AFLAG="-DOTHER"
807	;;
808esac
809
810#--------------------------------------------------------------------
811#	Get plug-in install path if needed
812#--------------------------------------------------------------------
813
814# Check whether --enable-plugin or --disable-plugin was given.
815if test "${enable_plugin+set}" = set; then
816  enableval="$enable_plugin"
817  :
818else
819  enableval="no"
820fi
821
822
823if test "$enableval" = "yes"; then
824  echo $ac_n "checking Mozilla Home""... $ac_c" 1>&6
825echo "configure:826: checking Mozilla Home" >&5
826# Check for Mozilla home (install directory of netscape (plugins))
827  # Check whether --with-mozilla or --without-mozilla was given.
828if test "${with_mozilla+set}" = set; then
829  withval="$with_mozilla"
830  MOZILLA_DIR=$withval
831else
832  MOZILLA_DIR="$MOZILLA_HOME"
833fi
834
835  if test -z "$MOZILLA_DIR"; then
836    MOZILLA_DIR=/usr/local/lib/netscape
837  fi
838  if test ! -d "$MOZILLA_DIR"; then
839    { echo "configure: error: Mozilla home directory \"$MOZILLA_DIR\" doesn't exist: use configure --with-mozilla=MOZILLA_HOME - ie. --with-mozilla=$HOME/.netscape for a personal install" 1>&2; exit 1; }
840  fi
841  echo "$ac_t""found. Will install plugin in \"$MOZILLA_DIR\"" 1>&6
842
843else
844  echo "$ac_t""will not install as plugin (normal)" 1>&6
845fi
846
847#--------------------------------------------------------------------
848#	Disable stub support. This is necessary if you
849#	want to run Snack with Tcl/Tk 8.0 up to 8.0.5
850#--------------------------------------------------------------------
851
852# Check whether --enable-stubs or --disable-stubs was given.
853if test "${enable_stubs+set}" = set; then
854  enableval="$enable_stubs"
855  :
856else
857  enableval2="no"
858fi
859
860
861if test "$enableval2" = "no"; then
862    echo "$ac_t""will use stubs (normal)" 1>&6
863    CFLAGS="$CFLAGS -DUSE_SNACK_STUBS -DUSE_TCL_STUBS"
864    TCL_LIB_SPEC="${TCL_STUB_LIB_SPEC}"
865    TK_LIB_SPEC="${TK_STUB_LIB_SPEC}"
866    if test "$TCLVER" = "8.0"; then
867        echo "configure: warning: "You probably forgot to specify --disable-stubs"" 1>&2
868    fi
869else
870    echo "$ac_t""will not use stubs" 1>&6
871fi
872#--------------------------------------------------------------------
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892trap '' 1 2 15
893cat > confcache <<\EOF
894# This file is a shell script that caches the results of configure
895# tests run on this system so they can be shared between configure
896# scripts and configure runs.  It is not useful on other systems.
897# If it contains results you don't want to keep, you may remove or edit it.
898#
899# By default, configure uses ./config.cache as the cache file,
900# creating it if it does not exist already.  You can give configure
901# the --cache-file=FILE option to use a different cache file; that is
902# what configure does when it calls configure scripts in
903# subdirectories, so they share the cache.
904# Giving --cache-file=/dev/null disables caching, for debugging configure.
905# config.status only pays attention to the cache file if you give it the
906# --recheck option to rerun configure.
907#
908EOF
909# The following way of writing the cache mishandles newlines in values,
910# but we know of no workaround that is simple, portable, and efficient.
911# So, don't put newlines in cache variables' values.
912# Ultrix sh set writes to stderr and can't be redirected directly,
913# and sets the high bit in the cache file unless we assign to the vars.
914(set) 2>&1 |
915  case `(ac_space=' '; set) 2>&1` in
916  *ac_space=\ *)
917    # `set' does not quote correctly, so add quotes (double-quote substitution
918    # turns \\\\ into \\, and sed turns \\ into \).
919    sed -n \
920      -e "s/'/'\\\\''/g" \
921      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
922    ;;
923  *)
924    # `set' quotes correctly as required by POSIX, so do not add quotes.
925    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
926    ;;
927  esac >> confcache
928if cmp -s $cache_file confcache; then
929  :
930else
931  if test -w $cache_file; then
932    echo "updating cache $cache_file"
933    cat confcache > $cache_file
934  else
935    echo "not updating unwritable cache $cache_file"
936  fi
937fi
938rm -f confcache
939
940trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
941
942test "x$prefix" = xNONE && prefix=$ac_default_prefix
943# Let make expand exec_prefix.
944test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
945
946# Any assignment to VPATH causes Sun make to only execute
947# the first set of double-colon rules, so remove it if not needed.
948# If there is a colon in the path, we need to keep it.
949if test "x$srcdir" = x.; then
950  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
951fi
952
953trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
954
955# Transform confdefs.h into DEFS.
956# Protect against shell expansion while executing Makefile rules.
957# Protect against Makefile macro expansion.
958cat > conftest.defs <<\EOF
959s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
960s%[ 	`~#$^&*(){}\\|;'"<>?]%\\&%g
961s%\[%\\&%g
962s%\]%\\&%g
963s%\$%$$%g
964EOF
965DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
966rm -f conftest.defs
967
968
969# Without the "./", some shells look in PATH for config.status.
970: ${CONFIG_STATUS=./config.status}
971
972echo creating $CONFIG_STATUS
973rm -f $CONFIG_STATUS
974cat > $CONFIG_STATUS <<EOF
975#! /bin/sh
976# Generated automatically by configure.
977# Run this file to recreate the current configuration.
978# This directory was configured as follows,
979# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
980#
981# $0 $ac_configure_args
982#
983# Compiler output produced by configure, useful for debugging
984# configure, is in ./config.log if it exists.
985
986ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
987for ac_option
988do
989  case "\$ac_option" in
990  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
991    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
992    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
993  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
994    echo "$CONFIG_STATUS generated by autoconf version 2.12"
995    exit 0 ;;
996  -help | --help | --hel | --he | --h)
997    echo "\$ac_cs_usage"; exit 0 ;;
998  *) echo "\$ac_cs_usage"; exit 1 ;;
999  esac
1000done
1001
1002ac_given_srcdir=$srcdir
1003
1004trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1005EOF
1006cat >> $CONFIG_STATUS <<EOF
1007
1008# Protect against being on the right side of a sed subst in config.status.
1009sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1010 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1011$ac_vpsub
1012$extrasub
1013s%@CFLAGS@%$CFLAGS%g
1014s%@CPPFLAGS@%$CPPFLAGS%g
1015s%@CXXFLAGS@%$CXXFLAGS%g
1016s%@DEFS@%$DEFS%g
1017s%@LDFLAGS@%$LDFLAGS%g
1018s%@LIBS@%$LIBS%g
1019s%@exec_prefix@%$exec_prefix%g
1020s%@prefix@%$prefix%g
1021s%@program_transform_name@%$program_transform_name%g
1022s%@bindir@%$bindir%g
1023s%@sbindir@%$sbindir%g
1024s%@libexecdir@%$libexecdir%g
1025s%@datadir@%$datadir%g
1026s%@sysconfdir@%$sysconfdir%g
1027s%@sharedstatedir@%$sharedstatedir%g
1028s%@localstatedir@%$localstatedir%g
1029s%@libdir@%$libdir%g
1030s%@includedir@%$includedir%g
1031s%@oldincludedir@%$oldincludedir%g
1032s%@infodir@%$infodir%g
1033s%@mandir@%$mandir%g
1034s%@MOZILLA_DIR@%$MOZILLA_DIR%g
1035s%@CC@%$CC%g
1036s%@SHLIB_LD@%$SHLIB_LD%g
1037s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
1038s%@XINCLUDES@%$XINCLUDES%g
1039s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
1040s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
1041s%@TCL_SRC_DIR@%$TCL_SRC_DIR%g
1042s%@TK_SRC_DIR@%$TK_SRC_DIR%g
1043s%@TK_LIBS@%$TK_LIBS%g
1044s%@SQUARE_INSTALL_PATH@%$SQUARE_INSTALL_PATH%g
1045s%@AINC@%$AINC%g
1046s%@AFLAG@%$AFLAG%g
1047s%@ALIB@%$ALIB%g
1048s%@SNACK_INC_DIR@%$SNACK_INC_DIR%g
1049s%@SNACK_OBJ_DIR@%$SNACK_OBJ_DIR%g
1050s%@SNACK_STUB_LIB_FLAG@%$SNACK_STUB_LIB_FLAG%g
1051
1052CEOF
1053EOF
1054
1055cat >> $CONFIG_STATUS <<\EOF
1056
1057# Split the substitutions into bite-sized pieces for seds with
1058# small command number limits, like on Digital OSF/1 and HP-UX.
1059ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1060ac_file=1 # Number of current file.
1061ac_beg=1 # First line for current file.
1062ac_end=$ac_max_sed_cmds # Line after last line for current file.
1063ac_more_lines=:
1064ac_sed_cmds=""
1065while $ac_more_lines; do
1066  if test $ac_beg -gt 1; then
1067    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1068  else
1069    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1070  fi
1071  if test ! -s conftest.s$ac_file; then
1072    ac_more_lines=false
1073    rm -f conftest.s$ac_file
1074  else
1075    if test -z "$ac_sed_cmds"; then
1076      ac_sed_cmds="sed -f conftest.s$ac_file"
1077    else
1078      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1079    fi
1080    ac_file=`expr $ac_file + 1`
1081    ac_beg=$ac_end
1082    ac_end=`expr $ac_end + $ac_max_sed_cmds`
1083  fi
1084done
1085if test -z "$ac_sed_cmds"; then
1086  ac_sed_cmds=cat
1087fi
1088EOF
1089
1090cat >> $CONFIG_STATUS <<EOF
1091
1092CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1093EOF
1094cat >> $CONFIG_STATUS <<\EOF
1095for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1096  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1097  case "$ac_file" in
1098  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1099       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1100  *) ac_file_in="${ac_file}.in" ;;
1101  esac
1102
1103  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1104
1105  # Remove last slash and all that follows it.  Not all systems have dirname.
1106  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1107  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1108    # The file is in a subdirectory.
1109    test ! -d "$ac_dir" && mkdir "$ac_dir"
1110    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1111    # A "../" for each directory in $ac_dir_suffix.
1112    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1113  else
1114    ac_dir_suffix= ac_dots=
1115  fi
1116
1117  case "$ac_given_srcdir" in
1118  .)  srcdir=.
1119      if test -z "$ac_dots"; then top_srcdir=.
1120      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1121  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1122  *) # Relative path.
1123    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1124    top_srcdir="$ac_dots$ac_given_srcdir" ;;
1125  esac
1126
1127
1128  echo creating "$ac_file"
1129  rm -f "$ac_file"
1130  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1131  case "$ac_file" in
1132  *Makefile*) ac_comsub="1i\\
1133# $configure_input" ;;
1134  *) ac_comsub= ;;
1135  esac
1136
1137  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1138  sed -e "$ac_comsub
1139s%@configure_input@%$configure_input%g
1140s%@srcdir@%$srcdir%g
1141s%@top_srcdir@%$top_srcdir%g
1142" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1143fi; done
1144rm -f conftest.s*
1145
1146EOF
1147cat >> $CONFIG_STATUS <<EOF
1148
1149EOF
1150cat >> $CONFIG_STATUS <<\EOF
1151
1152exit 0
1153EOF
1154chmod +x $CONFIG_STATUS
1155rm -fr confdefs* $ac_clean_files
1156test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1157
1158