1#!/bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.1
5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14
15# Initialize some variables set by options.
16# The variables have the same names as the options, with
17# dashes changed to underlines.
18build=NONE
19cache_file=./config.cache
20exec_prefix=NONE
21host=NONE
22no_create=
23nonopt=NONE
24no_recursion=
25prefix=NONE
26program_prefix=NONE
27program_suffix=NONE
28program_transform_name=s,x,x,
29silent=
30site=
31srcdir=
32target=NONE
33verbose=
34x_includes=NONE
35x_libraries=NONE
36
37# Initialize some other variables.
38subdirs=
39
40ac_prev=
41for ac_option
42do
43
44  # If the previous option needs an argument, assign it.
45  if test -n "$ac_prev"; then
46    eval "$ac_prev=\$ac_option"
47    ac_prev=
48    continue
49  fi
50
51  case "$ac_option" in
52  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
53  *) ac_optarg= ;;
54  esac
55
56  # Accept the important Cygnus configure options, so we can diagnose typos.
57
58  case "$ac_option" in
59
60  -build | --build | --buil | --bui | --bu | --b)
61    ac_prev=build ;;
62  -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
63    build="$ac_optarg" ;;
64
65  -cache-file | --cache-file | --cache-fil | --cache-fi \
66  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
67    ac_prev=cache_file ;;
68  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
69  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
70    cache_file="$ac_optarg" ;;
71
72  -disable-* | --disable-*)
73    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
74    # Reject names that are not valid shell variable names.
75    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
76      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
77    fi
78    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
79    eval "enable_${ac_feature}=no" ;;
80
81  -enable-* | --enable-*)
82    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
83    # Reject names that are not valid shell variable names.
84    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
85      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
86    fi
87    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
88    case "$ac_option" in
89      *=*) ;;
90      *) ac_optarg=yes ;;
91    esac
92    eval "enable_${ac_feature}='$ac_optarg'" ;;
93
94  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
95  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
96  | --exec | --exe | --ex)
97    ac_prev=exec_prefix ;;
98  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
99  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
100  | --exec=* | --exe=* | --ex=*)
101    exec_prefix="$ac_optarg" ;;
102
103  -gas | --gas | --ga | --g)
104    # Obsolete; use --with-gas.
105    with_gas=yes ;;
106
107  -help | --help | --hel | --he)
108    # Omit some internal or obsolete options to make the list less imposing.
109    # This message is too long to be a string in the A/UX 3.1 sh.
110    cat << EOF
111Usage: configure [options] [host]
112Options: [defaults in brackets after descriptions]
113Configuration:
114  --cache-file=FILE       cache test results in FILE
115  --help                  print this message
116  --no-create             do not create output files
117  --quiet, --silent       do not print \`checking...' messages
118  --version               print the version of autoconf that created configure
119Directory and file names:
120  --prefix=PREFIX         install architecture-independent files in PREFIX
121                          [$ac_default_prefix]
122  --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
123                          [same as prefix]
124  --srcdir=DIR            find the sources in DIR [configure dir or ..]
125  --program-prefix=PREFIX prepend PREFIX to installed program names
126  --program-suffix=SUFFIX append SUFFIX to installed program names
127  --program-transform-name=PROGRAM run sed PROGRAM on installed program names
128Host type:
129  --build=BUILD           configure for building on BUILD [BUILD=HOST]
130  --host=HOST             configure for HOST [guessed]
131  --target=TARGET         configure for TARGET [TARGET=HOST]
132Features and packages:
133  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
134  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
135  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
136  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
137  --x-includes=DIR        X include files are in DIR
138  --x-libraries=DIR       X library files are in DIR
139--enable and --with options recognized:$ac_help
140EOF
141    exit 0 ;;
142
143  -host | --host | --hos | --ho)
144    ac_prev=host ;;
145  -host=* | --host=* | --hos=* | --ho=*)
146    host="$ac_optarg" ;;
147
148  -nfp | --nfp | --nf)
149    # Obsolete; use --without-fp.
150    with_fp=no ;;
151
152  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
153  | --no-cr | --no-c)
154    no_create=yes ;;
155
156  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
157  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
158    no_recursion=yes ;;
159
160  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
161    ac_prev=prefix ;;
162  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
163    prefix="$ac_optarg" ;;
164
165  -program-prefix | --program-prefix | --program-prefi | --program-pref \
166  | --program-pre | --program-pr | --program-p)
167    ac_prev=program_prefix ;;
168  -program-prefix=* | --program-prefix=* | --program-prefi=* \
169  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
170    program_prefix="$ac_optarg" ;;
171
172  -program-suffix | --program-suffix | --program-suffi | --program-suff \
173  | --program-suf | --program-su | --program-s)
174    ac_prev=program_suffix ;;
175  -program-suffix=* | --program-suffix=* | --program-suffi=* \
176  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
177    program_suffix="$ac_optarg" ;;
178
179  -program-transform-name | --program-transform-name \
180  | --program-transform-nam | --program-transform-na \
181  | --program-transform-n | --program-transform- \
182  | --program-transform | --program-transfor \
183  | --program-transfo | --program-transf \
184  | --program-trans | --program-tran \
185  | --progr-tra | --program-tr | --program-t)
186    ac_prev=program_transform_name ;;
187  -program-transform-name=* | --program-transform-name=* \
188  | --program-transform-nam=* | --program-transform-na=* \
189  | --program-transform-n=* | --program-transform-=* \
190  | --program-transform=* | --program-transfor=* \
191  | --program-transfo=* | --program-transf=* \
192  | --program-trans=* | --program-tran=* \
193  | --progr-tra=* | --program-tr=* | --program-t=*)
194    program_transform_name="$ac_optarg" ;;
195
196  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
197  | -silent | --silent | --silen | --sile | --sil)
198    silent=yes ;;
199
200  -site | --site | --sit)
201    ac_prev=site ;;
202  -site=* | --site=* | --sit=*)
203    site="$ac_optarg" ;;
204
205  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
206    ac_prev=srcdir ;;
207  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
208    srcdir="$ac_optarg" ;;
209
210  -target | --target | --targe | --targ | --tar | --ta | --t)
211    ac_prev=target ;;
212  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
213    target="$ac_optarg" ;;
214
215  -v | -verbose | --verbose | --verbos | --verbo | --verb)
216    verbose=yes ;;
217
218  -version | --version | --versio | --versi | --vers)
219    echo "configure generated by autoconf version 2.1"
220    exit 0 ;;
221
222  -with-* | --with-*)
223    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
224    # Reject names that are not valid shell variable names.
225    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
226      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
227    fi
228    ac_package=`echo $ac_package| sed 's/-/_/g'`
229    case "$ac_option" in
230      *=*) ;;
231      *) ac_optarg=yes ;;
232    esac
233    eval "with_${ac_package}='$ac_optarg'" ;;
234
235  -without-* | --without-*)
236    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
237    # Reject names that are not valid shell variable names.
238    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
239      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
240    fi
241    ac_package=`echo $ac_package| sed 's/-/_/g'`
242    eval "with_${ac_package}=no" ;;
243
244  --x)
245    # Obsolete; use --with-x.
246    with_x=yes ;;
247
248  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
249  | --x-incl | --x-inc | --x-in | --x-i)
250    ac_prev=x_includes ;;
251  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
252  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
253    x_includes="$ac_optarg" ;;
254
255  -x-libraries | --x-libraries | --x-librarie | --x-librari \
256  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
257    ac_prev=x_libraries ;;
258  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
259  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
260    x_libraries="$ac_optarg" ;;
261
262  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
263    ;;
264
265  *)
266    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
267      echo "configure: warning: $ac_option: invalid host type" 1>&2
268    fi
269    if test "x$nonopt" != xNONE; then
270      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
271    fi
272    nonopt="$ac_option"
273    ;;
274
275  esac
276done
277
278if test -n "$ac_prev"; then
279  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
280fi
281
282trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
283
284# File descriptor usage:
285# 0 unused; standard input
286# 1 file creation
287# 2 errors and warnings
288# 3 unused; some systems may open it to /dev/tty
289# 4 checking for... messages and results
290# 5 compiler messages saved in config.log
291if test "$silent" = yes; then
292  exec 4>/dev/null
293else
294  exec 4>&1
295fi
296exec 5>./config.log
297
298echo "\
299This file contains any messages produced by compilers while
300running configure, to aid debugging if configure makes a mistake.
301" 1>&5
302
303# Strip out --no-create and --no-recursion so they do not pile up.
304# Also quote any args containing shell metacharacters.
305ac_configure_args=
306for ac_arg
307do
308  case "$ac_arg" in
309  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
310  | --no-cr | --no-c) ;;
311  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
312  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
313  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
314  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
315  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
316  esac
317done
318
319# NLS nuisances.
320# Only set LANG and LC_ALL to C if already set.
321# These must not be set unconditionally because not all systems understand
322# e.g. LANG=C (notably SCO).
323if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
324if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
325
326# confdefs.h avoids OS command line length limits that DEFS can exceed.
327rm -rf conftest* confdefs.h
328# AIX cpp loses on an empty file, so make sure it contains at least a newline.
329echo > confdefs.h
330
331# A filename unique to this package, relative to the directory that
332# configure is in, which we can look for to find out if srcdir is correct.
333ac_unique_file=vp_global.h
334
335# Find the source files, if location was not specified.
336if test -z "$srcdir"; then
337  ac_srcdir_defaulted=yes
338  # Try the directory containing this script, then its parent.
339  ac_prog=$0
340  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
341  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
342  srcdir=$ac_confdir
343  if test ! -r $srcdir/$ac_unique_file; then
344    srcdir=..
345  fi
346else
347  ac_srcdir_defaulted=no
348fi
349if test ! -r $srcdir/$ac_unique_file; then
350  if test "$ac_srcdir_defaulted" = yes; then
351    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
352  else
353    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
354  fi
355fi
356srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
357
358# Prefer explicitly selected file to automatically selected ones.
359if test -z "$CONFIG_SITE"; then
360  if test "x$prefix" != xNONE; then
361    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
362  else
363    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
364  fi
365fi
366for ac_site_file in $CONFIG_SITE; do
367  if test -r "$ac_site_file"; then
368    echo "loading site script $ac_site_file"
369    . "$ac_site_file"
370  fi
371done
372
373if test -r "$cache_file"; then
374  echo "loading cache $cache_file"
375  . $cache_file
376else
377  echo "creating cache $cache_file"
378  > $cache_file
379fi
380
381ac_ext=c
382# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
383ac_cpp='$CPP $CPPFLAGS'
384ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
385ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
386
387if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
388  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
389  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
390    ac_n= ac_c='
391' ac_t='	'
392  else
393    ac_n=-n ac_c= ac_t=
394  fi
395else
396  ac_n= ac_c='\c' ac_t=
397fi
398
399
400
401
402ac_aux_dir=
403for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
404  if test -f $ac_dir/install-sh; then
405    ac_aux_dir=$ac_dir
406    ac_install_sh="$ac_aux_dir/install-sh -c"
407    break
408  elif test -f $ac_dir/install.sh; then
409    ac_aux_dir=$ac_dir
410    ac_install_sh="$ac_aux_dir/install.sh -c"
411    break
412  fi
413done
414if test -z "$ac_aux_dir"; then
415  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
416fi
417ac_config_guess=$ac_aux_dir/config.guess
418ac_config_sub=$ac_aux_dir/config.sub
419ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
420
421
422# Make sure we can run config.sub.
423if $ac_config_sub sun4 >/dev/null 2>&1; then :
424else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
425fi
426
427echo $ac_n "checking host system type""... $ac_c" 1>&4
428
429host_alias=$host
430case "$host_alias" in
431NONE)
432  case $nonopt in
433  NONE)
434    if host_alias=`$ac_config_guess`; then :
435    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
436    fi ;;
437  *) host_alias=$nonopt ;;
438  esac ;;
439esac
440
441host=`$ac_config_sub $host_alias`
442host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
443host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
444host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
445echo "$ac_t""$host" 1>&4
446
447
448case "$host" in
449*-irix*)
450  test -n "$silent" || echo "choosing compiler flags for SGI Irix"
451  OFLAGS="-O -Olimit 2500 -float"
452  ;;
453*-ultrix*)
454  test -n "$silent" || echo "choosing compiler flags for DEC Ultrix"
455  OFLAGS="-O -Olimit 2500 -float"
456  MFLAGS=
457  ;;
458*-sunos*)
459  test -n "$silent" || echo "choosing compiler flags for SunOS"
460  OFLAGS="-O"
461  MFLAGS=
462  ;;
463*-hpux*)
464  test -n "$silent" || echo "choosing compiler flags for HP-UX"
465  # thanks to Mike Goss (goss@cs.colostate.edu)
466  OFLAGS="-Aa +O3 -J +Obb1600"
467  MFLAGS="-D_HPUX_SOURCE"
468  ;;
469*)
470  echo "Unrecognized system type $host.  Using generic compiler options."
471  OFLAGS=
472  MFLAGS=
473  ;;
474esac
475
476
477
478# Find a good install program.  We prefer a C program (faster),
479# so one script is as good as another.  But avoid the broken or
480# incompatible versions:
481# SysV /etc/install, /usr/sbin/install
482# SunOS /usr/etc/install
483# IRIX /sbin/install
484# AIX /bin/install
485# AFS /usr/afsws/bin/install, which mishandles nonexistent args
486# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
487# ./install, which can be erroneously created by make from ./install.sh.
488echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
489if test -z "$INSTALL"; then
490if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
491  echo $ac_n "(cached) $ac_c" 1>&4
492else
493    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
494  for ac_dir in $PATH; do
495    case "$ac_dir" in
496    ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
497    *)
498      # OSF1 and SCO ODT 3.0 have their own names for install.
499      for ac_prog in ginstall installbsd scoinst install; do
500        if test -f $ac_dir/$ac_prog; then
501	  if test $ac_prog = install &&
502            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
503	    # AIX install.  It has an incompatible calling convention.
504	    # OSF/1 installbsd also uses dspmsg, but is usable.
505	    :
506	  else
507	    ac_cv_path_install="$ac_dir/$ac_prog -c"
508	    break 2
509	  fi
510	fi
511      done
512      ;;
513    esac
514  done
515  IFS="$ac_save_ifs"
516  # As a last resort, use the slow shell script.
517  test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
518fi
519  INSTALL="$ac_cv_path_install"
520fi
521echo "$ac_t""$INSTALL" 1>&4
522
523# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
524# It thinks the first close brace ends the variable substitution.
525test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
526
527test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
528
529# Extract the first word of "ranlib", so it can be a program name with args.
530set dummy ranlib; ac_word=$2
531echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
532if eval "test \"`echo '${'ac_cv_prog_RANLIB'+set}'`\" = set"; then
533  echo $ac_n "(cached) $ac_c" 1>&4
534else
535  if test -n "$RANLIB"; then
536  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
537else
538  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
539  for ac_dir in $PATH; do
540    test -z "$ac_dir" && ac_dir=.
541    if test -f $ac_dir/$ac_word; then
542      ac_cv_prog_RANLIB="ranlib"
543      break
544    fi
545  done
546  IFS="$ac_save_ifs"
547  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
548fi
549fi
550RANLIB="$ac_cv_prog_RANLIB"
551if test -n "$RANLIB"; then
552  echo "$ac_t""$RANLIB" 1>&4
553else
554  echo "$ac_t""no" 1>&4
555fi
556
557CC=${CC-cc}
558
559
560if test -z "$M4" ; then
561  case "$host" in
562  *-sunos*)
563    echo "checking /usr/5bin/m4" 1>&4
564    if test -f /usr/5bin/m4; then
565      M4="/usr/5bin/m4"
566    fi
567    ;;
568  esac
569fi
570for ac_prog in gnum4 gm4 m4
571do
572# Extract the first word of "$ac_prog", so it can be a program name with args.
573set dummy $ac_prog; ac_word=$2
574echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
575if eval "test \"`echo '${'ac_cv_path_M4'+set}'`\" = set"; then
576  echo $ac_n "(cached) $ac_c" 1>&4
577else
578  case "$M4" in
579  /*)
580  ac_cv_path_M4="$M4" # Let the user override the test with a path.
581  ;;
582  *)
583  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
584  for ac_dir in $PATH; do
585    test -z "$ac_dir" && ac_dir=.
586    if test -f $ac_dir/$ac_word; then
587      ac_cv_path_M4="$ac_dir/$ac_word"
588      break
589    fi
590  done
591  IFS="$ac_save_ifs"
592  ;;
593esac
594fi
595M4="$ac_cv_path_M4"
596if test -n "$M4"; then
597  echo "$ac_t""$M4" 1>&4
598else
599  echo "$ac_t""no" 1>&4
600fi
601
602test -n "$M4" && break
603done
604test -n "$M4" || M4="m4"
605
606echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4
607# On Suns, sometimes $CPP names a directory.
608if test -n "$CPP" && test -d "$CPP"; then
609  CPP=
610fi
611if test -z "$CPP"; then
612if eval "test \"`echo '${'ac_cv_prog_CPP'+set}'`\" = set"; then
613  echo $ac_n "(cached) $ac_c" 1>&4
614else
615    # This must be in double quotes, not single quotes, because CPP may get
616  # substituted into the Makefile and "${CC-cc}" will confuse make.
617  CPP="${CC-cc} -E"
618  # On the NeXT, cc -E runs the code through the compiler's parser,
619  # not just through cpp.
620  cat > conftest.$ac_ext <<EOF
621#line 622 "configure"
622#include "confdefs.h"
623#include <assert.h>
624Syntax Error
625EOF
626eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
627ac_err=`grep -v '^ *+' conftest.out`
628if test -z "$ac_err"; then
629  :
630else
631  echo "$ac_err" >&5
632  rm -rf conftest*
633  CPP="${CC-cc} -E -traditional-cpp"
634  cat > conftest.$ac_ext <<EOF
635#line 636 "configure"
636#include "confdefs.h"
637#include <assert.h>
638Syntax Error
639EOF
640eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
641ac_err=`grep -v '^ *+' conftest.out`
642if test -z "$ac_err"; then
643  :
644else
645  echo "$ac_err" >&5
646  rm -rf conftest*
647  CPP=/lib/cpp
648fi
649rm -f conftest*
650fi
651rm -f conftest*
652  ac_cv_prog_CPP="$CPP"
653fi
654fi
655CPP="$ac_cv_prog_CPP"
656echo "$ac_t""$CPP" 1>&4
657
658# If we cannot run a trivial program, we must be cross compiling.
659echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&4
660if eval "test \"`echo '${'ac_cv_c_cross'+set}'`\" = set"; then
661  echo $ac_n "(cached) $ac_c" 1>&4
662else
663  if test "$cross_compiling" = yes; then
664  ac_cv_cross=yes
665else
666cat > conftest.$ac_ext <<EOF
667#line 668 "configure"
668#include "confdefs.h"
669main(){return(0);}
670EOF
671eval $ac_link
672if test -s conftest && (./conftest; exit) 2>/dev/null; then
673  ac_cv_c_cross=no
674else
675  ac_cv_c_cross=yes
676fi
677fi
678rm -fr conftest*
679fi
680cross_compiling=$ac_cv_c_cross
681echo "$ac_t""$ac_cv_c_cross" 1>&4
682
683echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&4
684if eval "test \"`echo '${'ac_cv_header_stdc'+set}'`\" = set"; then
685  echo $ac_n "(cached) $ac_c" 1>&4
686else
687  cat > conftest.$ac_ext <<EOF
688#line 689 "configure"
689#include "confdefs.h"
690#include <stdlib.h>
691#include <stdarg.h>
692#include <string.h>
693#include <float.h>
694EOF
695eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
696ac_err=`grep -v '^ *+' conftest.out`
697if test -z "$ac_err"; then
698  rm -rf conftest*
699  ac_cv_header_stdc=yes
700else
701  echo "$ac_err" >&5
702  rm -rf conftest*
703  ac_cv_header_stdc=no
704fi
705rm -f conftest*
706
707if test $ac_cv_header_stdc = yes; then
708  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
709cat > conftest.$ac_ext <<EOF
710#line 711 "configure"
711#include "confdefs.h"
712#include <string.h>
713EOF
714if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
715  egrep "memchr" >/dev/null 2>&1; then
716  :
717else
718  rm -rf conftest*
719  ac_cv_header_stdc=no
720fi
721rm -f conftest*
722
723fi
724
725if test $ac_cv_header_stdc = yes; then
726  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
727cat > conftest.$ac_ext <<EOF
728#line 729 "configure"
729#include "confdefs.h"
730#include <stdlib.h>
731EOF
732if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
733  egrep "free" >/dev/null 2>&1; then
734  :
735else
736  rm -rf conftest*
737  ac_cv_header_stdc=no
738fi
739rm -f conftest*
740
741fi
742
743if test $ac_cv_header_stdc = yes; then
744  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
745if test "$cross_compiling" = yes; then
746  ac_cv_header_stdc=no
747else
748cat > conftest.$ac_ext <<EOF
749#line 750 "configure"
750#include "confdefs.h"
751#include <ctype.h>
752#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
753#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
754#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
755int main () { int i; for (i = 0; i < 256; i++)
756if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
757exit (0); }
758
759EOF
760eval $ac_link
761if test -s conftest && (./conftest; exit) 2>/dev/null; then
762  :
763else
764  ac_cv_header_stdc=no
765fi
766fi
767rm -fr conftest*
768fi
769fi
770echo "$ac_t""$ac_cv_header_stdc" 1>&4
771if test $ac_cv_header_stdc = yes; then
772  cat >> confdefs.h <<\EOF
773#define STDC_HEADERS 1
774EOF
775
776fi
777
778for ac_hdr in string.h memory.h
779do
780ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
781echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&4
782if eval "test \"`echo '${'ac_cv_header_$ac_safe'+set}'`\" = set"; then
783  echo $ac_n "(cached) $ac_c" 1>&4
784else
785  cat > conftest.$ac_ext <<EOF
786#line 787 "configure"
787#include "confdefs.h"
788#include <$ac_hdr>
789EOF
790eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
791ac_err=`grep -v '^ *+' conftest.out`
792if test -z "$ac_err"; then
793  rm -rf conftest*
794  eval "ac_cv_header_$ac_safe=yes"
795else
796  echo "$ac_err" >&5
797  rm -rf conftest*
798  eval "ac_cv_header_$ac_safe=no"
799fi
800rm -f conftest*
801fi
802if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
803  echo "$ac_t""yes" 1>&4
804    ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
805  cat >> confdefs.h <<EOF
806#define $ac_tr_hdr 1
807EOF
808
809else
810  echo "$ac_t""no" 1>&4
811fi
812done
813
814
815echo $ac_n "checking for vprintf""... $ac_c" 1>&4
816if eval "test \"`echo '${'ac_cv_func_vprintf'+set}'`\" = set"; then
817  echo $ac_n "(cached) $ac_c" 1>&4
818else
819  cat > conftest.$ac_ext <<EOF
820#line 821 "configure"
821#include "confdefs.h"
822#include <ctype.h> /* Arbitrary system header to define __stub macros. */
823/* Override any gcc2 internal prototype to avoid an error.  */
824char vprintf(); 
825
826int main() { return 0; }
827int t() {
828
829/* The GNU C library defines this for functions which it implements
830    to always fail with ENOSYS.  Some functions are actually named
831    something starting with __ and the normal name is an alias.  */
832#if defined (__stub_vprintf) || defined (__stub___vprintf)
833choke me
834#else
835vprintf();
836#endif
837
838; return 0; }
839EOF
840if eval $ac_link; then
841  rm -rf conftest*
842  eval "ac_cv_func_vprintf=yes"
843else
844  rm -rf conftest*
845  eval "ac_cv_func_vprintf=no"
846fi
847rm -f conftest*
848
849fi
850if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
851  echo "$ac_t""yes" 1>&4
852  cat >> confdefs.h <<\EOF
853#define HAVE_VPRINTF 1
854EOF
855
856else
857  echo "$ac_t""no" 1>&4
858fi
859
860if test "$ac_cv_func_vprintf" != yes; then
861echo $ac_n "checking for _doprnt""... $ac_c" 1>&4
862if eval "test \"`echo '${'ac_cv_func__doprnt'+set}'`\" = set"; then
863  echo $ac_n "(cached) $ac_c" 1>&4
864else
865  cat > conftest.$ac_ext <<EOF
866#line 867 "configure"
867#include "confdefs.h"
868#include <ctype.h> /* Arbitrary system header to define __stub macros. */
869/* Override any gcc2 internal prototype to avoid an error.  */
870char _doprnt(); 
871
872int main() { return 0; }
873int t() {
874
875/* The GNU C library defines this for functions which it implements
876    to always fail with ENOSYS.  Some functions are actually named
877    something starting with __ and the normal name is an alias.  */
878#if defined (__stub__doprnt) || defined (__stub____doprnt)
879choke me
880#else
881_doprnt();
882#endif
883
884; return 0; }
885EOF
886if eval $ac_link; then
887  rm -rf conftest*
888  eval "ac_cv_func__doprnt=yes"
889else
890  rm -rf conftest*
891  eval "ac_cv_func__doprnt=no"
892fi
893rm -f conftest*
894
895fi
896if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
897  echo "$ac_t""yes" 1>&4
898  cat >> confdefs.h <<\EOF
899#define HAVE_DOPRNT 1
900EOF
901
902else
903  echo "$ac_t""no" 1>&4
904fi
905
906fi
907
908
909trap '' 1 2 15
910if test -w $cache_file; then
911echo "updating cache $cache_file"
912cat > $cache_file <<\EOF
913# This file is a shell script that caches the results of configure
914# tests run on this system so they can be shared between configure
915# scripts and configure runs.  It is not useful on other systems.
916# If it contains results you don't want to keep, you may remove or edit it.
917#
918# By default, configure uses ./config.cache as the cache file,
919# creating it if it does not exist already.  You can give configure
920# the --cache-file=FILE option to use a different cache file; that is
921# what configure does when it calls configure scripts in
922# subdirectories, so they share the cache.
923# Giving --cache-file=/dev/null disables caching, for debugging configure.
924# config.status only pays attention to the cache file if you give it the
925# --recheck option to rerun configure.
926#
927EOF
928# Ultrix sh set writes to stderr and can't be redirected directly.
929(set) 2>&1 |
930  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
931  >> $cache_file
932else
933echo "not updating unwritable cache $cache_file"
934fi
935
936trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
937
938test "x$prefix" = xNONE && prefix=$ac_default_prefix
939# Let make expand exec_prefix.
940test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
941
942# Any assignment to VPATH causes Sun make to only execute
943# the first set of double-colon rules, so remove it if not needed.
944# If there is a colon in the path, we need to keep it.
945if test "x$srcdir" = x.; then
946  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
947fi
948
949trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
950
951DEFS=-DHAVE_CONFIG_H
952
953# Without the "./", some shells look in PATH for config.status.
954: ${CONFIG_STATUS=./config.status}
955
956echo creating $CONFIG_STATUS
957rm -f $CONFIG_STATUS
958cat > $CONFIG_STATUS <<EOF
959#!/bin/sh
960# Generated automatically by configure.
961# Run this file to recreate the current configuration.
962# This directory was configured as follows,
963# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
964#
965# $0 $ac_configure_args
966#
967# Compiler output produced by configure, useful for debugging
968# configure, is in ./config.log if it exists.
969
970ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
971for ac_option
972do
973  case "\$ac_option" in
974  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
975    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
976    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
977  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
978    echo "$CONFIG_STATUS generated by autoconf version 2.1"
979    exit 0 ;;
980  -help | --help | --hel | --he | --h)
981    echo "\$ac_cs_usage"; exit 0 ;;
982  *) echo "\$ac_cs_usage"; exit 1 ;;
983  esac
984done
985
986ac_given_srcdir=$srcdir
987ac_given_INSTALL="$INSTALL"
988
989trap 'rm -fr Makefile examples/Makefile config.h conftest*; exit 1' 1 2 15
990
991# Protect against being on the right side of a sed subst in config.status. 
992sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
993 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
994$ac_vpsub
995$extrasub
996s%@CFLAGS@%$CFLAGS%g
997s%@CPPFLAGS@%$CPPFLAGS%g
998s%@CXXFLAGS@%$CXXFLAGS%g
999s%@DEFS@%$DEFS%g
1000s%@LDFLAGS@%$LDFLAGS%g
1001s%@LIBS@%$LIBS%g
1002s%@exec_prefix@%$exec_prefix%g
1003s%@prefix@%$prefix%g
1004s%@program_transform_name@%$program_transform_name%g
1005s%@host@%$host%g
1006s%@host_alias@%$host_alias%g
1007s%@host_cpu@%$host_cpu%g
1008s%@host_vendor@%$host_vendor%g
1009s%@host_os@%$host_os%g
1010s%@OFLAGS@%$OFLAGS%g
1011s%@MFLAGS@%$MFLAGS%g
1012s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
1013s%@INSTALL_DATA@%$INSTALL_DATA%g
1014s%@RANLIB@%$RANLIB%g
1015s%@CC@%$CC%g
1016s%@M4@%$M4%g
1017s%@CPP@%$CPP%g
1018
1019CEOF
1020EOF
1021cat >> $CONFIG_STATUS <<EOF
1022
1023CONFIG_FILES=\${CONFIG_FILES-"Makefile examples/Makefile"}
1024EOF
1025cat >> $CONFIG_STATUS <<\EOF
1026for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1027  # Support "outfile[:infile]", defaulting infile="outfile.in".
1028  case "$ac_file" in
1029  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1030       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1031  *) ac_file_in="${ac_file}.in" ;;
1032  esac
1033
1034  # Adjust relative srcdir, etc. for subdirectories.
1035
1036  # Remove last slash and all that follows it.  Not all systems have dirname.
1037  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1038  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1039    # The file is in a subdirectory.
1040    test ! -d "$ac_dir" && mkdir "$ac_dir"
1041    ac_dir_suffix="/$ac_dir"
1042    # A "../" for each directory in $ac_dir_suffix.
1043    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1044  else
1045    ac_dir_suffix= ac_dots=
1046  fi
1047
1048  case "$ac_given_srcdir" in
1049  .)  srcdir=.
1050      if test -z "$ac_dots"; then top_srcdir=.
1051      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1052  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1053  *) # Relative path.
1054    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1055    top_srcdir="$ac_dots$ac_given_srcdir" ;;
1056  esac
1057
1058  case "$ac_given_INSTALL" in
1059  [/$]*) INSTALL="$ac_given_INSTALL" ;;
1060  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
1061  esac
1062  echo creating "$ac_file"
1063  rm -f "$ac_file"
1064  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1065  case "$ac_file" in
1066  *Makefile*) ac_comsub="1i\\
1067# $configure_input" ;;
1068  *) ac_comsub= ;;
1069  esac
1070  sed -e "$ac_comsub
1071s%@configure_input@%$configure_input%g
1072s%@srcdir@%$srcdir%g
1073s%@top_srcdir@%$top_srcdir%g
1074s%@INSTALL@%$INSTALL%g
1075" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
1076fi; done
1077rm -f conftest.subs
1078
1079# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
1080# NAME is the cpp macro being defined and VALUE is the value it is being given.
1081#
1082# ac_d sets the value in "#define NAME VALUE" lines.
1083ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
1084ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
1085ac_dC='\3'
1086ac_dD='%g'
1087# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
1088ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
1089ac_uB='\([ 	]\)%\1#\2define\3'
1090ac_uC=' '
1091ac_uD='\4%g'
1092# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
1093ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
1094ac_eB='$%\1#\2define\3'
1095ac_eC=' '
1096ac_eD='%g'
1097
1098CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
1099for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
1100  # Support "outfile[:infile]", defaulting infile="outfile.in".
1101  case "$ac_file" in
1102  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
1103       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1104  *) ac_file_in="${ac_file}.in" ;;
1105  esac
1106
1107  echo creating $ac_file
1108
1109  rm -f conftest.frag conftest.in conftest.out
1110  cp $ac_given_srcdir/$ac_file_in conftest.in
1111
1112EOF
1113
1114# Transform confdefs.h into a sed script conftest.vals that substitutes
1115# the proper values into config.h.in to produce config.h.  And first:
1116# Protect against being on the right side of a sed subst in config.status.
1117# Protect against being in an unquoted here document in config.status.
1118rm -f conftest.vals
1119cat > conftest.hdr <<\EOF
1120s/[\\&%]/\\&/g
1121s%[\\$`]%\\&%g
1122s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
1123s%ac_d%ac_u%gp
1124s%ac_u%ac_e%gp
1125EOF
1126sed -n -f conftest.hdr confdefs.h > conftest.vals
1127rm -f conftest.hdr
1128
1129# This sed command replaces #undef with comments.  This is necessary, for
1130# example, in the case of _POSIX_SOURCE, which is predefined and required
1131# on some systems where configure will not decide to define it.
1132cat >> conftest.vals <<\EOF
1133s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
1134EOF
1135
1136# Break up conftest.vals because some shells have a limit on
1137# the size of here documents, and old seds have small limits too.
1138# Maximum number of lines to put in a single here document.
1139ac_max_here_lines=12
1140
1141rm -f conftest.tail
1142while :
1143do
1144  ac_lines=`grep -c . conftest.vals`
1145  # grep -c gives empty output for an empty file on some AIX systems.
1146  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
1147  # Write a limited-size here document to conftest.frag.
1148  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
1149  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
1150  echo 'CEOF
1151  sed -f conftest.frag conftest.in > conftest.out
1152  rm -f conftest.in
1153  mv conftest.out conftest.in
1154' >> $CONFIG_STATUS
1155  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
1156  rm -f conftest.vals
1157  mv conftest.tail conftest.vals
1158done
1159rm -f conftest.vals
1160
1161cat >> $CONFIG_STATUS <<\EOF
1162  rm -f conftest.frag conftest.h
1163  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
1164  cat conftest.in >> conftest.h
1165  rm -f conftest.in
1166  if cmp -s $ac_file conftest.h 2>/dev/null; then
1167    echo "$ac_file is unchanged"
1168    rm -f conftest.h
1169  else
1170    rm -f $ac_file
1171    mv conftest.h $ac_file
1172  fi
1173fi; done
1174
1175
1176
1177exit 0
1178EOF
1179chmod +x $CONFIG_STATUS
1180rm -fr confdefs* $ac_clean_files
1181test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
1182
1183