0ab25dc36898d59bb301b5a07c76493d5289f53e
[jigdo.git] / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
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:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-libdb            Use libdb3 (necessary for jigdo-file's cache) [yes]"
16 ac_help="$ac_help
17   --with-gui              Build the jigdo GUI application [yes]"
18 ac_help="$ac_help
19   --with-uint64=TYPE      Specify unsigned type of at least 64 bits [auto]
20                           (Replace spaces with underscores in TYPE)"
21 ac_help="$ac_help
22   --enable-nls            Use Native Language Support [yes]"
23 ac_help="$ac_help
24   --enable-debug          Compile in lots of additional debugging code [no]"
25 ac_help="$ac_help
26   --enable-ccmalloc       Use the ccmalloc memory leak detector [no]"
27
28 # Initialize some variables set by options.
29 # The variables have the same names as the options, with
30 # dashes changed to underlines.
31 build=NONE
32 cache_file=./config.cache
33 exec_prefix=NONE
34 host=NONE
35 no_create=
36 nonopt=NONE
37 no_recursion=
38 prefix=NONE
39 program_prefix=NONE
40 program_suffix=NONE
41 program_transform_name=s,x,x,
42 silent=
43 site=
44 srcdir=
45 target=NONE
46 verbose=
47 x_includes=NONE
48 x_libraries=NONE
49 bindir='${exec_prefix}/bin'
50 sbindir='${exec_prefix}/sbin'
51 libexecdir='${exec_prefix}/libexec'
52 datadir='${prefix}/share'
53 sysconfdir='${prefix}/etc'
54 sharedstatedir='${prefix}/com'
55 localstatedir='${prefix}/var'
56 libdir='${exec_prefix}/lib'
57 includedir='${prefix}/include'
58 oldincludedir='/usr/include'
59 infodir='${prefix}/info'
60 mandir='${prefix}/man'
61
62 # Initialize some other variables.
63 subdirs=
64 MFLAGS= MAKEFLAGS=
65 SHELL=${CONFIG_SHELL-/bin/sh}
66 # Maximum number of lines to put in a shell here document.
67 ac_max_here_lines=12
68
69 ac_prev=
70 for ac_option
71 do
72
73   # If the previous option needs an argument, assign it.
74   if test -n "$ac_prev"; then
75     eval "$ac_prev=\$ac_option"
76     ac_prev=
77     continue
78   fi
79
80   case "$ac_option" in
81   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
82   *) ac_optarg= ;;
83   esac
84
85   # Accept the important Cygnus configure options, so we can diagnose typos.
86
87   case "$ac_option" in
88
89   -bindir | --bindir | --bindi | --bind | --bin | --bi)
90     ac_prev=bindir ;;
91   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
92     bindir="$ac_optarg" ;;
93
94   -build | --build | --buil | --bui | --bu)
95     ac_prev=build ;;
96   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
97     build="$ac_optarg" ;;
98
99   -cache-file | --cache-file | --cache-fil | --cache-fi \
100   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
101     ac_prev=cache_file ;;
102   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
103   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
104     cache_file="$ac_optarg" ;;
105
106   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
107     ac_prev=datadir ;;
108   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
109   | --da=*)
110     datadir="$ac_optarg" ;;
111
112   -disable-* | --disable-*)
113     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
114     # Reject names that are not valid shell variable names.
115     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
116       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117     fi
118     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119     eval "enable_${ac_feature}=no" ;;
120
121   -enable-* | --enable-*)
122     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
123     # Reject names that are not valid shell variable names.
124     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
125       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126     fi
127     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128     case "$ac_option" in
129       *=*) ;;
130       *) ac_optarg=yes ;;
131     esac
132     eval "enable_${ac_feature}='$ac_optarg'" ;;
133
134   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
135   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
136   | --exec | --exe | --ex)
137     ac_prev=exec_prefix ;;
138   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
139   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
140   | --exec=* | --exe=* | --ex=*)
141     exec_prefix="$ac_optarg" ;;
142
143   -gas | --gas | --ga | --g)
144     # Obsolete; use --with-gas.
145     with_gas=yes ;;
146
147   -help | --help | --hel | --he)
148     # Omit some internal or obsolete options to make the list less imposing.
149     # This message is too long to be a string in the A/UX 3.1 sh.
150     cat << EOF
151 Usage: configure [options] [host]
152 Options: [defaults in brackets after descriptions]
153 Configuration:
154   --cache-file=FILE       cache test results in FILE
155   --help                  print this message
156   --no-create             do not create output files
157   --quiet, --silent       do not print \`checking...' messages
158   --version               print the version of autoconf that created configure
159 Directory and file names:
160   --prefix=PREFIX         install architecture-independent files in PREFIX
161                           [$ac_default_prefix]
162   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
163                           [same as prefix]
164   --bindir=DIR            user executables in DIR [EPREFIX/bin]
165   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
166   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
167   --datadir=DIR           read-only architecture-independent data in DIR
168                           [PREFIX/share]
169   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
170   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
171                           [PREFIX/com]
172   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
173   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
174   --includedir=DIR        C header files in DIR [PREFIX/include]
175   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
176   --infodir=DIR           info documentation in DIR [PREFIX/info]
177   --mandir=DIR            man documentation in DIR [PREFIX/man]
178   --srcdir=DIR            find the sources in DIR [configure dir or ..]
179   --program-prefix=PREFIX prepend PREFIX to installed program names
180   --program-suffix=SUFFIX append SUFFIX to installed program names
181   --program-transform-name=PROGRAM
182                           run sed PROGRAM on installed program names
183 EOF
184     cat << EOF
185 Host type:
186   --build=BUILD           configure for building on BUILD [BUILD=HOST]
187   --host=HOST             configure for HOST [guessed]
188   --target=TARGET         configure for TARGET [TARGET=HOST]
189 Features and packages:
190   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
191   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
192   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
193   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
194   --x-includes=DIR        X include files are in DIR
195   --x-libraries=DIR       X library files are in DIR
196 EOF
197     if test -n "$ac_help"; then
198       echo "--enable and --with options recognized:$ac_help"
199     fi
200     exit 0 ;;
201
202   -host | --host | --hos | --ho)
203     ac_prev=host ;;
204   -host=* | --host=* | --hos=* | --ho=*)
205     host="$ac_optarg" ;;
206
207   -includedir | --includedir | --includedi | --included | --include \
208   | --includ | --inclu | --incl | --inc)
209     ac_prev=includedir ;;
210   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
211   | --includ=* | --inclu=* | --incl=* | --inc=*)
212     includedir="$ac_optarg" ;;
213
214   -infodir | --infodir | --infodi | --infod | --info | --inf)
215     ac_prev=infodir ;;
216   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
217     infodir="$ac_optarg" ;;
218
219   -libdir | --libdir | --libdi | --libd)
220     ac_prev=libdir ;;
221   -libdir=* | --libdir=* | --libdi=* | --libd=*)
222     libdir="$ac_optarg" ;;
223
224   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
225   | --libexe | --libex | --libe)
226     ac_prev=libexecdir ;;
227   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
228   | --libexe=* | --libex=* | --libe=*)
229     libexecdir="$ac_optarg" ;;
230
231   -localstatedir | --localstatedir | --localstatedi | --localstated \
232   | --localstate | --localstat | --localsta | --localst \
233   | --locals | --local | --loca | --loc | --lo)
234     ac_prev=localstatedir ;;
235   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
236   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
237   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
238     localstatedir="$ac_optarg" ;;
239
240   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241     ac_prev=mandir ;;
242   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
243     mandir="$ac_optarg" ;;
244
245   -nfp | --nfp | --nf)
246     # Obsolete; use --without-fp.
247     with_fp=no ;;
248
249   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250   | --no-cr | --no-c)
251     no_create=yes ;;
252
253   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
254   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
255     no_recursion=yes ;;
256
257   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
258   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
259   | --oldin | --oldi | --old | --ol | --o)
260     ac_prev=oldincludedir ;;
261   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
262   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
263   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
264     oldincludedir="$ac_optarg" ;;
265
266   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267     ac_prev=prefix ;;
268   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
269     prefix="$ac_optarg" ;;
270
271   -program-prefix | --program-prefix | --program-prefi | --program-pref \
272   | --program-pre | --program-pr | --program-p)
273     ac_prev=program_prefix ;;
274   -program-prefix=* | --program-prefix=* | --program-prefi=* \
275   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
276     program_prefix="$ac_optarg" ;;
277
278   -program-suffix | --program-suffix | --program-suffi | --program-suff \
279   | --program-suf | --program-su | --program-s)
280     ac_prev=program_suffix ;;
281   -program-suffix=* | --program-suffix=* | --program-suffi=* \
282   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
283     program_suffix="$ac_optarg" ;;
284
285   -program-transform-name | --program-transform-name \
286   | --program-transform-nam | --program-transform-na \
287   | --program-transform-n | --program-transform- \
288   | --program-transform | --program-transfor \
289   | --program-transfo | --program-transf \
290   | --program-trans | --program-tran \
291   | --progr-tra | --program-tr | --program-t)
292     ac_prev=program_transform_name ;;
293   -program-transform-name=* | --program-transform-name=* \
294   | --program-transform-nam=* | --program-transform-na=* \
295   | --program-transform-n=* | --program-transform-=* \
296   | --program-transform=* | --program-transfor=* \
297   | --program-transfo=* | --program-transf=* \
298   | --program-trans=* | --program-tran=* \
299   | --progr-tra=* | --program-tr=* | --program-t=*)
300     program_transform_name="$ac_optarg" ;;
301
302   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
303   | -silent | --silent | --silen | --sile | --sil)
304     silent=yes ;;
305
306   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307     ac_prev=sbindir ;;
308   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309   | --sbi=* | --sb=*)
310     sbindir="$ac_optarg" ;;
311
312   -sharedstatedir | --sharedstatedir | --sharedstatedi \
313   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
314   | --sharedst | --shareds | --shared | --share | --shar \
315   | --sha | --sh)
316     ac_prev=sharedstatedir ;;
317   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
318   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
319   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320   | --sha=* | --sh=*)
321     sharedstatedir="$ac_optarg" ;;
322
323   -site | --site | --sit)
324     ac_prev=site ;;
325   -site=* | --site=* | --sit=*)
326     site="$ac_optarg" ;;
327
328   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329     ac_prev=srcdir ;;
330   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
331     srcdir="$ac_optarg" ;;
332
333   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
334   | --syscon | --sysco | --sysc | --sys | --sy)
335     ac_prev=sysconfdir ;;
336   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
337   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
338     sysconfdir="$ac_optarg" ;;
339
340   -target | --target | --targe | --targ | --tar | --ta | --t)
341     ac_prev=target ;;
342   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
343     target="$ac_optarg" ;;
344
345   -v | -verbose | --verbose | --verbos | --verbo | --verb)
346     verbose=yes ;;
347
348   -version | --version | --versio | --versi | --vers)
349     echo "configure generated by autoconf version 2.13"
350     exit 0 ;;
351
352   -with-* | --with-*)
353     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
354     # Reject names that are not valid shell variable names.
355     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
356       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357     fi
358     ac_package=`echo $ac_package| sed 's/-/_/g'`
359     case "$ac_option" in
360       *=*) ;;
361       *) ac_optarg=yes ;;
362     esac
363     eval "with_${ac_package}='$ac_optarg'" ;;
364
365   -without-* | --without-*)
366     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
367     # Reject names that are not valid shell variable names.
368     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
369       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370     fi
371     ac_package=`echo $ac_package| sed 's/-/_/g'`
372     eval "with_${ac_package}=no" ;;
373
374   --x)
375     # Obsolete; use --with-x.
376     with_x=yes ;;
377
378   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
379   | --x-incl | --x-inc | --x-in | --x-i)
380     ac_prev=x_includes ;;
381   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
382   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
383     x_includes="$ac_optarg" ;;
384
385   -x-libraries | --x-libraries | --x-librarie | --x-librari \
386   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
387     ac_prev=x_libraries ;;
388   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
389   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
390     x_libraries="$ac_optarg" ;;
391
392   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
393     ;;
394
395   *)
396     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
397       echo "configure: warning: $ac_option: invalid host type" 1>&2
398     fi
399     if test "x$nonopt" != xNONE; then
400       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
401     fi
402     nonopt="$ac_option"
403     ;;
404
405   esac
406 done
407
408 if test -n "$ac_prev"; then
409   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
410 fi
411
412 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413
414 # File descriptor usage:
415 # 0 standard input
416 # 1 file creation
417 # 2 errors and warnings
418 # 3 some systems may open it to /dev/tty
419 # 4 used on the Kubota Titan
420 # 6 checking for... messages and results
421 # 5 compiler messages saved in config.log
422 if test "$silent" = yes; then
423   exec 6>/dev/null
424 else
425   exec 6>&1
426 fi
427 exec 5>./config.log
428
429 echo "\
430 This file contains any messages produced by compilers while
431 running configure, to aid debugging if configure makes a mistake.
432 " 1>&5
433
434 # Strip out --no-create and --no-recursion so they do not pile up.
435 # Also quote any args containing shell metacharacters.
436 ac_configure_args=
437 for ac_arg
438 do
439   case "$ac_arg" in
440   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
441   | --no-cr | --no-c) ;;
442   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
443   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
444   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
445   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
446   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
447   esac
448 done
449
450 # NLS nuisances.
451 # Only set these to C if already set.  These must not be set unconditionally
452 # because not all systems understand e.g. LANG=C (notably SCO).
453 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
454 # Non-C LC_CTYPE values break the ctype check.
455 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
456 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
457 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
458 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
459
460 # confdefs.h avoids OS command line length limits that DEFS can exceed.
461 rm -rf conftest* confdefs.h
462 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
463 echo > confdefs.h
464
465 # A filename unique to this package, relative to the directory that
466 # configure is in, which we can look for to find out if srcdir is correct.
467 ac_unique_file=src/jigdo-file.cc
468
469 # Find the source files, if location was not specified.
470 if test -z "$srcdir"; then
471   ac_srcdir_defaulted=yes
472   # Try the directory containing this script, then its parent.
473   ac_prog=$0
474   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
475   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
476   srcdir=$ac_confdir
477   if test ! -r $srcdir/$ac_unique_file; then
478     srcdir=..
479   fi
480 else
481   ac_srcdir_defaulted=no
482 fi
483 if test ! -r $srcdir/$ac_unique_file; then
484   if test "$ac_srcdir_defaulted" = yes; then
485     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
486   else
487     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
488   fi
489 fi
490 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
491
492 # Prefer explicitly selected file to automatically selected ones.
493 if test -z "$CONFIG_SITE"; then
494   if test "x$prefix" != xNONE; then
495     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
496   else
497     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
498   fi
499 fi
500 for ac_site_file in $CONFIG_SITE; do
501   if test -r "$ac_site_file"; then
502     echo "loading site script $ac_site_file"
503     . "$ac_site_file"
504   fi
505 done
506
507 if test -r "$cache_file"; then
508   echo "loading cache $cache_file"
509   . $cache_file
510 else
511   echo "creating cache $cache_file"
512   > $cache_file
513 fi
514
515 ac_ext=c
516 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
517 ac_cpp='$CPP $CPPFLAGS'
518 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
519 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
520 cross_compiling=$ac_cv_prog_cc_cross
521
522 ac_exeext=
523 ac_objext=o
524 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
525   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
526   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
527     ac_n= ac_c='
528 ' ac_t='        '
529   else
530     ac_n=-n ac_c= ac_t=
531   fi
532 else
533   ac_n= ac_c='\c' ac_t=
534 fi
535
536
537
538
539 read JIGDO_VERSION < "$srcdir/VERSION"
540 cat >> confdefs.h <<EOF
541 #define JIGDO_VERSION "$JIGDO_VERSION"
542 EOF
543
544
545
546 if test -f "/etc/debian_version"; then
547     installDevel() {
548     echo "$ac_t""   * (Your system appears to be Debian-based; try" 1>&6
549     echo "$ac_t""   * installing the \`$1-dev' package.)" 1>&6
550     }
551 elif test -x "/usr/bin/rpm" -o -x "/usr/local/bin/rpm"; then
552     installDevel() {
553     echo "$ac_t""   * (Your system appears to be RPM-based; try" 1>&6
554     echo "$ac_t""   * installing the package named \`$2-devel' or" 1>&6
555     echo "$ac_t""   * similar.)" 1>&6
556     }
557 else
558     installDevel() {
559     echo "$ac_t""   * (If the software on your system is managed by a" 1>&6
560     echo "$ac_t""   * package manager like RPM, try installing the" 1>&6
561     echo "$ac_t""   * package named \`$2-devel' or similar.)" 1>&6
562     }
563 fi
564
565 for ac_prog in mawk gawk nawk awk
566 do
567 # Extract the first word of "$ac_prog", so it can be a program name with args.
568 set dummy $ac_prog; ac_word=$2
569 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
570 echo "configure:571: checking for $ac_word" >&5
571 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
572   echo $ac_n "(cached) $ac_c" 1>&6
573 else
574   if test -n "$AWK"; then
575   ac_cv_prog_AWK="$AWK" # Let the user override the test.
576 else
577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
578   ac_dummy="$PATH"
579   for ac_dir in $ac_dummy; do
580     test -z "$ac_dir" && ac_dir=.
581     if test -f $ac_dir/$ac_word; then
582       ac_cv_prog_AWK="$ac_prog"
583       break
584     fi
585   done
586   IFS="$ac_save_ifs"
587 fi
588 fi
589 AWK="$ac_cv_prog_AWK"
590 if test -n "$AWK"; then
591   echo "$ac_t""$AWK" 1>&6
592 else
593   echo "$ac_t""no" 1>&6
594 fi
595
596 test -n "$AWK" && break
597 done
598
599 ac_ext=c
600 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
601 ac_cpp='$CPP $CPPFLAGS'
602 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
603 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
604 cross_compiling=$ac_cv_prog_cc_cross
605
606 # Extract the first word of "gcc", so it can be a program name with args.
607 set dummy gcc; ac_word=$2
608 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
609 echo "configure:610: checking for $ac_word" >&5
610 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
611   echo $ac_n "(cached) $ac_c" 1>&6
612 else
613   if test -n "$CC"; then
614   ac_cv_prog_CC="$CC" # Let the user override the test.
615 else
616   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
617   ac_dummy="$PATH"
618   for ac_dir in $ac_dummy; do
619     test -z "$ac_dir" && ac_dir=.
620     if test -f $ac_dir/$ac_word; then
621       ac_cv_prog_CC="gcc"
622       break
623     fi
624   done
625   IFS="$ac_save_ifs"
626 fi
627 fi
628 CC="$ac_cv_prog_CC"
629 if test -n "$CC"; then
630   echo "$ac_t""$CC" 1>&6
631 else
632   echo "$ac_t""no" 1>&6
633 fi
634
635 if test -z "$CC"; then
636   # Extract the first word of "cc", so it can be a program name with args.
637 set dummy cc; ac_word=$2
638 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
639 echo "configure:640: checking for $ac_word" >&5
640 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
641   echo $ac_n "(cached) $ac_c" 1>&6
642 else
643   if test -n "$CC"; then
644   ac_cv_prog_CC="$CC" # Let the user override the test.
645 else
646   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
647   ac_prog_rejected=no
648   ac_dummy="$PATH"
649   for ac_dir in $ac_dummy; do
650     test -z "$ac_dir" && ac_dir=.
651     if test -f $ac_dir/$ac_word; then
652       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
653         ac_prog_rejected=yes
654         continue
655       fi
656       ac_cv_prog_CC="cc"
657       break
658     fi
659   done
660   IFS="$ac_save_ifs"
661 if test $ac_prog_rejected = yes; then
662   # We found a bogon in the path, so make sure we never use it.
663   set dummy $ac_cv_prog_CC
664   shift
665   if test $# -gt 0; then
666     # We chose a different compiler from the bogus one.
667     # However, it has the same basename, so the bogon will be chosen
668     # first if we set CC to just the basename; use the full file name.
669     shift
670     set dummy "$ac_dir/$ac_word" "$@"
671     shift
672     ac_cv_prog_CC="$@"
673   fi
674 fi
675 fi
676 fi
677 CC="$ac_cv_prog_CC"
678 if test -n "$CC"; then
679   echo "$ac_t""$CC" 1>&6
680 else
681   echo "$ac_t""no" 1>&6
682 fi
683
684   if test -z "$CC"; then
685     case "`uname -s`" in
686     *win32* | *WIN32*)
687       # Extract the first word of "cl", so it can be a program name with args.
688 set dummy cl; ac_word=$2
689 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
690 echo "configure:691: checking for $ac_word" >&5
691 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
692   echo $ac_n "(cached) $ac_c" 1>&6
693 else
694   if test -n "$CC"; then
695   ac_cv_prog_CC="$CC" # Let the user override the test.
696 else
697   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
698   ac_dummy="$PATH"
699   for ac_dir in $ac_dummy; do
700     test -z "$ac_dir" && ac_dir=.
701     if test -f $ac_dir/$ac_word; then
702       ac_cv_prog_CC="cl"
703       break
704     fi
705   done
706   IFS="$ac_save_ifs"
707 fi
708 fi
709 CC="$ac_cv_prog_CC"
710 if test -n "$CC"; then
711   echo "$ac_t""$CC" 1>&6
712 else
713   echo "$ac_t""no" 1>&6
714 fi
715  ;;
716     esac
717   fi
718   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
719 fi
720
721 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
722 echo "configure:723: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
723
724 ac_ext=c
725 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
726 ac_cpp='$CPP $CPPFLAGS'
727 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
728 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
729 cross_compiling=$ac_cv_prog_cc_cross
730
731 cat > conftest.$ac_ext << EOF
732
733 #line 734 "configure"
734 #include "confdefs.h"
735
736 main(){return(0);}
737 EOF
738 if { (eval echo configure:739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
739   ac_cv_prog_cc_works=yes
740   # If we can't run a trivial program, we are probably using a cross compiler.
741   if (./conftest; exit) 2>/dev/null; then
742     ac_cv_prog_cc_cross=no
743   else
744     ac_cv_prog_cc_cross=yes
745   fi
746 else
747   echo "configure: failed program was:" >&5
748   cat conftest.$ac_ext >&5
749   ac_cv_prog_cc_works=no
750 fi
751 rm -fr conftest*
752 ac_ext=c
753 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
754 ac_cpp='$CPP $CPPFLAGS'
755 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
756 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
757 cross_compiling=$ac_cv_prog_cc_cross
758
759 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
760 if test $ac_cv_prog_cc_works = no; then
761   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
762 fi
763 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
764 echo "configure:765: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
765 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
766 cross_compiling=$ac_cv_prog_cc_cross
767
768 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
769 echo "configure:770: checking whether we are using GNU C" >&5
770 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
771   echo $ac_n "(cached) $ac_c" 1>&6
772 else
773   cat > conftest.c <<EOF
774 #ifdef __GNUC__
775   yes;
776 #endif
777 EOF
778 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
779   ac_cv_prog_gcc=yes
780 else
781   ac_cv_prog_gcc=no
782 fi
783 fi
784
785 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
786
787 if test $ac_cv_prog_gcc = yes; then
788   GCC=yes
789 else
790   GCC=
791 fi
792
793 ac_test_CFLAGS="${CFLAGS+set}"
794 ac_save_CFLAGS="$CFLAGS"
795 CFLAGS=
796 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
797 echo "configure:798: checking whether ${CC-cc} accepts -g" >&5
798 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
799   echo $ac_n "(cached) $ac_c" 1>&6
800 else
801   echo 'void f(){}' > conftest.c
802 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
803   ac_cv_prog_cc_g=yes
804 else
805   ac_cv_prog_cc_g=no
806 fi
807 rm -f conftest*
808
809 fi
810
811 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
812 if test "$ac_test_CFLAGS" = set; then
813   CFLAGS="$ac_save_CFLAGS"
814 elif test $ac_cv_prog_cc_g = yes; then
815   if test "$GCC" = yes; then
816     CFLAGS="-g -O2"
817   else
818     CFLAGS="-g"
819   fi
820 else
821   if test "$GCC" = yes; then
822     CFLAGS="-O2"
823   else
824     CFLAGS=
825   fi
826 fi
827
828 ac_ext=C
829 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
830 ac_cpp='$CXXCPP $CPPFLAGS'
831 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
832 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
833 cross_compiling=$ac_cv_prog_cxx_cross
834
835 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
836 do
837 # Extract the first word of "$ac_prog", so it can be a program name with args.
838 set dummy $ac_prog; ac_word=$2
839 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
840 echo "configure:841: checking for $ac_word" >&5
841 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
842   echo $ac_n "(cached) $ac_c" 1>&6
843 else
844   if test -n "$CXX"; then
845   ac_cv_prog_CXX="$CXX" # Let the user override the test.
846 else
847   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
848   ac_dummy="$PATH"
849   for ac_dir in $ac_dummy; do
850     test -z "$ac_dir" && ac_dir=.
851     if test -f $ac_dir/$ac_word; then
852       ac_cv_prog_CXX="$ac_prog"
853       break
854     fi
855   done
856   IFS="$ac_save_ifs"
857 fi
858 fi
859 CXX="$ac_cv_prog_CXX"
860 if test -n "$CXX"; then
861   echo "$ac_t""$CXX" 1>&6
862 else
863   echo "$ac_t""no" 1>&6
864 fi
865
866 test -n "$CXX" && break
867 done
868 test -n "$CXX" || CXX="gcc"
869
870
871 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
872 echo "configure:873: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
873
874 ac_ext=C
875 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
876 ac_cpp='$CXXCPP $CPPFLAGS'
877 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
878 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
879 cross_compiling=$ac_cv_prog_cxx_cross
880
881 cat > conftest.$ac_ext << EOF
882
883 #line 884 "configure"
884 #include "confdefs.h"
885
886 int main(){return(0);}
887 EOF
888 if { (eval echo configure:889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
889   ac_cv_prog_cxx_works=yes
890   # If we can't run a trivial program, we are probably using a cross compiler.
891   if (./conftest; exit) 2>/dev/null; then
892     ac_cv_prog_cxx_cross=no
893   else
894     ac_cv_prog_cxx_cross=yes
895   fi
896 else
897   echo "configure: failed program was:" >&5
898   cat conftest.$ac_ext >&5
899   ac_cv_prog_cxx_works=no
900 fi
901 rm -fr conftest*
902 ac_ext=C
903 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
904 ac_cpp='$CXXCPP $CPPFLAGS'
905 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
906 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
907 cross_compiling=$ac_cv_prog_cxx_cross
908
909 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
910 if test $ac_cv_prog_cxx_works = no; then
911   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
912 fi
913 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
914 echo "configure:915: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
915 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
916 cross_compiling=$ac_cv_prog_cxx_cross
917
918 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
919 echo "configure:920: checking whether we are using GNU C++" >&5
920 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
921   echo $ac_n "(cached) $ac_c" 1>&6
922 else
923   cat > conftest.C <<EOF
924 #ifdef __GNUC__
925   yes;
926 #endif
927 EOF
928 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
929   ac_cv_prog_gxx=yes
930 else
931   ac_cv_prog_gxx=no
932 fi
933 fi
934
935 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
936
937 if test $ac_cv_prog_gxx = yes; then
938   GXX=yes
939 else
940   GXX=
941 fi
942
943 ac_test_CXXFLAGS="${CXXFLAGS+set}"
944 ac_save_CXXFLAGS="$CXXFLAGS"
945 CXXFLAGS=
946 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
947 echo "configure:948: checking whether ${CXX-g++} accepts -g" >&5
948 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
949   echo $ac_n "(cached) $ac_c" 1>&6
950 else
951   echo 'void f(){}' > conftest.cc
952 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
953   ac_cv_prog_cxx_g=yes
954 else
955   ac_cv_prog_cxx_g=no
956 fi
957 rm -f conftest*
958
959 fi
960
961 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
962 if test "$ac_test_CXXFLAGS" = set; then
963   CXXFLAGS="$ac_save_CXXFLAGS"
964 elif test $ac_cv_prog_cxx_g = yes; then
965   if test "$GXX" = yes; then
966     CXXFLAGS="-g -O2"
967   else
968     CXXFLAGS="-g"
969   fi
970 else
971   if test "$GXX" = yes; then
972     CXXFLAGS="-O2"
973   else
974     CXXFLAGS=
975   fi
976 fi
977
978 if test "$GXX" = "yes"; then
979     CFLAGS="$CFLAGS -Wall -W"
980     CXXFLAGS="$CXXFLAGS -Wall -W -Wpointer-arith -Wconversion -Wmissing-prototypes -Woverloaded-virtual"
981 fi
982 ac_aux_dir=
983 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
984   if test -f $ac_dir/install-sh; then
985     ac_aux_dir=$ac_dir
986     ac_install_sh="$ac_aux_dir/install-sh -c"
987     break
988   elif test -f $ac_dir/install.sh; then
989     ac_aux_dir=$ac_dir
990     ac_install_sh="$ac_aux_dir/install.sh -c"
991     break
992   fi
993 done
994 if test -z "$ac_aux_dir"; then
995   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
996 fi
997 ac_config_guess=$ac_aux_dir/config.guess
998 ac_config_sub=$ac_aux_dir/config.sub
999 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1000
1001 # Find a good install program.  We prefer a C program (faster),
1002 # so one script is as good as another.  But avoid the broken or
1003 # incompatible versions:
1004 # SysV /etc/install, /usr/sbin/install
1005 # SunOS /usr/etc/install
1006 # IRIX /sbin/install
1007 # AIX /bin/install
1008 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1009 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1010 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1011 # ./install, which can be erroneously created by make from ./install.sh.
1012 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1013 echo "configure:1014: checking for a BSD compatible install" >&5
1014 if test -z "$INSTALL"; then
1015 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1016   echo $ac_n "(cached) $ac_c" 1>&6
1017 else
1018     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1019   for ac_dir in $PATH; do
1020     # Account for people who put trailing slashes in PATH elements.
1021     case "$ac_dir/" in
1022     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1023     *)
1024       # OSF1 and SCO ODT 3.0 have their own names for install.
1025       # Don't use installbsd from OSF since it installs stuff as root
1026       # by default.
1027       for ac_prog in ginstall scoinst install; do
1028         if test -f $ac_dir/$ac_prog; then
1029           if test $ac_prog = install &&
1030             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1031             # AIX install.  It has an incompatible calling convention.
1032             :
1033           else
1034             ac_cv_path_install="$ac_dir/$ac_prog -c"
1035             break 2
1036           fi
1037         fi
1038       done
1039       ;;
1040     esac
1041   done
1042   IFS="$ac_save_IFS"
1043
1044 fi
1045   if test "${ac_cv_path_install+set}" = set; then
1046     INSTALL="$ac_cv_path_install"
1047   else
1048     # As a last resort, use the slow shell script.  We don't cache a
1049     # path for INSTALL within a source directory, because that will
1050     # break other packages using the cache if that directory is
1051     # removed, or if the path is relative.
1052     INSTALL="$ac_install_sh"
1053   fi
1054 fi
1055 echo "$ac_t""$INSTALL" 1>&6
1056
1057 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1058 # It thinks the first close brace ends the variable substitution.
1059 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1060
1061 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1062
1063 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1064
1065
1066 echo $ac_n "checking whether the C++ compiler is recent enough""... $ac_c" 1>&6
1067 echo "configure:1068: checking whether the C++ compiler is recent enough" >&5
1068 if eval "test \"`echo '$''{'jigdo_cv_prog_cxx_recent'+set}'`\" = set"; then
1069   echo $ac_n "(cached) $ac_c" 1>&6
1070 else
1071   cat > conftest.$ac_ext <<EOF
1072 #line 1073 "configure"
1073 #include "confdefs.h"
1074 #include <vector>
1075     namespace A {
1076       namespace B {
1077         template<typename T = double> struct X {
1078           template<class U> void function(T* t, U* u);
1079         };
1080       }
1081       template<> void B::X<void>::function(void* t, int* u);
1082     }
1083 int main() {
1084
1085 ; return 0; }
1086 EOF
1087 if { (eval echo configure:1088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1088   rm -rf conftest*
1089   jigdo_cv_prog_cxx_recent="yes"
1090 else
1091   echo "configure: failed program was:" >&5
1092   cat conftest.$ac_ext >&5
1093   rm -rf conftest*
1094   jigdo_cv_prog_cxx_recent="no"
1095 fi
1096 rm -f conftest*
1097
1098 fi
1099
1100 echo "$ac_t""$jigdo_cv_prog_cxx_recent" 1>&6
1101 if test "$jigdo_cv_prog_cxx_recent" = "no"; then
1102     echo "$ac_t""   * Your compiler failed to recognize some advanced C++" 1>&6
1103     echo "$ac_t""   * constructs - it might be too old to compile jigdo." 1>&6
1104     echo "$ac_t""   * In case compilation fails, try upgrading to a newer" 1>&6
1105     echo "$ac_t""   * compiler, e.g. GCC 2.95 or later." 1>&6
1106 fi
1107 cat > confcache <<\EOF
1108 # This file is a shell script that caches the results of configure
1109 # tests run on this system so they can be shared between configure
1110 # scripts and configure runs.  It is not useful on other systems.
1111 # If it contains results you don't want to keep, you may remove or edit it.
1112 #
1113 # By default, configure uses ./config.cache as the cache file,
1114 # creating it if it does not exist already.  You can give configure
1115 # the --cache-file=FILE option to use a different cache file; that is
1116 # what configure does when it calls configure scripts in
1117 # subdirectories, so they share the cache.
1118 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1119 # config.status only pays attention to the cache file if you give it the
1120 # --recheck option to rerun configure.
1121 #
1122 EOF
1123 # The following way of writing the cache mishandles newlines in values,
1124 # but we know of no workaround that is simple, portable, and efficient.
1125 # So, don't put newlines in cache variables' values.
1126 # Ultrix sh set writes to stderr and can't be redirected directly,
1127 # and sets the high bit in the cache file unless we assign to the vars.
1128 (set) 2>&1 |
1129   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1130   *ac_space=\ *)
1131     # `set' does not quote correctly, so add quotes (double-quote substitution
1132     # turns \\\\ into \\, and sed turns \\ into \).
1133     sed -n \
1134       -e "s/'/'\\\\''/g" \
1135       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1136     ;;
1137   *)
1138     # `set' quotes correctly as required by POSIX, so do not add quotes.
1139     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1140     ;;
1141   esac >> confcache
1142 if cmp -s $cache_file confcache; then
1143   :
1144 else
1145   if test -w $cache_file; then
1146     echo "updating cache $cache_file"
1147     cat confcache > $cache_file
1148   else
1149     echo "not updating unwritable cache $cache_file"
1150   fi
1151 fi
1152 rm -f confcache
1153
1154
1155 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1156 echo "configure:1157: checking how to run the C++ preprocessor" >&5
1157 if test -z "$CXXCPP"; then
1158 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
1159   echo $ac_n "(cached) $ac_c" 1>&6
1160 else
1161   ac_ext=C
1162 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1163 ac_cpp='$CXXCPP $CPPFLAGS'
1164 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1165 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1166 cross_compiling=$ac_cv_prog_cxx_cross
1167   CXXCPP="${CXX-g++} -E"
1168   cat > conftest.$ac_ext <<EOF
1169 #line 1170 "configure"
1170 #include "confdefs.h"
1171 #include <stdlib.h>
1172 EOF
1173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1174 { (eval echo configure:1175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1176 if test -z "$ac_err"; then
1177   :
1178 else
1179   echo "$ac_err" >&5
1180   echo "configure: failed program was:" >&5
1181   cat conftest.$ac_ext >&5
1182   rm -rf conftest*
1183   CXXCPP=/lib/cpp
1184 fi
1185 rm -f conftest*
1186   ac_cv_prog_CXXCPP="$CXXCPP"
1187 ac_ext=C
1188 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1189 ac_cpp='$CXXCPP $CPPFLAGS'
1190 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1191 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1192 cross_compiling=$ac_cv_prog_cxx_cross
1193 fi
1194 fi
1195 CXXCPP="$ac_cv_prog_CXXCPP"
1196 echo "$ac_t""$CXXCPP" 1>&6
1197
1198 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1199 echo "configure:1200: checking for ANSI C header files" >&5
1200 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   cat > conftest.$ac_ext <<EOF
1204 #line 1205 "configure"
1205 #include "confdefs.h"
1206 #include <stdlib.h>
1207 #include <stdarg.h>
1208 #include <string.h>
1209 #include <float.h>
1210 EOF
1211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1212 { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1214 if test -z "$ac_err"; then
1215   rm -rf conftest*
1216   ac_cv_header_stdc=yes
1217 else
1218   echo "$ac_err" >&5
1219   echo "configure: failed program was:" >&5
1220   cat conftest.$ac_ext >&5
1221   rm -rf conftest*
1222   ac_cv_header_stdc=no
1223 fi
1224 rm -f conftest*
1225
1226 if test $ac_cv_header_stdc = yes; then
1227   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1228 cat > conftest.$ac_ext <<EOF
1229 #line 1230 "configure"
1230 #include "confdefs.h"
1231 #include <string.h>
1232 EOF
1233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1234   egrep "memchr" >/dev/null 2>&1; then
1235   :
1236 else
1237   rm -rf conftest*
1238   ac_cv_header_stdc=no
1239 fi
1240 rm -f conftest*
1241
1242 fi
1243
1244 if test $ac_cv_header_stdc = yes; then
1245   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1246 cat > conftest.$ac_ext <<EOF
1247 #line 1248 "configure"
1248 #include "confdefs.h"
1249 #include <stdlib.h>
1250 EOF
1251 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1252   egrep "free" >/dev/null 2>&1; then
1253   :
1254 else
1255   rm -rf conftest*
1256   ac_cv_header_stdc=no
1257 fi
1258 rm -f conftest*
1259
1260 fi
1261
1262 if test $ac_cv_header_stdc = yes; then
1263   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1264 if test "$cross_compiling" = yes; then
1265   :
1266 else
1267   cat > conftest.$ac_ext <<EOF
1268 #line 1269 "configure"
1269 #include "confdefs.h"
1270 #ifdef __cplusplus
1271 extern "C" void exit(int);
1272 #endif
1273 #include <ctype.h>
1274 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1275 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1276 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1277 int main () { int i; for (i = 0; i < 256; i++)
1278 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1279 exit (0); }
1280
1281 EOF
1282 if { (eval echo configure:1283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1283 then
1284   :
1285 else
1286   echo "configure: failed program was:" >&5
1287   cat conftest.$ac_ext >&5
1288   rm -fr conftest*
1289   ac_cv_header_stdc=no
1290 fi
1291 rm -fr conftest*
1292 fi
1293
1294 fi
1295 fi
1296
1297 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1298 if test $ac_cv_header_stdc = yes; then
1299   cat >> confdefs.h <<\EOF
1300 #define STDC_HEADERS 1
1301 EOF
1302
1303 fi
1304
1305 for ac_hdr in stddef.h getopt.h unistd.h limits.h string.h
1306 do
1307 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1308 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1309 echo "configure:1310: checking for $ac_hdr" >&5
1310 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1311   echo $ac_n "(cached) $ac_c" 1>&6
1312 else
1313   cat > conftest.$ac_ext <<EOF
1314 #line 1315 "configure"
1315 #include "confdefs.h"
1316 #include <$ac_hdr>
1317 EOF
1318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1319 { (eval echo configure:1320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1321 if test -z "$ac_err"; then
1322   rm -rf conftest*
1323   eval "ac_cv_header_$ac_safe=yes"
1324 else
1325   echo "$ac_err" >&5
1326   echo "configure: failed program was:" >&5
1327   cat conftest.$ac_ext >&5
1328   rm -rf conftest*
1329   eval "ac_cv_header_$ac_safe=no"
1330 fi
1331 rm -f conftest*
1332 fi
1333 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1334   echo "$ac_t""yes" 1>&6
1335     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1336   cat >> confdefs.h <<EOF
1337 #define $ac_tr_hdr 1
1338 EOF
1339  
1340 else
1341   echo "$ac_t""no" 1>&6
1342 fi
1343 done
1344
1345
1346 echo $ac_n "checking for zlibVersion in -lz""... $ac_c" 1>&6
1347 echo "configure:1348: checking for zlibVersion in -lz" >&5
1348 ac_lib_var=`echo z'_'zlibVersion | sed 'y%./+-%__p_%'`
1349 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1350   echo $ac_n "(cached) $ac_c" 1>&6
1351 else
1352   ac_save_LIBS="$LIBS"
1353 LIBS="-lz  $LIBS"
1354 cat > conftest.$ac_ext <<EOF
1355 #line 1356 "configure"
1356 #include "confdefs.h"
1357 /* Override any gcc2 internal prototype to avoid an error.  */
1358 #ifdef __cplusplus
1359 extern "C"
1360 #endif
1361 /* We use char because int might match the return type of a gcc2
1362     builtin and then its argument prototype would still apply.  */
1363 char zlibVersion();
1364
1365 int main() {
1366 zlibVersion()
1367 ; return 0; }
1368 EOF
1369 if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1370   rm -rf conftest*
1371   eval "ac_cv_lib_$ac_lib_var=yes"
1372 else
1373   echo "configure: failed program was:" >&5
1374   cat conftest.$ac_ext >&5
1375   rm -rf conftest*
1376   eval "ac_cv_lib_$ac_lib_var=no"
1377 fi
1378 rm -f conftest*
1379 LIBS="$ac_save_LIBS"
1380
1381 fi
1382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1383   echo "$ac_t""yes" 1>&6
1384   have_zlib="yes"
1385 else
1386   echo "$ac_t""no" 1>&6
1387 have_zlib="no"
1388 fi
1389
1390 ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'`
1391 echo $ac_n "checking for zlib.h""... $ac_c" 1>&6
1392 echo "configure:1393: checking for zlib.h" >&5
1393 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1394   echo $ac_n "(cached) $ac_c" 1>&6
1395 else
1396   cat > conftest.$ac_ext <<EOF
1397 #line 1398 "configure"
1398 #include "confdefs.h"
1399 #include <zlib.h>
1400 EOF
1401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1402 { (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1404 if test -z "$ac_err"; then
1405   rm -rf conftest*
1406   eval "ac_cv_header_$ac_safe=yes"
1407 else
1408   echo "$ac_err" >&5
1409   echo "configure: failed program was:" >&5
1410   cat conftest.$ac_ext >&5
1411   rm -rf conftest*
1412   eval "ac_cv_header_$ac_safe=no"
1413 fi
1414 rm -f conftest*
1415 fi
1416 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1417   echo "$ac_t""yes" 1>&6
1418   have_zlib_h="yes"
1419 else
1420   echo "$ac_t""no" 1>&6
1421 have_zlib_h="no"
1422 fi
1423
1424 if test "$have_zlib" = "no" -o "$have_zlib_h" = "no"; then
1425     echo "$ac_t""   * Please install zlib, it is needed by all of the" 1>&6
1426     echo "$ac_t""   * programs." 1>&6
1427     installDevel "zlib1g" "zlib"
1428 fi
1429 LIBS="-lz $LIBS"
1430
1431
1432 echo $ac_n "checking for value of --with-libdb""... $ac_c" 1>&6
1433 echo "configure:1434: checking for value of --with-libdb" >&5
1434 # Check whether --with-libdb or --without-libdb was given.
1435 if test "${with_libdb+set}" = set; then
1436   withval="$with_libdb"
1437   #'
1438     jigdo_libdb="$withval"
1439 else
1440   jigdo_libdb="yes"
1441 fi
1442
1443 echo "$ac_t""\"$jigdo_libdb\"" 1>&6
1444 if test "$jigdo_libdb" = "yes"; then
1445                     for db in "db" "db3" "db-3" "db-3.1" "db-3.2" "db-3.3"; do
1446         echo $ac_n "checking for db_create in -l$db""... $ac_c" 1>&6
1447 echo "configure:1448: checking for db_create in -l$db" >&5
1448 ac_lib_var=`echo $db'_'db_create | sed 'y%./+-%__p_%'`
1449 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1450   echo $ac_n "(cached) $ac_c" 1>&6
1451 else
1452   ac_save_LIBS="$LIBS"
1453 LIBS="-l$db  $LIBS"
1454 cat > conftest.$ac_ext <<EOF
1455 #line 1456 "configure"
1456 #include "confdefs.h"
1457 /* Override any gcc2 internal prototype to avoid an error.  */
1458 #ifdef __cplusplus
1459 extern "C"
1460 #endif
1461 /* We use char because int might match the return type of a gcc2
1462     builtin and then its argument prototype would still apply.  */
1463 char db_create();
1464
1465 int main() {
1466 db_create()
1467 ; return 0; }
1468 EOF
1469 if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1470   rm -rf conftest*
1471   eval "ac_cv_lib_$ac_lib_var=yes"
1472 else
1473   echo "configure: failed program was:" >&5
1474   cat conftest.$ac_ext >&5
1475   rm -rf conftest*
1476   eval "ac_cv_lib_$ac_lib_var=no"
1477 fi
1478 rm -f conftest*
1479 LIBS="$ac_save_LIBS"
1480
1481 fi
1482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1483   echo "$ac_t""yes" 1>&6
1484   have_libdb="$db"
1485 else
1486   echo "$ac_t""no" 1>&6
1487 have_libdb="no"
1488 fi
1489
1490         if test "$have_libdb" != "no"; then break; fi
1491     done
1492     ac_safe=`echo "db.h" | sed 'y%./+-%__p_%'`
1493 echo $ac_n "checking for db.h""... $ac_c" 1>&6
1494 echo "configure:1495: checking for db.h" >&5
1495 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1496   echo $ac_n "(cached) $ac_c" 1>&6
1497 else
1498   cat > conftest.$ac_ext <<EOF
1499 #line 1500 "configure"
1500 #include "confdefs.h"
1501 #include <db.h>
1502 EOF
1503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1504 { (eval echo configure:1505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1506 if test -z "$ac_err"; then
1507   rm -rf conftest*
1508   eval "ac_cv_header_$ac_safe=yes"
1509 else
1510   echo "$ac_err" >&5
1511   echo "configure: failed program was:" >&5
1512   cat conftest.$ac_ext >&5
1513   rm -rf conftest*
1514   eval "ac_cv_header_$ac_safe=no"
1515 fi
1516 rm -f conftest*
1517 fi
1518 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1519   echo "$ac_t""yes" 1>&6
1520   have_db_h="yes"
1521 else
1522   echo "$ac_t""no" 1>&6
1523 have_db_h="no"
1524 fi
1525
1526     if test "$have_libdb" = "no" -o "$have_db_h" = "no"; then
1527         echo "$ac_t""   * libdb3 not found - either install it, or use" 1>&6
1528         echo "$ac_t""   * \`configure --without-libdb' to disable the db3" 1>&6
1529         echo "$ac_t""   * file cache of jigdo-file. If this check should not" 1>&6
1530         echo "$ac_t""   * have failed, force e.g. -ldb to be used with" 1>&6
1531         echo "$ac_t""   * \`configure --with-libdb=-ldb'" 1>&6
1532         installDevel "libdb3" "libdb3.3"
1533         { echo "configure: error: libdb3 not found." 1>&2; exit 1; }
1534     else
1535         LIBS="-l$have_libdb $LIBS"
1536     fi
1537     cat >> confdefs.h <<\EOF
1538 #define HAVE_LIBDB 1
1539 EOF
1540  elif test "$jigdo_libdb" != "no" -a "$jigdo_libdb" != "NO"; then
1541         LIBS="$jigdo_libdb $LIBS"
1542     cat >> confdefs.h <<\EOF
1543 #define HAVE_LIBDB 1
1544 EOF
1545
1546 else
1547     cat >> confdefs.h <<\EOF
1548 #define HAVE_LIBDB 0
1549 EOF
1550
1551 fi
1552
1553 echo $ac_n "checking for value of --with-gui""... $ac_c" 1>&6
1554 echo "configure:1555: checking for value of --with-gui" >&5
1555 # Check whether --with-gui or --without-gui was given.
1556 if test "${with_gui+set}" = set; then
1557   withval="$with_gui"
1558   jigdo_gui="$withval"
1559 else
1560   jigdo_gui="yes"
1561 fi
1562
1563 echo "$ac_t""\"$jigdo_gui\"" 1>&6
1564
1565 echo $ac_n "checking for GTK+ version""... $ac_c" 1>&6
1566 echo "configure:1567: checking for GTK+ version" >&5
1567 jigdo_gtkver="`gtk-config --version 2>&1`"
1568 echo "$ac_t""$jigdo_gtkver" 1>&6
1569 case "$jigdo_gtkver" in
1570     1.2.*|1.3.*) ;;
1571     *)
1572     if test "$jigdo_gui" = "yes"; then
1573     echo "$ac_t""   * GTK+ not installed, or the installed version is not" 1>&6
1574     echo "$ac_t""   * 1.2.x, or gtk-config is not in \$PATH. Please" 1>&6
1575     echo "$ac_t""   * install GTK+ 1.2, it is needed by \`jigdo'." 1>&6
1576     installDevel "libgtk1.2" "libgtk1.2"
1577     fi
1578 esac
1579 noConfig="# gtk-config not found - add compiler switches here"
1580 GTKCFLAGS="`gtk-config --cflags 2>/dev/null || echo $noConfig`"
1581 GTKLIBS="`gtk-config --libs 2>/dev/null || echo $noConfig`"
1582
1583
1584
1585 echo $ac_n "checking for libwww version""... $ac_c" 1>&6
1586 echo "configure:1587: checking for libwww version" >&5
1587 jigdo_libwwwver="`libwww-config --version 2>&1`"
1588 echo "$ac_t""$jigdo_libwwwver" 1>&6
1589 LIBWWWCFLAGS="# libwww-config not found - add compiler switches here"
1590 LIBWWWLIBS="$LIBWWWCFLAGS"
1591 case "$jigdo_libwwwver" in
1592         [6-9]*|5.[4-9]*|5.[1-9][0-9]*|5.3.[2-9]*|5.3.[1-9][0-9]*)
1593         LIBWWWCFLAGS="`libwww-config --cflags 2>/dev/null`"
1594         LIBWWWLIBS="`libwww-config --libs 2>/dev/null`"
1595                         LIBWWWCFLAGS=`echo " $LIBWWWCFLAGS " | sed -e 's% -I/usr/include/* % %'`
1596         ;;
1597     *)
1598     if test "$jigdo_gui" = "yes"; then
1599     echo "$ac_t""   * libwww not installed, or the installed version is" 1>&6
1600     echo "$ac_t""   * too old, or libwww-config is not in \$PATH. Please" 1>&6
1601     echo "$ac_t""   * install libwww 5.3.2 or later, it is needed by the" 1>&6
1602     echo "$ac_t""   * \`jigdo' program." 1>&6
1603     installDevel "libwww" "w3c-libwww-devel/libopenssl0"
1604     fi
1605 esac
1606
1607
1608
1609 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1610 echo "configure:1611: checking for size_t" >&5
1611 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1612   echo $ac_n "(cached) $ac_c" 1>&6
1613 else
1614   cat > conftest.$ac_ext <<EOF
1615 #line 1616 "configure"
1616 #include "confdefs.h"
1617 #include <sys/types.h>
1618 #if STDC_HEADERS
1619 #include <stdlib.h>
1620 #include <stddef.h>
1621 #endif
1622 EOF
1623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1624   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1625   rm -rf conftest*
1626   ac_cv_type_size_t=yes
1627 else
1628   rm -rf conftest*
1629   ac_cv_type_size_t=no
1630 fi
1631 rm -f conftest*
1632
1633 fi
1634 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1635 if test $ac_cv_type_size_t = no; then
1636   cat >> confdefs.h <<\EOF
1637 #define size_t unsigned
1638 EOF
1639
1640 fi
1641
1642 echo $ac_n "checking whether we are compiling for Windows""... $ac_c" 1>&6
1643 echo "configure:1644: checking whether we are compiling for Windows" >&5
1644 cat > conftest.$ac_ext <<EOF
1645 #line 1646 "configure"
1646 #include "confdefs.h"
1647
1648 #if defined WINNT || defined __WINNT || defined __WINNT__ || defined WIN32 \
1649     || defined _WIN32 || defined __WIN32 || defined __WIN32__
1650   poorsoul
1651 #endif
1652 EOF
1653 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1654   egrep "poorsoul" >/dev/null 2>&1; then
1655   rm -rf conftest*
1656   is_windows=yes
1657 else
1658   rm -rf conftest*
1659   is_windows=no
1660 fi
1661 rm -f conftest*
1662
1663 echo "$ac_t""$is_windows" 1>&6
1664 if test "$is_windows" = yes; then
1665     cat >> confdefs.h <<\EOF
1666 #define WINDOWS 1
1667 EOF
1668
1669     exe=".exe"
1670 else
1671     cat >> confdefs.h <<\EOF
1672 #define UNIX 1
1673 EOF
1674
1675     exe=""
1676 fi
1677
1678
1679 dirent_hack="no"
1680 if test "$is_windows" = yes; then
1681     CPPFLAGS_orig="$CPPFLAGS"
1682     CPPFLAGS="$CPPFLAGS $GTKCFLAGS"
1683     echo $ac_n "checking for conflicting 'struct dirent' in dirent.h and glib.h""... $ac_c" 1>&6
1684 echo "configure:1685: checking for conflicting 'struct dirent' in dirent.h and glib.h" >&5
1685     cat > conftest.$ac_ext <<EOF
1686 #line 1687 "configure"
1687 #include "confdefs.h"
1688 #include <dirent.h>
1689                     #include <glib.h>
1690 int main() {
1691
1692 ; return 0; }
1693 EOF
1694 if { (eval echo configure:1695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1695   rm -rf conftest*
1696   dirent_hack="no"
1697 else
1698   echo "configure: failed program was:" >&5
1699   cat conftest.$ac_ext >&5
1700   rm -rf conftest*
1701   dirent_hack="yes"
1702 fi
1703 rm -f conftest*
1704     if test "$dirent_hack" = "yes"; then
1705         cat > conftest.$ac_ext <<EOF
1706 #line 1707 "configure"
1707 #include "confdefs.h"
1708 #include <dirent.h>
1709                         #define dirent other_dirent
1710                         #define DIR other_DIR
1711                         #include <glib.h>
1712 int main() {
1713
1714 ; return 0; }
1715 EOF
1716 if { (eval echo configure:1717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1717   :
1718 else
1719   echo "configure: failed program was:" >&5
1720   cat conftest.$ac_ext >&5
1721   rm -rf conftest*
1722   dirent_hack="no"
1723 fi
1724 rm -f conftest*
1725     fi
1726     echo "$ac_t""$dirent_hack" 1>&6
1727     CPPFLAGS="$CPPFLAGS_orig"
1728 fi
1729 if test "$dirent_hack" = "yes"; then
1730     cat >> confdefs.h <<\EOF
1731 #define DIRENT_HACK 1
1732 EOF
1733
1734 else
1735     cat >> confdefs.h <<\EOF
1736 #define DIRENT_HACK 0
1737 EOF
1738
1739 fi
1740
1741 echo $ac_n "checking for value of --with-uint64""... $ac_c" 1>&6
1742 echo "configure:1743: checking for value of --with-uint64" >&5
1743 # Check whether --with-uint64 or --without-uint64 was given.
1744 if test "${with_uint64+set}" = set; then
1745   withval="$with_uint64"
1746   jigdo_uint64="yes"
1747 else
1748   jigdo_uint64="auto"
1749 fi
1750
1751 echo "$ac_t""\"$jigdo_uint64\"" 1>&6
1752
1753 echo $ac_n "checking for unsigned long long""... $ac_c" 1>&6
1754 echo "configure:1755: checking for unsigned long long" >&5
1755 if eval "test \"`echo '$''{'jigdo_cv_have_ulonglong'+set}'`\" = set"; then
1756   echo $ac_n "(cached) $ac_c" 1>&6
1757 else
1758   cat > conftest.$ac_ext <<EOF
1759 #line 1760 "configure"
1760 #include "confdefs.h"
1761
1762 int main() {
1763 unsigned long long x = 0
1764 ; return 0; }
1765 EOF
1766 if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1767   rm -rf conftest*
1768   jigdo_cv_have_ulonglong=yes
1769 else
1770   echo "configure: failed program was:" >&5
1771   cat conftest.$ac_ext >&5
1772   rm -rf conftest*
1773   jigdo_cv_have_ulonglong=no
1774 fi
1775 rm -f conftest*
1776 fi
1777
1778 echo "$ac_t""$jigdo_cv_have_ulonglong" 1>&6
1779 if test "$jigdo_cv_have_ulonglong" = "yes"; then
1780     cat >> confdefs.h <<\EOF
1781 #define HAVE_UNSIGNED_LONG_LONG 1
1782 EOF
1783
1784 else
1785     cat >> confdefs.h <<\EOF
1786 #define HAVE_UNSIGNED_LONG_LONG 0
1787 EOF
1788
1789 fi
1790
1791 if test "$jigdo_uint64" = auto; then
1792     echo $ac_n "checking size of unsigned long""... $ac_c" 1>&6
1793 echo "configure:1794: checking size of unsigned long" >&5
1794 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long'+set}'`\" = set"; then
1795   echo $ac_n "(cached) $ac_c" 1>&6
1796 else
1797   if test "$cross_compiling" = yes; then
1798   ac_cv_sizeof_unsigned_long=0
1799 else
1800   cat > conftest.$ac_ext <<EOF
1801 #line 1802 "configure"
1802 #include "confdefs.h"
1803 #ifdef __cplusplus
1804 extern "C" void exit(int);
1805 #endif
1806 #include <stdio.h>
1807 #include <sys/types.h>
1808 main()
1809 {
1810   FILE *f=fopen("conftestval", "w");
1811   if (!f) exit(1);
1812   fprintf(f, "%d\n", sizeof(unsigned long));
1813   exit(0);
1814 }
1815 EOF
1816 if { (eval echo configure:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1817 then
1818   ac_cv_sizeof_unsigned_long=`cat conftestval`
1819 else
1820   echo "configure: failed program was:" >&5
1821   cat conftest.$ac_ext >&5
1822   rm -fr conftest*
1823   ac_cv_sizeof_unsigned_long=0
1824 fi
1825 rm -fr conftest*
1826 fi
1827
1828 fi
1829 echo "$ac_t""$ac_cv_sizeof_unsigned_long" 1>&6
1830 cat >> confdefs.h <<EOF
1831 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
1832 EOF
1833
1834
1835     echo $ac_n "checking size of unsigned long long""... $ac_c" 1>&6
1836 echo "configure:1837: checking size of unsigned long long" >&5
1837 if eval "test \"`echo '$''{'ac_cv_sizeof_unsigned_long_long'+set}'`\" = set"; then
1838   echo $ac_n "(cached) $ac_c" 1>&6
1839 else
1840   if test "$cross_compiling" = yes; then
1841   ac_cv_sizeof_unsigned_long_long=0
1842 else
1843   cat > conftest.$ac_ext <<EOF
1844 #line 1845 "configure"
1845 #include "confdefs.h"
1846 #ifdef __cplusplus
1847 extern "C" void exit(int);
1848 #endif
1849 #include <stdio.h>
1850 #include <sys/types.h>
1851 main()
1852 {
1853   FILE *f=fopen("conftestval", "w");
1854   if (!f) exit(1);
1855   fprintf(f, "%d\n", sizeof(unsigned long long));
1856   exit(0);
1857 }
1858 EOF
1859 if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1860 then
1861   ac_cv_sizeof_unsigned_long_long=`cat conftestval`
1862 else
1863   echo "configure: failed program was:" >&5
1864   cat conftest.$ac_ext >&5
1865   rm -fr conftest*
1866   ac_cv_sizeof_unsigned_long_long=0
1867 fi
1868 rm -fr conftest*
1869 fi
1870
1871 fi
1872 echo "$ac_t""$ac_cv_sizeof_unsigned_long_long" 1>&6
1873 cat >> confdefs.h <<EOF
1874 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
1875 EOF
1876
1877
1878     if test "$ac_cv_sizeof_unsigned_long" -ge 8; then
1879         jigdo_uint64='unsigned long'
1880     elif test "$ac_cv_sizeof_unsigned_long_long" -ge 8; then
1881         jigdo_uint64='unsigned long long'
1882     else
1883         if test "$jigdo_cv_have_ulonglong" = "yes"; then
1884             jigdo_uint64='unsigned long long'
1885         else
1886             jigdo_uint64='unsigned long'
1887         fi
1888         echo "$ac_t""   * Could not find an unsigned type with at least 64" 1>&6
1889         echo "$ac_t""   * bits (or maybe char has >8 bits?) - defaulting to" 1>&6
1890         echo "$ac_t""   * \`$jigdo_uint64'. You may want to override" 1>&6
1891         echo "$ac_t""   * this using --with-uint64=TYPE" 1>&6
1892     fi
1893 elif test "$jigdo_uint64" = yes -o "$jigdo_uint64" = no; then
1894     { echo "configure: error: Invalid argument to --with-uint64 option" 1>&2; exit 1; }
1895 else
1896     jigdo_uint64=`echo $jigdo_uint64 | sed -e 's/_/ /g'`
1897 fi
1898 echo $ac_n "checking for 64 bit unsigned integer type""... $ac_c" 1>&6
1899 echo "configure:1900: checking for 64 bit unsigned integer type" >&5
1900 echo "$ac_t""$jigdo_uint64" 1>&6
1901 cat >> confdefs.h <<EOF
1902 #define TYPE_UINT64 $jigdo_uint64
1903 EOF
1904
1905
1906 echo $ac_n "checking whether operator <<(uint64) works""... $ac_c" 1>&6
1907 echo "configure:1908: checking whether operator <<(uint64) works" >&5
1908 if eval "test \"`echo '$''{'jigdo_cv_prog_cxx_outuint64'+set}'`\" = set"; then
1909   echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911   cat > conftest.$ac_ext <<EOF
1912 #line 1913 "configure"
1913 #include "confdefs.h"
1914  #include <iostream>
1915       namespace std { }
1916       using namespace std; 
1917 int main() {
1918  $jigdo_uint64 x;
1919       cout << x << endl; 
1920 ; return 0; }
1921 EOF
1922 if { (eval echo configure:1923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1923   rm -rf conftest*
1924   jigdo_cv_prog_cxx_outuint64="yes"
1925 else
1926   echo "configure: failed program was:" >&5
1927   cat conftest.$ac_ext >&5
1928   rm -rf conftest*
1929   jigdo_cv_prog_cxx_outuint64="no"
1930 fi
1931 rm -f conftest*
1932
1933 fi
1934
1935 echo "$ac_t""$jigdo_cv_prog_cxx_outuint64" 1>&6
1936 if test "$jigdo_cv_prog_cxx_outuint64" = "yes"; then
1937     cat >> confdefs.h <<\EOF
1938 #define HAVE_OUTUINT64 1
1939 EOF
1940
1941 else
1942     cat >> confdefs.h <<\EOF
1943 #define HAVE_OUTUINT64 0
1944 EOF
1945
1946 fi
1947
1948 for ac_func in lstat truncate ftruncate mmap fileno snprintf _snprintf
1949 do
1950 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1951 echo "configure:1952: checking for $ac_func" >&5
1952 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1953   echo $ac_n "(cached) $ac_c" 1>&6
1954 else
1955   cat > conftest.$ac_ext <<EOF
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958 /* System header to define __stub macros and hopefully few prototypes,
1959     which can conflict with char $ac_func(); below.  */
1960 #include <assert.h>
1961 /* Override any gcc2 internal prototype to avoid an error.  */
1962 #ifdef __cplusplus
1963 extern "C"
1964 #endif
1965 /* We use char because int might match the return type of a gcc2
1966     builtin and then its argument prototype would still apply.  */
1967 char $ac_func();
1968
1969 int main() {
1970
1971 /* The GNU C library defines this for functions which it implements
1972     to always fail with ENOSYS.  Some functions are actually named
1973     something starting with __ and the normal name is an alias.  */
1974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1975 choke me
1976 #else
1977 $ac_func();
1978 #endif
1979
1980 ; return 0; }
1981 EOF
1982 if { (eval echo configure:1983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1983   rm -rf conftest*
1984   eval "ac_cv_func_$ac_func=yes"
1985 else
1986   echo "configure: failed program was:" >&5
1987   cat conftest.$ac_ext >&5
1988   rm -rf conftest*
1989   eval "ac_cv_func_$ac_func=no"
1990 fi
1991 rm -f conftest*
1992 fi
1993
1994 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1995   echo "$ac_t""yes" 1>&6
1996     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1997   cat >> confdefs.h <<EOF
1998 #define $ac_tr_func 1
1999 EOF
2000  
2001 else
2002   echo "$ac_t""no" 1>&6
2003 fi
2004 done
2005
2006
2007 echo $ac_n "checking for TIOCGWINSZ ioctl""... $ac_c" 1>&6
2008 echo "configure:2009: checking for TIOCGWINSZ ioctl" >&5
2009 cat > conftest.$ac_ext <<EOF
2010 #line 2011 "configure"
2011 #include "confdefs.h"
2012  #include <stdio.h>
2013       #include <sys/ioctl.h>
2014 int main() {
2015  struct winsize w; int i;
2016       ioctl(fileno(stdout), TIOCGWINSZ, &w);
2017       i = w.ws_col; 
2018 ; return 0; }
2019 EOF
2020 if { (eval echo configure:2021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2021   rm -rf conftest*
2022   jigdo_have_ioctl_winsz="yes"
2023 else
2024   echo "configure: failed program was:" >&5
2025   cat conftest.$ac_ext >&5
2026   rm -rf conftest*
2027   jigdo_have_ioctl_winsz="no"
2028 fi
2029 rm -f conftest*
2030 echo "$ac_t""$jigdo_have_ioctl_winsz" 1>&6
2031 if test "$jigdo_have_ioctl_winsz" = "yes"; then
2032     cat >> confdefs.h <<\EOF
2033 #define HAVE_IOCTL_WINSZ 1
2034 EOF
2035
2036 elif test "$is_windows" = no; then
2037     echo "$ac_t""   * jigdo-file progress reports will not be formatted" 1>&6
2038     echo "$ac_t""   * nicely, because no way has been found to determine" 1>&6
2039     echo "$ac_t""   * the screen width in characters." 1>&6
2040     cat >> confdefs.h <<\EOF
2041 #define HAVE_IOCTL_WINSZ 0
2042 EOF
2043
2044 else
2045     cat >> confdefs.h <<\EOF
2046 #define HAVE_IOCTL_WINSZ 0
2047 EOF
2048
2049 fi
2050
2051 if test "$ac_cv_func_snprintf" = "no" -a "$ac_cv_func__snprintf" = "yes"; then
2052     cat >> confdefs.h <<\EOF
2053 #define snprintf _snprintf
2054 EOF
2055
2056 fi
2057
2058 echo $ac_n "checking for value of --enable-nls""... $ac_c" 1>&6
2059 echo "configure:2060: checking for value of --enable-nls" >&5
2060 # Check whether --enable-nls or --disable-nls was given.
2061 if test "${enable_nls+set}" = set; then
2062   enableval="$enable_nls"
2063   USE_NLS=$enableval
2064 else
2065   USE_NLS=yes
2066 fi
2067
2068 echo "$ac_t""\"$USE_NLS\"" 1>&6
2069
2070 CATALOGS=""
2071 if test "$USE_NLS" = "yes"; then
2072     cat >> confdefs.h <<\EOF
2073 #define ENABLE_NLS 1
2074 EOF
2075
2076
2077     echo $ac_n "checking for dgettext in -lintl""... $ac_c" 1>&6
2078 echo "configure:2079: checking for dgettext in -lintl" >&5
2079 ac_lib_var=`echo intl'_'dgettext | sed 'y%./+-%__p_%'`
2080 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2081   echo $ac_n "(cached) $ac_c" 1>&6
2082 else
2083   ac_save_LIBS="$LIBS"
2084 LIBS="-lintl  $LIBS"
2085 cat > conftest.$ac_ext <<EOF
2086 #line 2087 "configure"
2087 #include "confdefs.h"
2088 /* Override any gcc2 internal prototype to avoid an error.  */
2089 #ifdef __cplusplus
2090 extern "C"
2091 #endif
2092 /* We use char because int might match the return type of a gcc2
2093     builtin and then its argument prototype would still apply.  */
2094 char dgettext();
2095
2096 int main() {
2097 dgettext()
2098 ; return 0; }
2099 EOF
2100 if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2101   rm -rf conftest*
2102   eval "ac_cv_lib_$ac_lib_var=yes"
2103 else
2104   echo "configure: failed program was:" >&5
2105   cat conftest.$ac_ext >&5
2106   rm -rf conftest*
2107   eval "ac_cv_lib_$ac_lib_var=no"
2108 fi
2109 rm -f conftest*
2110 LIBS="$ac_save_LIBS"
2111
2112 fi
2113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2114   echo "$ac_t""yes" 1>&6
2115   x="yes"
2116 else
2117   echo "$ac_t""no" 1>&6
2118 x="no"
2119 fi
2120
2121     if test "$x" = "yes"; then
2122         LIBS="$LIBS -lintl";
2123         echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
2124 echo "configure:2125: checking for iconv in -liconv" >&5
2125 ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
2126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2127   echo $ac_n "(cached) $ac_c" 1>&6
2128 else
2129   ac_save_LIBS="$LIBS"
2130 LIBS="-liconv  $LIBS"
2131 cat > conftest.$ac_ext <<EOF
2132 #line 2133 "configure"
2133 #include "confdefs.h"
2134 /* Override any gcc2 internal prototype to avoid an error.  */
2135 #ifdef __cplusplus
2136 extern "C"
2137 #endif
2138 /* We use char because int might match the return type of a gcc2
2139     builtin and then its argument prototype would still apply.  */
2140 char iconv();
2141
2142 int main() {
2143 iconv()
2144 ; return 0; }
2145 EOF
2146 if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2147   rm -rf conftest*
2148   eval "ac_cv_lib_$ac_lib_var=yes"
2149 else
2150   echo "configure: failed program was:" >&5
2151   cat conftest.$ac_ext >&5
2152   rm -rf conftest*
2153   eval "ac_cv_lib_$ac_lib_var=no"
2154 fi
2155 rm -f conftest*
2156 LIBS="$ac_save_LIBS"
2157
2158 fi
2159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2160   echo "$ac_t""yes" 1>&6
2161   LIBS="$LIBS -liconv"
2162 else
2163   echo "$ac_t""no" 1>&6
2164 fi
2165
2166     fi
2167     ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2168 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2169 echo "configure:2170: checking for libintl.h" >&5
2170 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2171   echo $ac_n "(cached) $ac_c" 1>&6
2172 else
2173   cat > conftest.$ac_ext <<EOF
2174 #line 2175 "configure"
2175 #include "confdefs.h"
2176 #include <libintl.h>
2177 EOF
2178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2179 { (eval echo configure:2180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2181 if test -z "$ac_err"; then
2182   rm -rf conftest*
2183   eval "ac_cv_header_$ac_safe=yes"
2184 else
2185   echo "$ac_err" >&5
2186   echo "configure: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   rm -rf conftest*
2189   eval "ac_cv_header_$ac_safe=no"
2190 fi
2191 rm -f conftest*
2192 fi
2193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2194   echo "$ac_t""yes" 1>&6
2195   x="yes"
2196 else
2197   echo "$ac_t""no" 1>&6
2198 x="no"
2199 fi
2200
2201     if test "$x" = "no"; then
2202         echo "$ac_t""   * Make sure gettext is installed, or use" 1>&6
2203         echo "$ac_t""   * --disable-nls to switch off gettext support." 1>&6
2204         { echo "configure: error: libintl.h not found." 1>&2; exit 1; }
2205     fi
2206     echo $ac_n "checking whether dgettext works""... $ac_c" 1>&6
2207 echo "configure:2208: checking whether dgettext works" >&5
2208     cat > conftest.$ac_ext <<EOF
2209 #line 2210 "configure"
2210 #include "confdefs.h"
2211 #include <libintl.h>
2212 int main() {
2213 dgettext("", "")
2214 ; return 0; }
2215 EOF
2216 if { (eval echo configure:2217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2217   rm -rf conftest*
2218   x="yes"
2219 else
2220   echo "configure: failed program was:" >&5
2221   cat conftest.$ac_ext >&5
2222   rm -rf conftest*
2223   x="no"
2224 fi
2225 rm -f conftest*
2226     echo "$ac_t"""$x"" 1>&6
2227     if test "$x" = "no"; then
2228         echo "$ac_t""   * Make sure gettext is installed, or use" 1>&6
2229         echo "$ac_t""   * --disable-nls to switch off gettext support." 1>&6
2230         { echo "configure: error: dgettext() call could not be linked." 1>&2; exit 1; }
2231     fi
2232     
2233     echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2234 echo "configure:2235: checking for catalogs to be installed" >&5
2235     ALL_LINGUAS=`(cd "$srcdir/po" && echo *.po *.pox "") \
2236         | sed -e "s/\**\.pox* / /g"`
2237     if test "$LINGUAS"; then
2238         NEW_LINGUAS=""
2239         for provided in $ALL_LINGUAS; do
2240             x=""
2241             for wanted in $LINGUAS; do
2242                 case "$provided" in "$wanted"*) x=" $provided";; esac
2243                 case "$wanted" in "$provided"*) x=" $provided";; esac
2244             done
2245             NEW_LINGUAS="$NEW_LINGUAS$x"
2246         done
2247         LINGUAS="$NEW_LINGUAS"
2248         echo "$ac_t""LINGUAS:$LINGUAS" 1>&6
2249     else
2250         LINGUAS="$ALL_LINGUAS"
2251         echo "$ac_t""$LINGUAS" 1>&6
2252     fi
2253     for x in $LINGUAS; do CATALOGS="$CATALOGS $x.gmo"; done
2254 else
2255     cat >> confdefs.h <<\EOF
2256 #define ENABLE_NLS 0
2257 EOF
2258
2259 fi
2260
2261
2262 echo $ac_n "checking for value of --enable-debug""... $ac_c" 1>&6
2263 echo "configure:2264: checking for value of --enable-debug" >&5
2264 # Check whether --enable-debug or --disable-debug was given.
2265 if test "${enable_debug+set}" = set; then
2266   enableval="$enable_debug"
2267   jigdo_debug=$enableval
2268 else
2269   jigdo_debug=no
2270 fi
2271
2272 echo "$ac_t""\"$jigdo_debug\"" 1>&6
2273 DEBUG_PROGRAMS=""
2274 if test "$jigdo_debug" = yes; then
2275     cat >> confdefs.h <<\EOF
2276 #define DEBUG 1
2277 EOF
2278
2279     DEBUG_PROGRAMS='$(debug-programs)'
2280 elif test "$jigdo_debug" != no; then
2281     { echo "configure: error: Invalid argument to --enable-debug option" 1>&2; exit 1; }
2282 else
2283     cat >> confdefs.h <<\EOF
2284 #define DEBUG 0
2285 EOF
2286
2287 fi
2288
2289
2290 echo $ac_n "checking for value of --enable-ccmalloc""... $ac_c" 1>&6
2291 echo "configure:2292: checking for value of --enable-ccmalloc" >&5
2292 # Check whether --enable-ccmalloc or --disable-ccmalloc was given.
2293 if test "${enable_ccmalloc+set}" = set; then
2294   enableval="$enable_ccmalloc"
2295   jigdo_ccmalloc=$enableval
2296 else
2297   jigdo_ccmalloc=no
2298 fi
2299
2300 echo "$ac_t""\"$jigdo_ccmalloc\"" 1>&6
2301 CCMALLOC=""
2302 if test "$jigdo_ccmalloc" = yes; then
2303     cat >> confdefs.h <<\EOF
2304 #define CCMALLOC 1
2305 EOF
2306
2307     CCMALLOC='$(CCMALLOC)'
2308 elif test "$jigdo_ccmalloc" != no; then
2309     { echo "configure: error: Invalid argument to --enable-ccmalloc option" 1>&2; exit 1; }
2310 else
2311     cat >> confdefs.h <<\EOF
2312 #define CCMALLOC 0
2313 EOF
2314
2315 fi
2316
2317
2318 touch "$srcdir/src/TAGS"
2319
2320 if test "$jigdo_gui" = "yes"; then
2321     BUILD_TARGETS="jigdo-file$exe jigdo$exe #"
2322     INSTALL_TARGETS="install-jigdo-file install-jigdo-lite install-jigdo #"
2323 else
2324     BUILD_TARGETS="jigdo-file$exe # jigdo$exe"
2325     INSTALL_TARGETS="install-jigdo-file install-jigdo-lite # install-jigdo"
2326 fi
2327
2328
2329
2330 SRC_MAKEDEPS="$srcdir/src/Makedeps"
2331
2332
2333 trap '' 1 2 15
2334 cat > confcache <<\EOF
2335 # This file is a shell script that caches the results of configure
2336 # tests run on this system so they can be shared between configure
2337 # scripts and configure runs.  It is not useful on other systems.
2338 # If it contains results you don't want to keep, you may remove or edit it.
2339 #
2340 # By default, configure uses ./config.cache as the cache file,
2341 # creating it if it does not exist already.  You can give configure
2342 # the --cache-file=FILE option to use a different cache file; that is
2343 # what configure does when it calls configure scripts in
2344 # subdirectories, so they share the cache.
2345 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2346 # config.status only pays attention to the cache file if you give it the
2347 # --recheck option to rerun configure.
2348 #
2349 EOF
2350 # The following way of writing the cache mishandles newlines in values,
2351 # but we know of no workaround that is simple, portable, and efficient.
2352 # So, don't put newlines in cache variables' values.
2353 # Ultrix sh set writes to stderr and can't be redirected directly,
2354 # and sets the high bit in the cache file unless we assign to the vars.
2355 (set) 2>&1 |
2356   case `(ac_space=' '; set | grep ac_space) 2>&1` in
2357   *ac_space=\ *)
2358     # `set' does not quote correctly, so add quotes (double-quote substitution
2359     # turns \\\\ into \\, and sed turns \\ into \).
2360     sed -n \
2361       -e "s/'/'\\\\''/g" \
2362       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2363     ;;
2364   *)
2365     # `set' quotes correctly as required by POSIX, so do not add quotes.
2366     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2367     ;;
2368   esac >> confcache
2369 if cmp -s $cache_file confcache; then
2370   :
2371 else
2372   if test -w $cache_file; then
2373     echo "updating cache $cache_file"
2374     cat confcache > $cache_file
2375   else
2376     echo "not updating unwritable cache $cache_file"
2377   fi
2378 fi
2379 rm -f confcache
2380
2381 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2382
2383 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2384 # Let make expand exec_prefix.
2385 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2386
2387 # Any assignment to VPATH causes Sun make to only execute
2388 # the first set of double-colon rules, so remove it if not needed.
2389 # If there is a colon in the path, we need to keep it.
2390 if test "x$srcdir" = x.; then
2391   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2392 fi
2393
2394 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2395
2396 DEFS=-DHAVE_CONFIG_H
2397
2398 # Without the "./", some shells look in PATH for config.status.
2399 : ${CONFIG_STATUS=./config.status}
2400
2401 echo creating $CONFIG_STATUS
2402 rm -f $CONFIG_STATUS
2403 cat > $CONFIG_STATUS <<EOF
2404 #! /bin/sh
2405 # Generated automatically by configure.
2406 # Run this file to recreate the current configuration.
2407 # This directory was configured as follows,
2408 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2409 #
2410 # $0 $ac_configure_args
2411 #
2412 # Compiler output produced by configure, useful for debugging
2413 # configure, is in ./config.log if it exists.
2414
2415 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2416 for ac_option
2417 do
2418   case "\$ac_option" in
2419   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2420     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2421     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2422   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2423     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2424     exit 0 ;;
2425   -help | --help | --hel | --he | --h)
2426     echo "\$ac_cs_usage"; exit 0 ;;
2427   *) echo "\$ac_cs_usage"; exit 1 ;;
2428   esac
2429 done
2430
2431 ac_given_srcdir=$srcdir
2432 ac_given_INSTALL="$INSTALL"
2433
2434 trap 'rm -fr `echo "Makefile doc/Makefile src/Makefile po/Makefile src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2435 EOF
2436 cat >> $CONFIG_STATUS <<EOF
2437
2438 # Protect against being on the right side of a sed subst in config.status.
2439 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2440  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2441 $ac_vpsub
2442 $extrasub
2443 s%@SHELL@%$SHELL%g
2444 s%@CFLAGS@%$CFLAGS%g
2445 s%@CPPFLAGS@%$CPPFLAGS%g
2446 s%@CXXFLAGS@%$CXXFLAGS%g
2447 s%@FFLAGS@%$FFLAGS%g
2448 s%@DEFS@%$DEFS%g
2449 s%@LDFLAGS@%$LDFLAGS%g
2450 s%@LIBS@%$LIBS%g
2451 s%@exec_prefix@%$exec_prefix%g
2452 s%@prefix@%$prefix%g
2453 s%@program_transform_name@%$program_transform_name%g
2454 s%@bindir@%$bindir%g
2455 s%@sbindir@%$sbindir%g
2456 s%@libexecdir@%$libexecdir%g
2457 s%@datadir@%$datadir%g
2458 s%@sysconfdir@%$sysconfdir%g
2459 s%@sharedstatedir@%$sharedstatedir%g
2460 s%@localstatedir@%$localstatedir%g
2461 s%@libdir@%$libdir%g
2462 s%@includedir@%$includedir%g
2463 s%@oldincludedir@%$oldincludedir%g
2464 s%@infodir@%$infodir%g
2465 s%@mandir@%$mandir%g
2466 s%@JIGDO_VERSION@%$JIGDO_VERSION%g
2467 s%@AWK@%$AWK%g
2468 s%@CC@%$CC%g
2469 s%@CXX@%$CXX%g
2470 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2471 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
2472 s%@INSTALL_DATA@%$INSTALL_DATA%g
2473 s%@CXXCPP@%$CXXCPP%g
2474 s%@GTKCFLAGS@%$GTKCFLAGS%g
2475 s%@GTKLIBS@%$GTKLIBS%g
2476 s%@LIBWWWCFLAGS@%$LIBWWWCFLAGS%g
2477 s%@LIBWWWLIBS@%$LIBWWWLIBS%g
2478 s%@exe@%$exe%g
2479 s%@USE_NLS@%$USE_NLS%g
2480 s%@CATALOGS@%$CATALOGS%g
2481 s%@DEBUG_PROGRAMS@%$DEBUG_PROGRAMS%g
2482 s%@CCMALLOC@%$CCMALLOC%g
2483 s%@BUILD_TARGETS@%$BUILD_TARGETS%g
2484 s%@INSTALL_TARGETS@%$INSTALL_TARGETS%g
2485 /@SRC_MAKEDEPS@/r $SRC_MAKEDEPS
2486 s%@SRC_MAKEDEPS@%%g
2487
2488 CEOF
2489 EOF
2490
2491 cat >> $CONFIG_STATUS <<\EOF
2492
2493 # Split the substitutions into bite-sized pieces for seds with
2494 # small command number limits, like on Digital OSF/1 and HP-UX.
2495 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2496 ac_file=1 # Number of current file.
2497 ac_beg=1 # First line for current file.
2498 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2499 ac_more_lines=:
2500 ac_sed_cmds=""
2501 while $ac_more_lines; do
2502   if test $ac_beg -gt 1; then
2503     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2504   else
2505     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2506   fi
2507   if test ! -s conftest.s$ac_file; then
2508     ac_more_lines=false
2509     rm -f conftest.s$ac_file
2510   else
2511     if test -z "$ac_sed_cmds"; then
2512       ac_sed_cmds="sed -f conftest.s$ac_file"
2513     else
2514       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2515     fi
2516     ac_file=`expr $ac_file + 1`
2517     ac_beg=$ac_end
2518     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2519   fi
2520 done
2521 if test -z "$ac_sed_cmds"; then
2522   ac_sed_cmds=cat
2523 fi
2524 EOF
2525
2526 cat >> $CONFIG_STATUS <<EOF
2527
2528 CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile src/Makefile po/Makefile"}
2529 EOF
2530 cat >> $CONFIG_STATUS <<\EOF
2531 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2532   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2533   case "$ac_file" in
2534   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2535        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2536   *) ac_file_in="${ac_file}.in" ;;
2537   esac
2538
2539   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2540
2541   # Remove last slash and all that follows it.  Not all systems have dirname.
2542   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2543   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2544     # The file is in a subdirectory.
2545     test ! -d "$ac_dir" && mkdir "$ac_dir"
2546     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2547     # A "../" for each directory in $ac_dir_suffix.
2548     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2549   else
2550     ac_dir_suffix= ac_dots=
2551   fi
2552
2553   case "$ac_given_srcdir" in
2554   .)  srcdir=.
2555       if test -z "$ac_dots"; then top_srcdir=.
2556       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2557   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2558   *) # Relative path.
2559     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2560     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2561   esac
2562
2563   case "$ac_given_INSTALL" in
2564   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2565   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2566   esac
2567
2568   echo creating "$ac_file"
2569   rm -f "$ac_file"
2570   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2571   case "$ac_file" in
2572   *Makefile*) ac_comsub="1i\\
2573 # $configure_input" ;;
2574   *) ac_comsub= ;;
2575   esac
2576
2577   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2578   sed -e "$ac_comsub
2579 s%@configure_input@%$configure_input%g
2580 s%@srcdir@%$srcdir%g
2581 s%@top_srcdir@%$top_srcdir%g
2582 s%@INSTALL@%$INSTALL%g
2583 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2584 fi; done
2585 rm -f conftest.s*
2586
2587 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2588 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2589 #
2590 # ac_d sets the value in "#define NAME VALUE" lines.
2591 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2592 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2593 ac_dC='\3'
2594 ac_dD='%g'
2595 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2596 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2597 ac_uB='\([      ]\)%\1#\2define\3'
2598 ac_uC=' '
2599 ac_uD='\4%g'
2600 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2601 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2602 ac_eB='$%\1#\2define\3'
2603 ac_eC=' '
2604 ac_eD='%g'
2605
2606 if test "${CONFIG_HEADERS+set}" != set; then
2607 EOF
2608 cat >> $CONFIG_STATUS <<EOF
2609   CONFIG_HEADERS="src/config.h"
2610 EOF
2611 cat >> $CONFIG_STATUS <<\EOF
2612 fi
2613 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2614   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2615   case "$ac_file" in
2616   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2617        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2618   *) ac_file_in="${ac_file}.in" ;;
2619   esac
2620
2621   echo creating $ac_file
2622
2623   rm -f conftest.frag conftest.in conftest.out
2624   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2625   cat $ac_file_inputs > conftest.in
2626
2627 EOF
2628
2629 # Transform confdefs.h into a sed script conftest.vals that substitutes
2630 # the proper values into config.h.in to produce config.h.  And first:
2631 # Protect against being on the right side of a sed subst in config.status.
2632 # Protect against being in an unquoted here document in config.status.
2633 rm -f conftest.vals
2634 cat > conftest.hdr <<\EOF
2635 s/[\\&%]/\\&/g
2636 s%[\\$`]%\\&%g
2637 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2638 s%ac_d%ac_u%gp
2639 s%ac_u%ac_e%gp
2640 EOF
2641 sed -n -f conftest.hdr confdefs.h > conftest.vals
2642 rm -f conftest.hdr
2643
2644 # This sed command replaces #undef with comments.  This is necessary, for
2645 # example, in the case of _POSIX_SOURCE, which is predefined and required
2646 # on some systems where configure will not decide to define it.
2647 cat >> conftest.vals <<\EOF
2648 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2649 EOF
2650
2651 # Break up conftest.vals because some shells have a limit on
2652 # the size of here documents, and old seds have small limits too.
2653
2654 rm -f conftest.tail
2655 while :
2656 do
2657   ac_lines=`grep -c . conftest.vals`
2658   # grep -c gives empty output for an empty file on some AIX systems.
2659   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2660   # Write a limited-size here document to conftest.frag.
2661   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2662   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2663   echo 'CEOF
2664   sed -f conftest.frag conftest.in > conftest.out
2665   rm -f conftest.in
2666   mv conftest.out conftest.in
2667 ' >> $CONFIG_STATUS
2668   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2669   rm -f conftest.vals
2670   mv conftest.tail conftest.vals
2671 done
2672 rm -f conftest.vals
2673
2674 cat >> $CONFIG_STATUS <<\EOF
2675   rm -f conftest.frag conftest.h
2676   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2677   cat conftest.in >> conftest.h
2678   rm -f conftest.in
2679   if cmp -s $ac_file conftest.h 2>/dev/null; then
2680     echo "$ac_file is unchanged"
2681     rm -f conftest.h
2682   else
2683     # Remove last slash and all that follows it.  Not all systems have dirname.
2684       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2685       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2686       # The file is in a subdirectory.
2687       test ! -d "$ac_dir" && mkdir "$ac_dir"
2688     fi
2689     rm -f $ac_file
2690     mv conftest.h $ac_file
2691   fi
2692 fi; done
2693
2694 EOF
2695 cat >> $CONFIG_STATUS <<EOF
2696
2697 EOF
2698 cat >> $CONFIG_STATUS <<\EOF
2699
2700 exit 0
2701 EOF
2702 chmod +x $CONFIG_STATUS
2703 rm -fr confdefs* $ac_clean_files
2704 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2705