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  --enable-shared         build shared library using GNU libtool"
16ac_help="$ac_help
17  --enable-static         build static library using GNU libtool"
18ac_help="$ac_help
19  --enable-maxmem[=N]     enable use of temp files, set max mem usage to N MB"
20ac_help="$ac_help
21"
22
23# Initialize some variables set by options.
24# The variables have the same names as the options, with
25# dashes changed to underlines.
26build=NONE
27cache_file=./config.cache
28exec_prefix=NONE
29host=NONE
30no_create=
31nonopt=NONE
32no_recursion=
33prefix=NONE
34program_prefix=NONE
35program_suffix=NONE
36program_transform_name=s,x,x,
37silent=
38site=
39srcdir=
40target=NONE
41verbose=
42x_includes=NONE
43x_libraries=NONE
44bindir='${exec_prefix}/bin'
45sbindir='${exec_prefix}/sbin'
46libexecdir='${exec_prefix}/libexec'
47datadir='${prefix}/share'
48sysconfdir='${prefix}/etc'
49sharedstatedir='${prefix}/com'
50localstatedir='${prefix}/var'
51libdir='${exec_prefix}/lib'
52includedir='${prefix}/include'
53oldincludedir='/usr/include'
54infodir='${prefix}/info'
55mandir='${prefix}/man'
56
57# Initialize some other variables.
58subdirs=
59MFLAGS= MAKEFLAGS=
60# Maximum number of lines to put in a shell here document.
61ac_max_here_lines=12
62
63ac_prev=
64for ac_option
65do
66
67  # If the previous option needs an argument, assign it.
68  if test -n "$ac_prev"; then
69    eval "$ac_prev=\$ac_option"
70    ac_prev=
71    continue
72  fi
73
74  case "$ac_option" in
75  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
76  *) ac_optarg= ;;
77  esac
78
79  # Accept the important Cygnus configure options, so we can diagnose typos.
80
81  case "$ac_option" in
82
83  -bindir | --bindir | --bindi | --bind | --bin | --bi)
84    ac_prev=bindir ;;
85  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
86    bindir="$ac_optarg" ;;
87
88  -build | --build | --buil | --bui | --bu)
89    ac_prev=build ;;
90  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
91    build="$ac_optarg" ;;
92
93  -cache-file | --cache-file | --cache-fil | --cache-fi \
94  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
95    ac_prev=cache_file ;;
96  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
97  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
98    cache_file="$ac_optarg" ;;
99
100  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
101    ac_prev=datadir ;;
102  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
103  | --da=*)
104    datadir="$ac_optarg" ;;
105
106  -disable-* | --disable-*)
107    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
108    # Reject names that are not valid shell variable names.
109    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
110      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
111    fi
112    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
113    eval "enable_${ac_feature}=no" ;;
114
115  -enable-* | --enable-*)
116    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
117    # Reject names that are not valid shell variable names.
118    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
119      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
120    fi
121    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
122    case "$ac_option" in
123      *=*) ;;
124      *) ac_optarg=yes ;;
125    esac
126    eval "enable_${ac_feature}='$ac_optarg'" ;;
127
128  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
129  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
130  | --exec | --exe | --ex)
131    ac_prev=exec_prefix ;;
132  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
133  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
134  | --exec=* | --exe=* | --ex=*)
135    exec_prefix="$ac_optarg" ;;
136
137  -gas | --gas | --ga | --g)
138    # Obsolete; use --with-gas.
139    with_gas=yes ;;
140
141  -help | --help | --hel | --he)
142    # Omit some internal or obsolete options to make the list less imposing.
143    # This message is too long to be a string in the A/UX 3.1 sh.
144    cat << EOF
145Usage: configure [options] [host]
146Options: [defaults in brackets after descriptions]
147Configuration:
148  --cache-file=FILE       cache test results in FILE
149  --help                  print this message
150  --no-create             do not create output files
151  --quiet, --silent       do not print \`checking...' messages
152  --version               print the version of autoconf that created configure
153Directory and file names:
154  --prefix=PREFIX         install architecture-independent files in PREFIX
155                          [$ac_default_prefix]
156  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
157                          [same as prefix]
158  --bindir=DIR            user executables in DIR [EPREFIX/bin]
159  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
160  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
161  --datadir=DIR           read-only architecture-independent data in DIR
162                          [PREFIX/share]
163  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
164  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
165                          [PREFIX/com]
166  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
167  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
168  --includedir=DIR        C header files in DIR [PREFIX/include]
169  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
170  --infodir=DIR           info documentation in DIR [PREFIX/info]
171  --mandir=DIR            man documentation in DIR [PREFIX/man]
172  --srcdir=DIR            find the sources in DIR [configure dir or ..]
173  --program-prefix=PREFIX prepend PREFIX to installed program names
174  --program-suffix=SUFFIX append SUFFIX to installed program names
175  --program-transform-name=PROGRAM
176                          run sed PROGRAM on installed program names
177EOF
178    cat << EOF
179Host type:
180  --build=BUILD           configure for building on BUILD [BUILD=HOST]
181  --host=HOST             configure for HOST [guessed]
182  --target=TARGET         configure for TARGET [TARGET=HOST]
183Features and packages:
184  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
185  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
186  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
187  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
188  --x-includes=DIR        X include files are in DIR
189  --x-libraries=DIR       X library files are in DIR
190EOF
191    if test -n "$ac_help"; then
192      echo "--enable and --with options recognized:$ac_help"
193    fi
194    exit 0 ;;
195
196  -host | --host | --hos | --ho)
197    ac_prev=host ;;
198  -host=* | --host=* | --hos=* | --ho=*)
199    host="$ac_optarg" ;;
200
201  -includedir | --includedir | --includedi | --included | --include \
202  | --includ | --inclu | --incl | --inc)
203    ac_prev=includedir ;;
204  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
205  | --includ=* | --inclu=* | --incl=* | --inc=*)
206    includedir="$ac_optarg" ;;
207
208  -infodir | --infodir | --infodi | --infod | --info | --inf)
209    ac_prev=infodir ;;
210  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
211    infodir="$ac_optarg" ;;
212
213  -libdir | --libdir | --libdi | --libd)
214    ac_prev=libdir ;;
215  -libdir=* | --libdir=* | --libdi=* | --libd=*)
216    libdir="$ac_optarg" ;;
217
218  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
219  | --libexe | --libex | --libe)
220    ac_prev=libexecdir ;;
221  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
222  | --libexe=* | --libex=* | --libe=*)
223    libexecdir="$ac_optarg" ;;
224
225  -localstatedir | --localstatedir | --localstatedi | --localstated \
226  | --localstate | --localstat | --localsta | --localst \
227  | --locals | --local | --loca | --loc | --lo)
228    ac_prev=localstatedir ;;
229  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
230  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
231  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
232    localstatedir="$ac_optarg" ;;
233
234  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
235    ac_prev=mandir ;;
236  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
237    mandir="$ac_optarg" ;;
238
239  -nfp | --nfp | --nf)
240    # Obsolete; use --without-fp.
241    with_fp=no ;;
242
243  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
244  | --no-cr | --no-c)
245    no_create=yes ;;
246
247  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
248  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
249    no_recursion=yes ;;
250
251  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
252  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
253  | --oldin | --oldi | --old | --ol | --o)
254    ac_prev=oldincludedir ;;
255  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
256  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
257  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
258    oldincludedir="$ac_optarg" ;;
259
260  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
261    ac_prev=prefix ;;
262  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
263    prefix="$ac_optarg" ;;
264
265  -program-prefix | --program-prefix | --program-prefi | --program-pref \
266  | --program-pre | --program-pr | --program-p)
267    ac_prev=program_prefix ;;
268  -program-prefix=* | --program-prefix=* | --program-prefi=* \
269  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
270    program_prefix="$ac_optarg" ;;
271
272  -program-suffix | --program-suffix | --program-suffi | --program-suff \
273  | --program-suf | --program-su | --program-s)
274    ac_prev=program_suffix ;;
275  -program-suffix=* | --program-suffix=* | --program-suffi=* \
276  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
277    program_suffix="$ac_optarg" ;;
278
279  -program-transform-name | --program-transform-name \
280  | --program-transform-nam | --program-transform-na \
281  | --program-transform-n | --program-transform- \
282  | --program-transform | --program-transfor \
283  | --program-transfo | --program-transf \
284  | --program-trans | --program-tran \
285  | --progr-tra | --program-tr | --program-t)
286    ac_prev=program_transform_name ;;
287  -program-transform-name=* | --program-transform-name=* \
288  | --program-transform-nam=* | --program-transform-na=* \
289  | --program-transform-n=* | --program-transform-=* \
290  | --program-transform=* | --program-transfor=* \
291  | --program-transfo=* | --program-transf=* \
292  | --program-trans=* | --program-tran=* \
293  | --progr-tra=* | --program-tr=* | --program-t=*)
294    program_transform_name="$ac_optarg" ;;
295
296  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
297  | -silent | --silent | --silen | --sile | --sil)
298    silent=yes ;;
299
300  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
301    ac_prev=sbindir ;;
302  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
303  | --sbi=* | --sb=*)
304    sbindir="$ac_optarg" ;;
305
306  -sharedstatedir | --sharedstatedir | --sharedstatedi \
307  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
308  | --sharedst | --shareds | --shared | --share | --shar \
309  | --sha | --sh)
310    ac_prev=sharedstatedir ;;
311  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
312  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
313  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
314  | --sha=* | --sh=*)
315    sharedstatedir="$ac_optarg" ;;
316
317  -site | --site | --sit)
318    ac_prev=site ;;
319  -site=* | --site=* | --sit=*)
320    site="$ac_optarg" ;;
321
322  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
323    ac_prev=srcdir ;;
324  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
325    srcdir="$ac_optarg" ;;
326
327  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
328  | --syscon | --sysco | --sysc | --sys | --sy)
329    ac_prev=sysconfdir ;;
330  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
331  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
332    sysconfdir="$ac_optarg" ;;
333
334  -target | --target | --targe | --targ | --tar | --ta | --t)
335    ac_prev=target ;;
336  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
337    target="$ac_optarg" ;;
338
339  -v | -verbose | --verbose | --verbos | --verbo | --verb)
340    verbose=yes ;;
341
342  -version | --version | --versio | --versi | --vers)
343    echo "configure generated by autoconf version 2.12"
344    exit 0 ;;
345
346  -with-* | --with-*)
347    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
348    # Reject names that are not valid shell variable names.
349    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
350      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
351    fi
352    ac_package=`echo $ac_package| sed 's/-/_/g'`
353    case "$ac_option" in
354      *=*) ;;
355      *) ac_optarg=yes ;;
356    esac
357    eval "with_${ac_package}='$ac_optarg'" ;;
358
359  -without-* | --without-*)
360    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
361    # Reject names that are not valid shell variable names.
362    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
363      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364    fi
365    ac_package=`echo $ac_package| sed 's/-/_/g'`
366    eval "with_${ac_package}=no" ;;
367
368  --x)
369    # Obsolete; use --with-x.
370    with_x=yes ;;
371
372  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
373  | --x-incl | --x-inc | --x-in | --x-i)
374    ac_prev=x_includes ;;
375  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
376  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
377    x_includes="$ac_optarg" ;;
378
379  -x-libraries | --x-libraries | --x-librarie | --x-librari \
380  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
381    ac_prev=x_libraries ;;
382  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
383  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
384    x_libraries="$ac_optarg" ;;
385
386  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
387    ;;
388
389  *=*)
390    varname=`echo "$ac_option"|sed -e 's/=.*//'`
391    # Reject names that aren't valid shell variable names.
392    if test -n "`echo $varname| sed 's/[a-zA-Z0-9_]//g'`"; then
393      { echo "configure: error: $varname: invalid shell variable name" 1>&2; exit 1; }
394    fi
395    val="`echo "$ac_option"|sed 's/[^=]*=//'`"
396    test -n "$verbose" && echo "	setting shell variable $varname to $val"
397    eval "$varname='$val'"
398    eval "export $varname" ;;
399
400  *)
401    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
402      echo "configure: warning: $ac_option: invalid host type" 1>&2
403    fi
404    if test "x$nonopt" != xNONE; then
405      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406    fi
407    nonopt="$ac_option"
408    ;;
409
410  esac
411done
412
413if test -n "$ac_prev"; then
414  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
415fi
416
417trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
418
419# File descriptor usage:
420# 0 standard input
421# 1 file creation
422# 2 errors and warnings
423# 3 some systems may open it to /dev/tty
424# 4 used on the Kubota Titan
425# 6 checking for... messages and results
426# 5 compiler messages saved in config.log
427if test "$silent" = yes; then
428  exec 6>/dev/null
429else
430  exec 6>&1
431fi
432exec 5>./config.log
433
434echo "\
435This file contains any messages produced by compilers while
436running configure, to aid debugging if configure makes a mistake.
437" 1>&5
438
439# Strip out --no-create and --no-recursion so they do not pile up.
440# Also quote any args containing shell metacharacters.
441ac_configure_args=
442for ac_arg
443do
444  case "$ac_arg" in
445  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
446  | --no-cr | --no-c) ;;
447  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
448  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
449  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
450  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
451  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
452  esac
453done
454
455# NLS nuisances.
456# Only set these to C if already set.  These must not be set unconditionally
457# because not all systems understand e.g. LANG=C (notably SCO).
458# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
459# Non-C LC_CTYPE values break the ctype check.
460if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
461if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
462if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
463if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
464
465# confdefs.h avoids OS command line length limits that DEFS can exceed.
466rm -rf conftest* confdefs.h
467# AIX cpp loses on an empty file, so make sure it contains at least a newline.
468echo > confdefs.h
469
470# A filename unique to this package, relative to the directory that
471# configure is in, which we can look for to find out if srcdir is correct.
472ac_unique_file=jcmaster.c
473
474# Find the source files, if location was not specified.
475if test -z "$srcdir"; then
476  ac_srcdir_defaulted=yes
477  # Try the directory containing this script, then its parent.
478  ac_prog=$0
479  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
480  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
481  srcdir=$ac_confdir
482  if test ! -r $srcdir/$ac_unique_file; then
483    srcdir=..
484  fi
485else
486  ac_srcdir_defaulted=no
487fi
488if test ! -r $srcdir/$ac_unique_file; then
489  if test "$ac_srcdir_defaulted" = yes; then
490    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
491  else
492    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
493  fi
494fi
495srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
496
497# Prefer explicitly selected file to automatically selected ones.
498if test -z "$CONFIG_SITE"; then
499  if test "x$prefix" != xNONE; then
500    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
501  else
502    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
503  fi
504fi
505for ac_site_file in $CONFIG_SITE; do
506  if test -r "$ac_site_file"; then
507    echo "loading site script $ac_site_file"
508    . "$ac_site_file"
509  fi
510done
511
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# Extract the first word of "gcc", so it can be a program name with args.
535set dummy gcc; ac_word=$2
536echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
537echo "configure:538: checking for $ac_word" >&5
538if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
539  echo $ac_n "(cached) $ac_c" 1>&6
540else
541  if test -n "$CC"; then
542  ac_cv_prog_CC="$CC" # Let the user override the test.
543else
544  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
545  for ac_dir in $PATH; do
546    test -z "$ac_dir" && ac_dir=.
547    if test -f $ac_dir/$ac_word; then
548      ac_cv_prog_CC="gcc"
549      break
550    fi
551  done
552  IFS="$ac_save_ifs"
553fi
554fi
555CC="$ac_cv_prog_CC"
556if test -n "$CC"; then
557  echo "$ac_t""$CC" 1>&6
558else
559  echo "$ac_t""no" 1>&6
560fi
561
562if test -z "$CC"; then
563  # Extract the first word of "cc", so it can be a program name with args.
564set dummy cc; ac_word=$2
565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
566echo "configure:567: checking for $ac_word" >&5
567if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
568  echo $ac_n "(cached) $ac_c" 1>&6
569else
570  if test -n "$CC"; then
571  ac_cv_prog_CC="$CC" # Let the user override the test.
572else
573  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
574  ac_prog_rejected=no
575  for ac_dir in $PATH; do
576    test -z "$ac_dir" && ac_dir=.
577    if test -f $ac_dir/$ac_word; then
578      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
579        ac_prog_rejected=yes
580	continue
581      fi
582      ac_cv_prog_CC="cc"
583      break
584    fi
585  done
586  IFS="$ac_save_ifs"
587if test $ac_prog_rejected = yes; then
588  # We found a bogon in the path, so make sure we never use it.
589  set dummy $ac_cv_prog_CC
590  shift
591  if test $# -gt 0; then
592    # We chose a different compiler from the bogus one.
593    # However, it has the same basename, so the bogon will be chosen
594    # first if we set CC to just the basename; use the full file name.
595    shift
596    set dummy "$ac_dir/$ac_word" "$@"
597    shift
598    ac_cv_prog_CC="$@"
599  fi
600fi
601fi
602fi
603CC="$ac_cv_prog_CC"
604if test -n "$CC"; then
605  echo "$ac_t""$CC" 1>&6
606else
607  echo "$ac_t""no" 1>&6
608fi
609
610  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
611fi
612
613echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
614echo "configure:615: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
615
616ac_ext=c
617# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
618ac_cpp='$CPP $CPPFLAGS'
619ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
620ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
621cross_compiling=$ac_cv_prog_cc_cross
622
623cat > conftest.$ac_ext <<EOF
624#line 625 "configure"
625#include "confdefs.h"
626main(){return(0);}
627EOF
628if { (eval echo configure:629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
629  ac_cv_prog_cc_works=yes
630  # If we can't run a trivial program, we are probably using a cross compiler.
631  if (./conftest; exit) 2>/dev/null; then
632    ac_cv_prog_cc_cross=no
633  else
634    ac_cv_prog_cc_cross=yes
635  fi
636else
637  echo "configure: failed program was:" >&5
638  cat conftest.$ac_ext >&5
639  ac_cv_prog_cc_works=no
640fi
641rm -fr conftest*
642
643echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
644if test $ac_cv_prog_cc_works = no; then
645  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
646fi
647echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
648echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
649echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
650cross_compiling=$ac_cv_prog_cc_cross
651
652echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
653echo "configure:654: checking whether we are using GNU C" >&5
654if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
655  echo $ac_n "(cached) $ac_c" 1>&6
656else
657  cat > conftest.c <<EOF
658#ifdef __GNUC__
659  yes;
660#endif
661EOF
662if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
663  ac_cv_prog_gcc=yes
664else
665  ac_cv_prog_gcc=no
666fi
667fi
668
669echo "$ac_t""$ac_cv_prog_gcc" 1>&6
670
671if test $ac_cv_prog_gcc = yes; then
672  GCC=yes
673  test "${CFLAGS+set}" = set || CFLAGS="-O2"
674else
675  GCC=
676  test "${CFLAGS+set}" = set || CFLAGS="-O"
677fi
678
679echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
680echo "configure:681: checking how to run the C preprocessor" >&5
681# On Suns, sometimes $CPP names a directory.
682if test -n "$CPP" && test -d "$CPP"; then
683  CPP=
684fi
685if test -z "$CPP"; then
686if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
687  echo $ac_n "(cached) $ac_c" 1>&6
688else
689    # This must be in double quotes, not single quotes, because CPP may get
690  # substituted into the Makefile and "${CC-cc}" will confuse make.
691  CPP="${CC-cc} -E"
692  # On the NeXT, cc -E runs the code through the compiler's parser,
693  # not just through cpp.
694  cat > conftest.$ac_ext <<EOF
695#line 696 "configure"
696#include "confdefs.h"
697#include <assert.h>
698Syntax Error
699EOF
700ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
701{ (eval echo configure:702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
702ac_err=`grep -v '^ *+' conftest.out`
703if test -z "$ac_err"; then
704  :
705else
706  echo "$ac_err" >&5
707  echo "configure: failed program was:" >&5
708  cat conftest.$ac_ext >&5
709  rm -rf conftest*
710  CPP="${CC-cc} -E -traditional-cpp"
711  cat > conftest.$ac_ext <<EOF
712#line 713 "configure"
713#include "confdefs.h"
714#include <assert.h>
715Syntax Error
716EOF
717ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
718{ (eval echo configure:719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
719ac_err=`grep -v '^ *+' conftest.out`
720if test -z "$ac_err"; then
721  :
722else
723  echo "$ac_err" >&5
724  echo "configure: failed program was:" >&5
725  cat conftest.$ac_ext >&5
726  rm -rf conftest*
727  CPP=/lib/cpp
728fi
729rm -f conftest*
730fi
731rm -f conftest*
732  ac_cv_prog_CPP="$CPP"
733fi
734  CPP="$ac_cv_prog_CPP"
735else
736  ac_cv_prog_CPP="$CPP"
737fi
738echo "$ac_t""$CPP" 1>&6
739
740echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
741echo "configure:742: checking for function prototypes" >&5
742if eval "test \"`echo '$''{'ijg_cv_have_prototypes'+set}'`\" = set"; then
743  echo $ac_n "(cached) $ac_c" 1>&6
744else
745  cat > conftest.$ac_ext <<EOF
746#line 747 "configure"
747#include "confdefs.h"
748
749int testfunction (int arg1, int * arg2); /* check prototypes */
750struct methods_struct {		/* check method-pointer declarations */
751  int (*error_exit) (char *msgtext);
752  int (*trace_message) (char *msgtext);
753  int (*another_method) (void);
754};
755int testfunction (int arg1, int * arg2) /* check definitions */
756{ return arg2[arg1]; }
757int test2function (void)	/* check void arg list */
758{ return 0; }
759
760int main() {
761 
762; return 0; }
763EOF
764if { (eval echo configure:765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
765  rm -rf conftest*
766  ijg_cv_have_prototypes=yes
767else
768  echo "configure: failed program was:" >&5
769  cat conftest.$ac_ext >&5
770  rm -rf conftest*
771  ijg_cv_have_prototypes=no
772fi
773rm -f conftest*
774fi
775
776echo "$ac_t""$ijg_cv_have_prototypes" 1>&6
777if test $ijg_cv_have_prototypes = yes; then
778  cat >> confdefs.h <<\EOF
779#define HAVE_PROTOTYPES 
780EOF
781
782else
783  echo Your compiler does not seem to know about function prototypes.
784  echo Perhaps it needs a special switch to enable ANSI C mode.
785  echo If so, we recommend running configure like this:
786  echo "   ./configure  CC='cc -switch'"
787  echo where -switch is the proper switch.
788fi
789ac_safe=`echo "stddef.h" | sed 'y%./+-%__p_%'`
790echo $ac_n "checking for stddef.h""... $ac_c" 1>&6
791echo "configure:792: checking for stddef.h" >&5
792if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
793  echo $ac_n "(cached) $ac_c" 1>&6
794else
795  cat > conftest.$ac_ext <<EOF
796#line 797 "configure"
797#include "confdefs.h"
798#include <stddef.h>
799EOF
800ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
801{ (eval echo configure:802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
802ac_err=`grep -v '^ *+' conftest.out`
803if test -z "$ac_err"; then
804  rm -rf conftest*
805  eval "ac_cv_header_$ac_safe=yes"
806else
807  echo "$ac_err" >&5
808  echo "configure: failed program was:" >&5
809  cat conftest.$ac_ext >&5
810  rm -rf conftest*
811  eval "ac_cv_header_$ac_safe=no"
812fi
813rm -f conftest*
814fi
815if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
816  echo "$ac_t""yes" 1>&6
817  cat >> confdefs.h <<\EOF
818#define HAVE_STDDEF_H 
819EOF
820
821else
822  echo "$ac_t""no" 1>&6
823fi
824
825ac_safe=`echo "stdlib.h" | sed 'y%./+-%__p_%'`
826echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6
827echo "configure:828: checking for stdlib.h" >&5
828if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
829  echo $ac_n "(cached) $ac_c" 1>&6
830else
831  cat > conftest.$ac_ext <<EOF
832#line 833 "configure"
833#include "confdefs.h"
834#include <stdlib.h>
835EOF
836ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
837{ (eval echo configure:838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
838ac_err=`grep -v '^ *+' conftest.out`
839if test -z "$ac_err"; then
840  rm -rf conftest*
841  eval "ac_cv_header_$ac_safe=yes"
842else
843  echo "$ac_err" >&5
844  echo "configure: failed program was:" >&5
845  cat conftest.$ac_ext >&5
846  rm -rf conftest*
847  eval "ac_cv_header_$ac_safe=no"
848fi
849rm -f conftest*
850fi
851if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
852  echo "$ac_t""yes" 1>&6
853  cat >> confdefs.h <<\EOF
854#define HAVE_STDLIB_H 
855EOF
856
857else
858  echo "$ac_t""no" 1>&6
859fi
860
861ac_safe=`echo "string.h" | sed 'y%./+-%__p_%'`
862echo $ac_n "checking for string.h""... $ac_c" 1>&6
863echo "configure:864: checking for string.h" >&5
864if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
865  echo $ac_n "(cached) $ac_c" 1>&6
866else
867  cat > conftest.$ac_ext <<EOF
868#line 869 "configure"
869#include "confdefs.h"
870#include <string.h>
871EOF
872ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
873{ (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
874ac_err=`grep -v '^ *+' conftest.out`
875if test -z "$ac_err"; then
876  rm -rf conftest*
877  eval "ac_cv_header_$ac_safe=yes"
878else
879  echo "$ac_err" >&5
880  echo "configure: failed program was:" >&5
881  cat conftest.$ac_ext >&5
882  rm -rf conftest*
883  eval "ac_cv_header_$ac_safe=no"
884fi
885rm -f conftest*
886fi
887if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
888  echo "$ac_t""yes" 1>&6
889  :
890else
891  echo "$ac_t""no" 1>&6
892cat >> confdefs.h <<\EOF
893#define NEED_BSD_STRINGS 
894EOF
895
896fi
897
898echo $ac_n "checking for size_t""... $ac_c" 1>&6
899echo "configure:900: checking for size_t" >&5
900cat > conftest.$ac_ext <<EOF
901#line 902 "configure"
902#include "confdefs.h"
903
904#ifdef HAVE_STDDEF_H
905#include <stddef.h>
906#endif
907#ifdef HAVE_STDLIB_H
908#include <stdlib.h>
909#endif
910#include <stdio.h>
911#ifdef NEED_BSD_STRINGS
912#include <strings.h>
913#else
914#include <string.h>
915#endif
916typedef size_t my_size_t;
917
918int main() {
919 my_size_t foovar; 
920; return 0; }
921EOF
922if { (eval echo configure:923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
923  rm -rf conftest*
924  ijg_size_t_ok=yes
925else
926  echo "configure: failed program was:" >&5
927  cat conftest.$ac_ext >&5
928  rm -rf conftest*
929  ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h"
930fi
931rm -f conftest*
932echo "$ac_t""$ijg_size_t_ok" 1>&6
933if test "$ijg_size_t_ok" != yes; then
934ac_safe=`echo "sys/types.h" | sed 'y%./+-%__p_%'`
935echo $ac_n "checking for sys/types.h""... $ac_c" 1>&6
936echo "configure:937: checking for sys/types.h" >&5
937if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
938  echo $ac_n "(cached) $ac_c" 1>&6
939else
940  cat > conftest.$ac_ext <<EOF
941#line 942 "configure"
942#include "confdefs.h"
943#include <sys/types.h>
944EOF
945ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
946{ (eval echo configure:947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
947ac_err=`grep -v '^ *+' conftest.out`
948if test -z "$ac_err"; then
949  rm -rf conftest*
950  eval "ac_cv_header_$ac_safe=yes"
951else
952  echo "$ac_err" >&5
953  echo "configure: failed program was:" >&5
954  cat conftest.$ac_ext >&5
955  rm -rf conftest*
956  eval "ac_cv_header_$ac_safe=no"
957fi
958rm -f conftest*
959fi
960if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
961  echo "$ac_t""yes" 1>&6
962  cat >> confdefs.h <<\EOF
963#define NEED_SYS_TYPES_H 
964EOF
965
966cat > conftest.$ac_ext <<EOF
967#line 968 "configure"
968#include "confdefs.h"
969#include <sys/types.h>
970EOF
971if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
972  egrep "size_t" >/dev/null 2>&1; then
973  rm -rf conftest*
974  ijg_size_t_ok="size_t is in sys/types.h"
975else
976  rm -rf conftest*
977  ijg_size_t_ok=no
978fi
979rm -f conftest*
980
981else
982  echo "$ac_t""no" 1>&6
983ijg_size_t_ok=no
984fi
985
986echo "$ac_t""$ijg_size_t_ok" 1>&6
987if test "$ijg_size_t_ok" = no; then
988  echo Type size_t is not defined in any of the usual places.
989  echo Try putting '"typedef unsigned int size_t;"' in jconfig.h.
990fi
991fi
992echo $ac_n "checking for type unsigned char""... $ac_c" 1>&6
993echo "configure:994: checking for type unsigned char" >&5
994cat > conftest.$ac_ext <<EOF
995#line 996 "configure"
996#include "confdefs.h"
997
998int main() {
999 unsigned char un_char; 
1000; return 0; }
1001EOF
1002if { (eval echo configure:1003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1003  rm -rf conftest*
1004  echo "$ac_t""yes" 1>&6
1005cat >> confdefs.h <<\EOF
1006#define HAVE_UNSIGNED_CHAR 
1007EOF
1008
1009else
1010  echo "configure: failed program was:" >&5
1011  cat conftest.$ac_ext >&5
1012  rm -rf conftest*
1013  echo "$ac_t""no" 1>&6
1014fi
1015rm -f conftest*
1016echo $ac_n "checking for type unsigned short""... $ac_c" 1>&6
1017echo "configure:1018: checking for type unsigned short" >&5
1018cat > conftest.$ac_ext <<EOF
1019#line 1020 "configure"
1020#include "confdefs.h"
1021
1022int main() {
1023 unsigned short un_short; 
1024; return 0; }
1025EOF
1026if { (eval echo configure:1027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1027  rm -rf conftest*
1028  echo "$ac_t""yes" 1>&6
1029cat >> confdefs.h <<\EOF
1030#define HAVE_UNSIGNED_SHORT 
1031EOF
1032
1033else
1034  echo "configure: failed program was:" >&5
1035  cat conftest.$ac_ext >&5
1036  rm -rf conftest*
1037  echo "$ac_t""no" 1>&6
1038fi
1039rm -f conftest*
1040echo $ac_n "checking for type void""... $ac_c" 1>&6
1041echo "configure:1042: checking for type void" >&5
1042cat > conftest.$ac_ext <<EOF
1043#line 1044 "configure"
1044#include "confdefs.h"
1045
1046/* Caution: a C++ compiler will insist on valid prototypes */
1047typedef void * void_ptr;	/* check void * */
1048#ifdef HAVE_PROTOTYPES		/* check ptr to function returning void */
1049typedef void (*void_func) (int a, int b);
1050#else
1051typedef void (*void_func) ();
1052#endif
1053
1054#ifdef HAVE_PROTOTYPES		/* check void function result */
1055void test3function (void_ptr arg1, void_func arg2)
1056#else
1057void test3function (arg1, arg2)
1058     void_ptr arg1;
1059     void_func arg2;
1060#endif
1061{
1062  char * locptr = (char *) arg1; /* check casting to and from void * */
1063  arg1 = (void *) locptr;
1064  (*arg2) (1, 2);		/* check call of fcn returning void */
1065}
1066
1067int main() {
1068 
1069; return 0; }
1070EOF
1071if { (eval echo configure:1072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1072  rm -rf conftest*
1073  echo "$ac_t""yes" 1>&6
1074else
1075  echo "configure: failed program was:" >&5
1076  cat conftest.$ac_ext >&5
1077  rm -rf conftest*
1078  echo "$ac_t""no" 1>&6
1079cat >> confdefs.h <<\EOF
1080#define void char
1081EOF
1082
1083fi
1084rm -f conftest*
1085
1086echo $ac_n "checking for working const""... $ac_c" 1>&6
1087echo "configure:1088: checking for working const" >&5
1088if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1089  echo $ac_n "(cached) $ac_c" 1>&6
1090else
1091  cat > conftest.$ac_ext <<EOF
1092#line 1093 "configure"
1093#include "confdefs.h"
1094
1095int main() {
1096
1097/* Ultrix mips cc rejects this.  */
1098typedef int charset[2]; const charset x;
1099/* SunOS 4.1.1 cc rejects this.  */
1100char const *const *ccp;
1101char **p;
1102/* NEC SVR4.0.2 mips cc rejects this.  */
1103struct point {int x, y;};
1104static struct point const zero = {0,0};
1105/* AIX XL C 1.02.0.0 rejects this.
1106   It does not let you subtract one const X* pointer from another in an arm
1107   of an if-expression whose if-part is not a constant expression */
1108const char *g = "string";
1109ccp = &g + (g ? g-g : 0);
1110/* HPUX 7.0 cc rejects these. */
1111++ccp;
1112p = (char**) ccp;
1113ccp = (char const *const *) p;
1114{ /* SCO 3.2v4 cc rejects this.  */
1115  char *t;
1116  char const *s = 0 ? (char *) 0 : (char const *) 0;
1117
1118  *t++ = 0;
1119}
1120{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1121  int x[] = {25, 17};
1122  const int *foo = &x[0];
1123  ++foo;
1124}
1125{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1126  typedef const int *iptr;
1127  iptr p = 0;
1128  ++p;
1129}
1130{ /* AIX XL C 1.02.0.0 rejects this saying
1131     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1132  struct s { int j; const int *ap[3]; };
1133  struct s *b; b->j = 5;
1134}
1135{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1136  const int foo = 10;
1137}
1138
1139; return 0; }
1140EOF
1141if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1142  rm -rf conftest*
1143  ac_cv_c_const=yes
1144else
1145  echo "configure: failed program was:" >&5
1146  cat conftest.$ac_ext >&5
1147  rm -rf conftest*
1148  ac_cv_c_const=no
1149fi
1150rm -f conftest*
1151fi
1152
1153echo "$ac_t""$ac_cv_c_const" 1>&6
1154if test $ac_cv_c_const = no; then
1155  cat >> confdefs.h <<\EOF
1156#define const 
1157EOF
1158
1159fi
1160
1161echo $ac_n "checking for inline""... $ac_c" 1>&6
1162echo "configure:1163: checking for inline" >&5
1163ijg_cv_inline=""
1164cat > conftest.$ac_ext <<EOF
1165#line 1166 "configure"
1166#include "confdefs.h"
1167
1168int main() {
1169} __inline__ int foo() { return 0; }
1170int bar() { return foo();
1171; return 0; }
1172EOF
1173if { (eval echo configure:1174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1174  rm -rf conftest*
1175  ijg_cv_inline="__inline__"
1176else
1177  echo "configure: failed program was:" >&5
1178  cat conftest.$ac_ext >&5
1179  rm -rf conftest*
1180  cat > conftest.$ac_ext <<EOF
1181#line 1182 "configure"
1182#include "confdefs.h"
1183
1184int main() {
1185} __inline int foo() { return 0; }
1186int bar() { return foo();
1187; return 0; }
1188EOF
1189if { (eval echo configure:1190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1190  rm -rf conftest*
1191  ijg_cv_inline="__inline"
1192else
1193  echo "configure: failed program was:" >&5
1194  cat conftest.$ac_ext >&5
1195  rm -rf conftest*
1196  cat > conftest.$ac_ext <<EOF
1197#line 1198 "configure"
1198#include "confdefs.h"
1199
1200int main() {
1201} inline int foo() { return 0; }
1202int bar() { return foo();
1203; return 0; }
1204EOF
1205if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1206  rm -rf conftest*
1207  ijg_cv_inline="inline"
1208else
1209  echo "configure: failed program was:" >&5
1210  cat conftest.$ac_ext >&5
1211fi
1212rm -f conftest*
1213fi
1214rm -f conftest*
1215fi
1216rm -f conftest*
1217echo "$ac_t""$ijg_cv_inline" 1>&6
1218cat >> confdefs.h <<EOF
1219#define INLINE $ijg_cv_inline
1220EOF
1221
1222echo $ac_n "checking for broken incomplete types""... $ac_c" 1>&6
1223echo "configure:1224: checking for broken incomplete types" >&5
1224cat > conftest.$ac_ext <<EOF
1225#line 1226 "configure"
1226#include "confdefs.h"
1227 typedef struct undefined_structure * undef_struct_ptr; 
1228int main() {
1229
1230; return 0; }
1231EOF
1232if { (eval echo configure:1233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1233  rm -rf conftest*
1234  echo "$ac_t""ok" 1>&6
1235else
1236  echo "configure: failed program was:" >&5
1237  cat conftest.$ac_ext >&5
1238  rm -rf conftest*
1239  echo "$ac_t""broken" 1>&6
1240cat >> confdefs.h <<\EOF
1241#define INCOMPLETE_TYPES_BROKEN 
1242EOF
1243
1244fi
1245rm -f conftest*
1246echo $ac_n "checking for short external names""... $ac_c" 1>&6
1247echo "configure:1248: checking for short external names" >&5
1248cat > conftest.$ac_ext <<EOF
1249#line 1250 "configure"
1250#include "confdefs.h"
1251
1252int possibly_duplicate_function () { return 0; }
1253int possibly_dupli_function () { return 1; }
1254
1255int main() {
1256 
1257; return 0; }
1258EOF
1259if { (eval echo configure:1260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1260  rm -rf conftest*
1261  echo "$ac_t""ok" 1>&6
1262else
1263  echo "configure: failed program was:" >&5
1264  cat conftest.$ac_ext >&5
1265  rm -rf conftest*
1266  echo "$ac_t""short" 1>&6
1267cat >> confdefs.h <<\EOF
1268#define NEED_SHORT_EXTERNAL_NAMES 
1269EOF
1270
1271fi
1272rm -f conftest*
1273echo $ac_n "checking to see if char is signed""... $ac_c" 1>&6
1274echo "configure:1275: checking to see if char is signed" >&5
1275if test "$cross_compiling" = yes; then
1276  echo Assuming that char is signed on target machine.
1277echo If it is unsigned, this will be a little bit inefficient.
1278
1279else
1280  cat > conftest.$ac_ext <<EOF
1281#line 1282 "configure"
1282#include "confdefs.h"
1283
1284#ifdef HAVE_PROTOTYPES
1285int is_char_signed (int arg)
1286#else
1287int is_char_signed (arg)
1288     int arg;
1289#endif
1290{
1291  if (arg == 189) {		/* expected result for unsigned char */
1292    return 0;			/* type char is unsigned */
1293  }
1294  else if (arg != -67) {	/* expected result for signed char */
1295    printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n");
1296    printf("I fear the JPEG software will not work at all.\n\n");
1297  }
1298  return 1;			/* assume char is signed otherwise */
1299}
1300char signed_char_check = (char) (-67);
1301main() {
1302  exit(is_char_signed((int) signed_char_check));
1303}
1304EOF
1305if { (eval echo configure:1306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1306then
1307  echo "$ac_t""no" 1>&6
1308cat >> confdefs.h <<\EOF
1309#define CHAR_IS_UNSIGNED 
1310EOF
1311
1312else
1313  echo "configure: failed program was:" >&5
1314  cat conftest.$ac_ext >&5
1315  rm -fr conftest*
1316  echo "$ac_t""yes" 1>&6
1317fi
1318rm -fr conftest*
1319fi
1320
1321echo $ac_n "checking to see if right shift is signed""... $ac_c" 1>&6
1322echo "configure:1323: checking to see if right shift is signed" >&5
1323if test "$cross_compiling" = yes; then
1324  echo "$ac_t""Assuming that right shift is signed on target machine." 1>&6
1325else
1326  cat > conftest.$ac_ext <<EOF
1327#line 1328 "configure"
1328#include "confdefs.h"
1329
1330#ifdef HAVE_PROTOTYPES
1331int is_shifting_signed (long arg)
1332#else
1333int is_shifting_signed (arg)
1334     long arg;
1335#endif
1336/* See whether right-shift on a long is signed or not. */
1337{
1338  long res = arg >> 4;
1339
1340  if (res == -0x7F7E80CL) {	/* expected result for signed shift */
1341    return 1;			/* right shift is signed */
1342  }
1343  /* see if unsigned-shift hack will fix it. */
1344  /* we can't just test exact value since it depends on width of long... */
1345  res |= (~0L) << (32-4);
1346  if (res == -0x7F7E80CL) {	/* expected result now? */
1347    return 0;			/* right shift is unsigned */
1348  }
1349  printf("Right shift isn't acting as I expect it to.\n");
1350  printf("I fear the JPEG software will not work at all.\n\n");
1351  return 0;			/* try it with unsigned anyway */
1352}
1353main() {
1354  exit(is_shifting_signed(-0x7F7E80B1L));
1355}
1356EOF
1357if { (eval echo configure:1358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1358then
1359  echo "$ac_t""no" 1>&6
1360cat >> confdefs.h <<\EOF
1361#define RIGHT_SHIFT_IS_UNSIGNED 
1362EOF
1363
1364else
1365  echo "configure: failed program was:" >&5
1366  cat conftest.$ac_ext >&5
1367  rm -fr conftest*
1368  echo "$ac_t""yes" 1>&6
1369fi
1370rm -fr conftest*
1371fi
1372
1373echo $ac_n "checking to see if fopen accepts b spec""... $ac_c" 1>&6
1374echo "configure:1375: checking to see if fopen accepts b spec" >&5
1375if test "$cross_compiling" = yes; then
1376  echo "$ac_t""Assuming that it does." 1>&6
1377else
1378  cat > conftest.$ac_ext <<EOF
1379#line 1380 "configure"
1380#include "confdefs.h"
1381
1382#include <stdio.h>
1383main() {
1384  if (fopen("conftestdata", "wb") != NULL)
1385    exit(0);
1386  exit(1);
1387}
1388EOF
1389if { (eval echo configure:1390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1390then
1391  echo "$ac_t""yes" 1>&6
1392else
1393  echo "configure: failed program was:" >&5
1394  cat conftest.$ac_ext >&5
1395  rm -fr conftest*
1396  echo "$ac_t""no" 1>&6
1397cat >> confdefs.h <<\EOF
1398#define DONT_USE_B_MODE 
1399EOF
1400
1401fi
1402rm -fr conftest*
1403fi
1404
1405ac_aux_dir=
1406for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1407  if test -f $ac_dir/install-sh; then
1408    ac_aux_dir=$ac_dir
1409    ac_install_sh="$ac_aux_dir/install-sh -c"
1410    break
1411  elif test -f $ac_dir/install.sh; then
1412    ac_aux_dir=$ac_dir
1413    ac_install_sh="$ac_aux_dir/install.sh -c"
1414    break
1415  fi
1416done
1417if test -z "$ac_aux_dir"; then
1418  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1419fi
1420ac_config_guess=$ac_aux_dir/config.guess
1421ac_config_sub=$ac_aux_dir/config.sub
1422ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1423
1424# Find a good install program.  We prefer a C program (faster),
1425# so one script is as good as another.  But avoid the broken or
1426# incompatible versions:
1427# SysV /etc/install, /usr/sbin/install
1428# SunOS /usr/etc/install
1429# IRIX /sbin/install
1430# AIX /bin/install
1431# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1432# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1433# ./install, which can be erroneously created by make from ./install.sh.
1434echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1435echo "configure:1436: checking for a BSD compatible install" >&5
1436if test -z "$INSTALL"; then
1437if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1438  echo $ac_n "(cached) $ac_c" 1>&6
1439else
1440    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1441  for ac_dir in $PATH; do
1442    # Account for people who put trailing slashes in PATH elements.
1443    case "$ac_dir/" in
1444    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1445    *)
1446      # OSF1 and SCO ODT 3.0 have their own names for install.
1447      for ac_prog in ginstall installbsd scoinst install; do
1448        if test -f $ac_dir/$ac_prog; then
1449	  if test $ac_prog = install &&
1450            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1451	    # AIX install.  It has an incompatible calling convention.
1452	    # OSF/1 installbsd also uses dspmsg, but is usable.
1453	    :
1454	  else
1455	    ac_cv_path_install="$ac_dir/$ac_prog -c"
1456	    break 2
1457	  fi
1458	fi
1459      done
1460      ;;
1461    esac
1462  done
1463  IFS="$ac_save_IFS"
1464
1465fi
1466  if test "${ac_cv_path_install+set}" = set; then
1467    INSTALL="$ac_cv_path_install"
1468  else
1469    # As a last resort, use the slow shell script.  We don't cache a
1470    # path for INSTALL within a source directory, because that will
1471    # break other packages using the cache if that directory is
1472    # removed, or if the path is relative.
1473    INSTALL="$ac_install_sh"
1474  fi
1475fi
1476echo "$ac_t""$INSTALL" 1>&6
1477
1478# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1479# It thinks the first close brace ends the variable substitution.
1480test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1481
1482test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1483
1484# Extract the first word of "ranlib", so it can be a program name with args.
1485set dummy ranlib; ac_word=$2
1486echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1487echo "configure:1488: checking for $ac_word" >&5
1488if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1489  echo $ac_n "(cached) $ac_c" 1>&6
1490else
1491  if test -n "$RANLIB"; then
1492  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1493else
1494  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1495  for ac_dir in $PATH; do
1496    test -z "$ac_dir" && ac_dir=.
1497    if test -f $ac_dir/$ac_word; then
1498      ac_cv_prog_RANLIB="ranlib"
1499      break
1500    fi
1501  done
1502  IFS="$ac_save_ifs"
1503  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1504fi
1505fi
1506RANLIB="$ac_cv_prog_RANLIB"
1507if test -n "$RANLIB"; then
1508  echo "$ac_t""$RANLIB" 1>&6
1509else
1510  echo "$ac_t""no" 1>&6
1511fi
1512
1513
1514# Decide whether to use libtool,
1515# and if so whether to build shared, static, or both flavors of library.
1516LTSHARED="no"
1517# Check whether --enable-shared or --disable-shared was given.
1518if test "${enable_shared+set}" = set; then
1519  enableval="$enable_shared"
1520  LTSHARED="$enableval"
1521fi
1522
1523LTSTATIC="no"
1524# Check whether --enable-static or --disable-static was given.
1525if test "${enable_static+set}" = set; then
1526  enableval="$enable_static"
1527  LTSTATIC="$enableval"
1528fi
1529
1530if test "x$LTSHARED" != xno  -o  "x$LTSTATIC" != xno; then
1531  USELIBTOOL="yes"
1532  LIBTOOL="./libtool"
1533  O="lo"
1534  A="la"
1535  LN='$(LIBTOOL) --mode=link $(CC)'
1536  INSTALL_LIB='$(LIBTOOL) --mode=install ${INSTALL}'
1537  INSTALL_PROGRAM="\$(LIBTOOL) --mode=install $INSTALL_PROGRAM"
1538else
1539  USELIBTOOL="no"
1540  LIBTOOL=""
1541  O="o"
1542  A="a"
1543  LN='$(CC)'
1544  INSTALL_LIB="$INSTALL_DATA"
1545fi
1546
1547
1548
1549
1550
1551
1552# Configure libtool if needed.
1553if test $USELIBTOOL = yes; then
1554  disable_shared=
1555  disable_static=
1556  if test "x$LTSHARED" = xno; then
1557    disable_shared="--disable-shared"
1558  fi
1559  if test "x$LTSTATIC" = xno; then
1560    disable_static="--disable-static"
1561  fi
1562  $srcdir/ltconfig $disable_shared $disable_static $srcdir/ltmain.sh
1563fi
1564
1565# Select memory manager depending on user input.
1566# If no "-enable-maxmem", use jmemnobs
1567MEMORYMGR='jmemnobs.$(O)'
1568MAXMEM="no"
1569# Check whether --enable-maxmem or --disable-maxmem was given.
1570if test "${enable_maxmem+set}" = set; then
1571  enableval="$enable_maxmem"
1572  MAXMEM="$enableval"
1573fi
1574
1575# support --with-maxmem for backwards compatibility with IJG V5.
1576# Check whether --with-maxmem or --without-maxmem was given.
1577if test "${with_maxmem+set}" = set; then
1578  withval="$with_maxmem"
1579  MAXMEM="$withval"
1580fi
1581
1582if test "x$MAXMEM" = xyes; then
1583  MAXMEM=1
1584fi
1585if test "x$MAXMEM" != xno; then
1586  if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then
1587    { echo "configure: error: non-numeric argument to --enable-maxmem" 1>&2; exit 1; }
1588  fi
1589  DEFAULTMAXMEM=`expr $MAXMEM \* 1048576`
1590cat >> confdefs.h <<EOF
1591#define DEFAULT_MAX_MEM ${DEFAULTMAXMEM}
1592EOF
1593
1594echo $ac_n "checking for 'tmpfile()'""... $ac_c" 1>&6
1595echo "configure:1596: checking for 'tmpfile()'" >&5
1596cat > conftest.$ac_ext <<EOF
1597#line 1598 "configure"
1598#include "confdefs.h"
1599#include <stdio.h>
1600int main() {
1601 FILE * tfile = tmpfile(); 
1602; return 0; }
1603EOF
1604if { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1605  rm -rf conftest*
1606  echo "$ac_t""yes" 1>&6
1607MEMORYMGR='jmemansi.$(O)'
1608else
1609  echo "configure: failed program was:" >&5
1610  cat conftest.$ac_ext >&5
1611  rm -rf conftest*
1612  echo "$ac_t""no" 1>&6
1613MEMORYMGR='jmemname.$(O)'
1614cat >> confdefs.h <<\EOF
1615#define NEED_SIGNAL_CATCHER 
1616EOF
1617
1618echo $ac_n "checking for 'mktemp()'""... $ac_c" 1>&6
1619echo "configure:1620: checking for 'mktemp()'" >&5
1620cat > conftest.$ac_ext <<EOF
1621#line 1622 "configure"
1622#include "confdefs.h"
1623
1624int main() {
1625 char fname[80]; mktemp(fname); 
1626; return 0; }
1627EOF
1628if { (eval echo configure:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1629  rm -rf conftest*
1630  echo "$ac_t""yes" 1>&6
1631else
1632  echo "configure: failed program was:" >&5
1633  cat conftest.$ac_ext >&5
1634  rm -rf conftest*
1635  echo "$ac_t""no" 1>&6
1636cat >> confdefs.h <<\EOF
1637#define NO_MKTEMP 
1638EOF
1639
1640fi
1641rm -f conftest*
1642fi
1643rm -f conftest*
1644fi
1645
1646
1647# Extract the library version ID from jpeglib.h.
1648echo $ac_n "checking libjpeg version number""... $ac_c" 1>&6
1649echo "configure:1650: checking libjpeg version number" >&5
1650JPEG_LIB_VERSION=`sed -e '/^#define JPEG_LIB_VERSION/!d' -e 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' $srcdir/jpeglib.h`
1651echo "$ac_t""$JPEG_LIB_VERSION" 1>&6
1652
1653
1654# Prepare to massage makefile.cfg correctly.
1655if test $ijg_cv_have_prototypes = yes; then
1656  A2K_DEPS=""
1657  COM_A2K="# "
1658else
1659  A2K_DEPS="ansi2knr"
1660  COM_A2K=""
1661fi
1662
1663
1664# ansi2knr needs -DBSD if string.h is missing
1665if test $ac_cv_header_string_h = no; then
1666  ANSI2KNRFLAGS="-DBSD"
1667else
1668  ANSI2KNRFLAGS=""
1669fi
1670
1671# Substitutions to enable or disable libtool-related stuff
1672if test $USELIBTOOL = yes -a $ijg_cv_have_prototypes = yes; then
1673  COM_LT=""
1674else
1675  COM_LT="# "
1676fi
1677
1678if test "x$LTSHARED" != xno; then
1679  FORCE_INSTALL_LIB="install-lib"
1680else
1681  FORCE_INSTALL_LIB=""
1682fi
1683
1684# Set up -I directives
1685if test "x$srcdir" = x.; then
1686  INCLUDEFLAGS='-I$(srcdir)'
1687else
1688  INCLUDEFLAGS='-I. -I$(srcdir)'
1689fi
1690
1691trap '' 1 2 15
1692
1693trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1694
1695test "x$prefix" = xNONE && prefix=$ac_default_prefix
1696# Let make expand exec_prefix.
1697test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1698
1699# Any assignment to VPATH causes Sun make to only execute
1700# the first set of double-colon rules, so remove it if not needed.
1701# If there is a colon in the path, we need to keep it.
1702if test "x$srcdir" = x.; then
1703  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
1704fi
1705
1706trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1707
1708DEFS=-DHAVE_CONFIG_H
1709
1710# Without the "./", some shells look in PATH for config.status.
1711: ${CONFIG_STATUS=./config.status}
1712
1713echo creating $CONFIG_STATUS
1714rm -f $CONFIG_STATUS
1715cat > $CONFIG_STATUS <<EOF
1716#! /bin/sh
1717# Generated automatically by configure.
1718# Run this file to recreate the current configuration.
1719# This directory was configured as follows,
1720# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1721#
1722# $0 $ac_configure_args
1723#
1724# Compiler output produced by configure, useful for debugging
1725# configure, is in ./config.log if it exists.
1726
1727ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1728for ac_option
1729do
1730  case "\$ac_option" in
1731  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1732    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1733    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1734  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1735    echo "$CONFIG_STATUS generated by autoconf version 2.12"
1736    exit 0 ;;
1737  -help | --help | --hel | --he | --h)
1738    echo "\$ac_cs_usage"; exit 0 ;;
1739  *) echo "\$ac_cs_usage"; exit 1 ;;
1740  esac
1741done
1742
1743ac_given_srcdir=$srcdir
1744ac_given_INSTALL="$INSTALL"
1745
1746trap 'rm -fr `echo "Makefile:makefile.cfg jconfig.h:jconfig.cfg" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1747EOF
1748cat >> $CONFIG_STATUS <<EOF
1749
1750# Protect against being on the right side of a sed subst in config.status.
1751sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1752 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1753$ac_vpsub
1754$extrasub
1755s%@CFLAGS@%$CFLAGS%g
1756s%@CPPFLAGS@%$CPPFLAGS%g
1757s%@CXXFLAGS@%$CXXFLAGS%g
1758s%@DEFS@%$DEFS%g
1759s%@LDFLAGS@%$LDFLAGS%g
1760s%@LIBS@%$LIBS%g
1761s%@exec_prefix@%$exec_prefix%g
1762s%@prefix@%$prefix%g
1763s%@program_transform_name@%$program_transform_name%g
1764s%@bindir@%$bindir%g
1765s%@sbindir@%$sbindir%g
1766s%@libexecdir@%$libexecdir%g
1767s%@datadir@%$datadir%g
1768s%@sysconfdir@%$sysconfdir%g
1769s%@sharedstatedir@%$sharedstatedir%g
1770s%@localstatedir@%$localstatedir%g
1771s%@libdir@%$libdir%g
1772s%@includedir@%$includedir%g
1773s%@oldincludedir@%$oldincludedir%g
1774s%@infodir@%$infodir%g
1775s%@mandir@%$mandir%g
1776s%@CC@%$CC%g
1777s%@CPP@%$CPP%g
1778s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1779s%@INSTALL_DATA@%$INSTALL_DATA%g
1780s%@RANLIB@%$RANLIB%g
1781s%@LIBTOOL@%$LIBTOOL%g
1782s%@O@%$O%g
1783s%@A@%$A%g
1784s%@LN@%$LN%g
1785s%@INSTALL_LIB@%$INSTALL_LIB%g
1786s%@MEMORYMGR@%$MEMORYMGR%g
1787s%@JPEG_LIB_VERSION@%$JPEG_LIB_VERSION%g
1788s%@A2K_DEPS@%$A2K_DEPS%g
1789s%@COM_A2K@%$COM_A2K%g
1790s%@ANSI2KNRFLAGS@%$ANSI2KNRFLAGS%g
1791s%@COM_LT@%$COM_LT%g
1792s%@FORCE_INSTALL_LIB@%$FORCE_INSTALL_LIB%g
1793s%@INCLUDEFLAGS@%$INCLUDEFLAGS%g
1794
1795CEOF
1796EOF
1797
1798cat >> $CONFIG_STATUS <<\EOF
1799
1800# Split the substitutions into bite-sized pieces for seds with
1801# small command number limits, like on Digital OSF/1 and HP-UX.
1802ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1803ac_file=1 # Number of current file.
1804ac_beg=1 # First line for current file.
1805ac_end=$ac_max_sed_cmds # Line after last line for current file.
1806ac_more_lines=:
1807ac_sed_cmds=""
1808while $ac_more_lines; do
1809  if test $ac_beg -gt 1; then
1810    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1811  else
1812    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1813  fi
1814  if test ! -s conftest.s$ac_file; then
1815    ac_more_lines=false
1816    rm -f conftest.s$ac_file
1817  else
1818    if test -z "$ac_sed_cmds"; then
1819      ac_sed_cmds="sed -f conftest.s$ac_file"
1820    else
1821      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1822    fi
1823    ac_file=`expr $ac_file + 1`
1824    ac_beg=$ac_end
1825    ac_end=`expr $ac_end + $ac_max_sed_cmds`
1826  fi
1827done
1828if test -z "$ac_sed_cmds"; then
1829  ac_sed_cmds=cat
1830fi
1831EOF
1832
1833cat >> $CONFIG_STATUS <<EOF
1834
1835CONFIG_FILES=\${CONFIG_FILES-"Makefile:makefile.cfg"}
1836EOF
1837cat >> $CONFIG_STATUS <<\EOF
1838for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1839  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1840  case "$ac_file" in
1841  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1842       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1843  *) ac_file_in="${ac_file}.in" ;;
1844  esac
1845
1846  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1847
1848  # Remove last slash and all that follows it.  Not all systems have dirname.
1849  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1850  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1851    # The file is in a subdirectory.
1852    test ! -d "$ac_dir" && mkdir "$ac_dir"
1853    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1854    # A "../" for each directory in $ac_dir_suffix.
1855    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1856  else
1857    ac_dir_suffix= ac_dots=
1858  fi
1859
1860  case "$ac_given_srcdir" in
1861  .)  srcdir=.
1862      if test -z "$ac_dots"; then top_srcdir=.
1863      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1864  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1865  *) # Relative path.
1866    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1867    top_srcdir="$ac_dots$ac_given_srcdir" ;;
1868  esac
1869
1870  case "$ac_given_INSTALL" in
1871  [/$]*) INSTALL="$ac_given_INSTALL" ;;
1872  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1873  esac
1874
1875  echo creating "$ac_file"
1876  rm -f "$ac_file"
1877  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1878  case "$ac_file" in
1879  *Makefile*) ac_comsub="1i\\
1880# $configure_input" ;;
1881  *) ac_comsub= ;;
1882  esac
1883
1884  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1885  sed -e "$ac_comsub
1886s%@configure_input@%$configure_input%g
1887s%@srcdir@%$srcdir%g
1888s%@top_srcdir@%$top_srcdir%g
1889s%@INSTALL@%$INSTALL%g
1890" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1891fi; done
1892rm -f conftest.s*
1893
1894# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1895# NAME is the cpp macro being defined and VALUE is the value it is being given.
1896#
1897# ac_d sets the value in "#define NAME VALUE" lines.
1898ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
1899ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
1900ac_dC='\3'
1901ac_dD='%g'
1902# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1903ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
1904ac_uB='\([ 	]\)%\1#\2define\3'
1905ac_uC=' '
1906ac_uD='\4%g'
1907# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1908ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
1909ac_eB='$%\1#\2define\3'
1910ac_eC=' '
1911ac_eD='%g'
1912
1913if test "${CONFIG_HEADERS+set}" != set; then
1914EOF
1915cat >> $CONFIG_STATUS <<EOF
1916  CONFIG_HEADERS="jconfig.h:jconfig.cfg"
1917EOF
1918cat >> $CONFIG_STATUS <<\EOF
1919fi
1920for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1921  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1922  case "$ac_file" in
1923  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1924       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1925  *) ac_file_in="${ac_file}.in" ;;
1926  esac
1927
1928  echo creating $ac_file
1929
1930  rm -f conftest.frag conftest.in conftest.out
1931  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1932  cat $ac_file_inputs > conftest.in
1933
1934EOF
1935
1936# Transform confdefs.h into a sed script conftest.vals that substitutes
1937# the proper values into config.h.in to produce config.h.  And first:
1938# Protect against being on the right side of a sed subst in config.status.
1939# Protect against being in an unquoted here document in config.status.
1940rm -f conftest.vals
1941cat > conftest.hdr <<\EOF
1942s/[\\&%]/\\&/g
1943s%[\\$`]%\\&%g
1944s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1945s%ac_d%ac_u%gp
1946s%ac_u%ac_e%gp
1947EOF
1948sed -n -f conftest.hdr confdefs.h > conftest.vals
1949rm -f conftest.hdr
1950
1951# This sed command replaces #undef with comments.  This is necessary, for
1952# example, in the case of _POSIX_SOURCE, which is predefined and required
1953# on some systems where configure will not decide to define it.
1954cat >> conftest.vals <<\EOF
1955EOF
1956
1957# Break up conftest.vals because some shells have a limit on
1958# the size of here documents, and old seds have small limits too.
1959
1960rm -f conftest.tail
1961while :
1962do
1963  ac_lines=`grep -c . conftest.vals`
1964  # grep -c gives empty output for an empty file on some AIX systems.
1965  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1966  # Write a limited-size here document to conftest.frag.
1967  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1968  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1969  echo 'CEOF
1970  sed -f conftest.frag conftest.in > conftest.out
1971  rm -f conftest.in
1972  mv conftest.out conftest.in
1973' >> $CONFIG_STATUS
1974  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1975  rm -f conftest.vals
1976  mv conftest.tail conftest.vals
1977done
1978rm -f conftest.vals
1979
1980cat >> $CONFIG_STATUS <<\EOF
1981  rm -f conftest.frag conftest.h
1982  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1983  cat conftest.in >> conftest.h
1984  rm -f conftest.in
1985  if cmp -s $ac_file conftest.h 2>/dev/null; then
1986    echo "$ac_file is unchanged"
1987    rm -f conftest.h
1988  else
1989    # Remove last slash and all that follows it.  Not all systems have dirname.
1990      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1991      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1992      # The file is in a subdirectory.
1993      test ! -d "$ac_dir" && mkdir "$ac_dir"
1994    fi
1995    rm -f $ac_file
1996    mv conftest.h $ac_file
1997  fi
1998fi; done
1999
2000EOF
2001cat >> $CONFIG_STATUS <<EOF
2002
2003EOF
2004cat >> $CONFIG_STATUS <<\EOF
2005
2006exit 0
2007EOF
2008chmod +x $CONFIG_STATUS
2009rm -fr confdefs* $ac_clean_files
2010test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2011
2012