configure 59.5 KB
Newer Older
Per Cederqvist's avatar
Per Cederqvist committed
1
#! /bin/sh
Per Cederqvist's avatar
Per Cederqvist committed
2

3
# From configure.in Revision: 1.30 
Per Cederqvist's avatar
Per Cederqvist committed
4

Per Cederqvist's avatar
Per Cederqvist committed
5
# Guess values for system-dependent variables and create Makefiles.
Per Cederqvist's avatar
Per Cederqvist committed
6
# Generated automatically using autoconf version 2.4 
Per Cederqvist's avatar
Per Cederqvist committed
7
8
9
10
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
Per Cederqvist's avatar
Per Cederqvist committed
11

Per Cederqvist's avatar
Per Cederqvist committed
12
13
14
15
# Defaults:
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
Per Cederqvist's avatar
Per Cederqvist committed
16
17
ac_help="$ac_help
  --with-gnu-malloc       use GNU malloc"
Per Cederqvist's avatar
Per Cederqvist committed
18
ac_default_prefix=/usr/lyskom
Per Cederqvist's avatar
Per Cederqvist committed
19
20
21
22
23

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
Per Cederqvist's avatar
Per Cederqvist committed
24
25
cache_file=./config.cache
exec_prefix=NONE
Per Cederqvist's avatar
Per Cederqvist committed
26
27
28
host=NONE
no_create=
nonopt=NONE
Per Cederqvist's avatar
Per Cederqvist committed
29
30
31
32
33
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
Per Cederqvist's avatar
Per Cederqvist committed
34
silent=
Per Cederqvist's avatar
Per Cederqvist committed
35
site=
Per Cederqvist's avatar
Per Cederqvist committed
36
37
38
srcdir=
target=NONE
verbose=
Per Cederqvist's avatar
Per Cederqvist committed
39
40
41
42
43
x_includes=NONE
x_libraries=NONE

# Initialize some other variables.
subdirs=
Per Cederqvist's avatar
Per Cederqvist committed
44
45
46

ac_prev=
for ac_option
Per Cederqvist's avatar
Per Cederqvist committed
47
do
Per Cederqvist's avatar
Per Cederqvist committed
48
49
50
51
52
53

  # If the previous option needs an argument, assign it.
  if test -n "$ac_prev"; then
    eval "$ac_prev=\$ac_option"
    ac_prev=
    continue
Per Cederqvist's avatar
Per Cederqvist committed
54
  fi
Per Cederqvist's avatar
Per Cederqvist committed
55
56
57
58
59
60

  case "$ac_option" in
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) ac_optarg= ;;
  esac

Per Cederqvist's avatar
Per Cederqvist committed
61
62
  # Accept the important Cygnus configure options, so we can diagnose typos.

Per Cederqvist's avatar
Per Cederqvist committed
63
64
65
66
67
68
69
  case "$ac_option" in

  -build | --build | --buil | --bui | --bu | --b)
    ac_prev=build ;;
  -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
    build="$ac_optarg" ;;

Per Cederqvist's avatar
Per Cederqvist committed
70
71
72
73
74
75
76
  -cache-file | --cache-file | --cache-fil | --cache-fi \
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
    ac_prev=cache_file ;;
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
    cache_file="$ac_optarg" ;;

Per Cederqvist's avatar
Per Cederqvist committed
77
78
  -disable-* | --disable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Per Cederqvist's avatar
Per Cederqvist committed
79
    # Reject names that are not valid shell variable names.
Per Cederqvist's avatar
Per Cederqvist committed
80
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Per Cederqvist's avatar
Per Cederqvist committed
81
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Per Cederqvist's avatar
Per Cederqvist committed
82
83
84
85
86
87
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    eval "enable_${ac_feature}=no" ;;

  -enable-* | --enable-*)
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Per Cederqvist's avatar
Per Cederqvist committed
88
    # Reject names that are not valid shell variable names.
Per Cederqvist's avatar
Per Cederqvist committed
89
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Per Cederqvist's avatar
Per Cederqvist committed
90
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Per Cederqvist's avatar
Per Cederqvist committed
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
    fi
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "enable_${ac_feature}='$ac_optarg'" ;;

  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  | --exec | --exe | --ex)
    ac_prev=exec_prefix ;;
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  | --exec=* | --exe=* | --ex=*)
    exec_prefix="$ac_optarg" ;;

  -gas | --gas | --ga | --g)
Per Cederqvist's avatar
Per Cederqvist committed
109
110
    # Obsolete; use --with-gas.
    with_gas=yes ;;
Per Cederqvist's avatar
Per Cederqvist committed
111
112

  -help | --help | --hel | --he)
Per Cederqvist's avatar
Per Cederqvist committed
113
114
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
Per Cederqvist's avatar
Per Cederqvist committed
115
    cat << EOF
Per Cederqvist's avatar
Per Cederqvist committed
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
Configuration:
  --cache-file=FILE       cache test results in FILE
  --help                  print this message
  --no-create             do not create output files
  --quiet, --silent       do not print \`checking...' messages
  --version               print the version of autoconf that created configure
Directory and file names:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [$ac_default_prefix]
  --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
                          [same as prefix]
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  --program-prefix=PREFIX prepend PREFIX to installed program names
  --program-suffix=SUFFIX append SUFFIX to installed program names
  --program-transform-name=PROGRAM run sed PROGRAM on installed program names
Host type:
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  --host=HOST             configure for HOST [guessed]
  --target=TARGET         configure for TARGET [TARGET=HOST]
Features and packages:
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --x-includes=DIR        X include files are in DIR
  --x-libraries=DIR       X library files are in DIR
--enable and --with options recognized:$ac_help
Per Cederqvist's avatar
Per Cederqvist committed
145
146
147
148
149
150
151
152
153
EOF
    exit 0 ;;

  -host | --host | --hos | --ho)
    ac_prev=host ;;
  -host=* | --host=* | --hos=* | --ho=*)
    host="$ac_optarg" ;;

  -nfp | --nfp | --nf)
Per Cederqvist's avatar
Per Cederqvist committed
154
155
    # Obsolete; use --without-fp.
    with_fp=no ;;
Per Cederqvist's avatar
Per Cederqvist committed
156
157
158
159
160

  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c)
    no_create=yes ;;

Per Cederqvist's avatar
Per Cederqvist committed
161
162
163
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
    no_recursion=yes ;;
Per Cederqvist's avatar
Per Cederqvist committed
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
    ac_prev=prefix ;;
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
    prefix="$ac_optarg" ;;

  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  | --program-pre | --program-pr | --program-p)
    ac_prev=program_prefix ;;
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
    program_prefix="$ac_optarg" ;;

  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  | --program-suf | --program-su | --program-s)
    ac_prev=program_suffix ;;
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
    program_suffix="$ac_optarg" ;;

  -program-transform-name | --program-transform-name \
  | --program-transform-nam | --program-transform-na \
  | --program-transform-n | --program-transform- \
  | --program-transform | --program-transfor \
  | --program-transfo | --program-transf \
  | --program-trans | --program-tran \
  | --progr-tra | --program-tr | --program-t)
    ac_prev=program_transform_name ;;
  -program-transform-name=* | --program-transform-name=* \
  | --program-transform-nam=* | --program-transform-na=* \
  | --program-transform-n=* | --program-transform-=* \
  | --program-transform=* | --program-transfor=* \
  | --program-transfo=* | --program-transf=* \
  | --program-trans=* | --program-tran=* \
  | --progr-tra=* | --program-tr=* | --program-t=*)
    program_transform_name="$ac_optarg" ;;

  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  | -silent | --silent | --silen | --sile | --sil)
    silent=yes ;;

Per Cederqvist's avatar
Per Cederqvist committed
205
206
207
208
209
  -site | --site | --sit)
    ac_prev=site ;;
  -site=* | --site=* | --sit=*)
    site="$ac_optarg" ;;

Per Cederqvist's avatar
Per Cederqvist committed
210
211
212
213
214
215
216
217
218
219
220
221
222
223
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    ac_prev=srcdir ;;
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    srcdir="$ac_optarg" ;;

  -target | --target | --targe | --targ | --tar | --ta | --t)
    ac_prev=target ;;
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
    target="$ac_optarg" ;;

  -v | -verbose | --verbose | --verbos | --verbo | --verb)
    verbose=yes ;;

  -version | --version | --versio | --versi | --vers)
Per Cederqvist's avatar
Per Cederqvist committed
224
    echo "configure generated by autoconf version 2.4"
Per Cederqvist's avatar
Per Cederqvist committed
225
226
227
228
    exit 0 ;;

  -with-* | --with-*)
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Per Cederqvist's avatar
Per Cederqvist committed
229
    # Reject names that are not valid shell variable names.
Per Cederqvist's avatar
Per Cederqvist committed
230
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Per Cederqvist's avatar
Per Cederqvist committed
231
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Per Cederqvist's avatar
Per Cederqvist committed
232
233
234
235
236
237
238
239
240
241
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    case "$ac_option" in
      *=*) ;;
      *) ac_optarg=yes ;;
    esac
    eval "with_${ac_package}='$ac_optarg'" ;;

  -without-* | --without-*)
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Per Cederqvist's avatar
Per Cederqvist committed
242
    # Reject names that are not valid shell variable names.
Per Cederqvist's avatar
Per Cederqvist committed
243
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Per Cederqvist's avatar
Per Cederqvist committed
244
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Per Cederqvist's avatar
Per Cederqvist committed
245
246
247
248
    fi
    ac_package=`echo $ac_package| sed 's/-/_/g'`
    eval "with_${ac_package}=no" ;;

Per Cederqvist's avatar
Per Cederqvist committed
249
250
251
  --x)
    # Obsolete; use --with-x.
    with_x=yes ;;
Per Cederqvist's avatar
Per Cederqvist committed
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266

  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  | --x-incl | --x-inc | --x-in | --x-i)
    ac_prev=x_includes ;;
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
    x_includes="$ac_optarg" ;;

  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
    ac_prev=x_libraries ;;
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
    x_libraries="$ac_optarg" ;;

Per Cederqvist's avatar
Per Cederqvist committed
267
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Per Cederqvist's avatar
Per Cederqvist committed
268
269
270
271
    ;;

  *) 
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Per Cederqvist's avatar
Per Cederqvist committed
272
      echo "configure: warning: $ac_option: invalid host type" 1>&2
Per Cederqvist's avatar
Per Cederqvist committed
273
274
    fi
    if test "x$nonopt" != xNONE; then
Per Cederqvist's avatar
Per Cederqvist committed
275
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Per Cederqvist's avatar
Per Cederqvist committed
276
277
278
279
280
    fi
    nonopt="$ac_option"
    ;;

  esac
Per Cederqvist's avatar
Per Cederqvist committed
281
282
done

Per Cederqvist's avatar
Per Cederqvist committed
283
if test -n "$ac_prev"; then
Per Cederqvist's avatar
Per Cederqvist committed
284
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Per Cederqvist's avatar
Per Cederqvist committed
285
286
fi

Per Cederqvist's avatar
Per Cederqvist committed
287
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Per Cederqvist's avatar
Per Cederqvist committed
288

Per Cederqvist's avatar
Per Cederqvist committed
289
# File descriptor usage:
Per Cederqvist's avatar
Per Cederqvist committed
290
# 0 standard input
Per Cederqvist's avatar
Per Cederqvist committed
291
292
# 1 file creation
# 2 errors and warnings
Per Cederqvist's avatar
Per Cederqvist committed
293
294
295
# 3 some systems may open it to /dev/tty
# 4 used on the Kubota Titan
# 6 checking for... messages and results
Per Cederqvist's avatar
Per Cederqvist committed
296
297
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
Per Cederqvist's avatar
Per Cederqvist committed
298
  exec 6>/dev/null
Per Cederqvist's avatar
Per Cederqvist committed
299
else
Per Cederqvist's avatar
Per Cederqvist committed
300
  exec 6>&1
Per Cederqvist's avatar
Per Cederqvist committed
301
302
303
304
305
306
307
308
309
310
311
312
313
fi
exec 5>./config.log

echo "\
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&5

# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing shell metacharacters.
ac_configure_args=
for ac_arg
do
Per Cederqvist's avatar
Per Cederqvist committed
314
315
316
  case "$ac_arg" in
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  | --no-cr | --no-c) ;;
Per Cederqvist's avatar
Per Cederqvist committed
317
318
319
320
321
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Per Cederqvist's avatar
Per Cederqvist committed
322
323
  esac
done
Per Cederqvist's avatar
Per Cederqvist committed
324
325

# NLS nuisances.
Per Cederqvist's avatar
Per Cederqvist committed
326
# Only set LANG and LC_ALL to C if already set.
Per Cederqvist's avatar
Per Cederqvist committed
327
328
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
Per Cederqvist's avatar
Per Cederqvist committed
329
330
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
Per Cederqvist's avatar
Per Cederqvist committed
331

Per Cederqvist's avatar
Per Cederqvist committed
332
333
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
Per Cederqvist's avatar
Per Cederqvist committed
334
335
336
337
338
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h

# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
Per Cederqvist's avatar
Per Cederqvist committed
339
ac_unique_file=src/server/lyskomd.h
Per Cederqvist's avatar
Per Cederqvist committed
340
341
342

# Find the source files, if location was not specified.
if test -z "$srcdir"; then
Per Cederqvist's avatar
Per Cederqvist committed
343
  ac_srcdir_defaulted=yes
Per Cederqvist's avatar
Per Cederqvist committed
344
  # Try the directory containing this script, then its parent.
Per Cederqvist's avatar
Per Cederqvist committed
345
346
347
348
349
  ac_prog=$0
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  srcdir=$ac_confdir
  if test ! -r $srcdir/$ac_unique_file; then
Per Cederqvist's avatar
Per Cederqvist committed
350
351
    srcdir=..
  fi
Per Cederqvist's avatar
Per Cederqvist committed
352
353
else
  ac_srcdir_defaulted=no
Per Cederqvist's avatar
Per Cederqvist committed
354
fi
Per Cederqvist's avatar
Per Cederqvist committed
355
if test ! -r $srcdir/$ac_unique_file; then
Per Cederqvist's avatar
Per Cederqvist committed
356
357
358
359
360
361
362
363
364
365
366
367
  if test "$ac_srcdir_defaulted" = yes; then
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  else
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  fi
fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`

# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
Per Cederqvist's avatar
Per Cederqvist committed
368
  else
Per Cederqvist's avatar
Per Cederqvist committed
369
370
371
372
373
374
375
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    echo "loading site script $ac_site_file"
    . "$ac_site_file"
Per Cederqvist's avatar
Per Cederqvist committed
376
  fi
Per Cederqvist's avatar
Per Cederqvist committed
377
378
379
380
381
382
383
384
done

if test -r "$cache_file"; then
  echo "loading cache $cache_file"
  . $cache_file
else
  echo "creating cache $cache_file"
  > $cache_file
Per Cederqvist's avatar
Per Cederqvist committed
385
fi
Per Cederqvist's avatar
Per Cederqvist committed
386

Per Cederqvist's avatar
Per Cederqvist committed
387
388
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Per Cederqvist's avatar
Per Cederqvist committed
389
ac_cpp='$CPP $CPPFLAGS'
Per Cederqvist's avatar
Per Cederqvist committed
390
391
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
Per Cederqvist's avatar
Per Cederqvist committed
392
393
394
395
396
397
398
399
400
401
402
403

if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
    ac_n= ac_c='
' ac_t='	'
  else
    ac_n=-n ac_c= ac_t=
  fi
else
  ac_n= ac_c='\c' ac_t=
fi
Per Cederqvist's avatar
Per Cederqvist committed
404
405


Per Cederqvist's avatar
Per Cederqvist committed
406
407
408
409
410
411
412
413
# Check whether --with-gnu-malloc or --without-gnu-malloc was given.
withval="$with_gnu_malloc"
if test -n "$withval"; then
  use_gnu_malloc=$withval
else
  use_gnu_malloc=no
fi

Per Cederqvist's avatar
Per Cederqvist committed
414

Per Cederqvist's avatar
Per Cederqvist committed
415
416
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
Per Cederqvist's avatar
Per Cederqvist committed
417
418
419
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
420
421
422
423
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
Per Cederqvist's avatar
Per Cederqvist committed
424
425
426
427
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Per Cederqvist's avatar
Per Cederqvist committed
428
      ac_cv_prog_CC="gcc"
Per Cederqvist's avatar
Per Cederqvist committed
429
430
431
      break
    fi
  done
Per Cederqvist's avatar
Per Cederqvist committed
432
  IFS="$ac_save_ifs"
Per Cederqvist's avatar
Per Cederqvist committed
433
434
435
436
437
  test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
fi
fi
CC="$ac_cv_prog_CC"
if test -n "$CC"; then
Per Cederqvist's avatar
Per Cederqvist committed
438
  echo "$ac_t""$CC" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
439
else
Per Cederqvist's avatar
Per Cederqvist committed
440
  echo "$ac_t""no" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
441
442
fi

Per Cederqvist's avatar
Per Cederqvist committed
443

Per Cederqvist's avatar
Per Cederqvist committed
444
445
446
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
447
448
else
  cat > conftest.c <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
449
#ifdef __GNUC__
Per Cederqvist's avatar
Per Cederqvist committed
450
  yes;
Per Cederqvist's avatar
Per Cederqvist committed
451
452
#endif
EOF
Per Cederqvist's avatar
Per Cederqvist committed
453
454
455
456
457
458
if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi
Per Cederqvist's avatar
Per Cederqvist committed
459
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
460
461
462
if test $ac_cv_prog_gcc = yes; then
  GCC=yes
  if test "${CFLAGS+set}" != set; then
Per Cederqvist's avatar
Per Cederqvist committed
463
464
465
    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
466
467
468
469
470
471
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_gcc_g=yes
else
  ac_cv_prog_gcc_g=no
Per Cederqvist's avatar
Per Cederqvist committed
472
473
474
fi
rm -f conftest*

Per Cederqvist's avatar
Per Cederqvist committed
475
fi
Per Cederqvist's avatar
Per Cederqvist committed
476
    echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
477
478
479
480
481
482
483
484
485
486
487
488
    if test $ac_cv_prog_gcc_g = yes; then
      CFLAGS="-g -O"
    else
      CFLAGS="-O"
    fi
  fi
else
  GCC=
  test "${CFLAGS+set}" = set || CFLAGS="-g"
fi


Per Cederqvist's avatar
Per Cederqvist committed
489
490
491
492
493




INCLUDE_CURRENT=-I.
Per Cederqvist's avatar
Per Cederqvist committed
494
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
495
496
497
498
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
Per Cederqvist's avatar
Per Cederqvist committed
499
if test -z "$CPP"; then
Per Cederqvist's avatar
Per Cederqvist committed
500
501
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
502
503
504
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
Per Cederqvist's avatar
Per Cederqvist committed
505
  CPP="${CC-cc} -E"
Per Cederqvist's avatar
Per Cederqvist committed
506
507
508
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
509
#line 510 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
510
#include "confdefs.h"
Per Cederqvist's avatar
Per Cederqvist committed
511
#include <assert.h>
Per Cederqvist's avatar
Per Cederqvist committed
512
513
Syntax Error
EOF
Per Cederqvist's avatar
Per Cederqvist committed
514
515
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
Per Cederqvist's avatar
Per Cederqvist committed
516
517
518
if test -z "$ac_err"; then
  :
else
Per Cederqvist's avatar
Per Cederqvist committed
519
  echo "$ac_err" >&5
Per Cederqvist's avatar
Per Cederqvist committed
520
521
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
Per Cederqvist's avatar
Per Cederqvist committed
522
  cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
523
#line 524 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
524
#include "confdefs.h"
Per Cederqvist's avatar
Per Cederqvist committed
525
#include <assert.h>
Per Cederqvist's avatar
Per Cederqvist committed
526
527
Syntax Error
EOF
Per Cederqvist's avatar
Per Cederqvist committed
528
529
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
Per Cederqvist's avatar
Per Cederqvist committed
530
if test -z "$ac_err"; then
Per Cederqvist's avatar
Per Cederqvist committed
531
532
  :
else
Per Cederqvist's avatar
Per Cederqvist committed
533
  echo "$ac_err" >&5
Per Cederqvist's avatar
Per Cederqvist committed
534
535
536
537
538
  rm -rf conftest*
  CPP=/lib/cpp
fi
rm -f conftest*
fi
Per Cederqvist's avatar
Per Cederqvist committed
539
rm -f conftest*
Per Cederqvist's avatar
Per Cederqvist committed
540
541
  ac_cv_prog_CPP="$CPP"
fi
Per Cederqvist's avatar
Per Cederqvist committed
542
543
544
  CPP="$ac_cv_prog_CPP"
else
  ac_cv_prog_CPP="$CPP"
Per Cederqvist's avatar
Per Cederqvist committed
545
fi
Per Cederqvist's avatar
Per Cederqvist committed
546
echo "$ac_t""$CPP" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
547

Per Cederqvist's avatar
Per Cederqvist committed
548
echo $ac_n "checking for AIX""... $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
549
cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
550
#line 551 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
551
552
553
554
555
556
#include "confdefs.h"
#ifdef _AIX
  yes
#endif

EOF
Per Cederqvist's avatar
Per Cederqvist committed
557
558
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "yes" >/dev/null 2>&1; then
Per Cederqvist's avatar
Per Cederqvist committed
559
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
560
  echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Per Cederqvist's avatar
Per Cederqvist committed
561
562
#define _ALL_SOURCE 1
EOF
Per Cederqvist's avatar
Per Cederqvist committed
563

Per Cederqvist's avatar
Per Cederqvist committed
564
565
else
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
566
  echo "$ac_t""no" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
567
568
569
570
fi
rm -f conftest*


Per Cederqvist's avatar
Per Cederqvist committed
571
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
572
573
574
if test -d /etc/conf/kconfig.d &&
  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
Per Cederqvist's avatar
Per Cederqvist committed
575
  echo "$ac_t""yes" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
576
577
578
579
  ISC=yes # If later tests want to check for ISC.
  cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF
Per Cederqvist's avatar
Per Cederqvist committed
580

Per Cederqvist's avatar
Per Cederqvist committed
581
  if test "$GCC" = yes; then
Per Cederqvist's avatar
Per Cederqvist committed
582
583
584
585
    CC="$CC -posix"
  else
    CC="$CC -Xp"
  fi
Per Cederqvist's avatar
Per Cederqvist committed
586
else
Per Cederqvist's avatar
Per Cederqvist committed
587
  echo "$ac_t""no" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
588
  ISC=
Per Cederqvist's avatar
Per Cederqvist committed
589
590
fi

Per Cederqvist's avatar
Per Cederqvist committed
591
ac_safe=`echo "minix/config.h" | tr './\055' '___'`
Per Cederqvist's avatar
Per Cederqvist committed
592
593
594
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
595
596
else
  cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
597
#line 598 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
598
599
600
#include "confdefs.h"
#include <minix/config.h>
EOF
Per Cederqvist's avatar
Per Cederqvist committed
601
602
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
Per Cederqvist's avatar
Per Cederqvist committed
603
if test -z "$ac_err"; then
Per Cederqvist's avatar
Per Cederqvist committed
604
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
605
606
607
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
Per Cederqvist's avatar
Per Cederqvist committed
608
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
609
  eval "ac_cv_header_$ac_safe=no"
Per Cederqvist's avatar
Per Cederqvist committed
610
611
fi
rm -f conftest*
Per Cederqvist's avatar
Per Cederqvist committed
612
613
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Per Cederqvist's avatar
Per Cederqvist committed
614
  echo "$ac_t""yes" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
615
  MINIX=yes
Per Cederqvist's avatar
Per Cederqvist committed
616
else
Per Cederqvist's avatar
Per Cederqvist committed
617
  echo "$ac_t""no" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
618
MINIX=
Per Cederqvist's avatar
Per Cederqvist committed
619
620
fi

Per Cederqvist's avatar
Per Cederqvist committed
621
622
623
624
if test "$MINIX" = yes; then
  cat >> confdefs.h <<\EOF
#define _POSIX_SOURCE 1
EOF
Per Cederqvist's avatar
Per Cederqvist committed
625

Per Cederqvist's avatar
Per Cederqvist committed
626
627
628
  cat >> confdefs.h <<\EOF
#define _POSIX_1_SOURCE 2
EOF
Per Cederqvist's avatar
Per Cederqvist committed
629

Per Cederqvist's avatar
Per Cederqvist committed
630
631
  cat >> confdefs.h <<\EOF
#define _MINIX 1
Per Cederqvist's avatar
Per Cederqvist committed
632
633
634
635
EOF

fi

Per Cederqvist's avatar
Per Cederqvist committed
636
if test -n "$GCC"; then
Per Cederqvist's avatar
Per Cederqvist committed
637
	CFLAGS="$CFLAGS -Wall -ansi"
Per Cederqvist's avatar
Per Cederqvist committed
638
639
640
641
642
643
644
645
	 cat >> confdefs.h <<\EOF
#define _GNU_SOURCE 1
EOF

	kom_safe=`echo "kom_cv_compiler_${CC}_accepts_-pipe" | tr './=\055' '____'`
echo $ac_n "checking whether ${CC} accepts -pipe""... $ac_c" 1>&6
if eval "test \"`echo '$''{'$kom_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
646
647
else
  kom_oldflags=$CFLAGS
Per Cederqvist's avatar
Per Cederqvist committed
648
CFLAGS="$CFLAGS -pipe"
Per Cederqvist's avatar
Per Cederqvist committed
649
cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
650
#line 651 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
651
652
653
#include "confdefs.h"

int main() { return 0; }
Per Cederqvist's avatar
Per Cederqvist committed
654
655
656
int t() {

; return 0; }
Per Cederqvist's avatar
Per Cederqvist committed
657
EOF
Per Cederqvist's avatar
Per Cederqvist committed
658
if eval $ac_link; then
Per Cederqvist's avatar
Per Cederqvist committed
659
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
660
  eval "$kom_safe=yes"
Per Cederqvist's avatar
Per Cederqvist committed
661
662
else
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
663
  eval "$kom_safe=no"
Per Cederqvist's avatar
Per Cederqvist committed
664
665
666
fi
rm -f conftest*

Per Cederqvist's avatar
Per Cederqvist committed
667
CFLAGS=$kom_oldflags
Per Cederqvist's avatar
Per Cederqvist committed
668
fi
Per Cederqvist's avatar
Per Cederqvist committed
669
echo "$ac_t""`eval echo '$'$kom_safe`" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
670
671
672
673
674
if test `eval echo '$'$kom_safe` = yes; then
  CFLAGS="$CFLAGS -pipe"
fi 
	DEPENDFLAG=-MM
else
Per Cederqvist's avatar
Per Cederqvist committed
675
676
677
678
679
680
	case "$CC" in
		*vcc) DEPENDFLAG=-Em
			INCLUDE_CURRENT='-I`pwd`';;
		*) DEPENDFLAG=-M;;
	esac
fi
Per Cederqvist's avatar
Per Cederqvist committed
681
682
683
684
685
echo $ac_n "checking flag to get dependencies""... $ac_c" 1>&6
echo "$ac_t""$DEPENDFLAG" 1>&6
echo $ac_n "checking for working const""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
686
687
else
  cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
688
#line 689 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
689
690
691
692
693
694
#include "confdefs.h"

int main() { return 0; }
int t() {

/* Ultrix mips cc rejects this.  */
Per Cederqvist's avatar
Per Cederqvist committed
695
696
697
698
typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this.  */
char const *const *ccp;
char **p;
Per Cederqvist's avatar
Per Cederqvist committed
699
700
701
/* NEC SVR4.0.2 mips cc rejects this.  */
struct point {int x, y;};
static struct point const zero;
Per Cederqvist's avatar
Per Cederqvist committed
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
/* AIX XL C 1.02.0.0 rejects this.
   It does not let you subtract one const X* pointer from another in an arm
   of an if-expression whose if-part is not a constant expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this.  */
  char *t;
  char const *s = 0 ? (char *) 0 : (char const *) 0;

  *t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
Per Cederqvist's avatar
Per Cederqvist committed
718
  int x[] = {25, 17};
Per Cederqvist's avatar
Per Cederqvist committed
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
  const int *foo = &x[0];
  ++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  typedef const int *iptr;
  iptr p = 0;
  ++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  struct s { int j; const int *ap[3]; };
  struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  const int foo = 10;
Per Cederqvist's avatar
Per Cederqvist committed
734
}
Per Cederqvist's avatar
Per Cederqvist committed
735

Per Cederqvist's avatar
Per Cederqvist committed
736
; return 0; }
Per Cederqvist's avatar
Per Cederqvist committed
737
EOF
Per Cederqvist's avatar
Per Cederqvist committed
738
if eval $ac_compile; then
Per Cederqvist's avatar
Per Cederqvist committed
739
740
  rm -rf conftest*
  ac_cv_c_const=yes
Per Cederqvist's avatar
Per Cederqvist committed
741
742
else
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
743
  ac_cv_c_const=no
Per Cederqvist's avatar
Per Cederqvist committed
744
745
746
fi
rm -f conftest*

Per Cederqvist's avatar
Per Cederqvist committed
747
fi
Per Cederqvist's avatar
Per Cederqvist committed
748
echo "$ac_t""$ac_cv_c_const" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
749
750
751
752
753
754
755
756
if test $ac_cv_c_const = no; then
  cat >> confdefs.h <<\EOF
#define const 
EOF

fi

# If we cannot run a trivial program, we must be cross compiling.
Per Cederqvist's avatar
Per Cederqvist committed
757
758
759
echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
760
761
else
  if test "$cross_compiling" = yes; then
Per Cederqvist's avatar
Per Cederqvist committed
762
  ac_cv_c_cross=yes
Per Cederqvist's avatar
Per Cederqvist committed
763
764
else
cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
765
#line 766 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
766
767
768
769
770
771
772
773
774
775
776
777
778
#include "confdefs.h"
main(){return(0);}
EOF
eval $ac_link
if test -s conftest && (./conftest; exit) 2>/dev/null; then
  ac_cv_c_cross=no
else
  ac_cv_c_cross=yes
fi
fi
rm -fr conftest*
fi
cross_compiling=$ac_cv_c_cross
Per Cederqvist's avatar
Per Cederqvist committed
779
echo "$ac_t""$ac_cv_c_cross" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
780

Per Cederqvist's avatar
Per Cederqvist committed
781
782
783
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
784
785
else
  cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
786
#line 787 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
787
788
789
790
791
792
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
EOF
Per Cederqvist's avatar
Per Cederqvist committed
793
794
eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
ac_err=`grep -v '^ *+' conftest.out`
Per Cederqvist's avatar
Per Cederqvist committed
795
if test -z "$ac_err"; then
Per Cederqvist's avatar
Per Cederqvist committed
796
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
797
798
799
800
801
802
803
804
805
  ac_cv_header_stdc=yes
else
  echo "$ac_err" >&5
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

if test $ac_cv_header_stdc = yes; then
Per Cederqvist's avatar
Per Cederqvist committed
806
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Per Cederqvist's avatar
Per Cederqvist committed
807
cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
808
#line 809 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
#include "confdefs.h"
#include <string.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "memchr" >/dev/null 2>&1; then
  :
else
  rm -rf conftest*
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
826
#line 827 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
827
828
829
830
831
832
833
#include "confdefs.h"
#include <stdlib.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "free" >/dev/null 2>&1; then
  :
else
Per Cederqvist's avatar
Per Cederqvist committed
834
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
835
836
837
838
839
840
841
842
843
844
845
846
  ac_cv_header_stdc=no
fi
rm -f conftest*

fi

if test $ac_cv_header_stdc = yes; then
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
  ac_cv_header_stdc=no
else
cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
847
#line 848 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
848
849
850
851
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Per Cederqvist's avatar
Per Cederqvist committed
852
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Per Cederqvist's avatar
Per Cederqvist committed
853
854
855
856
857
int main () { int i; for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }

EOF
Per Cederqvist's avatar
Per Cederqvist committed
858
eval $ac_link
Per Cederqvist's avatar
Per Cederqvist committed
859
if test -s conftest && (./conftest; exit) 2>/dev/null; then
Per Cederqvist's avatar
Per Cederqvist committed
860
861
862
  :
else
  ac_cv_header_stdc=no
Per Cederqvist's avatar
Per Cederqvist committed
863
fi
Per Cederqvist's avatar
Per Cederqvist committed
864
865
866
fi
rm -fr conftest*
fi
Per Cederqvist's avatar
Per Cederqvist committed
867
fi
Per Cederqvist's avatar
Per Cederqvist committed
868
echo "$ac_t""$ac_cv_header_stdc" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
869
870
871
872
if test $ac_cv_header_stdc = yes; then
  cat >> confdefs.h <<\EOF
#define STDC_HEADERS 1
EOF
Per Cederqvist's avatar
Per Cederqvist committed
873
874
875

fi

Per Cederqvist's avatar
Per Cederqvist committed
876
877
878
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
879
880
else
  cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
881
#line 882 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
#include <stdlib.h>
#endif
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  egrep "pid_t" >/dev/null 2>&1; then
  rm -rf conftest*
  ac_cv_type_pid_t=yes
else
  rm -rf conftest*
  ac_cv_type_pid_t=no
fi
rm -f conftest*

fi
Per Cederqvist's avatar
Per Cederqvist committed
899
echo "$ac_t""$ac_cv_type_pid_t" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
900
901
902
903
904
905
906
if test $ac_cv_type_pid_t = no; then
  cat >> confdefs.h <<\EOF
#define pid_t int
EOF

fi

Per Cederqvist's avatar
Per Cederqvist committed
907
908
909
echo $ac_n "checking if _HPUX_SOURCE needs to be defined""... $ac_c" 1>&6
if eval "test \"`echo '$''{'kom_cv_sys_hpux_source'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
910
911
else
  cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
912
#line 913 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
913
#include "confdefs.h"
Per Cederqvist's avatar
Per Cederqvist committed
914
#include <sys/types.h>
Per Cederqvist's avatar
Per Cederqvist committed
915
#include <sys/socket.h>
Per Cederqvist's avatar
Per Cederqvist committed
916
int main() { return 0; }
Per Cederqvist's avatar
Per Cederqvist committed
917
918
919
int t() {
struct sockaddr foo;
; return 0; }
Per Cederqvist's avatar
Per Cederqvist committed
920
EOF
Per Cederqvist's avatar
Per Cederqvist committed
921
if eval $ac_link; then
Per Cederqvist's avatar
Per Cederqvist committed
922
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
923
  kom_cv_sys_hpux_source=no
Per Cederqvist's avatar
Per Cederqvist committed
924
925
else
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
926
  cat > conftest.$ac_ext <<EOF
Per Cederqvist's avatar
Per Cederqvist committed
927
#line 928 "configure"
Per Cederqvist's avatar
Per Cederqvist committed
928
929
#include "confdefs.h"
#define _HPUX_SOURCE
Per Cederqvist's avatar
Per Cederqvist committed
930
#include <sys/types.h>
Per Cederqvist's avatar
Per Cederqvist committed
931
#include <sys/socket.h>
Per Cederqvist's avatar
Per Cederqvist committed
932
int main() { return 0; }
Per Cederqvist's avatar
Per Cederqvist committed
933
934
935
int t() {
struct sockaddr foo;
; return 0; }
Per Cederqvist's avatar
Per Cederqvist committed
936
EOF
Per Cederqvist's avatar
Per Cederqvist committed
937
if eval $ac_link; then
Per Cederqvist's avatar
Per Cederqvist committed
938
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
939
  kom_cv_sys_hpux_source=yes
Per Cederqvist's avatar
Per Cederqvist committed
940
941
else
  rm -rf conftest*
Per Cederqvist's avatar
Per Cederqvist committed
942
  kom_cv_sys_hpux_source=no
Per Cederqvist's avatar
Per Cederqvist committed
943
944
945
946
947
948
fi
rm -f conftest*

fi
rm -f conftest*

Per Cederqvist's avatar
Per Cederqvist committed
949
950
fi

Per Cederqvist's avatar
Per Cederqvist committed
951
echo "$ac_t""$kom_cv_sys_hpux_source" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
952
953
954
955
956
957
958
if test $kom_cv_sys_hpux_source = yes ; then
  cat >> confdefs.h <<\EOF
#define _HPUX_SOURCE 1
EOF

fi

Per Cederqvist's avatar
Per Cederqvist committed
959
960
961
SRCTOPDIR=`cd $srcdir;pwd`

BUILDTOPDIR=`pwd`
Per Cederqvist's avatar
Per Cederqvist committed
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
ac_aux_dir=
for ac_dir in scripts $srcdir/scripts; do
  if test -f $ac_dir/install-sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install-sh -c"
    break
  elif test -f $ac_dir/install.sh; then
    ac_aux_dir=$ac_dir
    ac_install_sh="$ac_aux_dir/install.sh -c"
    break
  fi
done
if test -z "$ac_aux_dir"; then
  { echo "configure: error: can not find install-sh or install.sh in scripts $srcdir/scripts" 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.

# Find a good install program.  We prefer a C program (faster),
# so one script is as good as another.  But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
Per Cederqvist's avatar
Per Cederqvist committed
991
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
992
if test -z "$INSTALL"; then
Per Cederqvist's avatar
Per Cederqvist committed
993
994
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
995
996
else
    IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
Per Cederqvist's avatar
Per Cederqvist committed
997
  for ac_dir in $PATH; do
Per Cederqvist's avatar
Per Cederqvist committed
998
999
1000
    # Account for people who put trailing slashes in PATH elements.
    case "$ac_dir/" in
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
Per Cederqvist's avatar
Per Cederqvist committed
1001
    *)
Per Cederqvist's avatar
Per Cederqvist committed
1002
      # OSF1 and SCO ODT 3.0 have their own names for install.
Per Cederqvist's avatar
Per Cederqvist committed
1003
      for ac_prog in ginstall installbsd scoinst install; do
Per Cederqvist's avatar
Per Cederqvist committed
1004
1005
1006
1007
1008
1009
1010
        if test -f $ac_dir/$ac_prog; then
	  if test $ac_prog = install &&
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
	    # AIX install.  It has an incompatible calling convention.
	    # OSF/1 installbsd also uses dspmsg, but is usable.
	    :
	  else
Per Cederqvist's avatar
Per Cederqvist committed
1011
	    ac_cv_path_install="$ac_dir/$ac_prog -c"
Per Cederqvist's avatar
Per Cederqvist committed
1012
1013
	    break 2
	  fi
Per Cederqvist's avatar
Per Cederqvist committed
1014
	fi
Per Cederqvist's avatar
Per Cederqvist committed
1015
      done
Per Cederqvist's avatar
Per Cederqvist committed
1016
1017
1018
      ;;
    esac
  done
Per Cederqvist's avatar
Per Cederqvist committed
1019
1020
  IFS="$ac_save_ifs"
  # As a last resort, use the slow shell script.
Per Cederqvist's avatar
Per Cederqvist committed
1021
  test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
Per Cederqvist's avatar
Per Cederqvist committed
1022
fi
Per Cederqvist's avatar
Per Cederqvist committed
1023
  INSTALL="$ac_cv_path_install"
Per Cederqvist's avatar
Per Cederqvist committed
1024
fi
Per Cederqvist's avatar
Per Cederqvist committed
1025
echo "$ac_t""$INSTALL" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1026

Per Cederqvist's avatar
Per Cederqvist committed
1027
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
Per Cederqvist's avatar
Per Cederqvist committed
1028
1029
1030
1031
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'

test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
Per Cederqvist's avatar
Per Cederqvist committed
1032

Per Cederqvist's avatar
Per Cederqvist committed
1033
1034
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
Per Cederqvist's avatar
Per Cederqvist committed
1035
1036
1037
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1038
1039
1040
1041
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
Per Cederqvist's avatar
Per Cederqvist committed
1042
1043
1044
1045
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Per Cederqvist's avatar
Per Cederqvist committed
1046
      ac_cv_prog_RANLIB="ranlib"
Per Cederqvist's avatar
Per Cederqvist committed
1047
1048
1049
      break
    fi
  done
Per Cederqvist's avatar
Per Cederqvist committed
1050
  IFS="$ac_save_ifs"
Per Cederqvist's avatar
Per Cederqvist committed
1051
1052
1053
1054
1055
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
Per Cederqvist's avatar
Per Cederqvist committed
1056
  echo "$ac_t""$RANLIB" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1057
else
Per Cederqvist's avatar
Per Cederqvist committed
1058
  echo "$ac_t""no" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1059
1060
fi

Per Cederqvist's avatar
Per Cederqvist committed
1061
for ac_prog in mawk gawk nawk awk
Per Cederqvist's avatar
Per Cederqvist committed
1062
do
Per Cederqvist's avatar
Per Cederqvist committed
1063
1064
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
Per Cederqvist's avatar
Per Cederqvist committed
1065
1066
1067
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1068
1069
1070
1071
else
  if test -n "$AWK"; then
  ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
Per Cederqvist's avatar
Per Cederqvist committed
1072
1073
1074
1075
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Per Cederqvist's avatar
Per Cederqvist committed
1076
      ac_cv_prog_AWK="$ac_prog"
Per Cederqvist's avatar
Per Cederqvist committed
1077
1078
1079
      break
    fi
  done
Per Cederqvist's avatar
Per Cederqvist committed
1080
  IFS="$ac_save_ifs"
Per Cederqvist's avatar
Per Cederqvist committed
1081
fi
Per Cederqvist's avatar
Per Cederqvist committed
1082
1083
1084
fi
AWK="$ac_cv_prog_AWK"
if test -n "$AWK"; then
Per Cederqvist's avatar
Per Cederqvist committed
1085
  echo "$ac_t""$AWK" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1086
else
Per Cederqvist's avatar
Per Cederqvist committed
1087
  echo "$ac_t""no" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1088
fi
Per Cederqvist's avatar
Per Cederqvist committed
1089
1090
1091
1092

test -n "$AWK" && break
done

Per Cederqvist's avatar
Per Cederqvist committed
1093
1094
1095
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1096
1097
else
  rm -f conftestdata
Per Cederqvist's avatar
Per Cederqvist committed
1098
1099
1100
if ln -s X conftestdata 2>/dev/null
then
  rm -f conftestdata
Per Cederqvist's avatar
Per Cederqvist committed
1101
  ac_cv_prog_LN_S="ln -s"
Per Cederqvist's avatar
Per Cederqvist committed
1102
else
Per Cederqvist's avatar
Per Cederqvist committed
1103
1104
1105
1106
1107
  ac_cv_prog_LN_S=ln
fi
fi
LN_S="$ac_cv_prog_LN_S"
if test "$ac_cv_prog_LN_S" = "ln -s"; then
Per Cederqvist's avatar
Per Cederqvist committed
1108
  echo "$ac_t""yes" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1109
else
Per Cederqvist's avatar
Per Cederqvist committed
1110
  echo "$ac_t""no" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1111
1112
fi

Per Cederqvist's avatar
Per Cederqvist committed
1113
for ac_prog in 'bison -y' byacc
Per Cederqvist's avatar
Per Cederqvist committed
1114
do
Per Cederqvist's avatar
Per Cederqvist committed
1115
1116
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
Per Cederqvist's avatar
Per Cederqvist committed
1117
1118
1119
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1120
1121
1122
1123
else
  if test -n "$YACC"; then
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
Per Cederqvist's avatar
Per Cederqvist committed
1124
1125
1126
1127
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Per Cederqvist's avatar
Per Cederqvist committed
1128
      ac_cv_prog_YACC="$ac_prog"
Per Cederqvist's avatar
Per Cederqvist committed
1129
1130
1131
      break
    fi
  done
Per Cederqvist's avatar
Per Cederqvist committed
1132
  IFS="$ac_save_ifs"
Per Cederqvist's avatar
Per Cederqvist committed
1133
fi
Per Cederqvist's avatar
Per Cederqvist committed
1134
1135
1136
fi
YACC="$ac_cv_prog_YACC"
if test -n "$YACC"; then
Per Cederqvist's avatar
Per Cederqvist committed
1137
  echo "$ac_t""$YACC" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1138
else
Per Cederqvist's avatar
Per Cederqvist committed
1139
  echo "$ac_t""no" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1140
fi
Per Cederqvist's avatar
Per Cederqvist committed
1141
1142
1143
1144
1145

test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"

Per Cederqvist's avatar
Per Cederqvist committed
1146
1147
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
Per Cederqvist's avatar
Per Cederqvist committed
1148
1149
1150
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed
1151
1152
1153
1154
else
  if test -n "$LEX"; then
  ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
Per Cederqvist's avatar
Per Cederqvist committed
1155
1156
1157
1158
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  for ac_dir in $PATH; do
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
Per Cederqvist's avatar
Per Cederqvist committed
1159
      ac_cv_prog_LEX="flex"
Per Cederqvist's avatar
Per Cederqvist committed
1160
1161
1162
      break
    fi
  done
Per Cederqvist's avatar
Per Cederqvist committed
1163
  IFS="$ac_save_ifs"
Per Cederqvist's avatar
Per Cederqvist committed
1164
1165
1166
1167
1168
  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
fi
fi
LEX="$ac_cv_prog_LEX"
if test -n "$LEX"; then
Per Cederqvist's avatar
Per Cederqvist committed
1169
  echo "$ac_t""$LEX" 1>&6
Per Cederqvist's avatar
Per Cederqvist committed