~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to .pc/instdir/configure

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Guess values for system-dependent variables and create Makefiles.
 
4
# Generated automatically using autoconf version 2.13 
 
5
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 
6
#
 
7
# This configure script is free software; the Free Software Foundation
 
8
# gives unlimited permission to copy, distribute and modify it.
 
9
 
 
10
# Defaults:
 
11
ac_help=
 
12
ac_default_prefix=/usr/local
 
13
# Any additions from configure.in:
 
14
ac_default_prefix=/usr/local
 
15
ac_help="$ac_help
 
16
  --enable-macosx-app     create a MacOSX application"
 
17
ac_help="$ac_help
 
18
  --enable-shared         build and link with shared libraries [--enable-shared]"
 
19
ac_help="$ac_help
 
20
  --enable-64bit          enable 64bit support (where applicable)"
 
21
ac_help="$ac_help
 
22
  --enable-64bit-vis      enable 64bit Sparc VIS support"
 
23
ac_help="$ac_help
 
24
  --enable-w11            use W11 library for Windows X11 emulation"
 
25
ac_help="$ac_help
 
26
  --with-cxx              support C++ functionality (default: no)"
 
27
ac_help="$ac_help
 
28
  --with-macosx-archs[=arch list]
 
29
                          compile multiple architectures on MacOSX, ie.
 
30
                          universal.  Valid architectures are i386, ppc,
 
31
                          x86_64 and ppc64. (default: no [native])"
 
32
ac_help="$ac_help
 
33
  --with-macosx-sdk[=path/sdk]
 
34
                          compile with a system SDK on MacOSX. (default: no)"
 
35
ac_help="$ac_help
 
36
  --with-jpeg             support JPEG functionality (default: yes)"
 
37
ac_help="$ac_help
 
38
  --with-tiff             support TIFF functionality (default: yes)"
 
39
ac_help="$ac_help
 
40
  --with-png              support PNG functionality (default: yes)"
 
41
ac_help="$ac_help
 
42
  --with-tcltk            support Tcl/Tk functionality (default: yes)"
 
43
ac_help="$ac_help
 
44
  --with-postgres         support PostgreSQL functionality (default: no)"
 
45
ac_help="$ac_help
 
46
  --with-mysql            support MySQL functionality (default: no)"
 
47
ac_help="$ac_help
 
48
  --with-sqlite           support SQLite functionality (default: no)"
 
49
ac_help="$ac_help
 
50
  --with-ffmpeg           support FFMPEG functionality (default: no)"
 
51
ac_help="$ac_help
 
52
  --with-opengl           support OpenGL functionality (default: yes)"
 
53
ac_help="$ac_help
 
54
  --with-odbc             support ODBC functionality (default: no)"
 
55
ac_help="$ac_help
 
56
  --with-fftw             support FFTW functionality (default: yes)"
 
57
ac_help="$ac_help
 
58
  --with-blas             support BLAS functionality (default: no)"
 
59
ac_help="$ac_help
 
60
  --with-lapack           support LAPACK functionality (default: no)"
 
61
ac_help="$ac_help
 
62
  --with-motif            support Motif functionality (default: no)"
 
63
ac_help="$ac_help
 
64
  --with-cairo            support Cairo functionality (default: no)"
 
65
ac_help="$ac_help
 
66
  --with-freetype         support FreeType functionality (default: no)"
 
67
ac_help="$ac_help
 
68
  --with-glw              support GLw functionality (default: no)"
 
69
ac_help="$ac_help
 
70
  --with-nls              support NLS functionality (default: no)"
 
71
ac_help="$ac_help
 
72
  --with-readline         support Readline functionality (default: no)"
 
73
ac_help="$ac_help
 
74
  --with-opendwg          support openDWG functionality (default: no)"
 
75
ac_help="$ac_help
 
76
  --with-curses           support Curses functionality (default: yes)"
 
77
ac_help="$ac_help
 
78
  --with-regex            support regex functionality (default: yes)"
 
79
ac_help="$ac_help
 
80
  --with-gdal[=path/gdal-config]
 
81
                          enable GDAL/OGR support (gdal-config with path,
 
82
                          e.g. '--with-gdal=/usr/local/bin/gdal-config')"
 
83
ac_help="$ac_help
 
84
  --with-python[=path/python-config]
 
85
                          enable support for wxGUI Python extensions
 
86
                          (python-config with path, e.g.
 
87
                          '--with-python=/usr/bin/python2.5-config',
 
88
                          default: no)"
 
89
ac_help="$ac_help
 
90
  --with-wxwidgets[=path/wx-config]
 
91
                          enable wxWidgets support (wx-config with path,
 
92
                          e.g. '--with-wxwidgets=/usr/local/bin/wx-config',
 
93
                          default: no)"
 
94
ac_help="$ac_help
 
95
  --with-geos[=path/geos-config]
 
96
                          enable GEOS support (geos-config with path,
 
97
                          e.g. '--with-geos=/usr/local/bin/geos-config',
 
98
                          default: no)"
 
99
ac_help="$ac_help
 
100
  --with-includes=DIRS    site include files are in DIRS"
 
101
ac_help="$ac_help
 
102
  --with-libs=DIRS        site library files are in DIRS"
 
103
ac_help="$ac_help
 
104
  --with-zlib-includes=DIRS
 
105
                          zlib include files are in DIRS"
 
106
ac_help="$ac_help
 
107
  --with-zlib-libs=DIRS   zlib library files are in DIRS"
 
108
ac_help="$ac_help
 
109
  --with-readline-includes=DIRS
 
110
                          Readline include files are in DIRS"
 
111
ac_help="$ac_help
 
112
  --with-readline-libs=DIRS
 
113
                          Readline library files are in DIRS"
 
114
ac_help="$ac_help
 
115
  --with-jpeg-includes=DIRS
 
116
                          JPEG include files are in DIRS"
 
117
ac_help="$ac_help
 
118
  --with-jpeg-libs=DIRS   JPEG library files are in DIRS"
 
119
ac_help="$ac_help
 
120
  --with-tiff-includes=DIRS
 
121
                          TIFF include files are in DIRS"
 
122
ac_help="$ac_help
 
123
  --with-tiff-libs=DIRS   TIFF library files are in DIRS"
 
124
ac_help="$ac_help
 
125
  --with-png-includes=DIRS
 
126
                          PNG include files are in DIRS"
 
127
ac_help="$ac_help
 
128
  --with-png-libs=DIRS    PNG library files are in DIRS"
 
129
ac_help="$ac_help
 
130
  --with-tcltk-includes=DIRS
 
131
                          Tcl/Tk include files are in DIRS"
 
132
ac_help="$ac_help
 
133
  --with-tcltk-libs=DIRS  Tcl/Tk library files are in DIRS"
 
134
ac_help="$ac_help
 
135
  --with-postgres-includes=DIRS
 
136
                          PostgreSQL include files are in DIRS"
 
137
ac_help="$ac_help
 
138
  --with-postgres-libs=DIRS
 
139
                          PostgreSQL library files are in DIRS"
 
140
ac_help="$ac_help
 
141
  --with-mysql-includes=DIRS
 
142
                          MySQL include files are in DIRS"
 
143
ac_help="$ac_help
 
144
  --with-mysql-libs=DIRS  MySQL library files are in DIRS"
 
145
ac_help="$ac_help
 
146
  --with-sqlite-includes=DIRS
 
147
                          SQLite include files are in DIRS"
 
148
ac_help="$ac_help
 
149
  --with-sqlite-libs=DIRS SQLite library files are in DIRS"
 
150
ac_help="$ac_help
 
151
  --with-ffmpeg-includes=DIRS
 
152
                          FFMPEG include files are in DIRS"
 
153
ac_help="$ac_help
 
154
  --with-ffmpeg-libs=DIRS FFMPEG library files are in DIRS"
 
155
ac_help="$ac_help
 
156
  --with-opengl-includes=DIRS
 
157
                          OpenGL include files are in DIRS"
 
158
ac_help="$ac_help
 
159
  --with-opengl-libs=DIRS OpenGL library files are in DIRS"
 
160
ac_help="$ac_help
 
161
  --with-odbc-includes=DIRS
 
162
                          ODBC include files are in DIRS"
 
163
ac_help="$ac_help
 
164
  --with-odbc-libs=DIRS   ODBC library files are in DIRS"
 
165
ac_help="$ac_help
 
166
  --with-fftw-includes=DIRS
 
167
                          FFTW include files are in DIRS"
 
168
ac_help="$ac_help
 
169
  --with-fftw-libs=DIRS   FFTW library files are in DIRS"
 
170
ac_help="$ac_help
 
171
  --with-blas-includes=DIRS
 
172
                          BLAS include files are in DIRS"
 
173
ac_help="$ac_help
 
174
  --with-blas-libs=DIRS   BLAS library files are in DIRS"
 
175
ac_help="$ac_help
 
176
  --with-lapack-includes=DIRS
 
177
                          LAPACK include files are in DIRS"
 
178
ac_help="$ac_help
 
179
  --with-lapack-libs=DIRS LAPACK library files are in DIRS"
 
180
ac_help="$ac_help
 
181
  --with-cairo-includes=DIRS
 
182
                          cairo include files are in DIRS"
 
183
ac_help="$ac_help
 
184
  --with-cairo-libs=DIRS  cairo library files are in DIRS"
 
185
ac_help="$ac_help
 
186
  --with-cairo-ldflags=FLAGS
 
187
                          cairo needs FLAGS when linking"
 
188
ac_help="$ac_help
 
189
  --with-motif-includes=DIRS
 
190
                          Motif include files are in DIRS"
 
191
ac_help="$ac_help
 
192
  --with-motif-libs=DIRS  Motif library files are in DIRS"
 
193
ac_help="$ac_help
 
194
  --with-freetype-includes=DIRS
 
195
                          FreeType include files are in DIRS"
 
196
ac_help="$ac_help
 
197
  --with-freetype-libs=DIRS
 
198
                          FreeType library files are in DIRS"
 
199
ac_help="$ac_help
 
200
  --with-glw-includes=DIRS
 
201
                          GLw include files are in DIRS"
 
202
ac_help="$ac_help
 
203
  --with-glw-libs=DIRS    GLw library files are in DIRS"
 
204
ac_help="$ac_help
 
205
  --with-proj-includes=DIRS
 
206
                          External PROJ.4 include files are in DIRS"
 
207
ac_help="$ac_help
 
208
  --with-proj-libs=DIRS   External PROJ.4 library files are in DIRS"
 
209
ac_help="$ac_help
 
210
  --with-proj-share=DIR   External PROJ.4 data files are in DIR"
 
211
ac_help="$ac_help
 
212
  --with-opendwg-includes=DIRS
 
213
                          openDWG include files are in DIRS"
 
214
ac_help="$ac_help
 
215
  --with-opendwg-libs=DIRS
 
216
                          openDWG library files are in DIRS"
 
217
ac_help="$ac_help
 
218
  --with-regex-includes=DIRS
 
219
                          regex include files are in DIRS"
 
220
ac_help="$ac_help
 
221
  --with-regex-libs=DIRS  regex library files are in DIRS"
 
222
ac_help="$ac_help
 
223
  --with-x                use the X Window System"
 
224
ac_help="$ac_help
 
225
  --enable-largefile      enable support for large files (LFS)"
 
226
 
 
227
# Initialize some variables set by options.
 
228
# The variables have the same names as the options, with
 
229
# dashes changed to underlines.
 
230
build=NONE
 
231
cache_file=./config.cache
 
232
exec_prefix=NONE
 
233
host=NONE
 
234
no_create=
 
235
nonopt=NONE
 
236
no_recursion=
 
237
prefix=NONE
 
238
program_prefix=NONE
 
239
program_suffix=NONE
 
240
program_transform_name=s,x,x,
 
241
silent=
 
242
site=
 
243
srcdir=
 
244
target=NONE
 
245
verbose=
 
246
x_includes=NONE
 
247
x_libraries=NONE
 
248
bindir='${exec_prefix}/bin'
 
249
sbindir='${exec_prefix}/sbin'
 
250
libexecdir='${exec_prefix}/libexec'
 
251
datadir='${prefix}/share'
 
252
sysconfdir='${prefix}/etc'
 
253
sharedstatedir='${prefix}/com'
 
254
localstatedir='${prefix}/var'
 
255
libdir='${exec_prefix}/lib'
 
256
includedir='${prefix}/include'
 
257
oldincludedir='/usr/include'
 
258
infodir='${prefix}/info'
 
259
mandir='${prefix}/man'
 
260
 
 
261
# Initialize some other variables.
 
262
subdirs=
 
263
MFLAGS= MAKEFLAGS=
 
264
SHELL=${CONFIG_SHELL-/bin/sh}
 
265
# Maximum number of lines to put in a shell here document.
 
266
ac_max_here_lines=12
 
267
 
 
268
ac_prev=
 
269
for ac_option
 
270
do
 
271
 
 
272
  # If the previous option needs an argument, assign it.
 
273
  if test -n "$ac_prev"; then
 
274
    eval "$ac_prev=\$ac_option"
 
275
    ac_prev=
 
276
    continue
 
277
  fi
 
278
 
 
279
  case "$ac_option" in
 
280
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
 
281
  *) ac_optarg= ;;
 
282
  esac
 
283
 
 
284
  # Accept the important Cygnus configure options, so we can diagnose typos.
 
285
 
 
286
  case "$ac_option" in
 
287
 
 
288
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
 
289
    ac_prev=bindir ;;
 
290
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
 
291
    bindir="$ac_optarg" ;;
 
292
 
 
293
  -build | --build | --buil | --bui | --bu)
 
294
    ac_prev=build ;;
 
295
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
 
296
    build="$ac_optarg" ;;
 
297
 
 
298
  -cache-file | --cache-file | --cache-fil | --cache-fi \
 
299
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
 
300
    ac_prev=cache_file ;;
 
301
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
 
302
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
 
303
    cache_file="$ac_optarg" ;;
 
304
 
 
305
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
 
306
    ac_prev=datadir ;;
 
307
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
 
308
  | --da=*)
 
309
    datadir="$ac_optarg" ;;
 
310
 
 
311
  -disable-* | --disable-*)
 
312
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
 
313
    # Reject names that are not valid shell variable names.
 
314
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
 
315
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
 
316
    fi
 
317
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
 
318
    eval "enable_${ac_feature}=no" ;;
 
319
 
 
320
  -enable-* | --enable-*)
 
321
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
 
322
    # Reject names that are not valid shell variable names.
 
323
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
 
324
      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
 
325
    fi
 
326
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
 
327
    case "$ac_option" in
 
328
      *=*) ;;
 
329
      *) ac_optarg=yes ;;
 
330
    esac
 
331
    eval "enable_${ac_feature}='$ac_optarg'" ;;
 
332
 
 
333
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
 
334
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
 
335
  | --exec | --exe | --ex)
 
336
    ac_prev=exec_prefix ;;
 
337
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
 
338
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
 
339
  | --exec=* | --exe=* | --ex=*)
 
340
    exec_prefix="$ac_optarg" ;;
 
341
 
 
342
  -gas | --gas | --ga | --g)
 
343
    # Obsolete; use --with-gas.
 
344
    with_gas=yes ;;
 
345
 
 
346
  -help | --help | --hel | --he)
 
347
    # Omit some internal or obsolete options to make the list less imposing.
 
348
    # This message is too long to be a string in the A/UX 3.1 sh.
 
349
    cat << EOF
 
350
Usage: configure [options] [host]
 
351
Options: [defaults in brackets after descriptions]
 
352
Configuration:
 
353
  --cache-file=FILE       cache test results in FILE
 
354
  --help                  print this message
 
355
  --no-create             do not create output files
 
356
  --quiet, --silent       do not print \`checking...' messages
 
357
  --version               print the version of autoconf that created configure
 
358
Directory and file names:
 
359
  --prefix=PREFIX         install architecture-independent files in PREFIX
 
360
                          [$ac_default_prefix]
 
361
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
 
362
                          [same as prefix]
 
363
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
 
364
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
 
365
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
 
366
  --datadir=DIR           read-only architecture-independent data in DIR
 
367
                          [PREFIX/share]
 
368
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
 
369
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
 
370
                          [PREFIX/com]
 
371
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
 
372
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
 
373
  --includedir=DIR        C header files in DIR [PREFIX/include]
 
374
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
 
375
  --infodir=DIR           info documentation in DIR [PREFIX/info]
 
376
  --mandir=DIR            man documentation in DIR [PREFIX/man]
 
377
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
 
378
  --program-prefix=PREFIX prepend PREFIX to installed program names
 
379
  --program-suffix=SUFFIX append SUFFIX to installed program names
 
380
  --program-transform-name=PROGRAM
 
381
                          run sed PROGRAM on installed program names
 
382
EOF
 
383
    cat << EOF
 
384
Host type:
 
385
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
 
386
  --host=HOST             configure for HOST [guessed]
 
387
  --target=TARGET         configure for TARGET [TARGET=HOST]
 
388
Features and packages:
 
389
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
 
390
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
 
391
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
 
392
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
 
393
  --x-includes=DIR        X include files are in DIR
 
394
  --x-libraries=DIR       X library files are in DIR
 
395
EOF
 
396
    if test -n "$ac_help"; then
 
397
      echo "--enable and --with options recognized:$ac_help"
 
398
    fi
 
399
    exit 0 ;;
 
400
 
 
401
  -host | --host | --hos | --ho)
 
402
    ac_prev=host ;;
 
403
  -host=* | --host=* | --hos=* | --ho=*)
 
404
    host="$ac_optarg" ;;
 
405
 
 
406
  -includedir | --includedir | --includedi | --included | --include \
 
407
  | --includ | --inclu | --incl | --inc)
 
408
    ac_prev=includedir ;;
 
409
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
 
410
  | --includ=* | --inclu=* | --incl=* | --inc=*)
 
411
    includedir="$ac_optarg" ;;
 
412
 
 
413
  -infodir | --infodir | --infodi | --infod | --info | --inf)
 
414
    ac_prev=infodir ;;
 
415
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
 
416
    infodir="$ac_optarg" ;;
 
417
 
 
418
  -libdir | --libdir | --libdi | --libd)
 
419
    ac_prev=libdir ;;
 
420
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
 
421
    libdir="$ac_optarg" ;;
 
422
 
 
423
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
 
424
  | --libexe | --libex | --libe)
 
425
    ac_prev=libexecdir ;;
 
426
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
 
427
  | --libexe=* | --libex=* | --libe=*)
 
428
    libexecdir="$ac_optarg" ;;
 
429
 
 
430
  -localstatedir | --localstatedir | --localstatedi | --localstated \
 
431
  | --localstate | --localstat | --localsta | --localst \
 
432
  | --locals | --local | --loca | --loc | --lo)
 
433
    ac_prev=localstatedir ;;
 
434
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
 
435
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
 
436
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
 
437
    localstatedir="$ac_optarg" ;;
 
438
 
 
439
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
 
440
    ac_prev=mandir ;;
 
441
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
 
442
    mandir="$ac_optarg" ;;
 
443
 
 
444
  -nfp | --nfp | --nf)
 
445
    # Obsolete; use --without-fp.
 
446
    with_fp=no ;;
 
447
 
 
448
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
 
449
  | --no-cr | --no-c)
 
450
    no_create=yes ;;
 
451
 
 
452
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
 
453
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
 
454
    no_recursion=yes ;;
 
455
 
 
456
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
 
457
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
 
458
  | --oldin | --oldi | --old | --ol | --o)
 
459
    ac_prev=oldincludedir ;;
 
460
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
 
461
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
 
462
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
 
463
    oldincludedir="$ac_optarg" ;;
 
464
 
 
465
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
 
466
    ac_prev=prefix ;;
 
467
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
 
468
    prefix="$ac_optarg" ;;
 
469
 
 
470
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
 
471
  | --program-pre | --program-pr | --program-p)
 
472
    ac_prev=program_prefix ;;
 
473
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
 
474
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
 
475
    program_prefix="$ac_optarg" ;;
 
476
 
 
477
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
 
478
  | --program-suf | --program-su | --program-s)
 
479
    ac_prev=program_suffix ;;
 
480
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
 
481
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
 
482
    program_suffix="$ac_optarg" ;;
 
483
 
 
484
  -program-transform-name | --program-transform-name \
 
485
  | --program-transform-nam | --program-transform-na \
 
486
  | --program-transform-n | --program-transform- \
 
487
  | --program-transform | --program-transfor \
 
488
  | --program-transfo | --program-transf \
 
489
  | --program-trans | --program-tran \
 
490
  | --progr-tra | --program-tr | --program-t)
 
491
    ac_prev=program_transform_name ;;
 
492
  -program-transform-name=* | --program-transform-name=* \
 
493
  | --program-transform-nam=* | --program-transform-na=* \
 
494
  | --program-transform-n=* | --program-transform-=* \
 
495
  | --program-transform=* | --program-transfor=* \
 
496
  | --program-transfo=* | --program-transf=* \
 
497
  | --program-trans=* | --program-tran=* \
 
498
  | --progr-tra=* | --program-tr=* | --program-t=*)
 
499
    program_transform_name="$ac_optarg" ;;
 
500
 
 
501
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
 
502
  | -silent | --silent | --silen | --sile | --sil)
 
503
    silent=yes ;;
 
504
 
 
505
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
 
506
    ac_prev=sbindir ;;
 
507
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
 
508
  | --sbi=* | --sb=*)
 
509
    sbindir="$ac_optarg" ;;
 
510
 
 
511
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
 
512
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
 
513
  | --sharedst | --shareds | --shared | --share | --shar \
 
514
  | --sha | --sh)
 
515
    ac_prev=sharedstatedir ;;
 
516
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
 
517
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
 
518
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
 
519
  | --sha=* | --sh=*)
 
520
    sharedstatedir="$ac_optarg" ;;
 
521
 
 
522
  -site | --site | --sit)
 
523
    ac_prev=site ;;
 
524
  -site=* | --site=* | --sit=*)
 
525
    site="$ac_optarg" ;;
 
526
 
 
527
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
 
528
    ac_prev=srcdir ;;
 
529
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
 
530
    srcdir="$ac_optarg" ;;
 
531
 
 
532
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
 
533
  | --syscon | --sysco | --sysc | --sys | --sy)
 
534
    ac_prev=sysconfdir ;;
 
535
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
 
536
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
 
537
    sysconfdir="$ac_optarg" ;;
 
538
 
 
539
  -target | --target | --targe | --targ | --tar | --ta | --t)
 
540
    ac_prev=target ;;
 
541
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
 
542
    target="$ac_optarg" ;;
 
543
 
 
544
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
 
545
    verbose=yes ;;
 
546
 
 
547
  -version | --version | --versio | --versi | --vers)
 
548
    echo "configure generated by autoconf version 2.13"
 
549
    exit 0 ;;
 
550
 
 
551
  -with-* | --with-*)
 
552
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
 
553
    # Reject names that are not valid shell variable names.
 
554
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
 
555
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
 
556
    fi
 
557
    ac_package=`echo $ac_package| sed 's/-/_/g'`
 
558
    case "$ac_option" in
 
559
      *=*) ;;
 
560
      *) ac_optarg=yes ;;
 
561
    esac
 
562
    eval "with_${ac_package}='$ac_optarg'" ;;
 
563
 
 
564
  -without-* | --without-*)
 
565
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
 
566
    # Reject names that are not valid shell variable names.
 
567
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
 
568
      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
 
569
    fi
 
570
    ac_package=`echo $ac_package| sed 's/-/_/g'`
 
571
    eval "with_${ac_package}=no" ;;
 
572
 
 
573
  --x)
 
574
    # Obsolete; use --with-x.
 
575
    with_x=yes ;;
 
576
 
 
577
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
 
578
  | --x-incl | --x-inc | --x-in | --x-i)
 
579
    ac_prev=x_includes ;;
 
580
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
 
581
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
 
582
    x_includes="$ac_optarg" ;;
 
583
 
 
584
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
 
585
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
 
586
    ac_prev=x_libraries ;;
 
587
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
 
588
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
 
589
    x_libraries="$ac_optarg" ;;
 
590
 
 
591
  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
 
592
    ;;
 
593
 
 
594
  *)
 
595
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
 
596
      echo "configure: warning: $ac_option: invalid host type" 1>&2
 
597
    fi
 
598
    if test "x$nonopt" != xNONE; then
 
599
      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
 
600
    fi
 
601
    nonopt="$ac_option"
 
602
    ;;
 
603
 
 
604
  esac
 
605
done
 
606
 
 
607
if test -n "$ac_prev"; then
 
608
  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
 
609
fi
 
610
 
 
611
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
 
612
 
 
613
# File descriptor usage:
 
614
# 0 standard input
 
615
# 1 file creation
 
616
# 2 errors and warnings
 
617
# 3 some systems may open it to /dev/tty
 
618
# 4 used on the Kubota Titan
 
619
# 6 checking for... messages and results
 
620
# 5 compiler messages saved in config.log
 
621
if test "$silent" = yes; then
 
622
  exec 6>/dev/null
 
623
else
 
624
  exec 6>&1
 
625
fi
 
626
exec 5>./config.log
 
627
 
 
628
echo "\
 
629
This file contains any messages produced by compilers while
 
630
running configure, to aid debugging if configure makes a mistake.
 
631
" 1>&5
 
632
 
 
633
# Strip out --no-create and --no-recursion so they do not pile up.
 
634
# Also quote any args containing shell metacharacters.
 
635
ac_configure_args=
 
636
for ac_arg
 
637
do
 
638
  case "$ac_arg" in
 
639
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
 
640
  | --no-cr | --no-c) ;;
 
641
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
 
642
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
 
643
  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
 
644
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
 
645
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
 
646
  esac
 
647
done
 
648
 
 
649
# NLS nuisances.
 
650
# Only set these to C if already set.  These must not be set unconditionally
 
651
# because not all systems understand e.g. LANG=C (notably SCO).
 
652
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
 
653
# Non-C LC_CTYPE values break the ctype check.
 
654
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
 
655
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
 
656
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
 
657
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
658
 
 
659
# confdefs.h avoids OS command line length limits that DEFS can exceed.
 
660
rm -rf conftest* confdefs.h
 
661
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
 
662
echo > confdefs.h
 
663
 
 
664
# A filename unique to this package, relative to the directory that
 
665
# configure is in, which we can look for to find out if srcdir is correct.
 
666
ac_unique_file=configure.in
 
667
 
 
668
# Find the source files, if location was not specified.
 
669
if test -z "$srcdir"; then
 
670
  ac_srcdir_defaulted=yes
 
671
  # Try the directory containing this script, then its parent.
 
672
  ac_prog=$0
 
673
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
 
674
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
 
675
  srcdir=$ac_confdir
 
676
  if test ! -r $srcdir/$ac_unique_file; then
 
677
    srcdir=..
 
678
  fi
 
679
else
 
680
  ac_srcdir_defaulted=no
 
681
fi
 
682
if test ! -r $srcdir/$ac_unique_file; then
 
683
  if test "$ac_srcdir_defaulted" = yes; then
 
684
    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
 
685
  else
 
686
    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
 
687
  fi
 
688
fi
 
689
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
 
690
 
 
691
# Prefer explicitly selected file to automatically selected ones.
 
692
if test -z "$CONFIG_SITE"; then
 
693
  if test "x$prefix" != xNONE; then
 
694
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
 
695
  else
 
696
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
 
697
  fi
 
698
fi
 
699
for ac_site_file in $CONFIG_SITE; do
 
700
  if test -r "$ac_site_file"; then
 
701
    echo "loading site script $ac_site_file"
 
702
    . "$ac_site_file"
 
703
  fi
 
704
done
 
705
 
 
706
 
 
707
ac_ext=c
 
708
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
709
ac_cpp='$CPP $CPPFLAGS'
 
710
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 
711
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
712
cross_compiling=$ac_cv_prog_cc_cross
 
713
 
 
714
ac_exeext=
 
715
ac_objext=o
 
716
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
 
717
  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
 
718
  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
 
719
    ac_n= ac_c='
 
720
' ac_t='        '
 
721
  else
 
722
    ac_n=-n ac_c= ac_t=
 
723
  fi
 
724
else
 
725
  ac_n= ac_c='\c' ac_t=
 
726
fi
 
727
 
 
728
 
 
729
 
 
730
 
 
731
 
 
732
ac_aux_dir=
 
733
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
 
734
  if test -f $ac_dir/install-sh; then
 
735
    ac_aux_dir=$ac_dir
 
736
    ac_install_sh="$ac_aux_dir/install-sh -c"
 
737
    break
 
738
  elif test -f $ac_dir/install.sh; then
 
739
    ac_aux_dir=$ac_dir
 
740
    ac_install_sh="$ac_aux_dir/install.sh -c"
 
741
    break
 
742
  fi
 
743
done
 
744
if test -z "$ac_aux_dir"; then
 
745
  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
 
746
fi
 
747
ac_config_guess=$ac_aux_dir/config.guess
 
748
ac_config_sub=$ac_aux_dir/config.sub
 
749
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
750
 
 
751
 
 
752
# Make sure we can run config.sub.
 
753
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
 
754
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 
755
fi
 
756
 
 
757
echo $ac_n "checking host system type""... $ac_c" 1>&6
 
758
echo "configure:759: checking host system type" >&5
 
759
 
 
760
host_alias=$host
 
761
case "$host_alias" in
 
762
NONE)
 
763
  case $nonopt in
 
764
  NONE)
 
765
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
 
766
    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
 
767
    fi ;;
 
768
  *) host_alias=$nonopt ;;
 
769
  esac ;;
 
770
esac
 
771
 
 
772
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
 
773
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
 
774
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 
775
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 
776
echo "$ac_t""$host" 1>&6
 
777
 
 
778
# Extract the first word of "gcc", so it can be a program name with args.
 
779
set dummy gcc; ac_word=$2
 
780
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
781
echo "configure:782: checking for $ac_word" >&5
 
782
 
 
783
if test -n "$CC"; then
 
784
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
785
else
 
786
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
787
  ac_dummy="$PATH"
 
788
  for ac_dir in $ac_dummy; do
 
789
    test -z "$ac_dir" && ac_dir=.
 
790
    if test -f $ac_dir/$ac_word; then
 
791
      ac_cv_prog_CC="gcc"
 
792
      break
 
793
    fi
 
794
  done
 
795
  IFS="$ac_save_ifs"
 
796
fi
 
797
CC="$ac_cv_prog_CC"
 
798
if test -n "$CC"; then
 
799
  echo "$ac_t""$CC" 1>&6
 
800
else
 
801
  echo "$ac_t""no" 1>&6
 
802
fi
 
803
 
 
804
if test -z "$CC"; then
 
805
  # Extract the first word of "cc", so it can be a program name with args.
 
806
set dummy cc; ac_word=$2
 
807
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
808
echo "configure:809: checking for $ac_word" >&5
 
809
 
 
810
if test -n "$CC"; then
 
811
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
812
else
 
813
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
814
  ac_prog_rejected=no
 
815
  ac_dummy="$PATH"
 
816
  for ac_dir in $ac_dummy; do
 
817
    test -z "$ac_dir" && ac_dir=.
 
818
    if test -f $ac_dir/$ac_word; then
 
819
      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
 
820
        ac_prog_rejected=yes
 
821
        continue
 
822
      fi
 
823
      ac_cv_prog_CC="cc"
 
824
      break
 
825
    fi
 
826
  done
 
827
  IFS="$ac_save_ifs"
 
828
if test $ac_prog_rejected = yes; then
 
829
  # We found a bogon in the path, so make sure we never use it.
 
830
  set dummy $ac_cv_prog_CC
 
831
  shift
 
832
  if test $# -gt 0; then
 
833
    # We chose a different compiler from the bogus one.
 
834
    # However, it has the same basename, so the bogon will be chosen
 
835
    # first if we set CC to just the basename; use the full file name.
 
836
    shift
 
837
    set dummy "$ac_dir/$ac_word" "$@"
 
838
    shift
 
839
    ac_cv_prog_CC="$@"
 
840
  fi
 
841
fi
 
842
fi
 
843
CC="$ac_cv_prog_CC"
 
844
if test -n "$CC"; then
 
845
  echo "$ac_t""$CC" 1>&6
 
846
else
 
847
  echo "$ac_t""no" 1>&6
 
848
fi
 
849
 
 
850
  if test -z "$CC"; then
 
851
    case "`uname -s`" in
 
852
    *win32* | *WIN32*)
 
853
      # Extract the first word of "cl", so it can be a program name with args.
 
854
set dummy cl; ac_word=$2
 
855
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
856
echo "configure:857: checking for $ac_word" >&5
 
857
 
 
858
if test -n "$CC"; then
 
859
  ac_cv_prog_CC="$CC" # Let the user override the test.
 
860
else
 
861
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
862
  ac_dummy="$PATH"
 
863
  for ac_dir in $ac_dummy; do
 
864
    test -z "$ac_dir" && ac_dir=.
 
865
    if test -f $ac_dir/$ac_word; then
 
866
      ac_cv_prog_CC="cl"
 
867
      break
 
868
    fi
 
869
  done
 
870
  IFS="$ac_save_ifs"
 
871
fi
 
872
CC="$ac_cv_prog_CC"
 
873
if test -n "$CC"; then
 
874
  echo "$ac_t""$CC" 1>&6
 
875
else
 
876
  echo "$ac_t""no" 1>&6
 
877
fi
 
878
 ;;
 
879
    esac
 
880
  fi
 
881
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 
882
fi
 
883
 
 
884
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 
885
echo "configure:886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
886
 
 
887
ac_ext=c
 
888
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
889
ac_cpp='$CPP $CPPFLAGS'
 
890
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 
891
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
892
cross_compiling=$ac_cv_prog_cc_cross
 
893
 
 
894
cat > conftest.$ac_ext << EOF
 
895
 
 
896
#line 897 "configure"
 
897
#include "confdefs.h"
 
898
 
 
899
main(){return(0);}
 
900
EOF
 
901
if { (eval echo configure:902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
902
  ac_cv_prog_cc_works=yes
 
903
  # If we can't run a trivial program, we are probably using a cross compiler.
 
904
  if (./conftest; exit) 2>/dev/null; then
 
905
    ac_cv_prog_cc_cross=no
 
906
  else
 
907
    ac_cv_prog_cc_cross=yes
 
908
  fi
 
909
else
 
910
  echo "configure: failed program was:" >&5
 
911
  cat conftest.$ac_ext >&5
 
912
  ac_cv_prog_cc_works=no
 
913
fi
 
914
rm -fr conftest*
 
915
ac_ext=c
 
916
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
917
ac_cpp='$CPP $CPPFLAGS'
 
918
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 
919
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
920
cross_compiling=$ac_cv_prog_cc_cross
 
921
 
 
922
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 
923
if test $ac_cv_prog_cc_works = no; then
 
924
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 
925
fi
 
926
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
 
927
echo "configure:928: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 
928
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 
929
cross_compiling=$ac_cv_prog_cc_cross
 
930
 
 
931
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
 
932
echo "configure:933: checking whether we are using GNU C" >&5
 
933
 
 
934
cat > conftest.c <<EOF
 
935
#ifdef __GNUC__
 
936
  yes;
 
937
#endif
 
938
EOF
 
939
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 
940
  ac_cv_prog_gcc=yes
 
941
else
 
942
  ac_cv_prog_gcc=no
 
943
fi
 
944
 
 
945
echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
946
 
 
947
if test $ac_cv_prog_gcc = yes; then
 
948
  GCC=yes
 
949
else
 
950
  GCC=
 
951
fi
 
952
 
 
953
ac_test_CFLAGS="${CFLAGS+set}"
 
954
ac_save_CFLAGS="$CFLAGS"
 
955
CFLAGS=
 
956
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
 
957
echo "configure:958: checking whether ${CC-cc} accepts -g" >&5
 
958
 
 
959
echo 'void f(){}' > conftest.c
 
960
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
 
961
  ac_cv_prog_cc_g=yes
 
962
else
 
963
  ac_cv_prog_cc_g=no
 
964
fi
 
965
rm -f conftest*
 
966
 
 
967
 
 
968
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
 
969
if test "$ac_test_CFLAGS" = set; then
 
970
  CFLAGS="$ac_save_CFLAGS"
 
971
elif test $ac_cv_prog_cc_g = yes; then
 
972
  if test "$GCC" = yes; then
 
973
    CFLAGS="-g -O2"
 
974
  else
 
975
    CFLAGS="-g"
 
976
  fi
 
977
else
 
978
  if test "$GCC" = yes; then
 
979
    CFLAGS="-O2"
 
980
  else
 
981
    CFLAGS=
 
982
  fi
 
983
fi
 
984
 
 
985
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
 
986
echo "configure:987: checking for Cygwin environment" >&5
 
987
 
 
988
cat > conftest.$ac_ext <<EOF
 
989
#line 990 "configure"
 
990
#include "confdefs.h"
 
991
 
 
992
int main() {
 
993
 
 
994
#ifndef __CYGWIN__
 
995
#define __CYGWIN__ __CYGWIN32__
 
996
#endif
 
997
return __CYGWIN__;
 
998
; return 0; }
 
999
EOF
 
1000
if { (eval echo configure:1001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
1001
  rm -rf conftest*
 
1002
  ac_cv_cygwin=yes
 
1003
else
 
1004
  echo "configure: failed program was:" >&5
 
1005
  cat conftest.$ac_ext >&5
 
1006
  rm -rf conftest*
 
1007
  ac_cv_cygwin=no
 
1008
fi
 
1009
rm -f conftest*
 
1010
rm -f conftest*
 
1011
 
 
1012
echo "$ac_t""$ac_cv_cygwin" 1>&6
 
1013
CYGWIN=
 
1014
test "$ac_cv_cygwin" = yes && CYGWIN=yes
 
1015
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
 
1016
echo "configure:1017: checking for mingw32 environment" >&5
 
1017
 
 
1018
cat > conftest.$ac_ext <<EOF
 
1019
#line 1020 "configure"
 
1020
#include "confdefs.h"
 
1021
 
 
1022
int main() {
 
1023
return __MINGW32__;
 
1024
; return 0; }
 
1025
EOF
 
1026
if { (eval echo configure:1027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
1027
  rm -rf conftest*
 
1028
  ac_cv_mingw32=yes
 
1029
else
 
1030
  echo "configure: failed program was:" >&5
 
1031
  cat conftest.$ac_ext >&5
 
1032
  rm -rf conftest*
 
1033
  ac_cv_mingw32=no
 
1034
fi
 
1035
rm -f conftest*
 
1036
rm -f conftest*
 
1037
 
 
1038
echo "$ac_t""$ac_cv_mingw32" 1>&6
 
1039
MINGW32=
 
1040
test "$ac_cv_mingw32" = yes && MINGW32=yes
 
1041
 
 
1042
 
 
1043
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
 
1044
echo "configure:1045: checking for executable suffix" >&5
 
1045
 
 
1046
if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
 
1047
  ac_cv_exeext=.exe
 
1048
else
 
1049
  ac_cv_exeext=no
 
1050
fi
 
1051
 
 
1052
EXEEXT=""
 
1053
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
 
1054
echo "$ac_t""${ac_cv_exeext}" 1>&6
 
1055
ac_exeext=$EXEEXT
 
1056
 
 
1057
 
 
1058
 
 
1059
# Check for full floating-point support, including Infinity and NaN
 
1060
IEEEFLAG=
 
1061
 
 
1062
echo $ac_n "checking for full floating-point support""... $ac_c" 1>&6
 
1063
echo "configure:1064: checking for full floating-point support" >&5
 
1064
if test "$cross_compiling" = yes; then
 
1065
     echo "$ac_t""unknown (cross-compiling)" 1>&6
 
1066
     
 
1067
echo $ac_n "checking whether "cc -mieee" works""... $ac_c" 1>&6
 
1068
echo "configure:1069: checking whether "cc -mieee" works" >&5
 
1069
ac_save_cflags=${CFLAGS}
 
1070
CFLAGS="$CFLAGS -mieee"
 
1071
cat > conftest.$ac_ext <<EOF
 
1072
#line 1073 "configure"
 
1073
#include "confdefs.h"
 
1074
 
 
1075
int main() {
 
1076
 
 
1077
; return 0; }
 
1078
EOF
 
1079
if { (eval echo configure:1080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
1080
  rm -rf conftest*
 
1081
     echo "$ac_t""yes" 1>&6
 
1082
        IEEEFLAG="-mieee"
 
1083
else
 
1084
  echo "configure: failed program was:" >&5
 
1085
  cat conftest.$ac_ext >&5
 
1086
  rm -rf conftest*
 
1087
     echo "$ac_t""no" 1>&6
 
1088
fi
 
1089
rm -f conftest*
 
1090
CFLAGS=${ac_save_cflags}
 
1091
 
 
1092
 
 
1093
else
 
1094
  cat > conftest.$ac_ext <<EOF
 
1095
#line 1096 "configure"
 
1096
#include "confdefs.h"
 
1097
 
 
1098
#include <float.h>
 
1099
int main(void) {
 
1100
 double one = 1.0;
 
1101
 double zero = 0.0;
 
1102
 if (one/zero > DBL_MAX)        /* infinity */
 
1103
   if (zero/zero != zero/zero)  /* NaN */
 
1104
     return 0;
 
1105
 return 1;
 
1106
}
 
1107
 
 
1108
EOF
 
1109
if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
1110
then
 
1111
     echo "$ac_t""yes" 1>&6
 
1112
    
 
1113
else
 
1114
  echo "configure: failed program was:" >&5
 
1115
  cat conftest.$ac_ext >&5
 
1116
  rm -fr conftest*
 
1117
     echo "$ac_t""no" 1>&6
 
1118
     ac_save_cflags=${CFLAGS}
 
1119
  CFLAGS=-mieee
 
1120
  
 
1121
echo $ac_n "checking for full floating-point support with -mieee""... $ac_c" 1>&6
 
1122
echo "configure:1123: checking for full floating-point support with -mieee" >&5
 
1123
if test "$cross_compiling" = yes; then
 
1124
     echo "$ac_t""unknown (cross-compiling)" 1>&6
 
1125
    { echo "configure: error: *** INTERNAL CONFIGURE ERROR" 1>&2; exit 1; }
 
1126
 
 
1127
else
 
1128
  cat > conftest.$ac_ext <<EOF
 
1129
#line 1130 "configure"
 
1130
#include "confdefs.h"
 
1131
 
 
1132
#include <float.h>
 
1133
int main(void) {
 
1134
 double one = 1.0;
 
1135
 double zero = 0.0;
 
1136
 if (one/zero > DBL_MAX)        /* infinity */
 
1137
   if (zero/zero != zero/zero)  /* NaN */
 
1138
     return 0;
 
1139
 return 1;
 
1140
}
 
1141
 
 
1142
EOF
 
1143
if { (eval echo configure:1144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
1144
then
 
1145
     echo "$ac_t""yes" 1>&6
 
1146
    IEEEFLAG="-mieee"
 
1147
else
 
1148
  echo "configure: failed program was:" >&5
 
1149
  cat conftest.$ac_ext >&5
 
1150
  rm -fr conftest*
 
1151
     echo "$ac_t""no" 1>&6
 
1152
    echo "configure: warning: *** Incomplete floating-point support." 1>&2
 
1153
fi
 
1154
rm -fr conftest*
 
1155
fi
 
1156
 
 
1157
 
 
1158
  CFLAGS=${ac_save_cflags}
 
1159
fi
 
1160
rm -fr conftest*
 
1161
fi
 
1162
 
 
1163
 
 
1164
CFLAGS="$CFLAGS $IEEEFLAG"
 
1165
 
 
1166
# Set BINDIR
 
1167
 
 
1168
if test -n "${bindir}"; then
 
1169
BINDIR="${bindir}"
 
1170
else
 
1171
BINDIR=/usr/local/bin
 
1172
fi
 
1173
 
 
1174
 
 
1175
# Set SRCDIR and DSTDIR
 
1176
 
 
1177
# Extract the first word of "pwd", so it can be a program name with args.
 
1178
set dummy pwd; ac_word=$2
 
1179
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
1180
echo "configure:1181: checking for $ac_word" >&5
 
1181
 
 
1182
case "$pwd" in
 
1183
  /*)
 
1184
  ac_cv_path_pwd="$pwd" # Let the user override the test with a path.
 
1185
  ;;
 
1186
  ?:/*)                  
 
1187
  ac_cv_path_pwd="$pwd" # Let the user override the test with a dos path.
 
1188
  ;;
 
1189
  *)
 
1190
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
1191
  ac_dummy="$PATH"
 
1192
  for ac_dir in $ac_dummy; do 
 
1193
    test -z "$ac_dir" && ac_dir=.
 
1194
    if test -f $ac_dir/$ac_word; then
 
1195
      ac_cv_path_pwd="$ac_dir/$ac_word"
 
1196
      break
 
1197
    fi
 
1198
  done
 
1199
  IFS="$ac_save_ifs"
 
1200
  test -z "$ac_cv_path_pwd" && ac_cv_path_pwd="pwd"
 
1201
  ;;
 
1202
esac
 
1203
pwd="$ac_cv_path_pwd"
 
1204
if test -n "$pwd"; then
 
1205
  echo "$ac_t""$pwd" 1>&6
 
1206
else
 
1207
  echo "$ac_t""no" 1>&6
 
1208
fi
 
1209
 
 
1210
 
 
1211
if test "$MINGW32" = yes ; then
 
1212
  winpwd="$pwd -W"
 
1213
else
 
1214
  winpwd="$pwd"
 
1215
fi
 
1216
 
 
1217
echo $ac_n "checking for source directory""... $ac_c" 1>&6
 
1218
echo "configure:1219: checking for source directory" >&5
 
1219
 
 
1220
if test -z "$srcdir" ; then
 
1221
  SRCDIR=`$pwd`
 
1222
else
 
1223
  SRCDIR=`(cd "$srcdir" ; $pwd)`
 
1224
fi
 
1225
 
 
1226
echo "$ac_t"""$SRCDIR"" 1>&6
 
1227
 
 
1228
echo $ac_n "checking for build directory""... $ac_c" 1>&6
 
1229
echo "configure:1230: checking for build directory" >&5
 
1230
 
 
1231
DSTDIR=`$pwd`
 
1232
WINDSTDIR=`$winpwd`
 
1233
 
 
1234
echo "$ac_t"""$DSTDIR"" 1>&6
 
1235
 
 
1236
 
 
1237
 
 
1238
 
 
1239
# Set ARCH
 
1240
 
 
1241
ARCH=
 
1242
if test -z "${host}"; then
 
1243
ARCH="unknown"
 
1244
else
 
1245
ARCH="${host}"
 
1246
fi
 
1247
 
 
1248
 
 
1249
 
 
1250
# Use absolute path for aux directory so that install-sh works
 
1251
 
 
1252
ac_aux_dir=
 
1253
for ac_dir in $SRCDIR $srcdir/$SRCDIR; do
 
1254
  if test -f $ac_dir/install-sh; then
 
1255
    ac_aux_dir=$ac_dir
 
1256
    ac_install_sh="$ac_aux_dir/install-sh -c"
 
1257
    break
 
1258
  elif test -f $ac_dir/install.sh; then
 
1259
    ac_aux_dir=$ac_dir
 
1260
    ac_install_sh="$ac_aux_dir/install.sh -c"
 
1261
    break
 
1262
  fi
 
1263
done
 
1264
if test -z "$ac_aux_dir"; then
 
1265
  { echo "configure: error: can not find install-sh or install.sh in $SRCDIR $srcdir/$SRCDIR" 1>&2; exit 1; }
 
1266
fi
 
1267
ac_config_guess=$ac_aux_dir/config.guess
 
1268
ac_config_sub=$ac_aux_dir/config.sub
 
1269
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
1270
 
 
1271
 
 
1272
# Set GISBASE and GRASS_BIN
 
1273
 
 
1274
GISBASE="${WINDSTDIR}/dist.${ARCH}"
 
1275
GRASS_BIN="${DSTDIR}/bin.${ARCH}"
 
1276
 
 
1277
 
 
1278
 
 
1279
 
 
1280
# Set GRASS_VERSION_*
 
1281
 
 
1282
GRASS_VERSION_FILE=include/VERSION
 
1283
GRASS_VERSION_MAJOR=`sed -n 1p "${GRASS_VERSION_FILE}"`
 
1284
GRASS_VERSION_MINOR=`sed -n 2p "${GRASS_VERSION_FILE}"`
 
1285
GRASS_VERSION_RELEASE=`sed -n 3p "${GRASS_VERSION_FILE}"`
 
1286
GRASS_VERSION_DATE=`sed -n 4p "${GRASS_VERSION_FILE}"`
 
1287
GRASS_VERSION_NUMBER=`echo ${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}`
 
1288
NAME_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/\..*//'`
 
1289
 
 
1290
LIB_VER=`echo ${GRASS_VERSION_NUMBER} | sed 's/^\([0-9.]*\).*$/\1/'`
 
1291
 
 
1292
 
 
1293
 
 
1294
 
 
1295
 
 
1296
 
 
1297
 
 
1298
 
 
1299
 
 
1300
 
 
1301
 
 
1302
# Check for MacOSX App
 
1303
 
 
1304
# Check whether --enable-macosx-app or --disable-macosx-app was given.
 
1305
if test "${enable_macosx_app+set}" = set; then
 
1306
  enableval="$enable_macosx_app"
 
1307
  :
 
1308
else
 
1309
  enable_macosx_app=no
 
1310
fi
 
1311
 
 
1312
 
 
1313
echo $ac_n "checking for MacOSX App""... $ac_c" 1>&6
 
1314
echo "configure:1315: checking for MacOSX App" >&5
 
1315
case "$enable_macosx_app" in
 
1316
        yes)    MACOSX_APP=1    ;;
 
1317
        no)     MACOSX_APP=     ;;
 
1318
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
1319
esac
 
1320
echo "$ac_t"""$enable_macosx_app"" 1>&6
 
1321
 
 
1322
 
 
1323
# Check for MacOSX archs
 
1324
 
 
1325
echo $ac_n "checking for MacOSX architectures""... $ac_c" 1>&6
 
1326
echo "configure:1327: checking for MacOSX architectures" >&5
 
1327
 
 
1328
MACOSX_ARCHS=
 
1329
 
 
1330
if test -z "$with_macosx_archs" ; then
 
1331
  echo "$ac_t""no" 1>&6
 
1332
else
 
1333
  for a in $with_macosx_archs
 
1334
  do
 
1335
    # check if valid arch?
 
1336
    case "$a" in
 
1337
      i386|ppc|x86_64|ppc64)
 
1338
        MACOSX_ARCHS="$MACOSX_ARCHS -arch $a"
 
1339
        ;;
 
1340
    esac
 
1341
  done
 
1342
  echo "$ac_t""$MACOSX_ARCHS" 1>&6
 
1343
  LDFLAGS="$LDFLAGS $MACOSX_ARCHS"
 
1344
  CFLAGS="$CFLAGS $MACOSX_ARCHS"
 
1345
  CXXFLAGS="$CXXFLAGS $MACOSX_ARCHS"
 
1346
fi
 
1347
 
 
1348
 
 
1349
 
 
1350
# Done checking MacOSX archs
 
1351
 
 
1352
# Check for MacOSX SDK
 
1353
 
 
1354
echo $ac_n "checking for MacOSX SDK""... $ac_c" 1>&6
 
1355
echo "configure:1356: checking for MacOSX SDK" >&5
 
1356
 
 
1357
MACOSX_SDK=
 
1358
 
 
1359
if test -z "$with_macosx_sdk" ; then
 
1360
  echo "$ac_t""no" 1>&6
 
1361
else
 
1362
  
 
1363
ac_safe=`echo "$with_macosx_sdk/SDKSettings.plist" | sed 'y%./+-%__p_%'`
 
1364
echo $ac_n "checking for $with_macosx_sdk/SDKSettings.plist""... $ac_c" 1>&6
 
1365
echo "configure:1366: checking for $with_macosx_sdk/SDKSettings.plist" >&5
 
1366
 
 
1367
if test "$cross_compiling" = yes; then
 
1368
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
 
1369
else
 
1370
  if test -r $with_macosx_sdk/SDKSettings.plist; then
 
1371
    eval "ac_cv_file_$ac_safe=yes"
 
1372
  else
 
1373
    eval "ac_cv_file_$ac_safe=no"
 
1374
  fi
 
1375
fi
 
1376
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
 
1377
  echo "$ac_t""yes" 1>&6
 
1378
  
 
1379
    MACOSX_SDK="-isysroot $with_macosx_sdk"
 
1380
else
 
1381
  echo "$ac_t""no" 1>&6
 
1382
 
 
1383
    { echo "configure: error: *** specified SDK does not exist or is not a SDK" 1>&2; exit 1; }
 
1384
fi
 
1385
 
 
1386
  LDFLAGS="$LDFLAGS $MACOSX_SDK"
 
1387
  CFLAGS="$CFLAGS $MACOSX_SDK"
 
1388
  CXXFLAGS="$CXXFLAGS $MACOSX_SDK"
 
1389
fi
 
1390
 
 
1391
 
 
1392
 
 
1393
# Done checking MacOSX SDK
 
1394
 
 
1395
# Set INST_DIR
 
1396
 
 
1397
if test -n "$MACOSX_APP" ; then
 
1398
    INSTDIR='${prefix}'"/GRASS-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.app/Contents/MacOS"
 
1399
else
 
1400
    INSTDIR='${prefix}'"/grass-${GRASS_VERSION_MAJOR}.${GRASS_VERSION_MINOR}.${GRASS_VERSION_RELEASE}"
 
1401
fi
 
1402
 
 
1403
 
 
1404
 
 
1405
# Get flags for building shared libraries
 
1406
 
 
1407
 
 
1408
    echo $ac_n "checking how to build libraries""... $ac_c" 1>&6
 
1409
echo "configure:1410: checking how to build libraries" >&5
 
1410
    # Check whether --enable-shared or --disable-shared was given.
 
1411
if test "${enable_shared+set}" = set; then
 
1412
  enableval="$enable_shared"
 
1413
  shared_ok=$enableval
 
1414
else
 
1415
  shared_ok=yes
 
1416
fi
 
1417
 
 
1418
 
 
1419
    if test "${enable_shared+set}" = set; then
 
1420
        enableval="$enable_shared"
 
1421
        shared_ok=$enableval
 
1422
    else
 
1423
        shared_ok=yes
 
1424
    fi
 
1425
 
 
1426
    if test "$shared_ok" = "yes" ; then
 
1427
        echo "$ac_t""shared" 1>&6
 
1428
        SHARED_BUILD=1
 
1429
        GRASS_LIB_PREFIX='$(SHLIB_PREFIX)'
 
1430
        GRASS_LIB_SUFFIX='$(SHLIB_SUFFIX)'
 
1431
        GRASS_LIBRARY_TYPE='shlib'
 
1432
    else
 
1433
        echo "$ac_t""static" 1>&6
 
1434
        SHARED_BUILD=0
 
1435
        cat >> confdefs.h <<\EOF
 
1436
#define STATIC_BUILD 1
 
1437
EOF
 
1438
 
 
1439
        GRASS_LIB_PREFIX='$(STLIB_PREFIX)'
 
1440
        GRASS_LIB_SUFFIX='$(STLIB_SUFFIX)'
 
1441
        GRASS_LIBRARY_TYPE='stlib'
 
1442
    fi
 
1443
    
 
1444
    
 
1445
    
 
1446
 
 
1447
 
 
1448
ac_save_ldflags="$LDFLAGS"
 
1449
# Extract the first word of "ranlib", so it can be a program name with args.
 
1450
set dummy ranlib; ac_word=$2
 
1451
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
1452
echo "configure:1453: checking for $ac_word" >&5
 
1453
 
 
1454
if test -n "$RANLIB"; then
 
1455
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 
1456
else
 
1457
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
1458
  ac_dummy="$PATH"
 
1459
  for ac_dir in $ac_dummy; do
 
1460
    test -z "$ac_dir" && ac_dir=.
 
1461
    if test -f $ac_dir/$ac_word; then
 
1462
      ac_cv_prog_RANLIB="ranlib"
 
1463
      break
 
1464
    fi
 
1465
  done
 
1466
  IFS="$ac_save_ifs"
 
1467
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
 
1468
fi
 
1469
RANLIB="$ac_cv_prog_RANLIB"
 
1470
if test -n "$RANLIB"; then
 
1471
  echo "$ac_t""$RANLIB" 1>&6
 
1472
else
 
1473
  echo "$ac_t""no" 1>&6
 
1474
fi
 
1475
 
 
1476
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 
1477
echo "configure:1478: checking how to run the C preprocessor" >&5
 
1478
# On Suns, sometimes $CPP names a directory.
 
1479
if test -n "$CPP" && test -d "$CPP"; then
 
1480
  CPP=
 
1481
fi
 
1482
if test -z "$CPP"; then
 
1483
 
 
1484
  # This must be in double quotes, not single quotes, because CPP may get
 
1485
  # substituted into the Makefile and "${CC-cc}" will confuse make.
 
1486
  CPP="${CC-cc} -E"
 
1487
  # On the NeXT, cc -E runs the code through the compiler's parser,
 
1488
  # not just through cpp.
 
1489
  cat > conftest.$ac_ext <<EOF
 
1490
#line 1491 "configure"
 
1491
#include "confdefs.h"
 
1492
#include <assert.h>
 
1493
Syntax Error
 
1494
EOF
 
1495
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
1496
{ (eval echo configure:1497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
1497
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
1498
if test -z "$ac_err"; then
 
1499
  :
 
1500
else
 
1501
  echo "$ac_err" >&5
 
1502
  echo "configure: failed program was:" >&5
 
1503
  cat conftest.$ac_ext >&5
 
1504
  rm -rf conftest*
 
1505
  CPP="${CC-cc} -E -traditional-cpp"
 
1506
  cat > conftest.$ac_ext <<EOF
 
1507
#line 1508 "configure"
 
1508
#include "confdefs.h"
 
1509
#include <assert.h>
 
1510
Syntax Error
 
1511
EOF
 
1512
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
1513
{ (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
1514
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
1515
if test -z "$ac_err"; then
 
1516
  :
 
1517
else
 
1518
  echo "$ac_err" >&5
 
1519
  echo "configure: failed program was:" >&5
 
1520
  cat conftest.$ac_ext >&5
 
1521
  rm -rf conftest*
 
1522
  CPP="${CC-cc} -nologo -E"
 
1523
  cat > conftest.$ac_ext <<EOF
 
1524
#line 1525 "configure"
 
1525
#include "confdefs.h"
 
1526
#include <assert.h>
 
1527
Syntax Error
 
1528
EOF
 
1529
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
1530
{ (eval echo configure:1531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
1531
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
1532
if test -z "$ac_err"; then
 
1533
  :
 
1534
else
 
1535
  echo "$ac_err" >&5
 
1536
  echo "configure: failed program was:" >&5
 
1537
  cat conftest.$ac_ext >&5
 
1538
  rm -rf conftest*
 
1539
  CPP=/lib/cpp
 
1540
fi
 
1541
rm -f conftest*
 
1542
fi
 
1543
rm -f conftest*
 
1544
fi
 
1545
rm -f conftest*
 
1546
  ac_cv_prog_CPP="$CPP"
 
1547
  CPP="$ac_cv_prog_CPP"
 
1548
else
 
1549
  ac_cv_prog_CPP="$CPP"
 
1550
fi
 
1551
echo "$ac_t""$CPP" 1>&6
 
1552
 
 
1553
 
 
1554
 
 
1555
    # Step 0.a: Enable 64 bit support?
 
1556
 
 
1557
    echo $ac_n "checking if 64bit support is requested""... $ac_c" 1>&6
 
1558
echo "configure:1559: checking if 64bit support is requested" >&5
 
1559
    # Check whether --enable-64bit or --disable-64bit was given.
 
1560
if test "${enable_64bit+set}" = set; then
 
1561
  enableval="$enable_64bit"
 
1562
  :
 
1563
else
 
1564
  enableval="no"
 
1565
fi
 
1566
 
 
1567
 
 
1568
    if test "$enableval" = "yes"; then
 
1569
        do64bit=yes
 
1570
    else
 
1571
        do64bit=no
 
1572
    fi
 
1573
    echo "$ac_t""$do64bit" 1>&6
 
1574
 
 
1575
    # Step 0.b: Enable Solaris 64 bit VIS support?
 
1576
 
 
1577
    echo $ac_n "checking if 64bit Sparc VIS support is requested""... $ac_c" 1>&6
 
1578
echo "configure:1579: checking if 64bit Sparc VIS support is requested" >&5
 
1579
    # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
 
1580
if test "${enable_64bit_vis+set}" = set; then
 
1581
  enableval="$enable_64bit_vis"
 
1582
  :
 
1583
else
 
1584
  enableval="no"
 
1585
fi
 
1586
 
 
1587
 
 
1588
    if test "$enableval" = "yes"; then
 
1589
        # Force 64bit on with VIS
 
1590
        do64bit=yes
 
1591
        do64bitVIS=yes
 
1592
    else
 
1593
        do64bitVIS=no
 
1594
    fi
 
1595
    echo "$ac_t""$do64bitVIS" 1>&6
 
1596
 
 
1597
    # Step 1: set the variable "system" to hold the name and version number
 
1598
    # for the system.  This can usually be done via the "uname" command, but
 
1599
    # there are a few systems, like Next, where this doesn't work.
 
1600
 
 
1601
    echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
 
1602
echo "configure:1603: checking system version (for dynamic loading)" >&5
 
1603
    if test -f /usr/lib/NextStep/software_version; then
 
1604
        system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
 
1605
    else
 
1606
        system=`uname -s`-`uname -r`
 
1607
        if test "$?" -ne 0 ; then
 
1608
            echo "$ac_t""unknown (can't find uname command)" 1>&6
 
1609
            system=unknown
 
1610
        else
 
1611
            # Special check for weird MP-RAS system (uname returns weird
 
1612
            # results, and the version is kept in special file).
 
1613
        
 
1614
            if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
 
1615
                system=MP-RAS-`awk '{print }' /etc/.relid`
 
1616
            fi
 
1617
            if test "`uname -s`" = "AIX" ; then
 
1618
                system=AIX-`uname -v`.`uname -r`
 
1619
            fi
 
1620
            echo "$ac_t""$system" 1>&6
 
1621
        fi
 
1622
    fi
 
1623
 
 
1624
    # Step 2: check for existence of -ldl library.  This is needed because
 
1625
    # Linux can use either -ldl or -ldld for dynamic loading.
 
1626
 
 
1627
    echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
 
1628
echo "configure:1629: checking for dlopen in -ldl" >&5
 
1629
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 
1630
 
 
1631
ac_save_LIBS="$LIBS"
 
1632
LIBS="-ldl  $LIBS"
 
1633
cat > conftest.$ac_ext <<EOF
 
1634
#line 1635 "configure"
 
1635
#include "confdefs.h"
 
1636
/* Override any gcc2 internal prototype to avoid an error.  */
 
1637
/* We use char because int might match the return type of a gcc2
 
1638
    builtin and then its argument prototype would still apply.  */
 
1639
char dlopen();
 
1640
 
 
1641
int main() {
 
1642
dlopen()
 
1643
; return 0; }
 
1644
EOF
 
1645
if { (eval echo configure:1646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
1646
  rm -rf conftest*
 
1647
  eval "ac_cv_lib_$ac_lib_var=yes"
 
1648
else
 
1649
  echo "configure: failed program was:" >&5
 
1650
  cat conftest.$ac_ext >&5
 
1651
  rm -rf conftest*
 
1652
  eval "ac_cv_lib_$ac_lib_var=no"
 
1653
fi
 
1654
rm -f conftest*
 
1655
LIBS="$ac_save_LIBS"
 
1656
 
 
1657
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
1658
  echo "$ac_t""yes" 1>&6
 
1659
  have_dl=yes
 
1660
else
 
1661
  echo "$ac_t""no" 1>&6
 
1662
have_dl=no
 
1663
fi
 
1664
 
 
1665
 
 
1666
    # Require ranlib early so we can override it in special cases below.
 
1667
 
 
1668
    
 
1669
 
 
1670
    # Step 3: set configuration options based on system name and version.
 
1671
 
 
1672
    do64bit_ok=no
 
1673
    EXTRA_CFLAGS=""
 
1674
    GRASS_EXPORT_FILE_SUFFIX=""
 
1675
    UNSHARED_LIB_SUFFIX=""
 
1676
    GRASS_TRIM_DOTS='`echo ${LIB_VER} | tr -d .`'
 
1677
    ECHO_VERSION='`echo ${LIB_VER}`'
 
1678
    GRASS_LIB_VERSIONS_OK=ok
 
1679
    CFLAGS_DEBUG=-g
 
1680
    CFLAGS_OPTIMIZE=-O
 
1681
    if test "$GCC" = "yes" ; then
 
1682
        CFLAGS_WARNING="-Wall -Wconversion -Wno-implicit-int"
 
1683
    else
 
1684
        CFLAGS_WARNING=""
 
1685
    fi
 
1686
    GRASS_NEEDS_EXP_FILE=0
 
1687
    GRASS_BUILD_EXP_FILE=""
 
1688
    GRASS_EXP_FILE=""
 
1689
    # Extract the first word of "ar", so it can be a program name with args.
 
1690
set dummy ar; ac_word=$2
 
1691
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
1692
echo "configure:1693: checking for $ac_word" >&5
 
1693
 
 
1694
if test -n "$AR"; then
 
1695
  ac_cv_prog_AR="$AR" # Let the user override the test.
 
1696
else
 
1697
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
1698
  ac_dummy="$PATH"
 
1699
  for ac_dir in $ac_dummy; do
 
1700
    test -z "$ac_dir" && ac_dir=.
 
1701
    if test -f $ac_dir/$ac_word; then
 
1702
      ac_cv_prog_AR="ar"
 
1703
      break
 
1704
    fi
 
1705
  done
 
1706
  IFS="$ac_save_ifs"
 
1707
fi
 
1708
AR="$ac_cv_prog_AR"
 
1709
if test -n "$AR"; then
 
1710
  echo "$ac_t""$AR" 1>&6
 
1711
else
 
1712
  echo "$ac_t""no" 1>&6
 
1713
fi
 
1714
 
 
1715
    if test "${AR}" = "" ; then
 
1716
        { echo "configure: error: Required archive tool 'ar' not found on PATH." 1>&2; exit 1; }
 
1717
    fi
 
1718
    STLIB_LD='${AR} cr'
 
1719
    LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
 
1720
    PLAT_OBJS=""
 
1721
    case $system in
 
1722
        AIX-5.*)
 
1723
            if test "${GRASS_THREADS}" = "1" -a "$GCC" != "yes" ; then
 
1724
                # AIX requires the _r compiler when gcc isn't being used
 
1725
                if test "${CC}" != "cc_r" ; then
 
1726
                    CC=${CC}_r
 
1727
                fi
 
1728
                echo "$ac_t""Using $CC for compiling with threads" 1>&6
 
1729
            fi
 
1730
            LIBS="$LIBS -lc"
 
1731
            # AIX-5 uses ELF style dynamic libraries
 
1732
            SHLIB_CFLAGS=""
 
1733
            # Note: need the LIBS below, otherwise Tk won't find Tcl's
 
1734
            # symbols when dynamically loaded into tclsh.
 
1735
            SHLIB_LD_LIBS='${LIBS}'
 
1736
            SHLIB_SUFFIX=".so"
 
1737
 
 
1738
            LDFLAGS=""
 
1739
 
 
1740
            LD_LIBRARY_PATH_VAR="LIBPATH"
 
1741
 
 
1742
            # Check to enable 64-bit flags for compiler/linker
 
1743
            if test "$do64bit" = "yes" ; then
 
1744
                if test "$GCC" = "yes" ; then
 
1745
                    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
 
1746
                else 
 
1747
                    do64bit_ok=yes
 
1748
                    EXTRA_CFLAGS="-q64"
 
1749
                    LDFLAGS="-q64"
 
1750
                    RANLIB="${RANLIB} -X64"
 
1751
                    AR="${AR} -X64"
 
1752
                    SHLIB_LD_FLAGS="-b64"
 
1753
                fi
 
1754
            fi
 
1755
 
 
1756
            if test "`uname -m`" = "ia64" ; then
 
1757
                # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
 
1758
                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
 
1759
                # AIX-5 has dl* in libc.so
 
1760
                if test "$GCC" = "yes" ; then
 
1761
                    CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
 
1762
                else
 
1763
                    CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
 
1764
                fi
 
1765
                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
 
1766
            else
 
1767
                SHLIB_LD="${SRCDIR}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}"
 
1768
                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
 
1769
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
1770
                GRASS_NEEDS_EXP_FILE=1
 
1771
                GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
 
1772
            fi
 
1773
            ;;
 
1774
        AIX-*)
 
1775
            if test "${GRASS_THREADS}" = "1" -a "$GCC" != "yes" ; then
 
1776
                # AIX requires the _r compiler when gcc isn't being used
 
1777
                if test "${CC}" != "cc_r" ; then
 
1778
                    CC=${CC}_r
 
1779
                fi
 
1780
                echo "$ac_t""Using $CC for compiling with threads" 1>&6
 
1781
            fi
 
1782
            LIBS="$LIBS -lc"
 
1783
            SHLIB_CFLAGS=""
 
1784
            SHLIB_LD_LIBS='${LIBS}'
 
1785
            SHLIB_SUFFIX=".so"
 
1786
            LDFLAGS=""
 
1787
            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
 
1788
            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
1789
            LD_LIBRARY_PATH_VAR="LIBPATH"
 
1790
            GRASS_NEEDS_EXP_FILE=1
 
1791
            GRASS_EXPORT_FILE_SUFFIX='${LIB_VER}.exp'
 
1792
 
 
1793
            # Check to enable 64-bit flags for compiler/linker
 
1794
            if test "$do64bit" = "yes" ; then
 
1795
                if test "$GCC" = "yes" ; then
 
1796
                    echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
 
1797
                else 
 
1798
                    do64bit_ok=yes
 
1799
                    EXTRA_CFLAGS="-q64"
 
1800
                    LDFLAGS="-q64"
 
1801
                    RANLIB="${RANLIB} -X64"
 
1802
                    AR="${AR} -X64"
 
1803
                    SHLIB_LD_FLAGS="-b64"
 
1804
                fi
 
1805
            fi
 
1806
            SHLIB_LD="${SRCDIR}/ldAix /bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry ${SHLIB_LD_FLAGS}"
 
1807
 
 
1808
            # On AIX <=v4 systems, libbsd.a has to be linked in to support
 
1809
            # non-blocking file IO.  This library has to be linked in after
 
1810
            # the MATH_LIBS or it breaks the pow() function.  The way to
 
1811
            # insure proper sequencing, is to add it to the tail of MATH_LIBS.
 
1812
            # This library also supplies gettimeofday.
 
1813
            #
 
1814
            # AIX does not have a timezone field in struct tm. When the AIX
 
1815
            # bsd library is used, the timezone global and the gettimeofday
 
1816
            # methods are to be avoided for timezone deduction instead, we
 
1817
            # deduce the timezone by comparing the localtime result on a
 
1818
            # known GMT value.
 
1819
 
 
1820
            echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
 
1821
echo "configure:1822: checking for gettimeofday in -lbsd" >&5
 
1822
ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
 
1823
 
 
1824
ac_save_LIBS="$LIBS"
 
1825
LIBS="-lbsd  $LIBS"
 
1826
cat > conftest.$ac_ext <<EOF
 
1827
#line 1828 "configure"
 
1828
#include "confdefs.h"
 
1829
/* Override any gcc2 internal prototype to avoid an error.  */
 
1830
/* We use char because int might match the return type of a gcc2
 
1831
    builtin and then its argument prototype would still apply.  */
 
1832
char gettimeofday();
 
1833
 
 
1834
int main() {
 
1835
gettimeofday()
 
1836
; return 0; }
 
1837
EOF
 
1838
if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
1839
  rm -rf conftest*
 
1840
  eval "ac_cv_lib_$ac_lib_var=yes"
 
1841
else
 
1842
  echo "configure: failed program was:" >&5
 
1843
  cat conftest.$ac_ext >&5
 
1844
  rm -rf conftest*
 
1845
  eval "ac_cv_lib_$ac_lib_var=no"
 
1846
fi
 
1847
rm -f conftest*
 
1848
LIBS="$ac_save_LIBS"
 
1849
 
 
1850
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
1851
  echo "$ac_t""yes" 1>&6
 
1852
  libbsd=yes
 
1853
else
 
1854
  echo "$ac_t""no" 1>&6
 
1855
libbsd=no
 
1856
fi
 
1857
 
 
1858
            if test $libbsd = yes; then
 
1859
                MATH_LIBS="$MATH_LIBS -lbsd"
 
1860
                cat >> confdefs.h <<\EOF
 
1861
#define USE_DELTA_FOR_TZ 1
 
1862
EOF
 
1863
 
 
1864
            fi
 
1865
            ;;
 
1866
        BeOS*)
 
1867
            SHLIB_CFLAGS="-fPIC"
 
1868
            SHLIB_LD="${CC} -nostart"
 
1869
            SHLIB_LD_LIBS='${LIBS}'
 
1870
            SHLIB_SUFFIX=".so"
 
1871
            LDFLAGS=""
 
1872
 
 
1873
            #-----------------------------------------------------------
 
1874
            # Check for inet_ntoa in -lbind, for BeOS (which also needs
 
1875
            # -lsocket, even if the network functions are in -lnet which
 
1876
            # is always linked to, for compatibility.
 
1877
            #-----------------------------------------------------------
 
1878
            echo $ac_n "checking for inet_ntoa in -lbind""... $ac_c" 1>&6
 
1879
echo "configure:1880: checking for inet_ntoa in -lbind" >&5
 
1880
ac_lib_var=`echo bind'_'inet_ntoa | sed 'y%./+-%__p_%'`
 
1881
 
 
1882
ac_save_LIBS="$LIBS"
 
1883
LIBS="-lbind  $LIBS"
 
1884
cat > conftest.$ac_ext <<EOF
 
1885
#line 1886 "configure"
 
1886
#include "confdefs.h"
 
1887
/* Override any gcc2 internal prototype to avoid an error.  */
 
1888
/* We use char because int might match the return type of a gcc2
 
1889
    builtin and then its argument prototype would still apply.  */
 
1890
char inet_ntoa();
 
1891
 
 
1892
int main() {
 
1893
inet_ntoa()
 
1894
; return 0; }
 
1895
EOF
 
1896
if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
1897
  rm -rf conftest*
 
1898
  eval "ac_cv_lib_$ac_lib_var=yes"
 
1899
else
 
1900
  echo "configure: failed program was:" >&5
 
1901
  cat conftest.$ac_ext >&5
 
1902
  rm -rf conftest*
 
1903
  eval "ac_cv_lib_$ac_lib_var=no"
 
1904
fi
 
1905
rm -f conftest*
 
1906
LIBS="$ac_save_LIBS"
 
1907
 
 
1908
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
1909
  echo "$ac_t""yes" 1>&6
 
1910
  LIBS="$LIBS -lbind -lsocket"
 
1911
else
 
1912
  echo "$ac_t""no" 1>&6
 
1913
fi
 
1914
 
 
1915
            ;;
 
1916
        BSD/OS-2.1*|BSD/OS-3*)
 
1917
            SHLIB_CFLAGS=""
 
1918
            SHLIB_LD="shlicc -r"
 
1919
            SHLIB_LD_LIBS='${LIBS}'
 
1920
            SHLIB_SUFFIX=".so"
 
1921
            LDFLAGS=""
 
1922
            CC_SEARCH_FLAGS=""
 
1923
            LD_SEARCH_FLAGS=""
 
1924
            ;;
 
1925
        BSD/OS-4.*)
 
1926
            SHLIB_CFLAGS="-export-dynamic -fPIC"
 
1927
            SHLIB_LD="cc -shared"
 
1928
            SHLIB_LD_LIBS='${LIBS}'
 
1929
            SHLIB_SUFFIX=".so"
 
1930
            LDFLAGS="-export-dynamic"
 
1931
            CC_SEARCH_FLAGS=""
 
1932
            LD_SEARCH_FLAGS=""
 
1933
            ;;
 
1934
        dgux*)
 
1935
            SHLIB_CFLAGS="-K PIC"
 
1936
            SHLIB_LD="cc -G"
 
1937
            SHLIB_LD_LIBS=""
 
1938
            SHLIB_SUFFIX=".so"
 
1939
            LDFLAGS=""
 
1940
            CC_SEARCH_FLAGS=""
 
1941
            LD_SEARCH_FLAGS=""
 
1942
            ;;
 
1943
        HP-UX-*.11.*)
 
1944
            # Use updated header definitions where possible
 
1945
            cat >> confdefs.h <<\EOF
 
1946
#define _XOPEN_SOURCE 1
 
1947
EOF
 
1948
          # Use the XOPEN network library
 
1949
            cat >> confdefs.h <<\EOF
 
1950
#define _XOPEN_SOURCE_EXTENDED 1
 
1951
EOF
 
1952
 # Use the XOPEN network library
 
1953
            LIBS="$LIBS -lxnet"               # Use the XOPEN network library
 
1954
 
 
1955
            SHLIB_SUFFIX=".sl"
 
1956
            echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
 
1957
echo "configure:1958: checking for shl_load in -ldld" >&5
 
1958
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 
1959
 
 
1960
ac_save_LIBS="$LIBS"
 
1961
LIBS="-ldld  $LIBS"
 
1962
cat > conftest.$ac_ext <<EOF
 
1963
#line 1964 "configure"
 
1964
#include "confdefs.h"
 
1965
/* Override any gcc2 internal prototype to avoid an error.  */
 
1966
/* We use char because int might match the return type of a gcc2
 
1967
    builtin and then its argument prototype would still apply.  */
 
1968
char shl_load();
 
1969
 
 
1970
int main() {
 
1971
shl_load()
 
1972
; return 0; }
 
1973
EOF
 
1974
if { (eval echo configure:1975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
1975
  rm -rf conftest*
 
1976
  eval "ac_cv_lib_$ac_lib_var=yes"
 
1977
else
 
1978
  echo "configure: failed program was:" >&5
 
1979
  cat conftest.$ac_ext >&5
 
1980
  rm -rf conftest*
 
1981
  eval "ac_cv_lib_$ac_lib_var=no"
 
1982
fi
 
1983
rm -f conftest*
 
1984
LIBS="$ac_save_LIBS"
 
1985
 
 
1986
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
1987
  echo "$ac_t""yes" 1>&6
 
1988
  shared_ok=yes
 
1989
else
 
1990
  echo "$ac_t""no" 1>&6
 
1991
shared_ok=no
 
1992
fi
 
1993
 
 
1994
            if test "$shared_ok" = yes; then
 
1995
                SHLIB_CFLAGS="+z"
 
1996
                SHLIB_LD="ld -b"
 
1997
                SHLIB_LD_LIBS='${LIBS}'
 
1998
                LDFLAGS="-Wl,-E"
 
1999
                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
 
2000
                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
 
2001
                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
 
2002
            fi
 
2003
 
 
2004
            # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
 
2005
            #EXTRA_CFLAGS="+DAportable"
 
2006
 
 
2007
            # Check to enable 64-bit flags for compiler/linker
 
2008
            if test "$do64bit" = "yes" ; then
 
2009
                if test "$GCC" = "yes" ; then
 
2010
                    hpux_arch=`gcc -dumpmachine`
 
2011
                    case $hpux_arch in
 
2012
                        hppa64*)
 
2013
                            # 64-bit gcc in use.  Fix flags for GNU ld.
 
2014
                            do64bit_ok=yes
 
2015
                            SHLIB_LD="gcc -shared"
 
2016
                            SHLIB_LD_LIBS=""
 
2017
                            LD_SEARCH_FLAGS=''
 
2018
                            CC_SEARCH_FLAGS=''
 
2019
                            ;;
 
2020
                        *)
 
2021
                            echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
 
2022
                            ;;
 
2023
                    esac
 
2024
                else
 
2025
                    do64bit_ok=yes
 
2026
                    if test "`uname -m`" = "ia64" ; then
 
2027
                        EXTRA_CFLAGS="+DD64"
 
2028
                        LDFLAGS="+DD64 $LDFLAGS"
 
2029
                    else
 
2030
                        EXTRA_CFLAGS="+DA2.0W"
 
2031
                        LDFLAGS="+DA2.0W $LDFLAGS"
 
2032
                    fi
 
2033
                fi
 
2034
            fi
 
2035
            ;;
 
2036
        HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
 
2037
            SHLIB_SUFFIX=".sl"
 
2038
            echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
 
2039
echo "configure:2040: checking for shl_load in -ldld" >&5
 
2040
ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
 
2041
 
 
2042
ac_save_LIBS="$LIBS"
 
2043
LIBS="-ldld  $LIBS"
 
2044
cat > conftest.$ac_ext <<EOF
 
2045
#line 2046 "configure"
 
2046
#include "confdefs.h"
 
2047
/* Override any gcc2 internal prototype to avoid an error.  */
 
2048
/* We use char because int might match the return type of a gcc2
 
2049
    builtin and then its argument prototype would still apply.  */
 
2050
char shl_load();
 
2051
 
 
2052
int main() {
 
2053
shl_load()
 
2054
; return 0; }
 
2055
EOF
 
2056
if { (eval echo configure:2057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2057
  rm -rf conftest*
 
2058
  eval "ac_cv_lib_$ac_lib_var=yes"
 
2059
else
 
2060
  echo "configure: failed program was:" >&5
 
2061
  cat conftest.$ac_ext >&5
 
2062
  rm -rf conftest*
 
2063
  eval "ac_cv_lib_$ac_lib_var=no"
 
2064
fi
 
2065
rm -f conftest*
 
2066
LIBS="$ac_save_LIBS"
 
2067
 
 
2068
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
2069
  echo "$ac_t""yes" 1>&6
 
2070
  shared_ok=yes
 
2071
else
 
2072
  echo "$ac_t""no" 1>&6
 
2073
shared_ok=no
 
2074
fi
 
2075
 
 
2076
            if test "$shared_ok" = yes; then
 
2077
                SHLIB_CFLAGS="+z"
 
2078
                SHLIB_LD="ld -b"
 
2079
                SHLIB_LD_LIBS=""
 
2080
                LDFLAGS="-Wl,-E"
 
2081
                CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
 
2082
                LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
 
2083
                LD_LIBRARY_PATH_VAR="SHLIB_PATH"
 
2084
            fi
 
2085
            ;;
 
2086
        IRIX-4.*)
 
2087
            SHLIB_CFLAGS="-G 0"
 
2088
            SHLIB_SUFFIX=".a"
 
2089
            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
 
2090
            SHLIB_LD_LIBS='${LIBS}'
 
2091
            LDFLAGS="-Wl,-D,08000000"
 
2092
            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
 
2093
            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2094
            SHARED_LIB_SUFFIX='${LIB_VER}.a'
 
2095
            ;;
 
2096
        IRIX-5.*)
 
2097
            SHLIB_CFLAGS=""
 
2098
            SHLIB_LD="ld -shared -rdata_shared"
 
2099
            SHLIB_LD_LIBS='${LIBS}'
 
2100
            SHLIB_SUFFIX=".so"
 
2101
            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 
2102
            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 
2103
            EXTRA_CFLAGS=""
 
2104
            LDFLAGS=""
 
2105
            ;;
 
2106
        IRIX-6.2)
 
2107
            SHLIB_CFLAGS=""
 
2108
            SHLIB_LD="ld -shared -rdata_shared"
 
2109
            SHLIB_LD_LIBS='${LIBS}'
 
2110
            SHLIB_SUFFIX=".so"
 
2111
            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 
2112
            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 
2113
            ;;
 
2114
        IRIX-6.*|IRIX64-6.5*)
 
2115
            SHLIB_CFLAGS=""
 
2116
            SHLIB_LD="ld -n32 -shared -rdata_shared"
 
2117
            SHLIB_LD_LIBS='${LIBS}'
 
2118
            SHLIB_SUFFIX=".so"
 
2119
            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 
2120
            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 
2121
            if test "$GCC" = "yes" ; then
 
2122
                EXTRA_CFLAGS="-mabi=n32"
 
2123
                LDFLAGS="-mabi=n32"
 
2124
            else
 
2125
                case $system in
 
2126
                    IRIX-6.3)
 
2127
                        # Use to build 6.2 compatible binaries on 6.3.
 
2128
                        EXTRA_CFLAGS="-n32 -D_OLD_TERMIOS"
 
2129
                        ;;
 
2130
                    *)
 
2131
                        EXTRA_CFLAGS="-n32"
 
2132
                        ;;
 
2133
                esac
 
2134
                LDFLAGS="-n32"
 
2135
            fi
 
2136
            ;;
 
2137
        IRIX64-6.*)
 
2138
            SHLIB_CFLAGS=""
 
2139
            SHLIB_LD="ld -n32 -shared -rdata_shared"
 
2140
            SHLIB_LD_LIBS='${LIBS}'
 
2141
            SHLIB_SUFFIX=".so"
 
2142
            LDFLAGS=""
 
2143
            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 
2144
            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 
2145
 
 
2146
            # Check to enable 64-bit flags for compiler/linker
 
2147
 
 
2148
            if test "$do64bit" = "yes" ; then
 
2149
                if test "$GCC" = "yes" ; then
 
2150
                    echo "configure: warning: 64bit mode not supported by gcc" 1>&2
 
2151
                else
 
2152
                    do64bit_ok=yes
 
2153
                    SHLIB_LD="ld -64 -shared -rdata_shared"
 
2154
                    EXTRA_CFLAGS="-64"
 
2155
                    LDFLAGS="-64"
 
2156
                fi
 
2157
            fi
 
2158
            ;;
 
2159
        Linux*)
 
2160
            SHLIB_CFLAGS="-fPIC"
 
2161
            SHLIB_LD_LIBS='${LIBS}'
 
2162
            SHLIB_SUFFIX=".so"
 
2163
 
 
2164
            CFLAGS_OPTIMIZE=-O2
 
2165
            # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings 
 
2166
            # when you inline the string and math operations.  Turn this off to
 
2167
            # get rid of the warnings.
 
2168
            #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
 
2169
 
 
2170
            if test "$have_dl" = yes; then
 
2171
                SHLIB_LD="${CC} -shared"
 
2172
                LDFLAGS="-Wl,--export-dynamic"
 
2173
                CC_SEARCH_FLAGS='-Wl,-rpath-link,${LIB_RUNTIME_DIR}'
 
2174
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2175
            else
 
2176
                ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
 
2177
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
 
2178
echo "configure:2179: checking for dld.h" >&5
 
2179
 
 
2180
cat > conftest.$ac_ext <<EOF
 
2181
#line 2182 "configure"
 
2182
#include "confdefs.h"
 
2183
#include <dld.h>
 
2184
EOF
 
2185
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
2186
{ (eval echo configure:2187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
2187
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
2188
if test -z "$ac_err"; then
 
2189
  rm -rf conftest*
 
2190
  eval "ac_cv_header_$ac_safe=yes"
 
2191
else
 
2192
  echo "$ac_err" >&5
 
2193
  echo "configure: failed program was:" >&5
 
2194
  cat conftest.$ac_ext >&5
 
2195
  rm -rf conftest*
 
2196
  eval "ac_cv_header_$ac_safe=no"
 
2197
fi
 
2198
rm -f conftest*
 
2199
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
2200
  echo "$ac_t""yes" 1>&6
 
2201
  
 
2202
                    SHLIB_LD="ld -shared"
 
2203
                    LDFLAGS=""
 
2204
                    CC_SEARCH_FLAGS=""
 
2205
                    LD_SEARCH_FLAGS=""
 
2206
else
 
2207
  echo "$ac_t""no" 1>&6
 
2208
fi
 
2209
 
 
2210
            fi
 
2211
            if test "`uname -m`" = "alpha" ; then
 
2212
                EXTRA_CFLAGS="-mieee"
 
2213
            fi
 
2214
 
 
2215
            # The combo of gcc + glibc has a bug related
 
2216
            # to inlining of functions like strtod(). The
 
2217
            # -fno-builtin flag should address this problem
 
2218
            # but it does not work. The -fno-inline flag
 
2219
            # is kind of overkill but it works.
 
2220
            # Disable inlining only when one of the
 
2221
            # files in compat/*.c is being linked in.
 
2222
            if test x"${USE_COMPAT}" != x ; then
 
2223
                EXTRA_CFLAGS="${EXTRA_CFLAGS} -fno-inline"
 
2224
            fi
 
2225
 
 
2226
            # XIM peeking works under XFree86.
 
2227
            cat >> confdefs.h <<\EOF
 
2228
#define PEEK_XCLOSEIM 1
 
2229
EOF
 
2230
 
 
2231
 
 
2232
            ;;
 
2233
        GNU*)
 
2234
            SHLIB_CFLAGS="-fPIC"
 
2235
            SHLIB_LD_LIBS='${LIBS}'
 
2236
            SHLIB_SUFFIX=".so"
 
2237
 
 
2238
            if test "$have_dl" = yes; then
 
2239
                SHLIB_LD="${CC} -shared"
 
2240
                LDFLAGS="-Wl,--export-dynamic"
 
2241
                CC_SEARCH_FLAGS=""
 
2242
                LD_SEARCH_FLAGS=""
 
2243
            else
 
2244
                ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
 
2245
echo $ac_n "checking for dld.h""... $ac_c" 1>&6
 
2246
echo "configure:2247: checking for dld.h" >&5
 
2247
 
 
2248
cat > conftest.$ac_ext <<EOF
 
2249
#line 2250 "configure"
 
2250
#include "confdefs.h"
 
2251
#include <dld.h>
 
2252
EOF
 
2253
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
2254
{ (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
2255
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
2256
if test -z "$ac_err"; then
 
2257
  rm -rf conftest*
 
2258
  eval "ac_cv_header_$ac_safe=yes"
 
2259
else
 
2260
  echo "$ac_err" >&5
 
2261
  echo "configure: failed program was:" >&5
 
2262
  cat conftest.$ac_ext >&5
 
2263
  rm -rf conftest*
 
2264
  eval "ac_cv_header_$ac_safe=no"
 
2265
fi
 
2266
rm -f conftest*
 
2267
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
2268
  echo "$ac_t""yes" 1>&6
 
2269
  
 
2270
                    SHLIB_LD="ld -shared"
 
2271
                    LDFLAGS=""
 
2272
                    CC_SEARCH_FLAGS=""
 
2273
                    LD_SEARCH_FLAGS=""
 
2274
else
 
2275
  echo "$ac_t""no" 1>&6
 
2276
fi
 
2277
 
 
2278
            fi
 
2279
            if test "`uname -m`" = "alpha" ; then
 
2280
                EXTRA_CFLAGS="-mieee"
 
2281
            fi
 
2282
            ;;
 
2283
        CYGWIN*)
 
2284
            SHLIB_CFLAGS=""
 
2285
            SHLIB_LD_LIBS='${LIBS}'
 
2286
            SHLIB_SUFFIX=".dll"
 
2287
 
 
2288
            SHLIB_LD="${CC} -shared"
 
2289
            LDFLAGS="-Wl,--export-dynamic"
 
2290
            CC_SEARCH_FLAGS=""
 
2291
            LD_SEARCH_FLAGS=""
 
2292
            LD_LIBRARY_PATH_VAR="PATH"
 
2293
            ;;
 
2294
        MINGW*)
 
2295
            SHLIB_CFLAGS=""
 
2296
            SHLIB_LD_LIBS='${LIBS}'
 
2297
            SHLIB_SUFFIX=".dll"
 
2298
 
 
2299
            SHLIB_LD="${CC} -shared"
 
2300
            LDFLAGS="-Wl,--export-dynamic,--enable-runtime-pseudo-reloc"
 
2301
            CC_SEARCH_FLAGS=""
 
2302
            LD_SEARCH_FLAGS=""
 
2303
            LD_LIBRARY_PATH_VAR="PATH"
 
2304
            ;;
 
2305
        MP-RAS-02*)
 
2306
            SHLIB_CFLAGS="-K PIC"
 
2307
            SHLIB_LD="cc -G"
 
2308
            SHLIB_LD_LIBS=""
 
2309
            SHLIB_SUFFIX=".so"
 
2310
            LDFLAGS=""
 
2311
            CC_SEARCH_FLAGS=""
 
2312
            LD_SEARCH_FLAGS=""
 
2313
            ;;
 
2314
        MP-RAS-*)
 
2315
            SHLIB_CFLAGS="-K PIC"
 
2316
            SHLIB_LD="cc -G"
 
2317
            SHLIB_LD_LIBS=""
 
2318
            SHLIB_SUFFIX=".so"
 
2319
            LDFLAGS="-Wl,-Bexport"
 
2320
            CC_SEARCH_FLAGS=""
 
2321
            LD_SEARCH_FLAGS=""
 
2322
            ;;
 
2323
        NetBSD-*)
 
2324
            # NetBSD has ELF.
 
2325
            SHLIB_CFLAGS="-fPIC"
 
2326
            SHLIB_LD="ld -Bshareable -x"
 
2327
            SHLIB_LD_LIBS="${LIBS}"
 
2328
            SHLIB_SUFFIX=".so"
 
2329
            LDFLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR} -export-dynamic'
 
2330
            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 
2331
            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 
2332
            if test "${GRASS_THREADS}" = "1" ; then
 
2333
                # The -pthread needs to go in the CFLAGS, not LIBS
 
2334
                LIBS=`echo $LIBS | sed s/-pthread//`
 
2335
                EXTRA_CFLAGS="-pthread"
 
2336
                LDFLAGS="$LDFLAGS -pthread"
 
2337
            fi
 
2338
            # NetBSD doesn't handle version numbers with dots.
 
2339
            UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
 
2340
            SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so',
 
2341
            GRASS_LIB_VERSIONS_OK=nodots
 
2342
            ;;
 
2343
        OpenBSD-*)
 
2344
            SHLIB_LD="${CC} -shared"
 
2345
            SHLIB_LD_LIBS='${LIBS}'
 
2346
            SHLIB_SUFFIX=".so"
 
2347
            LDFLAGS=""
 
2348
            CC_SEARCH_FLAGS=""
 
2349
            LD_SEARCH_FLAGS=""
 
2350
            echo $ac_n "checking for ELF""... $ac_c" 1>&6
 
2351
echo "configure:2352: checking for ELF" >&5
 
2352
            cat > conftest.$ac_ext <<EOF
 
2353
#line 2354 "configure"
 
2354
#include "confdefs.h"
 
2355
 
 
2356
#ifdef __ELF__
 
2357
        yes
 
2358
#endif
 
2359
            
 
2360
EOF
 
2361
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
2362
  egrep "yes" >/dev/null 2>&1; then
 
2363
  rm -rf conftest*
 
2364
  echo "$ac_t""yes" 1>&6
 
2365
                SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
 
2366
else
 
2367
  rm -rf conftest*
 
2368
  echo "$ac_t""no" 1>&6
 
2369
                SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
 
2370
            
 
2371
fi
 
2372
rm -f conftest*
 
2373
 
 
2374
 
 
2375
            # OpenBSD doesn't do version numbers with dots.
 
2376
            UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
 
2377
            GRASS_LIB_VERSIONS_OK=nodots
 
2378
            ;;
 
2379
        FreeBSD-[1-2].*)
 
2380
            # Not available on all versions:  check for include file.
 
2381
            ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
 
2382
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
 
2383
echo "configure:2384: checking for dlfcn.h" >&5
 
2384
 
 
2385
cat > conftest.$ac_ext <<EOF
 
2386
#line 2387 "configure"
 
2387
#include "confdefs.h"
 
2388
#include <dlfcn.h>
 
2389
EOF
 
2390
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
2391
{ (eval echo configure:2392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
2392
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
2393
if test -z "$ac_err"; then
 
2394
  rm -rf conftest*
 
2395
  eval "ac_cv_header_$ac_safe=yes"
 
2396
else
 
2397
  echo "$ac_err" >&5
 
2398
  echo "configure: failed program was:" >&5
 
2399
  cat conftest.$ac_ext >&5
 
2400
  rm -rf conftest*
 
2401
  eval "ac_cv_header_$ac_safe=no"
 
2402
fi
 
2403
rm -f conftest*
 
2404
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
2405
  echo "$ac_t""yes" 1>&6
 
2406
  
 
2407
                SHLIB_CFLAGS="-fPIC"
 
2408
                SHLIB_LD="ld -Bshareable -x"
 
2409
                SHLIB_LD_LIBS=""
 
2410
                SHLIB_SUFFIX=".so"
 
2411
                LDFLAGS=""
 
2412
                CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 
2413
                LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 
2414
                echo $ac_n "checking for ELF""... $ac_c" 1>&6
 
2415
echo "configure:2416: checking for ELF" >&5
 
2416
                cat > conftest.$ac_ext <<EOF
 
2417
#line 2418 "configure"
 
2418
#include "confdefs.h"
 
2419
 
 
2420
#ifdef __ELF__
 
2421
        yes
 
2422
#endif
 
2423
                
 
2424
EOF
 
2425
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
2426
  egrep "yes" >/dev/null 2>&1; then
 
2427
  rm -rf conftest*
 
2428
  echo "$ac_t""yes" 1>&6
 
2429
                    SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
 
2430
else
 
2431
  rm -rf conftest*
 
2432
  echo "$ac_t""no" 1>&6
 
2433
                    SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
 
2434
                
 
2435
fi
 
2436
rm -f conftest*
 
2437
 
 
2438
            
 
2439
else
 
2440
  echo "$ac_t""no" 1>&6
 
2441
 
 
2442
                SHLIB_CFLAGS=""
 
2443
                SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
 
2444
                SHLIB_LD_LIBS='${LIBS}'
 
2445
                SHLIB_SUFFIX=".a"
 
2446
                LDFLAGS=""
 
2447
                CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
 
2448
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2449
                SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
 
2450
            
 
2451
fi
 
2452
 
 
2453
            UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
 
2454
            GRASS_LIB_VERSIONS_OK=nodots
 
2455
            ;;
 
2456
        FreeBSD-*)
 
2457
            # FreeBSD 3.* and greater have ELF.
 
2458
            SHLIB_CFLAGS="-fPIC"
 
2459
            SHLIB_LD="ld -Bshareable -x"
 
2460
            SHLIB_LD_LIBS='${LIBS}'
 
2461
            SHLIB_SUFFIX=".so"
 
2462
            LDFLAGS="-export-dynamic"
 
2463
            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 
2464
            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 
2465
            if test "${GRASS_THREADS}" = "1" ; then
 
2466
                # The -pthread needs to go in the CFLAGS, not LIBS
 
2467
                LIBS=`echo $LIBS | sed s/-pthread//`
 
2468
                EXTRA_CFLAGS="-pthread"
 
2469
                LDFLAGS="$LDFLAGS -pthread"
 
2470
            fi
 
2471
            case $system in
 
2472
            FreeBSD-3.*)
 
2473
                # FreeBSD-3 doesn't handle version numbers with dots.
 
2474
                UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
 
2475
                SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so'
 
2476
                GRASS_LIB_VERSIONS_OK=nodots
 
2477
                ;;
 
2478
            esac
 
2479
            ;;
 
2480
        Rhapsody-*|Darwin-*)
 
2481
            SHLIB_CFLAGS="-fno-common"
 
2482
            SHLIB_LD="cc -dynamiclib -compatibility_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -current_version \${GRASS_VERSION_MAJOR}.\${GRASS_VERSION_MINOR} -install_name \${INST_DIR}/lib/lib\${LIB_NAME}\${SHLIB_SUFFIX}"
 
2483
            GRASS_SHLIB_LD_EXTRAS=""
 
2484
            SHLIB_LD_LIBS='${LIBS}'
 
2485
            SHLIB_SUFFIX=".dylib"
 
2486
            PLAT_OBJS=""
 
2487
            CC_SEARCH_FLAGS=""
 
2488
            LD_SEARCH_FLAGS=""
 
2489
            CFLAGS_OPTIMIZE="-Os"
 
2490
            LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
 
2491
            # for compatibility with autoconf vers 2.13 :
 
2492
            HACK=""
 
2493
            EXTRA_CFLAGS=""
 
2494
            LIBS="$LIBS"
 
2495
            ;;
 
2496
        NEXTSTEP-*)
 
2497
            SHLIB_CFLAGS=""
 
2498
            SHLIB_LD="cc -nostdlib -r"
 
2499
            SHLIB_LD_LIBS=""
 
2500
            SHLIB_SUFFIX=".so"
 
2501
            LDFLAGS=""
 
2502
            CC_SEARCH_FLAGS=""
 
2503
            LD_SEARCH_FLAGS=""
 
2504
            ;;
 
2505
        OS/390-*)
 
2506
            CFLAGS_OPTIMIZE=""      # Optimizer is buggy
 
2507
            cat >> confdefs.h <<\EOF
 
2508
#define _OE_SOCKETS 1
 
2509
EOF
 
2510
  # needed in sys/socket.h
 
2511
            ;;      
 
2512
        OSF1-1.0|OSF1-1.1|OSF1-1.2)
 
2513
            # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
 
2514
            SHLIB_CFLAGS=""
 
2515
            # Hack: make package name same as library name
 
2516
            SHLIB_LD='ld -R -export :'
 
2517
            SHLIB_LD_LIBS=""
 
2518
            SHLIB_SUFFIX=".so"
 
2519
            LDFLAGS=""
 
2520
            CC_SEARCH_FLAGS=""
 
2521
            LD_SEARCH_FLAGS=""
 
2522
            ;;
 
2523
        OSF1-1.*)
 
2524
            # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
 
2525
            SHLIB_CFLAGS="-fPIC"
 
2526
            if test "$SHARED_BUILD" = "1" ; then
 
2527
                SHLIB_LD="ld -shared"
 
2528
            else
 
2529
                SHLIB_LD="ld -non_shared"
 
2530
            fi
 
2531
            SHLIB_LD_LIBS=""
 
2532
            SHLIB_SUFFIX=".so"
 
2533
            LDFLAGS=""
 
2534
            CC_SEARCH_FLAGS=""
 
2535
            LD_SEARCH_FLAGS=""
 
2536
            ;;
 
2537
        OSF1-V*)
 
2538
            # Digital OSF/1
 
2539
            SHLIB_CFLAGS=""
 
2540
            if test "$SHARED_BUILD" = "1" ; then
 
2541
                SHLIB_LD='ld -shared -expect_unresolved "*"'
 
2542
            else
 
2543
                SHLIB_LD='ld -non_shared -expect_unresolved "*"'
 
2544
            fi
 
2545
            SHLIB_LD_LIBS=""
 
2546
            SHLIB_SUFFIX=".so"
 
2547
           LDFLAGS=""
 
2548
            CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
 
2549
            LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
 
2550
            if test "$GCC" = "yes" ; then
 
2551
                EXTRA_CFLAGS="-mieee"
 
2552
            else
 
2553
                EXTRA_CFLAGS="-DHAVE_TZSET -std1 -ieee"
 
2554
            fi
 
2555
            # see pthread_intro(3) for pthread support on osf1, k.furukawa
 
2556
            if test "${GRASS_THREADS}" = "1" ; then
 
2557
                EXTRA_CFLAGS="${EXTRA_CFLAGS} -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
 
2558
                EXTRA_CFLAGS="${EXTRA_CFLAGS} -DGRASS_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
 
2559
                LIBS=`echo $LIBS | sed s/-lpthreads//`
 
2560
                if test "$GCC" = "yes" ; then
 
2561
                    LIBS="$LIBS -lpthread -lmach -lexc"
 
2562
                else
 
2563
                    EXTRA_CFLAGS="${EXTRA_CFLAGS} -pthread"
 
2564
                    LDFLAGS="-pthread"
 
2565
                fi
 
2566
            fi
 
2567
 
 
2568
            ;;
 
2569
        QNX-6*)
 
2570
            # QNX RTP
 
2571
            # This may work for all QNX, but it was only reported for v6.
 
2572
            SHLIB_CFLAGS="-fPIC"
 
2573
            SHLIB_LD="ld -Bshareable -x"
 
2574
            SHLIB_LD_LIBS=""
 
2575
            SHLIB_SUFFIX=".so"
 
2576
            LDFLAGS=""
 
2577
            CC_SEARCH_FLAGS=""
 
2578
            LD_SEARCH_FLAGS=""
 
2579
            ;;
 
2580
        RISCos-*)
 
2581
            SHLIB_CFLAGS="-G 0"
 
2582
            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
 
2583
            SHLIB_LD_LIBS='${LIBS}'
 
2584
            SHLIB_SUFFIX=".a"
 
2585
            LDFLAGS="-Wl,-D,08000000"
 
2586
            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
 
2587
            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2588
            ;;
 
2589
        SCO_SV-3.2*)
 
2590
            # Note, dlopen is available only on SCO 3.2.5 and greater. However,
 
2591
            # this test works, since "uname -s" was non-standard in 3.2.4 and
 
2592
            # below.
 
2593
            if test "$GCC" = "yes" ; then
 
2594
                SHLIB_CFLAGS="-fPIC -melf"
 
2595
                LDFLAGS="-melf -Wl,-Bexport"
 
2596
            else
 
2597
                SHLIB_CFLAGS="-Kpic -belf"
 
2598
                LDFLAGS="-belf -Wl,-Bexport"
 
2599
            fi
 
2600
            SHLIB_LD="ld -G"
 
2601
            SHLIB_LD_LIBS=""
 
2602
            SHLIB_SUFFIX=".so"
 
2603
            CC_SEARCH_FLAGS=""
 
2604
            LD_SEARCH_FLAGS=""
 
2605
            ;;
 
2606
        SINIX*5.4*)
 
2607
            SHLIB_CFLAGS="-K PIC"
 
2608
            SHLIB_LD="cc -G"
 
2609
            SHLIB_LD_LIBS=""
 
2610
            SHLIB_SUFFIX=".so"
 
2611
            LDFLAGS=""
 
2612
            CC_SEARCH_FLAGS=""
 
2613
            LD_SEARCH_FLAGS=""
 
2614
            ;;
 
2615
        SunOS-4*)
 
2616
            SHLIB_CFLAGS="-PIC"
 
2617
            SHLIB_LD="ld"
 
2618
            SHLIB_LD_LIBS=""
 
2619
            SHLIB_SUFFIX=".so"
 
2620
            LDFLAGS=""
 
2621
            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
 
2622
            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2623
 
 
2624
            # SunOS can't handle version numbers with dots in them in library
 
2625
            # specs, like -ltcl7.5, so use -ltcl75 instead.  Also, it
 
2626
            # requires an extra version number at the end of .so file names.
 
2627
            # So, the library has to have a name like libtcl75.so.1.0
 
2628
 
 
2629
            SHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.so.1.0'
 
2630
            UNSHARED_LIB_SUFFIX='${GRASS_TRIM_DOTS}.a'
 
2631
            GRASS_LIB_VERSIONS_OK=nodots
 
2632
            ;;
 
2633
        SunOS-5.[0-6].*)
 
2634
 
 
2635
            # Note: If _REENTRANT isn't defined, then Solaris
 
2636
            # won't define thread-safe library routines.
 
2637
 
 
2638
            cat >> confdefs.h <<\EOF
 
2639
#define _REENTRANT 1
 
2640
EOF
 
2641
 
 
2642
            cat >> confdefs.h <<\EOF
 
2643
#define _POSIX_PTHREAD_SEMANTICS 1
 
2644
EOF
 
2645
 
 
2646
 
 
2647
            # Note: need the LIBS below, otherwise Tk won't find Tcl's
 
2648
            # symbols when dynamically loaded into tclsh.
 
2649
 
 
2650
            SHLIB_LD_LIBS='${LIBS}'
 
2651
            SHLIB_SUFFIX=".so"
 
2652
            LDFLAGS=""
 
2653
            if test "$GCC" = "yes" ; then
 
2654
                SHLIB_CFLAGS="-fPIC"
 
2655
                SHLIB_LD="$CC -shared"
 
2656
                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
 
2657
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2658
            else
 
2659
                SHLIB_CFLAGS="-KPIC"
 
2660
                SHLIB_LD="/usr/ccs/bin/ld -G -z text"
 
2661
                CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
 
2662
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2663
            fi
 
2664
            ;;
 
2665
        SunOS-5*)
 
2666
 
 
2667
            # Note: If _REENTRANT isn't defined, then Solaris
 
2668
            # won't define thread-safe library routines.
 
2669
 
 
2670
            cat >> confdefs.h <<\EOF
 
2671
#define _REENTRANT 1
 
2672
EOF
 
2673
 
 
2674
            cat >> confdefs.h <<\EOF
 
2675
#define _POSIX_PTHREAD_SEMANTICS 1
 
2676
EOF
 
2677
 
 
2678
 
 
2679
            LDFLAGS=""
 
2680
    
 
2681
            # Check to enable 64-bit flags for compiler/linker
 
2682
            if test "$do64bit" = "yes" ; then
 
2683
                arch=`isainfo`
 
2684
                if test "$arch" = "sparcv9 sparc" ; then
 
2685
                        if test "$GCC" = "yes" ; then
 
2686
                            echo "configure: warning: "64bit mode not supported with GCC on $system"" 1>&2
 
2687
                        else
 
2688
                            SHLIB_CFLAGS="-KPIC"
 
2689
                            do64bit_ok=yes
 
2690
                            if test "$do64bitVIS" = "yes" ; then
 
2691
                                EXTRA_CFLAGS="-xarch=v9a"
 
2692
                                LDFLAGS="-xarch=v9a"
 
2693
                            else
 
2694
                                EXTRA_CFLAGS="-xarch=v9"
 
2695
                                LDFLAGS="-xarch=v9"
 
2696
                            fi
 
2697
                        fi
 
2698
                else
 
2699
                    echo "configure: warning: "64bit mode only supported sparcv9 system"" 1>&2
 
2700
                fi
 
2701
            fi
 
2702
            
 
2703
            # Note: need the LIBS below, otherwise Tk won't find Tcl's
 
2704
            # symbols when dynamically loaded into tclsh.
 
2705
 
 
2706
            SHLIB_LD_LIBS='${LIBS}'
 
2707
            SHLIB_SUFFIX=".so"
 
2708
            if test "$GCC" = "yes" ; then
 
2709
                SHLIB_CFLAGS="-fPIC"
 
2710
                SHLIB_LD="$CC -shared"
 
2711
                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
 
2712
                LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2713
            else
 
2714
                SHLIB_CFLAGS="-KPIC"
 
2715
                SHLIB_LD="CC -G -z text"
 
2716
                CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
 
2717
                LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
 
2718
            fi
 
2719
            ;;
 
2720
        ULTRIX-4.*)
 
2721
            SHLIB_CFLAGS="-G 0"
 
2722
            SHLIB_SUFFIX=".a"
 
2723
            SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r -G 0"
 
2724
            SHLIB_LD_LIBS='${LIBS}'
 
2725
            LDFLAGS="-Wl,-D,08000000"
 
2726
            CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
 
2727
            LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
 
2728
            if test "$GCC" != "yes" ; then
 
2729
                EXTRA_CFLAGS="-DHAVE_TZSET -std1"
 
2730
            fi
 
2731
            ;;
 
2732
        UNIX_SV* | UnixWare-5*)
 
2733
            SHLIB_CFLAGS="-KPIC"
 
2734
            SHLIB_LD="cc -G"
 
2735
            SHLIB_LD_LIBS=""
 
2736
            SHLIB_SUFFIX=".so"
 
2737
            # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
 
2738
            # that don't grok the -Bexport option.  Test that it does.
 
2739
            hold_ldflags=$LDFLAGS
 
2740
            echo $ac_n "checking for ld accepts -Bexport flag""... $ac_c" 1>&6
 
2741
echo "configure:2742: checking for ld accepts -Bexport flag" >&5
 
2742
            LDFLAGS="${LDFLAGS} -Wl,-Bexport"
 
2743
            cat > conftest.$ac_ext <<EOF
 
2744
#line 2745 "configure"
 
2745
#include "confdefs.h"
 
2746
 
 
2747
int main() {
 
2748
int i;
 
2749
; return 0; }
 
2750
EOF
 
2751
if { (eval echo configure:2752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
2752
  rm -rf conftest*
 
2753
  found=yes
 
2754
else
 
2755
  echo "configure: failed program was:" >&5
 
2756
  cat conftest.$ac_ext >&5
 
2757
  rm -rf conftest*
 
2758
  found=no
 
2759
fi
 
2760
rm -f conftest*
 
2761
            LDFLAGS=$hold_ldflags
 
2762
            echo "$ac_t""$found" 1>&6
 
2763
            if test $found = yes; then
 
2764
            LDFLAGS="-Wl,-Bexport"
 
2765
            else
 
2766
            LDFLAGS=""
 
2767
            fi
 
2768
            CC_SEARCH_FLAGS=""
 
2769
            LD_SEARCH_FLAGS=""
 
2770
            ;;
 
2771
    esac
 
2772
 
 
2773
    # If we're running gcc, then change the C flags for compiling shared
 
2774
    # libraries to the right flags for gcc, instead of those for the
 
2775
    # standard manufacturer compiler.
 
2776
 
 
2777
        if test "$GCC" = "yes" ; then
 
2778
            case $system in
 
2779
                AIX-*)
 
2780
                    ;;
 
2781
                BSD/OS*)
 
2782
                    ;;
 
2783
                *)
 
2784
                    ;;
 
2785
                NetBSD-*|FreeBSD-*)
 
2786
                    ;;
 
2787
                Rhapsody-*|Darwin-*)
 
2788
                    ;;
 
2789
                RISCos-*)
 
2790
                    ;;
 
2791
                SCO_SV-3.2*)
 
2792
                    ;;
 
2793
                ULTRIX-4.*)
 
2794
                    ;;
 
2795
                *)
 
2796
                    SHLIB_CFLAGS="-fPIC"
 
2797
                    ;;
 
2798
            esac
 
2799
        fi
 
2800
 
 
2801
    if test "$SHARED_LIB_SUFFIX" = "" ; then
 
2802
        SHARED_LIB_SUFFIX='${LIB_VER}${SHLIB_SUFFIX}'
 
2803
    fi
 
2804
    if test "$UNSHARED_LIB_SUFFIX" = "" ; then
 
2805
        UNSHARED_LIB_SUFFIX='${LIB_VER}.a'
 
2806
    fi
 
2807
 
 
2808
    if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
 
2809
        LIB_SUFFIX=${SHARED_LIB_SUFFIX}
 
2810
        MAKE_LIB='${SHLIB_LD} -o $@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${GRASS_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
 
2811
        INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
 
2812
    else
 
2813
        LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
 
2814
 
 
2815
        if test "$RANLIB" = "" ; then
 
2816
            MAKE_LIB='$(STLIB_LD) $@ ${OBJS}'
 
2817
            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
 
2818
        else
 
2819
            MAKE_LIB='${STLIB_LD} $@ ${OBJS} ; ${RANLIB} $@'
 
2820
            INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(LIB_FILE))'
 
2821
        fi
 
2822
 
 
2823
    fi
 
2824
 
 
2825
 
 
2826
    # Stub lib does not depend on shared/static configuration
 
2827
    if test "$RANLIB" = "" ; then
 
2828
        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS}'
 
2829
        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
 
2830
    else
 
2831
        MAKE_STUB_LIB='${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@'
 
2832
        INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
 
2833
    fi
 
2834
 
 
2835
    
 
2836
    
 
2837
    
 
2838
    
 
2839
    
 
2840
    
 
2841
 
 
2842
    
 
2843
    
 
2844
    
 
2845
    
 
2846
    
 
2847
    
 
2848
 
 
2849
    
 
2850
    
 
2851
    
 
2852
    
 
2853
    
 
2854
    
 
2855
    
 
2856
 
 
2857
    
 
2858
    
 
2859
    
 
2860
    
 
2861
    
 
2862
 
 
2863
LDFLAGS="${ac_save_ldflags} $LDFLAGS"
 
2864
 
 
2865
# Enable options
 
2866
 
 
2867
# Check whether --enable-w11 or --disable-w11 was given.
 
2868
if test "${enable_w11+set}" = set; then
 
2869
  enableval="$enable_w11"
 
2870
  :
 
2871
else
 
2872
  enable_w11=no
 
2873
fi
 
2874
 
 
2875
 
 
2876
# With options
 
2877
 
 
2878
 
 
2879
# Check whether --with-cxx or --without-cxx was given.
 
2880
if test "${with_cxx+set}" = set; then
 
2881
  withval="$with_cxx"
 
2882
  :
 
2883
else
 
2884
  with_cxx=no
 
2885
fi
 
2886
 
 
2887
 
 
2888
#LOC_ARG_WITH(g77, GNU Fortran 77, no)
 
2889
 
 
2890
# Check whether --with-macosx-archs or --without-macosx-archs was given.
 
2891
if test "${with_macosx_archs+set}" = set; then
 
2892
  withval="$with_macosx_archs"
 
2893
  :
 
2894
else
 
2895
  with_macosx_archs="no"
 
2896
fi
 
2897
 
 
2898
# Check whether --with-macosx-sdk or --without-macosx-sdk was given.
 
2899
if test "${with_macosx_sdk+set}" = set; then
 
2900
  withval="$with_macosx_sdk"
 
2901
  :
 
2902
else
 
2903
  with_macosx_sdk="no"
 
2904
fi
 
2905
 
 
2906
 
 
2907
# Check whether --with-jpeg or --without-jpeg was given.
 
2908
if test "${with_jpeg+set}" = set; then
 
2909
  withval="$with_jpeg"
 
2910
  :
 
2911
else
 
2912
  with_jpeg=yes
 
2913
fi
 
2914
 
 
2915
 
 
2916
 
 
2917
# Check whether --with-tiff or --without-tiff was given.
 
2918
if test "${with_tiff+set}" = set; then
 
2919
  withval="$with_tiff"
 
2920
  :
 
2921
else
 
2922
  with_tiff=yes
 
2923
fi
 
2924
 
 
2925
 
 
2926
 
 
2927
# Check whether --with-png or --without-png was given.
 
2928
if test "${with_png+set}" = set; then
 
2929
  withval="$with_png"
 
2930
  :
 
2931
else
 
2932
  with_png=yes
 
2933
fi
 
2934
 
 
2935
 
 
2936
 
 
2937
# Check whether --with-tcltk or --without-tcltk was given.
 
2938
if test "${with_tcltk+set}" = set; then
 
2939
  withval="$with_tcltk"
 
2940
  :
 
2941
else
 
2942
  with_tcltk=yes
 
2943
fi
 
2944
 
 
2945
 
 
2946
 
 
2947
# Check whether --with-postgres or --without-postgres was given.
 
2948
if test "${with_postgres+set}" = set; then
 
2949
  withval="$with_postgres"
 
2950
  :
 
2951
else
 
2952
  with_postgres=no
 
2953
fi
 
2954
 
 
2955
 
 
2956
 
 
2957
# Check whether --with-mysql or --without-mysql was given.
 
2958
if test "${with_mysql+set}" = set; then
 
2959
  withval="$with_mysql"
 
2960
  :
 
2961
else
 
2962
  with_mysql=no
 
2963
fi
 
2964
 
 
2965
 
 
2966
 
 
2967
# Check whether --with-sqlite or --without-sqlite was given.
 
2968
if test "${with_sqlite+set}" = set; then
 
2969
  withval="$with_sqlite"
 
2970
  :
 
2971
else
 
2972
  with_sqlite=no
 
2973
fi
 
2974
 
 
2975
 
 
2976
 
 
2977
# Check whether --with-ffmpeg or --without-ffmpeg was given.
 
2978
if test "${with_ffmpeg+set}" = set; then
 
2979
  withval="$with_ffmpeg"
 
2980
  :
 
2981
else
 
2982
  with_ffmpeg=no
 
2983
fi
 
2984
 
 
2985
 
 
2986
 
 
2987
# Check whether --with-opengl or --without-opengl was given.
 
2988
if test "${with_opengl+set}" = set; then
 
2989
  withval="$with_opengl"
 
2990
  :
 
2991
else
 
2992
  with_opengl=yes
 
2993
fi
 
2994
 
 
2995
 
 
2996
 
 
2997
# Check whether --with-odbc or --without-odbc was given.
 
2998
if test "${with_odbc+set}" = set; then
 
2999
  withval="$with_odbc"
 
3000
  :
 
3001
else
 
3002
  with_odbc=no
 
3003
fi
 
3004
 
 
3005
 
 
3006
 
 
3007
# Check whether --with-fftw or --without-fftw was given.
 
3008
if test "${with_fftw+set}" = set; then
 
3009
  withval="$with_fftw"
 
3010
  :
 
3011
else
 
3012
  with_fftw=yes
 
3013
fi
 
3014
 
 
3015
 
 
3016
 
 
3017
# Check whether --with-blas or --without-blas was given.
 
3018
if test "${with_blas+set}" = set; then
 
3019
  withval="$with_blas"
 
3020
  :
 
3021
else
 
3022
  with_blas=no
 
3023
fi
 
3024
 
 
3025
 
 
3026
 
 
3027
# Check whether --with-lapack or --without-lapack was given.
 
3028
if test "${with_lapack+set}" = set; then
 
3029
  withval="$with_lapack"
 
3030
  :
 
3031
else
 
3032
  with_lapack=no
 
3033
fi
 
3034
 
 
3035
 
 
3036
 
 
3037
# Check whether --with-motif or --without-motif was given.
 
3038
if test "${with_motif+set}" = set; then
 
3039
  withval="$with_motif"
 
3040
  :
 
3041
else
 
3042
  with_motif=no
 
3043
fi
 
3044
 
 
3045
 
 
3046
 
 
3047
# Check whether --with-cairo or --without-cairo was given.
 
3048
if test "${with_cairo+set}" = set; then
 
3049
  withval="$with_cairo"
 
3050
  :
 
3051
else
 
3052
  with_cairo=no
 
3053
fi
 
3054
 
 
3055
 
 
3056
 
 
3057
# Check whether --with-freetype or --without-freetype was given.
 
3058
if test "${with_freetype+set}" = set; then
 
3059
  withval="$with_freetype"
 
3060
  :
 
3061
else
 
3062
  with_freetype=no
 
3063
fi
 
3064
 
 
3065
 
 
3066
 
 
3067
# Check whether --with-glw or --without-glw was given.
 
3068
if test "${with_glw+set}" = set; then
 
3069
  withval="$with_glw"
 
3070
  :
 
3071
else
 
3072
  with_glw=no
 
3073
fi
 
3074
 
 
3075
 
 
3076
 
 
3077
# Check whether --with-nls or --without-nls was given.
 
3078
if test "${with_nls+set}" = set; then
 
3079
  withval="$with_nls"
 
3080
  :
 
3081
else
 
3082
  with_nls=no
 
3083
fi
 
3084
 
 
3085
 
 
3086
 
 
3087
# Check whether --with-readline or --without-readline was given.
 
3088
if test "${with_readline+set}" = set; then
 
3089
  withval="$with_readline"
 
3090
  :
 
3091
else
 
3092
  with_readline=no
 
3093
fi
 
3094
 
 
3095
 
 
3096
 
 
3097
# Check whether --with-opendwg or --without-opendwg was given.
 
3098
if test "${with_opendwg+set}" = set; then
 
3099
  withval="$with_opendwg"
 
3100
  :
 
3101
else
 
3102
  with_opendwg=no
 
3103
fi
 
3104
 
 
3105
 
 
3106
 
 
3107
# Check whether --with-curses or --without-curses was given.
 
3108
if test "${with_curses+set}" = set; then
 
3109
  withval="$with_curses"
 
3110
  :
 
3111
else
 
3112
  with_curses=yes
 
3113
fi
 
3114
 
 
3115
 
 
3116
 
 
3117
# Check whether --with-regex or --without-regex was given.
 
3118
if test "${with_regex+set}" = set; then
 
3119
  withval="$with_regex"
 
3120
  :
 
3121
else
 
3122
  with_regex=yes
 
3123
fi
 
3124
 
 
3125
 
 
3126
 
 
3127
# Check whether --with-gdal or --without-gdal was given.
 
3128
if test "${with_gdal+set}" = set; then
 
3129
  withval="$with_gdal"
 
3130
  :
 
3131
fi
 
3132
 
 
3133
 
 
3134
# Check whether --with-python or --without-python was given.
 
3135
if test "${with_python+set}" = set; then
 
3136
  withval="$with_python"
 
3137
  :
 
3138
else
 
3139
  with_python="no"
 
3140
fi
 
3141
 
 
3142
 
 
3143
# Check whether --with-wxwidgets or --without-wxwidgets was given.
 
3144
if test "${with_wxwidgets+set}" = set; then
 
3145
  withval="$with_wxwidgets"
 
3146
  :
 
3147
else
 
3148
  with_wxwidgets="no"
 
3149
fi
 
3150
 
 
3151
 
 
3152
# With includes and libs options
 
3153
 
 
3154
# Check whether --with-geos or --without-geos was given.
 
3155
if test "${with_geos+set}" = set; then
 
3156
  withval="$with_geos"
 
3157
  :
 
3158
else
 
3159
  with_geos="no"
 
3160
fi
 
3161
 
 
3162
 
 
3163
# Check whether --with-includes or --without-includes was given.
 
3164
if test "${with_includes+set}" = set; then
 
3165
  withval="$with_includes"
 
3166
  :
 
3167
fi
 
3168
 
 
3169
 
 
3170
# Check whether --with-libs or --without-libs was given.
 
3171
if test "${with_libs+set}" = set; then
 
3172
  withval="$with_libs"
 
3173
  :
 
3174
fi
 
3175
 
 
3176
 
 
3177
 
 
3178
# Check whether --with-zlib-includes or --without-zlib-includes was given.
 
3179
if test "${with_zlib_includes+set}" = set; then
 
3180
  withval="$with_zlib_includes"
 
3181
  :
 
3182
fi
 
3183
 
 
3184
 
 
3185
 
 
3186
# Check whether --with-zlib-libs or --without-zlib-libs was given.
 
3187
if test "${with_zlib_libs+set}" = set; then
 
3188
  withval="$with_zlib_libs"
 
3189
  :
 
3190
fi
 
3191
 
 
3192
 
 
3193
 
 
3194
 
 
3195
# Check whether --with-readline-includes or --without-readline-includes was given.
 
3196
if test "${with_readline_includes+set}" = set; then
 
3197
  withval="$with_readline_includes"
 
3198
  :
 
3199
fi
 
3200
 
 
3201
 
 
3202
 
 
3203
# Check whether --with-readline-libs or --without-readline-libs was given.
 
3204
if test "${with_readline_libs+set}" = set; then
 
3205
  withval="$with_readline_libs"
 
3206
  :
 
3207
fi
 
3208
 
 
3209
 
 
3210
 
 
3211
 
 
3212
# Check whether --with-jpeg-includes or --without-jpeg-includes was given.
 
3213
if test "${with_jpeg_includes+set}" = set; then
 
3214
  withval="$with_jpeg_includes"
 
3215
  :
 
3216
fi
 
3217
 
 
3218
 
 
3219
 
 
3220
# Check whether --with-jpeg-libs or --without-jpeg-libs was given.
 
3221
if test "${with_jpeg_libs+set}" = set; then
 
3222
  withval="$with_jpeg_libs"
 
3223
  :
 
3224
fi
 
3225
 
 
3226
 
 
3227
 
 
3228
 
 
3229
# Check whether --with-tiff-includes or --without-tiff-includes was given.
 
3230
if test "${with_tiff_includes+set}" = set; then
 
3231
  withval="$with_tiff_includes"
 
3232
  :
 
3233
fi
 
3234
 
 
3235
 
 
3236
 
 
3237
# Check whether --with-tiff-libs or --without-tiff-libs was given.
 
3238
if test "${with_tiff_libs+set}" = set; then
 
3239
  withval="$with_tiff_libs"
 
3240
  :
 
3241
fi
 
3242
 
 
3243
 
 
3244
 
 
3245
 
 
3246
# Check whether --with-png-includes or --without-png-includes was given.
 
3247
if test "${with_png_includes+set}" = set; then
 
3248
  withval="$with_png_includes"
 
3249
  :
 
3250
fi
 
3251
 
 
3252
 
 
3253
 
 
3254
# Check whether --with-png-libs or --without-png-libs was given.
 
3255
if test "${with_png_libs+set}" = set; then
 
3256
  withval="$with_png_libs"
 
3257
  :
 
3258
fi
 
3259
 
 
3260
 
 
3261
 
 
3262
 
 
3263
# Check whether --with-tcltk-includes or --without-tcltk-includes was given.
 
3264
if test "${with_tcltk_includes+set}" = set; then
 
3265
  withval="$with_tcltk_includes"
 
3266
  :
 
3267
fi
 
3268
 
 
3269
 
 
3270
 
 
3271
# Check whether --with-tcltk-libs or --without-tcltk-libs was given.
 
3272
if test "${with_tcltk_libs+set}" = set; then
 
3273
  withval="$with_tcltk_libs"
 
3274
  :
 
3275
fi
 
3276
 
 
3277
 
 
3278
 
 
3279
 
 
3280
# Check whether --with-postgres-includes or --without-postgres-includes was given.
 
3281
if test "${with_postgres_includes+set}" = set; then
 
3282
  withval="$with_postgres_includes"
 
3283
  :
 
3284
fi
 
3285
 
 
3286
 
 
3287
 
 
3288
# Check whether --with-postgres-libs or --without-postgres-libs was given.
 
3289
if test "${with_postgres_libs+set}" = set; then
 
3290
  withval="$with_postgres_libs"
 
3291
  :
 
3292
fi
 
3293
 
 
3294
 
 
3295
 
 
3296
 
 
3297
# Check whether --with-mysql-includes or --without-mysql-includes was given.
 
3298
if test "${with_mysql_includes+set}" = set; then
 
3299
  withval="$with_mysql_includes"
 
3300
  :
 
3301
fi
 
3302
 
 
3303
 
 
3304
 
 
3305
# Check whether --with-mysql-libs or --without-mysql-libs was given.
 
3306
if test "${with_mysql_libs+set}" = set; then
 
3307
  withval="$with_mysql_libs"
 
3308
  :
 
3309
fi
 
3310
 
 
3311
 
 
3312
 
 
3313
 
 
3314
# Check whether --with-sqlite-includes or --without-sqlite-includes was given.
 
3315
if test "${with_sqlite_includes+set}" = set; then
 
3316
  withval="$with_sqlite_includes"
 
3317
  :
 
3318
fi
 
3319
 
 
3320
 
 
3321
 
 
3322
# Check whether --with-sqlite-libs or --without-sqlite-libs was given.
 
3323
if test "${with_sqlite_libs+set}" = set; then
 
3324
  withval="$with_sqlite_libs"
 
3325
  :
 
3326
fi
 
3327
 
 
3328
 
 
3329
 
 
3330
 
 
3331
# Check whether --with-ffmpeg-includes or --without-ffmpeg-includes was given.
 
3332
if test "${with_ffmpeg_includes+set}" = set; then
 
3333
  withval="$with_ffmpeg_includes"
 
3334
  :
 
3335
fi
 
3336
 
 
3337
 
 
3338
 
 
3339
# Check whether --with-ffmpeg-libs or --without-ffmpeg-libs was given.
 
3340
if test "${with_ffmpeg_libs+set}" = set; then
 
3341
  withval="$with_ffmpeg_libs"
 
3342
  :
 
3343
fi
 
3344
 
 
3345
 
 
3346
 
 
3347
 
 
3348
# Check whether --with-opengl-includes or --without-opengl-includes was given.
 
3349
if test "${with_opengl_includes+set}" = set; then
 
3350
  withval="$with_opengl_includes"
 
3351
  :
 
3352
fi
 
3353
 
 
3354
 
 
3355
 
 
3356
# Check whether --with-opengl-libs or --without-opengl-libs was given.
 
3357
if test "${with_opengl_libs+set}" = set; then
 
3358
  withval="$with_opengl_libs"
 
3359
  :
 
3360
fi
 
3361
 
 
3362
 
 
3363
 
 
3364
 
 
3365
# Check whether --with-odbc-includes or --without-odbc-includes was given.
 
3366
if test "${with_odbc_includes+set}" = set; then
 
3367
  withval="$with_odbc_includes"
 
3368
  :
 
3369
fi
 
3370
 
 
3371
 
 
3372
 
 
3373
# Check whether --with-odbc-libs or --without-odbc-libs was given.
 
3374
if test "${with_odbc_libs+set}" = set; then
 
3375
  withval="$with_odbc_libs"
 
3376
  :
 
3377
fi
 
3378
 
 
3379
 
 
3380
 
 
3381
 
 
3382
# Check whether --with-fftw-includes or --without-fftw-includes was given.
 
3383
if test "${with_fftw_includes+set}" = set; then
 
3384
  withval="$with_fftw_includes"
 
3385
  :
 
3386
fi
 
3387
 
 
3388
 
 
3389
 
 
3390
# Check whether --with-fftw-libs or --without-fftw-libs was given.
 
3391
if test "${with_fftw_libs+set}" = set; then
 
3392
  withval="$with_fftw_libs"
 
3393
  :
 
3394
fi
 
3395
 
 
3396
 
 
3397
 
 
3398
 
 
3399
# Check whether --with-blas-includes or --without-blas-includes was given.
 
3400
if test "${with_blas_includes+set}" = set; then
 
3401
  withval="$with_blas_includes"
 
3402
  :
 
3403
fi
 
3404
 
 
3405
 
 
3406
 
 
3407
# Check whether --with-blas-libs or --without-blas-libs was given.
 
3408
if test "${with_blas_libs+set}" = set; then
 
3409
  withval="$with_blas_libs"
 
3410
  :
 
3411
fi
 
3412
 
 
3413
 
 
3414
 
 
3415
 
 
3416
# Check whether --with-lapack-includes or --without-lapack-includes was given.
 
3417
if test "${with_lapack_includes+set}" = set; then
 
3418
  withval="$with_lapack_includes"
 
3419
  :
 
3420
fi
 
3421
 
 
3422
 
 
3423
 
 
3424
# Check whether --with-lapack-libs or --without-lapack-libs was given.
 
3425
if test "${with_lapack_libs+set}" = set; then
 
3426
  withval="$with_lapack_libs"
 
3427
  :
 
3428
fi
 
3429
 
 
3430
 
 
3431
 
 
3432
 
 
3433
# Check whether --with-cairo-includes or --without-cairo-includes was given.
 
3434
if test "${with_cairo_includes+set}" = set; then
 
3435
  withval="$with_cairo_includes"
 
3436
  :
 
3437
fi
 
3438
 
 
3439
 
 
3440
 
 
3441
# Check whether --with-cairo-libs or --without-cairo-libs was given.
 
3442
if test "${with_cairo_libs+set}" = set; then
 
3443
  withval="$with_cairo_libs"
 
3444
  :
 
3445
fi
 
3446
 
 
3447
 
 
3448
 
 
3449
# Check whether --with-cairo-ldflags or --without-cairo-ldflags was given.
 
3450
if test "${with_cairo_ldflags+set}" = set; then
 
3451
  withval="$with_cairo_ldflags"
 
3452
  :
 
3453
fi
 
3454
 
 
3455
 
 
3456
 
 
3457
 
 
3458
# Check whether --with-motif-includes or --without-motif-includes was given.
 
3459
if test "${with_motif_includes+set}" = set; then
 
3460
  withval="$with_motif_includes"
 
3461
  :
 
3462
fi
 
3463
 
 
3464
 
 
3465
 
 
3466
# Check whether --with-motif-libs or --without-motif-libs was given.
 
3467
if test "${with_motif_libs+set}" = set; then
 
3468
  withval="$with_motif_libs"
 
3469
  :
 
3470
fi
 
3471
 
 
3472
 
 
3473
 
 
3474
 
 
3475
# Check whether --with-freetype-includes or --without-freetype-includes was given.
 
3476
if test "${with_freetype_includes+set}" = set; then
 
3477
  withval="$with_freetype_includes"
 
3478
  :
 
3479
fi
 
3480
 
 
3481
 
 
3482
 
 
3483
# Check whether --with-freetype-libs or --without-freetype-libs was given.
 
3484
if test "${with_freetype_libs+set}" = set; then
 
3485
  withval="$with_freetype_libs"
 
3486
  :
 
3487
fi
 
3488
 
 
3489
 
 
3490
 
 
3491
 
 
3492
# Check whether --with-glw-includes or --without-glw-includes was given.
 
3493
if test "${with_glw_includes+set}" = set; then
 
3494
  withval="$with_glw_includes"
 
3495
  :
 
3496
fi
 
3497
 
 
3498
 
 
3499
 
 
3500
# Check whether --with-glw-libs or --without-glw-libs was given.
 
3501
if test "${with_glw_libs+set}" = set; then
 
3502
  withval="$with_glw_libs"
 
3503
  :
 
3504
fi
 
3505
 
 
3506
 
 
3507
 
 
3508
 
 
3509
# Check whether --with-proj-includes or --without-proj-includes was given.
 
3510
if test "${with_proj_includes+set}" = set; then
 
3511
  withval="$with_proj_includes"
 
3512
  :
 
3513
fi
 
3514
 
 
3515
 
 
3516
 
 
3517
# Check whether --with-proj-libs or --without-proj-libs was given.
 
3518
if test "${with_proj_libs+set}" = set; then
 
3519
  withval="$with_proj_libs"
 
3520
  :
 
3521
fi
 
3522
 
 
3523
 
 
3524
 
 
3525
# Check whether --with-proj-share or --without-proj-share was given.
 
3526
if test "${with_proj_share+set}" = set; then
 
3527
  withval="$with_proj_share"
 
3528
  :
 
3529
fi
 
3530
 
 
3531
 
 
3532
 
 
3533
 
 
3534
# Check whether --with-opendwg-includes or --without-opendwg-includes was given.
 
3535
if test "${with_opendwg_includes+set}" = set; then
 
3536
  withval="$with_opendwg_includes"
 
3537
  :
 
3538
fi
 
3539
 
 
3540
 
 
3541
 
 
3542
# Check whether --with-opendwg-libs or --without-opendwg-libs was given.
 
3543
if test "${with_opendwg_libs+set}" = set; then
 
3544
  withval="$with_opendwg_libs"
 
3545
  :
 
3546
fi
 
3547
 
 
3548
 
 
3549
 
 
3550
 
 
3551
# Check whether --with-regex-includes or --without-regex-includes was given.
 
3552
if test "${with_regex_includes+set}" = set; then
 
3553
  withval="$with_regex_includes"
 
3554
  :
 
3555
fi
 
3556
 
 
3557
 
 
3558
 
 
3559
# Check whether --with-regex-libs or --without-regex-libs was given.
 
3560
if test "${with_regex_libs+set}" = set; then
 
3561
  withval="$with_regex_libs"
 
3562
  :
 
3563
fi
 
3564
 
 
3565
 
 
3566
 
 
3567
# Put this early on so CPPFLAGS and LDFLAGS have any additional dirs
 
3568
 
 
3569
# With includes option
 
3570
 
 
3571
# Handle Fortran compiler choice
 
3572
#LOC_CHECK_USE(g77, GNU Fortran 77, USE_G77)
 
3573
# Done checking fortran
 
3574
 
 
3575
echo $ac_n "checking for additional include dirs""... $ac_c" 1>&6
 
3576
echo "configure:3577: checking for additional include dirs" >&5
 
3577
case "$with_includes" in
 
3578
y | ye | yes | n | no)
 
3579
        { echo "configure: error: *** You must supply a directory to list --with-includes." 1>&2; exit 1; }
 
3580
        ;;
 
3581
esac
 
3582
echo "$ac_t""$with_includes" 1>&6
 
3583
 
 
3584
if test -n "$with_includes"; then
 
3585
    for dir in $with_includes; do
 
3586
        if test -d "$dir"; then
 
3587
            INCLUDE_DIRS="$INCLUDE_DIRS -I$dir"
 
3588
        else
 
3589
            { echo "configure: error: *** Include directory $dir does not exist." 1>&2; exit 1; }
 
3590
        fi
 
3591
    done
 
3592
    CPPFLAGS="$CPPFLAGS $INCLUDE_DIRS"
 
3593
fi
 
3594
 
 
3595
 
 
3596
# With libs option
 
3597
 
 
3598
echo $ac_n "checking for additional library dirs""... $ac_c" 1>&6
 
3599
echo "configure:3600: checking for additional library dirs" >&5
 
3600
case "$with_libs" in
 
3601
y | ye | yes | n | no)
 
3602
        { echo "configure: error: *** You must supply a directory list to --with-libs." 1>&2; exit 1; }
 
3603
        ;;
 
3604
esac
 
3605
echo "$ac_t""$with_libs" 1>&6
 
3606
 
 
3607
if test -n "$with_libs"; then
 
3608
    for dir in $with_libs; do
 
3609
        if test -d "$dir"; then
 
3610
            LIBRARY_DIRS="$LIBRARY_DIRS -L$dir"
 
3611
        else
 
3612
            { echo "configure: error: *** Library directory $dir does not exist." 1>&2; exit 1; }
 
3613
        fi
 
3614
    done
 
3615
    LDFLAGS="$LDFLAGS $LIBRARY_DIRS"
 
3616
fi
 
3617
 
 
3618
 
 
3619
# Programs and standard headers, libraries, functions
 
3620
 
 
3621
# Find a good install program.  We prefer a C program (faster),
 
3622
# so one script is as good as another.  But avoid the broken or
 
3623
# incompatible versions:
 
3624
# SysV /etc/install, /usr/sbin/install
 
3625
# SunOS /usr/etc/install
 
3626
# IRIX /sbin/install
 
3627
# AIX /bin/install
 
3628
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
 
3629
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
 
3630
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 
3631
# ./install, which can be erroneously created by make from ./install.sh.
 
3632
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
 
3633
echo "configure:3634: checking for a BSD compatible install" >&5
 
3634
if test -z "$INSTALL"; then
 
3635
 
 
3636
  IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
 
3637
  for ac_dir in $PATH; do
 
3638
    # Account for people who put trailing slashes in PATH elements.
 
3639
    case "$ac_dir/" in
 
3640
    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
 
3641
    *)
 
3642
      # OSF1 and SCO ODT 3.0 have their own names for install.
 
3643
      # Don't use installbsd from OSF since it installs stuff as root
 
3644
      # by default.
 
3645
      for ac_prog in ginstall scoinst install; do
 
3646
        if test -f $ac_dir/$ac_prog; then
 
3647
          if test $ac_prog = install &&
 
3648
            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
 
3649
            # AIX install.  It has an incompatible calling convention.
 
3650
            :
 
3651
          else
 
3652
            ac_cv_path_install="$ac_dir/$ac_prog -c"
 
3653
            break 2
 
3654
          fi
 
3655
        fi
 
3656
      done
 
3657
      ;;
 
3658
    esac
 
3659
  done
 
3660
  IFS="$ac_save_IFS"
 
3661
 
 
3662
  if test "${ac_cv_path_install+set}" = set; then
 
3663
    INSTALL="$ac_cv_path_install"
 
3664
  else
 
3665
    # As a last resort, use the slow shell script.  We don't cache a
 
3666
    # path for INSTALL within a source directory, because that will
 
3667
    # break other packages using the cache if that directory is
 
3668
    # removed, or if the path is relative.
 
3669
    INSTALL="$ac_install_sh"
 
3670
  fi
 
3671
fi
 
3672
echo "$ac_t""$INSTALL" 1>&6
 
3673
 
 
3674
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 
3675
# It thinks the first close brace ends the variable substitution.
 
3676
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
3677
 
 
3678
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 
3679
 
 
3680
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
3681
 
 
3682
 
 
3683
# Extract the first word of "flex", so it can be a program name with args.
 
3684
set dummy flex; ac_word=$2
 
3685
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
3686
echo "configure:3687: checking for $ac_word" >&5
 
3687
 
 
3688
if test -n "$LEX"; then
 
3689
  ac_cv_prog_LEX="$LEX" # Let the user override the test.
 
3690
else
 
3691
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3692
  ac_dummy="$PATH"
 
3693
  for ac_dir in $ac_dummy; do
 
3694
    test -z "$ac_dir" && ac_dir=.
 
3695
    if test -f $ac_dir/$ac_word; then
 
3696
      ac_cv_prog_LEX="flex"
 
3697
      break
 
3698
    fi
 
3699
  done
 
3700
  IFS="$ac_save_ifs"
 
3701
  test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
 
3702
fi
 
3703
LEX="$ac_cv_prog_LEX"
 
3704
if test -n "$LEX"; then
 
3705
  echo "$ac_t""$LEX" 1>&6
 
3706
else
 
3707
  echo "$ac_t""no" 1>&6
 
3708
fi
 
3709
 
 
3710
if test -z "$LEXLIB"
 
3711
then
 
3712
  case "$LEX" in
 
3713
  flex*) ac_lib=fl ;;
 
3714
  *) ac_lib=l ;;
 
3715
  esac
 
3716
  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
 
3717
echo "configure:3718: checking for yywrap in -l$ac_lib" >&5
 
3718
ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
 
3719
 
 
3720
ac_save_LIBS="$LIBS"
 
3721
LIBS="-l$ac_lib  $LIBS"
 
3722
cat > conftest.$ac_ext <<EOF
 
3723
#line 3724 "configure"
 
3724
#include "confdefs.h"
 
3725
/* Override any gcc2 internal prototype to avoid an error.  */
 
3726
/* We use char because int might match the return type of a gcc2
 
3727
    builtin and then its argument prototype would still apply.  */
 
3728
char yywrap();
 
3729
 
 
3730
int main() {
 
3731
yywrap()
 
3732
; return 0; }
 
3733
EOF
 
3734
if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
3735
  rm -rf conftest*
 
3736
  eval "ac_cv_lib_$ac_lib_var=yes"
 
3737
else
 
3738
  echo "configure: failed program was:" >&5
 
3739
  cat conftest.$ac_ext >&5
 
3740
  rm -rf conftest*
 
3741
  eval "ac_cv_lib_$ac_lib_var=no"
 
3742
fi
 
3743
rm -f conftest*
 
3744
LIBS="$ac_save_LIBS"
 
3745
 
 
3746
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
3747
  echo "$ac_t""yes" 1>&6
 
3748
  LEXLIB="-l$ac_lib"
 
3749
else
 
3750
  echo "$ac_t""no" 1>&6
 
3751
fi
 
3752
 
 
3753
fi
 
3754
 
 
3755
if test "$LEX" = "lex"; then
 
3756
    # Extract the first word of "lex", so it can be a program name with args.
 
3757
set dummy lex; ac_word=$2
 
3758
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
3759
echo "configure:3760: checking for $ac_word" >&5
 
3760
 
 
3761
case "$LEXPATH" in
 
3762
  /*)
 
3763
  ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a path.
 
3764
  ;;
 
3765
  ?:/*)                  
 
3766
  ac_cv_path_LEXPATH="$LEXPATH" # Let the user override the test with a dos path.
 
3767
  ;;
 
3768
  *)
 
3769
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3770
  ac_dummy="$PATH"
 
3771
  for ac_dir in $ac_dummy; do 
 
3772
    test -z "$ac_dir" && ac_dir=.
 
3773
    if test -f $ac_dir/$ac_word; then
 
3774
      ac_cv_path_LEXPATH="$ac_dir/$ac_word"
 
3775
      break
 
3776
    fi
 
3777
  done
 
3778
  IFS="$ac_save_ifs"
 
3779
  test -z "$ac_cv_path_LEXPATH" && ac_cv_path_LEXPATH="no"
 
3780
  ;;
 
3781
esac
 
3782
LEXPATH="$ac_cv_path_LEXPATH"
 
3783
if test -n "$LEXPATH"; then
 
3784
  echo "$ac_t""$LEXPATH" 1>&6
 
3785
else
 
3786
  echo "$ac_t""no" 1>&6
 
3787
fi
 
3788
 
 
3789
    if test "$LEXPATH" = "no"; then
 
3790
        { echo "configure: error: *** Unable to locate lex." 1>&2; exit 1; }
 
3791
    fi
 
3792
fi
 
3793
 
 
3794
for ac_prog in 'bison -y' byacc
 
3795
do
 
3796
# Extract the first word of "$ac_prog", so it can be a program name with args.
 
3797
set dummy $ac_prog; ac_word=$2
 
3798
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
3799
echo "configure:3800: checking for $ac_word" >&5
 
3800
 
 
3801
if test -n "$YACC"; then
 
3802
  ac_cv_prog_YACC="$YACC" # Let the user override the test.
 
3803
else
 
3804
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3805
  ac_dummy="$PATH"
 
3806
  for ac_dir in $ac_dummy; do
 
3807
    test -z "$ac_dir" && ac_dir=.
 
3808
    if test -f $ac_dir/$ac_word; then
 
3809
      ac_cv_prog_YACC="$ac_prog"
 
3810
      break
 
3811
    fi
 
3812
  done
 
3813
  IFS="$ac_save_ifs"
 
3814
fi
 
3815
YACC="$ac_cv_prog_YACC"
 
3816
if test -n "$YACC"; then
 
3817
  echo "$ac_t""$YACC" 1>&6
 
3818
else
 
3819
  echo "$ac_t""no" 1>&6
 
3820
fi
 
3821
 
 
3822
test -n "$YACC" && break
 
3823
done
 
3824
test -n "$YACC" || YACC="yacc"
 
3825
 
 
3826
if test "$YACC" = "yacc"; then
 
3827
    # Extract the first word of "yacc", so it can be a program name with args.
 
3828
set dummy yacc; ac_word=$2
 
3829
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
3830
echo "configure:3831: checking for $ac_word" >&5
 
3831
 
 
3832
case "$YACCPATH" in
 
3833
  /*)
 
3834
  ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a path.
 
3835
  ;;
 
3836
  ?:/*)                  
 
3837
  ac_cv_path_YACCPATH="$YACCPATH" # Let the user override the test with a dos path.
 
3838
  ;;
 
3839
  *)
 
3840
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3841
  ac_dummy="$PATH"
 
3842
  for ac_dir in $ac_dummy; do 
 
3843
    test -z "$ac_dir" && ac_dir=.
 
3844
    if test -f $ac_dir/$ac_word; then
 
3845
      ac_cv_path_YACCPATH="$ac_dir/$ac_word"
 
3846
      break
 
3847
    fi
 
3848
  done
 
3849
  IFS="$ac_save_ifs"
 
3850
  test -z "$ac_cv_path_YACCPATH" && ac_cv_path_YACCPATH="no"
 
3851
  ;;
 
3852
esac
 
3853
YACCPATH="$ac_cv_path_YACCPATH"
 
3854
if test -n "$YACCPATH"; then
 
3855
  echo "$ac_t""$YACCPATH" 1>&6
 
3856
else
 
3857
  echo "$ac_t""no" 1>&6
 
3858
fi
 
3859
 
 
3860
    if test "$YACCPATH" = "no"; then
 
3861
        { echo "configure: error: *** Unable to locate yacc." 1>&2; exit 1; }
 
3862
    fi
 
3863
fi
 
3864
 
 
3865
# Extract the first word of "ranlib", so it can be a program name with args.
 
3866
set dummy ranlib; ac_word=$2
 
3867
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
3868
echo "configure:3869: checking for $ac_word" >&5
 
3869
 
 
3870
if test -n "$RANLIB"; then
 
3871
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 
3872
else
 
3873
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3874
  ac_dummy="$PATH"
 
3875
  for ac_dir in $ac_dummy; do
 
3876
    test -z "$ac_dir" && ac_dir=.
 
3877
    if test -f $ac_dir/$ac_word; then
 
3878
      ac_cv_prog_RANLIB="ranlib"
 
3879
      break
 
3880
    fi
 
3881
  done
 
3882
  IFS="$ac_save_ifs"
 
3883
  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
 
3884
fi
 
3885
RANLIB="$ac_cv_prog_RANLIB"
 
3886
if test -n "$RANLIB"; then
 
3887
  echo "$ac_t""$RANLIB" 1>&6
 
3888
else
 
3889
  echo "$ac_t""no" 1>&6
 
3890
fi
 
3891
 
 
3892
for ac_prog in ar
 
3893
do
 
3894
# Extract the first word of "$ac_prog", so it can be a program name with args.
 
3895
set dummy $ac_prog; ac_word=$2
 
3896
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
3897
echo "configure:3898: checking for $ac_word" >&5
 
3898
 
 
3899
if test -n "$AR"; then
 
3900
  ac_cv_prog_AR="$AR" # Let the user override the test.
 
3901
else
 
3902
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3903
  ac_dummy="$PATH"
 
3904
  for ac_dir in $ac_dummy; do
 
3905
    test -z "$ac_dir" && ac_dir=.
 
3906
    if test -f $ac_dir/$ac_word; then
 
3907
      ac_cv_prog_AR="$ac_prog"
 
3908
      break
 
3909
    fi
 
3910
  done
 
3911
  IFS="$ac_save_ifs"
 
3912
fi
 
3913
AR="$ac_cv_prog_AR"
 
3914
if test -n "$AR"; then
 
3915
  echo "$ac_t""$AR" 1>&6
 
3916
else
 
3917
  echo "$ac_t""no" 1>&6
 
3918
fi
 
3919
 
 
3920
test -n "$AR" && break
 
3921
done
 
3922
 
 
3923
for ac_prog in env
 
3924
do
 
3925
# Extract the first word of "$ac_prog", so it can be a program name with args.
 
3926
set dummy $ac_prog; ac_word=$2
 
3927
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
3928
echo "configure:3929: checking for $ac_word" >&5
 
3929
 
 
3930
if test -n "$ENV"; then
 
3931
  ac_cv_prog_ENV="$ENV" # Let the user override the test.
 
3932
else
 
3933
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3934
  ac_dummy="$PATH"
 
3935
  for ac_dir in $ac_dummy; do
 
3936
    test -z "$ac_dir" && ac_dir=.
 
3937
    if test -f $ac_dir/$ac_word; then
 
3938
      ac_cv_prog_ENV="$ac_prog"
 
3939
      break
 
3940
    fi
 
3941
  done
 
3942
  IFS="$ac_save_ifs"
 
3943
fi
 
3944
ENV="$ac_cv_prog_ENV"
 
3945
if test -n "$ENV"; then
 
3946
  echo "$ac_t""$ENV" 1>&6
 
3947
else
 
3948
  echo "$ac_t""no" 1>&6
 
3949
fi
 
3950
 
 
3951
test -n "$ENV" && break
 
3952
done
 
3953
 
 
3954
# Extract the first word of "perl", so it can be a program name with args.
 
3955
set dummy perl; ac_word=$2
 
3956
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
3957
echo "configure:3958: checking for $ac_word" >&5
 
3958
 
 
3959
case "$PERL" in
 
3960
  /*)
 
3961
  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
 
3962
  ;;
 
3963
  ?:/*)                  
 
3964
  ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
 
3965
  ;;
 
3966
  *)
 
3967
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
3968
  ac_dummy="$PATH"
 
3969
  for ac_dir in $ac_dummy; do 
 
3970
    test -z "$ac_dir" && ac_dir=.
 
3971
    if test -f $ac_dir/$ac_word; then
 
3972
      ac_cv_path_PERL="$ac_dir/$ac_word"
 
3973
      break
 
3974
    fi
 
3975
  done
 
3976
  IFS="$ac_save_ifs"
 
3977
  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
 
3978
  ;;
 
3979
esac
 
3980
PERL="$ac_cv_path_PERL"
 
3981
if test -n "$PERL"; then
 
3982
  echo "$ac_t""$PERL" 1>&6
 
3983
else
 
3984
  echo "$ac_t""no" 1>&6
 
3985
fi
 
3986
  
 
3987
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
 
3988
echo "configure:3989: checking for ANSI C header files" >&5
 
3989
 
 
3990
cat > conftest.$ac_ext <<EOF
 
3991
#line 3992 "configure"
 
3992
#include "confdefs.h"
 
3993
#include <stdlib.h>
 
3994
#include <stdarg.h>
 
3995
#include <string.h>
 
3996
#include <float.h>
 
3997
EOF
 
3998
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
3999
{ (eval echo configure:4000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4000
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4001
if test -z "$ac_err"; then
 
4002
  rm -rf conftest*
 
4003
  ac_cv_header_stdc=yes
 
4004
else
 
4005
  echo "$ac_err" >&5
 
4006
  echo "configure: failed program was:" >&5
 
4007
  cat conftest.$ac_ext >&5
 
4008
  rm -rf conftest*
 
4009
  ac_cv_header_stdc=no
 
4010
fi
 
4011
rm -f conftest*
 
4012
 
 
4013
if test $ac_cv_header_stdc = yes; then
 
4014
  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 
4015
cat > conftest.$ac_ext <<EOF
 
4016
#line 4017 "configure"
 
4017
#include "confdefs.h"
 
4018
#include <string.h>
 
4019
EOF
 
4020
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
4021
  egrep "memchr" >/dev/null 2>&1; then
 
4022
  :
 
4023
else
 
4024
  rm -rf conftest*
 
4025
  ac_cv_header_stdc=no
 
4026
fi
 
4027
rm -f conftest*
 
4028
 
 
4029
fi
 
4030
 
 
4031
if test $ac_cv_header_stdc = yes; then
 
4032
  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 
4033
cat > conftest.$ac_ext <<EOF
 
4034
#line 4035 "configure"
 
4035
#include "confdefs.h"
 
4036
#include <stdlib.h>
 
4037
EOF
 
4038
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
4039
  egrep "free" >/dev/null 2>&1; then
 
4040
  :
 
4041
else
 
4042
  rm -rf conftest*
 
4043
  ac_cv_header_stdc=no
 
4044
fi
 
4045
rm -f conftest*
 
4046
 
 
4047
fi
 
4048
 
 
4049
if test $ac_cv_header_stdc = yes; then
 
4050
  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
 
4051
if test "$cross_compiling" = yes; then
 
4052
  :
 
4053
else
 
4054
  cat > conftest.$ac_ext <<EOF
 
4055
#line 4056 "configure"
 
4056
#include "confdefs.h"
 
4057
#include <ctype.h>
 
4058
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 
4059
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
 
4060
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
 
4061
int main () { int i; for (i = 0; i < 256; i++)
 
4062
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 
4063
exit (0); }
 
4064
 
 
4065
EOF
 
4066
if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
4067
then
 
4068
  :
 
4069
else
 
4070
  echo "configure: failed program was:" >&5
 
4071
  cat conftest.$ac_ext >&5
 
4072
  rm -fr conftest*
 
4073
  ac_cv_header_stdc=no
 
4074
fi
 
4075
rm -fr conftest*
 
4076
fi
 
4077
 
 
4078
fi
 
4079
 
 
4080
echo "$ac_t""$ac_cv_header_stdc" 1>&6
 
4081
if test $ac_cv_header_stdc = yes; then
 
4082
  cat >> confdefs.h <<\EOF
 
4083
#define STDC_HEADERS 1
 
4084
EOF
 
4085
 
 
4086
fi
 
4087
 
 
4088
#AC_CHECK_HEADERS(curses.h limits.h termio.h termios.h unistd.h values.h)
 
4089
for ac_hdr in limits.h termio.h termios.h unistd.h values.h f2c.h g2c.h
 
4090
do
 
4091
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4092
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4093
echo "configure:4094: checking for $ac_hdr" >&5
 
4094
 
 
4095
cat > conftest.$ac_ext <<EOF
 
4096
#line 4097 "configure"
 
4097
#include "confdefs.h"
 
4098
#include <$ac_hdr>
 
4099
EOF
 
4100
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4101
{ (eval echo configure:4102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4102
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4103
if test -z "$ac_err"; then
 
4104
  rm -rf conftest*
 
4105
  eval "ac_cv_header_$ac_safe=yes"
 
4106
else
 
4107
  echo "$ac_err" >&5
 
4108
  echo "configure: failed program was:" >&5
 
4109
  cat conftest.$ac_ext >&5
 
4110
  rm -rf conftest*
 
4111
  eval "ac_cv_header_$ac_safe=no"
 
4112
fi
 
4113
rm -f conftest*
 
4114
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4115
  echo "$ac_t""yes" 1>&6
 
4116
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4117
  cat >> confdefs.h <<EOF
 
4118
#define $ac_tr_hdr 1
 
4119
EOF
 
4120
 
 
4121
else
 
4122
  echo "$ac_t""no" 1>&6
 
4123
fi
 
4124
done
 
4125
 
 
4126
for ac_hdr in sys/ioctl.h sys/mtio.h sys/resource.h sys/time.h
 
4127
do
 
4128
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4129
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4130
echo "configure:4131: checking for $ac_hdr" >&5
 
4131
 
 
4132
cat > conftest.$ac_ext <<EOF
 
4133
#line 4134 "configure"
 
4134
#include "confdefs.h"
 
4135
#include <$ac_hdr>
 
4136
EOF
 
4137
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4138
{ (eval echo configure:4139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4139
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4140
if test -z "$ac_err"; then
 
4141
  rm -rf conftest*
 
4142
  eval "ac_cv_header_$ac_safe=yes"
 
4143
else
 
4144
  echo "$ac_err" >&5
 
4145
  echo "configure: failed program was:" >&5
 
4146
  cat conftest.$ac_ext >&5
 
4147
  rm -rf conftest*
 
4148
  eval "ac_cv_header_$ac_safe=no"
 
4149
fi
 
4150
rm -f conftest*
 
4151
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4152
  echo "$ac_t""yes" 1>&6
 
4153
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4154
  cat >> confdefs.h <<EOF
 
4155
#define $ac_tr_hdr 1
 
4156
EOF
 
4157
 
 
4158
else
 
4159
  echo "$ac_t""no" 1>&6
 
4160
fi
 
4161
done
 
4162
 
 
4163
for ac_hdr in sys/timeb.h sys/types.h sys/utsname.h
 
4164
do
 
4165
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4166
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4167
echo "configure:4168: checking for $ac_hdr" >&5
 
4168
 
 
4169
cat > conftest.$ac_ext <<EOF
 
4170
#line 4171 "configure"
 
4171
#include "confdefs.h"
 
4172
#include <$ac_hdr>
 
4173
EOF
 
4174
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4175
{ (eval echo configure:4176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4176
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4177
if test -z "$ac_err"; then
 
4178
  rm -rf conftest*
 
4179
  eval "ac_cv_header_$ac_safe=yes"
 
4180
else
 
4181
  echo "$ac_err" >&5
 
4182
  echo "configure: failed program was:" >&5
 
4183
  cat conftest.$ac_ext >&5
 
4184
  rm -rf conftest*
 
4185
  eval "ac_cv_header_$ac_safe=no"
 
4186
fi
 
4187
rm -f conftest*
 
4188
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4189
  echo "$ac_t""yes" 1>&6
 
4190
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4191
  cat >> confdefs.h <<EOF
 
4192
#define $ac_tr_hdr 1
 
4193
EOF
 
4194
 
 
4195
else
 
4196
  echo "$ac_t""no" 1>&6
 
4197
fi
 
4198
done
 
4199
 
 
4200
for ac_hdr in libintl.h iconv.h
 
4201
do
 
4202
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4203
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4204
echo "configure:4205: checking for $ac_hdr" >&5
 
4205
 
 
4206
cat > conftest.$ac_ext <<EOF
 
4207
#line 4208 "configure"
 
4208
#include "confdefs.h"
 
4209
#include <$ac_hdr>
 
4210
EOF
 
4211
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4212
{ (eval echo configure:4213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4213
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4214
if test -z "$ac_err"; then
 
4215
  rm -rf conftest*
 
4216
  eval "ac_cv_header_$ac_safe=yes"
 
4217
else
 
4218
  echo "$ac_err" >&5
 
4219
  echo "configure: failed program was:" >&5
 
4220
  cat conftest.$ac_ext >&5
 
4221
  rm -rf conftest*
 
4222
  eval "ac_cv_header_$ac_safe=no"
 
4223
fi
 
4224
rm -f conftest*
 
4225
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4226
  echo "$ac_t""yes" 1>&6
 
4227
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4228
  cat >> confdefs.h <<EOF
 
4229
#define $ac_tr_hdr 1
 
4230
EOF
 
4231
 
 
4232
else
 
4233
  echo "$ac_t""no" 1>&6
 
4234
fi
 
4235
done
 
4236
 
 
4237
for ac_hdr in langinfo.h
 
4238
do
 
4239
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
4240
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
4241
echo "configure:4242: checking for $ac_hdr" >&5
 
4242
 
 
4243
cat > conftest.$ac_ext <<EOF
 
4244
#line 4245 "configure"
 
4245
#include "confdefs.h"
 
4246
#include <$ac_hdr>
 
4247
EOF
 
4248
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4249
{ (eval echo configure:4250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4250
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4251
if test -z "$ac_err"; then
 
4252
  rm -rf conftest*
 
4253
  eval "ac_cv_header_$ac_safe=yes"
 
4254
else
 
4255
  echo "$ac_err" >&5
 
4256
  echo "configure: failed program was:" >&5
 
4257
  cat conftest.$ac_ext >&5
 
4258
  rm -rf conftest*
 
4259
  eval "ac_cv_header_$ac_safe=no"
 
4260
fi
 
4261
rm -f conftest*
 
4262
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
4263
  echo "$ac_t""yes" 1>&6
 
4264
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
4265
  cat >> confdefs.h <<EOF
 
4266
#define $ac_tr_hdr 1
 
4267
EOF
 
4268
 
 
4269
else
 
4270
  echo "$ac_t""no" 1>&6
 
4271
fi
 
4272
done
 
4273
 
 
4274
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
 
4275
echo "configure:4276: checking whether time.h and sys/time.h may both be included" >&5
 
4276
 
 
4277
cat > conftest.$ac_ext <<EOF
 
4278
#line 4279 "configure"
 
4279
#include "confdefs.h"
 
4280
#include <sys/types.h>
 
4281
#include <sys/time.h>
 
4282
#include <time.h>
 
4283
int main() {
 
4284
struct tm *tp;
 
4285
; return 0; }
 
4286
EOF
 
4287
if { (eval echo configure:4288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
4288
  rm -rf conftest*
 
4289
  ac_cv_header_time=yes
 
4290
else
 
4291
  echo "configure: failed program was:" >&5
 
4292
  cat conftest.$ac_ext >&5
 
4293
  rm -rf conftest*
 
4294
  ac_cv_header_time=no
 
4295
fi
 
4296
rm -f conftest*
 
4297
 
 
4298
echo "$ac_t""$ac_cv_header_time" 1>&6
 
4299
if test $ac_cv_header_time = yes; then
 
4300
  cat >> confdefs.h <<\EOF
 
4301
#define TIME_WITH_SYS_TIME 1
 
4302
EOF
 
4303
 
 
4304
fi
 
4305
 
 
4306
echo $ac_n "checking for off_t""... $ac_c" 1>&6
 
4307
echo "configure:4308: checking for off_t" >&5
 
4308
 
 
4309
cat > conftest.$ac_ext <<EOF
 
4310
#line 4311 "configure"
 
4311
#include "confdefs.h"
 
4312
#include <sys/types.h>
 
4313
#if STDC_HEADERS
 
4314
#include <stdlib.h>
 
4315
#include <stddef.h>
 
4316
#endif
 
4317
EOF
 
4318
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
4319
  egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
 
4320
  rm -rf conftest*
 
4321
  ac_cv_type_off_t=yes
 
4322
else
 
4323
  rm -rf conftest*
 
4324
  ac_cv_type_off_t=no
 
4325
fi
 
4326
rm -f conftest*
 
4327
 
 
4328
echo "$ac_t""$ac_cv_type_off_t" 1>&6
 
4329
if test $ac_cv_type_off_t = no; then
 
4330
  cat >> confdefs.h <<\EOF
 
4331
#define off_t long
 
4332
EOF
 
4333
 
 
4334
fi
 
4335
 
 
4336
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
 
4337
echo "configure:4338: checking for uid_t in sys/types.h" >&5
 
4338
 
 
4339
cat > conftest.$ac_ext <<EOF
 
4340
#line 4341 "configure"
 
4341
#include "confdefs.h"
 
4342
#include <sys/types.h>
 
4343
EOF
 
4344
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 
4345
  egrep "uid_t" >/dev/null 2>&1; then
 
4346
  rm -rf conftest*
 
4347
  ac_cv_type_uid_t=yes
 
4348
else
 
4349
  rm -rf conftest*
 
4350
  ac_cv_type_uid_t=no
 
4351
fi
 
4352
rm -f conftest*
 
4353
 
 
4354
 
 
4355
echo "$ac_t""$ac_cv_type_uid_t" 1>&6
 
4356
if test $ac_cv_type_uid_t = no; then
 
4357
  cat >> confdefs.h <<\EOF
 
4358
#define uid_t int
 
4359
EOF
 
4360
 
 
4361
  cat >> confdefs.h <<\EOF
 
4362
#define gid_t int
 
4363
EOF
 
4364
 
 
4365
fi
 
4366
 
 
4367
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
 
4368
echo "configure:4369: checking return type of signal handlers" >&5
 
4369
 
 
4370
cat > conftest.$ac_ext <<EOF
 
4371
#line 4372 "configure"
 
4372
#include "confdefs.h"
 
4373
#include <sys/types.h>
 
4374
#include <signal.h>
 
4375
#ifdef signal
 
4376
#undef signal
 
4377
#endif
 
4378
#ifdef __cplusplus
 
4379
extern "C" void (*signal (int, void (*)(int)))(int);
 
4380
#else
 
4381
void (*signal ()) ();
 
4382
#endif
 
4383
 
 
4384
int main() {
 
4385
int i;
 
4386
; return 0; }
 
4387
EOF
 
4388
if { (eval echo configure:4389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
4389
  rm -rf conftest*
 
4390
  ac_cv_type_signal=void
 
4391
else
 
4392
  echo "configure: failed program was:" >&5
 
4393
  cat conftest.$ac_ext >&5
 
4394
  rm -rf conftest*
 
4395
  ac_cv_type_signal=int
 
4396
fi
 
4397
rm -f conftest*
 
4398
 
 
4399
echo "$ac_t""$ac_cv_type_signal" 1>&6
 
4400
cat >> confdefs.h <<EOF
 
4401
#define RETSIGTYPE $ac_cv_type_signal
 
4402
EOF
 
4403
 
 
4404
 
 
4405
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
 
4406
echo "configure:4407: checking for Cygwin environment" >&5
 
4407
 
 
4408
cat > conftest.$ac_ext <<EOF
 
4409
#line 4410 "configure"
 
4410
#include "confdefs.h"
 
4411
 
 
4412
int main() {
 
4413
 
 
4414
#ifndef __CYGWIN__
 
4415
#define __CYGWIN__ __CYGWIN32__
 
4416
#endif
 
4417
return __CYGWIN__;
 
4418
; return 0; }
 
4419
EOF
 
4420
if { (eval echo configure:4421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
4421
  rm -rf conftest*
 
4422
  ac_cv_cygwin=yes
 
4423
else
 
4424
  echo "configure: failed program was:" >&5
 
4425
  cat conftest.$ac_ext >&5
 
4426
  rm -rf conftest*
 
4427
  ac_cv_cygwin=no
 
4428
fi
 
4429
rm -f conftest*
 
4430
rm -f conftest*
 
4431
 
 
4432
echo "$ac_t""$ac_cv_cygwin" 1>&6
 
4433
CYGWIN=
 
4434
test "$ac_cv_cygwin" = yes && CYGWIN=yes
 
4435
for ac_func in ftime gethostname gettimeofday lseek nice time uname
 
4436
do
 
4437
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
4438
echo "configure:4439: checking for $ac_func" >&5
 
4439
 
 
4440
cat > conftest.$ac_ext <<EOF
 
4441
#line 4442 "configure"
 
4442
#include "confdefs.h"
 
4443
/* System header to define __stub macros and hopefully few prototypes,
 
4444
    which can conflict with char $ac_func(); below.  */
 
4445
#include <assert.h>
 
4446
/* Override any gcc2 internal prototype to avoid an error.  */
 
4447
/* We use char because int might match the return type of a gcc2
 
4448
    builtin and then its argument prototype would still apply.  */
 
4449
char $ac_func();
 
4450
 
 
4451
int main() {
 
4452
 
 
4453
/* The GNU C library defines this for functions which it implements
 
4454
    to always fail with ENOSYS.  Some functions are actually named
 
4455
    something starting with __ and the normal name is an alias.  */
 
4456
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
4457
choke me
 
4458
#else
 
4459
$ac_func();
 
4460
#endif
 
4461
 
 
4462
; return 0; }
 
4463
EOF
 
4464
if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4465
  rm -rf conftest*
 
4466
  eval "ac_cv_func_$ac_func=yes"
 
4467
else
 
4468
  echo "configure: failed program was:" >&5
 
4469
  cat conftest.$ac_ext >&5
 
4470
  rm -rf conftest*
 
4471
  eval "ac_cv_func_$ac_func=no"
 
4472
fi
 
4473
rm -f conftest*
 
4474
 
 
4475
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
 
4476
  echo "$ac_t""yes" 1>&6
 
4477
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 
4478
  cat >> confdefs.h <<EOF
 
4479
#define $ac_tr_func 1
 
4480
EOF
 
4481
 
 
4482
else
 
4483
  echo "$ac_t""no" 1>&6
 
4484
fi
 
4485
done
 
4486
 
 
4487
for ac_func in seteuid setpriority setreuid setruid
 
4488
do
 
4489
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
4490
echo "configure:4491: checking for $ac_func" >&5
 
4491
 
 
4492
cat > conftest.$ac_ext <<EOF
 
4493
#line 4494 "configure"
 
4494
#include "confdefs.h"
 
4495
/* System header to define __stub macros and hopefully few prototypes,
 
4496
    which can conflict with char $ac_func(); below.  */
 
4497
#include <assert.h>
 
4498
/* Override any gcc2 internal prototype to avoid an error.  */
 
4499
/* We use char because int might match the return type of a gcc2
 
4500
    builtin and then its argument prototype would still apply.  */
 
4501
char $ac_func();
 
4502
 
 
4503
int main() {
 
4504
 
 
4505
/* The GNU C library defines this for functions which it implements
 
4506
    to always fail with ENOSYS.  Some functions are actually named
 
4507
    something starting with __ and the normal name is an alias.  */
 
4508
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
4509
choke me
 
4510
#else
 
4511
$ac_func();
 
4512
#endif
 
4513
 
 
4514
; return 0; }
 
4515
EOF
 
4516
if { (eval echo configure:4517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4517
  rm -rf conftest*
 
4518
  eval "ac_cv_func_$ac_func=yes"
 
4519
else
 
4520
  echo "configure: failed program was:" >&5
 
4521
  cat conftest.$ac_ext >&5
 
4522
  rm -rf conftest*
 
4523
  eval "ac_cv_func_$ac_func=no"
 
4524
fi
 
4525
rm -f conftest*
 
4526
 
 
4527
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
 
4528
  echo "$ac_t""yes" 1>&6
 
4529
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 
4530
  cat >> confdefs.h <<EOF
 
4531
#define $ac_tr_func 1
 
4532
EOF
 
4533
 
 
4534
else
 
4535
  echo "$ac_t""no" 1>&6
 
4536
fi
 
4537
done
 
4538
 
 
4539
for ac_func in drand48
 
4540
do
 
4541
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
4542
echo "configure:4543: checking for $ac_func" >&5
 
4543
 
 
4544
cat > conftest.$ac_ext <<EOF
 
4545
#line 4546 "configure"
 
4546
#include "confdefs.h"
 
4547
/* System header to define __stub macros and hopefully few prototypes,
 
4548
    which can conflict with char $ac_func(); below.  */
 
4549
#include <assert.h>
 
4550
/* Override any gcc2 internal prototype to avoid an error.  */
 
4551
/* We use char because int might match the return type of a gcc2
 
4552
    builtin and then its argument prototype would still apply.  */
 
4553
char $ac_func();
 
4554
 
 
4555
int main() {
 
4556
 
 
4557
/* The GNU C library defines this for functions which it implements
 
4558
    to always fail with ENOSYS.  Some functions are actually named
 
4559
    something starting with __ and the normal name is an alias.  */
 
4560
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
4561
choke me
 
4562
#else
 
4563
$ac_func();
 
4564
#endif
 
4565
 
 
4566
; return 0; }
 
4567
EOF
 
4568
if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4569
  rm -rf conftest*
 
4570
  eval "ac_cv_func_$ac_func=yes"
 
4571
else
 
4572
  echo "configure: failed program was:" >&5
 
4573
  cat conftest.$ac_ext >&5
 
4574
  rm -rf conftest*
 
4575
  eval "ac_cv_func_$ac_func=no"
 
4576
fi
 
4577
rm -f conftest*
 
4578
 
 
4579
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
 
4580
  echo "$ac_t""yes" 1>&6
 
4581
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 
4582
  cat >> confdefs.h <<EOF
 
4583
#define $ac_tr_func 1
 
4584
EOF
 
4585
 
 
4586
else
 
4587
  echo "$ac_t""no" 1>&6
 
4588
fi
 
4589
done
 
4590
 
 
4591
for ac_func in putenv setenv
 
4592
do
 
4593
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
4594
echo "configure:4595: checking for $ac_func" >&5
 
4595
 
 
4596
cat > conftest.$ac_ext <<EOF
 
4597
#line 4598 "configure"
 
4598
#include "confdefs.h"
 
4599
/* System header to define __stub macros and hopefully few prototypes,
 
4600
    which can conflict with char $ac_func(); below.  */
 
4601
#include <assert.h>
 
4602
/* Override any gcc2 internal prototype to avoid an error.  */
 
4603
/* We use char because int might match the return type of a gcc2
 
4604
    builtin and then its argument prototype would still apply.  */
 
4605
char $ac_func();
 
4606
 
 
4607
int main() {
 
4608
 
 
4609
/* The GNU C library defines this for functions which it implements
 
4610
    to always fail with ENOSYS.  Some functions are actually named
 
4611
    something starting with __ and the normal name is an alias.  */
 
4612
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
4613
choke me
 
4614
#else
 
4615
$ac_func();
 
4616
#endif
 
4617
 
 
4618
; return 0; }
 
4619
EOF
 
4620
if { (eval echo configure:4621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4621
  rm -rf conftest*
 
4622
  eval "ac_cv_func_$ac_func=yes"
 
4623
else
 
4624
  echo "configure: failed program was:" >&5
 
4625
  cat conftest.$ac_ext >&5
 
4626
  rm -rf conftest*
 
4627
  eval "ac_cv_func_$ac_func=no"
 
4628
fi
 
4629
rm -f conftest*
 
4630
 
 
4631
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
 
4632
  echo "$ac_t""yes" 1>&6
 
4633
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 
4634
  cat >> confdefs.h <<EOF
 
4635
#define $ac_tr_func 1
 
4636
EOF
 
4637
 
 
4638
else
 
4639
  echo "$ac_t""no" 1>&6
 
4640
fi
 
4641
done
 
4642
 
 
4643
for ac_func in nanosleep
 
4644
do
 
4645
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
4646
echo "configure:4647: checking for $ac_func" >&5
 
4647
 
 
4648
cat > conftest.$ac_ext <<EOF
 
4649
#line 4650 "configure"
 
4650
#include "confdefs.h"
 
4651
/* System header to define __stub macros and hopefully few prototypes,
 
4652
    which can conflict with char $ac_func(); below.  */
 
4653
#include <assert.h>
 
4654
/* Override any gcc2 internal prototype to avoid an error.  */
 
4655
/* We use char because int might match the return type of a gcc2
 
4656
    builtin and then its argument prototype would still apply.  */
 
4657
char $ac_func();
 
4658
 
 
4659
int main() {
 
4660
 
 
4661
/* The GNU C library defines this for functions which it implements
 
4662
    to always fail with ENOSYS.  Some functions are actually named
 
4663
    something starting with __ and the normal name is an alias.  */
 
4664
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
4665
choke me
 
4666
#else
 
4667
$ac_func();
 
4668
#endif
 
4669
 
 
4670
; return 0; }
 
4671
EOF
 
4672
if { (eval echo configure:4673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4673
  rm -rf conftest*
 
4674
  eval "ac_cv_func_$ac_func=yes"
 
4675
else
 
4676
  echo "configure: failed program was:" >&5
 
4677
  cat conftest.$ac_ext >&5
 
4678
  rm -rf conftest*
 
4679
  eval "ac_cv_func_$ac_func=no"
 
4680
fi
 
4681
rm -f conftest*
 
4682
 
 
4683
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
 
4684
  echo "$ac_t""yes" 1>&6
 
4685
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 
4686
  cat >> confdefs.h <<EOF
 
4687
#define $ac_tr_func 1
 
4688
EOF
 
4689
 
 
4690
else
 
4691
  echo "$ac_t""no" 1>&6
 
4692
fi
 
4693
done
 
4694
 
 
4695
if test "$cross_compiling" != "yes" ; then
 
4696
echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
 
4697
echo "configure:4698: checking whether setpgrp takes no argument" >&5
 
4698
 
 
4699
if test "$cross_compiling" = yes; then
 
4700
  { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
 
4701
else
 
4702
  cat > conftest.$ac_ext <<EOF
 
4703
#line 4704 "configure"
 
4704
#include "confdefs.h"
 
4705
 
 
4706
#ifdef HAVE_UNISTD_H
 
4707
#include <unistd.h>
 
4708
#endif
 
4709
 
 
4710
/*
 
4711
 * If this system has a BSD-style setpgrp, which takes arguments, exit
 
4712
 * successfully.
 
4713
 */
 
4714
main()
 
4715
{
 
4716
    if (setpgrp(1,1) == -1)
 
4717
        exit(0);
 
4718
    else
 
4719
        exit(1);
 
4720
}
 
4721
 
 
4722
EOF
 
4723
if { (eval echo configure:4724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
4724
then
 
4725
  ac_cv_func_setpgrp_void=no
 
4726
else
 
4727
  echo "configure: failed program was:" >&5
 
4728
  cat conftest.$ac_ext >&5
 
4729
  rm -fr conftest*
 
4730
  ac_cv_func_setpgrp_void=yes
 
4731
fi
 
4732
rm -fr conftest*
 
4733
fi
 
4734
 
 
4735
 
 
4736
 
 
4737
echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
 
4738
if test $ac_cv_func_setpgrp_void = yes; then
 
4739
  cat >> confdefs.h <<\EOF
 
4740
#define SETPGRP_VOID 1
 
4741
EOF
 
4742
 
 
4743
fi
 
4744
 
 
4745
else
 
4746
CROSS_COMPILING=1
 
4747
 
 
4748
fi
 
4749
 
 
4750
echo $ac_n "checking for long long int""... $ac_c" 1>&6
 
4751
echo "configure:4752: checking for long long int" >&5
 
4752
cat > conftest.$ac_ext <<EOF
 
4753
#line 4754 "configure"
 
4754
#include "confdefs.h"
 
4755
 
 
4756
int main() {
 
4757
long long int x;
 
4758
; return 0; }
 
4759
EOF
 
4760
if { (eval echo configure:4761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
4761
  rm -rf conftest*
 
4762
  
 
4763
echo "$ac_t""yes" 1>&6
 
4764
cat >> confdefs.h <<\EOF
 
4765
#define HAVE_LONG_LONG_INT 1
 
4766
EOF
 
4767
 
 
4768
 
 
4769
else
 
4770
  echo "configure: failed program was:" >&5
 
4771
  cat conftest.$ac_ext >&5
 
4772
  rm -rf conftest*
 
4773
  
 
4774
echo "$ac_t""no" 1>&6
 
4775
 
 
4776
fi
 
4777
rm -f conftest*
 
4778
 
 
4779
echo $ac_n "checking for W11""... $ac_c" 1>&6
 
4780
echo "configure:4781: checking for W11" >&5
 
4781
case "$enable_w11" in
 
4782
        yes|no) echo "$ac_t"""$enable_w11"" 1>&6        ;;
 
4783
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
4784
esac
 
4785
 
 
4786
USE_X11=
 
4787
USE_W11=
 
4788
XLIB=
 
4789
XTLIB=
 
4790
 
 
4791
if test "$enable_w11" = "yes" ; then
 
4792
    X_CFLAGS=-I${SRCDIR}/display/drivers/windows/libW11
 
4793
    X_LIBS='-L$(LIBDIR)'
 
4794
    
 
4795
    
 
4796
 
 
4797
    USE_W11="1"
 
4798
    USE_X11="1"
 
4799
    XLIB=-lX11
 
4800
 
 
4801
    CFLAGS="$CFLAGS -D__W98__"
 
4802
else
 
4803
    # If we find X, set shell vars x_includes and x_libraries to the
 
4804
# paths, otherwise set no_x=yes.
 
4805
# Uses ac_ vars as temps to allow command line to override cache and checks.
 
4806
# --without-x overrides everything else, but does not touch the cache.
 
4807
echo $ac_n "checking for X""... $ac_c" 1>&6
 
4808
echo "configure:4809: checking for X" >&5
 
4809
 
 
4810
# Check whether --with-x or --without-x was given.
 
4811
if test "${with_x+set}" = set; then
 
4812
  withval="$with_x"
 
4813
  :
 
4814
fi
 
4815
 
 
4816
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
 
4817
if test "x$with_x" = xno; then
 
4818
  # The user explicitly disabled X.
 
4819
  have_x=disabled
 
4820
else
 
4821
  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
 
4822
    # Both variables are already set.
 
4823
    have_x=yes
 
4824
  else
 
4825
 
 
4826
# One or both of the vars are not set, and there is no cached value.
 
4827
ac_x_includes=NO ac_x_libraries=NO
 
4828
rm -fr conftestdir
 
4829
if mkdir conftestdir; then
 
4830
  cd conftestdir
 
4831
  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
 
4832
  cat > Imakefile <<'EOF'
 
4833
acfindx:
 
4834
        @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
 
4835
EOF
 
4836
  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
 
4837
    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
 
4838
    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
 
4839
    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
 
4840
    for ac_extension in a so sl; do
 
4841
      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
 
4842
        test -f $ac_im_libdir/libX11.$ac_extension; then
 
4843
        ac_im_usrlibdir=$ac_im_libdir; break
 
4844
      fi
 
4845
    done
 
4846
    # Screen out bogus values from the imake configuration.  They are
 
4847
    # bogus both because they are the default anyway, and because
 
4848
    # using them would break gcc on systems where it needs fixed includes.
 
4849
    case "$ac_im_incroot" in
 
4850
        /usr/include) ;;
 
4851
        *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
 
4852
    esac
 
4853
    case "$ac_im_usrlibdir" in
 
4854
        /usr/lib | /lib) ;;
 
4855
        *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
 
4856
    esac
 
4857
  fi
 
4858
  cd ..
 
4859
  rm -fr conftestdir
 
4860
fi
 
4861
 
 
4862
if test "$ac_x_includes" = NO; then
 
4863
  # Guess where to find include files, by looking for this one X11 .h file.
 
4864
  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
 
4865
 
 
4866
  # First, try using that file with no special directory specified.
 
4867
cat > conftest.$ac_ext <<EOF
 
4868
#line 4869 "configure"
 
4869
#include "confdefs.h"
 
4870
#include <$x_direct_test_include>
 
4871
EOF
 
4872
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
4873
{ (eval echo configure:4874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
4874
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
4875
if test -z "$ac_err"; then
 
4876
  rm -rf conftest*
 
4877
  # We can compile using X headers with no special include directory.
 
4878
ac_x_includes=
 
4879
else
 
4880
  echo "$ac_err" >&5
 
4881
  echo "configure: failed program was:" >&5
 
4882
  cat conftest.$ac_ext >&5
 
4883
  rm -rf conftest*
 
4884
  # Look for the header file in a standard set of common directories.
 
4885
# Check X11 before X11Rn because it is often a symlink to the current release.
 
4886
  for ac_dir in               \
 
4887
    /usr/X11/include          \
 
4888
    /usr/X11R6/include        \
 
4889
    /usr/X11R5/include        \
 
4890
    /usr/X11R4/include        \
 
4891
                              \
 
4892
    /usr/include/X11          \
 
4893
    /usr/include/X11R6        \
 
4894
    /usr/include/X11R5        \
 
4895
    /usr/include/X11R4        \
 
4896
                              \
 
4897
    /usr/local/X11/include    \
 
4898
    /usr/local/X11R6/include  \
 
4899
    /usr/local/X11R5/include  \
 
4900
    /usr/local/X11R4/include  \
 
4901
                              \
 
4902
    /usr/local/include/X11    \
 
4903
    /usr/local/include/X11R6  \
 
4904
    /usr/local/include/X11R5  \
 
4905
    /usr/local/include/X11R4  \
 
4906
                              \
 
4907
    /usr/X386/include         \
 
4908
    /usr/x386/include         \
 
4909
    /usr/XFree86/include/X11  \
 
4910
                              \
 
4911
    /usr/include              \
 
4912
    /usr/local/include        \
 
4913
    /usr/unsupported/include  \
 
4914
    /usr/athena/include       \
 
4915
    /usr/local/x11r5/include  \
 
4916
    /usr/lpp/Xamples/include  \
 
4917
                              \
 
4918
    /usr/openwin/include      \
 
4919
    /usr/openwin/share/include \
 
4920
    ; \
 
4921
  do
 
4922
    if test -r "$ac_dir/$x_direct_test_include"; then
 
4923
      ac_x_includes=$ac_dir
 
4924
      break
 
4925
    fi
 
4926
  done
 
4927
fi
 
4928
rm -f conftest*
 
4929
fi # $ac_x_includes = NO
 
4930
 
 
4931
if test "$ac_x_libraries" = NO; then
 
4932
  # Check for the libraries.
 
4933
 
 
4934
  test -z "$x_direct_test_library" && x_direct_test_library=Xt
 
4935
  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
 
4936
 
 
4937
  # See if we find them without any special options.
 
4938
  # Don't add to $LIBS permanently.
 
4939
  ac_save_LIBS="$LIBS"
 
4940
  LIBS="-l$x_direct_test_library $LIBS"
 
4941
cat > conftest.$ac_ext <<EOF
 
4942
#line 4943 "configure"
 
4943
#include "confdefs.h"
 
4944
 
 
4945
int main() {
 
4946
${x_direct_test_function}()
 
4947
; return 0; }
 
4948
EOF
 
4949
if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
4950
  rm -rf conftest*
 
4951
  LIBS="$ac_save_LIBS"
 
4952
# We can link X programs with no special library path.
 
4953
ac_x_libraries=
 
4954
else
 
4955
  echo "configure: failed program was:" >&5
 
4956
  cat conftest.$ac_ext >&5
 
4957
  rm -rf conftest*
 
4958
  LIBS="$ac_save_LIBS"
 
4959
# First see if replacing the include by lib works.
 
4960
# Check X11 before X11Rn because it is often a symlink to the current release.
 
4961
for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
 
4962
    /usr/X11/lib          \
 
4963
    /usr/X11R6/lib        \
 
4964
    /usr/X11R5/lib        \
 
4965
    /usr/X11R4/lib        \
 
4966
                          \
 
4967
    /usr/lib/X11          \
 
4968
    /usr/lib/X11R6        \
 
4969
    /usr/lib/X11R5        \
 
4970
    /usr/lib/X11R4        \
 
4971
                          \
 
4972
    /usr/local/X11/lib    \
 
4973
    /usr/local/X11R6/lib  \
 
4974
    /usr/local/X11R5/lib  \
 
4975
    /usr/local/X11R4/lib  \
 
4976
                          \
 
4977
    /usr/local/lib/X11    \
 
4978
    /usr/local/lib/X11R6  \
 
4979
    /usr/local/lib/X11R5  \
 
4980
    /usr/local/lib/X11R4  \
 
4981
                          \
 
4982
    /usr/X386/lib         \
 
4983
    /usr/x386/lib         \
 
4984
    /usr/XFree86/lib/X11  \
 
4985
                          \
 
4986
    /usr/lib              \
 
4987
    /usr/local/lib        \
 
4988
    /usr/unsupported/lib  \
 
4989
    /usr/athena/lib       \
 
4990
    /usr/local/x11r5/lib  \
 
4991
    /usr/lpp/Xamples/lib  \
 
4992
    /lib/usr/lib/X11      \
 
4993
                          \
 
4994
    /usr/openwin/lib      \
 
4995
    /usr/openwin/share/lib \
 
4996
    ; \
 
4997
do
 
4998
  for ac_extension in a so sl; do
 
4999
    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
 
5000
      ac_x_libraries=$ac_dir
 
5001
      break 2
 
5002
    fi
 
5003
  done
 
5004
done
 
5005
fi
 
5006
rm -f conftest*
 
5007
fi # $ac_x_libraries = NO
 
5008
 
 
5009
if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
 
5010
  # Didn't find X anywhere.  Cache the known absence of X.
 
5011
  ac_cv_have_x="have_x=no"
 
5012
else
 
5013
  # Record where we found X for the cache.
 
5014
  ac_cv_have_x="have_x=yes \
 
5015
                ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
 
5016
fi
 
5017
  fi
 
5018
  eval "$ac_cv_have_x"
 
5019
fi # $with_x != no
 
5020
 
 
5021
if test "$have_x" != yes; then
 
5022
  echo "$ac_t""$have_x" 1>&6
 
5023
  no_x=yes
 
5024
else
 
5025
  # If each of the values was on the command line, it overrides each guess.
 
5026
  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
 
5027
  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
 
5028
  # Update the cache value to reflect the command line values.
 
5029
  ac_cv_have_x="have_x=yes \
 
5030
                ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
 
5031
  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
 
5032
fi
 
5033
 
 
5034
if test "$no_x" = yes; then
 
5035
  # Not all programs may use this symbol, but it does not hurt to define it.
 
5036
  cat >> confdefs.h <<\EOF
 
5037
#define X_DISPLAY_MISSING 1
 
5038
EOF
 
5039
 
 
5040
  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
 
5041
else
 
5042
  if test -n "$x_includes"; then
 
5043
    X_CFLAGS="$X_CFLAGS -I$x_includes"
 
5044
  fi
 
5045
 
 
5046
  # It would also be nice to do this for all -L options, not just this one.
 
5047
  if test -n "$x_libraries"; then
 
5048
    X_LIBS="$X_LIBS -L$x_libraries"
 
5049
    # For Solaris; some versions of Sun CC require a space after -R and
 
5050
    # others require no space.  Words are not sufficient . . . .
 
5051
    case "`(uname -sr) 2>/dev/null`" in
 
5052
    "SunOS 5"*)
 
5053
      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
 
5054
echo "configure:5055: checking whether -R must be followed by a space" >&5
 
5055
      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
 
5056
      cat > conftest.$ac_ext <<EOF
 
5057
#line 5058 "configure"
 
5058
#include "confdefs.h"
 
5059
 
 
5060
int main() {
 
5061
 
 
5062
; return 0; }
 
5063
EOF
 
5064
if { (eval echo configure:5065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5065
  rm -rf conftest*
 
5066
  ac_R_nospace=yes
 
5067
else
 
5068
  echo "configure: failed program was:" >&5
 
5069
  cat conftest.$ac_ext >&5
 
5070
  rm -rf conftest*
 
5071
  ac_R_nospace=no
 
5072
fi
 
5073
rm -f conftest*
 
5074
      if test $ac_R_nospace = yes; then
 
5075
        echo "$ac_t""no" 1>&6
 
5076
        X_LIBS="$X_LIBS -R$x_libraries"
 
5077
      else
 
5078
        LIBS="$ac_xsave_LIBS -R $x_libraries"
 
5079
        cat > conftest.$ac_ext <<EOF
 
5080
#line 5081 "configure"
 
5081
#include "confdefs.h"
 
5082
 
 
5083
int main() {
 
5084
 
 
5085
; return 0; }
 
5086
EOF
 
5087
if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5088
  rm -rf conftest*
 
5089
  ac_R_space=yes
 
5090
else
 
5091
  echo "configure: failed program was:" >&5
 
5092
  cat conftest.$ac_ext >&5
 
5093
  rm -rf conftest*
 
5094
  ac_R_space=no
 
5095
fi
 
5096
rm -f conftest*
 
5097
        if test $ac_R_space = yes; then
 
5098
          echo "$ac_t""yes" 1>&6
 
5099
          X_LIBS="$X_LIBS -R $x_libraries"
 
5100
        else
 
5101
          echo "$ac_t""neither works" 1>&6
 
5102
        fi
 
5103
      fi
 
5104
      LIBS="$ac_xsave_LIBS"
 
5105
    esac
 
5106
  fi
 
5107
 
 
5108
  # Check for system-dependent libraries X programs must link with.
 
5109
  # Do this before checking for the system-independent R6 libraries
 
5110
  # (-lICE), since we may need -lsocket or whatever for X linking.
 
5111
 
 
5112
  if test "$ISC" = yes; then
 
5113
    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
 
5114
  else
 
5115
    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
 
5116
    # libraries were built with DECnet support.  And karl@cs.umb.edu says
 
5117
    # the Alpha needs dnet_stub (dnet does not exist).
 
5118
    echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
 
5119
echo "configure:5120: checking for dnet_ntoa in -ldnet" >&5
 
5120
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
5121
 
 
5122
ac_save_LIBS="$LIBS"
 
5123
LIBS="-ldnet  $LIBS"
 
5124
cat > conftest.$ac_ext <<EOF
 
5125
#line 5126 "configure"
 
5126
#include "confdefs.h"
 
5127
/* Override any gcc2 internal prototype to avoid an error.  */
 
5128
/* We use char because int might match the return type of a gcc2
 
5129
    builtin and then its argument prototype would still apply.  */
 
5130
char dnet_ntoa();
 
5131
 
 
5132
int main() {
 
5133
dnet_ntoa()
 
5134
; return 0; }
 
5135
EOF
 
5136
if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5137
  rm -rf conftest*
 
5138
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5139
else
 
5140
  echo "configure: failed program was:" >&5
 
5141
  cat conftest.$ac_ext >&5
 
5142
  rm -rf conftest*
 
5143
  eval "ac_cv_lib_$ac_lib_var=no"
 
5144
fi
 
5145
rm -f conftest*
 
5146
LIBS="$ac_save_LIBS"
 
5147
 
 
5148
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5149
  echo "$ac_t""yes" 1>&6
 
5150
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
 
5151
else
 
5152
  echo "$ac_t""no" 1>&6
 
5153
fi
 
5154
 
 
5155
    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
 
5156
      echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
 
5157
echo "configure:5158: checking for dnet_ntoa in -ldnet_stub" >&5
 
5158
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
 
5159
 
 
5160
ac_save_LIBS="$LIBS"
 
5161
LIBS="-ldnet_stub  $LIBS"
 
5162
cat > conftest.$ac_ext <<EOF
 
5163
#line 5164 "configure"
 
5164
#include "confdefs.h"
 
5165
/* Override any gcc2 internal prototype to avoid an error.  */
 
5166
/* We use char because int might match the return type of a gcc2
 
5167
    builtin and then its argument prototype would still apply.  */
 
5168
char dnet_ntoa();
 
5169
 
 
5170
int main() {
 
5171
dnet_ntoa()
 
5172
; return 0; }
 
5173
EOF
 
5174
if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5175
  rm -rf conftest*
 
5176
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5177
else
 
5178
  echo "configure: failed program was:" >&5
 
5179
  cat conftest.$ac_ext >&5
 
5180
  rm -rf conftest*
 
5181
  eval "ac_cv_lib_$ac_lib_var=no"
 
5182
fi
 
5183
rm -f conftest*
 
5184
LIBS="$ac_save_LIBS"
 
5185
 
 
5186
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5187
  echo "$ac_t""yes" 1>&6
 
5188
  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
 
5189
else
 
5190
  echo "$ac_t""no" 1>&6
 
5191
fi
 
5192
 
 
5193
    fi
 
5194
 
 
5195
    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
 
5196
    # to get the SysV transport functions.
 
5197
    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
 
5198
    # needs -lnsl.
 
5199
    # The nsl library prevents programs from opening the X display
 
5200
    # on Irix 5.2, according to dickey@clark.net.
 
5201
    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
 
5202
echo "configure:5203: checking for gethostbyname" >&5
 
5203
 
 
5204
cat > conftest.$ac_ext <<EOF
 
5205
#line 5206 "configure"
 
5206
#include "confdefs.h"
 
5207
/* System header to define __stub macros and hopefully few prototypes,
 
5208
    which can conflict with char gethostbyname(); below.  */
 
5209
#include <assert.h>
 
5210
/* Override any gcc2 internal prototype to avoid an error.  */
 
5211
/* We use char because int might match the return type of a gcc2
 
5212
    builtin and then its argument prototype would still apply.  */
 
5213
char gethostbyname();
 
5214
 
 
5215
int main() {
 
5216
 
 
5217
/* The GNU C library defines this for functions which it implements
 
5218
    to always fail with ENOSYS.  Some functions are actually named
 
5219
    something starting with __ and the normal name is an alias.  */
 
5220
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
 
5221
choke me
 
5222
#else
 
5223
gethostbyname();
 
5224
#endif
 
5225
 
 
5226
; return 0; }
 
5227
EOF
 
5228
if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5229
  rm -rf conftest*
 
5230
  eval "ac_cv_func_gethostbyname=yes"
 
5231
else
 
5232
  echo "configure: failed program was:" >&5
 
5233
  cat conftest.$ac_ext >&5
 
5234
  rm -rf conftest*
 
5235
  eval "ac_cv_func_gethostbyname=no"
 
5236
fi
 
5237
rm -f conftest*
 
5238
 
 
5239
if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
 
5240
  echo "$ac_t""yes" 1>&6
 
5241
  :
 
5242
else
 
5243
  echo "$ac_t""no" 1>&6
 
5244
fi
 
5245
 
 
5246
    if test $ac_cv_func_gethostbyname = no; then
 
5247
      echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
 
5248
echo "configure:5249: checking for gethostbyname in -lnsl" >&5
 
5249
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
 
5250
 
 
5251
ac_save_LIBS="$LIBS"
 
5252
LIBS="-lnsl  $LIBS"
 
5253
cat > conftest.$ac_ext <<EOF
 
5254
#line 5255 "configure"
 
5255
#include "confdefs.h"
 
5256
/* Override any gcc2 internal prototype to avoid an error.  */
 
5257
/* We use char because int might match the return type of a gcc2
 
5258
    builtin and then its argument prototype would still apply.  */
 
5259
char gethostbyname();
 
5260
 
 
5261
int main() {
 
5262
gethostbyname()
 
5263
; return 0; }
 
5264
EOF
 
5265
if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5266
  rm -rf conftest*
 
5267
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5268
else
 
5269
  echo "configure: failed program was:" >&5
 
5270
  cat conftest.$ac_ext >&5
 
5271
  rm -rf conftest*
 
5272
  eval "ac_cv_lib_$ac_lib_var=no"
 
5273
fi
 
5274
rm -f conftest*
 
5275
LIBS="$ac_save_LIBS"
 
5276
 
 
5277
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5278
  echo "$ac_t""yes" 1>&6
 
5279
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
 
5280
else
 
5281
  echo "$ac_t""no" 1>&6
 
5282
fi
 
5283
 
 
5284
    fi
 
5285
 
 
5286
    # lieder@skyler.mavd.honeywell.com says without -lsocket,
 
5287
    # socket/setsockopt and other routines are undefined under SCO ODT
 
5288
    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
 
5289
    # on later versions), says simon@lia.di.epfl.ch: it contains
 
5290
    # gethostby* variants that don't use the nameserver (or something).
 
5291
    # -lsocket must be given before -lnsl if both are needed.
 
5292
    # We assume that if connect needs -lnsl, so does gethostbyname.
 
5293
    echo $ac_n "checking for connect""... $ac_c" 1>&6
 
5294
echo "configure:5295: checking for connect" >&5
 
5295
 
 
5296
cat > conftest.$ac_ext <<EOF
 
5297
#line 5298 "configure"
 
5298
#include "confdefs.h"
 
5299
/* System header to define __stub macros and hopefully few prototypes,
 
5300
    which can conflict with char connect(); below.  */
 
5301
#include <assert.h>
 
5302
/* Override any gcc2 internal prototype to avoid an error.  */
 
5303
/* We use char because int might match the return type of a gcc2
 
5304
    builtin and then its argument prototype would still apply.  */
 
5305
char connect();
 
5306
 
 
5307
int main() {
 
5308
 
 
5309
/* The GNU C library defines this for functions which it implements
 
5310
    to always fail with ENOSYS.  Some functions are actually named
 
5311
    something starting with __ and the normal name is an alias.  */
 
5312
#if defined (__stub_connect) || defined (__stub___connect)
 
5313
choke me
 
5314
#else
 
5315
connect();
 
5316
#endif
 
5317
 
 
5318
; return 0; }
 
5319
EOF
 
5320
if { (eval echo configure:5321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5321
  rm -rf conftest*
 
5322
  eval "ac_cv_func_connect=yes"
 
5323
else
 
5324
  echo "configure: failed program was:" >&5
 
5325
  cat conftest.$ac_ext >&5
 
5326
  rm -rf conftest*
 
5327
  eval "ac_cv_func_connect=no"
 
5328
fi
 
5329
rm -f conftest*
 
5330
 
 
5331
if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
 
5332
  echo "$ac_t""yes" 1>&6
 
5333
  :
 
5334
else
 
5335
  echo "$ac_t""no" 1>&6
 
5336
fi
 
5337
 
 
5338
    if test $ac_cv_func_connect = no; then
 
5339
      echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
 
5340
echo "configure:5341: checking for connect in -lsocket" >&5
 
5341
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
 
5342
 
 
5343
ac_save_LIBS="$LIBS"
 
5344
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
 
5345
cat > conftest.$ac_ext <<EOF
 
5346
#line 5347 "configure"
 
5347
#include "confdefs.h"
 
5348
/* Override any gcc2 internal prototype to avoid an error.  */
 
5349
/* We use char because int might match the return type of a gcc2
 
5350
    builtin and then its argument prototype would still apply.  */
 
5351
char connect();
 
5352
 
 
5353
int main() {
 
5354
connect()
 
5355
; return 0; }
 
5356
EOF
 
5357
if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5358
  rm -rf conftest*
 
5359
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5360
else
 
5361
  echo "configure: failed program was:" >&5
 
5362
  cat conftest.$ac_ext >&5
 
5363
  rm -rf conftest*
 
5364
  eval "ac_cv_lib_$ac_lib_var=no"
 
5365
fi
 
5366
rm -f conftest*
 
5367
LIBS="$ac_save_LIBS"
 
5368
 
 
5369
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5370
  echo "$ac_t""yes" 1>&6
 
5371
  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
 
5372
else
 
5373
  echo "$ac_t""no" 1>&6
 
5374
fi
 
5375
 
 
5376
    fi
 
5377
 
 
5378
    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
 
5379
    echo $ac_n "checking for remove""... $ac_c" 1>&6
 
5380
echo "configure:5381: checking for remove" >&5
 
5381
 
 
5382
cat > conftest.$ac_ext <<EOF
 
5383
#line 5384 "configure"
 
5384
#include "confdefs.h"
 
5385
/* System header to define __stub macros and hopefully few prototypes,
 
5386
    which can conflict with char remove(); below.  */
 
5387
#include <assert.h>
 
5388
/* Override any gcc2 internal prototype to avoid an error.  */
 
5389
/* We use char because int might match the return type of a gcc2
 
5390
    builtin and then its argument prototype would still apply.  */
 
5391
char remove();
 
5392
 
 
5393
int main() {
 
5394
 
 
5395
/* The GNU C library defines this for functions which it implements
 
5396
    to always fail with ENOSYS.  Some functions are actually named
 
5397
    something starting with __ and the normal name is an alias.  */
 
5398
#if defined (__stub_remove) || defined (__stub___remove)
 
5399
choke me
 
5400
#else
 
5401
remove();
 
5402
#endif
 
5403
 
 
5404
; return 0; }
 
5405
EOF
 
5406
if { (eval echo configure:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5407
  rm -rf conftest*
 
5408
  eval "ac_cv_func_remove=yes"
 
5409
else
 
5410
  echo "configure: failed program was:" >&5
 
5411
  cat conftest.$ac_ext >&5
 
5412
  rm -rf conftest*
 
5413
  eval "ac_cv_func_remove=no"
 
5414
fi
 
5415
rm -f conftest*
 
5416
 
 
5417
if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
 
5418
  echo "$ac_t""yes" 1>&6
 
5419
  :
 
5420
else
 
5421
  echo "$ac_t""no" 1>&6
 
5422
fi
 
5423
 
 
5424
    if test $ac_cv_func_remove = no; then
 
5425
      echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
 
5426
echo "configure:5427: checking for remove in -lposix" >&5
 
5427
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
 
5428
 
 
5429
ac_save_LIBS="$LIBS"
 
5430
LIBS="-lposix  $LIBS"
 
5431
cat > conftest.$ac_ext <<EOF
 
5432
#line 5433 "configure"
 
5433
#include "confdefs.h"
 
5434
/* Override any gcc2 internal prototype to avoid an error.  */
 
5435
/* We use char because int might match the return type of a gcc2
 
5436
    builtin and then its argument prototype would still apply.  */
 
5437
char remove();
 
5438
 
 
5439
int main() {
 
5440
remove()
 
5441
; return 0; }
 
5442
EOF
 
5443
if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5444
  rm -rf conftest*
 
5445
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5446
else
 
5447
  echo "configure: failed program was:" >&5
 
5448
  cat conftest.$ac_ext >&5
 
5449
  rm -rf conftest*
 
5450
  eval "ac_cv_lib_$ac_lib_var=no"
 
5451
fi
 
5452
rm -f conftest*
 
5453
LIBS="$ac_save_LIBS"
 
5454
 
 
5455
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5456
  echo "$ac_t""yes" 1>&6
 
5457
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
 
5458
else
 
5459
  echo "$ac_t""no" 1>&6
 
5460
fi
 
5461
 
 
5462
    fi
 
5463
 
 
5464
    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
 
5465
    echo $ac_n "checking for shmat""... $ac_c" 1>&6
 
5466
echo "configure:5467: checking for shmat" >&5
 
5467
 
 
5468
cat > conftest.$ac_ext <<EOF
 
5469
#line 5470 "configure"
 
5470
#include "confdefs.h"
 
5471
/* System header to define __stub macros and hopefully few prototypes,
 
5472
    which can conflict with char shmat(); below.  */
 
5473
#include <assert.h>
 
5474
/* Override any gcc2 internal prototype to avoid an error.  */
 
5475
/* We use char because int might match the return type of a gcc2
 
5476
    builtin and then its argument prototype would still apply.  */
 
5477
char shmat();
 
5478
 
 
5479
int main() {
 
5480
 
 
5481
/* The GNU C library defines this for functions which it implements
 
5482
    to always fail with ENOSYS.  Some functions are actually named
 
5483
    something starting with __ and the normal name is an alias.  */
 
5484
#if defined (__stub_shmat) || defined (__stub___shmat)
 
5485
choke me
 
5486
#else
 
5487
shmat();
 
5488
#endif
 
5489
 
 
5490
; return 0; }
 
5491
EOF
 
5492
if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5493
  rm -rf conftest*
 
5494
  eval "ac_cv_func_shmat=yes"
 
5495
else
 
5496
  echo "configure: failed program was:" >&5
 
5497
  cat conftest.$ac_ext >&5
 
5498
  rm -rf conftest*
 
5499
  eval "ac_cv_func_shmat=no"
 
5500
fi
 
5501
rm -f conftest*
 
5502
 
 
5503
if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
 
5504
  echo "$ac_t""yes" 1>&6
 
5505
  :
 
5506
else
 
5507
  echo "$ac_t""no" 1>&6
 
5508
fi
 
5509
 
 
5510
    if test $ac_cv_func_shmat = no; then
 
5511
      echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
 
5512
echo "configure:5513: checking for shmat in -lipc" >&5
 
5513
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
 
5514
 
 
5515
ac_save_LIBS="$LIBS"
 
5516
LIBS="-lipc  $LIBS"
 
5517
cat > conftest.$ac_ext <<EOF
 
5518
#line 5519 "configure"
 
5519
#include "confdefs.h"
 
5520
/* Override any gcc2 internal prototype to avoid an error.  */
 
5521
/* We use char because int might match the return type of a gcc2
 
5522
    builtin and then its argument prototype would still apply.  */
 
5523
char shmat();
 
5524
 
 
5525
int main() {
 
5526
shmat()
 
5527
; return 0; }
 
5528
EOF
 
5529
if { (eval echo configure:5530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5530
  rm -rf conftest*
 
5531
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5532
else
 
5533
  echo "configure: failed program was:" >&5
 
5534
  cat conftest.$ac_ext >&5
 
5535
  rm -rf conftest*
 
5536
  eval "ac_cv_lib_$ac_lib_var=no"
 
5537
fi
 
5538
rm -f conftest*
 
5539
LIBS="$ac_save_LIBS"
 
5540
 
 
5541
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5542
  echo "$ac_t""yes" 1>&6
 
5543
  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
 
5544
else
 
5545
  echo "$ac_t""no" 1>&6
 
5546
fi
 
5547
 
 
5548
    fi
 
5549
  fi
 
5550
 
 
5551
  # Check for libraries that X11R6 Xt/Xaw programs need.
 
5552
  ac_save_LDFLAGS="$LDFLAGS"
 
5553
  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
 
5554
  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
 
5555
  # check for ICE first), but we must link in the order -lSM -lICE or
 
5556
  # we get undefined symbols.  So assume we have SM if we have ICE.
 
5557
  # These have to be linked with before -lX11, unlike the other
 
5558
  # libraries we check for below, so use a different variable.
 
5559
  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
 
5560
  echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
 
5561
echo "configure:5562: checking for IceConnectionNumber in -lICE" >&5
 
5562
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
 
5563
 
 
5564
ac_save_LIBS="$LIBS"
 
5565
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
 
5566
cat > conftest.$ac_ext <<EOF
 
5567
#line 5568 "configure"
 
5568
#include "confdefs.h"
 
5569
/* Override any gcc2 internal prototype to avoid an error.  */
 
5570
/* We use char because int might match the return type of a gcc2
 
5571
    builtin and then its argument prototype would still apply.  */
 
5572
char IceConnectionNumber();
 
5573
 
 
5574
int main() {
 
5575
IceConnectionNumber()
 
5576
; return 0; }
 
5577
EOF
 
5578
if { (eval echo configure:5579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5579
  rm -rf conftest*
 
5580
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5581
else
 
5582
  echo "configure: failed program was:" >&5
 
5583
  cat conftest.$ac_ext >&5
 
5584
  rm -rf conftest*
 
5585
  eval "ac_cv_lib_$ac_lib_var=no"
 
5586
fi
 
5587
rm -f conftest*
 
5588
LIBS="$ac_save_LIBS"
 
5589
 
 
5590
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5591
  echo "$ac_t""yes" 1>&6
 
5592
  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
 
5593
else
 
5594
  echo "$ac_t""no" 1>&6
 
5595
fi
 
5596
 
 
5597
  LDFLAGS="$ac_save_LDFLAGS"
 
5598
 
 
5599
fi
 
5600
 
 
5601
    if test "$no_x" != "yes"; then
 
5602
        USE_X11="1"
 
5603
        XLIB=-lX11
 
5604
        XTLIB=-lXt
 
5605
    fi
 
5606
fi
 
5607
 
 
5608
 
 
5609
 
 
5610
 
 
5611
 
 
5612
# Enable Curses option
 
5613
 
 
5614
 
 
5615
echo $ac_n "checking whether to use Curses""... $ac_c" 1>&6
 
5616
echo "configure:5617: checking whether to use Curses" >&5
 
5617
echo "$ac_t"""$with_curses"" 1>&6
 
5618
case "$with_curses" in
 
5619
        "no")   USE_CURSES=     ;;
 
5620
        "yes")  USE_CURSES="1"  ;;
 
5621
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
5622
esac
 
5623
 
 
5624
 
 
5625
 
 
5626
if test -n "$USE_CURSES"; then
 
5627
 
 
5628
 
 
5629
ac_save_cppflags="$CPPFLAGS"
 
5630
CPPFLAGS=" $CPPFLAGS"
 
5631
for ac_hdr in curses.h
 
5632
do
 
5633
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
5634
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
5635
echo "configure:5636: checking for $ac_hdr" >&5
 
5636
 
 
5637
cat > conftest.$ac_ext <<EOF
 
5638
#line 5639 "configure"
 
5639
#include "confdefs.h"
 
5640
#include <$ac_hdr>
 
5641
EOF
 
5642
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
5643
{ (eval echo configure:5644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
5644
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
5645
if test -z "$ac_err"; then
 
5646
  rm -rf conftest*
 
5647
  eval "ac_cv_header_$ac_safe=yes"
 
5648
else
 
5649
  echo "$ac_err" >&5
 
5650
  echo "configure: failed program was:" >&5
 
5651
  cat conftest.$ac_ext >&5
 
5652
  rm -rf conftest*
 
5653
  eval "ac_cv_header_$ac_safe=no"
 
5654
fi
 
5655
rm -f conftest*
 
5656
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
5657
  echo "$ac_t""yes" 1>&6
 
5658
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
5659
  cat >> confdefs.h <<EOF
 
5660
#define $ac_tr_hdr 1
 
5661
EOF
 
5662
 
 
5663
else
 
5664
  echo "$ac_t""no" 1>&6
 
5665
{ echo "configure: error: *** Unable to locate curses includes." 1>&2; exit 1; }
 
5666
 
 
5667
fi
 
5668
done
 
5669
 
 
5670
CPPFLAGS=$ac_save_cppflags
 
5671
 
 
5672
 
 
5673
echo $ac_n "checking curses.h WINDOW structure component""... $ac_c" 1>&6
 
5674
echo "configure:5675: checking curses.h WINDOW structure component" >&5
 
5675
CURSES_MAXY=NONE
 
5676
cat > conftest.$ac_ext <<EOF
 
5677
#line 5678 "configure"
 
5678
#include "confdefs.h"
 
5679
 
 
5680
#include <curses.h>
 
5681
  
 
5682
int main() {
 
5683
WINDOW w; w.maxy = 0;
 
5684
; return 0; }
 
5685
EOF
 
5686
if { (eval echo configure:5687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
5687
  rm -rf conftest*
 
5688
  CURSES_MAXY=maxy
 
5689
else
 
5690
  echo "configure: failed program was:" >&5
 
5691
  cat conftest.$ac_ext >&5
 
5692
fi
 
5693
rm -f conftest*
 
5694
cat > conftest.$ac_ext <<EOF
 
5695
#line 5696 "configure"
 
5696
#include "confdefs.h"
 
5697
 
 
5698
#include <curses.h>
 
5699
  
 
5700
int main() {
 
5701
WINDOW w; w._maxy = 0;
 
5702
; return 0; }
 
5703
EOF
 
5704
if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
5705
  rm -rf conftest*
 
5706
  CURSES_MAXY=_maxy
 
5707
else
 
5708
  echo "configure: failed program was:" >&5
 
5709
  cat conftest.$ac_ext >&5
 
5710
fi
 
5711
rm -f conftest*
 
5712
cat >> confdefs.h <<EOF
 
5713
#define CURSES_MAXY $CURSES_MAXY
 
5714
EOF
 
5715
 
 
5716
 
 
5717
echo "$ac_t""$CURSES_MAXY" 1>&6
 
5718
 
 
5719
echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
 
5720
echo "configure:5721: checking for initscr in -lncurses" >&5
 
5721
ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-%__p_%'`
 
5722
 
 
5723
ac_save_LIBS="$LIBS"
 
5724
LIBS="-lncurses  $LIBS"
 
5725
cat > conftest.$ac_ext <<EOF
 
5726
#line 5727 "configure"
 
5727
#include "confdefs.h"
 
5728
/* Override any gcc2 internal prototype to avoid an error.  */
 
5729
/* We use char because int might match the return type of a gcc2
 
5730
    builtin and then its argument prototype would still apply.  */
 
5731
char initscr();
 
5732
 
 
5733
int main() {
 
5734
initscr()
 
5735
; return 0; }
 
5736
EOF
 
5737
if { (eval echo configure:5738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5738
  rm -rf conftest*
 
5739
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5740
else
 
5741
  echo "configure: failed program was:" >&5
 
5742
  cat conftest.$ac_ext >&5
 
5743
  rm -rf conftest*
 
5744
  eval "ac_cv_lib_$ac_lib_var=no"
 
5745
fi
 
5746
rm -f conftest*
 
5747
LIBS="$ac_save_LIBS"
 
5748
 
 
5749
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5750
  echo "$ac_t""yes" 1>&6
 
5751
  CURSESLIB=-lncurses
 
5752
else
 
5753
  echo "$ac_t""no" 1>&6
 
5754
 
 
5755
echo $ac_n "checking for initscr in -lcurses""... $ac_c" 1>&6
 
5756
echo "configure:5757: checking for initscr in -lcurses" >&5
 
5757
ac_lib_var=`echo curses'_'initscr | sed 'y%./+-%__p_%'`
 
5758
 
 
5759
ac_save_LIBS="$LIBS"
 
5760
LIBS="-lcurses  $LIBS"
 
5761
cat > conftest.$ac_ext <<EOF
 
5762
#line 5763 "configure"
 
5763
#include "confdefs.h"
 
5764
/* Override any gcc2 internal prototype to avoid an error.  */
 
5765
/* We use char because int might match the return type of a gcc2
 
5766
    builtin and then its argument prototype would still apply.  */
 
5767
char initscr();
 
5768
 
 
5769
int main() {
 
5770
initscr()
 
5771
; return 0; }
 
5772
EOF
 
5773
if { (eval echo configure:5774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5774
  rm -rf conftest*
 
5775
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5776
else
 
5777
  echo "configure: failed program was:" >&5
 
5778
  cat conftest.$ac_ext >&5
 
5779
  rm -rf conftest*
 
5780
  eval "ac_cv_lib_$ac_lib_var=no"
 
5781
fi
 
5782
rm -f conftest*
 
5783
LIBS="$ac_save_LIBS"
 
5784
 
 
5785
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5786
  echo "$ac_t""yes" 1>&6
 
5787
  CURSESLIB=-lcurses
 
5788
else
 
5789
  echo "$ac_t""no" 1>&6
 
5790
 
 
5791
    { echo "configure: error: *** Unable to locate curses library." 1>&2; exit 1; }
 
5792
    CURSESLIB=
 
5793
 
 
5794
fi
 
5795
 
 
5796
fi
 
5797
 
 
5798
 
 
5799
 
 
5800
 
 
5801
echo $ac_n "checking for keypad in -lncurses""... $ac_c" 1>&6
 
5802
echo "configure:5803: checking for keypad in -lncurses" >&5
 
5803
ac_lib_var=`echo ncurses'_'keypad | sed 'y%./+-%__p_%'`
 
5804
 
 
5805
ac_save_LIBS="$LIBS"
 
5806
LIBS="-lncurses  $LIBS"
 
5807
cat > conftest.$ac_ext <<EOF
 
5808
#line 5809 "configure"
 
5809
#include "confdefs.h"
 
5810
/* Override any gcc2 internal prototype to avoid an error.  */
 
5811
/* We use char because int might match the return type of a gcc2
 
5812
    builtin and then its argument prototype would still apply.  */
 
5813
char keypad();
 
5814
 
 
5815
int main() {
 
5816
keypad()
 
5817
; return 0; }
 
5818
EOF
 
5819
if { (eval echo configure:5820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5820
  rm -rf conftest*
 
5821
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5822
else
 
5823
  echo "configure: failed program was:" >&5
 
5824
  cat conftest.$ac_ext >&5
 
5825
  rm -rf conftest*
 
5826
  eval "ac_cv_lib_$ac_lib_var=no"
 
5827
fi
 
5828
rm -f conftest*
 
5829
LIBS="$ac_save_LIBS"
 
5830
 
 
5831
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5832
  echo "$ac_t""yes" 1>&6
 
5833
  cat >> confdefs.h <<\EOF
 
5834
#define HAVE_KEYPAD 1
 
5835
EOF
 
5836
 
 
5837
else
 
5838
  echo "$ac_t""no" 1>&6
 
5839
 
 
5840
echo $ac_n "checking for keypad in -lcurses""... $ac_c" 1>&6
 
5841
echo "configure:5842: checking for keypad in -lcurses" >&5
 
5842
ac_lib_var=`echo curses'_'keypad | sed 'y%./+-%__p_%'`
 
5843
 
 
5844
ac_save_LIBS="$LIBS"
 
5845
LIBS="-lcurses  $LIBS"
 
5846
cat > conftest.$ac_ext <<EOF
 
5847
#line 5848 "configure"
 
5848
#include "confdefs.h"
 
5849
/* Override any gcc2 internal prototype to avoid an error.  */
 
5850
/* We use char because int might match the return type of a gcc2
 
5851
    builtin and then its argument prototype would still apply.  */
 
5852
char keypad();
 
5853
 
 
5854
int main() {
 
5855
keypad()
 
5856
; return 0; }
 
5857
EOF
 
5858
if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5859
  rm -rf conftest*
 
5860
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5861
else
 
5862
  echo "configure: failed program was:" >&5
 
5863
  cat conftest.$ac_ext >&5
 
5864
  rm -rf conftest*
 
5865
  eval "ac_cv_lib_$ac_lib_var=no"
 
5866
fi
 
5867
rm -f conftest*
 
5868
LIBS="$ac_save_LIBS"
 
5869
 
 
5870
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5871
  echo "$ac_t""yes" 1>&6
 
5872
  cat >> confdefs.h <<\EOF
 
5873
#define HAVE_KEYPAD 1
 
5874
EOF
 
5875
 
 
5876
else
 
5877
  echo "$ac_t""no" 1>&6
 
5878
 
 
5879
 
 
5880
fi
 
5881
 
 
5882
fi
 
5883
 
 
5884
 
 
5885
fi # $USE_CURSES
 
5886
 
 
5887
echo $ac_n "checking for gtty in -lcompat""... $ac_c" 1>&6
 
5888
echo "configure:5889: checking for gtty in -lcompat" >&5
 
5889
ac_lib_var=`echo compat'_'gtty | sed 'y%./+-%__p_%'`
 
5890
 
 
5891
ac_save_LIBS="$LIBS"
 
5892
LIBS="-lcompat  $LIBS"
 
5893
cat > conftest.$ac_ext <<EOF
 
5894
#line 5895 "configure"
 
5895
#include "confdefs.h"
 
5896
/* Override any gcc2 internal prototype to avoid an error.  */
 
5897
/* We use char because int might match the return type of a gcc2
 
5898
    builtin and then its argument prototype would still apply.  */
 
5899
char gtty();
 
5900
 
 
5901
int main() {
 
5902
gtty()
 
5903
; return 0; }
 
5904
EOF
 
5905
if { (eval echo configure:5906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5906
  rm -rf conftest*
 
5907
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5908
else
 
5909
  echo "configure: failed program was:" >&5
 
5910
  cat conftest.$ac_ext >&5
 
5911
  rm -rf conftest*
 
5912
  eval "ac_cv_lib_$ac_lib_var=no"
 
5913
fi
 
5914
rm -f conftest*
 
5915
LIBS="$ac_save_LIBS"
 
5916
 
 
5917
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5918
  echo "$ac_t""yes" 1>&6
 
5919
  COMPATLIB=-lcompat
 
5920
else
 
5921
  echo "$ac_t""no" 1>&6
 
5922
 
 
5923
echo $ac_n "checking for gtty in -lbsd-compat""... $ac_c" 1>&6
 
5924
echo "configure:5925: checking for gtty in -lbsd-compat" >&5
 
5925
ac_lib_var=`echo bsd-compat'_'gtty | sed 'y%./+-%__p_%'`
 
5926
 
 
5927
ac_save_LIBS="$LIBS"
 
5928
LIBS="-lbsd-compat  $LIBS"
 
5929
cat > conftest.$ac_ext <<EOF
 
5930
#line 5931 "configure"
 
5931
#include "confdefs.h"
 
5932
/* Override any gcc2 internal prototype to avoid an error.  */
 
5933
/* We use char because int might match the return type of a gcc2
 
5934
    builtin and then its argument prototype would still apply.  */
 
5935
char gtty();
 
5936
 
 
5937
int main() {
 
5938
gtty()
 
5939
; return 0; }
 
5940
EOF
 
5941
if { (eval echo configure:5942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5942
  rm -rf conftest*
 
5943
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5944
else
 
5945
  echo "configure: failed program was:" >&5
 
5946
  cat conftest.$ac_ext >&5
 
5947
  rm -rf conftest*
 
5948
  eval "ac_cv_lib_$ac_lib_var=no"
 
5949
fi
 
5950
rm -f conftest*
 
5951
LIBS="$ac_save_LIBS"
 
5952
 
 
5953
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5954
  echo "$ac_t""yes" 1>&6
 
5955
  COMPATLIB=-lbsd-compat
 
5956
else
 
5957
  echo "$ac_t""no" 1>&6
 
5958
 
 
5959
echo $ac_n "checking for gtty in -lbsd""... $ac_c" 1>&6
 
5960
echo "configure:5961: checking for gtty in -lbsd" >&5
 
5961
ac_lib_var=`echo bsd'_'gtty | sed 'y%./+-%__p_%'`
 
5962
 
 
5963
ac_save_LIBS="$LIBS"
 
5964
LIBS="-lbsd  $LIBS"
 
5965
cat > conftest.$ac_ext <<EOF
 
5966
#line 5967 "configure"
 
5967
#include "confdefs.h"
 
5968
/* Override any gcc2 internal prototype to avoid an error.  */
 
5969
/* We use char because int might match the return type of a gcc2
 
5970
    builtin and then its argument prototype would still apply.  */
 
5971
char gtty();
 
5972
 
 
5973
int main() {
 
5974
gtty()
 
5975
; return 0; }
 
5976
EOF
 
5977
if { (eval echo configure:5978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
5978
  rm -rf conftest*
 
5979
  eval "ac_cv_lib_$ac_lib_var=yes"
 
5980
else
 
5981
  echo "configure: failed program was:" >&5
 
5982
  cat conftest.$ac_ext >&5
 
5983
  rm -rf conftest*
 
5984
  eval "ac_cv_lib_$ac_lib_var=no"
 
5985
fi
 
5986
rm -f conftest*
 
5987
LIBS="$ac_save_LIBS"
 
5988
 
 
5989
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
5990
  echo "$ac_t""yes" 1>&6
 
5991
  COMPATLIB=-lbsd
 
5992
else
 
5993
  echo "$ac_t""no" 1>&6
 
5994
 
 
5995
    COMPATLIB=
 
5996
 
 
5997
fi
 
5998
 
 
5999
fi
 
6000
 
 
6001
fi
 
6002
 
 
6003
 
 
6004
 
 
6005
# Note that some systems (FreeBSD for example) need an extra library for
 
6006
# cuserid
 
6007
ac_save_libs="$LIBS"
 
6008
LIBS=""
 
6009
 
 
6010
echo $ac_n "checking for library containing cuserid""... $ac_c" 1>&6
 
6011
echo "configure:6012: checking for library containing cuserid" >&5
 
6012
 
 
6013
ac_func_search_save_LIBS="$LIBS"
 
6014
ac_cv_search_cuserid="no"
 
6015
cat > conftest.$ac_ext <<EOF
 
6016
#line 6017 "configure"
 
6017
#include "confdefs.h"
 
6018
/* Override any gcc2 internal prototype to avoid an error.  */
 
6019
/* We use char because int might match the return type of a gcc2
 
6020
    builtin and then its argument prototype would still apply.  */
 
6021
char cuserid();
 
6022
 
 
6023
int main() {
 
6024
cuserid()
 
6025
; return 0; }
 
6026
EOF
 
6027
if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6028
  rm -rf conftest*
 
6029
  ac_cv_search_cuserid="none required"
 
6030
else
 
6031
  echo "configure: failed program was:" >&5
 
6032
  cat conftest.$ac_ext >&5
 
6033
fi
 
6034
rm -f conftest*
 
6035
test "$ac_cv_search_cuserid" = "no" && for i in compat; do
 
6036
LIBS="-l$i  $ac_func_search_save_LIBS"
 
6037
cat > conftest.$ac_ext <<EOF
 
6038
#line 6039 "configure"
 
6039
#include "confdefs.h"
 
6040
/* Override any gcc2 internal prototype to avoid an error.  */
 
6041
/* We use char because int might match the return type of a gcc2
 
6042
    builtin and then its argument prototype would still apply.  */
 
6043
char cuserid();
 
6044
 
 
6045
int main() {
 
6046
cuserid()
 
6047
; return 0; }
 
6048
EOF
 
6049
if { (eval echo configure:6050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6050
  rm -rf conftest*
 
6051
  ac_cv_search_cuserid="-l$i"
 
6052
break
 
6053
else
 
6054
  echo "configure: failed program was:" >&5
 
6055
  cat conftest.$ac_ext >&5
 
6056
fi
 
6057
rm -f conftest*
 
6058
done
 
6059
LIBS="$ac_func_search_save_LIBS"
 
6060
 
 
6061
echo "$ac_t""$ac_cv_search_cuserid" 1>&6
 
6062
if test "$ac_cv_search_cuserid" != "no"; then
 
6063
  test "$ac_cv_search_cuserid" = "none required" || LIBS="$ac_cv_search_cuserid $LIBS"
 
6064
  
 
6065
else :
 
6066
  
 
6067
fi
 
6068
DBMIEXTRALIB="$LIBS"
 
6069
LIBS="$ac_save_libs"
 
6070
 
 
6071
 
 
6072
# Note: -lxdr -liberty -lws2_32 is for MinGW
 
6073
 
 
6074
echo $ac_n "checking for xdrmem_create""... $ac_c" 1>&6
 
6075
echo "configure:6076: checking for xdrmem_create" >&5
 
6076
 
 
6077
cat > conftest.$ac_ext <<EOF
 
6078
#line 6079 "configure"
 
6079
#include "confdefs.h"
 
6080
/* System header to define __stub macros and hopefully few prototypes,
 
6081
    which can conflict with char xdrmem_create(); below.  */
 
6082
#include <assert.h>
 
6083
/* Override any gcc2 internal prototype to avoid an error.  */
 
6084
/* We use char because int might match the return type of a gcc2
 
6085
    builtin and then its argument prototype would still apply.  */
 
6086
char xdrmem_create();
 
6087
 
 
6088
int main() {
 
6089
 
 
6090
/* The GNU C library defines this for functions which it implements
 
6091
    to always fail with ENOSYS.  Some functions are actually named
 
6092
    something starting with __ and the normal name is an alias.  */
 
6093
#if defined (__stub_xdrmem_create) || defined (__stub___xdrmem_create)
 
6094
choke me
 
6095
#else
 
6096
xdrmem_create();
 
6097
#endif
 
6098
 
 
6099
; return 0; }
 
6100
EOF
 
6101
if { (eval echo configure:6102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6102
  rm -rf conftest*
 
6103
  eval "ac_cv_func_xdrmem_create=yes"
 
6104
else
 
6105
  echo "configure: failed program was:" >&5
 
6106
  cat conftest.$ac_ext >&5
 
6107
  rm -rf conftest*
 
6108
  eval "ac_cv_func_xdrmem_create=no"
 
6109
fi
 
6110
rm -f conftest*
 
6111
 
 
6112
if eval "test \"`echo '$ac_cv_func_'xdrmem_create`\" = yes"; then
 
6113
  echo "$ac_t""yes" 1>&6
 
6114
  XDRLIB=
 
6115
else
 
6116
  echo "$ac_t""no" 1>&6
 
6117
 
 
6118
echo $ac_n "checking for xdrmem_create in -lsun""... $ac_c" 1>&6
 
6119
echo "configure:6120: checking for xdrmem_create in -lsun" >&5
 
6120
ac_lib_var=`echo sun'_'xdrmem_create | sed 'y%./+-%__p_%'`
 
6121
 
 
6122
ac_save_LIBS="$LIBS"
 
6123
LIBS="-lsun  $LIBS"
 
6124
cat > conftest.$ac_ext <<EOF
 
6125
#line 6126 "configure"
 
6126
#include "confdefs.h"
 
6127
/* Override any gcc2 internal prototype to avoid an error.  */
 
6128
/* We use char because int might match the return type of a gcc2
 
6129
    builtin and then its argument prototype would still apply.  */
 
6130
char xdrmem_create();
 
6131
 
 
6132
int main() {
 
6133
xdrmem_create()
 
6134
; return 0; }
 
6135
EOF
 
6136
if { (eval echo configure:6137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6137
  rm -rf conftest*
 
6138
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6139
else
 
6140
  echo "configure: failed program was:" >&5
 
6141
  cat conftest.$ac_ext >&5
 
6142
  rm -rf conftest*
 
6143
  eval "ac_cv_lib_$ac_lib_var=no"
 
6144
fi
 
6145
rm -f conftest*
 
6146
LIBS="$ac_save_LIBS"
 
6147
 
 
6148
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6149
  echo "$ac_t""yes" 1>&6
 
6150
  XDRLIB=-lsun
 
6151
else
 
6152
  echo "$ac_t""no" 1>&6
 
6153
 
 
6154
echo $ac_n "checking for xdrmem_create in -lnsl""... $ac_c" 1>&6
 
6155
echo "configure:6156: checking for xdrmem_create in -lnsl" >&5
 
6156
ac_lib_var=`echo nsl'_'xdrmem_create | sed 'y%./+-%__p_%'`
 
6157
 
 
6158
ac_save_LIBS="$LIBS"
 
6159
LIBS="-lnsl  $LIBS"
 
6160
cat > conftest.$ac_ext <<EOF
 
6161
#line 6162 "configure"
 
6162
#include "confdefs.h"
 
6163
/* Override any gcc2 internal prototype to avoid an error.  */
 
6164
/* We use char because int might match the return type of a gcc2
 
6165
    builtin and then its argument prototype would still apply.  */
 
6166
char xdrmem_create();
 
6167
 
 
6168
int main() {
 
6169
xdrmem_create()
 
6170
; return 0; }
 
6171
EOF
 
6172
if { (eval echo configure:6173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6173
  rm -rf conftest*
 
6174
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6175
else
 
6176
  echo "configure: failed program was:" >&5
 
6177
  cat conftest.$ac_ext >&5
 
6178
  rm -rf conftest*
 
6179
  eval "ac_cv_lib_$ac_lib_var=no"
 
6180
fi
 
6181
rm -f conftest*
 
6182
LIBS="$ac_save_LIBS"
 
6183
 
 
6184
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6185
  echo "$ac_t""yes" 1>&6
 
6186
  XDRLIB=-lnsl
 
6187
else
 
6188
  echo "$ac_t""no" 1>&6
 
6189
 
 
6190
echo $ac_n "checking for xdrmem_create in -lrpclib""... $ac_c" 1>&6
 
6191
echo "configure:6192: checking for xdrmem_create in -lrpclib" >&5
 
6192
ac_lib_var=`echo rpclib'_'xdrmem_create | sed 'y%./+-%__p_%'`
 
6193
 
 
6194
ac_save_LIBS="$LIBS"
 
6195
LIBS="-lrpclib  $LIBS"
 
6196
cat > conftest.$ac_ext <<EOF
 
6197
#line 6198 "configure"
 
6198
#include "confdefs.h"
 
6199
/* Override any gcc2 internal prototype to avoid an error.  */
 
6200
/* We use char because int might match the return type of a gcc2
 
6201
    builtin and then its argument prototype would still apply.  */
 
6202
char xdrmem_create();
 
6203
 
 
6204
int main() {
 
6205
xdrmem_create()
 
6206
; return 0; }
 
6207
EOF
 
6208
if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6209
  rm -rf conftest*
 
6210
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6211
else
 
6212
  echo "configure: failed program was:" >&5
 
6213
  cat conftest.$ac_ext >&5
 
6214
  rm -rf conftest*
 
6215
  eval "ac_cv_lib_$ac_lib_var=no"
 
6216
fi
 
6217
rm -f conftest*
 
6218
LIBS="$ac_save_LIBS"
 
6219
 
 
6220
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6221
  echo "$ac_t""yes" 1>&6
 
6222
  XDRLIB=-lrpclib
 
6223
else
 
6224
  echo "$ac_t""no" 1>&6
 
6225
 
 
6226
echo $ac_n "checking for xdrmem_create in -lxdr""... $ac_c" 1>&6
 
6227
echo "configure:6228: checking for xdrmem_create in -lxdr" >&5
 
6228
ac_lib_var=`echo xdr'_'xdrmem_create | sed 'y%./+-%__p_%'`
 
6229
 
 
6230
ac_save_LIBS="$LIBS"
 
6231
LIBS="-lxdr -liberty -lws2_32  $LIBS"
 
6232
cat > conftest.$ac_ext <<EOF
 
6233
#line 6234 "configure"
 
6234
#include "confdefs.h"
 
6235
/* Override any gcc2 internal prototype to avoid an error.  */
 
6236
/* We use char because int might match the return type of a gcc2
 
6237
    builtin and then its argument prototype would still apply.  */
 
6238
char xdrmem_create();
 
6239
 
 
6240
int main() {
 
6241
xdrmem_create()
 
6242
; return 0; }
 
6243
EOF
 
6244
if { (eval echo configure:6245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6245
  rm -rf conftest*
 
6246
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6247
else
 
6248
  echo "configure: failed program was:" >&5
 
6249
  cat conftest.$ac_ext >&5
 
6250
  rm -rf conftest*
 
6251
  eval "ac_cv_lib_$ac_lib_var=no"
 
6252
fi
 
6253
rm -f conftest*
 
6254
LIBS="$ac_save_LIBS"
 
6255
 
 
6256
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6257
  echo "$ac_t""yes" 1>&6
 
6258
  XDRLIB="-lxdr -liberty -lws2_32" 
 
6259
else
 
6260
  echo "$ac_t""no" 1>&6
 
6261
 { echo "configure: error: *** Unable to locate XDR functions." 1>&2; exit 1; } 
 
6262
fi
 
6263
 
 
6264
 
 
6265
fi
 
6266
 
 
6267
fi
 
6268
 
 
6269
fi
 
6270
 
 
6271
fi
 
6272
 
 
6273
 
 
6274
 
 
6275
for ac_func in asprintf
 
6276
do
 
6277
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 
6278
echo "configure:6279: checking for $ac_func" >&5
 
6279
 
 
6280
cat > conftest.$ac_ext <<EOF
 
6281
#line 6282 "configure"
 
6282
#include "confdefs.h"
 
6283
/* System header to define __stub macros and hopefully few prototypes,
 
6284
    which can conflict with char $ac_func(); below.  */
 
6285
#include <assert.h>
 
6286
/* Override any gcc2 internal prototype to avoid an error.  */
 
6287
/* We use char because int might match the return type of a gcc2
 
6288
    builtin and then its argument prototype would still apply.  */
 
6289
char $ac_func();
 
6290
 
 
6291
int main() {
 
6292
 
 
6293
/* The GNU C library defines this for functions which it implements
 
6294
    to always fail with ENOSYS.  Some functions are actually named
 
6295
    something starting with __ and the normal name is an alias.  */
 
6296
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 
6297
choke me
 
6298
#else
 
6299
$ac_func();
 
6300
#endif
 
6301
 
 
6302
; return 0; }
 
6303
EOF
 
6304
if { (eval echo configure:6305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6305
  rm -rf conftest*
 
6306
  eval "ac_cv_func_$ac_func=yes"
 
6307
else
 
6308
  echo "configure: failed program was:" >&5
 
6309
  cat conftest.$ac_ext >&5
 
6310
  rm -rf conftest*
 
6311
  eval "ac_cv_func_$ac_func=no"
 
6312
fi
 
6313
rm -f conftest*
 
6314
 
 
6315
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
 
6316
  echo "$ac_t""yes" 1>&6
 
6317
    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
 
6318
  cat >> confdefs.h <<EOF
 
6319
#define $ac_tr_func 1
 
6320
EOF
 
6321
 
 
6322
else
 
6323
  echo "$ac_t""no" 1>&6
 
6324
fi
 
6325
done
 
6326
 
 
6327
 
 
6328
 
 
6329
# Test if mathlib needs -lm flag or is included with libc
 
6330
echo $ac_n "checking for atan""... $ac_c" 1>&6
 
6331
echo "configure:6332: checking for atan" >&5
 
6332
 
 
6333
cat > conftest.$ac_ext <<EOF
 
6334
#line 6335 "configure"
 
6335
#include "confdefs.h"
 
6336
/* System header to define __stub macros and hopefully few prototypes,
 
6337
    which can conflict with char atan(); below.  */
 
6338
#include <assert.h>
 
6339
/* Override any gcc2 internal prototype to avoid an error.  */
 
6340
/* We use char because int might match the return type of a gcc2
 
6341
    builtin and then its argument prototype would still apply.  */
 
6342
char atan();
 
6343
 
 
6344
int main() {
 
6345
 
 
6346
/* The GNU C library defines this for functions which it implements
 
6347
    to always fail with ENOSYS.  Some functions are actually named
 
6348
    something starting with __ and the normal name is an alias.  */
 
6349
#if defined (__stub_atan) || defined (__stub___atan)
 
6350
choke me
 
6351
#else
 
6352
atan();
 
6353
#endif
 
6354
 
 
6355
; return 0; }
 
6356
EOF
 
6357
if { (eval echo configure:6358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6358
  rm -rf conftest*
 
6359
  eval "ac_cv_func_atan=yes"
 
6360
else
 
6361
  echo "configure: failed program was:" >&5
 
6362
  cat conftest.$ac_ext >&5
 
6363
  rm -rf conftest*
 
6364
  eval "ac_cv_func_atan=no"
 
6365
fi
 
6366
rm -f conftest*
 
6367
 
 
6368
if eval "test \"`echo '$ac_cv_func_'atan`\" = yes"; then
 
6369
  echo "$ac_t""yes" 1>&6
 
6370
  MATHLIB=
 
6371
else
 
6372
  echo "$ac_t""no" 1>&6
 
6373
 
 
6374
echo $ac_n "checking for atan in -lm""... $ac_c" 1>&6
 
6375
echo "configure:6376: checking for atan in -lm" >&5
 
6376
ac_lib_var=`echo m'_'atan | sed 'y%./+-%__p_%'`
 
6377
 
 
6378
ac_save_LIBS="$LIBS"
 
6379
LIBS="-lm  $LIBS"
 
6380
cat > conftest.$ac_ext <<EOF
 
6381
#line 6382 "configure"
 
6382
#include "confdefs.h"
 
6383
/* Override any gcc2 internal prototype to avoid an error.  */
 
6384
/* We use char because int might match the return type of a gcc2
 
6385
    builtin and then its argument prototype would still apply.  */
 
6386
char atan();
 
6387
 
 
6388
int main() {
 
6389
atan()
 
6390
; return 0; }
 
6391
EOF
 
6392
if { (eval echo configure:6393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6393
  rm -rf conftest*
 
6394
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6395
else
 
6396
  echo "configure: failed program was:" >&5
 
6397
  cat conftest.$ac_ext >&5
 
6398
  rm -rf conftest*
 
6399
  eval "ac_cv_lib_$ac_lib_var=no"
 
6400
fi
 
6401
rm -f conftest*
 
6402
LIBS="$ac_save_LIBS"
 
6403
 
 
6404
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6405
  echo "$ac_t""yes" 1>&6
 
6406
  MATHLIB=-lm
 
6407
else
 
6408
  echo "$ac_t""no" 1>&6
 
6409
 
 
6410
    { echo "configure: error: *** Failed check for math library." 1>&2; exit 1; }
 
6411
 
 
6412
fi
 
6413
 
 
6414
fi
 
6415
 
 
6416
 
 
6417
 
 
6418
echo $ac_n "checking for dlsym""... $ac_c" 1>&6
 
6419
echo "configure:6420: checking for dlsym" >&5
 
6420
 
 
6421
cat > conftest.$ac_ext <<EOF
 
6422
#line 6423 "configure"
 
6423
#include "confdefs.h"
 
6424
/* System header to define __stub macros and hopefully few prototypes,
 
6425
    which can conflict with char dlsym(); below.  */
 
6426
#include <assert.h>
 
6427
/* Override any gcc2 internal prototype to avoid an error.  */
 
6428
/* We use char because int might match the return type of a gcc2
 
6429
    builtin and then its argument prototype would still apply.  */
 
6430
char dlsym();
 
6431
 
 
6432
int main() {
 
6433
 
 
6434
/* The GNU C library defines this for functions which it implements
 
6435
    to always fail with ENOSYS.  Some functions are actually named
 
6436
    something starting with __ and the normal name is an alias.  */
 
6437
#if defined (__stub_dlsym) || defined (__stub___dlsym)
 
6438
choke me
 
6439
#else
 
6440
dlsym();
 
6441
#endif
 
6442
 
 
6443
; return 0; }
 
6444
EOF
 
6445
if { (eval echo configure:6446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6446
  rm -rf conftest*
 
6447
  eval "ac_cv_func_dlsym=yes"
 
6448
else
 
6449
  echo "configure: failed program was:" >&5
 
6450
  cat conftest.$ac_ext >&5
 
6451
  rm -rf conftest*
 
6452
  eval "ac_cv_func_dlsym=no"
 
6453
fi
 
6454
rm -f conftest*
 
6455
 
 
6456
if eval "test \"`echo '$ac_cv_func_'dlsym`\" = yes"; then
 
6457
  echo "$ac_t""yes" 1>&6
 
6458
  DLLIB=
 
6459
else
 
6460
  echo "$ac_t""no" 1>&6
 
6461
 
 
6462
echo $ac_n "checking for dlsym in -ldl""... $ac_c" 1>&6
 
6463
echo "configure:6464: checking for dlsym in -ldl" >&5
 
6464
ac_lib_var=`echo dl'_'dlsym | sed 'y%./+-%__p_%'`
 
6465
 
 
6466
ac_save_LIBS="$LIBS"
 
6467
LIBS="-ldl  $LIBS"
 
6468
cat > conftest.$ac_ext <<EOF
 
6469
#line 6470 "configure"
 
6470
#include "confdefs.h"
 
6471
/* Override any gcc2 internal prototype to avoid an error.  */
 
6472
/* We use char because int might match the return type of a gcc2
 
6473
    builtin and then its argument prototype would still apply.  */
 
6474
char dlsym();
 
6475
 
 
6476
int main() {
 
6477
dlsym()
 
6478
; return 0; }
 
6479
EOF
 
6480
if { (eval echo configure:6481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6481
  rm -rf conftest*
 
6482
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6483
else
 
6484
  echo "configure: failed program was:" >&5
 
6485
  cat conftest.$ac_ext >&5
 
6486
  rm -rf conftest*
 
6487
  eval "ac_cv_lib_$ac_lib_var=no"
 
6488
fi
 
6489
rm -f conftest*
 
6490
LIBS="$ac_save_LIBS"
 
6491
 
 
6492
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6493
  echo "$ac_t""yes" 1>&6
 
6494
  DLLIB=-ldl
 
6495
else
 
6496
  echo "$ac_t""no" 1>&6
 
6497
 
 
6498
    DLLIB=
 
6499
 
 
6500
fi
 
6501
 
 
6502
fi
 
6503
 
 
6504
 
 
6505
 
 
6506
echo $ac_n "checking for iconv""... $ac_c" 1>&6
 
6507
echo "configure:6508: checking for iconv" >&5
 
6508
 
 
6509
cat > conftest.$ac_ext <<EOF
 
6510
#line 6511 "configure"
 
6511
#include "confdefs.h"
 
6512
/* System header to define __stub macros and hopefully few prototypes,
 
6513
    which can conflict with char iconv(); below.  */
 
6514
#include <assert.h>
 
6515
/* Override any gcc2 internal prototype to avoid an error.  */
 
6516
/* We use char because int might match the return type of a gcc2
 
6517
    builtin and then its argument prototype would still apply.  */
 
6518
char iconv();
 
6519
 
 
6520
int main() {
 
6521
 
 
6522
/* The GNU C library defines this for functions which it implements
 
6523
    to always fail with ENOSYS.  Some functions are actually named
 
6524
    something starting with __ and the normal name is an alias.  */
 
6525
#if defined (__stub_iconv) || defined (__stub___iconv)
 
6526
choke me
 
6527
#else
 
6528
iconv();
 
6529
#endif
 
6530
 
 
6531
; return 0; }
 
6532
EOF
 
6533
if { (eval echo configure:6534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6534
  rm -rf conftest*
 
6535
  eval "ac_cv_func_iconv=yes"
 
6536
else
 
6537
  echo "configure: failed program was:" >&5
 
6538
  cat conftest.$ac_ext >&5
 
6539
  rm -rf conftest*
 
6540
  eval "ac_cv_func_iconv=no"
 
6541
fi
 
6542
rm -f conftest*
 
6543
 
 
6544
if eval "test \"`echo '$ac_cv_func_'iconv`\" = yes"; then
 
6545
  echo "$ac_t""yes" 1>&6
 
6546
  ICONVLIB=
 
6547
else
 
6548
  echo "$ac_t""no" 1>&6
 
6549
 
 
6550
echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
 
6551
echo "configure:6552: checking for iconv in -liconv" >&5
 
6552
ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
 
6553
 
 
6554
ac_save_LIBS="$LIBS"
 
6555
LIBS="-liconv  $LIBS"
 
6556
cat > conftest.$ac_ext <<EOF
 
6557
#line 6558 "configure"
 
6558
#include "confdefs.h"
 
6559
/* Override any gcc2 internal prototype to avoid an error.  */
 
6560
/* We use char because int might match the return type of a gcc2
 
6561
    builtin and then its argument prototype would still apply.  */
 
6562
char iconv();
 
6563
 
 
6564
int main() {
 
6565
iconv()
 
6566
; return 0; }
 
6567
EOF
 
6568
if { (eval echo configure:6569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6569
  rm -rf conftest*
 
6570
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6571
else
 
6572
  echo "configure: failed program was:" >&5
 
6573
  cat conftest.$ac_ext >&5
 
6574
  rm -rf conftest*
 
6575
  eval "ac_cv_lib_$ac_lib_var=no"
 
6576
fi
 
6577
rm -f conftest*
 
6578
LIBS="$ac_save_LIBS"
 
6579
 
 
6580
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6581
  echo "$ac_t""yes" 1>&6
 
6582
  ICONVLIB=-liconv
 
6583
else
 
6584
  echo "$ac_t""no" 1>&6
 
6585
 
 
6586
echo $ac_n "checking for iconv in -lgiconv""... $ac_c" 1>&6
 
6587
echo "configure:6588: checking for iconv in -lgiconv" >&5
 
6588
ac_lib_var=`echo giconv'_'iconv | sed 'y%./+-%__p_%'`
 
6589
 
 
6590
ac_save_LIBS="$LIBS"
 
6591
LIBS="-lgiconv  $LIBS"
 
6592
cat > conftest.$ac_ext <<EOF
 
6593
#line 6594 "configure"
 
6594
#include "confdefs.h"
 
6595
/* Override any gcc2 internal prototype to avoid an error.  */
 
6596
/* We use char because int might match the return type of a gcc2
 
6597
    builtin and then its argument prototype would still apply.  */
 
6598
char iconv();
 
6599
 
 
6600
int main() {
 
6601
iconv()
 
6602
; return 0; }
 
6603
EOF
 
6604
if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6605
  rm -rf conftest*
 
6606
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6607
else
 
6608
  echo "configure: failed program was:" >&5
 
6609
  cat conftest.$ac_ext >&5
 
6610
  rm -rf conftest*
 
6611
  eval "ac_cv_lib_$ac_lib_var=no"
 
6612
fi
 
6613
rm -f conftest*
 
6614
LIBS="$ac_save_LIBS"
 
6615
 
 
6616
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6617
  echo "$ac_t""yes" 1>&6
 
6618
  ICONVLIB=-lgiconv
 
6619
else
 
6620
  echo "$ac_t""no" 1>&6
 
6621
 
 
6622
echo $ac_n "checking for libiconv""... $ac_c" 1>&6
 
6623
echo "configure:6624: checking for libiconv" >&5
 
6624
 
 
6625
cat > conftest.$ac_ext <<EOF
 
6626
#line 6627 "configure"
 
6627
#include "confdefs.h"
 
6628
/* System header to define __stub macros and hopefully few prototypes,
 
6629
    which can conflict with char libiconv(); below.  */
 
6630
#include <assert.h>
 
6631
/* Override any gcc2 internal prototype to avoid an error.  */
 
6632
/* We use char because int might match the return type of a gcc2
 
6633
    builtin and then its argument prototype would still apply.  */
 
6634
char libiconv();
 
6635
 
 
6636
int main() {
 
6637
 
 
6638
/* The GNU C library defines this for functions which it implements
 
6639
    to always fail with ENOSYS.  Some functions are actually named
 
6640
    something starting with __ and the normal name is an alias.  */
 
6641
#if defined (__stub_libiconv) || defined (__stub___libiconv)
 
6642
choke me
 
6643
#else
 
6644
libiconv();
 
6645
#endif
 
6646
 
 
6647
; return 0; }
 
6648
EOF
 
6649
if { (eval echo configure:6650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6650
  rm -rf conftest*
 
6651
  eval "ac_cv_func_libiconv=yes"
 
6652
else
 
6653
  echo "configure: failed program was:" >&5
 
6654
  cat conftest.$ac_ext >&5
 
6655
  rm -rf conftest*
 
6656
  eval "ac_cv_func_libiconv=no"
 
6657
fi
 
6658
rm -f conftest*
 
6659
 
 
6660
if eval "test \"`echo '$ac_cv_func_'libiconv`\" = yes"; then
 
6661
  echo "$ac_t""yes" 1>&6
 
6662
  ICONVLIB=
 
6663
else
 
6664
  echo "$ac_t""no" 1>&6
 
6665
 
 
6666
echo $ac_n "checking for libiconv in -liconv""... $ac_c" 1>&6
 
6667
echo "configure:6668: checking for libiconv in -liconv" >&5
 
6668
ac_lib_var=`echo iconv'_'libiconv | sed 'y%./+-%__p_%'`
 
6669
 
 
6670
ac_save_LIBS="$LIBS"
 
6671
LIBS="-liconv  $LIBS"
 
6672
cat > conftest.$ac_ext <<EOF
 
6673
#line 6674 "configure"
 
6674
#include "confdefs.h"
 
6675
/* Override any gcc2 internal prototype to avoid an error.  */
 
6676
/* We use char because int might match the return type of a gcc2
 
6677
    builtin and then its argument prototype would still apply.  */
 
6678
char libiconv();
 
6679
 
 
6680
int main() {
 
6681
libiconv()
 
6682
; return 0; }
 
6683
EOF
 
6684
if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6685
  rm -rf conftest*
 
6686
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6687
else
 
6688
  echo "configure: failed program was:" >&5
 
6689
  cat conftest.$ac_ext >&5
 
6690
  rm -rf conftest*
 
6691
  eval "ac_cv_lib_$ac_lib_var=no"
 
6692
fi
 
6693
rm -f conftest*
 
6694
LIBS="$ac_save_LIBS"
 
6695
 
 
6696
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6697
  echo "$ac_t""yes" 1>&6
 
6698
  ICONVLIB=-liconv
 
6699
else
 
6700
  echo "$ac_t""no" 1>&6
 
6701
 
 
6702
echo $ac_n "checking for libiconv in -lgiconv""... $ac_c" 1>&6
 
6703
echo "configure:6704: checking for libiconv in -lgiconv" >&5
 
6704
ac_lib_var=`echo giconv'_'libiconv | sed 'y%./+-%__p_%'`
 
6705
 
 
6706
ac_save_LIBS="$LIBS"
 
6707
LIBS="-lgiconv  $LIBS"
 
6708
cat > conftest.$ac_ext <<EOF
 
6709
#line 6710 "configure"
 
6710
#include "confdefs.h"
 
6711
/* Override any gcc2 internal prototype to avoid an error.  */
 
6712
/* We use char because int might match the return type of a gcc2
 
6713
    builtin and then its argument prototype would still apply.  */
 
6714
char libiconv();
 
6715
 
 
6716
int main() {
 
6717
libiconv()
 
6718
; return 0; }
 
6719
EOF
 
6720
if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6721
  rm -rf conftest*
 
6722
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6723
else
 
6724
  echo "configure: failed program was:" >&5
 
6725
  cat conftest.$ac_ext >&5
 
6726
  rm -rf conftest*
 
6727
  eval "ac_cv_lib_$ac_lib_var=no"
 
6728
fi
 
6729
rm -f conftest*
 
6730
LIBS="$ac_save_LIBS"
 
6731
 
 
6732
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6733
  echo "$ac_t""yes" 1>&6
 
6734
  ICONVLIB=-lgiconv
 
6735
else
 
6736
  echo "$ac_t""no" 1>&6
 
6737
 
 
6738
    echo "configure: warning: *** Unable to locate iconv() function." 1>&2
 
6739
    ICONVLIB=
 
6740
 
 
6741
fi
 
6742
 
 
6743
fi
 
6744
 
 
6745
fi
 
6746
 
 
6747
fi
 
6748
 
 
6749
fi
 
6750
 
 
6751
fi
 
6752
 
 
6753
 
 
6754
 
 
6755
have_socket=1
 
6756
echo $ac_n "checking for socket""... $ac_c" 1>&6
 
6757
echo "configure:6758: checking for socket" >&5
 
6758
 
 
6759
cat > conftest.$ac_ext <<EOF
 
6760
#line 6761 "configure"
 
6761
#include "confdefs.h"
 
6762
/* System header to define __stub macros and hopefully few prototypes,
 
6763
    which can conflict with char socket(); below.  */
 
6764
#include <assert.h>
 
6765
/* Override any gcc2 internal prototype to avoid an error.  */
 
6766
/* We use char because int might match the return type of a gcc2
 
6767
    builtin and then its argument prototype would still apply.  */
 
6768
char socket();
 
6769
 
 
6770
int main() {
 
6771
 
 
6772
/* The GNU C library defines this for functions which it implements
 
6773
    to always fail with ENOSYS.  Some functions are actually named
 
6774
    something starting with __ and the normal name is an alias.  */
 
6775
#if defined (__stub_socket) || defined (__stub___socket)
 
6776
choke me
 
6777
#else
 
6778
socket();
 
6779
#endif
 
6780
 
 
6781
; return 0; }
 
6782
EOF
 
6783
if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6784
  rm -rf conftest*
 
6785
  eval "ac_cv_func_socket=yes"
 
6786
else
 
6787
  echo "configure: failed program was:" >&5
 
6788
  cat conftest.$ac_ext >&5
 
6789
  rm -rf conftest*
 
6790
  eval "ac_cv_func_socket=no"
 
6791
fi
 
6792
rm -f conftest*
 
6793
 
 
6794
if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
 
6795
  echo "$ac_t""yes" 1>&6
 
6796
  SOCKLIB=
 
6797
else
 
6798
  echo "$ac_t""no" 1>&6
 
6799
 
 
6800
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
 
6801
echo "configure:6802: checking for socket in -lsocket" >&5
 
6802
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
 
6803
 
 
6804
ac_save_LIBS="$LIBS"
 
6805
LIBS="-lsocket  $LIBS"
 
6806
cat > conftest.$ac_ext <<EOF
 
6807
#line 6808 "configure"
 
6808
#include "confdefs.h"
 
6809
/* Override any gcc2 internal prototype to avoid an error.  */
 
6810
/* We use char because int might match the return type of a gcc2
 
6811
    builtin and then its argument prototype would still apply.  */
 
6812
char socket();
 
6813
 
 
6814
int main() {
 
6815
socket()
 
6816
; return 0; }
 
6817
EOF
 
6818
if { (eval echo configure:6819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6819
  rm -rf conftest*
 
6820
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6821
else
 
6822
  echo "configure: failed program was:" >&5
 
6823
  cat conftest.$ac_ext >&5
 
6824
  rm -rf conftest*
 
6825
  eval "ac_cv_lib_$ac_lib_var=no"
 
6826
fi
 
6827
rm -f conftest*
 
6828
LIBS="$ac_save_LIBS"
 
6829
 
 
6830
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6831
  echo "$ac_t""yes" 1>&6
 
6832
  SOCKLIB=-lsocket
 
6833
else
 
6834
  echo "$ac_t""no" 1>&6
 
6835
 
 
6836
    have_socket=0
 
6837
    echo "configure: warning: *** Unable to locate socket() function." 1>&2
 
6838
 
 
6839
fi
 
6840
 
 
6841
fi
 
6842
 
 
6843
 
 
6844
if test "$have_socket" = 1 ; then
 
6845
  HAVE_SOCKET=1
 
6846
  cat >> confdefs.h <<\EOF
 
6847
#define HAVE_SOCKET 1
 
6848
EOF
 
6849
 
 
6850
else
 
6851
  HAVE_SOCKET=
 
6852
fi
 
6853
 
 
6854
 
 
6855
 
 
6856
# Mandatory zlib dependency
 
6857
 
 
6858
ZLIBLIBPATH=
 
6859
ZLIBINCPATH=
 
6860
ZLIB=
 
6861
 
 
6862
# With zlib includes directory
 
6863
 
 
6864
 
 
6865
echo $ac_n "checking for location of zlib includes""... $ac_c" 1>&6
 
6866
echo "configure:6867: checking for location of zlib includes" >&5
 
6867
case "$with_zlib_includes" in
 
6868
y | ye | yes | n | no)
 
6869
        { echo "configure: error: *** You must supply a directory to --with-zlib-includes." 1>&2; exit 1; }
 
6870
        ;;
 
6871
esac
 
6872
echo "$ac_t""$with_zlib_includes" 1>&6
 
6873
 
 
6874
if test -n "$with_zlib_includes" ; then
 
6875
    for dir in $with_zlib_includes; do
 
6876
        if test -d "$dir"; then
 
6877
            ZLIBINCPATH="$ZLIBINCPATH -I$dir"
 
6878
        else
 
6879
            { echo "configure: error: *** zlib includes directory $dir does not exist." 1>&2; exit 1; }
 
6880
        fi
 
6881
    done
 
6882
fi
 
6883
 
 
6884
 
 
6885
 
 
6886
ac_save_cppflags="$CPPFLAGS"
 
6887
CPPFLAGS="$ZLIBINCPATH $CPPFLAGS"
 
6888
for ac_hdr in zlib.h
 
6889
do
 
6890
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
6891
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
6892
echo "configure:6893: checking for $ac_hdr" >&5
 
6893
 
 
6894
cat > conftest.$ac_ext <<EOF
 
6895
#line 6896 "configure"
 
6896
#include "confdefs.h"
 
6897
#include <$ac_hdr>
 
6898
EOF
 
6899
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
6900
{ (eval echo configure:6901: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
6901
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
6902
if test -z "$ac_err"; then
 
6903
  rm -rf conftest*
 
6904
  eval "ac_cv_header_$ac_safe=yes"
 
6905
else
 
6906
  echo "$ac_err" >&5
 
6907
  echo "configure: failed program was:" >&5
 
6908
  cat conftest.$ac_ext >&5
 
6909
  rm -rf conftest*
 
6910
  eval "ac_cv_header_$ac_safe=no"
 
6911
fi
 
6912
rm -f conftest*
 
6913
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
6914
  echo "$ac_t""yes" 1>&6
 
6915
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
6916
  cat >> confdefs.h <<EOF
 
6917
#define $ac_tr_hdr 1
 
6918
EOF
 
6919
 
 
6920
else
 
6921
  echo "$ac_t""no" 1>&6
 
6922
{ echo "configure: error: *** Unable to locate zlib includes." 1>&2; exit 1; }
 
6923
 
 
6924
fi
 
6925
done
 
6926
 
 
6927
CPPFLAGS=$ac_save_cppflags
 
6928
 
 
6929
 
 
6930
# With zlib library directory
 
6931
 
 
6932
 
 
6933
echo $ac_n "checking for location of zlib library""... $ac_c" 1>&6
 
6934
echo "configure:6935: checking for location of zlib library" >&5
 
6935
case "$with_zlib_libs" in
 
6936
y | ye | yes | n | no)
 
6937
        { echo "configure: error: *** You must supply a directory to --with-zlib-libs." 1>&2; exit 1; }
 
6938
        ;;
 
6939
esac
 
6940
echo "$ac_t""$with_zlib_libs" 1>&6
 
6941
 
 
6942
if test -n "$with_zlib_libs"; then
 
6943
    for dir in $with_zlib_libs; do
 
6944
        if test -d "$dir"; then
 
6945
            ZLIBLIBPATH="$ZLIBLIBPATH -L$dir"
 
6946
        else
 
6947
            { echo "configure: error: *** zlib library directory $dir does not exist." 1>&2; exit 1; }
 
6948
        fi
 
6949
    done
 
6950
fi
 
6951
 
 
6952
 
 
6953
 
 
6954
ac_save_ldflags="$LDFLAGS"
 
6955
LDFLAGS="$ZLIBLIBPATH $LDFLAGS"
 
6956
 
 
6957
 
 
6958
echo $ac_n "checking for deflate in -lz""... $ac_c" 1>&6
 
6959
echo "configure:6960: checking for deflate in -lz" >&5
 
6960
ac_lib_var=`echo z'_'deflate | sed 'y%./+-%__p_%'`
 
6961
 
 
6962
ac_save_LIBS="$LIBS"
 
6963
LIBS="-lz  $LIBS"
 
6964
cat > conftest.$ac_ext <<EOF
 
6965
#line 6966 "configure"
 
6966
#include "confdefs.h"
 
6967
/* Override any gcc2 internal prototype to avoid an error.  */
 
6968
/* We use char because int might match the return type of a gcc2
 
6969
    builtin and then its argument prototype would still apply.  */
 
6970
char deflate();
 
6971
 
 
6972
int main() {
 
6973
deflate()
 
6974
; return 0; }
 
6975
EOF
 
6976
if { (eval echo configure:6977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
6977
  rm -rf conftest*
 
6978
  eval "ac_cv_lib_$ac_lib_var=yes"
 
6979
else
 
6980
  echo "configure: failed program was:" >&5
 
6981
  cat conftest.$ac_ext >&5
 
6982
  rm -rf conftest*
 
6983
  eval "ac_cv_lib_$ac_lib_var=no"
 
6984
fi
 
6985
rm -f conftest*
 
6986
LIBS="$ac_save_LIBS"
 
6987
 
 
6988
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
6989
  echo "$ac_t""yes" 1>&6
 
6990
  ZLIB="$ZLIB -lz "
 
6991
else
 
6992
  echo "$ac_t""no" 1>&6
 
6993
 
 
6994
LDFLAGS=${ac_save_ldflags}
 
6995
 
 
6996
    { echo "configure: error: *** Unable to locate zlib library." 1>&2; exit 1; }
 
6997
 
 
6998
 
 
6999
fi
 
7000
 
 
7001
 
 
7002
 
 
7003
LDFLAGS=${ac_save_ldflags}
 
7004
 
 
7005
 
 
7006
#
 
7007
 
 
7008
 
 
7009
 
 
7010
 
 
7011
 
 
7012
# Done checking zlib
 
7013
 
 
7014
# Mandatory PROJ dependency
 
7015
 
 
7016
PROJINC=
 
7017
PROJLIB=
 
7018
PROJSHARE=
 
7019
 
 
7020
# With PROJ includes directory
 
7021
 
 
7022
 
 
7023
echo $ac_n "checking for location of External PROJ.4 includes""... $ac_c" 1>&6
 
7024
echo "configure:7025: checking for location of External PROJ.4 includes" >&5
 
7025
case "$with_proj_includes" in
 
7026
y | ye | yes | n | no)
 
7027
        { echo "configure: error: *** You must supply a directory to --with-proj-includes." 1>&2; exit 1; }
 
7028
        ;;
 
7029
esac
 
7030
echo "$ac_t""$with_proj_includes" 1>&6
 
7031
 
 
7032
if test -n "$with_proj_includes" ; then
 
7033
    for dir in $with_proj_includes; do
 
7034
        if test -d "$dir"; then
 
7035
            PROJINC="$PROJINC -I$dir"
 
7036
        else
 
7037
            { echo "configure: error: *** External PROJ.4 includes directory $dir does not exist." 1>&2; exit 1; }
 
7038
        fi
 
7039
    done
 
7040
fi
 
7041
 
 
7042
 
 
7043
 
 
7044
ac_save_cppflags="$CPPFLAGS"
 
7045
CPPFLAGS="$PROJINC $CPPFLAGS"
 
7046
for ac_hdr in proj_api.h
 
7047
do
 
7048
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
7049
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
7050
echo "configure:7051: checking for $ac_hdr" >&5
 
7051
 
 
7052
cat > conftest.$ac_ext <<EOF
 
7053
#line 7054 "configure"
 
7054
#include "confdefs.h"
 
7055
#include <$ac_hdr>
 
7056
EOF
 
7057
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
7058
{ (eval echo configure:7059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
7059
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
7060
if test -z "$ac_err"; then
 
7061
  rm -rf conftest*
 
7062
  eval "ac_cv_header_$ac_safe=yes"
 
7063
else
 
7064
  echo "$ac_err" >&5
 
7065
  echo "configure: failed program was:" >&5
 
7066
  cat conftest.$ac_ext >&5
 
7067
  rm -rf conftest*
 
7068
  eval "ac_cv_header_$ac_safe=no"
 
7069
fi
 
7070
rm -f conftest*
 
7071
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
7072
  echo "$ac_t""yes" 1>&6
 
7073
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
7074
  cat >> confdefs.h <<EOF
 
7075
#define $ac_tr_hdr 1
 
7076
EOF
 
7077
 
 
7078
else
 
7079
  echo "$ac_t""no" 1>&6
 
7080
{ echo "configure: error: *** Unable to locate External PROJ.4 includes." 1>&2; exit 1; }
 
7081
 
 
7082
fi
 
7083
done
 
7084
 
 
7085
CPPFLAGS=$ac_save_cppflags
 
7086
 
 
7087
 
 
7088
# PROJ version check
 
7089
 
 
7090
if test "$cross_compiling" = yes; then
 
7091
    echo "configure: warning: *** Cannot check PROJ.4 version (cross-compiling)." 1>&2
 
7092
else
 
7093
    
 
7094
echo $ac_n "checking External PROJ.4 version""... $ac_c" 1>&6
 
7095
echo "configure:7096: checking External PROJ.4 version" >&5
 
7096
ac_save_cppflags="$CPPFLAGS"
 
7097
CPPFLAGS="$PROJINC $CPPFLAGS"
 
7098
if test "$cross_compiling" = yes; then
 
7099
     proj_ver=0
 
7100
        echo "$ac_t""unknown (cross-compiling)" 1>&6 
 
7101
else
 
7102
  cat > conftest.$ac_ext <<EOF
 
7103
#line 7104 "configure"
 
7104
#include "confdefs.h"
 
7105
 
 
7106
#include <stdio.h>
 
7107
#include <proj_api.h>
 
7108
int main(void) {
 
7109
 FILE *fp = fopen("conftestdata","w");
 
7110
 fprintf(fp, "%d", PJ_VERSION);
 
7111
 return 0;
 
7112
}
 
7113
    
 
7114
EOF
 
7115
if { (eval echo configure:7116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
7116
then
 
7117
     proj_ver=`cat conftestdata`
 
7118
        echo "$ac_t""$proj_ver" 1>&6
 
7119
else
 
7120
  echo "configure: failed program was:" >&5
 
7121
  cat conftest.$ac_ext >&5
 
7122
  rm -fr conftest*
 
7123
     { echo "configure: error: *** Could not determine External PROJ.4 version." 1>&2; exit 1; } 
 
7124
fi
 
7125
rm -fr conftest*
 
7126
fi
 
7127
 
 
7128
CPPFLAGS=$ac_save_cppflags
 
7129
 
 
7130
 
 
7131
    if test `expr "$proj_ver" \< 446` = 1 ; then
 
7132
        { echo "configure: error: *** PROJ.4.4.6 or later is required." 1>&2; exit 1; }
 
7133
    fi
 
7134
fi
 
7135
 
 
7136
# With PROJ library directory
 
7137
 
 
7138
 
 
7139
echo $ac_n "checking for location of External PROJ.4 library""... $ac_c" 1>&6
 
7140
echo "configure:7141: checking for location of External PROJ.4 library" >&5
 
7141
case "$with_proj_libs" in
 
7142
y | ye | yes | n | no)
 
7143
        { echo "configure: error: *** You must supply a directory to --with-proj-libs." 1>&2; exit 1; }
 
7144
        ;;
 
7145
esac
 
7146
echo "$ac_t""$with_proj_libs" 1>&6
 
7147
 
 
7148
if test -n "$with_proj_libs"; then
 
7149
    for dir in $with_proj_libs; do
 
7150
        if test -d "$dir"; then
 
7151
            PROJLIB="$PROJLIB -L$dir"
 
7152
        else
 
7153
            { echo "configure: error: *** External PROJ.4 library directory $dir does not exist." 1>&2; exit 1; }
 
7154
        fi
 
7155
    done
 
7156
fi
 
7157
 
 
7158
 
 
7159
 
 
7160
ac_save_ldflags="$LDFLAGS"
 
7161
LDFLAGS="$PROJLIB $LDFLAGS"
 
7162
 
 
7163
 
 
7164
echo $ac_n "checking for pj_get_def in -lproj""... $ac_c" 1>&6
 
7165
echo "configure:7166: checking for pj_get_def in -lproj" >&5
 
7166
ac_lib_var=`echo proj'_'pj_get_def | sed 'y%./+-%__p_%'`
 
7167
 
 
7168
ac_save_LIBS="$LIBS"
 
7169
LIBS="-lproj  $LIBS"
 
7170
cat > conftest.$ac_ext <<EOF
 
7171
#line 7172 "configure"
 
7172
#include "confdefs.h"
 
7173
/* Override any gcc2 internal prototype to avoid an error.  */
 
7174
/* We use char because int might match the return type of a gcc2
 
7175
    builtin and then its argument prototype would still apply.  */
 
7176
char pj_get_def();
 
7177
 
 
7178
int main() {
 
7179
pj_get_def()
 
7180
; return 0; }
 
7181
EOF
 
7182
if { (eval echo configure:7183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
7183
  rm -rf conftest*
 
7184
  eval "ac_cv_lib_$ac_lib_var=yes"
 
7185
else
 
7186
  echo "configure: failed program was:" >&5
 
7187
  cat conftest.$ac_ext >&5
 
7188
  rm -rf conftest*
 
7189
  eval "ac_cv_lib_$ac_lib_var=no"
 
7190
fi
 
7191
rm -f conftest*
 
7192
LIBS="$ac_save_LIBS"
 
7193
 
 
7194
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
7195
  echo "$ac_t""yes" 1>&6
 
7196
  PROJLIB="$PROJLIB -lproj "
 
7197
else
 
7198
  echo "$ac_t""no" 1>&6
 
7199
 
 
7200
LDFLAGS=${ac_save_ldflags}
 
7201
 
 
7202
    { echo "configure: error: *** Unable to locate External PROJ.4 library." 1>&2; exit 1; }
 
7203
 
 
7204
 
 
7205
fi
 
7206
 
 
7207
 
 
7208
 
 
7209
LDFLAGS=${ac_save_ldflags}
 
7210
 
 
7211
 
 
7212
# With PROJ share directory
 
7213
 
 
7214
 
 
7215
echo $ac_n "checking for location of External PROJ.4 data files""... $ac_c" 1>&6
 
7216
echo "configure:7217: checking for location of External PROJ.4 data files" >&5
 
7217
case "$with_proj_share" in
 
7218
y | ye | yes | n | no)
 
7219
        { echo "configure: error: *** You must supply a directory to --with-proj-share." 1>&2; exit 1; }
 
7220
        ;;
 
7221
esac
 
7222
echo "$ac_t""$with_proj_share" 1>&6
 
7223
 
 
7224
if test -n "$with_proj_share" ; then
 
7225
    if test -d "$with_proj_share"; then
 
7226
        PROJSHARE="$with_proj_share"
 
7227
    else
 
7228
        { echo "configure: error: *** External PROJ.4 data directory $dir does not exist." 1>&2; exit 1; }
 
7229
    fi
 
7230
fi
 
7231
 
 
7232
if test -z "$PROJSHARE" ; then
 
7233
    echo "configure: warning: *** External PROJ.4 directory not specified; default will be used" 1>&2
 
7234
    PROJSHARE=/usr/local/share/proj
 
7235
fi
 
7236
 
 
7237
# LOC_CHECK_SHARE does not work when cross compiling
 
7238
if test "$cross_compiling" = "yes" ; then
 
7239
    echo $ac_n "checking for epsg""... $ac_c" 1>&6
 
7240
echo "configure:7241: checking for epsg" >&5
 
7241
    echo "$ac_t""unknown (cross-compiling)" 1>&6
 
7242
else
 
7243
    
 
7244
 
 
7245
ac_safe=`echo "$PROJSHARE/epsg" | sed 'y%./+-%__p_%'`
 
7246
echo $ac_n "checking for $PROJSHARE/epsg""... $ac_c" 1>&6
 
7247
echo "configure:7248: checking for $PROJSHARE/epsg" >&5
 
7248
 
 
7249
if test "$cross_compiling" = yes; then
 
7250
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
 
7251
else
 
7252
  if test -r $PROJSHARE/epsg; then
 
7253
    eval "ac_cv_file_$ac_safe=yes"
 
7254
  else
 
7255
    eval "ac_cv_file_$ac_safe=no"
 
7256
  fi
 
7257
fi
 
7258
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
 
7259
  echo "$ac_t""yes" 1>&6
 
7260
  :
 
7261
else
 
7262
  echo "$ac_t""no" 1>&6
 
7263
echo "configure: warning: *** Unable to locate PROJ data files." 1>&2
 
7264
    
 
7265
fi
 
7266
 
 
7267
 
 
7268
fi
 
7269
 
 
7270
 
 
7271
 
 
7272
 
 
7273
 
 
7274
# nad2bin needs to be in path for installing datum gridshift files
 
7275
 
 
7276
# Extract the first word of "nad2bin", so it can be a program name with args.
 
7277
set dummy nad2bin; ac_word=$2
 
7278
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
7279
echo "configure:7280: checking for $ac_word" >&5
 
7280
 
 
7281
case "$NAD2BIN" in
 
7282
  /*)
 
7283
  ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a path.
 
7284
  ;;
 
7285
  ?:/*)                  
 
7286
  ac_cv_path_NAD2BIN="$NAD2BIN" # Let the user override the test with a dos path.
 
7287
  ;;
 
7288
  *)
 
7289
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
7290
  ac_dummy="$PATH"
 
7291
  for ac_dir in $ac_dummy; do 
 
7292
    test -z "$ac_dir" && ac_dir=.
 
7293
    if test -f $ac_dir/$ac_word; then
 
7294
      ac_cv_path_NAD2BIN="$ac_dir/$ac_word"
 
7295
      break
 
7296
    fi
 
7297
  done
 
7298
  IFS="$ac_save_ifs"
 
7299
  test -z "$ac_cv_path_NAD2BIN" && ac_cv_path_NAD2BIN="no"
 
7300
  ;;
 
7301
esac
 
7302
NAD2BIN="$ac_cv_path_NAD2BIN"
 
7303
if test -n "$NAD2BIN"; then
 
7304
  echo "$ac_t""$NAD2BIN" 1>&6
 
7305
else
 
7306
  echo "$ac_t""no" 1>&6
 
7307
fi
 
7308
 
 
7309
if test "$NAD2BIN" = "no"; then
 
7310
    { echo "configure: error: *** Unable to locate nad2bin (needs to be in PATH)." 1>&2; exit 1; }
 
7311
fi
 
7312
 
 
7313
# Done checking PROJ
 
7314
 
 
7315
# Enable regex option
 
7316
 
 
7317
 
 
7318
echo $ac_n "checking whether to use regex""... $ac_c" 1>&6
 
7319
echo "configure:7320: checking whether to use regex" >&5
 
7320
echo "$ac_t"""$with_regex"" 1>&6
 
7321
case "$with_regex" in
 
7322
        "no")   USE_REGEX=      ;;
 
7323
        "yes")  USE_REGEX="1"   ;;
 
7324
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
7325
esac
 
7326
 
 
7327
 
 
7328
 
 
7329
REGEXINCPATH=
 
7330
REGEXLIBPATH=
 
7331
REGEXLIB=
 
7332
 
 
7333
if test -n "$USE_REGEX"; then
 
7334
 
 
7335
# With regex includes directory
 
7336
 
 
7337
 
 
7338
echo $ac_n "checking for location of regex includes""... $ac_c" 1>&6
 
7339
echo "configure:7340: checking for location of regex includes" >&5
 
7340
case "$with_regex_includes" in
 
7341
y | ye | yes | n | no)
 
7342
        { echo "configure: error: *** You must supply a directory to --with-regex-includes." 1>&2; exit 1; }
 
7343
        ;;
 
7344
esac
 
7345
echo "$ac_t""$with_regex_includes" 1>&6
 
7346
 
 
7347
if test -n "$with_regex_includes" ; then
 
7348
    for dir in $with_regex_includes; do
 
7349
        if test -d "$dir"; then
 
7350
            REGEXINCPATH="$REGEXINCPATH -I$dir"
 
7351
        else
 
7352
            { echo "configure: error: *** regex includes directory $dir does not exist." 1>&2; exit 1; }
 
7353
        fi
 
7354
    done
 
7355
fi
 
7356
 
 
7357
 
 
7358
 
 
7359
ac_save_cppflags="$CPPFLAGS"
 
7360
CPPFLAGS="$REGEXINCPATH $CPPFLAGS"
 
7361
for ac_hdr in regex.h
 
7362
do
 
7363
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
7364
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
7365
echo "configure:7366: checking for $ac_hdr" >&5
 
7366
 
 
7367
cat > conftest.$ac_ext <<EOF
 
7368
#line 7369 "configure"
 
7369
#include "confdefs.h"
 
7370
#include <$ac_hdr>
 
7371
EOF
 
7372
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
7373
{ (eval echo configure:7374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
7374
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
7375
if test -z "$ac_err"; then
 
7376
  rm -rf conftest*
 
7377
  eval "ac_cv_header_$ac_safe=yes"
 
7378
else
 
7379
  echo "$ac_err" >&5
 
7380
  echo "configure: failed program was:" >&5
 
7381
  cat conftest.$ac_ext >&5
 
7382
  rm -rf conftest*
 
7383
  eval "ac_cv_header_$ac_safe=no"
 
7384
fi
 
7385
rm -f conftest*
 
7386
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
7387
  echo "$ac_t""yes" 1>&6
 
7388
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
7389
  cat >> confdefs.h <<EOF
 
7390
#define $ac_tr_hdr 1
 
7391
EOF
 
7392
 
 
7393
else
 
7394
  echo "$ac_t""no" 1>&6
 
7395
{ echo "configure: error: *** Unable to locate regex includes." 1>&2; exit 1; }
 
7396
 
 
7397
fi
 
7398
done
 
7399
 
 
7400
CPPFLAGS=$ac_save_cppflags
 
7401
 
 
7402
 
 
7403
# With regex library directory
 
7404
 
 
7405
 
 
7406
echo $ac_n "checking for location of regex library""... $ac_c" 1>&6
 
7407
echo "configure:7408: checking for location of regex library" >&5
 
7408
case "$with_regex_libs" in
 
7409
y | ye | yes | n | no)
 
7410
        { echo "configure: error: *** You must supply a directory to --with-regex-libs." 1>&2; exit 1; }
 
7411
        ;;
 
7412
esac
 
7413
echo "$ac_t""$with_regex_libs" 1>&6
 
7414
 
 
7415
if test -n "$with_regex_libs"; then
 
7416
    for dir in $with_regex_libs; do
 
7417
        if test -d "$dir"; then
 
7418
            REGEXLIBPATH="$REGEXLIBPATH -L$dir"
 
7419
        else
 
7420
            { echo "configure: error: *** regex library directory $dir does not exist." 1>&2; exit 1; }
 
7421
        fi
 
7422
    done
 
7423
fi
 
7424
 
 
7425
 
 
7426
 
 
7427
ac_save_libs="$LIBS"
 
7428
ac_save_ldflags="$LDFLAGS"
 
7429
LIBS="  $LIBS"
 
7430
LDFLAGS=" $LDFLAGS"
 
7431
echo $ac_n "checking for regcomp""... $ac_c" 1>&6
 
7432
echo "configure:7433: checking for regcomp" >&5
 
7433
 
 
7434
cat > conftest.$ac_ext <<EOF
 
7435
#line 7436 "configure"
 
7436
#include "confdefs.h"
 
7437
/* System header to define __stub macros and hopefully few prototypes,
 
7438
    which can conflict with char regcomp(); below.  */
 
7439
#include <assert.h>
 
7440
/* Override any gcc2 internal prototype to avoid an error.  */
 
7441
/* We use char because int might match the return type of a gcc2
 
7442
    builtin and then its argument prototype would still apply.  */
 
7443
char regcomp();
 
7444
 
 
7445
int main() {
 
7446
 
 
7447
/* The GNU C library defines this for functions which it implements
 
7448
    to always fail with ENOSYS.  Some functions are actually named
 
7449
    something starting with __ and the normal name is an alias.  */
 
7450
#if defined (__stub_regcomp) || defined (__stub___regcomp)
 
7451
choke me
 
7452
#else
 
7453
regcomp();
 
7454
#endif
 
7455
 
 
7456
; return 0; }
 
7457
EOF
 
7458
if { (eval echo configure:7459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
7459
  rm -rf conftest*
 
7460
  eval "ac_cv_func_regcomp=yes"
 
7461
else
 
7462
  echo "configure: failed program was:" >&5
 
7463
  cat conftest.$ac_ext >&5
 
7464
  rm -rf conftest*
 
7465
  eval "ac_cv_func_regcomp=no"
 
7466
fi
 
7467
rm -f conftest*
 
7468
 
 
7469
if eval "test \"`echo '$ac_cv_func_'regcomp`\" = yes"; then
 
7470
  echo "$ac_t""yes" 1>&6
 
7471
  
 
7472
 
 
7473
    REGEXLIB="$REGEXLIB "
 
7474
 
 
7475
 
 
7476
else
 
7477
  echo "$ac_t""no" 1>&6
 
7478
 
 
7479
 
 
7480
ac_save_ldflags="$LDFLAGS"
 
7481
LDFLAGS="$REGEXLIBPATH $LDFLAGS"
 
7482
 
 
7483
 
 
7484
echo $ac_n "checking for regcomp in -lregex""... $ac_c" 1>&6
 
7485
echo "configure:7486: checking for regcomp in -lregex" >&5
 
7486
ac_lib_var=`echo regex'_'regcomp | sed 'y%./+-%__p_%'`
 
7487
 
 
7488
ac_save_LIBS="$LIBS"
 
7489
LIBS="-lregex  $LIBS"
 
7490
cat > conftest.$ac_ext <<EOF
 
7491
#line 7492 "configure"
 
7492
#include "confdefs.h"
 
7493
/* Override any gcc2 internal prototype to avoid an error.  */
 
7494
/* We use char because int might match the return type of a gcc2
 
7495
    builtin and then its argument prototype would still apply.  */
 
7496
char regcomp();
 
7497
 
 
7498
int main() {
 
7499
regcomp()
 
7500
; return 0; }
 
7501
EOF
 
7502
if { (eval echo configure:7503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
7503
  rm -rf conftest*
 
7504
  eval "ac_cv_lib_$ac_lib_var=yes"
 
7505
else
 
7506
  echo "configure: failed program was:" >&5
 
7507
  cat conftest.$ac_ext >&5
 
7508
  rm -rf conftest*
 
7509
  eval "ac_cv_lib_$ac_lib_var=no"
 
7510
fi
 
7511
rm -f conftest*
 
7512
LIBS="$ac_save_LIBS"
 
7513
 
 
7514
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
7515
  echo "$ac_t""yes" 1>&6
 
7516
  REGEXLIB="$REGEXLIB -lregex "
 
7517
else
 
7518
  echo "$ac_t""no" 1>&6
 
7519
 
 
7520
LDFLAGS=${ac_save_ldflags}
 
7521
 
 
7522
    { echo "configure: error: *** Unable to locate regex library." 1>&2; exit 1; }
 
7523
 
 
7524
 
 
7525
fi
 
7526
 
 
7527
 
 
7528
 
 
7529
LDFLAGS=${ac_save_ldflags}
 
7530
 
 
7531
 
 
7532
 
 
7533
fi
 
7534
 
 
7535
LIBS=${ac_save_libs}
 
7536
LDFLAGS=${ac_save_ldflags}
 
7537
 
 
7538
 
 
7539
fi # $USE_REGEX
 
7540
 
 
7541
 
 
7542
 
 
7543
 
 
7544
 
 
7545
 
 
7546
# Done checking regex
 
7547
 
 
7548
# Enable Readline option
 
7549
 
 
7550
 
 
7551
echo $ac_n "checking whether to use Readline""... $ac_c" 1>&6
 
7552
echo "configure:7553: checking whether to use Readline" >&5
 
7553
echo "$ac_t"""$with_readline"" 1>&6
 
7554
case "$with_readline" in
 
7555
        "no")   USE_READLINE=   ;;
 
7556
        "yes")  USE_READLINE="1"        ;;
 
7557
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
7558
esac
 
7559
 
 
7560
 
 
7561
 
 
7562
READLINEINCPATH=
 
7563
READLINELIBPATH=
 
7564
READLINELIB=
 
7565
HISTORYLIB=
 
7566
 
 
7567
if test -n "$USE_READLINE"; then
 
7568
 
 
7569
# With Readline includes directory
 
7570
 
 
7571
 
 
7572
echo $ac_n "checking for location of Readline includes""... $ac_c" 1>&6
 
7573
echo "configure:7574: checking for location of Readline includes" >&5
 
7574
case "$with_readline_includes" in
 
7575
y | ye | yes | n | no)
 
7576
        { echo "configure: error: *** You must supply a directory to --with-readline-includes." 1>&2; exit 1; }
 
7577
        ;;
 
7578
esac
 
7579
echo "$ac_t""$with_readline_includes" 1>&6
 
7580
 
 
7581
if test -n "$with_readline_includes" ; then
 
7582
    for dir in $with_readline_includes; do
 
7583
        if test -d "$dir"; then
 
7584
            READLINEINCPATH="$READLINEINCPATH -I$dir"
 
7585
        else
 
7586
            { echo "configure: error: *** Readline includes directory $dir does not exist." 1>&2; exit 1; }
 
7587
        fi
 
7588
    done
 
7589
fi
 
7590
 
 
7591
 
 
7592
 
 
7593
ac_save_cppflags="$CPPFLAGS"
 
7594
CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
 
7595
for ac_hdr in readline/readline.h
 
7596
do
 
7597
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
7598
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
7599
echo "configure:7600: checking for $ac_hdr" >&5
 
7600
 
 
7601
cat > conftest.$ac_ext <<EOF
 
7602
#line 7603 "configure"
 
7603
#include "confdefs.h"
 
7604
#include <$ac_hdr>
 
7605
EOF
 
7606
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
7607
{ (eval echo configure:7608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
7608
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
7609
if test -z "$ac_err"; then
 
7610
  rm -rf conftest*
 
7611
  eval "ac_cv_header_$ac_safe=yes"
 
7612
else
 
7613
  echo "$ac_err" >&5
 
7614
  echo "configure: failed program was:" >&5
 
7615
  cat conftest.$ac_ext >&5
 
7616
  rm -rf conftest*
 
7617
  eval "ac_cv_header_$ac_safe=no"
 
7618
fi
 
7619
rm -f conftest*
 
7620
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
7621
  echo "$ac_t""yes" 1>&6
 
7622
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
7623
  cat >> confdefs.h <<EOF
 
7624
#define $ac_tr_hdr 1
 
7625
EOF
 
7626
 
 
7627
else
 
7628
  echo "$ac_t""no" 1>&6
 
7629
{ echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
 
7630
 
 
7631
fi
 
7632
done
 
7633
 
 
7634
CPPFLAGS=$ac_save_cppflags
 
7635
 
 
7636
 
 
7637
ac_save_cppflags="$CPPFLAGS"
 
7638
CPPFLAGS="$READLINEINCPATH $CPPFLAGS"
 
7639
for ac_hdr in readline/history.h
 
7640
do
 
7641
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
7642
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
7643
echo "configure:7644: checking for $ac_hdr" >&5
 
7644
 
 
7645
cat > conftest.$ac_ext <<EOF
 
7646
#line 7647 "configure"
 
7647
#include "confdefs.h"
 
7648
#include <$ac_hdr>
 
7649
EOF
 
7650
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
7651
{ (eval echo configure:7652: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
7652
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
7653
if test -z "$ac_err"; then
 
7654
  rm -rf conftest*
 
7655
  eval "ac_cv_header_$ac_safe=yes"
 
7656
else
 
7657
  echo "$ac_err" >&5
 
7658
  echo "configure: failed program was:" >&5
 
7659
  cat conftest.$ac_ext >&5
 
7660
  rm -rf conftest*
 
7661
  eval "ac_cv_header_$ac_safe=no"
 
7662
fi
 
7663
rm -f conftest*
 
7664
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
7665
  echo "$ac_t""yes" 1>&6
 
7666
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
7667
  cat >> confdefs.h <<EOF
 
7668
#define $ac_tr_hdr 1
 
7669
EOF
 
7670
 
 
7671
else
 
7672
  echo "$ac_t""no" 1>&6
 
7673
{ echo "configure: error: *** Unable to locate Readline includes." 1>&2; exit 1; }
 
7674
 
 
7675
fi
 
7676
done
 
7677
 
 
7678
CPPFLAGS=$ac_save_cppflags
 
7679
 
 
7680
 
 
7681
# With Readline library directory
 
7682
 
 
7683
 
 
7684
echo $ac_n "checking for location of Readline library""... $ac_c" 1>&6
 
7685
echo "configure:7686: checking for location of Readline library" >&5
 
7686
case "$with_readline_libs" in
 
7687
y | ye | yes | n | no)
 
7688
        { echo "configure: error: *** You must supply a directory to --with-readline-libs." 1>&2; exit 1; }
 
7689
        ;;
 
7690
esac
 
7691
echo "$ac_t""$with_readline_libs" 1>&6
 
7692
 
 
7693
if test -n "$with_readline_libs"; then
 
7694
    for dir in $with_readline_libs; do
 
7695
        if test -d "$dir"; then
 
7696
            READLINELIBPATH="$READLINELIBPATH -L$dir"
 
7697
        else
 
7698
            { echo "configure: error: *** Readline library directory $dir does not exist." 1>&2; exit 1; }
 
7699
        fi
 
7700
    done
 
7701
fi
 
7702
 
 
7703
 
 
7704
 
 
7705
ac_save_ldflags="$LDFLAGS"
 
7706
LDFLAGS="$READLINELIBPATH $LDFLAGS"
 
7707
 
 
7708
 
 
7709
echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
 
7710
echo "configure:7711: checking for readline in -lreadline" >&5
 
7711
ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
 
7712
 
 
7713
ac_save_LIBS="$LIBS"
 
7714
LIBS="-lreadline  $LIBS"
 
7715
cat > conftest.$ac_ext <<EOF
 
7716
#line 7717 "configure"
 
7717
#include "confdefs.h"
 
7718
/* Override any gcc2 internal prototype to avoid an error.  */
 
7719
/* We use char because int might match the return type of a gcc2
 
7720
    builtin and then its argument prototype would still apply.  */
 
7721
char readline();
 
7722
 
 
7723
int main() {
 
7724
readline()
 
7725
; return 0; }
 
7726
EOF
 
7727
if { (eval echo configure:7728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
7728
  rm -rf conftest*
 
7729
  eval "ac_cv_lib_$ac_lib_var=yes"
 
7730
else
 
7731
  echo "configure: failed program was:" >&5
 
7732
  cat conftest.$ac_ext >&5
 
7733
  rm -rf conftest*
 
7734
  eval "ac_cv_lib_$ac_lib_var=no"
 
7735
fi
 
7736
rm -f conftest*
 
7737
LIBS="$ac_save_LIBS"
 
7738
 
 
7739
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
7740
  echo "$ac_t""yes" 1>&6
 
7741
  READLINELIB="$READLINELIB -lreadline "
 
7742
else
 
7743
  echo "$ac_t""no" 1>&6
 
7744
 
 
7745
LDFLAGS=${ac_save_ldflags}
 
7746
 
 
7747
    { echo "configure: error: *** Unable to locate Readline library." 1>&2; exit 1; }
 
7748
 
 
7749
 
 
7750
fi
 
7751
 
 
7752
 
 
7753
 
 
7754
LDFLAGS=${ac_save_ldflags}
 
7755
 
 
7756
 
 
7757
ac_save_ldflags="$LDFLAGS"
 
7758
LDFLAGS="$READLINELIBPATH $LDFLAGS"
 
7759
 
 
7760
 
 
7761
echo $ac_n "checking for add_history in -lhistory""... $ac_c" 1>&6
 
7762
echo "configure:7763: checking for add_history in -lhistory" >&5
 
7763
ac_lib_var=`echo history'_'add_history | sed 'y%./+-%__p_%'`
 
7764
 
 
7765
ac_save_LIBS="$LIBS"
 
7766
LIBS="-lhistory  $LIBS"
 
7767
cat > conftest.$ac_ext <<EOF
 
7768
#line 7769 "configure"
 
7769
#include "confdefs.h"
 
7770
/* Override any gcc2 internal prototype to avoid an error.  */
 
7771
/* We use char because int might match the return type of a gcc2
 
7772
    builtin and then its argument prototype would still apply.  */
 
7773
char add_history();
 
7774
 
 
7775
int main() {
 
7776
add_history()
 
7777
; return 0; }
 
7778
EOF
 
7779
if { (eval echo configure:7780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
7780
  rm -rf conftest*
 
7781
  eval "ac_cv_lib_$ac_lib_var=yes"
 
7782
else
 
7783
  echo "configure: failed program was:" >&5
 
7784
  cat conftest.$ac_ext >&5
 
7785
  rm -rf conftest*
 
7786
  eval "ac_cv_lib_$ac_lib_var=no"
 
7787
fi
 
7788
rm -f conftest*
 
7789
LIBS="$ac_save_LIBS"
 
7790
 
 
7791
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
7792
  echo "$ac_t""yes" 1>&6
 
7793
  HISTORYLIB="$HISTORYLIB -lhistory "
 
7794
else
 
7795
  echo "$ac_t""no" 1>&6
 
7796
 
 
7797
LDFLAGS=${ac_save_ldflags}
 
7798
 
 
7799
    { echo "configure: error: *** Unable to locate History library." 1>&2; exit 1; }
 
7800
 
 
7801
 
 
7802
fi
 
7803
 
 
7804
 
 
7805
 
 
7806
LDFLAGS=${ac_save_ldflags}
 
7807
 
 
7808
 
 
7809
fi # $USE_READLINE
 
7810
 
 
7811
 
 
7812
 
 
7813
 
 
7814
 
 
7815
 
 
7816
# Done checking Readline
 
7817
 
 
7818
# Enable JPEG option
 
7819
 
 
7820
 
 
7821
echo $ac_n "checking whether to use JPEG""... $ac_c" 1>&6
 
7822
echo "configure:7823: checking whether to use JPEG" >&5
 
7823
echo "$ac_t"""$with_jpeg"" 1>&6
 
7824
case "$with_jpeg" in
 
7825
        "no")   USE_JPEG=       ;;
 
7826
        "yes")  USE_JPEG="1"    ;;
 
7827
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
7828
esac
 
7829
 
 
7830
 
 
7831
 
 
7832
JPEGINCPATH=
 
7833
JPEGLIBPATH=
 
7834
JPEGLIB=
 
7835
 
 
7836
if test -n "$USE_JPEG"; then
 
7837
 
 
7838
# With JPEG includes directory
 
7839
 
 
7840
 
 
7841
echo $ac_n "checking for location of JPEG includes""... $ac_c" 1>&6
 
7842
echo "configure:7843: checking for location of JPEG includes" >&5
 
7843
case "$with_jpeg_includes" in
 
7844
y | ye | yes | n | no)
 
7845
        { echo "configure: error: *** You must supply a directory to --with-jpeg-includes." 1>&2; exit 1; }
 
7846
        ;;
 
7847
esac
 
7848
echo "$ac_t""$with_jpeg_includes" 1>&6
 
7849
 
 
7850
if test -n "$with_jpeg_includes" ; then
 
7851
    for dir in $with_jpeg_includes; do
 
7852
        if test -d "$dir"; then
 
7853
            JPEGINCPATH="$JPEGINCPATH -I$dir"
 
7854
        else
 
7855
            { echo "configure: error: *** JPEG includes directory $dir does not exist." 1>&2; exit 1; }
 
7856
        fi
 
7857
    done
 
7858
fi
 
7859
 
 
7860
 
 
7861
 
 
7862
ac_save_cppflags="$CPPFLAGS"
 
7863
CPPFLAGS="$JPEGINCPATH $CPPFLAGS"
 
7864
for ac_hdr in jpeglib.h
 
7865
do
 
7866
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
7867
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
7868
echo "configure:7869: checking for $ac_hdr" >&5
 
7869
 
 
7870
cat > conftest.$ac_ext <<EOF
 
7871
#line 7872 "configure"
 
7872
#include "confdefs.h"
 
7873
#include <$ac_hdr>
 
7874
EOF
 
7875
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
7876
{ (eval echo configure:7877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
7877
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
7878
if test -z "$ac_err"; then
 
7879
  rm -rf conftest*
 
7880
  eval "ac_cv_header_$ac_safe=yes"
 
7881
else
 
7882
  echo "$ac_err" >&5
 
7883
  echo "configure: failed program was:" >&5
 
7884
  cat conftest.$ac_ext >&5
 
7885
  rm -rf conftest*
 
7886
  eval "ac_cv_header_$ac_safe=no"
 
7887
fi
 
7888
rm -f conftest*
 
7889
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
7890
  echo "$ac_t""yes" 1>&6
 
7891
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
7892
  cat >> confdefs.h <<EOF
 
7893
#define $ac_tr_hdr 1
 
7894
EOF
 
7895
 
 
7896
else
 
7897
  echo "$ac_t""no" 1>&6
 
7898
{ echo "configure: error: *** Unable to locate JPEG includes." 1>&2; exit 1; }
 
7899
 
 
7900
fi
 
7901
done
 
7902
 
 
7903
CPPFLAGS=$ac_save_cppflags
 
7904
 
 
7905
 
 
7906
# With JPEG library directory
 
7907
 
 
7908
 
 
7909
echo $ac_n "checking for location of JPEG library""... $ac_c" 1>&6
 
7910
echo "configure:7911: checking for location of JPEG library" >&5
 
7911
case "$with_jpeg_libs" in
 
7912
y | ye | yes | n | no)
 
7913
        { echo "configure: error: *** You must supply a directory to --with-jpeg-libs." 1>&2; exit 1; }
 
7914
        ;;
 
7915
esac
 
7916
echo "$ac_t""$with_jpeg_libs" 1>&6
 
7917
 
 
7918
if test -n "$with_jpeg_libs"; then
 
7919
    for dir in $with_jpeg_libs; do
 
7920
        if test -d "$dir"; then
 
7921
            JPEGLIBPATH="$JPEGLIBPATH -L$dir"
 
7922
        else
 
7923
            { echo "configure: error: *** JPEG library directory $dir does not exist." 1>&2; exit 1; }
 
7924
        fi
 
7925
    done
 
7926
fi
 
7927
 
 
7928
 
 
7929
 
 
7930
ac_save_ldflags="$LDFLAGS"
 
7931
LDFLAGS="$JPEGLIBPATH $LDFLAGS"
 
7932
 
 
7933
 
 
7934
 
 
7935
 
 
7936
echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
 
7937
echo "configure:7938: checking for jpeg_start_compress in -ljpeg" >&5
 
7938
ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
 
7939
 
 
7940
ac_save_LIBS="$LIBS"
 
7941
LIBS="-ljpeg  $LIBS"
 
7942
cat > conftest.$ac_ext <<EOF
 
7943
#line 7944 "configure"
 
7944
#include "confdefs.h"
 
7945
/* Override any gcc2 internal prototype to avoid an error.  */
 
7946
/* We use char because int might match the return type of a gcc2
 
7947
    builtin and then its argument prototype would still apply.  */
 
7948
char jpeg_start_compress();
 
7949
 
 
7950
int main() {
 
7951
jpeg_start_compress()
 
7952
; return 0; }
 
7953
EOF
 
7954
if { (eval echo configure:7955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
7955
  rm -rf conftest*
 
7956
  eval "ac_cv_lib_$ac_lib_var=yes"
 
7957
else
 
7958
  echo "configure: failed program was:" >&5
 
7959
  cat conftest.$ac_ext >&5
 
7960
  rm -rf conftest*
 
7961
  eval "ac_cv_lib_$ac_lib_var=no"
 
7962
fi
 
7963
rm -f conftest*
 
7964
LIBS="$ac_save_LIBS"
 
7965
 
 
7966
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
7967
  echo "$ac_t""yes" 1>&6
 
7968
  JPEGLIB="$JPEGLIB -ljpeg "
 
7969
else
 
7970
  echo "$ac_t""no" 1>&6
 
7971
 
 
7972
echo $ac_n "checking for jpeg_start_compress in -ljpeg""... $ac_c" 1>&6
 
7973
echo "configure:7974: checking for jpeg_start_compress in -ljpeg" >&5
 
7974
ac_lib_var=`echo jpeg'_'jpeg_start_compress | sed 'y%./+-%__p_%'`
 
7975
 
 
7976
ac_save_LIBS="$LIBS"
 
7977
LIBS="-ljpeg $ZLIB $LIBS"
 
7978
cat > conftest.$ac_ext <<EOF
 
7979
#line 7980 "configure"
 
7980
#include "confdefs.h"
 
7981
/* Override any gcc2 internal prototype to avoid an error.  */
 
7982
/* We use char because int might match the return type of a gcc2
 
7983
    builtin and then its argument prototype would still apply.  */
 
7984
char jpeg_start_compress();
 
7985
 
 
7986
int main() {
 
7987
jpeg_start_compress()
 
7988
; return 0; }
 
7989
EOF
 
7990
if { (eval echo configure:7991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
7991
  rm -rf conftest*
 
7992
  eval "ac_cv_lib_$ac_lib_var=yes"
 
7993
else
 
7994
  echo "configure: failed program was:" >&5
 
7995
  cat conftest.$ac_ext >&5
 
7996
  rm -rf conftest*
 
7997
  eval "ac_cv_lib_$ac_lib_var=no"
 
7998
fi
 
7999
rm -f conftest*
 
8000
LIBS="$ac_save_LIBS"
 
8001
 
 
8002
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8003
  echo "$ac_t""yes" 1>&6
 
8004
  JPEGLIB="$JPEGLIB -ljpeg $ZLIB"
 
8005
else
 
8006
  echo "$ac_t""no" 1>&6
 
8007
 
 
8008
LDFLAGS=${ac_save_ldflags}
 
8009
 
 
8010
    { echo "configure: error: *** Unable to locate JPEG library." 1>&2; exit 1; }
 
8011
 
 
8012
 
 
8013
fi
 
8014
 
 
8015
 
 
8016
 
 
8017
 
 
8018
fi
 
8019
 
 
8020
 
 
8021
 
 
8022
 
 
8023
 
 
8024
 
 
8025
LDFLAGS=${ac_save_ldflags}
 
8026
 
 
8027
 
 
8028
fi # $USE_JPEG
 
8029
 
 
8030
 
 
8031
 
 
8032
 
 
8033
 
 
8034
# Done checking JPEG
 
8035
 
 
8036
# GDAL option
 
8037
 
 
8038
echo $ac_n "checking whether to use GDAL""... $ac_c" 1>&6
 
8039
echo "configure:8040: checking whether to use GDAL" >&5
 
8040
 
 
8041
GDAL_LIBS=
 
8042
GDAL_CFLAGS=
 
8043
USE_GDAL=
 
8044
USE_OGR=
 
8045
 
 
8046
if test "`basename xx/$with_gdal`" = "gdal-config" ; then
 
8047
  GDAL_CONFIG="$with_gdal"
 
8048
fi
 
8049
 
 
8050
if test "$with_gdal" = "no" ; then
 
8051
  echo "$ac_t""no" 1>&6
 
8052
else
 
8053
  echo "$ac_t""yes" 1>&6
 
8054
  # Extract the first word of "gdal-config", so it can be a program name with args.
 
8055
set dummy gdal-config; ac_word=$2
 
8056
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
8057
echo "configure:8058: checking for $ac_word" >&5
 
8058
 
 
8059
case "$GDAL_CONFIG" in
 
8060
  /*)
 
8061
  ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a path.
 
8062
  ;;
 
8063
  ?:/*)                  
 
8064
  ac_cv_path_GDAL_CONFIG="$GDAL_CONFIG" # Let the user override the test with a dos path.
 
8065
  ;;
 
8066
  *)
 
8067
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
8068
  ac_dummy="$PATH"
 
8069
  for ac_dir in $ac_dummy; do 
 
8070
    test -z "$ac_dir" && ac_dir=.
 
8071
    if test -f $ac_dir/$ac_word; then
 
8072
      ac_cv_path_GDAL_CONFIG="$ac_dir/$ac_word"
 
8073
      break
 
8074
    fi
 
8075
  done
 
8076
  IFS="$ac_save_ifs"
 
8077
  test -z "$ac_cv_path_GDAL_CONFIG" && ac_cv_path_GDAL_CONFIG="no"
 
8078
  ;;
 
8079
esac
 
8080
GDAL_CONFIG="$ac_cv_path_GDAL_CONFIG"
 
8081
if test -n "$GDAL_CONFIG"; then
 
8082
  echo "$ac_t""$GDAL_CONFIG" 1>&6
 
8083
else
 
8084
  echo "$ac_t""no" 1>&6
 
8085
fi
 
8086
 
 
8087
 
 
8088
  if test "$GDAL_CONFIG" = "no" ; then
 
8089
    { echo "configure: error: *** couldn't find gdal-config" 1>&2; exit 1; }
 
8090
  fi
 
8091
 
 
8092
  if test "$GDAL_CONFIG" != "" ; then
 
8093
    GDAL_LIBS=`"$GDAL_CONFIG" --libs`
 
8094
    GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
 
8095
    GDAL_CFLAGS=`"$GDAL_CONFIG" --cflags`
 
8096
    USE_GDAL=1
 
8097
    if test `"$GDAL_CONFIG" --ogr-enabled` = "yes" ; then
 
8098
      cat >> confdefs.h <<\EOF
 
8099
#define HAVE_OGR 1
 
8100
EOF
 
8101
 
 
8102
      USE_OGR=1
 
8103
    fi
 
8104
  fi
 
8105
 
 
8106
  GDAL=
 
8107
  ac_save_libs="$LIBS"
 
8108
  ac_save_cflags="$CFLAGS"
 
8109
  LIBS="$LIBS $GDAL_LIBS"
 
8110
  CFLAGS="$CFLAGS $GDAL_CFLAGS"
 
8111
  cat > conftest.$ac_ext <<EOF
 
8112
#line 8113 "configure"
 
8113
#include "confdefs.h"
 
8114
#include <gdal.h>
 
8115
int main() {
 
8116
GDALOpen("foo", GA_ReadOnly);
 
8117
; return 0; }
 
8118
EOF
 
8119
if { (eval echo configure:8120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8120
  :
 
8121
else
 
8122
  echo "configure: failed program was:" >&5
 
8123
  cat conftest.$ac_ext >&5
 
8124
  rm -rf conftest*
 
8125
  
 
8126
  LIBS="$LIBS $GDAL_DEP_LIBS"
 
8127
  cat > conftest.$ac_ext <<EOF
 
8128
#line 8129 "configure"
 
8129
#include "confdefs.h"
 
8130
#include <gdal.h>
 
8131
int main() {
 
8132
GDALOpen("foo", GA_ReadOnly);
 
8133
; return 0; }
 
8134
EOF
 
8135
if { (eval echo configure:8136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8136
  rm -rf conftest*
 
8137
  GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
 
8138
else
 
8139
  echo "configure: failed program was:" >&5
 
8140
  cat conftest.$ac_ext >&5
 
8141
  rm -rf conftest*
 
8142
  
 
8143
  { echo "configure: error: *** Unable to locate GDAL library." 1>&2; exit 1; }
 
8144
  
 
8145
fi
 
8146
rm -f conftest*
 
8147
  
 
8148
fi
 
8149
rm -f conftest*
 
8150
  LIBS=${ac_save_libs}
 
8151
  CFLAGS=${ac_save_cflags}
 
8152
 
 
8153
  cat >> confdefs.h <<\EOF
 
8154
#define HAVE_GDAL 1
 
8155
EOF
 
8156
 
 
8157
fi
 
8158
 
 
8159
 
 
8160
 
 
8161
 
 
8162
 
 
8163
 
 
8164
# GEOS option
 
8165
 
 
8166
echo $ac_n "checking whether to use GEOS""... $ac_c" 1>&6
 
8167
echo "configure:8168: checking whether to use GEOS" >&5
 
8168
 
 
8169
GEOS_LIBS=
 
8170
GGEOS_CFLAGS=
 
8171
USE_GEOS=
 
8172
 
 
8173
# FIXME: "quote" $with_geos ?
 
8174
if test "`basename xx/$with_geos`" = "geos-config" ; then
 
8175
  GEOS_CONFIG="$with_geos"
 
8176
fi
 
8177
 
 
8178
if test "$with_geos" = "no" ; then
 
8179
  echo "$ac_t""no" 1>&6
 
8180
else
 
8181
  echo "$ac_t""yes" 1>&6
 
8182
  # Extract the first word of "geos-config", so it can be a program name with args.
 
8183
set dummy geos-config; ac_word=$2
 
8184
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
8185
echo "configure:8186: checking for $ac_word" >&5
 
8186
 
 
8187
case "$GEOS_CONFIG" in
 
8188
  /*)
 
8189
  ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a path.
 
8190
  ;;
 
8191
  ?:/*)                  
 
8192
  ac_cv_path_GEOS_CONFIG="$GEOS_CONFIG" # Let the user override the test with a dos path.
 
8193
  ;;
 
8194
  *)
 
8195
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
8196
  ac_dummy="$PATH"
 
8197
  for ac_dir in $ac_dummy; do 
 
8198
    test -z "$ac_dir" && ac_dir=.
 
8199
    if test -f $ac_dir/$ac_word; then
 
8200
      ac_cv_path_GEOS_CONFIG="$ac_dir/$ac_word"
 
8201
      break
 
8202
    fi
 
8203
  done
 
8204
  IFS="$ac_save_ifs"
 
8205
  test -z "$ac_cv_path_GEOS_CONFIG" && ac_cv_path_GEOS_CONFIG="no"
 
8206
  ;;
 
8207
esac
 
8208
GEOS_CONFIG="$ac_cv_path_GEOS_CONFIG"
 
8209
if test -n "$GEOS_CONFIG"; then
 
8210
  echo "$ac_t""$GEOS_CONFIG" 1>&6
 
8211
else
 
8212
  echo "$ac_t""no" 1>&6
 
8213
fi
 
8214
 
 
8215
 
 
8216
  if test "$GEOS_CONFIG" = "no" ; then
 
8217
    { echo "configure: error: *** couldn't find geos-config" 1>&2; exit 1; }
 
8218
  fi
 
8219
  
 
8220
  if test "$GEOS_CONFIG" != "" ; then
 
8221
    GEOS_LIBS=`"$GEOS_CONFIG" --libs`
 
8222
    GEOS_CFLAGS=`"$GEOS_CONFIG" --cflags`
 
8223
    USE_GEOS=1
 
8224
  fi
 
8225
  
 
8226
  
 
8227
ac_save_cppflags="$CPPFLAGS"
 
8228
CPPFLAGS="$GEOS_CFLAGS $CPPFLAGS"
 
8229
for ac_hdr in geos_c.h
 
8230
do
 
8231
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
8232
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
8233
echo "configure:8234: checking for $ac_hdr" >&5
 
8234
 
 
8235
cat > conftest.$ac_ext <<EOF
 
8236
#line 8237 "configure"
 
8237
#include "confdefs.h"
 
8238
#include <$ac_hdr>
 
8239
EOF
 
8240
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
8241
{ (eval echo configure:8242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
8242
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
8243
if test -z "$ac_err"; then
 
8244
  rm -rf conftest*
 
8245
  eval "ac_cv_header_$ac_safe=yes"
 
8246
else
 
8247
  echo "$ac_err" >&5
 
8248
  echo "configure: failed program was:" >&5
 
8249
  cat conftest.$ac_ext >&5
 
8250
  rm -rf conftest*
 
8251
  eval "ac_cv_header_$ac_safe=no"
 
8252
fi
 
8253
rm -f conftest*
 
8254
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
8255
  echo "$ac_t""yes" 1>&6
 
8256
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
8257
  cat >> confdefs.h <<EOF
 
8258
#define $ac_tr_hdr 1
 
8259
EOF
 
8260
 
 
8261
else
 
8262
  echo "$ac_t""no" 1>&6
 
8263
{ echo "configure: error: *** Unable to locate GEOS includes." 1>&2; exit 1; }
 
8264
 
 
8265
fi
 
8266
done
 
8267
 
 
8268
CPPFLAGS=$ac_save_cppflags
 
8269
 
 
8270
  if test "$MINGW32" = yes ; then
 
8271
    
 
8272
ac_save_ldflags="$LDFLAGS"
 
8273
LDFLAGS="$GEOS_LIBS $LDFLAGS"
 
8274
 
 
8275
 
 
8276
echo $ac_n "checking for initGEOS in -lgeos_c_i""... $ac_c" 1>&6
 
8277
echo "configure:8278: checking for initGEOS in -lgeos_c_i" >&5
 
8278
ac_lib_var=`echo geos_c_i'_'initGEOS | sed 'y%./+-%__p_%'`
 
8279
 
 
8280
ac_save_LIBS="$LIBS"
 
8281
LIBS="-lgeos_c_i  $LIBS"
 
8282
cat > conftest.$ac_ext <<EOF
 
8283
#line 8284 "configure"
 
8284
#include "confdefs.h"
 
8285
/* Override any gcc2 internal prototype to avoid an error.  */
 
8286
/* We use char because int might match the return type of a gcc2
 
8287
    builtin and then its argument prototype would still apply.  */
 
8288
char initGEOS();
 
8289
 
 
8290
int main() {
 
8291
initGEOS()
 
8292
; return 0; }
 
8293
EOF
 
8294
if { (eval echo configure:8295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8295
  rm -rf conftest*
 
8296
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8297
else
 
8298
  echo "configure: failed program was:" >&5
 
8299
  cat conftest.$ac_ext >&5
 
8300
  rm -rf conftest*
 
8301
  eval "ac_cv_lib_$ac_lib_var=no"
 
8302
fi
 
8303
rm -f conftest*
 
8304
LIBS="$ac_save_LIBS"
 
8305
 
 
8306
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8307
  echo "$ac_t""yes" 1>&6
 
8308
  GEOS_LIBS="$GEOS_LIBS -lgeos_c_i "
 
8309
else
 
8310
  echo "$ac_t""no" 1>&6
 
8311
 
 
8312
LDFLAGS=${ac_save_ldflags}
 
8313
 
 
8314
    { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
 
8315
 
 
8316
 
 
8317
fi
 
8318
 
 
8319
 
 
8320
 
 
8321
LDFLAGS=${ac_save_ldflags}
 
8322
 
 
8323
  else
 
8324
    
 
8325
ac_save_ldflags="$LDFLAGS"
 
8326
LDFLAGS="$GEOS_LIBS $LDFLAGS"
 
8327
 
 
8328
 
 
8329
echo $ac_n "checking for initGEOS in -lgeos_c""... $ac_c" 1>&6
 
8330
echo "configure:8331: checking for initGEOS in -lgeos_c" >&5
 
8331
ac_lib_var=`echo geos_c'_'initGEOS | sed 'y%./+-%__p_%'`
 
8332
 
 
8333
ac_save_LIBS="$LIBS"
 
8334
LIBS="-lgeos_c  $LIBS"
 
8335
cat > conftest.$ac_ext <<EOF
 
8336
#line 8337 "configure"
 
8337
#include "confdefs.h"
 
8338
/* Override any gcc2 internal prototype to avoid an error.  */
 
8339
/* We use char because int might match the return type of a gcc2
 
8340
    builtin and then its argument prototype would still apply.  */
 
8341
char initGEOS();
 
8342
 
 
8343
int main() {
 
8344
initGEOS()
 
8345
; return 0; }
 
8346
EOF
 
8347
if { (eval echo configure:8348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8348
  rm -rf conftest*
 
8349
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8350
else
 
8351
  echo "configure: failed program was:" >&5
 
8352
  cat conftest.$ac_ext >&5
 
8353
  rm -rf conftest*
 
8354
  eval "ac_cv_lib_$ac_lib_var=no"
 
8355
fi
 
8356
rm -f conftest*
 
8357
LIBS="$ac_save_LIBS"
 
8358
 
 
8359
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8360
  echo "$ac_t""yes" 1>&6
 
8361
  GEOS_LIBS="$GEOS_LIBS -lgeos_c "
 
8362
else
 
8363
  echo "$ac_t""no" 1>&6
 
8364
 
 
8365
LDFLAGS=${ac_save_ldflags}
 
8366
 
 
8367
    { echo "configure: error: *** Unable to locate GEOS library." 1>&2; exit 1; }
 
8368
 
 
8369
 
 
8370
fi
 
8371
 
 
8372
 
 
8373
 
 
8374
LDFLAGS=${ac_save_ldflags}
 
8375
 
 
8376
  fi
 
8377
  
 
8378
  cat >> confdefs.h <<\EOF
 
8379
#define HAVE_GEOS 1
 
8380
EOF
 
8381
 
 
8382
fi
 
8383
 
 
8384
 
 
8385
 
 
8386
 
 
8387
 
 
8388
# Enable TIFF option
 
8389
 
 
8390
 
 
8391
echo $ac_n "checking whether to use TIFF""... $ac_c" 1>&6
 
8392
echo "configure:8393: checking whether to use TIFF" >&5
 
8393
echo "$ac_t"""$with_tiff"" 1>&6
 
8394
case "$with_tiff" in
 
8395
        "no")   USE_TIFF=       ;;
 
8396
        "yes")  USE_TIFF="1"    ;;
 
8397
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
8398
esac
 
8399
 
 
8400
 
 
8401
 
 
8402
TIFF_INCLUDE_DIRS=
 
8403
TIFF_LIBRARY_DIRS=
 
8404
TIFFLIB=
 
8405
 
 
8406
if test -n "$USE_TIFF"; then
 
8407
 
 
8408
# With TIFF includes directory
 
8409
 
 
8410
 
 
8411
echo $ac_n "checking for location of TIFF includes""... $ac_c" 1>&6
 
8412
echo "configure:8413: checking for location of TIFF includes" >&5
 
8413
case "$with_tiff_includes" in
 
8414
y | ye | yes | n | no)
 
8415
        { echo "configure: error: *** You must supply a directory to --with-tiff-includes." 1>&2; exit 1; }
 
8416
        ;;
 
8417
esac
 
8418
echo "$ac_t""$with_tiff_includes" 1>&6
 
8419
 
 
8420
if test -n "$with_tiff_includes" ; then
 
8421
    for dir in $with_tiff_includes; do
 
8422
        if test -d "$dir"; then
 
8423
            TIFF_INCLUDE_DIRS="$TIFF_INCLUDE_DIRS -I$dir"
 
8424
        else
 
8425
            { echo "configure: error: *** TIFF includes directory $dir does not exist." 1>&2; exit 1; }
 
8426
        fi
 
8427
    done
 
8428
fi
 
8429
 
 
8430
 
 
8431
 
 
8432
ac_save_cppflags="$CPPFLAGS"
 
8433
CPPFLAGS="$TIFF_INCLUDE_DIRS $CPPFLAGS"
 
8434
for ac_hdr in tiffio.h
 
8435
do
 
8436
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
8437
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
8438
echo "configure:8439: checking for $ac_hdr" >&5
 
8439
 
 
8440
cat > conftest.$ac_ext <<EOF
 
8441
#line 8442 "configure"
 
8442
#include "confdefs.h"
 
8443
#include <$ac_hdr>
 
8444
EOF
 
8445
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
8446
{ (eval echo configure:8447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
8447
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
8448
if test -z "$ac_err"; then
 
8449
  rm -rf conftest*
 
8450
  eval "ac_cv_header_$ac_safe=yes"
 
8451
else
 
8452
  echo "$ac_err" >&5
 
8453
  echo "configure: failed program was:" >&5
 
8454
  cat conftest.$ac_ext >&5
 
8455
  rm -rf conftest*
 
8456
  eval "ac_cv_header_$ac_safe=no"
 
8457
fi
 
8458
rm -f conftest*
 
8459
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
8460
  echo "$ac_t""yes" 1>&6
 
8461
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
8462
  cat >> confdefs.h <<EOF
 
8463
#define $ac_tr_hdr 1
 
8464
EOF
 
8465
 
 
8466
else
 
8467
  echo "$ac_t""no" 1>&6
 
8468
{ echo "configure: error: *** Unable to locate TIFF includes." 1>&2; exit 1; }
 
8469
 
 
8470
fi
 
8471
done
 
8472
 
 
8473
CPPFLAGS=$ac_save_cppflags
 
8474
 
 
8475
 
 
8476
# With TIFF library directory
 
8477
 
 
8478
 
 
8479
echo $ac_n "checking for location of TIFF library""... $ac_c" 1>&6
 
8480
echo "configure:8481: checking for location of TIFF library" >&5
 
8481
case "$with_tiff_libs" in
 
8482
y | ye | yes | n | no)
 
8483
        { echo "configure: error: *** You must supply a directory to --with-tiff-libs." 1>&2; exit 1; }
 
8484
        ;;
 
8485
esac
 
8486
echo "$ac_t""$with_tiff_libs" 1>&6
 
8487
 
 
8488
if test -n "$with_tiff_libs"; then
 
8489
    for dir in $with_tiff_libs; do
 
8490
        if test -d "$dir"; then
 
8491
            TIFF_LIBRARY_DIRS="$TIFF_LIBRARY_DIRS -L$dir"
 
8492
        else
 
8493
            { echo "configure: error: *** TIFF library directory $dir does not exist." 1>&2; exit 1; }
 
8494
        fi
 
8495
    done
 
8496
fi
 
8497
 
 
8498
 
 
8499
 
 
8500
ac_save_ldflags="$LDFLAGS"
 
8501
LDFLAGS="$TIFF_LIBRARY_DIRS $LDFLAGS"
 
8502
 
 
8503
 
 
8504
 
 
8505
 
 
8506
 
 
8507
 
 
8508
 
 
8509
 
 
8510
echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
 
8511
echo "configure:8512: checking for TIFFOpen in -ltiff" >&5
 
8512
ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
8513
 
 
8514
ac_save_LIBS="$LIBS"
 
8515
LIBS="-ltiff  $LIBS"
 
8516
cat > conftest.$ac_ext <<EOF
 
8517
#line 8518 "configure"
 
8518
#include "confdefs.h"
 
8519
/* Override any gcc2 internal prototype to avoid an error.  */
 
8520
/* We use char because int might match the return type of a gcc2
 
8521
    builtin and then its argument prototype would still apply.  */
 
8522
char TIFFOpen();
 
8523
 
 
8524
int main() {
 
8525
TIFFOpen()
 
8526
; return 0; }
 
8527
EOF
 
8528
if { (eval echo configure:8529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8529
  rm -rf conftest*
 
8530
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8531
else
 
8532
  echo "configure: failed program was:" >&5
 
8533
  cat conftest.$ac_ext >&5
 
8534
  rm -rf conftest*
 
8535
  eval "ac_cv_lib_$ac_lib_var=no"
 
8536
fi
 
8537
rm -f conftest*
 
8538
LIBS="$ac_save_LIBS"
 
8539
 
 
8540
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8541
  echo "$ac_t""yes" 1>&6
 
8542
  TIFFLIB="$TIFFLIB -ltiff "
 
8543
else
 
8544
  echo "$ac_t""no" 1>&6
 
8545
 
 
8546
echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
 
8547
echo "configure:8548: checking for TIFFOpen in -ltiff" >&5
 
8548
ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
8549
 
 
8550
ac_save_LIBS="$LIBS"
 
8551
LIBS="-ltiff $MATHLIB $LIBS"
 
8552
cat > conftest.$ac_ext <<EOF
 
8553
#line 8554 "configure"
 
8554
#include "confdefs.h"
 
8555
/* Override any gcc2 internal prototype to avoid an error.  */
 
8556
/* We use char because int might match the return type of a gcc2
 
8557
    builtin and then its argument prototype would still apply.  */
 
8558
char TIFFOpen();
 
8559
 
 
8560
int main() {
 
8561
TIFFOpen()
 
8562
; return 0; }
 
8563
EOF
 
8564
if { (eval echo configure:8565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8565
  rm -rf conftest*
 
8566
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8567
else
 
8568
  echo "configure: failed program was:" >&5
 
8569
  cat conftest.$ac_ext >&5
 
8570
  rm -rf conftest*
 
8571
  eval "ac_cv_lib_$ac_lib_var=no"
 
8572
fi
 
8573
rm -f conftest*
 
8574
LIBS="$ac_save_LIBS"
 
8575
 
 
8576
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8577
  echo "$ac_t""yes" 1>&6
 
8578
  TIFFLIB="$TIFFLIB -ltiff $MATHLIB"
 
8579
else
 
8580
  echo "$ac_t""no" 1>&6
 
8581
 
 
8582
echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
 
8583
echo "configure:8584: checking for TIFFOpen in -ltiff" >&5
 
8584
ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
8585
 
 
8586
ac_save_LIBS="$LIBS"
 
8587
LIBS="-ltiff $ZLIB $LIBS"
 
8588
cat > conftest.$ac_ext <<EOF
 
8589
#line 8590 "configure"
 
8590
#include "confdefs.h"
 
8591
/* Override any gcc2 internal prototype to avoid an error.  */
 
8592
/* We use char because int might match the return type of a gcc2
 
8593
    builtin and then its argument prototype would still apply.  */
 
8594
char TIFFOpen();
 
8595
 
 
8596
int main() {
 
8597
TIFFOpen()
 
8598
; return 0; }
 
8599
EOF
 
8600
if { (eval echo configure:8601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8601
  rm -rf conftest*
 
8602
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8603
else
 
8604
  echo "configure: failed program was:" >&5
 
8605
  cat conftest.$ac_ext >&5
 
8606
  rm -rf conftest*
 
8607
  eval "ac_cv_lib_$ac_lib_var=no"
 
8608
fi
 
8609
rm -f conftest*
 
8610
LIBS="$ac_save_LIBS"
 
8611
 
 
8612
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8613
  echo "$ac_t""yes" 1>&6
 
8614
  TIFFLIB="$TIFFLIB -ltiff $ZLIB"
 
8615
else
 
8616
  echo "$ac_t""no" 1>&6
 
8617
 
 
8618
echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
 
8619
echo "configure:8620: checking for TIFFOpen in -ltiff" >&5
 
8620
ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
8621
 
 
8622
ac_save_LIBS="$LIBS"
 
8623
LIBS="-ltiff $ZLIB $MATHLIB $LIBS"
 
8624
cat > conftest.$ac_ext <<EOF
 
8625
#line 8626 "configure"
 
8626
#include "confdefs.h"
 
8627
/* Override any gcc2 internal prototype to avoid an error.  */
 
8628
/* We use char because int might match the return type of a gcc2
 
8629
    builtin and then its argument prototype would still apply.  */
 
8630
char TIFFOpen();
 
8631
 
 
8632
int main() {
 
8633
TIFFOpen()
 
8634
; return 0; }
 
8635
EOF
 
8636
if { (eval echo configure:8637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8637
  rm -rf conftest*
 
8638
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8639
else
 
8640
  echo "configure: failed program was:" >&5
 
8641
  cat conftest.$ac_ext >&5
 
8642
  rm -rf conftest*
 
8643
  eval "ac_cv_lib_$ac_lib_var=no"
 
8644
fi
 
8645
rm -f conftest*
 
8646
LIBS="$ac_save_LIBS"
 
8647
 
 
8648
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8649
  echo "$ac_t""yes" 1>&6
 
8650
  TIFFLIB="$TIFFLIB -ltiff $ZLIB $MATHLIB"
 
8651
else
 
8652
  echo "$ac_t""no" 1>&6
 
8653
 
 
8654
echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
 
8655
echo "configure:8656: checking for TIFFOpen in -ltiff" >&5
 
8656
ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
8657
 
 
8658
ac_save_LIBS="$LIBS"
 
8659
LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $LIBS"
 
8660
cat > conftest.$ac_ext <<EOF
 
8661
#line 8662 "configure"
 
8662
#include "confdefs.h"
 
8663
/* Override any gcc2 internal prototype to avoid an error.  */
 
8664
/* We use char because int might match the return type of a gcc2
 
8665
    builtin and then its argument prototype would still apply.  */
 
8666
char TIFFOpen();
 
8667
 
 
8668
int main() {
 
8669
TIFFOpen()
 
8670
; return 0; }
 
8671
EOF
 
8672
if { (eval echo configure:8673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8673
  rm -rf conftest*
 
8674
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8675
else
 
8676
  echo "configure: failed program was:" >&5
 
8677
  cat conftest.$ac_ext >&5
 
8678
  rm -rf conftest*
 
8679
  eval "ac_cv_lib_$ac_lib_var=no"
 
8680
fi
 
8681
rm -f conftest*
 
8682
LIBS="$ac_save_LIBS"
 
8683
 
 
8684
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8685
  echo "$ac_t""yes" 1>&6
 
8686
  TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB"
 
8687
else
 
8688
  echo "$ac_t""no" 1>&6
 
8689
 
 
8690
echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
 
8691
echo "configure:8692: checking for TIFFOpen in -ltiff" >&5
 
8692
ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
8693
 
 
8694
ac_save_LIBS="$LIBS"
 
8695
LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB $LIBS"
 
8696
cat > conftest.$ac_ext <<EOF
 
8697
#line 8698 "configure"
 
8698
#include "confdefs.h"
 
8699
/* Override any gcc2 internal prototype to avoid an error.  */
 
8700
/* We use char because int might match the return type of a gcc2
 
8701
    builtin and then its argument prototype would still apply.  */
 
8702
char TIFFOpen();
 
8703
 
 
8704
int main() {
 
8705
TIFFOpen()
 
8706
; return 0; }
 
8707
EOF
 
8708
if { (eval echo configure:8709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8709
  rm -rf conftest*
 
8710
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8711
else
 
8712
  echo "configure: failed program was:" >&5
 
8713
  cat conftest.$ac_ext >&5
 
8714
  rm -rf conftest*
 
8715
  eval "ac_cv_lib_$ac_lib_var=no"
 
8716
fi
 
8717
rm -f conftest*
 
8718
LIBS="$ac_save_LIBS"
 
8719
 
 
8720
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8721
  echo "$ac_t""yes" 1>&6
 
8722
  TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $MATHLIB"
 
8723
else
 
8724
  echo "$ac_t""no" 1>&6
 
8725
 
 
8726
echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
 
8727
echo "configure:8728: checking for TIFFOpen in -ltiff" >&5
 
8728
ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
8729
 
 
8730
ac_save_LIBS="$LIBS"
 
8731
LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $LIBS"
 
8732
cat > conftest.$ac_ext <<EOF
 
8733
#line 8734 "configure"
 
8734
#include "confdefs.h"
 
8735
/* Override any gcc2 internal prototype to avoid an error.  */
 
8736
/* We use char because int might match the return type of a gcc2
 
8737
    builtin and then its argument prototype would still apply.  */
 
8738
char TIFFOpen();
 
8739
 
 
8740
int main() {
 
8741
TIFFOpen()
 
8742
; return 0; }
 
8743
EOF
 
8744
if { (eval echo configure:8745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8745
  rm -rf conftest*
 
8746
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8747
else
 
8748
  echo "configure: failed program was:" >&5
 
8749
  cat conftest.$ac_ext >&5
 
8750
  rm -rf conftest*
 
8751
  eval "ac_cv_lib_$ac_lib_var=no"
 
8752
fi
 
8753
rm -f conftest*
 
8754
LIBS="$ac_save_LIBS"
 
8755
 
 
8756
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8757
  echo "$ac_t""yes" 1>&6
 
8758
  TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB"
 
8759
else
 
8760
  echo "$ac_t""no" 1>&6
 
8761
 
 
8762
echo $ac_n "checking for TIFFOpen in -ltiff""... $ac_c" 1>&6
 
8763
echo "configure:8764: checking for TIFFOpen in -ltiff" >&5
 
8764
ac_lib_var=`echo tiff'_'TIFFOpen | sed 'y%./+-%__p_%'`
 
8765
 
 
8766
ac_save_LIBS="$LIBS"
 
8767
LIBS="-ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB $LIBS"
 
8768
cat > conftest.$ac_ext <<EOF
 
8769
#line 8770 "configure"
 
8770
#include "confdefs.h"
 
8771
/* Override any gcc2 internal prototype to avoid an error.  */
 
8772
/* We use char because int might match the return type of a gcc2
 
8773
    builtin and then its argument prototype would still apply.  */
 
8774
char TIFFOpen();
 
8775
 
 
8776
int main() {
 
8777
TIFFOpen()
 
8778
; return 0; }
 
8779
EOF
 
8780
if { (eval echo configure:8781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
8781
  rm -rf conftest*
 
8782
  eval "ac_cv_lib_$ac_lib_var=yes"
 
8783
else
 
8784
  echo "configure: failed program was:" >&5
 
8785
  cat conftest.$ac_ext >&5
 
8786
  rm -rf conftest*
 
8787
  eval "ac_cv_lib_$ac_lib_var=no"
 
8788
fi
 
8789
rm -f conftest*
 
8790
LIBS="$ac_save_LIBS"
 
8791
 
 
8792
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
8793
  echo "$ac_t""yes" 1>&6
 
8794
  TIFFLIB="$TIFFLIB -ltiff $JPEGLIBPATH $JPEGLIB $ZLIB $MATHLIB"
 
8795
else
 
8796
  echo "$ac_t""no" 1>&6
 
8797
 
 
8798
LDFLAGS=${ac_save_ldflags}
 
8799
 
 
8800
    { echo "configure: error: *** Unable to locate TIFF library." 1>&2; exit 1; }
 
8801
 
 
8802
 
 
8803
fi
 
8804
 
 
8805
 
 
8806
 
 
8807
 
 
8808
fi
 
8809
 
 
8810
 
 
8811
 
 
8812
 
 
8813
 
 
8814
 
 
8815
 
 
8816
fi
 
8817
 
 
8818
 
 
8819
 
 
8820
 
 
8821
fi
 
8822
 
 
8823
 
 
8824
 
 
8825
 
 
8826
 
 
8827
 
 
8828
 
 
8829
 
 
8830
 
 
8831
 
 
8832
fi
 
8833
 
 
8834
 
 
8835
 
 
8836
 
 
8837
fi
 
8838
 
 
8839
 
 
8840
 
 
8841
 
 
8842
 
 
8843
 
 
8844
 
 
8845
fi
 
8846
 
 
8847
 
 
8848
 
 
8849
 
 
8850
fi
 
8851
 
 
8852
 
 
8853
 
 
8854
 
 
8855
 
 
8856
 
 
8857
 
 
8858
 
 
8859
 
 
8860
 
 
8861
 
 
8862
 
 
8863
LDFLAGS=${ac_save_ldflags}
 
8864
 
 
8865
 
 
8866
fi # $USE_TIFF
 
8867
 
 
8868
 
 
8869
 
 
8870
 
 
8871
 
 
8872
# Done checking TIFF
 
8873
 
 
8874
# Enable PNG option
 
8875
 
 
8876
 
 
8877
echo $ac_n "checking whether to use PNG""... $ac_c" 1>&6
 
8878
echo "configure:8879: checking whether to use PNG" >&5
 
8879
echo "$ac_t"""$with_png"" 1>&6
 
8880
case "$with_png" in
 
8881
        "no")   USE_PNG=        ;;
 
8882
        "yes")  USE_PNG="1"     ;;
 
8883
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
8884
esac
 
8885
 
 
8886
 
 
8887
 
 
8888
PNGINC=
 
8889
PNGLIB=
 
8890
 
 
8891
if test -n "$USE_PNG"; then
 
8892
 
 
8893
# With PNG includes directory
 
8894
 
 
8895
 
 
8896
echo $ac_n "checking for location of PNG includes""... $ac_c" 1>&6
 
8897
echo "configure:8898: checking for location of PNG includes" >&5
 
8898
case "$with_png_includes" in
 
8899
y | ye | yes | n | no)
 
8900
        { echo "configure: error: *** You must supply a directory to --with-png-includes." 1>&2; exit 1; }
 
8901
        ;;
 
8902
esac
 
8903
echo "$ac_t""$with_png_includes" 1>&6
 
8904
 
 
8905
if test -n "$with_png_includes" ; then
 
8906
    for dir in $with_png_includes; do
 
8907
        if test -d "$dir"; then
 
8908
            PNGINC="$PNGINC -I$dir"
 
8909
        else
 
8910
            { echo "configure: error: *** PNG includes directory $dir does not exist." 1>&2; exit 1; }
 
8911
        fi
 
8912
    done
 
8913
fi
 
8914
 
 
8915
 
 
8916
 
 
8917
ac_save_cppflags="$CPPFLAGS"
 
8918
CPPFLAGS="$PNGINC $CPPFLAGS"
 
8919
for ac_hdr in png.h
 
8920
do
 
8921
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
8922
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
8923
echo "configure:8924: checking for $ac_hdr" >&5
 
8924
 
 
8925
cat > conftest.$ac_ext <<EOF
 
8926
#line 8927 "configure"
 
8927
#include "confdefs.h"
 
8928
#include <$ac_hdr>
 
8929
EOF
 
8930
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
8931
{ (eval echo configure:8932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
8932
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
8933
if test -z "$ac_err"; then
 
8934
  rm -rf conftest*
 
8935
  eval "ac_cv_header_$ac_safe=yes"
 
8936
else
 
8937
  echo "$ac_err" >&5
 
8938
  echo "configure: failed program was:" >&5
 
8939
  cat conftest.$ac_ext >&5
 
8940
  rm -rf conftest*
 
8941
  eval "ac_cv_header_$ac_safe=no"
 
8942
fi
 
8943
rm -f conftest*
 
8944
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
8945
  echo "$ac_t""yes" 1>&6
 
8946
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
8947
  cat >> confdefs.h <<EOF
 
8948
#define $ac_tr_hdr 1
 
8949
EOF
 
8950
 
 
8951
else
 
8952
  echo "$ac_t""no" 1>&6
 
8953
{ echo "configure: error: *** Unable to locate PNG includes." 1>&2; exit 1; }
 
8954
 
 
8955
fi
 
8956
done
 
8957
 
 
8958
CPPFLAGS=$ac_save_cppflags
 
8959
 
 
8960
 
 
8961
# With PNG library directory
 
8962
 
 
8963
 
 
8964
echo $ac_n "checking for location of PNG library""... $ac_c" 1>&6
 
8965
echo "configure:8966: checking for location of PNG library" >&5
 
8966
case "$with_png_libs" in
 
8967
y | ye | yes | n | no)
 
8968
        { echo "configure: error: *** You must supply a directory to --with-png-libs." 1>&2; exit 1; }
 
8969
        ;;
 
8970
esac
 
8971
echo "$ac_t""$with_png_libs" 1>&6
 
8972
 
 
8973
if test -n "$with_png_libs"; then
 
8974
    for dir in $with_png_libs; do
 
8975
        if test -d "$dir"; then
 
8976
            PNGLIB="$PNGLIB -L$dir"
 
8977
        else
 
8978
            { echo "configure: error: *** PNG library directory $dir does not exist." 1>&2; exit 1; }
 
8979
        fi
 
8980
    done
 
8981
fi
 
8982
 
 
8983
 
 
8984
 
 
8985
ac_save_ldflags="$LDFLAGS"
 
8986
LDFLAGS="$PNGLIB $LDFLAGS"
 
8987
 
 
8988
 
 
8989
echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
 
8990
echo "configure:8991: checking for png_read_image in -lpng" >&5
 
8991
ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
 
8992
 
 
8993
ac_save_LIBS="$LIBS"
 
8994
LIBS="-lpng $ZLIB $MATHLIB $LIBS"
 
8995
cat > conftest.$ac_ext <<EOF
 
8996
#line 8997 "configure"
 
8997
#include "confdefs.h"
 
8998
/* Override any gcc2 internal prototype to avoid an error.  */
 
8999
/* We use char because int might match the return type of a gcc2
 
9000
    builtin and then its argument prototype would still apply.  */
 
9001
char png_read_image();
 
9002
 
 
9003
int main() {
 
9004
png_read_image()
 
9005
; return 0; }
 
9006
EOF
 
9007
if { (eval echo configure:9008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9008
  rm -rf conftest*
 
9009
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9010
else
 
9011
  echo "configure: failed program was:" >&5
 
9012
  cat conftest.$ac_ext >&5
 
9013
  rm -rf conftest*
 
9014
  eval "ac_cv_lib_$ac_lib_var=no"
 
9015
fi
 
9016
rm -f conftest*
 
9017
LIBS="$ac_save_LIBS"
 
9018
 
 
9019
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9020
  echo "$ac_t""yes" 1>&6
 
9021
  PNGLIB="$PNGLIB -lpng $ZLIB $MATHLIB"
 
9022
else
 
9023
  echo "$ac_t""no" 1>&6
 
9024
 
 
9025
LDFLAGS=${ac_save_ldflags}
 
9026
 
 
9027
    { echo "configure: error: *** Unable to locate PNG library." 1>&2; exit 1; }
 
9028
 
 
9029
 
 
9030
fi
 
9031
 
 
9032
 
 
9033
 
 
9034
LDFLAGS=${ac_save_ldflags}
 
9035
 
 
9036
 
 
9037
fi # $USE_PNG
 
9038
 
 
9039
 
 
9040
 
 
9041
 
 
9042
 
 
9043
# Done checking PNG
 
9044
 
 
9045
# Enable PostgreSQL option
 
9046
 
 
9047
 
 
9048
echo $ac_n "checking whether to use PostgreSQL""... $ac_c" 1>&6
 
9049
echo "configure:9050: checking whether to use PostgreSQL" >&5
 
9050
echo "$ac_t"""$with_postgres"" 1>&6
 
9051
case "$with_postgres" in
 
9052
        "no")   USE_POSTGRES=   ;;
 
9053
        "yes")  USE_POSTGRES="1"        ;;
 
9054
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
9055
esac
 
9056
 
 
9057
 
 
9058
 
 
9059
if test -n "$USE_POSTGRES"; then
 
9060
cat >> confdefs.h <<\EOF
 
9061
#define HAVE_POSTGRES 1
 
9062
EOF
 
9063
 
 
9064
fi # $USE_POSTGRES
 
9065
 
 
9066
PQINCPATH=
 
9067
PQLIBPATH=
 
9068
PQLIB=
 
9069
 
 
9070
if test -n "$USE_POSTGRES"; then
 
9071
 
 
9072
# With PostgreSQL includes directory
 
9073
 
 
9074
 
 
9075
echo $ac_n "checking for location of PostgreSQL includes""... $ac_c" 1>&6
 
9076
echo "configure:9077: checking for location of PostgreSQL includes" >&5
 
9077
case "$with_postgres_includes" in
 
9078
y | ye | yes | n | no)
 
9079
        { echo "configure: error: *** You must supply a directory to --with-postgres-includes." 1>&2; exit 1; }
 
9080
        ;;
 
9081
esac
 
9082
echo "$ac_t""$with_postgres_includes" 1>&6
 
9083
 
 
9084
if test -n "$with_postgres_includes" ; then
 
9085
    for dir in $with_postgres_includes; do
 
9086
        if test -d "$dir"; then
 
9087
            PQINCPATH="$PQINCPATH -I$dir"
 
9088
        else
 
9089
            { echo "configure: error: *** PostgreSQL includes directory $dir does not exist." 1>&2; exit 1; }
 
9090
        fi
 
9091
    done
 
9092
fi
 
9093
 
 
9094
 
 
9095
 
 
9096
ac_save_cppflags="$CPPFLAGS"
 
9097
CPPFLAGS="$PQINCPATH $CPPFLAGS"
 
9098
for ac_hdr in libpq-fe.h
 
9099
do
 
9100
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
9101
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
9102
echo "configure:9103: checking for $ac_hdr" >&5
 
9103
 
 
9104
cat > conftest.$ac_ext <<EOF
 
9105
#line 9106 "configure"
 
9106
#include "confdefs.h"
 
9107
#include <$ac_hdr>
 
9108
EOF
 
9109
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
9110
{ (eval echo configure:9111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
9111
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
9112
if test -z "$ac_err"; then
 
9113
  rm -rf conftest*
 
9114
  eval "ac_cv_header_$ac_safe=yes"
 
9115
else
 
9116
  echo "$ac_err" >&5
 
9117
  echo "configure: failed program was:" >&5
 
9118
  cat conftest.$ac_ext >&5
 
9119
  rm -rf conftest*
 
9120
  eval "ac_cv_header_$ac_safe=no"
 
9121
fi
 
9122
rm -f conftest*
 
9123
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
9124
  echo "$ac_t""yes" 1>&6
 
9125
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
9126
  cat >> confdefs.h <<EOF
 
9127
#define $ac_tr_hdr 1
 
9128
EOF
 
9129
 
 
9130
else
 
9131
  echo "$ac_t""no" 1>&6
 
9132
{ echo "configure: error: *** Unable to locate PostgreSQL includes." 1>&2; exit 1; }
 
9133
 
 
9134
fi
 
9135
done
 
9136
 
 
9137
CPPFLAGS=$ac_save_cppflags
 
9138
 
 
9139
 
 
9140
fi # $USE_POSTGRES
 
9141
 
 
9142
if test -n "$USE_POSTGRES"; then
 
9143
 
 
9144
# With PostgreSQL library directory
 
9145
 
 
9146
 
 
9147
echo $ac_n "checking for location of PostgreSQL library""... $ac_c" 1>&6
 
9148
echo "configure:9149: checking for location of PostgreSQL library" >&5
 
9149
case "$with_postgres_libs" in
 
9150
y | ye | yes | n | no)
 
9151
        { echo "configure: error: *** You must supply a directory to --with-postgres-libs." 1>&2; exit 1; }
 
9152
        ;;
 
9153
esac
 
9154
echo "$ac_t""$with_postgres_libs" 1>&6
 
9155
 
 
9156
if test -n "$with_postgres_libs"; then
 
9157
    for dir in $with_postgres_libs; do
 
9158
        if test -d "$dir"; then
 
9159
            PQLIBPATH="$PQLIBPATH -L$dir"
 
9160
        else
 
9161
            { echo "configure: error: *** PostgreSQL library directory $dir does not exist." 1>&2; exit 1; }
 
9162
        fi
 
9163
    done
 
9164
fi
 
9165
 
 
9166
 
 
9167
 
 
9168
ac_save_ldflags="$LDFLAGS"
 
9169
LDFLAGS="$PQLIBPATH $LDFLAGS"
 
9170
 
 
9171
 
 
9172
 
 
9173
 
 
9174
 
 
9175
 
 
9176
echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
 
9177
echo "configure:9178: checking for PQsetdbLogin in -lpq" >&5
 
9178
ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
 
9179
 
 
9180
ac_save_LIBS="$LIBS"
 
9181
LIBS="-lpq  $LIBS"
 
9182
cat > conftest.$ac_ext <<EOF
 
9183
#line 9184 "configure"
 
9184
#include "confdefs.h"
 
9185
/* Override any gcc2 internal prototype to avoid an error.  */
 
9186
/* We use char because int might match the return type of a gcc2
 
9187
    builtin and then its argument prototype would still apply.  */
 
9188
char PQsetdbLogin();
 
9189
 
 
9190
int main() {
 
9191
PQsetdbLogin()
 
9192
; return 0; }
 
9193
EOF
 
9194
if { (eval echo configure:9195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9195
  rm -rf conftest*
 
9196
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9197
else
 
9198
  echo "configure: failed program was:" >&5
 
9199
  cat conftest.$ac_ext >&5
 
9200
  rm -rf conftest*
 
9201
  eval "ac_cv_lib_$ac_lib_var=no"
 
9202
fi
 
9203
rm -f conftest*
 
9204
LIBS="$ac_save_LIBS"
 
9205
 
 
9206
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9207
  echo "$ac_t""yes" 1>&6
 
9208
  PQLIB="$PQLIB -lpq "
 
9209
else
 
9210
  echo "$ac_t""no" 1>&6
 
9211
 
 
9212
echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
 
9213
echo "configure:9214: checking for PQsetdbLogin in -lpq" >&5
 
9214
ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
 
9215
 
 
9216
ac_save_LIBS="$LIBS"
 
9217
LIBS="-lpq -lssl -lcrypto $LIBS"
 
9218
cat > conftest.$ac_ext <<EOF
 
9219
#line 9220 "configure"
 
9220
#include "confdefs.h"
 
9221
/* Override any gcc2 internal prototype to avoid an error.  */
 
9222
/* We use char because int might match the return type of a gcc2
 
9223
    builtin and then its argument prototype would still apply.  */
 
9224
char PQsetdbLogin();
 
9225
 
 
9226
int main() {
 
9227
PQsetdbLogin()
 
9228
; return 0; }
 
9229
EOF
 
9230
if { (eval echo configure:9231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9231
  rm -rf conftest*
 
9232
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9233
else
 
9234
  echo "configure: failed program was:" >&5
 
9235
  cat conftest.$ac_ext >&5
 
9236
  rm -rf conftest*
 
9237
  eval "ac_cv_lib_$ac_lib_var=no"
 
9238
fi
 
9239
rm -f conftest*
 
9240
LIBS="$ac_save_LIBS"
 
9241
 
 
9242
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9243
  echo "$ac_t""yes" 1>&6
 
9244
  PQLIB="$PQLIB -lpq -lssl -lcrypto"
 
9245
else
 
9246
  echo "$ac_t""no" 1>&6
 
9247
 
 
9248
echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
 
9249
echo "configure:9250: checking for PQsetdbLogin in -lpq" >&5
 
9250
ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
 
9251
 
 
9252
ac_save_LIBS="$LIBS"
 
9253
LIBS="-lpq -lcrypt $LIBS"
 
9254
cat > conftest.$ac_ext <<EOF
 
9255
#line 9256 "configure"
 
9256
#include "confdefs.h"
 
9257
/* Override any gcc2 internal prototype to avoid an error.  */
 
9258
/* We use char because int might match the return type of a gcc2
 
9259
    builtin and then its argument prototype would still apply.  */
 
9260
char PQsetdbLogin();
 
9261
 
 
9262
int main() {
 
9263
PQsetdbLogin()
 
9264
; return 0; }
 
9265
EOF
 
9266
if { (eval echo configure:9267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9267
  rm -rf conftest*
 
9268
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9269
else
 
9270
  echo "configure: failed program was:" >&5
 
9271
  cat conftest.$ac_ext >&5
 
9272
  rm -rf conftest*
 
9273
  eval "ac_cv_lib_$ac_lib_var=no"
 
9274
fi
 
9275
rm -f conftest*
 
9276
LIBS="$ac_save_LIBS"
 
9277
 
 
9278
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9279
  echo "$ac_t""yes" 1>&6
 
9280
  PQLIB="$PQLIB -lpq -lcrypt"
 
9281
else
 
9282
  echo "$ac_t""no" 1>&6
 
9283
 
 
9284
echo $ac_n "checking for PQsetdbLogin in -lpq""... $ac_c" 1>&6
 
9285
echo "configure:9286: checking for PQsetdbLogin in -lpq" >&5
 
9286
ac_lib_var=`echo pq'_'PQsetdbLogin | sed 'y%./+-%__p_%'`
 
9287
 
 
9288
ac_save_LIBS="$LIBS"
 
9289
LIBS="-lpq -lcrypt -lssl -lcrypto $LIBS"
 
9290
cat > conftest.$ac_ext <<EOF
 
9291
#line 9292 "configure"
 
9292
#include "confdefs.h"
 
9293
/* Override any gcc2 internal prototype to avoid an error.  */
 
9294
/* We use char because int might match the return type of a gcc2
 
9295
    builtin and then its argument prototype would still apply.  */
 
9296
char PQsetdbLogin();
 
9297
 
 
9298
int main() {
 
9299
PQsetdbLogin()
 
9300
; return 0; }
 
9301
EOF
 
9302
if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9303
  rm -rf conftest*
 
9304
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9305
else
 
9306
  echo "configure: failed program was:" >&5
 
9307
  cat conftest.$ac_ext >&5
 
9308
  rm -rf conftest*
 
9309
  eval "ac_cv_lib_$ac_lib_var=no"
 
9310
fi
 
9311
rm -f conftest*
 
9312
LIBS="$ac_save_LIBS"
 
9313
 
 
9314
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9315
  echo "$ac_t""yes" 1>&6
 
9316
  PQLIB="$PQLIB -lpq -lcrypt -lssl -lcrypto"
 
9317
else
 
9318
  echo "$ac_t""no" 1>&6
 
9319
 
 
9320
LDFLAGS=${ac_save_ldflags}
 
9321
 
 
9322
    { echo "configure: error: *** Unable to locate PostgreSQL library." 1>&2; exit 1; }
 
9323
 
 
9324
 
 
9325
fi
 
9326
 
 
9327
 
 
9328
 
 
9329
 
 
9330
fi
 
9331
 
 
9332
 
 
9333
 
 
9334
 
 
9335
 
 
9336
 
 
9337
 
 
9338
fi
 
9339
 
 
9340
 
 
9341
 
 
9342
 
 
9343
fi
 
9344
 
 
9345
 
 
9346
 
 
9347
 
 
9348
 
 
9349
 
 
9350
 
 
9351
 
 
9352
 
 
9353
LDFLAGS=${ac_save_ldflags}
 
9354
 
 
9355
 
 
9356
ac_save_ldflags="$LDFLAGS"
 
9357
LDFLAGS="$LDFLAGS $PQLIBPATH"
 
9358
echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
 
9359
echo "configure:9360: checking for PQcmdTuples in -lpq" >&5
 
9360
ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
 
9361
 
 
9362
ac_save_LIBS="$LIBS"
 
9363
LIBS="-lpq  $LIBS"
 
9364
cat > conftest.$ac_ext <<EOF
 
9365
#line 9366 "configure"
 
9366
#include "confdefs.h"
 
9367
/* Override any gcc2 internal prototype to avoid an error.  */
 
9368
/* We use char because int might match the return type of a gcc2
 
9369
    builtin and then its argument prototype would still apply.  */
 
9370
char PQcmdTuples();
 
9371
 
 
9372
int main() {
 
9373
PQcmdTuples()
 
9374
; return 0; }
 
9375
EOF
 
9376
if { (eval echo configure:9377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9377
  rm -rf conftest*
 
9378
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9379
else
 
9380
  echo "configure: failed program was:" >&5
 
9381
  cat conftest.$ac_ext >&5
 
9382
  rm -rf conftest*
 
9383
  eval "ac_cv_lib_$ac_lib_var=no"
 
9384
fi
 
9385
rm -f conftest*
 
9386
LIBS="$ac_save_LIBS"
 
9387
 
 
9388
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9389
  echo "$ac_t""yes" 1>&6
 
9390
  cat >> confdefs.h <<\EOF
 
9391
#define HAVE_PQCMDTUPLES 1
 
9392
EOF
 
9393
 
 
9394
else
 
9395
  echo "$ac_t""no" 1>&6
 
9396
 
 
9397
echo $ac_n "checking for PQcmdTuples in -lpq""... $ac_c" 1>&6
 
9398
echo "configure:9399: checking for PQcmdTuples in -lpq" >&5
 
9399
ac_lib_var=`echo pq'_'PQcmdTuples | sed 'y%./+-%__p_%'`
 
9400
 
 
9401
ac_save_LIBS="$LIBS"
 
9402
LIBS="-lpq -lcrypt $LIBS"
 
9403
cat > conftest.$ac_ext <<EOF
 
9404
#line 9405 "configure"
 
9405
#include "confdefs.h"
 
9406
/* Override any gcc2 internal prototype to avoid an error.  */
 
9407
/* We use char because int might match the return type of a gcc2
 
9408
    builtin and then its argument prototype would still apply.  */
 
9409
char PQcmdTuples();
 
9410
 
 
9411
int main() {
 
9412
PQcmdTuples()
 
9413
; return 0; }
 
9414
EOF
 
9415
if { (eval echo configure:9416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9416
  rm -rf conftest*
 
9417
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9418
else
 
9419
  echo "configure: failed program was:" >&5
 
9420
  cat conftest.$ac_ext >&5
 
9421
  rm -rf conftest*
 
9422
  eval "ac_cv_lib_$ac_lib_var=no"
 
9423
fi
 
9424
rm -f conftest*
 
9425
LIBS="$ac_save_LIBS"
 
9426
 
 
9427
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9428
  echo "$ac_t""yes" 1>&6
 
9429
  cat >> confdefs.h <<\EOF
 
9430
#define HAVE_PQCMDTUPLES 1
 
9431
EOF
 
9432
 
 
9433
else
 
9434
  echo "$ac_t""no" 1>&6
 
9435
 
 
9436
 
 
9437
fi
 
9438
 
 
9439
 
 
9440
fi
 
9441
 
 
9442
LDFLAGS="${ac_save_ldflags}"
 
9443
 
 
9444
fi # $USE_POSTGRES
 
9445
 
 
9446
 
 
9447
 
 
9448
 
 
9449
 
 
9450
 
 
9451
 
 
9452
# Done checking PostgreSQL
 
9453
 
 
9454
# Enable MySQL option
 
9455
 
 
9456
 
 
9457
echo $ac_n "checking whether to use MySQL""... $ac_c" 1>&6
 
9458
echo "configure:9459: checking whether to use MySQL" >&5
 
9459
echo "$ac_t"""$with_mysql"" 1>&6
 
9460
case "$with_mysql" in
 
9461
        "no")   USE_MYSQL=      ;;
 
9462
        "yes")  USE_MYSQL="1"   ;;
 
9463
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
9464
esac
 
9465
 
 
9466
 
 
9467
 
 
9468
MYSQLINCPATH=
 
9469
MYSQLLIBPATH=
 
9470
MYSQLLIB=
 
9471
 
 
9472
if test -n "$USE_MYSQL"; then
 
9473
 
 
9474
# With MySQL includes directory
 
9475
 
 
9476
 
 
9477
echo $ac_n "checking for location of MySQL includes""... $ac_c" 1>&6
 
9478
echo "configure:9479: checking for location of MySQL includes" >&5
 
9479
case "$with_mysql_includes" in
 
9480
y | ye | yes | n | no)
 
9481
        { echo "configure: error: *** You must supply a directory to --with-mysql-includes." 1>&2; exit 1; }
 
9482
        ;;
 
9483
esac
 
9484
echo "$ac_t""$with_mysql_includes" 1>&6
 
9485
 
 
9486
if test -n "$with_mysql_includes" ; then
 
9487
    for dir in $with_mysql_includes; do
 
9488
        if test -d "$dir"; then
 
9489
            MYSQLINCPATH="$MYSQLINCPATH -I$dir"
 
9490
        else
 
9491
            { echo "configure: error: *** MySQL includes directory $dir does not exist." 1>&2; exit 1; }
 
9492
        fi
 
9493
    done
 
9494
fi
 
9495
 
 
9496
 
 
9497
 
 
9498
ac_save_cppflags="$CPPFLAGS"
 
9499
CPPFLAGS="$MYSQLINCPATH $CPPFLAGS"
 
9500
for ac_hdr in mysql.h
 
9501
do
 
9502
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
9503
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
9504
echo "configure:9505: checking for $ac_hdr" >&5
 
9505
 
 
9506
cat > conftest.$ac_ext <<EOF
 
9507
#line 9508 "configure"
 
9508
#include "confdefs.h"
 
9509
#include <$ac_hdr>
 
9510
EOF
 
9511
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
9512
{ (eval echo configure:9513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
9513
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
9514
if test -z "$ac_err"; then
 
9515
  rm -rf conftest*
 
9516
  eval "ac_cv_header_$ac_safe=yes"
 
9517
else
 
9518
  echo "$ac_err" >&5
 
9519
  echo "configure: failed program was:" >&5
 
9520
  cat conftest.$ac_ext >&5
 
9521
  rm -rf conftest*
 
9522
  eval "ac_cv_header_$ac_safe=no"
 
9523
fi
 
9524
rm -f conftest*
 
9525
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
9526
  echo "$ac_t""yes" 1>&6
 
9527
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
9528
  cat >> confdefs.h <<EOF
 
9529
#define $ac_tr_hdr 1
 
9530
EOF
 
9531
 
 
9532
else
 
9533
  echo "$ac_t""no" 1>&6
 
9534
{ echo "configure: error: *** Unable to locate MySQL includes." 1>&2; exit 1; }
 
9535
 
 
9536
fi
 
9537
done
 
9538
 
 
9539
CPPFLAGS=$ac_save_cppflags
 
9540
 
 
9541
 
 
9542
fi # $USE_MYSQL
 
9543
 
 
9544
if test -n "$USE_MYSQL"; then
 
9545
  # With MySQL library directory
 
9546
 
 
9547
  
 
9548
echo $ac_n "checking for location of MySQL library""... $ac_c" 1>&6
 
9549
echo "configure:9550: checking for location of MySQL library" >&5
 
9550
case "$with_mysql_libs" in
 
9551
y | ye | yes | n | no)
 
9552
        { echo "configure: error: *** You must supply a directory to --with-mysql-libs." 1>&2; exit 1; }
 
9553
        ;;
 
9554
esac
 
9555
echo "$ac_t""$with_mysql_libs" 1>&6
 
9556
 
 
9557
if test -n "$with_mysql_libs"; then
 
9558
    for dir in $with_mysql_libs; do
 
9559
        if test -d "$dir"; then
 
9560
            MYSQLLIBPATH="$MYSQLLIBPATH -L$dir"
 
9561
        else
 
9562
            { echo "configure: error: *** MySQL library directory $dir does not exist." 1>&2; exit 1; }
 
9563
        fi
 
9564
    done
 
9565
fi
 
9566
 
 
9567
 
 
9568
  
 
9569
ac_save_ldflags="$LDFLAGS"
 
9570
LDFLAGS="$MYSQLLIBPATH $LDFLAGS"
 
9571
 
 
9572
 
 
9573
 
 
9574
 
 
9575
 
 
9576
 
 
9577
 
 
9578
 
 
9579
echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
 
9580
echo "configure:9581: checking for mysql_query in -lmysqlclient" >&5
 
9581
ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
9582
 
 
9583
ac_save_LIBS="$LIBS"
 
9584
LIBS="-lmysqlclient  $LIBS"
 
9585
cat > conftest.$ac_ext <<EOF
 
9586
#line 9587 "configure"
 
9587
#include "confdefs.h"
 
9588
/* Override any gcc2 internal prototype to avoid an error.  */
 
9589
/* We use char because int might match the return type of a gcc2
 
9590
    builtin and then its argument prototype would still apply.  */
 
9591
char mysql_query();
 
9592
 
 
9593
int main() {
 
9594
mysql_query()
 
9595
; return 0; }
 
9596
EOF
 
9597
if { (eval echo configure:9598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9598
  rm -rf conftest*
 
9599
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9600
else
 
9601
  echo "configure: failed program was:" >&5
 
9602
  cat conftest.$ac_ext >&5
 
9603
  rm -rf conftest*
 
9604
  eval "ac_cv_lib_$ac_lib_var=no"
 
9605
fi
 
9606
rm -f conftest*
 
9607
LIBS="$ac_save_LIBS"
 
9608
 
 
9609
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9610
  echo "$ac_t""yes" 1>&6
 
9611
  MYSQLLIB="$MYSQLLIB -lmysqlclient "
 
9612
else
 
9613
  echo "$ac_t""no" 1>&6
 
9614
 
 
9615
echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
 
9616
echo "configure:9617: checking for mysql_query in -lmysqlclient" >&5
 
9617
ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
9618
 
 
9619
ac_save_LIBS="$LIBS"
 
9620
LIBS="-lmysqlclient $MATHLIB $LIBS"
 
9621
cat > conftest.$ac_ext <<EOF
 
9622
#line 9623 "configure"
 
9623
#include "confdefs.h"
 
9624
/* Override any gcc2 internal prototype to avoid an error.  */
 
9625
/* We use char because int might match the return type of a gcc2
 
9626
    builtin and then its argument prototype would still apply.  */
 
9627
char mysql_query();
 
9628
 
 
9629
int main() {
 
9630
mysql_query()
 
9631
; return 0; }
 
9632
EOF
 
9633
if { (eval echo configure:9634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9634
  rm -rf conftest*
 
9635
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9636
else
 
9637
  echo "configure: failed program was:" >&5
 
9638
  cat conftest.$ac_ext >&5
 
9639
  rm -rf conftest*
 
9640
  eval "ac_cv_lib_$ac_lib_var=no"
 
9641
fi
 
9642
rm -f conftest*
 
9643
LIBS="$ac_save_LIBS"
 
9644
 
 
9645
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9646
  echo "$ac_t""yes" 1>&6
 
9647
  MYSQLLIB="$MYSQLLIB -lmysqlclient $MATHLIB"
 
9648
else
 
9649
  echo "$ac_t""no" 1>&6
 
9650
 
 
9651
echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
 
9652
echo "configure:9653: checking for mysql_query in -lmysqlclient" >&5
 
9653
ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
9654
 
 
9655
ac_save_LIBS="$LIBS"
 
9656
LIBS="-lmysqlclient $SOCKLIB $LIBS"
 
9657
cat > conftest.$ac_ext <<EOF
 
9658
#line 9659 "configure"
 
9659
#include "confdefs.h"
 
9660
/* Override any gcc2 internal prototype to avoid an error.  */
 
9661
/* We use char because int might match the return type of a gcc2
 
9662
    builtin and then its argument prototype would still apply.  */
 
9663
char mysql_query();
 
9664
 
 
9665
int main() {
 
9666
mysql_query()
 
9667
; return 0; }
 
9668
EOF
 
9669
if { (eval echo configure:9670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9670
  rm -rf conftest*
 
9671
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9672
else
 
9673
  echo "configure: failed program was:" >&5
 
9674
  cat conftest.$ac_ext >&5
 
9675
  rm -rf conftest*
 
9676
  eval "ac_cv_lib_$ac_lib_var=no"
 
9677
fi
 
9678
rm -f conftest*
 
9679
LIBS="$ac_save_LIBS"
 
9680
 
 
9681
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9682
  echo "$ac_t""yes" 1>&6
 
9683
  MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB"
 
9684
else
 
9685
  echo "$ac_t""no" 1>&6
 
9686
 
 
9687
echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
 
9688
echo "configure:9689: checking for mysql_query in -lmysqlclient" >&5
 
9689
ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
9690
 
 
9691
ac_save_LIBS="$LIBS"
 
9692
LIBS="-lmysqlclient $SOCKLIB $MATHLIB $LIBS"
 
9693
cat > conftest.$ac_ext <<EOF
 
9694
#line 9695 "configure"
 
9695
#include "confdefs.h"
 
9696
/* Override any gcc2 internal prototype to avoid an error.  */
 
9697
/* We use char because int might match the return type of a gcc2
 
9698
    builtin and then its argument prototype would still apply.  */
 
9699
char mysql_query();
 
9700
 
 
9701
int main() {
 
9702
mysql_query()
 
9703
; return 0; }
 
9704
EOF
 
9705
if { (eval echo configure:9706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9706
  rm -rf conftest*
 
9707
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9708
else
 
9709
  echo "configure: failed program was:" >&5
 
9710
  cat conftest.$ac_ext >&5
 
9711
  rm -rf conftest*
 
9712
  eval "ac_cv_lib_$ac_lib_var=no"
 
9713
fi
 
9714
rm -f conftest*
 
9715
LIBS="$ac_save_LIBS"
 
9716
 
 
9717
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9718
  echo "$ac_t""yes" 1>&6
 
9719
  MYSQLLIB="$MYSQLLIB -lmysqlclient $SOCKLIB $MATHLIB"
 
9720
else
 
9721
  echo "$ac_t""no" 1>&6
 
9722
 
 
9723
echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
 
9724
echo "configure:9725: checking for mysql_query in -lmysqlclient" >&5
 
9725
ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
9726
 
 
9727
ac_save_LIBS="$LIBS"
 
9728
LIBS="-lmysqlclient $ZLIB $LIBS"
 
9729
cat > conftest.$ac_ext <<EOF
 
9730
#line 9731 "configure"
 
9731
#include "confdefs.h"
 
9732
/* Override any gcc2 internal prototype to avoid an error.  */
 
9733
/* We use char because int might match the return type of a gcc2
 
9734
    builtin and then its argument prototype would still apply.  */
 
9735
char mysql_query();
 
9736
 
 
9737
int main() {
 
9738
mysql_query()
 
9739
; return 0; }
 
9740
EOF
 
9741
if { (eval echo configure:9742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9742
  rm -rf conftest*
 
9743
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9744
else
 
9745
  echo "configure: failed program was:" >&5
 
9746
  cat conftest.$ac_ext >&5
 
9747
  rm -rf conftest*
 
9748
  eval "ac_cv_lib_$ac_lib_var=no"
 
9749
fi
 
9750
rm -f conftest*
 
9751
LIBS="$ac_save_LIBS"
 
9752
 
 
9753
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9754
  echo "$ac_t""yes" 1>&6
 
9755
  MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB"
 
9756
else
 
9757
  echo "$ac_t""no" 1>&6
 
9758
 
 
9759
echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
 
9760
echo "configure:9761: checking for mysql_query in -lmysqlclient" >&5
 
9761
ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
9762
 
 
9763
ac_save_LIBS="$LIBS"
 
9764
LIBS="-lmysqlclient $ZLIB $MATHLIB $LIBS"
 
9765
cat > conftest.$ac_ext <<EOF
 
9766
#line 9767 "configure"
 
9767
#include "confdefs.h"
 
9768
/* Override any gcc2 internal prototype to avoid an error.  */
 
9769
/* We use char because int might match the return type of a gcc2
 
9770
    builtin and then its argument prototype would still apply.  */
 
9771
char mysql_query();
 
9772
 
 
9773
int main() {
 
9774
mysql_query()
 
9775
; return 0; }
 
9776
EOF
 
9777
if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9778
  rm -rf conftest*
 
9779
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9780
else
 
9781
  echo "configure: failed program was:" >&5
 
9782
  cat conftest.$ac_ext >&5
 
9783
  rm -rf conftest*
 
9784
  eval "ac_cv_lib_$ac_lib_var=no"
 
9785
fi
 
9786
rm -f conftest*
 
9787
LIBS="$ac_save_LIBS"
 
9788
 
 
9789
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9790
  echo "$ac_t""yes" 1>&6
 
9791
  MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $MATHLIB"
 
9792
else
 
9793
  echo "$ac_t""no" 1>&6
 
9794
 
 
9795
echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
 
9796
echo "configure:9797: checking for mysql_query in -lmysqlclient" >&5
 
9797
ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
9798
 
 
9799
ac_save_LIBS="$LIBS"
 
9800
LIBS="-lmysqlclient $ZLIB $SOCKLIB $LIBS"
 
9801
cat > conftest.$ac_ext <<EOF
 
9802
#line 9803 "configure"
 
9803
#include "confdefs.h"
 
9804
/* Override any gcc2 internal prototype to avoid an error.  */
 
9805
/* We use char because int might match the return type of a gcc2
 
9806
    builtin and then its argument prototype would still apply.  */
 
9807
char mysql_query();
 
9808
 
 
9809
int main() {
 
9810
mysql_query()
 
9811
; return 0; }
 
9812
EOF
 
9813
if { (eval echo configure:9814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9814
  rm -rf conftest*
 
9815
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9816
else
 
9817
  echo "configure: failed program was:" >&5
 
9818
  cat conftest.$ac_ext >&5
 
9819
  rm -rf conftest*
 
9820
  eval "ac_cv_lib_$ac_lib_var=no"
 
9821
fi
 
9822
rm -f conftest*
 
9823
LIBS="$ac_save_LIBS"
 
9824
 
 
9825
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9826
  echo "$ac_t""yes" 1>&6
 
9827
  MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB"
 
9828
else
 
9829
  echo "$ac_t""no" 1>&6
 
9830
 
 
9831
echo $ac_n "checking for mysql_query in -lmysqlclient""... $ac_c" 1>&6
 
9832
echo "configure:9833: checking for mysql_query in -lmysqlclient" >&5
 
9833
ac_lib_var=`echo mysqlclient'_'mysql_query | sed 'y%./+-%__p_%'`
 
9834
 
 
9835
ac_save_LIBS="$LIBS"
 
9836
LIBS="-lmysqlclient $ZLIB $SOCKLIB $MATHLIB $LIBS"
 
9837
cat > conftest.$ac_ext <<EOF
 
9838
#line 9839 "configure"
 
9839
#include "confdefs.h"
 
9840
/* Override any gcc2 internal prototype to avoid an error.  */
 
9841
/* We use char because int might match the return type of a gcc2
 
9842
    builtin and then its argument prototype would still apply.  */
 
9843
char mysql_query();
 
9844
 
 
9845
int main() {
 
9846
mysql_query()
 
9847
; return 0; }
 
9848
EOF
 
9849
if { (eval echo configure:9850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
9850
  rm -rf conftest*
 
9851
  eval "ac_cv_lib_$ac_lib_var=yes"
 
9852
else
 
9853
  echo "configure: failed program was:" >&5
 
9854
  cat conftest.$ac_ext >&5
 
9855
  rm -rf conftest*
 
9856
  eval "ac_cv_lib_$ac_lib_var=no"
 
9857
fi
 
9858
rm -f conftest*
 
9859
LIBS="$ac_save_LIBS"
 
9860
 
 
9861
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
9862
  echo "$ac_t""yes" 1>&6
 
9863
  MYSQLLIB="$MYSQLLIB -lmysqlclient $ZLIB $SOCKLIB $MATHLIB"
 
9864
else
 
9865
  echo "$ac_t""no" 1>&6
 
9866
 
 
9867
LDFLAGS=${ac_save_ldflags}
 
9868
 
 
9869
    { echo "configure: error: *** Unable to locate MySQL library." 1>&2; exit 1; }
 
9870
 
 
9871
 
 
9872
fi
 
9873
 
 
9874
 
 
9875
 
 
9876
 
 
9877
fi
 
9878
 
 
9879
 
 
9880
 
 
9881
 
 
9882
 
 
9883
 
 
9884
 
 
9885
fi
 
9886
 
 
9887
 
 
9888
 
 
9889
 
 
9890
fi
 
9891
 
 
9892
 
 
9893
 
 
9894
 
 
9895
 
 
9896
 
 
9897
 
 
9898
 
 
9899
 
 
9900
 
 
9901
fi
 
9902
 
 
9903
 
 
9904
 
 
9905
 
 
9906
fi
 
9907
 
 
9908
 
 
9909
 
 
9910
 
 
9911
 
 
9912
 
 
9913
 
 
9914
fi
 
9915
 
 
9916
 
 
9917
 
 
9918
 
 
9919
fi
 
9920
 
 
9921
 
 
9922
 
 
9923
 
 
9924
 
 
9925
 
 
9926
 
 
9927
 
 
9928
 
 
9929
 
 
9930
 
 
9931
 
 
9932
LDFLAGS=${ac_save_ldflags}
 
9933
 
 
9934
 
 
9935
  # Check for libmysqld (for embeded version of the driver)
 
9936
  # Extract the first word of "mysql_config", so it can be a program name with args.
 
9937
set dummy mysql_config; ac_word=$2
 
9938
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
9939
echo "configure:9940: checking for $ac_word" >&5
 
9940
 
 
9941
case "$MYSQLD_CONFIG" in
 
9942
  /*)
 
9943
  ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a path.
 
9944
  ;;
 
9945
  ?:/*)                  
 
9946
  ac_cv_path_MYSQLD_CONFIG="$MYSQLD_CONFIG" # Let the user override the test with a dos path.
 
9947
  ;;
 
9948
  *)
 
9949
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
9950
  ac_dummy="$PATH"
 
9951
  for ac_dir in $ac_dummy; do 
 
9952
    test -z "$ac_dir" && ac_dir=.
 
9953
    if test -f $ac_dir/$ac_word; then
 
9954
      ac_cv_path_MYSQLD_CONFIG="$ac_dir/$ac_word"
 
9955
      break
 
9956
    fi
 
9957
  done
 
9958
  IFS="$ac_save_ifs"
 
9959
  test -z "$ac_cv_path_MYSQLD_CONFIG" && ac_cv_path_MYSQLD_CONFIG="no"
 
9960
  ;;
 
9961
esac
 
9962
MYSQLD_CONFIG="$ac_cv_path_MYSQLD_CONFIG"
 
9963
if test -n "$MYSQLD_CONFIG"; then
 
9964
  echo "$ac_t""$MYSQLD_CONFIG" 1>&6
 
9965
else
 
9966
  echo "$ac_t""no" 1>&6
 
9967
fi
 
9968
 
 
9969
 
 
9970
  if test "$MYSQLD_CONFIG" = "no" ; then
 
9971
    { echo "configure: error: *** couldn't find mysql_config" 1>&2; exit 1; }
 
9972
  fi
 
9973
 
 
9974
  if test "$MYSQLD_CONFIG" != "" ; then
 
9975
    ac_save_libs="$LIBS"
 
9976
    MYSQLDLIB=`"$MYSQLD_CONFIG" --libmysqld-libs`
 
9977
 
 
9978
    LIBS="$MYSQLDLIB $LIBS"
 
9979
    echo $ac_n "checking for mysql_server_init""... $ac_c" 1>&6
 
9980
echo "configure:9981: checking for mysql_server_init" >&5
 
9981
 
 
9982
cat > conftest.$ac_ext <<EOF
 
9983
#line 9984 "configure"
 
9984
#include "confdefs.h"
 
9985
/* System header to define __stub macros and hopefully few prototypes,
 
9986
    which can conflict with char mysql_server_init(); below.  */
 
9987
#include <assert.h>
 
9988
/* Override any gcc2 internal prototype to avoid an error.  */
 
9989
/* We use char because int might match the return type of a gcc2
 
9990
    builtin and then its argument prototype would still apply.  */
 
9991
char mysql_server_init();
 
9992
 
 
9993
int main() {
 
9994
 
 
9995
/* The GNU C library defines this for functions which it implements
 
9996
    to always fail with ENOSYS.  Some functions are actually named
 
9997
    something starting with __ and the normal name is an alias.  */
 
9998
#if defined (__stub_mysql_server_init) || defined (__stub___mysql_server_init)
 
9999
choke me
 
10000
#else
 
10001
mysql_server_init();
 
10002
#endif
 
10003
 
 
10004
; return 0; }
 
10005
EOF
 
10006
if { (eval echo configure:10007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10007
  rm -rf conftest*
 
10008
  eval "ac_cv_func_mysql_server_init=yes"
 
10009
else
 
10010
  echo "configure: failed program was:" >&5
 
10011
  cat conftest.$ac_ext >&5
 
10012
  rm -rf conftest*
 
10013
  eval "ac_cv_func_mysql_server_init=no"
 
10014
fi
 
10015
rm -f conftest*
 
10016
 
 
10017
if eval "test \"`echo '$ac_cv_func_'mysql_server_init`\" = yes"; then
 
10018
  echo "$ac_t""yes" 1>&6
 
10019
  :
 
10020
else
 
10021
  echo "$ac_t""no" 1>&6
 
10022
MYSQLDLIB="";
 
10023
                  echo "configure: warning: libmysqld not found" 1>&2 
 
10024
fi
 
10025
 
 
10026
    LIBS=$ac_save_libs
 
10027
  fi
 
10028
 
 
10029
fi # $USE_MYSQL
 
10030
 
 
10031
 
 
10032
 
 
10033
 
 
10034
 
 
10035
 
 
10036
 
 
10037
 
 
10038
# Done checking MySQL
 
10039
 
 
10040
# Enable SQLite option
 
10041
 
 
10042
 
 
10043
echo $ac_n "checking whether to use SQLite""... $ac_c" 1>&6
 
10044
echo "configure:10045: checking whether to use SQLite" >&5
 
10045
echo "$ac_t"""$with_sqlite"" 1>&6
 
10046
case "$with_sqlite" in
 
10047
        "no")   USE_SQLITE=     ;;
 
10048
        "yes")  USE_SQLITE="1"  ;;
 
10049
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
10050
esac
 
10051
 
 
10052
 
 
10053
 
 
10054
SQLITEINCPATH=
 
10055
SQLITELIBPATH=
 
10056
SQLITELIB=
 
10057
 
 
10058
if test -n "$USE_SQLITE"; then
 
10059
 
 
10060
# With SQLite includes directory
 
10061
 
 
10062
 
 
10063
echo $ac_n "checking for location of SQLite includes""... $ac_c" 1>&6
 
10064
echo "configure:10065: checking for location of SQLite includes" >&5
 
10065
case "$with_sqlite_includes" in
 
10066
y | ye | yes | n | no)
 
10067
        { echo "configure: error: *** You must supply a directory to --with-sqlite-includes." 1>&2; exit 1; }
 
10068
        ;;
 
10069
esac
 
10070
echo "$ac_t""$with_sqlite_includes" 1>&6
 
10071
 
 
10072
if test -n "$with_sqlite_includes" ; then
 
10073
    for dir in $with_sqlite_includes; do
 
10074
        if test -d "$dir"; then
 
10075
            SQLITEINCPATH="$SQLITEINCPATH -I$dir"
 
10076
        else
 
10077
            { echo "configure: error: *** SQLite includes directory $dir does not exist." 1>&2; exit 1; }
 
10078
        fi
 
10079
    done
 
10080
fi
 
10081
 
 
10082
 
 
10083
 
 
10084
ac_save_cppflags="$CPPFLAGS"
 
10085
CPPFLAGS="$SQLITEINCPATH $CPPFLAGS"
 
10086
for ac_hdr in sqlite3.h
 
10087
do
 
10088
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
10089
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
10090
echo "configure:10091: checking for $ac_hdr" >&5
 
10091
 
 
10092
cat > conftest.$ac_ext <<EOF
 
10093
#line 10094 "configure"
 
10094
#include "confdefs.h"
 
10095
#include <$ac_hdr>
 
10096
EOF
 
10097
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
10098
{ (eval echo configure:10099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
10099
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
10100
if test -z "$ac_err"; then
 
10101
  rm -rf conftest*
 
10102
  eval "ac_cv_header_$ac_safe=yes"
 
10103
else
 
10104
  echo "$ac_err" >&5
 
10105
  echo "configure: failed program was:" >&5
 
10106
  cat conftest.$ac_ext >&5
 
10107
  rm -rf conftest*
 
10108
  eval "ac_cv_header_$ac_safe=no"
 
10109
fi
 
10110
rm -f conftest*
 
10111
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
10112
  echo "$ac_t""yes" 1>&6
 
10113
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
10114
  cat >> confdefs.h <<EOF
 
10115
#define $ac_tr_hdr 1
 
10116
EOF
 
10117
 
 
10118
else
 
10119
  echo "$ac_t""no" 1>&6
 
10120
{ echo "configure: error: *** Unable to locate SQLite includes." 1>&2; exit 1; }
 
10121
 
 
10122
fi
 
10123
done
 
10124
 
 
10125
CPPFLAGS=$ac_save_cppflags
 
10126
 
 
10127
 
 
10128
cat >> confdefs.h <<\EOF
 
10129
#define HAVE_SQLITE 1
 
10130
EOF
 
10131
 
 
10132
 
 
10133
fi # $USE_SQLITE
 
10134
 
 
10135
if test -n "$USE_SQLITE"; then
 
10136
 
 
10137
# With SQLite library directory
 
10138
 
 
10139
 
 
10140
echo $ac_n "checking for location of SQLite library""... $ac_c" 1>&6
 
10141
echo "configure:10142: checking for location of SQLite library" >&5
 
10142
case "$with_sqlite_libs" in
 
10143
y | ye | yes | n | no)
 
10144
        { echo "configure: error: *** You must supply a directory to --with-sqlite-libs." 1>&2; exit 1; }
 
10145
        ;;
 
10146
esac
 
10147
echo "$ac_t""$with_sqlite_libs" 1>&6
 
10148
 
 
10149
if test -n "$with_sqlite_libs"; then
 
10150
    for dir in $with_sqlite_libs; do
 
10151
        if test -d "$dir"; then
 
10152
            SQLITELIBPATH="$SQLITELIBPATH -L$dir"
 
10153
        else
 
10154
            { echo "configure: error: *** SQLite library directory $dir does not exist." 1>&2; exit 1; }
 
10155
        fi
 
10156
    done
 
10157
fi
 
10158
 
 
10159
 
 
10160
 
 
10161
ac_save_ldflags="$LDFLAGS"
 
10162
LDFLAGS="$SQLITELIBPATH $LDFLAGS"
 
10163
 
 
10164
 
 
10165
 
 
10166
 
 
10167
 
 
10168
 
 
10169
echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
 
10170
echo "configure:10171: checking for sqlite3_open in -lsqlite3" >&5
 
10171
ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
 
10172
 
 
10173
ac_save_LIBS="$LIBS"
 
10174
LIBS="-lsqlite3  $LIBS"
 
10175
cat > conftest.$ac_ext <<EOF
 
10176
#line 10177 "configure"
 
10177
#include "confdefs.h"
 
10178
/* Override any gcc2 internal prototype to avoid an error.  */
 
10179
/* We use char because int might match the return type of a gcc2
 
10180
    builtin and then its argument prototype would still apply.  */
 
10181
char sqlite3_open();
 
10182
 
 
10183
int main() {
 
10184
sqlite3_open()
 
10185
; return 0; }
 
10186
EOF
 
10187
if { (eval echo configure:10188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10188
  rm -rf conftest*
 
10189
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10190
else
 
10191
  echo "configure: failed program was:" >&5
 
10192
  cat conftest.$ac_ext >&5
 
10193
  rm -rf conftest*
 
10194
  eval "ac_cv_lib_$ac_lib_var=no"
 
10195
fi
 
10196
rm -f conftest*
 
10197
LIBS="$ac_save_LIBS"
 
10198
 
 
10199
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10200
  echo "$ac_t""yes" 1>&6
 
10201
  SQLITELIB="$SQLITELIB -lsqlite3 "
 
10202
else
 
10203
  echo "$ac_t""no" 1>&6
 
10204
 
 
10205
echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
 
10206
echo "configure:10207: checking for sqlite3_open in -lsqlite3" >&5
 
10207
ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
 
10208
 
 
10209
ac_save_LIBS="$LIBS"
 
10210
LIBS="-lsqlite3 $DLLIB $LIBS"
 
10211
cat > conftest.$ac_ext <<EOF
 
10212
#line 10213 "configure"
 
10213
#include "confdefs.h"
 
10214
/* Override any gcc2 internal prototype to avoid an error.  */
 
10215
/* We use char because int might match the return type of a gcc2
 
10216
    builtin and then its argument prototype would still apply.  */
 
10217
char sqlite3_open();
 
10218
 
 
10219
int main() {
 
10220
sqlite3_open()
 
10221
; return 0; }
 
10222
EOF
 
10223
if { (eval echo configure:10224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10224
  rm -rf conftest*
 
10225
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10226
else
 
10227
  echo "configure: failed program was:" >&5
 
10228
  cat conftest.$ac_ext >&5
 
10229
  rm -rf conftest*
 
10230
  eval "ac_cv_lib_$ac_lib_var=no"
 
10231
fi
 
10232
rm -f conftest*
 
10233
LIBS="$ac_save_LIBS"
 
10234
 
 
10235
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10236
  echo "$ac_t""yes" 1>&6
 
10237
  SQLITELIB="$SQLITELIB -lsqlite3 $DLLIB"
 
10238
else
 
10239
  echo "$ac_t""no" 1>&6
 
10240
 
 
10241
echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
 
10242
echo "configure:10243: checking for sqlite3_open in -lsqlite3" >&5
 
10243
ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
 
10244
 
 
10245
ac_save_LIBS="$LIBS"
 
10246
LIBS="-lsqlite3 $MATHLIB $LIBS"
 
10247
cat > conftest.$ac_ext <<EOF
 
10248
#line 10249 "configure"
 
10249
#include "confdefs.h"
 
10250
/* Override any gcc2 internal prototype to avoid an error.  */
 
10251
/* We use char because int might match the return type of a gcc2
 
10252
    builtin and then its argument prototype would still apply.  */
 
10253
char sqlite3_open();
 
10254
 
 
10255
int main() {
 
10256
sqlite3_open()
 
10257
; return 0; }
 
10258
EOF
 
10259
if { (eval echo configure:10260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10260
  rm -rf conftest*
 
10261
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10262
else
 
10263
  echo "configure: failed program was:" >&5
 
10264
  cat conftest.$ac_ext >&5
 
10265
  rm -rf conftest*
 
10266
  eval "ac_cv_lib_$ac_lib_var=no"
 
10267
fi
 
10268
rm -f conftest*
 
10269
LIBS="$ac_save_LIBS"
 
10270
 
 
10271
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10272
  echo "$ac_t""yes" 1>&6
 
10273
  SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB"
 
10274
else
 
10275
  echo "$ac_t""no" 1>&6
 
10276
 
 
10277
echo $ac_n "checking for sqlite3_open in -lsqlite3""... $ac_c" 1>&6
 
10278
echo "configure:10279: checking for sqlite3_open in -lsqlite3" >&5
 
10279
ac_lib_var=`echo sqlite3'_'sqlite3_open | sed 'y%./+-%__p_%'`
 
10280
 
 
10281
ac_save_LIBS="$LIBS"
 
10282
LIBS="-lsqlite3 $MATHLIB $DLLIB $LIBS"
 
10283
cat > conftest.$ac_ext <<EOF
 
10284
#line 10285 "configure"
 
10285
#include "confdefs.h"
 
10286
/* Override any gcc2 internal prototype to avoid an error.  */
 
10287
/* We use char because int might match the return type of a gcc2
 
10288
    builtin and then its argument prototype would still apply.  */
 
10289
char sqlite3_open();
 
10290
 
 
10291
int main() {
 
10292
sqlite3_open()
 
10293
; return 0; }
 
10294
EOF
 
10295
if { (eval echo configure:10296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10296
  rm -rf conftest*
 
10297
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10298
else
 
10299
  echo "configure: failed program was:" >&5
 
10300
  cat conftest.$ac_ext >&5
 
10301
  rm -rf conftest*
 
10302
  eval "ac_cv_lib_$ac_lib_var=no"
 
10303
fi
 
10304
rm -f conftest*
 
10305
LIBS="$ac_save_LIBS"
 
10306
 
 
10307
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10308
  echo "$ac_t""yes" 1>&6
 
10309
  SQLITELIB="$SQLITELIB -lsqlite3 $MATHLIB $DLLIB"
 
10310
else
 
10311
  echo "$ac_t""no" 1>&6
 
10312
 
 
10313
LDFLAGS=${ac_save_ldflags}
 
10314
 
 
10315
    { echo "configure: error: *** Unable to locate SQLite library." 1>&2; exit 1; }
 
10316
 
 
10317
 
 
10318
fi
 
10319
 
 
10320
 
 
10321
 
 
10322
 
 
10323
fi
 
10324
 
 
10325
 
 
10326
 
 
10327
 
 
10328
 
 
10329
 
 
10330
 
 
10331
fi
 
10332
 
 
10333
 
 
10334
 
 
10335
 
 
10336
fi
 
10337
 
 
10338
 
 
10339
 
 
10340
 
 
10341
 
 
10342
 
 
10343
 
 
10344
 
 
10345
 
 
10346
LDFLAGS=${ac_save_ldflags}
 
10347
 
 
10348
 
 
10349
fi # $USE_SQLITE
 
10350
 
 
10351
 
 
10352
 
 
10353
 
 
10354
 
 
10355
 
 
10356
 
 
10357
# Done checking SQLite
 
10358
 
 
10359
 
 
10360
# Enable FFMPEG option
 
10361
 
 
10362
 
 
10363
echo $ac_n "checking whether to use FFMPEG""... $ac_c" 1>&6
 
10364
echo "configure:10365: checking whether to use FFMPEG" >&5
 
10365
echo "$ac_t"""$with_ffmpeg"" 1>&6
 
10366
case "$with_ffmpeg" in
 
10367
        "no")   USE_FFMPEG=     ;;
 
10368
        "yes")  USE_FFMPEG="1"  ;;
 
10369
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
10370
esac
 
10371
 
 
10372
 
 
10373
 
 
10374
FFMPEGINCPATH=
 
10375
FFMPEGLIBPATH=
 
10376
FFMPEGLIB=
 
10377
 
 
10378
if test -n "$USE_FFMPEG"; then
 
10379
 
 
10380
# With FFMPEG includes directory
 
10381
 
 
10382
 
 
10383
echo $ac_n "checking for location of FFMPEG includes""... $ac_c" 1>&6
 
10384
echo "configure:10385: checking for location of FFMPEG includes" >&5
 
10385
case "$with_ffmpeg_includes" in
 
10386
y | ye | yes | n | no)
 
10387
        { echo "configure: error: *** You must supply a directory to --with-ffmpeg-includes." 1>&2; exit 1; }
 
10388
        ;;
 
10389
esac
 
10390
echo "$ac_t""$with_ffmpeg_includes" 1>&6
 
10391
 
 
10392
if test -n "$with_ffmpeg_includes" ; then
 
10393
    for dir in $with_ffmpeg_includes; do
 
10394
        if test -d "$dir"; then
 
10395
            FFMPEGINCPATH="$FFMPEGINCPATH -I$dir"
 
10396
        else
 
10397
            { echo "configure: error: *** FFMPEG includes directory $dir does not exist." 1>&2; exit 1; }
 
10398
        fi
 
10399
    done
 
10400
fi
 
10401
 
 
10402
 
 
10403
 
 
10404
ac_save_cppflags="$CPPFLAGS"
 
10405
CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
 
10406
for ac_hdr in avcodec.h
 
10407
do
 
10408
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
10409
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
10410
echo "configure:10411: checking for $ac_hdr" >&5
 
10411
 
 
10412
cat > conftest.$ac_ext <<EOF
 
10413
#line 10414 "configure"
 
10414
#include "confdefs.h"
 
10415
#include <$ac_hdr>
 
10416
EOF
 
10417
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
10418
{ (eval echo configure:10419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
10419
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
10420
if test -z "$ac_err"; then
 
10421
  rm -rf conftest*
 
10422
  eval "ac_cv_header_$ac_safe=yes"
 
10423
else
 
10424
  echo "$ac_err" >&5
 
10425
  echo "configure: failed program was:" >&5
 
10426
  cat conftest.$ac_ext >&5
 
10427
  rm -rf conftest*
 
10428
  eval "ac_cv_header_$ac_safe=no"
 
10429
fi
 
10430
rm -f conftest*
 
10431
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
10432
  echo "$ac_t""yes" 1>&6
 
10433
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
10434
  cat >> confdefs.h <<EOF
 
10435
#define $ac_tr_hdr 1
 
10436
EOF
 
10437
 
 
10438
else
 
10439
  echo "$ac_t""no" 1>&6
 
10440
{ echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
 
10441
 
 
10442
fi
 
10443
done
 
10444
 
 
10445
CPPFLAGS=$ac_save_cppflags
 
10446
 
 
10447
 
 
10448
ac_save_cppflags="$CPPFLAGS"
 
10449
CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
 
10450
for ac_hdr in avformat.h
 
10451
do
 
10452
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
10453
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
10454
echo "configure:10455: checking for $ac_hdr" >&5
 
10455
 
 
10456
cat > conftest.$ac_ext <<EOF
 
10457
#line 10458 "configure"
 
10458
#include "confdefs.h"
 
10459
#include <$ac_hdr>
 
10460
EOF
 
10461
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
10462
{ (eval echo configure:10463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
10463
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
10464
if test -z "$ac_err"; then
 
10465
  rm -rf conftest*
 
10466
  eval "ac_cv_header_$ac_safe=yes"
 
10467
else
 
10468
  echo "$ac_err" >&5
 
10469
  echo "configure: failed program was:" >&5
 
10470
  cat conftest.$ac_ext >&5
 
10471
  rm -rf conftest*
 
10472
  eval "ac_cv_header_$ac_safe=no"
 
10473
fi
 
10474
rm -f conftest*
 
10475
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
10476
  echo "$ac_t""yes" 1>&6
 
10477
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
10478
  cat >> confdefs.h <<EOF
 
10479
#define $ac_tr_hdr 1
 
10480
EOF
 
10481
 
 
10482
else
 
10483
  echo "$ac_t""no" 1>&6
 
10484
{ echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
 
10485
 
 
10486
fi
 
10487
done
 
10488
 
 
10489
CPPFLAGS=$ac_save_cppflags
 
10490
 
 
10491
 
 
10492
ac_save_cppflags="$CPPFLAGS"
 
10493
CPPFLAGS="$FFMPEGINCPATH $CPPFLAGS"
 
10494
for ac_hdr in swscale.h
 
10495
do
 
10496
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
10497
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
10498
echo "configure:10499: checking for $ac_hdr" >&5
 
10499
 
 
10500
cat > conftest.$ac_ext <<EOF
 
10501
#line 10502 "configure"
 
10502
#include "confdefs.h"
 
10503
#include <$ac_hdr>
 
10504
EOF
 
10505
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
10506
{ (eval echo configure:10507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
10507
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
10508
if test -z "$ac_err"; then
 
10509
  rm -rf conftest*
 
10510
  eval "ac_cv_header_$ac_safe=yes"
 
10511
else
 
10512
  echo "$ac_err" >&5
 
10513
  echo "configure: failed program was:" >&5
 
10514
  cat conftest.$ac_ext >&5
 
10515
  rm -rf conftest*
 
10516
  eval "ac_cv_header_$ac_safe=no"
 
10517
fi
 
10518
rm -f conftest*
 
10519
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
10520
  echo "$ac_t""yes" 1>&6
 
10521
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
10522
  cat >> confdefs.h <<EOF
 
10523
#define $ac_tr_hdr 1
 
10524
EOF
 
10525
 
 
10526
else
 
10527
  echo "$ac_t""no" 1>&6
 
10528
{ echo "configure: error: *** Unable to locate FFMPEG includes." 1>&2; exit 1; }
 
10529
 
 
10530
fi
 
10531
done
 
10532
 
 
10533
CPPFLAGS=$ac_save_cppflags
 
10534
 
 
10535
 
 
10536
cat >> confdefs.h <<\EOF
 
10537
#define HAVE_FFMPEG 1
 
10538
EOF
 
10539
 
 
10540
 
 
10541
fi # $USE_FFMPEG
 
10542
 
 
10543
if test -n "$USE_FFMPEG"; then
 
10544
 
 
10545
# With FFMPEG library directory
 
10546
 
 
10547
 
 
10548
echo $ac_n "checking for location of FFMPEG library""... $ac_c" 1>&6
 
10549
echo "configure:10550: checking for location of FFMPEG library" >&5
 
10550
case "$with_ffmpeg_libs" in
 
10551
y | ye | yes | n | no)
 
10552
        { echo "configure: error: *** You must supply a directory to --with-ffmpeg-libs." 1>&2; exit 1; }
 
10553
        ;;
 
10554
esac
 
10555
echo "$ac_t""$with_ffmpeg_libs" 1>&6
 
10556
 
 
10557
if test -n "$with_ffmpeg_libs"; then
 
10558
    for dir in $with_ffmpeg_libs; do
 
10559
        if test -d "$dir"; then
 
10560
            FFMPEGLIBPATH="$FFMPEGLIBPATH -L$dir"
 
10561
        else
 
10562
            { echo "configure: error: *** FFMPEG library directory $dir does not exist." 1>&2; exit 1; }
 
10563
        fi
 
10564
    done
 
10565
fi
 
10566
 
 
10567
 
 
10568
 
 
10569
ac_save_ldflags="$LDFLAGS"
 
10570
LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
 
10571
 
 
10572
 
 
10573
 
 
10574
 
 
10575
echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
 
10576
echo "configure:10577: checking for av_free in -lavutil" >&5
 
10577
ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
 
10578
 
 
10579
ac_save_LIBS="$LIBS"
 
10580
LIBS="-lavutil  $LIBS"
 
10581
cat > conftest.$ac_ext <<EOF
 
10582
#line 10583 "configure"
 
10583
#include "confdefs.h"
 
10584
/* Override any gcc2 internal prototype to avoid an error.  */
 
10585
/* We use char because int might match the return type of a gcc2
 
10586
    builtin and then its argument prototype would still apply.  */
 
10587
char av_free();
 
10588
 
 
10589
int main() {
 
10590
av_free()
 
10591
; return 0; }
 
10592
EOF
 
10593
if { (eval echo configure:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10594
  rm -rf conftest*
 
10595
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10596
else
 
10597
  echo "configure: failed program was:" >&5
 
10598
  cat conftest.$ac_ext >&5
 
10599
  rm -rf conftest*
 
10600
  eval "ac_cv_lib_$ac_lib_var=no"
 
10601
fi
 
10602
rm -f conftest*
 
10603
LIBS="$ac_save_LIBS"
 
10604
 
 
10605
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10606
  echo "$ac_t""yes" 1>&6
 
10607
  FFMPEGLIB="$FFMPEGLIB -lavutil "
 
10608
else
 
10609
  echo "$ac_t""no" 1>&6
 
10610
 
 
10611
echo $ac_n "checking for av_free in -lavutil""... $ac_c" 1>&6
 
10612
echo "configure:10613: checking for av_free in -lavutil" >&5
 
10613
ac_lib_var=`echo avutil'_'av_free | sed 'y%./+-%__p_%'`
 
10614
 
 
10615
ac_save_LIBS="$LIBS"
 
10616
LIBS="-lavutil $MATHLIB $LIBS"
 
10617
cat > conftest.$ac_ext <<EOF
 
10618
#line 10619 "configure"
 
10619
#include "confdefs.h"
 
10620
/* Override any gcc2 internal prototype to avoid an error.  */
 
10621
/* We use char because int might match the return type of a gcc2
 
10622
    builtin and then its argument prototype would still apply.  */
 
10623
char av_free();
 
10624
 
 
10625
int main() {
 
10626
av_free()
 
10627
; return 0; }
 
10628
EOF
 
10629
if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10630
  rm -rf conftest*
 
10631
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10632
else
 
10633
  echo "configure: failed program was:" >&5
 
10634
  cat conftest.$ac_ext >&5
 
10635
  rm -rf conftest*
 
10636
  eval "ac_cv_lib_$ac_lib_var=no"
 
10637
fi
 
10638
rm -f conftest*
 
10639
LIBS="$ac_save_LIBS"
 
10640
 
 
10641
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10642
  echo "$ac_t""yes" 1>&6
 
10643
  FFMPEGLIB="$FFMPEGLIB -lavutil $MATHLIB"
 
10644
else
 
10645
  echo "$ac_t""no" 1>&6
 
10646
 
 
10647
LDFLAGS=${ac_save_ldflags}
 
10648
 
 
10649
    { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
 
10650
 
 
10651
 
 
10652
fi
 
10653
 
 
10654
 
 
10655
 
 
10656
 
 
10657
fi
 
10658
 
 
10659
 
 
10660
 
 
10661
 
 
10662
 
 
10663
 
 
10664
LDFLAGS=${ac_save_ldflags}
 
10665
 
 
10666
 
 
10667
ac_save_ldflags="$LDFLAGS"
 
10668
LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
 
10669
 
 
10670
 
 
10671
 
 
10672
 
 
10673
echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
 
10674
echo "configure:10675: checking for avcodec_init in -lavcodec" >&5
 
10675
ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
 
10676
 
 
10677
ac_save_LIBS="$LIBS"
 
10678
LIBS="-lavcodec $FFMPEGLIB  $LIBS"
 
10679
cat > conftest.$ac_ext <<EOF
 
10680
#line 10681 "configure"
 
10681
#include "confdefs.h"
 
10682
/* Override any gcc2 internal prototype to avoid an error.  */
 
10683
/* We use char because int might match the return type of a gcc2
 
10684
    builtin and then its argument prototype would still apply.  */
 
10685
char avcodec_init();
 
10686
 
 
10687
int main() {
 
10688
avcodec_init()
 
10689
; return 0; }
 
10690
EOF
 
10691
if { (eval echo configure:10692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10692
  rm -rf conftest*
 
10693
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10694
else
 
10695
  echo "configure: failed program was:" >&5
 
10696
  cat conftest.$ac_ext >&5
 
10697
  rm -rf conftest*
 
10698
  eval "ac_cv_lib_$ac_lib_var=no"
 
10699
fi
 
10700
rm -f conftest*
 
10701
LIBS="$ac_save_LIBS"
 
10702
 
 
10703
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10704
  echo "$ac_t""yes" 1>&6
 
10705
  FFMPEGLIB="$FFMPEGLIB -lavcodec "
 
10706
else
 
10707
  echo "$ac_t""no" 1>&6
 
10708
 
 
10709
echo $ac_n "checking for avcodec_init in -lavcodec""... $ac_c" 1>&6
 
10710
echo "configure:10711: checking for avcodec_init in -lavcodec" >&5
 
10711
ac_lib_var=`echo avcodec'_'avcodec_init | sed 'y%./+-%__p_%'`
 
10712
 
 
10713
ac_save_LIBS="$LIBS"
 
10714
LIBS="-lavcodec $FFMPEGLIB $MATHLIB $LIBS"
 
10715
cat > conftest.$ac_ext <<EOF
 
10716
#line 10717 "configure"
 
10717
#include "confdefs.h"
 
10718
/* Override any gcc2 internal prototype to avoid an error.  */
 
10719
/* We use char because int might match the return type of a gcc2
 
10720
    builtin and then its argument prototype would still apply.  */
 
10721
char avcodec_init();
 
10722
 
 
10723
int main() {
 
10724
avcodec_init()
 
10725
; return 0; }
 
10726
EOF
 
10727
if { (eval echo configure:10728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10728
  rm -rf conftest*
 
10729
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10730
else
 
10731
  echo "configure: failed program was:" >&5
 
10732
  cat conftest.$ac_ext >&5
 
10733
  rm -rf conftest*
 
10734
  eval "ac_cv_lib_$ac_lib_var=no"
 
10735
fi
 
10736
rm -f conftest*
 
10737
LIBS="$ac_save_LIBS"
 
10738
 
 
10739
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10740
  echo "$ac_t""yes" 1>&6
 
10741
  FFMPEGLIB="$FFMPEGLIB -lavcodec $MATHLIB"
 
10742
else
 
10743
  echo "$ac_t""no" 1>&6
 
10744
 
 
10745
LDFLAGS=${ac_save_ldflags}
 
10746
 
 
10747
    { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
 
10748
 
 
10749
 
 
10750
fi
 
10751
 
 
10752
 
 
10753
 
 
10754
 
 
10755
fi
 
10756
 
 
10757
 
 
10758
 
 
10759
 
 
10760
 
 
10761
 
 
10762
LDFLAGS=${ac_save_ldflags}
 
10763
 
 
10764
 
 
10765
ac_save_ldflags="$LDFLAGS"
 
10766
LDFLAGS="$FFMPEGLIBPATH $LDFLAGS"
 
10767
 
 
10768
 
 
10769
 
 
10770
 
 
10771
echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
 
10772
echo "configure:10773: checking for av_set_parameters in -lavformat" >&5
 
10773
ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
 
10774
 
 
10775
ac_save_LIBS="$LIBS"
 
10776
LIBS="-lavformat $FFMPEGLIB  $LIBS"
 
10777
cat > conftest.$ac_ext <<EOF
 
10778
#line 10779 "configure"
 
10779
#include "confdefs.h"
 
10780
/* Override any gcc2 internal prototype to avoid an error.  */
 
10781
/* We use char because int might match the return type of a gcc2
 
10782
    builtin and then its argument prototype would still apply.  */
 
10783
char av_set_parameters();
 
10784
 
 
10785
int main() {
 
10786
av_set_parameters()
 
10787
; return 0; }
 
10788
EOF
 
10789
if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10790
  rm -rf conftest*
 
10791
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10792
else
 
10793
  echo "configure: failed program was:" >&5
 
10794
  cat conftest.$ac_ext >&5
 
10795
  rm -rf conftest*
 
10796
  eval "ac_cv_lib_$ac_lib_var=no"
 
10797
fi
 
10798
rm -f conftest*
 
10799
LIBS="$ac_save_LIBS"
 
10800
 
 
10801
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10802
  echo "$ac_t""yes" 1>&6
 
10803
  FFMPEGLIB="$FFMPEGLIB -lavformat "
 
10804
else
 
10805
  echo "$ac_t""no" 1>&6
 
10806
 
 
10807
echo $ac_n "checking for av_set_parameters in -lavformat""... $ac_c" 1>&6
 
10808
echo "configure:10809: checking for av_set_parameters in -lavformat" >&5
 
10809
ac_lib_var=`echo avformat'_'av_set_parameters | sed 'y%./+-%__p_%'`
 
10810
 
 
10811
ac_save_LIBS="$LIBS"
 
10812
LIBS="-lavformat $FFMPEGLIB $MATHLIB $LIBS"
 
10813
cat > conftest.$ac_ext <<EOF
 
10814
#line 10815 "configure"
 
10815
#include "confdefs.h"
 
10816
/* Override any gcc2 internal prototype to avoid an error.  */
 
10817
/* We use char because int might match the return type of a gcc2
 
10818
    builtin and then its argument prototype would still apply.  */
 
10819
char av_set_parameters();
 
10820
 
 
10821
int main() {
 
10822
av_set_parameters()
 
10823
; return 0; }
 
10824
EOF
 
10825
if { (eval echo configure:10826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
10826
  rm -rf conftest*
 
10827
  eval "ac_cv_lib_$ac_lib_var=yes"
 
10828
else
 
10829
  echo "configure: failed program was:" >&5
 
10830
  cat conftest.$ac_ext >&5
 
10831
  rm -rf conftest*
 
10832
  eval "ac_cv_lib_$ac_lib_var=no"
 
10833
fi
 
10834
rm -f conftest*
 
10835
LIBS="$ac_save_LIBS"
 
10836
 
 
10837
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
10838
  echo "$ac_t""yes" 1>&6
 
10839
  FFMPEGLIB="$FFMPEGLIB -lavformat $MATHLIB"
 
10840
else
 
10841
  echo "$ac_t""no" 1>&6
 
10842
 
 
10843
LDFLAGS=${ac_save_ldflags}
 
10844
 
 
10845
    { echo "configure: error: *** Unable to locate FFMPEG library." 1>&2; exit 1; }
 
10846
 
 
10847
 
 
10848
fi
 
10849
 
 
10850
 
 
10851
 
 
10852
 
 
10853
fi
 
10854
 
 
10855
 
 
10856
 
 
10857
 
 
10858
 
 
10859
 
 
10860
LDFLAGS=${ac_save_ldflags}
 
10861
 
 
10862
 
 
10863
fi # $USE_FFMPEG
 
10864
 
 
10865
 
 
10866
 
 
10867
 
 
10868
 
 
10869
 
 
10870
 
 
10871
# Done checking FFMPEG
 
10872
 
 
10873
# Enable OpenGL option
 
10874
 
 
10875
OPENGLINC=
 
10876
OPENGLLIB=
 
10877
OPENGLULIB=
 
10878
USE_OPENGL=
 
10879
OPENGL_X11=
 
10880
OPENGL_AQUA=
 
10881
OPENGL_WINDOWS=
 
10882
 
 
10883
echo $ac_n "checking whether to use OpenGL""... $ac_c" 1>&6
 
10884
echo "configure:10885: checking whether to use OpenGL" >&5
 
10885
echo "$ac_t"""$with_opengl"" 1>&6
 
10886
case "$with_opengl" in
 
10887
        n|no)
 
10888
                OPENGL_TYPE=none
 
10889
                ;;
 
10890
        y|yes|x|x11|glx)
 
10891
                OPENGL_TYPE=X11
 
10892
                USE_OPENGL=1
 
10893
                OPENGL_X11=1
 
10894
                ;;
 
10895
        aqua|mac|osx|macosx|agl)
 
10896
                OPENGL_TYPE=Aqua
 
10897
                USE_OPENGL=1
 
10898
                OPENGL_AQUA=1
 
10899
                ;;
 
10900
        win|windows|mswin|wgl)
 
10901
                OPENGL_TYPE=Windows
 
10902
                USE_OPENGL=1
 
10903
                OPENGL_WINDOWS=1
 
10904
                ;;
 
10905
        *)
 
10906
                { echo "configure: error: *** Valid arguments for --with-opengl= are yes,no,x11,aqua,windows." 1>&2; exit 1; }
 
10907
                ;;
 
10908
esac
 
10909
 
 
10910
if test -n "$USE_OPENGL" ; then
 
10911
 
 
10912
if test "$OPENGL_X11" = 1 ; then
 
10913
 
 
10914
# With OpenGL includes directory
 
10915
 
 
10916
 
 
10917
echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
 
10918
echo "configure:10919: checking for location of OpenGL includes" >&5
 
10919
case "$with_opengl_includes" in
 
10920
y | ye | yes | n | no)
 
10921
        { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
 
10922
        ;;
 
10923
esac
 
10924
echo "$ac_t""$with_opengl_includes" 1>&6
 
10925
 
 
10926
if test -n "$with_opengl_includes" ; then
 
10927
    for dir in $with_opengl_includes; do
 
10928
        if test -d "$dir"; then
 
10929
            OPENGLINC="$OPENGLINC -I$dir"
 
10930
        else
 
10931
            { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
 
10932
        fi
 
10933
    done
 
10934
fi
 
10935
 
 
10936
 
 
10937
 
 
10938
ac_save_cppflags="$CPPFLAGS"
 
10939
CPPFLAGS="$OPENGLINC $X_CFLAGS $CPPFLAGS"
 
10940
for ac_hdr in GL/gl.h GL/glu.h
 
10941
do
 
10942
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
10943
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
10944
echo "configure:10945: checking for $ac_hdr" >&5
 
10945
 
 
10946
cat > conftest.$ac_ext <<EOF
 
10947
#line 10948 "configure"
 
10948
#include "confdefs.h"
 
10949
#include <$ac_hdr>
 
10950
EOF
 
10951
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
10952
{ (eval echo configure:10953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
10953
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
10954
if test -z "$ac_err"; then
 
10955
  rm -rf conftest*
 
10956
  eval "ac_cv_header_$ac_safe=yes"
 
10957
else
 
10958
  echo "$ac_err" >&5
 
10959
  echo "configure: failed program was:" >&5
 
10960
  cat conftest.$ac_ext >&5
 
10961
  rm -rf conftest*
 
10962
  eval "ac_cv_header_$ac_safe=no"
 
10963
fi
 
10964
rm -f conftest*
 
10965
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
10966
  echo "$ac_t""yes" 1>&6
 
10967
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
10968
  cat >> confdefs.h <<EOF
 
10969
#define $ac_tr_hdr 1
 
10970
EOF
 
10971
 
 
10972
else
 
10973
  echo "$ac_t""no" 1>&6
 
10974
{ echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
 
10975
 
 
10976
fi
 
10977
done
 
10978
 
 
10979
CPPFLAGS=$ac_save_cppflags
 
10980
 
 
10981
 
 
10982
# With OpenGL library directory
 
10983
 
 
10984
 
 
10985
echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
 
10986
echo "configure:10987: checking for location of OpenGL library" >&5
 
10987
case "$with_opengl_libs" in
 
10988
y | ye | yes | n | no)
 
10989
        { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
 
10990
        ;;
 
10991
esac
 
10992
echo "$ac_t""$with_opengl_libs" 1>&6
 
10993
 
 
10994
if test -n "$with_opengl_libs"; then
 
10995
    for dir in $with_opengl_libs; do
 
10996
        if test -d "$dir"; then
 
10997
            OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
 
10998
        else
 
10999
            { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
 
11000
        fi
 
11001
    done
 
11002
fi
 
11003
 
 
11004
 
 
11005
 
 
11006
ac_save_ldflags="$LDFLAGS"
 
11007
LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
 
11008
 
 
11009
 
 
11010
 
 
11011
 
 
11012
 
 
11013
 
 
11014
echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
 
11015
echo "configure:11016: checking for glBegin in -lGL" >&5
 
11016
ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
 
11017
 
 
11018
ac_save_LIBS="$LIBS"
 
11019
LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
11020
cat > conftest.$ac_ext <<EOF
 
11021
#line 11022 "configure"
 
11022
#include "confdefs.h"
 
11023
/* Override any gcc2 internal prototype to avoid an error.  */
 
11024
/* We use char because int might match the return type of a gcc2
 
11025
    builtin and then its argument prototype would still apply.  */
 
11026
char glBegin();
 
11027
 
 
11028
int main() {
 
11029
glBegin()
 
11030
; return 0; }
 
11031
EOF
 
11032
if { (eval echo configure:11033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11033
  rm -rf conftest*
 
11034
  eval "ac_cv_lib_$ac_lib_var=yes"
 
11035
else
 
11036
  echo "configure: failed program was:" >&5
 
11037
  cat conftest.$ac_ext >&5
 
11038
  rm -rf conftest*
 
11039
  eval "ac_cv_lib_$ac_lib_var=no"
 
11040
fi
 
11041
rm -f conftest*
 
11042
LIBS="$ac_save_LIBS"
 
11043
 
 
11044
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
11045
  echo "$ac_t""yes" 1>&6
 
11046
  OPENGLLIB="$OPENGLLIB -lGL "
 
11047
else
 
11048
  echo "$ac_t""no" 1>&6
 
11049
 
 
11050
echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
 
11051
echo "configure:11052: checking for glBegin in -lGL" >&5
 
11052
ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
 
11053
 
 
11054
ac_save_LIBS="$LIBS"
 
11055
LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lXext $LIBS"
 
11056
cat > conftest.$ac_ext <<EOF
 
11057
#line 11058 "configure"
 
11058
#include "confdefs.h"
 
11059
/* Override any gcc2 internal prototype to avoid an error.  */
 
11060
/* We use char because int might match the return type of a gcc2
 
11061
    builtin and then its argument prototype would still apply.  */
 
11062
char glBegin();
 
11063
 
 
11064
int main() {
 
11065
glBegin()
 
11066
; return 0; }
 
11067
EOF
 
11068
if { (eval echo configure:11069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11069
  rm -rf conftest*
 
11070
  eval "ac_cv_lib_$ac_lib_var=yes"
 
11071
else
 
11072
  echo "configure: failed program was:" >&5
 
11073
  cat conftest.$ac_ext >&5
 
11074
  rm -rf conftest*
 
11075
  eval "ac_cv_lib_$ac_lib_var=no"
 
11076
fi
 
11077
rm -f conftest*
 
11078
LIBS="$ac_save_LIBS"
 
11079
 
 
11080
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
11081
  echo "$ac_t""yes" 1>&6
 
11082
  OPENGLLIB="$OPENGLLIB -lGL -lXext"
 
11083
else
 
11084
  echo "$ac_t""no" 1>&6
 
11085
 
 
11086
echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
 
11087
echo "configure:11088: checking for glBegin in -lGL" >&5
 
11088
ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
 
11089
 
 
11090
ac_save_LIBS="$LIBS"
 
11091
LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread $LIBS"
 
11092
cat > conftest.$ac_ext <<EOF
 
11093
#line 11094 "configure"
 
11094
#include "confdefs.h"
 
11095
/* Override any gcc2 internal prototype to avoid an error.  */
 
11096
/* We use char because int might match the return type of a gcc2
 
11097
    builtin and then its argument prototype would still apply.  */
 
11098
char glBegin();
 
11099
 
 
11100
int main() {
 
11101
glBegin()
 
11102
; return 0; }
 
11103
EOF
 
11104
if { (eval echo configure:11105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11105
  rm -rf conftest*
 
11106
  eval "ac_cv_lib_$ac_lib_var=yes"
 
11107
else
 
11108
  echo "configure: failed program was:" >&5
 
11109
  cat conftest.$ac_ext >&5
 
11110
  rm -rf conftest*
 
11111
  eval "ac_cv_lib_$ac_lib_var=no"
 
11112
fi
 
11113
rm -f conftest*
 
11114
LIBS="$ac_save_LIBS"
 
11115
 
 
11116
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
11117
  echo "$ac_t""yes" 1>&6
 
11118
  OPENGLLIB="$OPENGLLIB -lGL -lpthread"
 
11119
else
 
11120
  echo "$ac_t""no" 1>&6
 
11121
 
 
11122
echo $ac_n "checking for glBegin in -lGL""... $ac_c" 1>&6
 
11123
echo "configure:11124: checking for glBegin in -lGL" >&5
 
11124
ac_lib_var=`echo GL'_'glBegin | sed 'y%./+-%__p_%'`
 
11125
 
 
11126
ac_save_LIBS="$LIBS"
 
11127
LIBS="-lGL $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lpthread -lXext $LIBS"
 
11128
cat > conftest.$ac_ext <<EOF
 
11129
#line 11130 "configure"
 
11130
#include "confdefs.h"
 
11131
/* Override any gcc2 internal prototype to avoid an error.  */
 
11132
/* We use char because int might match the return type of a gcc2
 
11133
    builtin and then its argument prototype would still apply.  */
 
11134
char glBegin();
 
11135
 
 
11136
int main() {
 
11137
glBegin()
 
11138
; return 0; }
 
11139
EOF
 
11140
if { (eval echo configure:11141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11141
  rm -rf conftest*
 
11142
  eval "ac_cv_lib_$ac_lib_var=yes"
 
11143
else
 
11144
  echo "configure: failed program was:" >&5
 
11145
  cat conftest.$ac_ext >&5
 
11146
  rm -rf conftest*
 
11147
  eval "ac_cv_lib_$ac_lib_var=no"
 
11148
fi
 
11149
rm -f conftest*
 
11150
LIBS="$ac_save_LIBS"
 
11151
 
 
11152
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
11153
  echo "$ac_t""yes" 1>&6
 
11154
  OPENGLLIB="$OPENGLLIB -lGL -lpthread -lXext"
 
11155
else
 
11156
  echo "$ac_t""no" 1>&6
 
11157
 
 
11158
LDFLAGS=${ac_save_ldflags}
 
11159
 
 
11160
    { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
 
11161
 
 
11162
 
 
11163
fi
 
11164
 
 
11165
 
 
11166
 
 
11167
 
 
11168
fi
 
11169
 
 
11170
 
 
11171
 
 
11172
 
 
11173
 
 
11174
 
 
11175
 
 
11176
fi
 
11177
 
 
11178
 
 
11179
 
 
11180
 
 
11181
fi
 
11182
 
 
11183
 
 
11184
 
 
11185
 
 
11186
 
 
11187
 
 
11188
 
 
11189
 
 
11190
 
 
11191
LDFLAGS=${ac_save_ldflags}
 
11192
 
 
11193
 
 
11194
 
 
11195
ac_save_ldflags="$LDFLAGS"
 
11196
LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
 
11197
 
 
11198
 
 
11199
 
 
11200
 
 
11201
echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
 
11202
echo "configure:11203: checking for gluBeginCurve in -lGLU" >&5
 
11203
ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
 
11204
 
 
11205
ac_save_LIBS="$LIBS"
 
11206
LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
11207
cat > conftest.$ac_ext <<EOF
 
11208
#line 11209 "configure"
 
11209
#include "confdefs.h"
 
11210
/* Override any gcc2 internal prototype to avoid an error.  */
 
11211
/* We use char because int might match the return type of a gcc2
 
11212
    builtin and then its argument prototype would still apply.  */
 
11213
char gluBeginCurve();
 
11214
 
 
11215
int main() {
 
11216
gluBeginCurve()
 
11217
; return 0; }
 
11218
EOF
 
11219
if { (eval echo configure:11220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11220
  rm -rf conftest*
 
11221
  eval "ac_cv_lib_$ac_lib_var=yes"
 
11222
else
 
11223
  echo "configure: failed program was:" >&5
 
11224
  cat conftest.$ac_ext >&5
 
11225
  rm -rf conftest*
 
11226
  eval "ac_cv_lib_$ac_lib_var=no"
 
11227
fi
 
11228
rm -f conftest*
 
11229
LIBS="$ac_save_LIBS"
 
11230
 
 
11231
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
11232
  echo "$ac_t""yes" 1>&6
 
11233
  OPENGLULIB="$OPENGLULIB -lGLU "
 
11234
else
 
11235
  echo "$ac_t""no" 1>&6
 
11236
 
 
11237
echo $ac_n "checking for gluBeginCurve in -lGLU""... $ac_c" 1>&6
 
11238
echo "configure:11239: checking for gluBeginCurve in -lGLU" >&5
 
11239
ac_lib_var=`echo GLU'_'gluBeginCurve | sed 'y%./+-%__p_%'`
 
11240
 
 
11241
ac_save_LIBS="$LIBS"
 
11242
LIBS="-lGLU $OPENGLLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB -lstdc++ $LIBS"
 
11243
cat > conftest.$ac_ext <<EOF
 
11244
#line 11245 "configure"
 
11245
#include "confdefs.h"
 
11246
/* Override any gcc2 internal prototype to avoid an error.  */
 
11247
/* We use char because int might match the return type of a gcc2
 
11248
    builtin and then its argument prototype would still apply.  */
 
11249
char gluBeginCurve();
 
11250
 
 
11251
int main() {
 
11252
gluBeginCurve()
 
11253
; return 0; }
 
11254
EOF
 
11255
if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11256
  rm -rf conftest*
 
11257
  eval "ac_cv_lib_$ac_lib_var=yes"
 
11258
else
 
11259
  echo "configure: failed program was:" >&5
 
11260
  cat conftest.$ac_ext >&5
 
11261
  rm -rf conftest*
 
11262
  eval "ac_cv_lib_$ac_lib_var=no"
 
11263
fi
 
11264
rm -f conftest*
 
11265
LIBS="$ac_save_LIBS"
 
11266
 
 
11267
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
11268
  echo "$ac_t""yes" 1>&6
 
11269
  OPENGLULIB="$OPENGLULIB -lGLU -lstdc++"
 
11270
else
 
11271
  echo "$ac_t""no" 1>&6
 
11272
 
 
11273
LDFLAGS=${ac_save_ldflags}
 
11274
 
 
11275
    { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
 
11276
 
 
11277
 
 
11278
fi
 
11279
 
 
11280
 
 
11281
 
 
11282
 
 
11283
fi
 
11284
 
 
11285
 
 
11286
 
 
11287
 
 
11288
 
 
11289
 
 
11290
LDFLAGS=${ac_save_ldflags}
 
11291
 
 
11292
 
 
11293
OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
 
11294
OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
 
11295
 
 
11296
ac_save_ldflags="$LDFLAGS"
 
11297
LDFLAGS="$LDFLAGS $OPENGLLIB"
 
11298
echo $ac_n "checking for glXCreatePbuffer""... $ac_c" 1>&6
 
11299
echo "configure:11300: checking for glXCreatePbuffer" >&5
 
11300
 
 
11301
cat > conftest.$ac_ext <<EOF
 
11302
#line 11303 "configure"
 
11303
#include "confdefs.h"
 
11304
/* System header to define __stub macros and hopefully few prototypes,
 
11305
    which can conflict with char glXCreatePbuffer(); below.  */
 
11306
#include <assert.h>
 
11307
/* Override any gcc2 internal prototype to avoid an error.  */
 
11308
/* We use char because int might match the return type of a gcc2
 
11309
    builtin and then its argument prototype would still apply.  */
 
11310
char glXCreatePbuffer();
 
11311
 
 
11312
int main() {
 
11313
 
 
11314
/* The GNU C library defines this for functions which it implements
 
11315
    to always fail with ENOSYS.  Some functions are actually named
 
11316
    something starting with __ and the normal name is an alias.  */
 
11317
#if defined (__stub_glXCreatePbuffer) || defined (__stub___glXCreatePbuffer)
 
11318
choke me
 
11319
#else
 
11320
glXCreatePbuffer();
 
11321
#endif
 
11322
 
 
11323
; return 0; }
 
11324
EOF
 
11325
if { (eval echo configure:11326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11326
  rm -rf conftest*
 
11327
  eval "ac_cv_func_glXCreatePbuffer=yes"
 
11328
else
 
11329
  echo "configure: failed program was:" >&5
 
11330
  cat conftest.$ac_ext >&5
 
11331
  rm -rf conftest*
 
11332
  eval "ac_cv_func_glXCreatePbuffer=no"
 
11333
fi
 
11334
rm -f conftest*
 
11335
 
 
11336
if eval "test \"`echo '$ac_cv_func_'glXCreatePbuffer`\" = yes"; then
 
11337
  echo "$ac_t""yes" 1>&6
 
11338
  cat >> confdefs.h <<\EOF
 
11339
#define HAVE_PBUFFERS 1
 
11340
EOF
 
11341
 
 
11342
else
 
11343
  echo "$ac_t""no" 1>&6
 
11344
fi
 
11345
 
 
11346
echo $ac_n "checking for glXCreateGLXPixmap""... $ac_c" 1>&6
 
11347
echo "configure:11348: checking for glXCreateGLXPixmap" >&5
 
11348
 
 
11349
cat > conftest.$ac_ext <<EOF
 
11350
#line 11351 "configure"
 
11351
#include "confdefs.h"
 
11352
/* System header to define __stub macros and hopefully few prototypes,
 
11353
    which can conflict with char glXCreateGLXPixmap(); below.  */
 
11354
#include <assert.h>
 
11355
/* Override any gcc2 internal prototype to avoid an error.  */
 
11356
/* We use char because int might match the return type of a gcc2
 
11357
    builtin and then its argument prototype would still apply.  */
 
11358
char glXCreateGLXPixmap();
 
11359
 
 
11360
int main() {
 
11361
 
 
11362
/* The GNU C library defines this for functions which it implements
 
11363
    to always fail with ENOSYS.  Some functions are actually named
 
11364
    something starting with __ and the normal name is an alias.  */
 
11365
#if defined (__stub_glXCreateGLXPixmap) || defined (__stub___glXCreateGLXPixmap)
 
11366
choke me
 
11367
#else
 
11368
glXCreateGLXPixmap();
 
11369
#endif
 
11370
 
 
11371
; return 0; }
 
11372
EOF
 
11373
if { (eval echo configure:11374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11374
  rm -rf conftest*
 
11375
  eval "ac_cv_func_glXCreateGLXPixmap=yes"
 
11376
else
 
11377
  echo "configure: failed program was:" >&5
 
11378
  cat conftest.$ac_ext >&5
 
11379
  rm -rf conftest*
 
11380
  eval "ac_cv_func_glXCreateGLXPixmap=no"
 
11381
fi
 
11382
rm -f conftest*
 
11383
 
 
11384
if eval "test \"`echo '$ac_cv_func_'glXCreateGLXPixmap`\" = yes"; then
 
11385
  echo "$ac_t""yes" 1>&6
 
11386
  cat >> confdefs.h <<\EOF
 
11387
#define HAVE_PIXMAPS 1
 
11388
EOF
 
11389
 
 
11390
else
 
11391
  echo "$ac_t""no" 1>&6
 
11392
fi
 
11393
 
 
11394
LDFLAGS="${ac_save_ldflags}"
 
11395
 
 
11396
cat >> confdefs.h <<\EOF
 
11397
#define OPENGL_X11 1
 
11398
EOF
 
11399
 
 
11400
 
 
11401
fi # $OPENGL_X11
 
11402
 
 
11403
if test "$OPENGL_AQUA" = 1 ; then
 
11404
 
 
11405
with_opengl_includes=/System/Library/Frameworks/OpenGL.framework/Headers
 
11406
with_opengl_libs="-framework OpenGL -framework AGL -framework ApplicationServices"
 
11407
 
 
11408
# With OpenGL includes directory
 
11409
 
 
11410
 
 
11411
echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
 
11412
echo "configure:11413: checking for location of OpenGL includes" >&5
 
11413
case "$with_opengl_includes" in
 
11414
y | ye | yes | n | no)
 
11415
        { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
 
11416
        ;;
 
11417
esac
 
11418
echo "$ac_t""$with_opengl_includes" 1>&6
 
11419
 
 
11420
if test -n "$with_opengl_includes" ; then
 
11421
    for dir in $with_opengl_includes; do
 
11422
        if test -d "$dir"; then
 
11423
            OPENGLINC="$OPENGLINC -I$dir"
 
11424
        else
 
11425
            { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
 
11426
        fi
 
11427
    done
 
11428
fi
 
11429
 
 
11430
 
 
11431
 
 
11432
ac_save_cppflags="$CPPFLAGS"
 
11433
CPPFLAGS="$OPENGLINC $CPPFLAGS"
 
11434
for ac_hdr in OpenGL/gl.h OpenGL/glu.h
 
11435
do
 
11436
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
11437
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
11438
echo "configure:11439: checking for $ac_hdr" >&5
 
11439
 
 
11440
cat > conftest.$ac_ext <<EOF
 
11441
#line 11442 "configure"
 
11442
#include "confdefs.h"
 
11443
#include <$ac_hdr>
 
11444
EOF
 
11445
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
11446
{ (eval echo configure:11447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
11447
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
11448
if test -z "$ac_err"; then
 
11449
  rm -rf conftest*
 
11450
  eval "ac_cv_header_$ac_safe=yes"
 
11451
else
 
11452
  echo "$ac_err" >&5
 
11453
  echo "configure: failed program was:" >&5
 
11454
  cat conftest.$ac_ext >&5
 
11455
  rm -rf conftest*
 
11456
  eval "ac_cv_header_$ac_safe=no"
 
11457
fi
 
11458
rm -f conftest*
 
11459
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
11460
  echo "$ac_t""yes" 1>&6
 
11461
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
11462
  cat >> confdefs.h <<EOF
 
11463
#define $ac_tr_hdr 1
 
11464
EOF
 
11465
 
 
11466
else
 
11467
  echo "$ac_t""no" 1>&6
 
11468
{ echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
 
11469
 
 
11470
fi
 
11471
done
 
11472
 
 
11473
CPPFLAGS=$ac_save_cppflags
 
11474
 
 
11475
 
 
11476
# With OpenGL library directory
 
11477
 
 
11478
ac_save_ldflags="$LDFLAGS"
 
11479
LDFLAGS="$with_opengl_libs $LDFLAGS"
 
11480
echo $ac_n "checking for glBegin""... $ac_c" 1>&6
 
11481
echo "configure:11482: checking for glBegin" >&5
 
11482
 
 
11483
cat > conftest.$ac_ext <<EOF
 
11484
#line 11485 "configure"
 
11485
#include "confdefs.h"
 
11486
/* System header to define __stub macros and hopefully few prototypes,
 
11487
    which can conflict with char glBegin(); below.  */
 
11488
#include <assert.h>
 
11489
/* Override any gcc2 internal prototype to avoid an error.  */
 
11490
/* We use char because int might match the return type of a gcc2
 
11491
    builtin and then its argument prototype would still apply.  */
 
11492
char glBegin();
 
11493
 
 
11494
int main() {
 
11495
 
 
11496
/* The GNU C library defines this for functions which it implements
 
11497
    to always fail with ENOSYS.  Some functions are actually named
 
11498
    something starting with __ and the normal name is an alias.  */
 
11499
#if defined (__stub_glBegin) || defined (__stub___glBegin)
 
11500
choke me
 
11501
#else
 
11502
glBegin();
 
11503
#endif
 
11504
 
 
11505
; return 0; }
 
11506
EOF
 
11507
if { (eval echo configure:11508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11508
  rm -rf conftest*
 
11509
  eval "ac_cv_func_glBegin=yes"
 
11510
else
 
11511
  echo "configure: failed program was:" >&5
 
11512
  cat conftest.$ac_ext >&5
 
11513
  rm -rf conftest*
 
11514
  eval "ac_cv_func_glBegin=no"
 
11515
fi
 
11516
rm -f conftest*
 
11517
 
 
11518
if eval "test \"`echo '$ac_cv_func_'glBegin`\" = yes"; then
 
11519
  echo "$ac_t""yes" 1>&6
 
11520
  
 
11521
echo $ac_n "checking for gluBeginCurve""... $ac_c" 1>&6
 
11522
echo "configure:11523: checking for gluBeginCurve" >&5
 
11523
 
 
11524
cat > conftest.$ac_ext <<EOF
 
11525
#line 11526 "configure"
 
11526
#include "confdefs.h"
 
11527
/* System header to define __stub macros and hopefully few prototypes,
 
11528
    which can conflict with char gluBeginCurve(); below.  */
 
11529
#include <assert.h>
 
11530
/* Override any gcc2 internal prototype to avoid an error.  */
 
11531
/* We use char because int might match the return type of a gcc2
 
11532
    builtin and then its argument prototype would still apply.  */
 
11533
char gluBeginCurve();
 
11534
 
 
11535
int main() {
 
11536
 
 
11537
/* The GNU C library defines this for functions which it implements
 
11538
    to always fail with ENOSYS.  Some functions are actually named
 
11539
    something starting with __ and the normal name is an alias.  */
 
11540
#if defined (__stub_gluBeginCurve) || defined (__stub___gluBeginCurve)
 
11541
choke me
 
11542
#else
 
11543
gluBeginCurve();
 
11544
#endif
 
11545
 
 
11546
; return 0; }
 
11547
EOF
 
11548
if { (eval echo configure:11549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11549
  rm -rf conftest*
 
11550
  eval "ac_cv_func_gluBeginCurve=yes"
 
11551
else
 
11552
  echo "configure: failed program was:" >&5
 
11553
  cat conftest.$ac_ext >&5
 
11554
  rm -rf conftest*
 
11555
  eval "ac_cv_func_gluBeginCurve=no"
 
11556
fi
 
11557
rm -f conftest*
 
11558
 
 
11559
if eval "test \"`echo '$ac_cv_func_'gluBeginCurve`\" = yes"; then
 
11560
  echo "$ac_t""yes" 1>&6
 
11561
  
 
11562
OPENGLLIB="$with_opengl_libs"
 
11563
USE_OPENGL=1
 
11564
OPENGL_AQUA=1
 
11565
 
 
11566
else
 
11567
  echo "$ac_t""no" 1>&6
 
11568
{ echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
 
11569
fi
 
11570
 
 
11571
 
 
11572
else
 
11573
  echo "$ac_t""no" 1>&6
 
11574
{ echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
 
11575
fi
 
11576
 
 
11577
LDFLAGS="${ac_save_ldflags}"
 
11578
 
 
11579
cat >> confdefs.h <<\EOF
 
11580
#define OPENGL_AQUA 1
 
11581
EOF
 
11582
 
 
11583
 
 
11584
fi # $OPENGL_AQUA
 
11585
 
 
11586
if test "$OPENGL_WINDOWS" = 1 ; then
 
11587
 
 
11588
# With OpenGL includes directory
 
11589
 
 
11590
 
 
11591
echo $ac_n "checking for location of OpenGL includes""... $ac_c" 1>&6
 
11592
echo "configure:11593: checking for location of OpenGL includes" >&5
 
11593
case "$with_opengl_includes" in
 
11594
y | ye | yes | n | no)
 
11595
        { echo "configure: error: *** You must supply a directory to --with-opengl-includes." 1>&2; exit 1; }
 
11596
        ;;
 
11597
esac
 
11598
echo "$ac_t""$with_opengl_includes" 1>&6
 
11599
 
 
11600
if test -n "$with_opengl_includes" ; then
 
11601
    for dir in $with_opengl_includes; do
 
11602
        if test -d "$dir"; then
 
11603
            OPENGLINC="$OPENGLINC -I$dir"
 
11604
        else
 
11605
            { echo "configure: error: *** OpenGL includes directory $dir does not exist." 1>&2; exit 1; }
 
11606
        fi
 
11607
    done
 
11608
fi
 
11609
 
 
11610
 
 
11611
 
 
11612
ac_save_cppflags="$CPPFLAGS"
 
11613
CPPFLAGS="$OPENGLINC $CPPFLAGS"
 
11614
for ac_hdr in GL/gl.h GL/glu.h
 
11615
do
 
11616
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
11617
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
11618
echo "configure:11619: checking for $ac_hdr" >&5
 
11619
 
 
11620
cat > conftest.$ac_ext <<EOF
 
11621
#line 11622 "configure"
 
11622
#include "confdefs.h"
 
11623
#include <$ac_hdr>
 
11624
EOF
 
11625
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
11626
{ (eval echo configure:11627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
11627
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
11628
if test -z "$ac_err"; then
 
11629
  rm -rf conftest*
 
11630
  eval "ac_cv_header_$ac_safe=yes"
 
11631
else
 
11632
  echo "$ac_err" >&5
 
11633
  echo "configure: failed program was:" >&5
 
11634
  cat conftest.$ac_ext >&5
 
11635
  rm -rf conftest*
 
11636
  eval "ac_cv_header_$ac_safe=no"
 
11637
fi
 
11638
rm -f conftest*
 
11639
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
11640
  echo "$ac_t""yes" 1>&6
 
11641
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
11642
  cat >> confdefs.h <<EOF
 
11643
#define $ac_tr_hdr 1
 
11644
EOF
 
11645
 
 
11646
else
 
11647
  echo "$ac_t""no" 1>&6
 
11648
{ echo "configure: error: *** Unable to locate OpenGL includes." 1>&2; exit 1; }
 
11649
 
 
11650
fi
 
11651
done
 
11652
 
 
11653
CPPFLAGS=$ac_save_cppflags
 
11654
 
 
11655
 
 
11656
# With OpenGL library directory
 
11657
 
 
11658
 
 
11659
echo $ac_n "checking for location of OpenGL library""... $ac_c" 1>&6
 
11660
echo "configure:11661: checking for location of OpenGL library" >&5
 
11661
case "$with_opengl_libs" in
 
11662
y | ye | yes | n | no)
 
11663
        { echo "configure: error: *** You must supply a directory to --with-opengl-libs." 1>&2; exit 1; }
 
11664
        ;;
 
11665
esac
 
11666
echo "$ac_t""$with_opengl_libs" 1>&6
 
11667
 
 
11668
if test -n "$with_opengl_libs"; then
 
11669
    for dir in $with_opengl_libs; do
 
11670
        if test -d "$dir"; then
 
11671
            OPENGL_LIB_PATH="$OPENGL_LIB_PATH -L$dir"
 
11672
        else
 
11673
            { echo "configure: error: *** OpenGL library directory $dir does not exist." 1>&2; exit 1; }
 
11674
        fi
 
11675
    done
 
11676
fi
 
11677
 
 
11678
 
 
11679
ac_save_cflags="$CFLAGS"
 
11680
CFLAGS="$CFLAGS $OPENGLINC"
 
11681
 
 
11682
ac_save_ldflags="$LDFLAGS"
 
11683
ac_save_libs="$LIBS"
 
11684
echo $ac_n "checking for OpenGL library""... $ac_c" 1>&6
 
11685
echo "configure:11686: checking for OpenGL library" >&5
 
11686
LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
 
11687
LIBS="-lopengl32  "
 
11688
cat > conftest.$ac_ext <<EOF
 
11689
#line 11690 "configure"
 
11690
#include "confdefs.h"
 
11691
#include <GL/gl.h>
 
11692
int main() {
 
11693
glEnd();
 
11694
; return 0; }
 
11695
EOF
 
11696
if { (eval echo configure:11697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11697
  rm -rf conftest*
 
11698
  
 
11699
echo "$ac_t""found" 1>&6
 
11700
OPENGLLIB="$OPENGLLIB -lopengl32 "
 
11701
 
 
11702
else
 
11703
  echo "configure: failed program was:" >&5
 
11704
  cat conftest.$ac_ext >&5
 
11705
  rm -rf conftest*
 
11706
  
 
11707
 
 
11708
    { echo "configure: error: *** Unable to locate OpenGL library." 1>&2; exit 1; }
 
11709
 
 
11710
 
 
11711
fi
 
11712
rm -f conftest*
 
11713
LIBS=${ac_save_libs}
 
11714
LDFLAGS=${ac_save_ldflags}
 
11715
 
 
11716
 
 
11717
ac_save_ldflags="$LDFLAGS"
 
11718
ac_save_libs="$LIBS"
 
11719
echo $ac_n "checking for GLU library""... $ac_c" 1>&6
 
11720
echo "configure:11721: checking for GLU library" >&5
 
11721
LDFLAGS="$OPENGL_LIB_PATH $LDFLAGS"
 
11722
LIBS="-lglu32 $OPENGLLIB "
 
11723
cat > conftest.$ac_ext <<EOF
 
11724
#line 11725 "configure"
 
11725
#include "confdefs.h"
 
11726
#include <GL/glu.h>
 
11727
int main() {
 
11728
gluNewQuadric();
 
11729
; return 0; }
 
11730
EOF
 
11731
if { (eval echo configure:11732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
11732
  rm -rf conftest*
 
11733
  
 
11734
echo "$ac_t""found" 1>&6
 
11735
OPENGLULIB="$OPENGLULIB -lglu32 "
 
11736
 
 
11737
else
 
11738
  echo "configure: failed program was:" >&5
 
11739
  cat conftest.$ac_ext >&5
 
11740
  rm -rf conftest*
 
11741
  
 
11742
 
 
11743
    { echo "configure: error: *** Unable to locate GLU library." 1>&2; exit 1; }
 
11744
 
 
11745
 
 
11746
fi
 
11747
rm -f conftest*
 
11748
LIBS=${ac_save_libs}
 
11749
LDFLAGS=${ac_save_ldflags}
 
11750
 
 
11751
CFLAGS="${ac_save_cflags}"
 
11752
 
 
11753
OPENGLLIB="$OPENGL_LIB_PATH $OPENGLLIB"
 
11754
OPENGLULIB="$OPENGL_LIB_PATH $OPENGLULIB"
 
11755
 
 
11756
cat >> confdefs.h <<\EOF
 
11757
#define OPENGL_WINDOWS 1
 
11758
EOF
 
11759
 
 
11760
 
 
11761
fi # $OPENGL_WINDOWS
 
11762
 
 
11763
fi # $USE_OPENGL
 
11764
 
 
11765
 
 
11766
 
 
11767
 
 
11768
 
 
11769
 
 
11770
 
 
11771
 
 
11772
 
 
11773
 
 
11774
# Done checking OpenGL
 
11775
 
 
11776
# Enable TCLTK option
 
11777
 
 
11778
 
 
11779
echo $ac_n "checking whether to use Tcl/Tk""... $ac_c" 1>&6
 
11780
echo "configure:11781: checking whether to use Tcl/Tk" >&5
 
11781
echo "$ac_t"""$with_tcltk"" 1>&6
 
11782
case "$with_tcltk" in
 
11783
        "no")   USE_TCLTK=      ;;
 
11784
        "yes")  USE_TCLTK="1"   ;;
 
11785
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
11786
esac
 
11787
 
 
11788
 
 
11789
 
 
11790
TCLINCDIR=
 
11791
TCLTKLIBPATH=
 
11792
TCLTKLIBS=
 
11793
 
 
11794
if test -n "$USE_TCLTK"; then
 
11795
 
 
11796
# With Tcl/Tk includes directory
 
11797
 
 
11798
 
 
11799
echo $ac_n "checking for location of Tcl/Tk includes""... $ac_c" 1>&6
 
11800
echo "configure:11801: checking for location of Tcl/Tk includes" >&5
 
11801
case "$with_tcltk_includes" in
 
11802
y | ye | yes | n | no)
 
11803
        { echo "configure: error: *** You must supply a directory to --with-tcltk-includes." 1>&2; exit 1; }
 
11804
        ;;
 
11805
esac
 
11806
echo "$ac_t""$with_tcltk_includes" 1>&6
 
11807
 
 
11808
if test -n "$with_tcltk_includes" ; then
 
11809
    for dir in $with_tcltk_includes; do
 
11810
        if test -d "$dir"; then
 
11811
            TCLINCDIR="$TCLINCDIR -I$dir"
 
11812
        else
 
11813
            { echo "configure: error: *** Tcl/Tk includes directory $dir does not exist." 1>&2; exit 1; }
 
11814
        fi
 
11815
    done
 
11816
fi
 
11817
 
 
11818
 
 
11819
 
 
11820
ac_save_cppflags="$CPPFLAGS"
 
11821
CPPFLAGS="$TCLINCDIR $CPPFLAGS"
 
11822
for ac_hdr in tcl.h
 
11823
do
 
11824
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
11825
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
11826
echo "configure:11827: checking for $ac_hdr" >&5
 
11827
 
 
11828
cat > conftest.$ac_ext <<EOF
 
11829
#line 11830 "configure"
 
11830
#include "confdefs.h"
 
11831
#include <$ac_hdr>
 
11832
EOF
 
11833
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
11834
{ (eval echo configure:11835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
11835
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
11836
if test -z "$ac_err"; then
 
11837
  rm -rf conftest*
 
11838
  eval "ac_cv_header_$ac_safe=yes"
 
11839
else
 
11840
  echo "$ac_err" >&5
 
11841
  echo "configure: failed program was:" >&5
 
11842
  cat conftest.$ac_ext >&5
 
11843
  rm -rf conftest*
 
11844
  eval "ac_cv_header_$ac_safe=no"
 
11845
fi
 
11846
rm -f conftest*
 
11847
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
11848
  echo "$ac_t""yes" 1>&6
 
11849
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
11850
  cat >> confdefs.h <<EOF
 
11851
#define $ac_tr_hdr 1
 
11852
EOF
 
11853
 
 
11854
else
 
11855
  echo "$ac_t""no" 1>&6
 
11856
{ echo "configure: error: *** Unable to locate Tcl includes." 1>&2; exit 1; }
 
11857
 
 
11858
fi
 
11859
done
 
11860
 
 
11861
CPPFLAGS=$ac_save_cppflags
 
11862
 
 
11863
 
 
11864
 
 
11865
ac_save_cppflags="$CPPFLAGS"
 
11866
CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
 
11867
for ac_hdr in tk.h
 
11868
do
 
11869
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
11870
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
11871
echo "configure:11872: checking for $ac_hdr" >&5
 
11872
 
 
11873
cat > conftest.$ac_ext <<EOF
 
11874
#line 11875 "configure"
 
11875
#include "confdefs.h"
 
11876
#include <$ac_hdr>
 
11877
EOF
 
11878
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
11879
{ (eval echo configure:11880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
11880
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
11881
if test -z "$ac_err"; then
 
11882
  rm -rf conftest*
 
11883
  eval "ac_cv_header_$ac_safe=yes"
 
11884
else
 
11885
  echo "$ac_err" >&5
 
11886
  echo "configure: failed program was:" >&5
 
11887
  cat conftest.$ac_ext >&5
 
11888
  rm -rf conftest*
 
11889
  eval "ac_cv_header_$ac_safe=no"
 
11890
fi
 
11891
rm -f conftest*
 
11892
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
11893
  echo "$ac_t""yes" 1>&6
 
11894
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
11895
  cat >> confdefs.h <<EOF
 
11896
#define $ac_tr_hdr 1
 
11897
EOF
 
11898
 
 
11899
else
 
11900
  echo "$ac_t""no" 1>&6
 
11901
{ echo "configure: error: *** Unable to locate Tk includes." 1>&2; exit 1; }
 
11902
 
 
11903
fi
 
11904
done
 
11905
 
 
11906
CPPFLAGS=$ac_save_cppflags
 
11907
 
 
11908
 
 
11909
# Tcl/Tk version checks
 
11910
 
 
11911
echo $ac_n "checking Tcl version""... $ac_c" 1>&6
 
11912
echo "configure:11913: checking Tcl version" >&5
 
11913
ac_save_cppflags="$CPPFLAGS"
 
11914
CPPFLAGS="$TCLINCDIR $CPPFLAGS"
 
11915
if test "$cross_compiling" = yes; then
 
11916
     tcl_ver=UNKNOWN
 
11917
    echo "$ac_t""unknown (cross-compiling)" 1>&6 
 
11918
else
 
11919
  cat > conftest.$ac_ext <<EOF
 
11920
#line 11921 "configure"
 
11921
#include "confdefs.h"
 
11922
 
 
11923
#include <stdio.h> 
 
11924
#include <tcl.h>
 
11925
int main(void) {
 
11926
 FILE *fp = fopen("conftestdata","w");
 
11927
 fputs(TCL_VERSION, fp);
 
11928
 return 0;
 
11929
}
 
11930
 
 
11931
EOF
 
11932
if { (eval echo configure:11933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
11933
then
 
11934
     tcl_ver=`cat conftestdata`
 
11935
    echo "$ac_t""$tcl_ver" 1>&6
 
11936
else
 
11937
  echo "configure: failed program was:" >&5
 
11938
  cat conftest.$ac_ext >&5
 
11939
  rm -fr conftest*
 
11940
     { echo "configure: error: *** Could not determine Tcl version." 1>&2; exit 1; } 
 
11941
fi
 
11942
rm -fr conftest*
 
11943
fi
 
11944
 
 
11945
CPPFLAGS=$ac_save_cppflags
 
11946
 
 
11947
 
 
11948
 
 
11949
echo $ac_n "checking Tk version""... $ac_c" 1>&6
 
11950
echo "configure:11951: checking Tk version" >&5
 
11951
ac_save_cppflags="$CPPFLAGS"
 
11952
CPPFLAGS="$TCLINCDIR $X_CFLAGS $CPPFLAGS"
 
11953
if test "$cross_compiling" = yes; then
 
11954
     tk_ver=UNKNOWN
 
11955
    echo "$ac_t""unknown (cross-compiling)" 1>&6 
 
11956
else
 
11957
  cat > conftest.$ac_ext <<EOF
 
11958
#line 11959 "configure"
 
11959
#include "confdefs.h"
 
11960
 
 
11961
#include <stdio.h> 
 
11962
#include <tk.h>
 
11963
int main(void) {
 
11964
 FILE *fp = fopen("conftestdata","w");
 
11965
 fputs(TK_VERSION, fp);
 
11966
 return 0;
 
11967
}
 
11968
 
 
11969
EOF
 
11970
if { (eval echo configure:11971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 
11971
then
 
11972
     tk_ver=`cat conftestdata`
 
11973
    echo "$ac_t""$tk_ver" 1>&6
 
11974
else
 
11975
  echo "configure: failed program was:" >&5
 
11976
  cat conftest.$ac_ext >&5
 
11977
  rm -fr conftest*
 
11978
     { echo "configure: error: *** Could not determine Tk version." 1>&2; exit 1; } 
 
11979
fi
 
11980
rm -fr conftest*
 
11981
fi
 
11982
 
 
11983
CPPFLAGS=$ac_save_cppflags
 
11984
 
 
11985
 
 
11986
if test "$tcl_ver" = "$tk_ver" ; then
 
11987
    tcltk_ver="$tcl_ver"
 
11988
else
 
11989
    { echo "configure: error: *** Tcl/Tk version mismatch." 1>&2; exit 1; }
 
11990
fi
 
11991
 
 
11992
TCL_VERSION="$tcl_ver"
 
11993
 
 
11994
# FreeBSD and CygWin don't have a "dot" between major/minor version number
 
11995
tcltk_ver2=`echo "$tcltk_ver" | sed 's/\.//g'`
 
11996
 
 
11997
# With Tcl/Tk library directory
 
11998
 
 
11999
 
 
12000
echo $ac_n "checking for location of Tcl/Tk library""... $ac_c" 1>&6
 
12001
echo "configure:12002: checking for location of Tcl/Tk library" >&5
 
12002
case "$with_tcltk_libs" in
 
12003
y | ye | yes | n | no)
 
12004
        { echo "configure: error: *** You must supply a directory to --with-tcltk-libs." 1>&2; exit 1; }
 
12005
        ;;
 
12006
esac
 
12007
echo "$ac_t""$with_tcltk_libs" 1>&6
 
12008
 
 
12009
if test -n "$with_tcltk_libs"; then
 
12010
    for dir in $with_tcltk_libs; do
 
12011
        if test -d "$dir"; then
 
12012
            TCLTKLIBPATH="$TCLTKLIBPATH -L$dir"
 
12013
        else
 
12014
            { echo "configure: error: *** Tcl/Tk library directory $dir does not exist." 1>&2; exit 1; }
 
12015
        fi
 
12016
    done
 
12017
fi
 
12018
 
 
12019
 
 
12020
TCLLIB=
 
12021
TKLIB=
 
12022
MACOSX_ARCHS_TCLTK=
 
12023
 
 
12024
# Can't test tcl/tk libs on 64bit OSX Aqua for now
 
12025
# assume that if OpenGL Aqua, then user specifies TclTk Aqua
 
12026
if test "$OPENGL_AQUA" = 1 ; then
 
12027
    save_CFLAGS="$CFLAGS"
 
12028
    CFLAGS="`echo \"$CFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
 
12029
    save_LDFLAGS="$LDFLAGS"
 
12030
    LDFLAGS="`echo \"$LDFLAGS\" | sed -E 's/-arch +x86_64//g' | sed -E 's/-arch +ppc64//g'`"
 
12031
fi
 
12032
 
 
12033
 
 
12034
ac_save_ldflags="$LDFLAGS"
 
12035
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
 
12036
 
 
12037
 
 
12038
 
 
12039
 
 
12040
echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
 
12041
echo "configure:12042: checking for Tcl_Init in -ltcl" >&5
 
12042
ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
12043
 
 
12044
ac_save_LIBS="$LIBS"
 
12045
LIBS="-ltcl $MATHLIB $LIBS"
 
12046
cat > conftest.$ac_ext <<EOF
 
12047
#line 12048 "configure"
 
12048
#include "confdefs.h"
 
12049
/* Override any gcc2 internal prototype to avoid an error.  */
 
12050
/* We use char because int might match the return type of a gcc2
 
12051
    builtin and then its argument prototype would still apply.  */
 
12052
char Tcl_Init();
 
12053
 
 
12054
int main() {
 
12055
Tcl_Init()
 
12056
; return 0; }
 
12057
EOF
 
12058
if { (eval echo configure:12059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12059
  rm -rf conftest*
 
12060
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12061
else
 
12062
  echo "configure: failed program was:" >&5
 
12063
  cat conftest.$ac_ext >&5
 
12064
  rm -rf conftest*
 
12065
  eval "ac_cv_lib_$ac_lib_var=no"
 
12066
fi
 
12067
rm -f conftest*
 
12068
LIBS="$ac_save_LIBS"
 
12069
 
 
12070
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12071
  echo "$ac_t""yes" 1>&6
 
12072
  TCLLIB="$TCLLIB -ltcl $MATHLIB"
 
12073
else
 
12074
  echo "$ac_t""no" 1>&6
 
12075
 
 
12076
echo $ac_n "checking for Tcl_Init in -ltcl""... $ac_c" 1>&6
 
12077
echo "configure:12078: checking for Tcl_Init in -ltcl" >&5
 
12078
ac_lib_var=`echo tcl'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
12079
 
 
12080
ac_save_LIBS="$LIBS"
 
12081
LIBS="-ltcl $MATHLIB $DLLIB $LIBS"
 
12082
cat > conftest.$ac_ext <<EOF
 
12083
#line 12084 "configure"
 
12084
#include "confdefs.h"
 
12085
/* Override any gcc2 internal prototype to avoid an error.  */
 
12086
/* We use char because int might match the return type of a gcc2
 
12087
    builtin and then its argument prototype would still apply.  */
 
12088
char Tcl_Init();
 
12089
 
 
12090
int main() {
 
12091
Tcl_Init()
 
12092
; return 0; }
 
12093
EOF
 
12094
if { (eval echo configure:12095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12095
  rm -rf conftest*
 
12096
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12097
else
 
12098
  echo "configure: failed program was:" >&5
 
12099
  cat conftest.$ac_ext >&5
 
12100
  rm -rf conftest*
 
12101
  eval "ac_cv_lib_$ac_lib_var=no"
 
12102
fi
 
12103
rm -f conftest*
 
12104
LIBS="$ac_save_LIBS"
 
12105
 
 
12106
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12107
  echo "$ac_t""yes" 1>&6
 
12108
  TCLLIB="$TCLLIB -ltcl $MATHLIB $DLLIB"
 
12109
else
 
12110
  echo "$ac_t""no" 1>&6
 
12111
 
 
12112
LDFLAGS=${ac_save_ldflags}
 
12113
 
 
12114
ac_save_ldflags="$LDFLAGS"
 
12115
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
 
12116
 
 
12117
 
 
12118
 
 
12119
 
 
12120
echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
 
12121
echo "configure:12122: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
 
12122
ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
12123
 
 
12124
ac_save_LIBS="$LIBS"
 
12125
LIBS="-ltcl$tcltk_ver $MATHLIB $LIBS"
 
12126
cat > conftest.$ac_ext <<EOF
 
12127
#line 12128 "configure"
 
12128
#include "confdefs.h"
 
12129
/* Override any gcc2 internal prototype to avoid an error.  */
 
12130
/* We use char because int might match the return type of a gcc2
 
12131
    builtin and then its argument prototype would still apply.  */
 
12132
char Tcl_Init();
 
12133
 
 
12134
int main() {
 
12135
Tcl_Init()
 
12136
; return 0; }
 
12137
EOF
 
12138
if { (eval echo configure:12139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12139
  rm -rf conftest*
 
12140
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12141
else
 
12142
  echo "configure: failed program was:" >&5
 
12143
  cat conftest.$ac_ext >&5
 
12144
  rm -rf conftest*
 
12145
  eval "ac_cv_lib_$ac_lib_var=no"
 
12146
fi
 
12147
rm -f conftest*
 
12148
LIBS="$ac_save_LIBS"
 
12149
 
 
12150
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12151
  echo "$ac_t""yes" 1>&6
 
12152
  TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB"
 
12153
else
 
12154
  echo "$ac_t""no" 1>&6
 
12155
 
 
12156
echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver""... $ac_c" 1>&6
 
12157
echo "configure:12158: checking for Tcl_Init in -ltcl$tcltk_ver" >&5
 
12158
ac_lib_var=`echo tcl$tcltk_ver'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
12159
 
 
12160
ac_save_LIBS="$LIBS"
 
12161
LIBS="-ltcl$tcltk_ver $MATHLIB $DLLIB $LIBS"
 
12162
cat > conftest.$ac_ext <<EOF
 
12163
#line 12164 "configure"
 
12164
#include "confdefs.h"
 
12165
/* Override any gcc2 internal prototype to avoid an error.  */
 
12166
/* We use char because int might match the return type of a gcc2
 
12167
    builtin and then its argument prototype would still apply.  */
 
12168
char Tcl_Init();
 
12169
 
 
12170
int main() {
 
12171
Tcl_Init()
 
12172
; return 0; }
 
12173
EOF
 
12174
if { (eval echo configure:12175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12175
  rm -rf conftest*
 
12176
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12177
else
 
12178
  echo "configure: failed program was:" >&5
 
12179
  cat conftest.$ac_ext >&5
 
12180
  rm -rf conftest*
 
12181
  eval "ac_cv_lib_$ac_lib_var=no"
 
12182
fi
 
12183
rm -f conftest*
 
12184
LIBS="$ac_save_LIBS"
 
12185
 
 
12186
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12187
  echo "$ac_t""yes" 1>&6
 
12188
  TCLLIB="$TCLLIB -ltcl$tcltk_ver $MATHLIB $DLLIB"
 
12189
else
 
12190
  echo "$ac_t""no" 1>&6
 
12191
 
 
12192
LDFLAGS=${ac_save_ldflags}
 
12193
 
 
12194
ac_save_ldflags="$LDFLAGS"
 
12195
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
 
12196
 
 
12197
 
 
12198
 
 
12199
 
 
12200
echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
 
12201
echo "configure:12202: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
 
12202
ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
12203
 
 
12204
ac_save_LIBS="$LIBS"
 
12205
LIBS="-ltcl$tcltk_ver2 $MATHLIB $LIBS"
 
12206
cat > conftest.$ac_ext <<EOF
 
12207
#line 12208 "configure"
 
12208
#include "confdefs.h"
 
12209
/* Override any gcc2 internal prototype to avoid an error.  */
 
12210
/* We use char because int might match the return type of a gcc2
 
12211
    builtin and then its argument prototype would still apply.  */
 
12212
char Tcl_Init();
 
12213
 
 
12214
int main() {
 
12215
Tcl_Init()
 
12216
; return 0; }
 
12217
EOF
 
12218
if { (eval echo configure:12219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12219
  rm -rf conftest*
 
12220
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12221
else
 
12222
  echo "configure: failed program was:" >&5
 
12223
  cat conftest.$ac_ext >&5
 
12224
  rm -rf conftest*
 
12225
  eval "ac_cv_lib_$ac_lib_var=no"
 
12226
fi
 
12227
rm -f conftest*
 
12228
LIBS="$ac_save_LIBS"
 
12229
 
 
12230
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12231
  echo "$ac_t""yes" 1>&6
 
12232
  TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB"
 
12233
else
 
12234
  echo "$ac_t""no" 1>&6
 
12235
 
 
12236
echo $ac_n "checking for Tcl_Init in -ltcl$tcltk_ver2""... $ac_c" 1>&6
 
12237
echo "configure:12238: checking for Tcl_Init in -ltcl$tcltk_ver2" >&5
 
12238
ac_lib_var=`echo tcl$tcltk_ver2'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
12239
 
 
12240
ac_save_LIBS="$LIBS"
 
12241
LIBS="-ltcl$tcltk_ver2 $MATHLIB $DLLIB $LIBS"
 
12242
cat > conftest.$ac_ext <<EOF
 
12243
#line 12244 "configure"
 
12244
#include "confdefs.h"
 
12245
/* Override any gcc2 internal prototype to avoid an error.  */
 
12246
/* We use char because int might match the return type of a gcc2
 
12247
    builtin and then its argument prototype would still apply.  */
 
12248
char Tcl_Init();
 
12249
 
 
12250
int main() {
 
12251
Tcl_Init()
 
12252
; return 0; }
 
12253
EOF
 
12254
if { (eval echo configure:12255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12255
  rm -rf conftest*
 
12256
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12257
else
 
12258
  echo "configure: failed program was:" >&5
 
12259
  cat conftest.$ac_ext >&5
 
12260
  rm -rf conftest*
 
12261
  eval "ac_cv_lib_$ac_lib_var=no"
 
12262
fi
 
12263
rm -f conftest*
 
12264
LIBS="$ac_save_LIBS"
 
12265
 
 
12266
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12267
  echo "$ac_t""yes" 1>&6
 
12268
  TCLLIB="$TCLLIB -ltcl$tcltk_ver2 $MATHLIB $DLLIB"
 
12269
else
 
12270
  echo "$ac_t""no" 1>&6
 
12271
 
 
12272
LDFLAGS=${ac_save_ldflags}
 
12273
 
 
12274
    { echo "configure: error: *** Unable to locate Tcl library." 1>&2; exit 1; }
 
12275
 
 
12276
 
 
12277
fi
 
12278
 
 
12279
 
 
12280
 
 
12281
 
 
12282
fi
 
12283
 
 
12284
 
 
12285
 
 
12286
 
 
12287
 
 
12288
 
 
12289
LDFLAGS=${ac_save_ldflags}
 
12290
 
 
12291
 
 
12292
 
 
12293
fi
 
12294
 
 
12295
 
 
12296
 
 
12297
 
 
12298
fi
 
12299
 
 
12300
 
 
12301
 
 
12302
 
 
12303
 
 
12304
 
 
12305
LDFLAGS=${ac_save_ldflags}
 
12306
 
 
12307
 
 
12308
 
 
12309
fi
 
12310
 
 
12311
 
 
12312
 
 
12313
 
 
12314
fi
 
12315
 
 
12316
 
 
12317
 
 
12318
 
 
12319
 
 
12320
 
 
12321
LDFLAGS=${ac_save_ldflags}
 
12322
 
 
12323
 
 
12324
 
 
12325
ac_save_ldflags="$LDFLAGS"
 
12326
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
 
12327
 
 
12328
 
 
12329
 
 
12330
 
 
12331
echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
 
12332
echo "configure:12333: checking for Tk_MainWindow in -ltk" >&5
 
12333
ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
12334
 
 
12335
ac_save_LIBS="$LIBS"
 
12336
LIBS="-ltk $TCLLIB $MATHLIB $LIBS"
 
12337
cat > conftest.$ac_ext <<EOF
 
12338
#line 12339 "configure"
 
12339
#include "confdefs.h"
 
12340
/* Override any gcc2 internal prototype to avoid an error.  */
 
12341
/* We use char because int might match the return type of a gcc2
 
12342
    builtin and then its argument prototype would still apply.  */
 
12343
char Tk_MainWindow();
 
12344
 
 
12345
int main() {
 
12346
Tk_MainWindow()
 
12347
; return 0; }
 
12348
EOF
 
12349
if { (eval echo configure:12350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12350
  rm -rf conftest*
 
12351
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12352
else
 
12353
  echo "configure: failed program was:" >&5
 
12354
  cat conftest.$ac_ext >&5
 
12355
  rm -rf conftest*
 
12356
  eval "ac_cv_lib_$ac_lib_var=no"
 
12357
fi
 
12358
rm -f conftest*
 
12359
LIBS="$ac_save_LIBS"
 
12360
 
 
12361
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12362
  echo "$ac_t""yes" 1>&6
 
12363
  TKLIB="$TKLIB -ltk $MATHLIB"
 
12364
else
 
12365
  echo "$ac_t""no" 1>&6
 
12366
 
 
12367
echo $ac_n "checking for Tk_MainWindow in -ltk""... $ac_c" 1>&6
 
12368
echo "configure:12369: checking for Tk_MainWindow in -ltk" >&5
 
12369
ac_lib_var=`echo tk'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
12370
 
 
12371
ac_save_LIBS="$LIBS"
 
12372
LIBS="-ltk $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
 
12373
cat > conftest.$ac_ext <<EOF
 
12374
#line 12375 "configure"
 
12375
#include "confdefs.h"
 
12376
/* Override any gcc2 internal prototype to avoid an error.  */
 
12377
/* We use char because int might match the return type of a gcc2
 
12378
    builtin and then its argument prototype would still apply.  */
 
12379
char Tk_MainWindow();
 
12380
 
 
12381
int main() {
 
12382
Tk_MainWindow()
 
12383
; return 0; }
 
12384
EOF
 
12385
if { (eval echo configure:12386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12386
  rm -rf conftest*
 
12387
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12388
else
 
12389
  echo "configure: failed program was:" >&5
 
12390
  cat conftest.$ac_ext >&5
 
12391
  rm -rf conftest*
 
12392
  eval "ac_cv_lib_$ac_lib_var=no"
 
12393
fi
 
12394
rm -f conftest*
 
12395
LIBS="$ac_save_LIBS"
 
12396
 
 
12397
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12398
  echo "$ac_t""yes" 1>&6
 
12399
  TKLIB="$TKLIB -ltk $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
 
12400
else
 
12401
  echo "$ac_t""no" 1>&6
 
12402
 
 
12403
LDFLAGS=${ac_save_ldflags}
 
12404
 
 
12405
ac_save_ldflags="$LDFLAGS"
 
12406
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
 
12407
 
 
12408
 
 
12409
 
 
12410
 
 
12411
echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
 
12412
echo "configure:12413: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
 
12413
ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
12414
 
 
12415
ac_save_LIBS="$LIBS"
 
12416
LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $LIBS"
 
12417
cat > conftest.$ac_ext <<EOF
 
12418
#line 12419 "configure"
 
12419
#include "confdefs.h"
 
12420
/* Override any gcc2 internal prototype to avoid an error.  */
 
12421
/* We use char because int might match the return type of a gcc2
 
12422
    builtin and then its argument prototype would still apply.  */
 
12423
char Tk_MainWindow();
 
12424
 
 
12425
int main() {
 
12426
Tk_MainWindow()
 
12427
; return 0; }
 
12428
EOF
 
12429
if { (eval echo configure:12430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12430
  rm -rf conftest*
 
12431
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12432
else
 
12433
  echo "configure: failed program was:" >&5
 
12434
  cat conftest.$ac_ext >&5
 
12435
  rm -rf conftest*
 
12436
  eval "ac_cv_lib_$ac_lib_var=no"
 
12437
fi
 
12438
rm -f conftest*
 
12439
LIBS="$ac_save_LIBS"
 
12440
 
 
12441
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12442
  echo "$ac_t""yes" 1>&6
 
12443
  TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB"
 
12444
else
 
12445
  echo "$ac_t""no" 1>&6
 
12446
 
 
12447
echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver""... $ac_c" 1>&6
 
12448
echo "configure:12449: checking for Tk_MainWindow in -ltk$tcltk_ver" >&5
 
12449
ac_lib_var=`echo tk$tcltk_ver'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
12450
 
 
12451
ac_save_LIBS="$LIBS"
 
12452
LIBS="-ltk$tcltk_ver $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
 
12453
cat > conftest.$ac_ext <<EOF
 
12454
#line 12455 "configure"
 
12455
#include "confdefs.h"
 
12456
/* Override any gcc2 internal prototype to avoid an error.  */
 
12457
/* We use char because int might match the return type of a gcc2
 
12458
    builtin and then its argument prototype would still apply.  */
 
12459
char Tk_MainWindow();
 
12460
 
 
12461
int main() {
 
12462
Tk_MainWindow()
 
12463
; return 0; }
 
12464
EOF
 
12465
if { (eval echo configure:12466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12466
  rm -rf conftest*
 
12467
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12468
else
 
12469
  echo "configure: failed program was:" >&5
 
12470
  cat conftest.$ac_ext >&5
 
12471
  rm -rf conftest*
 
12472
  eval "ac_cv_lib_$ac_lib_var=no"
 
12473
fi
 
12474
rm -f conftest*
 
12475
LIBS="$ac_save_LIBS"
 
12476
 
 
12477
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12478
  echo "$ac_t""yes" 1>&6
 
12479
  TKLIB="$TKLIB -ltk$tcltk_ver $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
 
12480
else
 
12481
  echo "$ac_t""no" 1>&6
 
12482
 
 
12483
LDFLAGS=${ac_save_ldflags}
 
12484
 
 
12485
ac_save_ldflags="$LDFLAGS"
 
12486
LDFLAGS="$TCLTKLIBPATH $LDFLAGS"
 
12487
 
 
12488
 
 
12489
 
 
12490
 
 
12491
echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
 
12492
echo "configure:12493: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
 
12493
ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
12494
 
 
12495
ac_save_LIBS="$LIBS"
 
12496
LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $LIBS"
 
12497
cat > conftest.$ac_ext <<EOF
 
12498
#line 12499 "configure"
 
12499
#include "confdefs.h"
 
12500
/* Override any gcc2 internal prototype to avoid an error.  */
 
12501
/* We use char because int might match the return type of a gcc2
 
12502
    builtin and then its argument prototype would still apply.  */
 
12503
char Tk_MainWindow();
 
12504
 
 
12505
int main() {
 
12506
Tk_MainWindow()
 
12507
; return 0; }
 
12508
EOF
 
12509
if { (eval echo configure:12510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12510
  rm -rf conftest*
 
12511
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12512
else
 
12513
  echo "configure: failed program was:" >&5
 
12514
  cat conftest.$ac_ext >&5
 
12515
  rm -rf conftest*
 
12516
  eval "ac_cv_lib_$ac_lib_var=no"
 
12517
fi
 
12518
rm -f conftest*
 
12519
LIBS="$ac_save_LIBS"
 
12520
 
 
12521
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12522
  echo "$ac_t""yes" 1>&6
 
12523
  TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB"
 
12524
else
 
12525
  echo "$ac_t""no" 1>&6
 
12526
 
 
12527
echo $ac_n "checking for Tk_MainWindow in -ltk$tcltk_ver2""... $ac_c" 1>&6
 
12528
echo "configure:12529: checking for Tk_MainWindow in -ltk$tcltk_ver2" >&5
 
12529
ac_lib_var=`echo tk$tcltk_ver2'_'Tk_MainWindow | sed 'y%./+-%__p_%'`
 
12530
 
 
12531
ac_save_LIBS="$LIBS"
 
12532
LIBS="-ltk$tcltk_ver2 $TCLLIB $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $LIBS"
 
12533
cat > conftest.$ac_ext <<EOF
 
12534
#line 12535 "configure"
 
12535
#include "confdefs.h"
 
12536
/* Override any gcc2 internal prototype to avoid an error.  */
 
12537
/* We use char because int might match the return type of a gcc2
 
12538
    builtin and then its argument prototype would still apply.  */
 
12539
char Tk_MainWindow();
 
12540
 
 
12541
int main() {
 
12542
Tk_MainWindow()
 
12543
; return 0; }
 
12544
EOF
 
12545
if { (eval echo configure:12546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12546
  rm -rf conftest*
 
12547
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12548
else
 
12549
  echo "configure: failed program was:" >&5
 
12550
  cat conftest.$ac_ext >&5
 
12551
  rm -rf conftest*
 
12552
  eval "ac_cv_lib_$ac_lib_var=no"
 
12553
fi
 
12554
rm -f conftest*
 
12555
LIBS="$ac_save_LIBS"
 
12556
 
 
12557
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12558
  echo "$ac_t""yes" 1>&6
 
12559
  TKLIB="$TKLIB -ltk$tcltk_ver2 $MATHLIB $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
 
12560
else
 
12561
  echo "$ac_t""no" 1>&6
 
12562
 
 
12563
LDFLAGS=${ac_save_ldflags}
 
12564
 
 
12565
    { echo "configure: error: *** Unable to locate Tk library." 1>&2; exit 1; }
 
12566
 
 
12567
 
 
12568
fi
 
12569
 
 
12570
 
 
12571
 
 
12572
 
 
12573
fi
 
12574
 
 
12575
 
 
12576
 
 
12577
 
 
12578
 
 
12579
 
 
12580
LDFLAGS=${ac_save_ldflags}
 
12581
 
 
12582
 
 
12583
 
 
12584
fi
 
12585
 
 
12586
 
 
12587
 
 
12588
 
 
12589
fi
 
12590
 
 
12591
 
 
12592
 
 
12593
 
 
12594
 
 
12595
 
 
12596
LDFLAGS=${ac_save_ldflags}
 
12597
 
 
12598
 
 
12599
 
 
12600
fi
 
12601
 
 
12602
 
 
12603
 
 
12604
 
 
12605
fi
 
12606
 
 
12607
 
 
12608
 
 
12609
 
 
12610
 
 
12611
 
 
12612
LDFLAGS=${ac_save_ldflags}
 
12613
 
 
12614
 
 
12615
# restore CFLAGS/LDLFAGS from Aqua 64bit strip
 
12616
# only Tcl/Tk-based makefiles will strip 64bit out during compile
 
12617
if test "$OPENGL_AQUA" = 1 ; then
 
12618
   CFLAGS="$save_CFLAGS"
 
12619
   LDFLAGS="$save_LDFLAGS"
 
12620
fi
 
12621
 
 
12622
TCLTKLIBS="$TKLIB $TCLLIB"
 
12623
 
 
12624
# check for available OSX archs in TclTk
 
12625
if test -n "$MACOSX_ARCHS" ; then
 
12626
  save_LDFLAGS="$LDFLAGS"
 
12627
  LDFLAGS=
 
12628
  save_CFLAGS="$CFLAGS"
 
12629
  CFLAGS=
 
12630
  tlib=`echo "$TCLLIB" | sed -e 's/-l//' -e 's/^  *//' -e 's/  *$//'`
 
12631
  for a in i386 ppc x86_64 ppc64
 
12632
  do
 
12633
    # add only if in MACOSX_ARCHS
 
12634
    echo $ac_n "checking for Tcl_Init in -l$tlib""... $ac_c" 1>&6
 
12635
echo "configure:12636: checking for Tcl_Init in -l$tlib" >&5
 
12636
ac_lib_var=`echo $tlib'_'Tcl_Init | sed 'y%./+-%__p_%'`
 
12637
 
 
12638
ac_save_LIBS="$LIBS"
 
12639
LIBS="-l$tlib -arch $a $MACOSX_SDK $TCLTKLIBPATH $LIBS"
 
12640
cat > conftest.$ac_ext <<EOF
 
12641
#line 12642 "configure"
 
12642
#include "confdefs.h"
 
12643
/* Override any gcc2 internal prototype to avoid an error.  */
 
12644
/* We use char because int might match the return type of a gcc2
 
12645
    builtin and then its argument prototype would still apply.  */
 
12646
char Tcl_Init();
 
12647
 
 
12648
int main() {
 
12649
Tcl_Init()
 
12650
; return 0; }
 
12651
EOF
 
12652
if { (eval echo configure:12653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12653
  rm -rf conftest*
 
12654
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12655
else
 
12656
  echo "configure: failed program was:" >&5
 
12657
  cat conftest.$ac_ext >&5
 
12658
  rm -rf conftest*
 
12659
  eval "ac_cv_lib_$ac_lib_var=no"
 
12660
fi
 
12661
rm -f conftest*
 
12662
LIBS="$ac_save_LIBS"
 
12663
 
 
12664
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12665
  echo "$ac_t""yes" 1>&6
 
12666
  
 
12667
      if test -n "`echo "$MACOSX_ARCHS" | grep $a`" ; then
 
12668
        MACOSX_ARCHS_TCLTK="$MACOSX_ARCHS_TCLTK -arch $a"
 
12669
      fi
 
12670
      
 
12671
else
 
12672
  echo "$ac_t""no" 1>&6
 
12673
fi
 
12674
 
 
12675
  done
 
12676
  LDFLAGS="$save_LDFLAGS"
 
12677
  CFLAGS="$save_CFLAGS"
 
12678
fi
 
12679
 
 
12680
cat >> confdefs.h <<\EOF
 
12681
#define HAVE_TCLTK 1
 
12682
EOF
 
12683
 
 
12684
 
 
12685
fi # $USE_TCLTK
 
12686
 
 
12687
TKINCDIR=$TCLINCDIR
 
12688
 
 
12689
 
 
12690
 
 
12691
 
 
12692
 
 
12693
 
 
12694
 
 
12695
# Done checking Tcl/Tk
 
12696
 
 
12697
# Enable ODBC option
 
12698
 
 
12699
 
 
12700
echo $ac_n "checking whether to use ODBC""... $ac_c" 1>&6
 
12701
echo "configure:12702: checking whether to use ODBC" >&5
 
12702
echo "$ac_t"""$with_odbc"" 1>&6
 
12703
case "$with_odbc" in
 
12704
        "no")   USE_ODBC=       ;;
 
12705
        "yes")  USE_ODBC="1"    ;;
 
12706
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
12707
esac
 
12708
 
 
12709
 
 
12710
 
 
12711
ODBCINC=
 
12712
ODBCLIB=
 
12713
 
 
12714
if test -n "$USE_ODBC"; then
 
12715
 
 
12716
# With ODBC includes directory
 
12717
 
 
12718
 
 
12719
echo $ac_n "checking for location of ODBC includes""... $ac_c" 1>&6
 
12720
echo "configure:12721: checking for location of ODBC includes" >&5
 
12721
case "$with_odbc_includes" in
 
12722
y | ye | yes | n | no)
 
12723
        { echo "configure: error: *** You must supply a directory to --with-odbc-includes." 1>&2; exit 1; }
 
12724
        ;;
 
12725
esac
 
12726
echo "$ac_t""$with_odbc_includes" 1>&6
 
12727
 
 
12728
if test -n "$with_odbc_includes" ; then
 
12729
    for dir in $with_odbc_includes; do
 
12730
        if test -d "$dir"; then
 
12731
            ODBCINC="$ODBCINC -I$dir"
 
12732
        else
 
12733
            { echo "configure: error: *** ODBC includes directory $dir does not exist." 1>&2; exit 1; }
 
12734
        fi
 
12735
    done
 
12736
fi
 
12737
 
 
12738
 
 
12739
 
 
12740
ac_save_cppflags="$CPPFLAGS"
 
12741
CPPFLAGS="$ODBCINC $CPPFLAGS"
 
12742
for ac_hdr in sql.h
 
12743
do
 
12744
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
12745
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
12746
echo "configure:12747: checking for $ac_hdr" >&5
 
12747
 
 
12748
cat > conftest.$ac_ext <<EOF
 
12749
#line 12750 "configure"
 
12750
#include "confdefs.h"
 
12751
#include <$ac_hdr>
 
12752
EOF
 
12753
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
12754
{ (eval echo configure:12755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
12755
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
12756
if test -z "$ac_err"; then
 
12757
  rm -rf conftest*
 
12758
  eval "ac_cv_header_$ac_safe=yes"
 
12759
else
 
12760
  echo "$ac_err" >&5
 
12761
  echo "configure: failed program was:" >&5
 
12762
  cat conftest.$ac_ext >&5
 
12763
  rm -rf conftest*
 
12764
  eval "ac_cv_header_$ac_safe=no"
 
12765
fi
 
12766
rm -f conftest*
 
12767
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
12768
  echo "$ac_t""yes" 1>&6
 
12769
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
12770
  cat >> confdefs.h <<EOF
 
12771
#define $ac_tr_hdr 1
 
12772
EOF
 
12773
 
 
12774
else
 
12775
  echo "$ac_t""no" 1>&6
 
12776
{ echo "configure: error: *** Unable to locate ODBC includes." 1>&2; exit 1; }
 
12777
 
 
12778
fi
 
12779
done
 
12780
 
 
12781
CPPFLAGS=$ac_save_cppflags
 
12782
 
 
12783
 
 
12784
# With ODBC library directory
 
12785
 
 
12786
 
 
12787
echo $ac_n "checking for location of ODBC library""... $ac_c" 1>&6
 
12788
echo "configure:12789: checking for location of ODBC library" >&5
 
12789
case "$with_odbc_libs" in
 
12790
y | ye | yes | n | no)
 
12791
        { echo "configure: error: *** You must supply a directory to --with-odbc-libs." 1>&2; exit 1; }
 
12792
        ;;
 
12793
esac
 
12794
echo "$ac_t""$with_odbc_libs" 1>&6
 
12795
 
 
12796
if test -n "$with_odbc_libs"; then
 
12797
    for dir in $with_odbc_libs; do
 
12798
        if test -d "$dir"; then
 
12799
            ODBCLIB="$ODBCLIB -L$dir"
 
12800
        else
 
12801
            { echo "configure: error: *** ODBC library directory $dir does not exist." 1>&2; exit 1; }
 
12802
        fi
 
12803
    done
 
12804
fi
 
12805
 
 
12806
 
 
12807
 
 
12808
ac_save_ldflags="$LDFLAGS"
 
12809
LDFLAGS="$ODBCLIB $LDFLAGS"
 
12810
 
 
12811
 
 
12812
echo $ac_n "checking for SQLConnect in -lodbc""... $ac_c" 1>&6
 
12813
echo "configure:12814: checking for SQLConnect in -lodbc" >&5
 
12814
ac_lib_var=`echo odbc'_'SQLConnect | sed 'y%./+-%__p_%'`
 
12815
 
 
12816
ac_save_LIBS="$LIBS"
 
12817
LIBS="-lodbc $ICONVLIB  $LIBS"
 
12818
cat > conftest.$ac_ext <<EOF
 
12819
#line 12820 "configure"
 
12820
#include "confdefs.h"
 
12821
/* Override any gcc2 internal prototype to avoid an error.  */
 
12822
/* We use char because int might match the return type of a gcc2
 
12823
    builtin and then its argument prototype would still apply.  */
 
12824
char SQLConnect();
 
12825
 
 
12826
int main() {
 
12827
SQLConnect()
 
12828
; return 0; }
 
12829
EOF
 
12830
if { (eval echo configure:12831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12831
  rm -rf conftest*
 
12832
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12833
else
 
12834
  echo "configure: failed program was:" >&5
 
12835
  cat conftest.$ac_ext >&5
 
12836
  rm -rf conftest*
 
12837
  eval "ac_cv_lib_$ac_lib_var=no"
 
12838
fi
 
12839
rm -f conftest*
 
12840
LIBS="$ac_save_LIBS"
 
12841
 
 
12842
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12843
  echo "$ac_t""yes" 1>&6
 
12844
  ODBCLIB="$ODBCLIB -lodbc "
 
12845
else
 
12846
  echo "$ac_t""no" 1>&6
 
12847
 
 
12848
LDFLAGS=${ac_save_ldflags}
 
12849
 
 
12850
ac_save_ldflags="$LDFLAGS"
 
12851
LDFLAGS="$ODBCLIB $LDFLAGS"
 
12852
 
 
12853
 
 
12854
echo $ac_n "checking for SQLConnect in -liodbc""... $ac_c" 1>&6
 
12855
echo "configure:12856: checking for SQLConnect in -liodbc" >&5
 
12856
ac_lib_var=`echo iodbc'_'SQLConnect | sed 'y%./+-%__p_%'`
 
12857
 
 
12858
ac_save_LIBS="$LIBS"
 
12859
LIBS="-liodbc  $LIBS"
 
12860
cat > conftest.$ac_ext <<EOF
 
12861
#line 12862 "configure"
 
12862
#include "confdefs.h"
 
12863
/* Override any gcc2 internal prototype to avoid an error.  */
 
12864
/* We use char because int might match the return type of a gcc2
 
12865
    builtin and then its argument prototype would still apply.  */
 
12866
char SQLConnect();
 
12867
 
 
12868
int main() {
 
12869
SQLConnect()
 
12870
; return 0; }
 
12871
EOF
 
12872
if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12873
  rm -rf conftest*
 
12874
  eval "ac_cv_lib_$ac_lib_var=yes"
 
12875
else
 
12876
  echo "configure: failed program was:" >&5
 
12877
  cat conftest.$ac_ext >&5
 
12878
  rm -rf conftest*
 
12879
  eval "ac_cv_lib_$ac_lib_var=no"
 
12880
fi
 
12881
rm -f conftest*
 
12882
LIBS="$ac_save_LIBS"
 
12883
 
 
12884
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
12885
  echo "$ac_t""yes" 1>&6
 
12886
  ODBCLIB="$ODBCLIB -liodbc "
 
12887
else
 
12888
  echo "$ac_t""no" 1>&6
 
12889
 
 
12890
LDFLAGS=${ac_save_ldflags}
 
12891
ac_save_cflags="$CFLAGS"
 
12892
CFLAGS="$CFLAGS $ODBCINC"
 
12893
 
 
12894
ac_save_ldflags="$LDFLAGS"
 
12895
ac_save_libs="$LIBS"
 
12896
echo $ac_n "checking for ODBC library""... $ac_c" 1>&6
 
12897
echo "configure:12898: checking for ODBC library" >&5
 
12898
LDFLAGS="$ODBCLIB $LDFLAGS"
 
12899
LIBS="-lodbc32  "
 
12900
cat > conftest.$ac_ext <<EOF
 
12901
#line 12902 "configure"
 
12902
#include "confdefs.h"
 
12903
#include <windows.h>
 
12904
#include <sql.h>
 
12905
int main() {
 
12906
SQLAllocEnv((SQLHENV *)0);
 
12907
; return 0; }
 
12908
EOF
 
12909
if { (eval echo configure:12910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
12910
  rm -rf conftest*
 
12911
  
 
12912
echo "$ac_t""found" 1>&6
 
12913
ODBCLIB="$ODBCLIB -lodbc32 "
 
12914
 
 
12915
else
 
12916
  echo "configure: failed program was:" >&5
 
12917
  cat conftest.$ac_ext >&5
 
12918
  rm -rf conftest*
 
12919
  
 
12920
 
 
12921
    { echo "configure: error: *** Unable to locate ODBC library." 1>&2; exit 1; }
 
12922
 
 
12923
 
 
12924
fi
 
12925
rm -f conftest*
 
12926
LIBS=${ac_save_libs}
 
12927
LDFLAGS=${ac_save_ldflags}
 
12928
 
 
12929
CFLAGS="${ac_save_cflags}"
 
12930
 
 
12931
 
 
12932
fi
 
12933
 
 
12934
 
 
12935
 
 
12936
LDFLAGS=${ac_save_ldflags}
 
12937
 
 
12938
 
 
12939
 
 
12940
fi
 
12941
 
 
12942
 
 
12943
 
 
12944
LDFLAGS=${ac_save_ldflags}
 
12945
 
 
12946
 
 
12947
fi # $USE_ODBC
 
12948
 
 
12949
 
 
12950
 
 
12951
 
 
12952
# Done checking ODBC
 
12953
 
 
12954
# Enable FFTW option
 
12955
 
 
12956
 
 
12957
echo $ac_n "checking whether to use FFTW""... $ac_c" 1>&6
 
12958
echo "configure:12959: checking whether to use FFTW" >&5
 
12959
echo "$ac_t"""$with_fftw"" 1>&6
 
12960
case "$with_fftw" in
 
12961
        "no")   USE_FFTW=       ;;
 
12962
        "yes")  USE_FFTW="1"    ;;
 
12963
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
12964
esac
 
12965
 
 
12966
 
 
12967
 
 
12968
FFTWINC=
 
12969
FFTWLIB=
 
12970
 
 
12971
if test -n "$USE_FFTW"; then
 
12972
 
 
12973
# With FFTW includes directory
 
12974
 
 
12975
 
 
12976
echo $ac_n "checking for location of FFTW includes""... $ac_c" 1>&6
 
12977
echo "configure:12978: checking for location of FFTW includes" >&5
 
12978
case "$with_fftw_includes" in
 
12979
y | ye | yes | n | no)
 
12980
        { echo "configure: error: *** You must supply a directory to --with-fftw-includes." 1>&2; exit 1; }
 
12981
        ;;
 
12982
esac
 
12983
echo "$ac_t""$with_fftw_includes" 1>&6
 
12984
 
 
12985
if test -n "$with_fftw_includes" ; then
 
12986
    for dir in $with_fftw_includes; do
 
12987
        if test -d "$dir"; then
 
12988
            FFTWINC="$FFTWINC -I$dir"
 
12989
        else
 
12990
            { echo "configure: error: *** FFTW includes directory $dir does not exist." 1>&2; exit 1; }
 
12991
        fi
 
12992
    done
 
12993
fi
 
12994
 
 
12995
 
 
12996
 
 
12997
ac_save_cppflags="$CPPFLAGS"
 
12998
CPPFLAGS="$FFTWINC $CPPFLAGS"
 
12999
for ac_hdr in fftw3.h
 
13000
do
 
13001
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
13002
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
13003
echo "configure:13004: checking for $ac_hdr" >&5
 
13004
 
 
13005
cat > conftest.$ac_ext <<EOF
 
13006
#line 13007 "configure"
 
13007
#include "confdefs.h"
 
13008
#include <$ac_hdr>
 
13009
EOF
 
13010
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
13011
{ (eval echo configure:13012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
13012
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
13013
if test -z "$ac_err"; then
 
13014
  rm -rf conftest*
 
13015
  eval "ac_cv_header_$ac_safe=yes"
 
13016
else
 
13017
  echo "$ac_err" >&5
 
13018
  echo "configure: failed program was:" >&5
 
13019
  cat conftest.$ac_ext >&5
 
13020
  rm -rf conftest*
 
13021
  eval "ac_cv_header_$ac_safe=no"
 
13022
fi
 
13023
rm -f conftest*
 
13024
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
13025
  echo "$ac_t""yes" 1>&6
 
13026
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
13027
  cat >> confdefs.h <<EOF
 
13028
#define $ac_tr_hdr 1
 
13029
EOF
 
13030
 
 
13031
else
 
13032
  echo "$ac_t""no" 1>&6
 
13033
ac_save_cppflags="$CPPFLAGS"
 
13034
CPPFLAGS=" $CPPFLAGS"
 
13035
for ac_hdr in fftw.h
 
13036
do
 
13037
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
13038
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
13039
echo "configure:13040: checking for $ac_hdr" >&5
 
13040
 
 
13041
cat > conftest.$ac_ext <<EOF
 
13042
#line 13043 "configure"
 
13043
#include "confdefs.h"
 
13044
#include <$ac_hdr>
 
13045
EOF
 
13046
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
13047
{ (eval echo configure:13048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
13048
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
13049
if test -z "$ac_err"; then
 
13050
  rm -rf conftest*
 
13051
  eval "ac_cv_header_$ac_safe=yes"
 
13052
else
 
13053
  echo "$ac_err" >&5
 
13054
  echo "configure: failed program was:" >&5
 
13055
  cat conftest.$ac_ext >&5
 
13056
  rm -rf conftest*
 
13057
  eval "ac_cv_header_$ac_safe=no"
 
13058
fi
 
13059
rm -f conftest*
 
13060
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
13061
  echo "$ac_t""yes" 1>&6
 
13062
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
13063
  cat >> confdefs.h <<EOF
 
13064
#define $ac_tr_hdr 1
 
13065
EOF
 
13066
 
 
13067
else
 
13068
  echo "$ac_t""no" 1>&6
 
13069
ac_save_cppflags="$CPPFLAGS"
 
13070
CPPFLAGS=" $CPPFLAGS"
 
13071
for ac_hdr in dfftw.h
 
13072
do
 
13073
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
13074
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
13075
echo "configure:13076: checking for $ac_hdr" >&5
 
13076
 
 
13077
cat > conftest.$ac_ext <<EOF
 
13078
#line 13079 "configure"
 
13079
#include "confdefs.h"
 
13080
#include <$ac_hdr>
 
13081
EOF
 
13082
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
13083
{ (eval echo configure:13084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
13084
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
13085
if test -z "$ac_err"; then
 
13086
  rm -rf conftest*
 
13087
  eval "ac_cv_header_$ac_safe=yes"
 
13088
else
 
13089
  echo "$ac_err" >&5
 
13090
  echo "configure: failed program was:" >&5
 
13091
  cat conftest.$ac_ext >&5
 
13092
  rm -rf conftest*
 
13093
  eval "ac_cv_header_$ac_safe=no"
 
13094
fi
 
13095
rm -f conftest*
 
13096
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
13097
  echo "$ac_t""yes" 1>&6
 
13098
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
13099
  cat >> confdefs.h <<EOF
 
13100
#define $ac_tr_hdr 1
 
13101
EOF
 
13102
 
 
13103
else
 
13104
  echo "$ac_t""no" 1>&6
 
13105
{ echo "configure: error: *** Unable to locate FFTW includes." 1>&2; exit 1; }
 
13106
 
 
13107
fi
 
13108
done
 
13109
 
 
13110
CPPFLAGS=$ac_save_cppflags
 
13111
 
 
13112
 
 
13113
fi
 
13114
done
 
13115
 
 
13116
CPPFLAGS=$ac_save_cppflags
 
13117
 
 
13118
 
 
13119
fi
 
13120
done
 
13121
 
 
13122
CPPFLAGS=$ac_save_cppflags
 
13123
 
 
13124
 
 
13125
# With FFTW library directory
 
13126
 
 
13127
 
 
13128
echo $ac_n "checking for location of FFTW library""... $ac_c" 1>&6
 
13129
echo "configure:13130: checking for location of FFTW library" >&5
 
13130
case "$with_fftw_libs" in
 
13131
y | ye | yes | n | no)
 
13132
        { echo "configure: error: *** You must supply a directory to --with-fftw-libs." 1>&2; exit 1; }
 
13133
        ;;
 
13134
esac
 
13135
echo "$ac_t""$with_fftw_libs" 1>&6
 
13136
 
 
13137
if test -n "$with_fftw_libs"; then
 
13138
    for dir in $with_fftw_libs; do
 
13139
        if test -d "$dir"; then
 
13140
            FFTWLIB="$FFTWLIB -L$dir"
 
13141
        else
 
13142
            { echo "configure: error: *** FFTW library directory $dir does not exist." 1>&2; exit 1; }
 
13143
        fi
 
13144
    done
 
13145
fi
 
13146
 
 
13147
 
 
13148
 
 
13149
ac_save_ldflags="$LDFLAGS"
 
13150
LDFLAGS="$FFTWLIB $LDFLAGS"
 
13151
 
 
13152
 
 
13153
echo $ac_n "checking for fftw_execute in -lfftw3""... $ac_c" 1>&6
 
13154
echo "configure:13155: checking for fftw_execute in -lfftw3" >&5
 
13155
ac_lib_var=`echo fftw3'_'fftw_execute | sed 'y%./+-%__p_%'`
 
13156
 
 
13157
ac_save_LIBS="$LIBS"
 
13158
LIBS="-lfftw3 $MATHLIB $LIBS"
 
13159
cat > conftest.$ac_ext <<EOF
 
13160
#line 13161 "configure"
 
13161
#include "confdefs.h"
 
13162
/* Override any gcc2 internal prototype to avoid an error.  */
 
13163
/* We use char because int might match the return type of a gcc2
 
13164
    builtin and then its argument prototype would still apply.  */
 
13165
char fftw_execute();
 
13166
 
 
13167
int main() {
 
13168
fftw_execute()
 
13169
; return 0; }
 
13170
EOF
 
13171
if { (eval echo configure:13172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13172
  rm -rf conftest*
 
13173
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13174
else
 
13175
  echo "configure: failed program was:" >&5
 
13176
  cat conftest.$ac_ext >&5
 
13177
  rm -rf conftest*
 
13178
  eval "ac_cv_lib_$ac_lib_var=no"
 
13179
fi
 
13180
rm -f conftest*
 
13181
LIBS="$ac_save_LIBS"
 
13182
 
 
13183
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13184
  echo "$ac_t""yes" 1>&6
 
13185
  FFTWLIB="$FFTWLIB -lfftw3 $MATHLIB"
 
13186
else
 
13187
  echo "$ac_t""no" 1>&6
 
13188
 
 
13189
LDFLAGS=${ac_save_ldflags}
 
13190
 
 
13191
ac_save_ldflags="$LDFLAGS"
 
13192
LDFLAGS="$FFTWLIB $LDFLAGS"
 
13193
 
 
13194
 
 
13195
echo $ac_n "checking for fftwnd_one in -lfftw""... $ac_c" 1>&6
 
13196
echo "configure:13197: checking for fftwnd_one in -lfftw" >&5
 
13197
ac_lib_var=`echo fftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
 
13198
 
 
13199
ac_save_LIBS="$LIBS"
 
13200
LIBS="-lfftw $MATHLIB $LIBS"
 
13201
cat > conftest.$ac_ext <<EOF
 
13202
#line 13203 "configure"
 
13203
#include "confdefs.h"
 
13204
/* Override any gcc2 internal prototype to avoid an error.  */
 
13205
/* We use char because int might match the return type of a gcc2
 
13206
    builtin and then its argument prototype would still apply.  */
 
13207
char fftwnd_one();
 
13208
 
 
13209
int main() {
 
13210
fftwnd_one()
 
13211
; return 0; }
 
13212
EOF
 
13213
if { (eval echo configure:13214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13214
  rm -rf conftest*
 
13215
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13216
else
 
13217
  echo "configure: failed program was:" >&5
 
13218
  cat conftest.$ac_ext >&5
 
13219
  rm -rf conftest*
 
13220
  eval "ac_cv_lib_$ac_lib_var=no"
 
13221
fi
 
13222
rm -f conftest*
 
13223
LIBS="$ac_save_LIBS"
 
13224
 
 
13225
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13226
  echo "$ac_t""yes" 1>&6
 
13227
  FFTWLIB="$FFTWLIB -lfftw $MATHLIB"
 
13228
else
 
13229
  echo "$ac_t""no" 1>&6
 
13230
 
 
13231
LDFLAGS=${ac_save_ldflags}
 
13232
 
 
13233
ac_save_ldflags="$LDFLAGS"
 
13234
LDFLAGS="$FFTWLIB $LDFLAGS"
 
13235
 
 
13236
 
 
13237
echo $ac_n "checking for fftwnd_one in -ldfftw""... $ac_c" 1>&6
 
13238
echo "configure:13239: checking for fftwnd_one in -ldfftw" >&5
 
13239
ac_lib_var=`echo dfftw'_'fftwnd_one | sed 'y%./+-%__p_%'`
 
13240
 
 
13241
ac_save_LIBS="$LIBS"
 
13242
LIBS="-ldfftw $MATHLIB $LIBS"
 
13243
cat > conftest.$ac_ext <<EOF
 
13244
#line 13245 "configure"
 
13245
#include "confdefs.h"
 
13246
/* Override any gcc2 internal prototype to avoid an error.  */
 
13247
/* We use char because int might match the return type of a gcc2
 
13248
    builtin and then its argument prototype would still apply.  */
 
13249
char fftwnd_one();
 
13250
 
 
13251
int main() {
 
13252
fftwnd_one()
 
13253
; return 0; }
 
13254
EOF
 
13255
if { (eval echo configure:13256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13256
  rm -rf conftest*
 
13257
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13258
else
 
13259
  echo "configure: failed program was:" >&5
 
13260
  cat conftest.$ac_ext >&5
 
13261
  rm -rf conftest*
 
13262
  eval "ac_cv_lib_$ac_lib_var=no"
 
13263
fi
 
13264
rm -f conftest*
 
13265
LIBS="$ac_save_LIBS"
 
13266
 
 
13267
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13268
  echo "$ac_t""yes" 1>&6
 
13269
  FFTWLIB="$FFTWLIB -ldfftw $MATHLIB"
 
13270
else
 
13271
  echo "$ac_t""no" 1>&6
 
13272
 
 
13273
LDFLAGS=${ac_save_ldflags}
 
13274
 
 
13275
    { echo "configure: error: *** Unable to locate FFTW library." 1>&2; exit 1; }
 
13276
 
 
13277
 
 
13278
fi
 
13279
 
 
13280
 
 
13281
 
 
13282
LDFLAGS=${ac_save_ldflags}
 
13283
 
 
13284
 
 
13285
 
 
13286
fi
 
13287
 
 
13288
 
 
13289
 
 
13290
LDFLAGS=${ac_save_ldflags}
 
13291
 
 
13292
 
 
13293
 
 
13294
fi
 
13295
 
 
13296
 
 
13297
 
 
13298
LDFLAGS=${ac_save_ldflags}
 
13299
 
 
13300
 
 
13301
fi # $USE_FFTW
 
13302
 
 
13303
 
 
13304
 
 
13305
 
 
13306
# Done checking FFTW
 
13307
 
 
13308
# Enable BLAS option
 
13309
 
 
13310
 
 
13311
echo $ac_n "checking whether to use BLAS""... $ac_c" 1>&6
 
13312
echo "configure:13313: checking whether to use BLAS" >&5
 
13313
echo "$ac_t"""$with_blas"" 1>&6
 
13314
case "$with_blas" in
 
13315
        "no")   USE_BLAS=       ;;
 
13316
        "yes")  USE_BLAS="1"    ;;
 
13317
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
13318
esac
 
13319
 
 
13320
 
 
13321
 
 
13322
BLASLIB=
 
13323
BLASINC=
 
13324
 
 
13325
if test -n "$USE_BLAS"; then
 
13326
 
 
13327
# With BLAS includes directory
 
13328
# BLAS doesn't have includes (FORTRAN library)
 
13329
# With BLAS library directory
 
13330
 
 
13331
 
 
13332
echo $ac_n "checking for location of BLAS includes""... $ac_c" 1>&6
 
13333
echo "configure:13334: checking for location of BLAS includes" >&5
 
13334
case "$with_blas_includes" in
 
13335
y | ye | yes | n | no)
 
13336
        { echo "configure: error: *** You must supply a directory to --with-blas-includes." 1>&2; exit 1; }
 
13337
        ;;
 
13338
esac
 
13339
echo "$ac_t""$with_blas_includes" 1>&6
 
13340
 
 
13341
if test -n "$with_blas_includes" ; then
 
13342
    for dir in $with_blas_includes; do
 
13343
        if test -d "$dir"; then
 
13344
            BLASINC="$BLASINC -I$dir"
 
13345
        else
 
13346
            { echo "configure: error: *** BLAS includes directory $dir does not exist." 1>&2; exit 1; }
 
13347
        fi
 
13348
    done
 
13349
fi
 
13350
 
 
13351
 
 
13352
echo $ac_n "checking for location of BLAS library""... $ac_c" 1>&6
 
13353
echo "configure:13354: checking for location of BLAS library" >&5
 
13354
case "$with_blas_libs" in
 
13355
y | ye | yes | n | no)
 
13356
        { echo "configure: error: *** You must supply a directory to --with-blas-libs." 1>&2; exit 1; }
 
13357
        ;;
 
13358
esac
 
13359
echo "$ac_t""$with_blas_libs" 1>&6
 
13360
 
 
13361
if test -n "$with_blas_libs"; then
 
13362
    for dir in $with_blas_libs; do
 
13363
        if test -d "$dir"; then
 
13364
            BLASLIB="$BLASLIB -L$dir"
 
13365
        else
 
13366
            { echo "configure: error: *** BLAS library directory $dir does not exist." 1>&2; exit 1; }
 
13367
        fi
 
13368
    done
 
13369
fi
 
13370
 
 
13371
 
 
13372
# See if cblas.h exists (CBLAS,ATLAS,others)
 
13373
save_CPPFLAGS="$CPPFLAGS"
 
13374
CPPFLAGS="$BLASINC $CPPFLAGS"
 
13375
for ac_hdr in cblas.h
 
13376
do
 
13377
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
13378
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
13379
echo "configure:13380: checking for $ac_hdr" >&5
 
13380
 
 
13381
cat > conftest.$ac_ext <<EOF
 
13382
#line 13383 "configure"
 
13383
#include "confdefs.h"
 
13384
#include <$ac_hdr>
 
13385
EOF
 
13386
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
13387
{ (eval echo configure:13388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
13388
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
13389
if test -z "$ac_err"; then
 
13390
  rm -rf conftest*
 
13391
  eval "ac_cv_header_$ac_safe=yes"
 
13392
else
 
13393
  echo "$ac_err" >&5
 
13394
  echo "configure: failed program was:" >&5
 
13395
  cat conftest.$ac_ext >&5
 
13396
  rm -rf conftest*
 
13397
  eval "ac_cv_header_$ac_safe=no"
 
13398
fi
 
13399
rm -f conftest*
 
13400
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
13401
  echo "$ac_t""yes" 1>&6
 
13402
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
13403
  cat >> confdefs.h <<EOF
 
13404
#define $ac_tr_hdr 1
 
13405
EOF
 
13406
 
 
13407
else
 
13408
  echo "$ac_t""no" 1>&6
 
13409
fi
 
13410
done
 
13411
 
 
13412
CPPFLAGS="$save_CPPFLAGS"
 
13413
 
 
13414
 
 
13415
ac_save_ldflags="$LDFLAGS"
 
13416
LDFLAGS="$BLASLIB $LDFLAGS"
 
13417
 
 
13418
 
 
13419
 
 
13420
 
 
13421
echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
 
13422
echo "configure:13423: checking for dnrm2_ in -lblas" >&5
 
13423
ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
 
13424
 
 
13425
ac_save_LIBS="$LIBS"
 
13426
LIBS="-lblas $MATHLIB  $LIBS"
 
13427
cat > conftest.$ac_ext <<EOF
 
13428
#line 13429 "configure"
 
13429
#include "confdefs.h"
 
13430
/* Override any gcc2 internal prototype to avoid an error.  */
 
13431
/* We use char because int might match the return type of a gcc2
 
13432
    builtin and then its argument prototype would still apply.  */
 
13433
char dnrm2_();
 
13434
 
 
13435
int main() {
 
13436
dnrm2_()
 
13437
; return 0; }
 
13438
EOF
 
13439
if { (eval echo configure:13440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13440
  rm -rf conftest*
 
13441
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13442
else
 
13443
  echo "configure: failed program was:" >&5
 
13444
  cat conftest.$ac_ext >&5
 
13445
  rm -rf conftest*
 
13446
  eval "ac_cv_lib_$ac_lib_var=no"
 
13447
fi
 
13448
rm -f conftest*
 
13449
LIBS="$ac_save_LIBS"
 
13450
 
 
13451
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13452
  echo "$ac_t""yes" 1>&6
 
13453
  BLASLIB="$BLASLIB -lblas "
 
13454
else
 
13455
  echo "$ac_t""no" 1>&6
 
13456
 
 
13457
echo $ac_n "checking for dnrm2_ in -lblas""... $ac_c" 1>&6
 
13458
echo "configure:13459: checking for dnrm2_ in -lblas" >&5
 
13459
ac_lib_var=`echo blas'_'dnrm2_ | sed 'y%./+-%__p_%'`
 
13460
 
 
13461
ac_save_LIBS="$LIBS"
 
13462
LIBS="-lblas $MATHLIB -lg2c $LIBS"
 
13463
cat > conftest.$ac_ext <<EOF
 
13464
#line 13465 "configure"
 
13465
#include "confdefs.h"
 
13466
/* Override any gcc2 internal prototype to avoid an error.  */
 
13467
/* We use char because int might match the return type of a gcc2
 
13468
    builtin and then its argument prototype would still apply.  */
 
13469
char dnrm2_();
 
13470
 
 
13471
int main() {
 
13472
dnrm2_()
 
13473
; return 0; }
 
13474
EOF
 
13475
if { (eval echo configure:13476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13476
  rm -rf conftest*
 
13477
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13478
else
 
13479
  echo "configure: failed program was:" >&5
 
13480
  cat conftest.$ac_ext >&5
 
13481
  rm -rf conftest*
 
13482
  eval "ac_cv_lib_$ac_lib_var=no"
 
13483
fi
 
13484
rm -f conftest*
 
13485
LIBS="$ac_save_LIBS"
 
13486
 
 
13487
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13488
  echo "$ac_t""yes" 1>&6
 
13489
  BLASLIB="$BLASLIB -lblas -lg2c"
 
13490
else
 
13491
  echo "$ac_t""no" 1>&6
 
13492
 
 
13493
LDFLAGS=${ac_save_ldflags}
 
13494
 
 
13495
    { echo "configure: error: *** Unable to locate BLAS library." 1>&2; exit 1; }
 
13496
 
 
13497
 
 
13498
fi
 
13499
 
 
13500
 
 
13501
 
 
13502
 
 
13503
fi
 
13504
 
 
13505
 
 
13506
 
 
13507
 
 
13508
 
 
13509
 
 
13510
LDFLAGS=${ac_save_ldflags}
 
13511
 
 
13512
 
 
13513
blas_ok=no
 
13514
 
 
13515
# Check for ATLAS
 
13516
save_LDFLAGS="$LDFLAGS"
 
13517
LDFLAGS="$BLASLIB $LDFLAGS"
 
13518
echo $ac_n "checking for ATL_xerbla in -latlas""... $ac_c" 1>&6
 
13519
echo "configure:13520: checking for ATL_xerbla in -latlas" >&5
 
13520
ac_lib_var=`echo atlas'_'ATL_xerbla | sed 'y%./+-%__p_%'`
 
13521
 
 
13522
ac_save_LIBS="$LIBS"
 
13523
LIBS="-latlas  $LIBS"
 
13524
cat > conftest.$ac_ext <<EOF
 
13525
#line 13526 "configure"
 
13526
#include "confdefs.h"
 
13527
/* Override any gcc2 internal prototype to avoid an error.  */
 
13528
/* We use char because int might match the return type of a gcc2
 
13529
    builtin and then its argument prototype would still apply.  */
 
13530
char ATL_xerbla();
 
13531
 
 
13532
int main() {
 
13533
ATL_xerbla()
 
13534
; return 0; }
 
13535
EOF
 
13536
if { (eval echo configure:13537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13537
  rm -rf conftest*
 
13538
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13539
else
 
13540
  echo "configure: failed program was:" >&5
 
13541
  cat conftest.$ac_ext >&5
 
13542
  rm -rf conftest*
 
13543
  eval "ac_cv_lib_$ac_lib_var=no"
 
13544
fi
 
13545
rm -f conftest*
 
13546
LIBS="$ac_save_LIBS"
 
13547
 
 
13548
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13549
  echo "$ac_t""yes" 1>&6
 
13550
  echo $ac_n "checking for sgemm_ in -lf77blas""... $ac_c" 1>&6
 
13551
echo "configure:13552: checking for sgemm_ in -lf77blas" >&5
 
13552
ac_lib_var=`echo f77blas'_'sgemm_ | sed 'y%./+-%__p_%'`
 
13553
 
 
13554
ac_save_LIBS="$LIBS"
 
13555
LIBS="-lf77blas -latlas $LIBS"
 
13556
cat > conftest.$ac_ext <<EOF
 
13557
#line 13558 "configure"
 
13558
#include "confdefs.h"
 
13559
/* Override any gcc2 internal prototype to avoid an error.  */
 
13560
/* We use char because int might match the return type of a gcc2
 
13561
    builtin and then its argument prototype would still apply.  */
 
13562
char sgemm_();
 
13563
 
 
13564
int main() {
 
13565
sgemm_()
 
13566
; return 0; }
 
13567
EOF
 
13568
if { (eval echo configure:13569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13569
  rm -rf conftest*
 
13570
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13571
else
 
13572
  echo "configure: failed program was:" >&5
 
13573
  cat conftest.$ac_ext >&5
 
13574
  rm -rf conftest*
 
13575
  eval "ac_cv_lib_$ac_lib_var=no"
 
13576
fi
 
13577
rm -f conftest*
 
13578
LIBS="$ac_save_LIBS"
 
13579
 
 
13580
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13581
  echo "$ac_t""yes" 1>&6
 
13582
  echo $ac_n "checking for cblas_dgemm in -lcblas""... $ac_c" 1>&6
 
13583
echo "configure:13584: checking for cblas_dgemm in -lcblas" >&5
 
13584
ac_lib_var=`echo cblas'_'cblas_dgemm | sed 'y%./+-%__p_%'`
 
13585
 
 
13586
ac_save_LIBS="$LIBS"
 
13587
LIBS="-lcblas -lf77blas -latlas $LIBS"
 
13588
cat > conftest.$ac_ext <<EOF
 
13589
#line 13590 "configure"
 
13590
#include "confdefs.h"
 
13591
/* Override any gcc2 internal prototype to avoid an error.  */
 
13592
/* We use char because int might match the return type of a gcc2
 
13593
    builtin and then its argument prototype would still apply.  */
 
13594
char cblas_dgemm();
 
13595
 
 
13596
int main() {
 
13597
cblas_dgemm()
 
13598
; return 0; }
 
13599
EOF
 
13600
if { (eval echo configure:13601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13601
  rm -rf conftest*
 
13602
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13603
else
 
13604
  echo "configure: failed program was:" >&5
 
13605
  cat conftest.$ac_ext >&5
 
13606
  rm -rf conftest*
 
13607
  eval "ac_cv_lib_$ac_lib_var=no"
 
13608
fi
 
13609
rm -f conftest*
 
13610
LIBS="$ac_save_LIBS"
 
13611
 
 
13612
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13613
  echo "$ac_t""yes" 1>&6
 
13614
  blas_ok=yes; BLASLIB="-lcblas -lf77blas -latlas"
 
13615
else
 
13616
  echo "$ac_t""no" 1>&6
 
13617
fi
 
13618
 
 
13619
else
 
13620
  echo "$ac_t""no" 1>&6
 
13621
fi
 
13622
 
 
13623
 
 
13624
else
 
13625
  echo "$ac_t""no" 1>&6
 
13626
fi
 
13627
 
 
13628
LDFLAGS="$save_LDFLAGS"
 
13629
 
 
13630
# Do we have ATLAS?
 
13631
if test $blas_ok = yes; then
 
13632
        cat >> confdefs.h <<\EOF
 
13633
#define HAVE_LIBATLAS 1
 
13634
EOF
 
13635
 
 
13636
fi
 
13637
 
 
13638
# BLAS in Apple vecLib framework? (Mac OS-X)
 
13639
#  not dependent on APP build
 
13640
#if test -n "$MACOSX_APP"; then
 
13641
if test $blas_ok = no; then
 
13642
        vlib_flags="-framework vecLib"
 
13643
        save_LIBS="$LIBS"
 
13644
        LIBS="$vlib_flags $LIBS"
 
13645
        echo $ac_n "checking for sgemm in $vlib_flags""... $ac_c" 1>&6
 
13646
echo "configure:13647: checking for sgemm in $vlib_flags" >&5
 
13647
        cat > conftest.$ac_ext <<EOF
 
13648
#line 13649 "configure"
 
13649
#include "confdefs.h"
 
13650
 
 
13651
int main() {
 
13652
sgemm
 
13653
; return 0; }
 
13654
EOF
 
13655
if { (eval echo configure:13656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13656
  rm -rf conftest*
 
13657
  blas_ok=yes; BLASLIB="$vlib_flags"
 
13658
else
 
13659
  echo "configure: failed program was:" >&5
 
13660
  cat conftest.$ac_ext >&5
 
13661
  rm -rf conftest*
 
13662
  BLASLIB=""
 
13663
fi
 
13664
rm -f conftest*
 
13665
        echo "$ac_t""$blas_ok" 1>&6
 
13666
        LIBS="$save_LIBS"
 
13667
fi
 
13668
#fi # $MACOSX_APP
 
13669
 
 
13670
# BLAS in PhiPACK libraries? (requires generic BLAS, too)
 
13671
if test $blas_ok = no; then
 
13672
        echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
 
13673
echo "configure:13674: checking for sgemm_ in -lblas" >&5
 
13674
ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
 
13675
 
 
13676
ac_save_LIBS="$LIBS"
 
13677
LIBS="-lblas  $LIBS"
 
13678
cat > conftest.$ac_ext <<EOF
 
13679
#line 13680 "configure"
 
13680
#include "confdefs.h"
 
13681
/* Override any gcc2 internal prototype to avoid an error.  */
 
13682
/* We use char because int might match the return type of a gcc2
 
13683
    builtin and then its argument prototype would still apply.  */
 
13684
char sgemm_();
 
13685
 
 
13686
int main() {
 
13687
sgemm_()
 
13688
; return 0; }
 
13689
EOF
 
13690
if { (eval echo configure:13691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13691
  rm -rf conftest*
 
13692
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13693
else
 
13694
  echo "configure: failed program was:" >&5
 
13695
  cat conftest.$ac_ext >&5
 
13696
  rm -rf conftest*
 
13697
  eval "ac_cv_lib_$ac_lib_var=no"
 
13698
fi
 
13699
rm -f conftest*
 
13700
LIBS="$ac_save_LIBS"
 
13701
 
 
13702
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13703
  echo "$ac_t""yes" 1>&6
 
13704
  echo $ac_n "checking for dgemm_ in -ldgemm""... $ac_c" 1>&6
 
13705
echo "configure:13706: checking for dgemm_ in -ldgemm" >&5
 
13706
ac_lib_var=`echo dgemm'_'dgemm_ | sed 'y%./+-%__p_%'`
 
13707
 
 
13708
ac_save_LIBS="$LIBS"
 
13709
LIBS="-ldgemm -lblas $LIBS"
 
13710
cat > conftest.$ac_ext <<EOF
 
13711
#line 13712 "configure"
 
13712
#include "confdefs.h"
 
13713
/* Override any gcc2 internal prototype to avoid an error.  */
 
13714
/* We use char because int might match the return type of a gcc2
 
13715
    builtin and then its argument prototype would still apply.  */
 
13716
char dgemm_();
 
13717
 
 
13718
int main() {
 
13719
dgemm_()
 
13720
; return 0; }
 
13721
EOF
 
13722
if { (eval echo configure:13723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13723
  rm -rf conftest*
 
13724
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13725
else
 
13726
  echo "configure: failed program was:" >&5
 
13727
  cat conftest.$ac_ext >&5
 
13728
  rm -rf conftest*
 
13729
  eval "ac_cv_lib_$ac_lib_var=no"
 
13730
fi
 
13731
rm -f conftest*
 
13732
LIBS="$ac_save_LIBS"
 
13733
 
 
13734
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13735
  echo "$ac_t""yes" 1>&6
 
13736
  echo $ac_n "checking for sgemm_ in -lsgemm""... $ac_c" 1>&6
 
13737
echo "configure:13738: checking for sgemm_ in -lsgemm" >&5
 
13738
ac_lib_var=`echo sgemm'_'sgemm_ | sed 'y%./+-%__p_%'`
 
13739
 
 
13740
ac_save_LIBS="$LIBS"
 
13741
LIBS="-lsgemm -lblas $LIBS"
 
13742
cat > conftest.$ac_ext <<EOF
 
13743
#line 13744 "configure"
 
13744
#include "confdefs.h"
 
13745
/* Override any gcc2 internal prototype to avoid an error.  */
 
13746
/* We use char because int might match the return type of a gcc2
 
13747
    builtin and then its argument prototype would still apply.  */
 
13748
char sgemm_();
 
13749
 
 
13750
int main() {
 
13751
sgemm_()
 
13752
; return 0; }
 
13753
EOF
 
13754
if { (eval echo configure:13755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13755
  rm -rf conftest*
 
13756
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13757
else
 
13758
  echo "configure: failed program was:" >&5
 
13759
  cat conftest.$ac_ext >&5
 
13760
  rm -rf conftest*
 
13761
  eval "ac_cv_lib_$ac_lib_var=no"
 
13762
fi
 
13763
rm -f conftest*
 
13764
LIBS="$ac_save_LIBS"
 
13765
 
 
13766
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13767
  echo "$ac_t""yes" 1>&6
 
13768
  blas_ok=yes; BLASLIB="-lsgemm -ldgemm -lblas"
 
13769
else
 
13770
  echo "$ac_t""no" 1>&6
 
13771
fi
 
13772
 
 
13773
else
 
13774
  echo "$ac_t""no" 1>&6
 
13775
fi
 
13776
 
 
13777
        
 
13778
else
 
13779
  echo "$ac_t""no" 1>&6
 
13780
fi
 
13781
 
 
13782
fi
 
13783
 
 
13784
# BLAS in Sun Performance library?
 
13785
if test $blas_ok = no; then
 
13786
        if test "x$GCC" != xyes; then # only works with Sun CC
 
13787
                echo $ac_n "checking for acosp in -lsunmath""... $ac_c" 1>&6
 
13788
echo "configure:13789: checking for acosp in -lsunmath" >&5
 
13789
ac_lib_var=`echo sunmath'_'acosp | sed 'y%./+-%__p_%'`
 
13790
 
 
13791
ac_save_LIBS="$LIBS"
 
13792
LIBS="-lsunmath  $LIBS"
 
13793
cat > conftest.$ac_ext <<EOF
 
13794
#line 13795 "configure"
 
13795
#include "confdefs.h"
 
13796
/* Override any gcc2 internal prototype to avoid an error.  */
 
13797
/* We use char because int might match the return type of a gcc2
 
13798
    builtin and then its argument prototype would still apply.  */
 
13799
char acosp();
 
13800
 
 
13801
int main() {
 
13802
acosp()
 
13803
; return 0; }
 
13804
EOF
 
13805
if { (eval echo configure:13806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13806
  rm -rf conftest*
 
13807
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13808
else
 
13809
  echo "configure: failed program was:" >&5
 
13810
  cat conftest.$ac_ext >&5
 
13811
  rm -rf conftest*
 
13812
  eval "ac_cv_lib_$ac_lib_var=no"
 
13813
fi
 
13814
rm -f conftest*
 
13815
LIBS="$ac_save_LIBS"
 
13816
 
 
13817
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13818
  echo "$ac_t""yes" 1>&6
 
13819
  echo $ac_n "checking for sgemm_ in -lsunperf""... $ac_c" 1>&6
 
13820
echo "configure:13821: checking for sgemm_ in -lsunperf" >&5
 
13821
ac_lib_var=`echo sunperf'_'sgemm_ | sed 'y%./+-%__p_%'`
 
13822
 
 
13823
ac_save_LIBS="$LIBS"
 
13824
LIBS="-lsunperf -lsunmath $LIBS"
 
13825
cat > conftest.$ac_ext <<EOF
 
13826
#line 13827 "configure"
 
13827
#include "confdefs.h"
 
13828
/* Override any gcc2 internal prototype to avoid an error.  */
 
13829
/* We use char because int might match the return type of a gcc2
 
13830
    builtin and then its argument prototype would still apply.  */
 
13831
char sgemm_();
 
13832
 
 
13833
int main() {
 
13834
sgemm_()
 
13835
; return 0; }
 
13836
EOF
 
13837
if { (eval echo configure:13838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13838
  rm -rf conftest*
 
13839
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13840
else
 
13841
  echo "configure: failed program was:" >&5
 
13842
  cat conftest.$ac_ext >&5
 
13843
  rm -rf conftest*
 
13844
  eval "ac_cv_lib_$ac_lib_var=no"
 
13845
fi
 
13846
rm -f conftest*
 
13847
LIBS="$ac_save_LIBS"
 
13848
 
 
13849
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13850
  echo "$ac_t""yes" 1>&6
 
13851
  blas_ok=yes; BLASLIB="-xlic_lib=sunperf -lsunmath"
 
13852
else
 
13853
  echo "$ac_t""no" 1>&6
 
13854
fi
 
13855
 
 
13856
                
 
13857
else
 
13858
  echo "$ac_t""no" 1>&6
 
13859
fi
 
13860
 
 
13861
        fi
 
13862
fi
 
13863
 
 
13864
# Generic BLAS library
 
13865
if test $blas_ok = no; then
 
13866
        echo $ac_n "checking for sgemm_ in -lblas""... $ac_c" 1>&6
 
13867
echo "configure:13868: checking for sgemm_ in -lblas" >&5
 
13868
ac_lib_var=`echo blas'_'sgemm_ | sed 'y%./+-%__p_%'`
 
13869
 
 
13870
ac_save_LIBS="$LIBS"
 
13871
LIBS="-lblas  $LIBS"
 
13872
cat > conftest.$ac_ext <<EOF
 
13873
#line 13874 "configure"
 
13874
#include "confdefs.h"
 
13875
/* Override any gcc2 internal prototype to avoid an error.  */
 
13876
/* We use char because int might match the return type of a gcc2
 
13877
    builtin and then its argument prototype would still apply.  */
 
13878
char sgemm_();
 
13879
 
 
13880
int main() {
 
13881
sgemm_()
 
13882
; return 0; }
 
13883
EOF
 
13884
if { (eval echo configure:13885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
13885
  rm -rf conftest*
 
13886
  eval "ac_cv_lib_$ac_lib_var=yes"
 
13887
else
 
13888
  echo "configure: failed program was:" >&5
 
13889
  cat conftest.$ac_ext >&5
 
13890
  rm -rf conftest*
 
13891
  eval "ac_cv_lib_$ac_lib_var=no"
 
13892
fi
 
13893
rm -f conftest*
 
13894
LIBS="$ac_save_LIBS"
 
13895
 
 
13896
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
13897
  echo "$ac_t""yes" 1>&6
 
13898
  blas_ok=yes; BLASLIB="-lblas"
 
13899
else
 
13900
  echo "$ac_t""no" 1>&6
 
13901
fi
 
13902
 
 
13903
fi
 
13904
 
 
13905
if test $blas_ok = yes; then
 
13906
cat >> confdefs.h <<\EOF
 
13907
#define HAVE_LIBBLAS 1
 
13908
EOF
 
13909
 
 
13910
fi
 
13911
 
 
13912
fi # $USE_BLAS
 
13913
 
 
13914
 
 
13915
 
 
13916
 
 
13917
# Done checking BLAS
 
13918
 
 
13919
# Enable LAPACK option
 
13920
 
 
13921
 
 
13922
echo $ac_n "checking whether to use LAPACK""... $ac_c" 1>&6
 
13923
echo "configure:13924: checking whether to use LAPACK" >&5
 
13924
echo "$ac_t"""$with_lapack"" 1>&6
 
13925
case "$with_lapack" in
 
13926
        "no")   USE_LAPACK=     ;;
 
13927
        "yes")  USE_LAPACK="1"  ;;
 
13928
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
13929
esac
 
13930
 
 
13931
 
 
13932
 
 
13933
LAPACKLIB=
 
13934
LAPACKINC=
 
13935
 
 
13936
# LAPACK is useless without BLAS
 
13937
if test -n "$USE_BLAS"; then
 
13938
if test -n "$USE_LAPACK"; then
 
13939
 
 
13940
# With LAPACK includes directory
 
13941
# LAPACK doesn't have includes (FORTRAN library)
 
13942
# With LAPACK library directory
 
13943
 
 
13944
lapack_ok=no
 
13945
 
 
13946
 
 
13947
echo $ac_n "checking for location of LAPACK includes""... $ac_c" 1>&6
 
13948
echo "configure:13949: checking for location of LAPACK includes" >&5
 
13949
case "$with_lapack_includes" in
 
13950
y | ye | yes | n | no)
 
13951
        { echo "configure: error: *** You must supply a directory to --with-lapack-includes." 1>&2; exit 1; }
 
13952
        ;;
 
13953
esac
 
13954
echo "$ac_t""$with_lapack_includes" 1>&6
 
13955
 
 
13956
if test -n "$with_lapack_includes" ; then
 
13957
    for dir in $with_lapack_includes; do
 
13958
        if test -d "$dir"; then
 
13959
            LAPACKINC="$LAPACKINC -I$dir"
 
13960
        else
 
13961
            { echo "configure: error: *** LAPACK includes directory $dir does not exist." 1>&2; exit 1; }
 
13962
        fi
 
13963
    done
 
13964
fi
 
13965
 
 
13966
 
 
13967
echo $ac_n "checking for location of LAPACK library""... $ac_c" 1>&6
 
13968
echo "configure:13969: checking for location of LAPACK library" >&5
 
13969
case "$with_lapack_libs" in
 
13970
y | ye | yes | n | no)
 
13971
        { echo "configure: error: *** You must supply a directory to --with-lapack-libs." 1>&2; exit 1; }
 
13972
        ;;
 
13973
esac
 
13974
echo "$ac_t""$with_lapack_libs" 1>&6
 
13975
 
 
13976
if test -n "$with_lapack_libs"; then
 
13977
    for dir in $with_lapack_libs; do
 
13978
        if test -d "$dir"; then
 
13979
            LAPACKLIB="$LAPACKLIB -L$dir"
 
13980
        else
 
13981
            { echo "configure: error: *** LAPACK library directory $dir does not exist." 1>&2; exit 1; }
 
13982
        fi
 
13983
    done
 
13984
fi
 
13985
 
 
13986
 
 
13987
# See if clapack.h exists (ATLAS)
 
13988
save_CPPFLAGS="$CPPFLAGS"
 
13989
CPPFLAGS="$LAPACKINC $CPPFLAGS"
 
13990
for ac_hdr in clapack.h
 
13991
do
 
13992
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
13993
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
13994
echo "configure:13995: checking for $ac_hdr" >&5
 
13995
 
 
13996
cat > conftest.$ac_ext <<EOF
 
13997
#line 13998 "configure"
 
13998
#include "confdefs.h"
 
13999
#include <$ac_hdr>
 
14000
EOF
 
14001
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
14002
{ (eval echo configure:14003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
14003
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
14004
if test -z "$ac_err"; then
 
14005
  rm -rf conftest*
 
14006
  eval "ac_cv_header_$ac_safe=yes"
 
14007
else
 
14008
  echo "$ac_err" >&5
 
14009
  echo "configure: failed program was:" >&5
 
14010
  cat conftest.$ac_ext >&5
 
14011
  rm -rf conftest*
 
14012
  eval "ac_cv_header_$ac_safe=no"
 
14013
fi
 
14014
rm -f conftest*
 
14015
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
14016
  echo "$ac_t""yes" 1>&6
 
14017
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
14018
  cat >> confdefs.h <<EOF
 
14019
#define $ac_tr_hdr 1
 
14020
EOF
 
14021
 
 
14022
else
 
14023
  echo "$ac_t""no" 1>&6
 
14024
fi
 
14025
done
 
14026
 
 
14027
CPPFLAGS="$save_CPPFLAGS"
 
14028
 
 
14029
# LAPACK linked to by default?
 
14030
if test lapack_ok=no; then
 
14031
        save_LIBS="$LIBS"; LIBS="$LIBS $BLASLIB $MATHLIB $FLIBS"
 
14032
        save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
 
14033
        echo $ac_n "checking for dsegv_""... $ac_c" 1>&6
 
14034
echo "configure:14035: checking for dsegv_" >&5
 
14035
 
 
14036
cat > conftest.$ac_ext <<EOF
 
14037
#line 14038 "configure"
 
14038
#include "confdefs.h"
 
14039
/* System header to define __stub macros and hopefully few prototypes,
 
14040
    which can conflict with char dsegv_(); below.  */
 
14041
#include <assert.h>
 
14042
/* Override any gcc2 internal prototype to avoid an error.  */
 
14043
/* We use char because int might match the return type of a gcc2
 
14044
    builtin and then its argument prototype would still apply.  */
 
14045
char dsegv_();
 
14046
 
 
14047
int main() {
 
14048
 
 
14049
/* The GNU C library defines this for functions which it implements
 
14050
    to always fail with ENOSYS.  Some functions are actually named
 
14051
    something starting with __ and the normal name is an alias.  */
 
14052
#if defined (__stub_dsegv_) || defined (__stub___dsegv_)
 
14053
choke me
 
14054
#else
 
14055
dsegv_();
 
14056
#endif
 
14057
 
 
14058
; return 0; }
 
14059
EOF
 
14060
if { (eval echo configure:14061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14061
  rm -rf conftest*
 
14062
  eval "ac_cv_func_dsegv_=yes"
 
14063
else
 
14064
  echo "configure: failed program was:" >&5
 
14065
  cat conftest.$ac_ext >&5
 
14066
  rm -rf conftest*
 
14067
  eval "ac_cv_func_dsegv_=no"
 
14068
fi
 
14069
rm -f conftest*
 
14070
 
 
14071
if eval "test \"`echo '$ac_cv_func_'dsegv_`\" = yes"; then
 
14072
  echo "$ac_t""yes" 1>&6
 
14073
  lapack_ok=yes
 
14074
else
 
14075
  echo "$ac_t""no" 1>&6
 
14076
fi
 
14077
 
 
14078
        LIBS="$save_LIBS"
 
14079
        LDFLAGS="$save_LDFLAGS"
 
14080
fi
 
14081
 
 
14082
# Generic LAPACK library?
 
14083
if test $lapack_ok = no; then
 
14084
        save_libs="$LIBS"; LIBS="$BLASLIB $MATHLIB $LIBS"
 
14085
        save_LDFLAGS="$LDFLAGS"; LDFLAGS="$LAPACKLIB $LDFLAGS"
 
14086
        echo $ac_n "checking for desgv_ in -llapack""... $ac_c" 1>&6
 
14087
echo "configure:14088: checking for desgv_ in -llapack" >&5
 
14088
ac_lib_var=`echo lapack'_'desgv_ | sed 'y%./+-%__p_%'`
 
14089
 
 
14090
ac_save_LIBS="$LIBS"
 
14091
LIBS="-llapack $FLIBS $LIBS"
 
14092
cat > conftest.$ac_ext <<EOF
 
14093
#line 14094 "configure"
 
14094
#include "confdefs.h"
 
14095
/* Override any gcc2 internal prototype to avoid an error.  */
 
14096
/* We use char because int might match the return type of a gcc2
 
14097
    builtin and then its argument prototype would still apply.  */
 
14098
char desgv_();
 
14099
 
 
14100
int main() {
 
14101
desgv_()
 
14102
; return 0; }
 
14103
EOF
 
14104
if { (eval echo configure:14105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14105
  rm -rf conftest*
 
14106
  eval "ac_cv_lib_$ac_lib_var=yes"
 
14107
else
 
14108
  echo "configure: failed program was:" >&5
 
14109
  cat conftest.$ac_ext >&5
 
14110
  rm -rf conftest*
 
14111
  eval "ac_cv_lib_$ac_lib_var=no"
 
14112
fi
 
14113
rm -f conftest*
 
14114
LIBS="$ac_save_LIBS"
 
14115
 
 
14116
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
14117
  echo "$ac_t""yes" 1>&6
 
14118
  lapack_ok=yes; LAPACKLIB="-llapack"
 
14119
else
 
14120
  echo "$ac_t""no" 1>&6
 
14121
fi
 
14122
 
 
14123
        LIBS="$save_LIBS"
 
14124
        LDFLAGS="$save_LDFLAGS"
 
14125
fi
 
14126
 
 
14127
if test $lapack_ok = no; then
 
14128
        
 
14129
ac_save_ldflags="$LDFLAGS"
 
14130
LDFLAGS="$LAPACKLIB $LDFLAGS"
 
14131
 
 
14132
 
 
14133
 
 
14134
 
 
14135
echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
 
14136
echo "configure:14137: checking for dgesv_ in -llapack" >&5
 
14137
ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
 
14138
 
 
14139
ac_save_LIBS="$LIBS"
 
14140
LIBS="-llapack $BLASLIB $MATHLIB  $LIBS"
 
14141
cat > conftest.$ac_ext <<EOF
 
14142
#line 14143 "configure"
 
14143
#include "confdefs.h"
 
14144
/* Override any gcc2 internal prototype to avoid an error.  */
 
14145
/* We use char because int might match the return type of a gcc2
 
14146
    builtin and then its argument prototype would still apply.  */
 
14147
char dgesv_();
 
14148
 
 
14149
int main() {
 
14150
dgesv_()
 
14151
; return 0; }
 
14152
EOF
 
14153
if { (eval echo configure:14154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14154
  rm -rf conftest*
 
14155
  eval "ac_cv_lib_$ac_lib_var=yes"
 
14156
else
 
14157
  echo "configure: failed program was:" >&5
 
14158
  cat conftest.$ac_ext >&5
 
14159
  rm -rf conftest*
 
14160
  eval "ac_cv_lib_$ac_lib_var=no"
 
14161
fi
 
14162
rm -f conftest*
 
14163
LIBS="$ac_save_LIBS"
 
14164
 
 
14165
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
14166
  echo "$ac_t""yes" 1>&6
 
14167
  LAPACKLIB="$LAPACKLIB -llapack "
 
14168
else
 
14169
  echo "$ac_t""no" 1>&6
 
14170
 
 
14171
echo $ac_n "checking for dgesv_ in -llapack""... $ac_c" 1>&6
 
14172
echo "configure:14173: checking for dgesv_ in -llapack" >&5
 
14173
ac_lib_var=`echo lapack'_'dgesv_ | sed 'y%./+-%__p_%'`
 
14174
 
 
14175
ac_save_LIBS="$LIBS"
 
14176
LIBS="-llapack $BLASLIB $MATHLIB -lg2c $LIBS"
 
14177
cat > conftest.$ac_ext <<EOF
 
14178
#line 14179 "configure"
 
14179
#include "confdefs.h"
 
14180
/* Override any gcc2 internal prototype to avoid an error.  */
 
14181
/* We use char because int might match the return type of a gcc2
 
14182
    builtin and then its argument prototype would still apply.  */
 
14183
char dgesv_();
 
14184
 
 
14185
int main() {
 
14186
dgesv_()
 
14187
; return 0; }
 
14188
EOF
 
14189
if { (eval echo configure:14190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14190
  rm -rf conftest*
 
14191
  eval "ac_cv_lib_$ac_lib_var=yes"
 
14192
else
 
14193
  echo "configure: failed program was:" >&5
 
14194
  cat conftest.$ac_ext >&5
 
14195
  rm -rf conftest*
 
14196
  eval "ac_cv_lib_$ac_lib_var=no"
 
14197
fi
 
14198
rm -f conftest*
 
14199
LIBS="$ac_save_LIBS"
 
14200
 
 
14201
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
14202
  echo "$ac_t""yes" 1>&6
 
14203
  LAPACKLIB="$LAPACKLIB -llapack -lg2c"
 
14204
else
 
14205
  echo "$ac_t""no" 1>&6
 
14206
 
 
14207
LDFLAGS=${ac_save_ldflags}
 
14208
 
 
14209
    { echo "configure: error: *** Unable to locate LAPACK library." 1>&2; exit 1; }
 
14210
 
 
14211
 
 
14212
fi
 
14213
 
 
14214
 
 
14215
 
 
14216
 
 
14217
fi
 
14218
 
 
14219
 
 
14220
 
 
14221
 
 
14222
 
 
14223
 
 
14224
LDFLAGS=${ac_save_ldflags}
 
14225
 
 
14226
fi
 
14227
 
 
14228
cat >> confdefs.h <<\EOF
 
14229
#define HAVE_LIBLAPACK 1
 
14230
EOF
 
14231
 
 
14232
 
 
14233
fi # $USE_LAPACK
 
14234
fi # $USE_BLAS
 
14235
 
 
14236
 
 
14237
 
 
14238
 
 
14239
# Done checking LAPACK
 
14240
 
 
14241
# Enable Motif option
 
14242
 
 
14243
 
 
14244
echo $ac_n "checking whether to use Motif""... $ac_c" 1>&6
 
14245
echo "configure:14246: checking whether to use Motif" >&5
 
14246
echo "$ac_t"""$with_motif"" 1>&6
 
14247
case "$with_motif" in
 
14248
        "no")   USE_MOTIF=      ;;
 
14249
        "yes")  USE_MOTIF="1"   ;;
 
14250
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
14251
esac
 
14252
 
 
14253
 
 
14254
 
 
14255
XMINC=
 
14256
XMLIB=
 
14257
 
 
14258
if test -n "$USE_MOTIF"; then
 
14259
 
 
14260
# With Motif includes directory
 
14261
 
 
14262
 
 
14263
echo $ac_n "checking for location of Motif includes""... $ac_c" 1>&6
 
14264
echo "configure:14265: checking for location of Motif includes" >&5
 
14265
case "$with_motif_includes" in
 
14266
y | ye | yes | n | no)
 
14267
        { echo "configure: error: *** You must supply a directory to --with-motif-includes." 1>&2; exit 1; }
 
14268
        ;;
 
14269
esac
 
14270
echo "$ac_t""$with_motif_includes" 1>&6
 
14271
 
 
14272
if test -n "$with_motif_includes" ; then
 
14273
    for dir in $with_motif_includes; do
 
14274
        if test -d "$dir"; then
 
14275
            XMINC="$XMINC -I$dir"
 
14276
        else
 
14277
            { echo "configure: error: *** Motif includes directory $dir does not exist." 1>&2; exit 1; }
 
14278
        fi
 
14279
    done
 
14280
fi
 
14281
 
 
14282
 
 
14283
 
 
14284
ac_save_cppflags="$CPPFLAGS"
 
14285
CPPFLAGS="$XMINC $X_CFLAGS $CPPFLAGS"
 
14286
for ac_hdr in Xm/Xm.h
 
14287
do
 
14288
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
14289
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
14290
echo "configure:14291: checking for $ac_hdr" >&5
 
14291
 
 
14292
cat > conftest.$ac_ext <<EOF
 
14293
#line 14294 "configure"
 
14294
#include "confdefs.h"
 
14295
#include <$ac_hdr>
 
14296
EOF
 
14297
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
14298
{ (eval echo configure:14299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
14299
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
14300
if test -z "$ac_err"; then
 
14301
  rm -rf conftest*
 
14302
  eval "ac_cv_header_$ac_safe=yes"
 
14303
else
 
14304
  echo "$ac_err" >&5
 
14305
  echo "configure: failed program was:" >&5
 
14306
  cat conftest.$ac_ext >&5
 
14307
  rm -rf conftest*
 
14308
  eval "ac_cv_header_$ac_safe=no"
 
14309
fi
 
14310
rm -f conftest*
 
14311
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
14312
  echo "$ac_t""yes" 1>&6
 
14313
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
14314
  cat >> confdefs.h <<EOF
 
14315
#define $ac_tr_hdr 1
 
14316
EOF
 
14317
 
 
14318
else
 
14319
  echo "$ac_t""no" 1>&6
 
14320
{ echo "configure: error: *** Unable to locate Motif includes." 1>&2; exit 1; }
 
14321
 
 
14322
fi
 
14323
done
 
14324
 
 
14325
CPPFLAGS=$ac_save_cppflags
 
14326
 
 
14327
 
 
14328
# With Motif library directory
 
14329
 
 
14330
 
 
14331
echo $ac_n "checking for location of Motif library""... $ac_c" 1>&6
 
14332
echo "configure:14333: checking for location of Motif library" >&5
 
14333
case "$with_motif_libs" in
 
14334
y | ye | yes | n | no)
 
14335
        { echo "configure: error: *** You must supply a directory to --with-motif-libs." 1>&2; exit 1; }
 
14336
        ;;
 
14337
esac
 
14338
echo "$ac_t""$with_motif_libs" 1>&6
 
14339
 
 
14340
if test -n "$with_motif_libs"; then
 
14341
    for dir in $with_motif_libs; do
 
14342
        if test -d "$dir"; then
 
14343
            XMLIB="$XMLIB -L$dir"
 
14344
        else
 
14345
            { echo "configure: error: *** Motif library directory $dir does not exist." 1>&2; exit 1; }
 
14346
        fi
 
14347
    done
 
14348
fi
 
14349
 
 
14350
 
 
14351
 
 
14352
ac_save_ldflags="$LDFLAGS"
 
14353
LDFLAGS="$XMLIB $LDFLAGS"
 
14354
 
 
14355
 
 
14356
echo $ac_n "checking for XmStringCreate in -lXm""... $ac_c" 1>&6
 
14357
echo "configure:14358: checking for XmStringCreate in -lXm" >&5
 
14358
ac_lib_var=`echo Xm'_'XmStringCreate | sed 'y%./+-%__p_%'`
 
14359
 
 
14360
ac_save_LIBS="$LIBS"
 
14361
LIBS="-lXm $X_LIBS -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS  $LIBS"
 
14362
cat > conftest.$ac_ext <<EOF
 
14363
#line 14364 "configure"
 
14364
#include "confdefs.h"
 
14365
/* Override any gcc2 internal prototype to avoid an error.  */
 
14366
/* We use char because int might match the return type of a gcc2
 
14367
    builtin and then its argument prototype would still apply.  */
 
14368
char XmStringCreate();
 
14369
 
 
14370
int main() {
 
14371
XmStringCreate()
 
14372
; return 0; }
 
14373
EOF
 
14374
if { (eval echo configure:14375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14375
  rm -rf conftest*
 
14376
  eval "ac_cv_lib_$ac_lib_var=yes"
 
14377
else
 
14378
  echo "configure: failed program was:" >&5
 
14379
  cat conftest.$ac_ext >&5
 
14380
  rm -rf conftest*
 
14381
  eval "ac_cv_lib_$ac_lib_var=no"
 
14382
fi
 
14383
rm -f conftest*
 
14384
LIBS="$ac_save_LIBS"
 
14385
 
 
14386
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
14387
  echo "$ac_t""yes" 1>&6
 
14388
  XMLIB="$XMLIB -lXm "
 
14389
else
 
14390
  echo "$ac_t""no" 1>&6
 
14391
 
 
14392
LDFLAGS=${ac_save_ldflags}
 
14393
 
 
14394
    { echo "configure: error: *** Unable to locate Motif library." 1>&2; exit 1; }
 
14395
 
 
14396
 
 
14397
fi
 
14398
 
 
14399
 
 
14400
 
 
14401
LDFLAGS=${ac_save_ldflags}
 
14402
 
 
14403
 
 
14404
fi # $USE_MOTIF
 
14405
 
 
14406
 
 
14407
 
 
14408
 
 
14409
# Done checking Motif
 
14410
 
 
14411
# Enable Cairo display driver option
 
14412
 
 
14413
 
 
14414
echo $ac_n "checking whether to use Cairo""... $ac_c" 1>&6
 
14415
echo "configure:14416: checking whether to use Cairo" >&5
 
14416
echo "$ac_t"""$with_cairo"" 1>&6
 
14417
case "$with_cairo" in
 
14418
        "no")   USE_CAIRO=      ;;
 
14419
        "yes")  USE_CAIRO="1"   ;;
 
14420
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
14421
esac
 
14422
 
 
14423
 
 
14424
 
 
14425
CAIROINC=
 
14426
CAIROLIB=
 
14427
 
 
14428
if test -n "$USE_CAIRO"; then
 
14429
 
 
14430
cairo="cairo cairo-ft"
 
14431
if test -n "$USE_X11"; then
 
14432
        cairo="$cairo cairo-xlib-xrender"
 
14433
fi
 
14434
 
 
14435
# With Cairo includes directory
 
14436
#FIXME: somehow quote dirs with spaces in $cairo ?
 
14437
CAIROINC=`pkg-config --cflags $cairo`
 
14438
 
 
14439
 
 
14440
echo $ac_n "checking for location of cairo includes""... $ac_c" 1>&6
 
14441
echo "configure:14442: checking for location of cairo includes" >&5
 
14442
case "$with_cairo_includes" in
 
14443
y | ye | yes | n | no)
 
14444
        { echo "configure: error: *** You must supply a directory to --with-cairo-includes." 1>&2; exit 1; }
 
14445
        ;;
 
14446
esac
 
14447
echo "$ac_t""$with_cairo_includes" 1>&6
 
14448
 
 
14449
if test -n "$with_cairo_includes" ; then
 
14450
    for dir in $with_cairo_includes; do
 
14451
        if test -d "$dir"; then
 
14452
            CAIROINC="$CAIROINC -I$dir"
 
14453
        else
 
14454
            { echo "configure: error: *** cairo includes directory $dir does not exist." 1>&2; exit 1; }
 
14455
        fi
 
14456
    done
 
14457
fi
 
14458
 
 
14459
 
 
14460
 
 
14461
ac_save_cppflags="$CPPFLAGS"
 
14462
CPPFLAGS="$CAIROINC $CPPFLAGS"
 
14463
for ac_hdr in cairo.h
 
14464
do
 
14465
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
14466
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
14467
echo "configure:14468: checking for $ac_hdr" >&5
 
14468
 
 
14469
cat > conftest.$ac_ext <<EOF
 
14470
#line 14471 "configure"
 
14471
#include "confdefs.h"
 
14472
#include <$ac_hdr>
 
14473
EOF
 
14474
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
14475
{ (eval echo configure:14476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
14476
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
14477
if test -z "$ac_err"; then
 
14478
  rm -rf conftest*
 
14479
  eval "ac_cv_header_$ac_safe=yes"
 
14480
else
 
14481
  echo "$ac_err" >&5
 
14482
  echo "configure: failed program was:" >&5
 
14483
  cat conftest.$ac_ext >&5
 
14484
  rm -rf conftest*
 
14485
  eval "ac_cv_header_$ac_safe=no"
 
14486
fi
 
14487
rm -f conftest*
 
14488
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
14489
  echo "$ac_t""yes" 1>&6
 
14490
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
14491
  cat >> confdefs.h <<EOF
 
14492
#define $ac_tr_hdr 1
 
14493
EOF
 
14494
 
 
14495
else
 
14496
  echo "$ac_t""no" 1>&6
 
14497
{ echo "configure: error: *** Unable to locate Cairo includes." 1>&2; exit 1; }
 
14498
 
 
14499
fi
 
14500
done
 
14501
 
 
14502
CPPFLAGS=$ac_save_cppflags
 
14503
 
 
14504
 
 
14505
# With Cairo library directory
 
14506
 
 
14507
CAIROLIB=`pkg-config --libs $cairo`
 
14508
 
 
14509
 
 
14510
echo $ac_n "checking for location of cairo library""... $ac_c" 1>&6
 
14511
echo "configure:14512: checking for location of cairo library" >&5
 
14512
case "$with_cairo_libs" in
 
14513
y | ye | yes | n | no)
 
14514
        { echo "configure: error: *** You must supply a directory to --with-cairo-libs." 1>&2; exit 1; }
 
14515
        ;;
 
14516
esac
 
14517
echo "$ac_t""$with_cairo_libs" 1>&6
 
14518
 
 
14519
if test -n "$with_cairo_libs"; then
 
14520
    for dir in $with_cairo_libs; do
 
14521
        if test -d "$dir"; then
 
14522
            CAIROLIB="$CAIROLIB -L$dir"
 
14523
        else
 
14524
            { echo "configure: error: *** cairo library directory $dir does not exist." 1>&2; exit 1; }
 
14525
        fi
 
14526
    done
 
14527
fi
 
14528
 
 
14529
 
 
14530
echo $ac_n "checking for cairo linking flags""... $ac_c" 1>&6
 
14531
echo "configure:14532: checking for cairo linking flags" >&5
 
14532
case "$with_cairo_ldflags" in
 
14533
y | ye | yes | n | no)
 
14534
        { echo "configure: error: *** You must supply a directory to --with-cairo-ldflags." 1>&2; exit 1; }
 
14535
        ;;
 
14536
esac
 
14537
echo "$ac_t""$with_cairo_ldflags" 1>&6
 
14538
CAIROLIB="$CAIROLIB $with_cairo_ldflags"
 
14539
 
 
14540
 
 
14541
 
 
14542
ac_save_libs="$LIBS"
 
14543
ac_save_ldflags="$LDFLAGS"
 
14544
LIBS=" $CAIROLIB $LIBS"
 
14545
LDFLAGS=" $LDFLAGS"
 
14546
echo $ac_n "checking for cairo_create""... $ac_c" 1>&6
 
14547
echo "configure:14548: checking for cairo_create" >&5
 
14548
 
 
14549
cat > conftest.$ac_ext <<EOF
 
14550
#line 14551 "configure"
 
14551
#include "confdefs.h"
 
14552
/* System header to define __stub macros and hopefully few prototypes,
 
14553
    which can conflict with char cairo_create(); below.  */
 
14554
#include <assert.h>
 
14555
/* Override any gcc2 internal prototype to avoid an error.  */
 
14556
/* We use char because int might match the return type of a gcc2
 
14557
    builtin and then its argument prototype would still apply.  */
 
14558
char cairo_create();
 
14559
 
 
14560
int main() {
 
14561
 
 
14562
/* The GNU C library defines this for functions which it implements
 
14563
    to always fail with ENOSYS.  Some functions are actually named
 
14564
    something starting with __ and the normal name is an alias.  */
 
14565
#if defined (__stub_cairo_create) || defined (__stub___cairo_create)
 
14566
choke me
 
14567
#else
 
14568
cairo_create();
 
14569
#endif
 
14570
 
 
14571
; return 0; }
 
14572
EOF
 
14573
if { (eval echo configure:14574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14574
  rm -rf conftest*
 
14575
  eval "ac_cv_func_cairo_create=yes"
 
14576
else
 
14577
  echo "configure: failed program was:" >&5
 
14578
  cat conftest.$ac_ext >&5
 
14579
  rm -rf conftest*
 
14580
  eval "ac_cv_func_cairo_create=no"
 
14581
fi
 
14582
rm -f conftest*
 
14583
 
 
14584
if eval "test \"`echo '$ac_cv_func_'cairo_create`\" = yes"; then
 
14585
  echo "$ac_t""yes" 1>&6
 
14586
  
 
14587
:
 
14588
 
 
14589
else
 
14590
  echo "$ac_t""no" 1>&6
 
14591
 
 
14592
 
 
14593
{ echo "configure: error: *** Unable to locate ." 1>&2; exit 1; }
 
14594
 
 
14595
 
 
14596
fi
 
14597
 
 
14598
LIBS=${ac_save_libs}
 
14599
LDFLAGS=${ac_save_ldflags}
 
14600
 
 
14601
 
 
14602
ac_save_libs="$LIBS"
 
14603
ac_save_ldflags="$LDFLAGS"
 
14604
LIBS=" $CAIROLIB $LIBS"
 
14605
LDFLAGS=" $LDFLAGS"
 
14606
echo $ac_n "checking for cairo_xlib_surface_create_with_xrender_format""... $ac_c" 1>&6
 
14607
echo "configure:14608: checking for cairo_xlib_surface_create_with_xrender_format" >&5
 
14608
 
 
14609
cat > conftest.$ac_ext <<EOF
 
14610
#line 14611 "configure"
 
14611
#include "confdefs.h"
 
14612
/* System header to define __stub macros and hopefully few prototypes,
 
14613
    which can conflict with char cairo_xlib_surface_create_with_xrender_format(); below.  */
 
14614
#include <assert.h>
 
14615
/* Override any gcc2 internal prototype to avoid an error.  */
 
14616
/* We use char because int might match the return type of a gcc2
 
14617
    builtin and then its argument prototype would still apply.  */
 
14618
char cairo_xlib_surface_create_with_xrender_format();
 
14619
 
 
14620
int main() {
 
14621
 
 
14622
/* The GNU C library defines this for functions which it implements
 
14623
    to always fail with ENOSYS.  Some functions are actually named
 
14624
    something starting with __ and the normal name is an alias.  */
 
14625
#if defined (__stub_cairo_xlib_surface_create_with_xrender_format) || defined (__stub___cairo_xlib_surface_create_with_xrender_format)
 
14626
choke me
 
14627
#else
 
14628
cairo_xlib_surface_create_with_xrender_format();
 
14629
#endif
 
14630
 
 
14631
; return 0; }
 
14632
EOF
 
14633
if { (eval echo configure:14634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14634
  rm -rf conftest*
 
14635
  eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=yes"
 
14636
else
 
14637
  echo "configure: failed program was:" >&5
 
14638
  cat conftest.$ac_ext >&5
 
14639
  rm -rf conftest*
 
14640
  eval "ac_cv_func_cairo_xlib_surface_create_with_xrender_format=no"
 
14641
fi
 
14642
rm -f conftest*
 
14643
 
 
14644
if eval "test \"`echo '$ac_cv_func_'cairo_xlib_surface_create_with_xrender_format`\" = yes"; then
 
14645
  echo "$ac_t""yes" 1>&6
 
14646
  
 
14647
CAIRO_HAS_XRENDER=1
 
14648
 
 
14649
else
 
14650
  echo "$ac_t""no" 1>&6
 
14651
 
 
14652
CAIRO_HAS_XRENDER=0
 
14653
 
 
14654
fi
 
14655
 
 
14656
LIBS=${ac_save_libs}
 
14657
LDFLAGS=${ac_save_ldflags}
 
14658
 
 
14659
 
 
14660
 
 
14661
CAIROLIB="$CAIROLIB $CAIROLDFLAGS"
 
14662
 
 
14663
fi # $USE_CAIRO
 
14664
 
 
14665
 
 
14666
 
 
14667
 
 
14668
 
 
14669
# Done checking Cairo
 
14670
 
 
14671
# Enable GLw option
 
14672
 
 
14673
 
 
14674
echo $ac_n "checking whether to use GLw""... $ac_c" 1>&6
 
14675
echo "configure:14676: checking whether to use GLw" >&5
 
14676
echo "$ac_t"""$with_glw"" 1>&6
 
14677
case "$with_glw" in
 
14678
        "no")   USE_GLW=        ;;
 
14679
        "yes")  USE_GLW="1"     ;;
 
14680
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
14681
esac
 
14682
 
 
14683
 
 
14684
 
 
14685
OPENGLWINC=
 
14686
OPENGLWM=
 
14687
 
 
14688
if test -n "$USE_GLW"; then
 
14689
 
 
14690
# With GLw includes directory
 
14691
 
 
14692
 
 
14693
echo $ac_n "checking for location of GLw includes""... $ac_c" 1>&6
 
14694
echo "configure:14695: checking for location of GLw includes" >&5
 
14695
case "$with_glw_includes" in
 
14696
y | ye | yes | n | no)
 
14697
        { echo "configure: error: *** You must supply a directory to --with-glw-includes." 1>&2; exit 1; }
 
14698
        ;;
 
14699
esac
 
14700
echo "$ac_t""$with_glw_includes" 1>&6
 
14701
 
 
14702
if test -n "$with_glw_includes" ; then
 
14703
    for dir in $with_glw_includes; do
 
14704
        if test -d "$dir"; then
 
14705
            OPENGLWINC="$OPENGLWINC -I$dir"
 
14706
        else
 
14707
            { echo "configure: error: *** GLw includes directory $dir does not exist." 1>&2; exit 1; }
 
14708
        fi
 
14709
    done
 
14710
fi
 
14711
 
 
14712
 
 
14713
 
 
14714
ac_save_cppflags="$CPPFLAGS"
 
14715
CPPFLAGS="$OPENGLWINC $XMINC $X_CFLAGS $OPENGLINC $CPPFLAGS"
 
14716
for ac_hdr in GL/GLwMDrawA.h
 
14717
do
 
14718
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
14719
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
14720
echo "configure:14721: checking for $ac_hdr" >&5
 
14721
 
 
14722
cat > conftest.$ac_ext <<EOF
 
14723
#line 14724 "configure"
 
14724
#include "confdefs.h"
 
14725
#include <$ac_hdr>
 
14726
EOF
 
14727
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
14728
{ (eval echo configure:14729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
14729
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
14730
if test -z "$ac_err"; then
 
14731
  rm -rf conftest*
 
14732
  eval "ac_cv_header_$ac_safe=yes"
 
14733
else
 
14734
  echo "$ac_err" >&5
 
14735
  echo "configure: failed program was:" >&5
 
14736
  cat conftest.$ac_ext >&5
 
14737
  rm -rf conftest*
 
14738
  eval "ac_cv_header_$ac_safe=no"
 
14739
fi
 
14740
rm -f conftest*
 
14741
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
14742
  echo "$ac_t""yes" 1>&6
 
14743
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
14744
  cat >> confdefs.h <<EOF
 
14745
#define $ac_tr_hdr 1
 
14746
EOF
 
14747
 
 
14748
else
 
14749
  echo "$ac_t""no" 1>&6
 
14750
ac_save_cppflags="$CPPFLAGS"
 
14751
CPPFLAGS=" $CPPFLAGS"
 
14752
for ac_hdr in X11/GLw/GLwMDrawA.h
 
14753
do
 
14754
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
14755
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
14756
echo "configure:14757: checking for $ac_hdr" >&5
 
14757
 
 
14758
cat > conftest.$ac_ext <<EOF
 
14759
#line 14760 "configure"
 
14760
#include "confdefs.h"
 
14761
#include <$ac_hdr>
 
14762
EOF
 
14763
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
14764
{ (eval echo configure:14765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
14765
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
14766
if test -z "$ac_err"; then
 
14767
  rm -rf conftest*
 
14768
  eval "ac_cv_header_$ac_safe=yes"
 
14769
else
 
14770
  echo "$ac_err" >&5
 
14771
  echo "configure: failed program was:" >&5
 
14772
  cat conftest.$ac_ext >&5
 
14773
  rm -rf conftest*
 
14774
  eval "ac_cv_header_$ac_safe=no"
 
14775
fi
 
14776
rm -f conftest*
 
14777
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
14778
  echo "$ac_t""yes" 1>&6
 
14779
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
14780
  cat >> confdefs.h <<EOF
 
14781
#define $ac_tr_hdr 1
 
14782
EOF
 
14783
 
 
14784
else
 
14785
  echo "$ac_t""no" 1>&6
 
14786
{ echo "configure: error: *** Unable to locate GLwM includes." 1>&2; exit 1; }
 
14787
 
 
14788
fi
 
14789
done
 
14790
 
 
14791
CPPFLAGS=$ac_save_cppflags
 
14792
 
 
14793
 
 
14794
fi
 
14795
done
 
14796
 
 
14797
CPPFLAGS=$ac_save_cppflags
 
14798
 
 
14799
 
 
14800
# With GLw library directory
 
14801
 
 
14802
 
 
14803
echo $ac_n "checking for location of GLw library""... $ac_c" 1>&6
 
14804
echo "configure:14805: checking for location of GLw library" >&5
 
14805
case "$with_glw_libs" in
 
14806
y | ye | yes | n | no)
 
14807
        { echo "configure: error: *** You must supply a directory to --with-glw-libs." 1>&2; exit 1; }
 
14808
        ;;
 
14809
esac
 
14810
echo "$ac_t""$with_glw_libs" 1>&6
 
14811
 
 
14812
if test -n "$with_glw_libs"; then
 
14813
    for dir in $with_glw_libs; do
 
14814
        if test -d "$dir"; then
 
14815
            OPENGLWM="$OPENGLWM -L$dir"
 
14816
        else
 
14817
            { echo "configure: error: *** GLw library directory $dir does not exist." 1>&2; exit 1; }
 
14818
        fi
 
14819
    done
 
14820
fi
 
14821
 
 
14822
 
 
14823
 
 
14824
ac_save_ldflags="$LDFLAGS"
 
14825
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
 
14826
 
 
14827
 
 
14828
echo $ac_n "checking for GLwCreateMDrawingArea in -lGLw""... $ac_c" 1>&6
 
14829
echo "configure:14830: checking for GLwCreateMDrawingArea in -lGLw" >&5
 
14830
ac_lib_var=`echo GLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
14831
 
 
14832
ac_save_LIBS="$LIBS"
 
14833
LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
14834
cat > conftest.$ac_ext <<EOF
 
14835
#line 14836 "configure"
 
14836
#include "confdefs.h"
 
14837
/* Override any gcc2 internal prototype to avoid an error.  */
 
14838
/* We use char because int might match the return type of a gcc2
 
14839
    builtin and then its argument prototype would still apply.  */
 
14840
char GLwCreateMDrawingArea();
 
14841
 
 
14842
int main() {
 
14843
GLwCreateMDrawingArea()
 
14844
; return 0; }
 
14845
EOF
 
14846
if { (eval echo configure:14847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14847
  rm -rf conftest*
 
14848
  eval "ac_cv_lib_$ac_lib_var=yes"
 
14849
else
 
14850
  echo "configure: failed program was:" >&5
 
14851
  cat conftest.$ac_ext >&5
 
14852
  rm -rf conftest*
 
14853
  eval "ac_cv_lib_$ac_lib_var=no"
 
14854
fi
 
14855
rm -f conftest*
 
14856
LIBS="$ac_save_LIBS"
 
14857
 
 
14858
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
14859
  echo "$ac_t""yes" 1>&6
 
14860
  OPENGLWM="$OPENGLWM -lGLw "
 
14861
else
 
14862
  echo "$ac_t""no" 1>&6
 
14863
 
 
14864
LDFLAGS=${ac_save_ldflags}
 
14865
 
 
14866
ac_save_ldflags="$LDFLAGS"
 
14867
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
 
14868
 
 
14869
 
 
14870
echo $ac_n "checking for GLwCreateM1DrawingArea in -lGLw""... $ac_c" 1>&6
 
14871
echo "configure:14872: checking for GLwCreateM1DrawingArea in -lGLw" >&5
 
14872
ac_lib_var=`echo GLw'_'GLwCreateM1DrawingArea | sed 'y%./+-%__p_%'`
 
14873
 
 
14874
ac_save_LIBS="$LIBS"
 
14875
LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
14876
cat > conftest.$ac_ext <<EOF
 
14877
#line 14878 "configure"
 
14878
#include "confdefs.h"
 
14879
/* Override any gcc2 internal prototype to avoid an error.  */
 
14880
/* We use char because int might match the return type of a gcc2
 
14881
    builtin and then its argument prototype would still apply.  */
 
14882
char GLwCreateM1DrawingArea();
 
14883
 
 
14884
int main() {
 
14885
GLwCreateM1DrawingArea()
 
14886
; return 0; }
 
14887
EOF
 
14888
if { (eval echo configure:14889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14889
  rm -rf conftest*
 
14890
  eval "ac_cv_lib_$ac_lib_var=yes"
 
14891
else
 
14892
  echo "configure: failed program was:" >&5
 
14893
  cat conftest.$ac_ext >&5
 
14894
  rm -rf conftest*
 
14895
  eval "ac_cv_lib_$ac_lib_var=no"
 
14896
fi
 
14897
rm -f conftest*
 
14898
LIBS="$ac_save_LIBS"
 
14899
 
 
14900
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
14901
  echo "$ac_t""yes" 1>&6
 
14902
  OPENGLWM="$OPENGLWM -lGLw "
 
14903
else
 
14904
  echo "$ac_t""no" 1>&6
 
14905
 
 
14906
LDFLAGS=${ac_save_ldflags}
 
14907
 
 
14908
ac_save_ldflags="$LDFLAGS"
 
14909
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
 
14910
 
 
14911
 
 
14912
echo $ac_n "checking for GLwCreateM2DrawingArea in -lGLw""... $ac_c" 1>&6
 
14913
echo "configure:14914: checking for GLwCreateM2DrawingArea in -lGLw" >&5
 
14914
ac_lib_var=`echo GLw'_'GLwCreateM2DrawingArea | sed 'y%./+-%__p_%'`
 
14915
 
 
14916
ac_save_LIBS="$LIBS"
 
14917
LIBS="-lGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
14918
cat > conftest.$ac_ext <<EOF
 
14919
#line 14920 "configure"
 
14920
#include "confdefs.h"
 
14921
/* Override any gcc2 internal prototype to avoid an error.  */
 
14922
/* We use char because int might match the return type of a gcc2
 
14923
    builtin and then its argument prototype would still apply.  */
 
14924
char GLwCreateM2DrawingArea();
 
14925
 
 
14926
int main() {
 
14927
GLwCreateM2DrawingArea()
 
14928
; return 0; }
 
14929
EOF
 
14930
if { (eval echo configure:14931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14931
  rm -rf conftest*
 
14932
  eval "ac_cv_lib_$ac_lib_var=yes"
 
14933
else
 
14934
  echo "configure: failed program was:" >&5
 
14935
  cat conftest.$ac_ext >&5
 
14936
  rm -rf conftest*
 
14937
  eval "ac_cv_lib_$ac_lib_var=no"
 
14938
fi
 
14939
rm -f conftest*
 
14940
LIBS="$ac_save_LIBS"
 
14941
 
 
14942
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
14943
  echo "$ac_t""yes" 1>&6
 
14944
  OPENGLWM="$OPENGLWM -lGLw "
 
14945
else
 
14946
  echo "$ac_t""no" 1>&6
 
14947
 
 
14948
LDFLAGS=${ac_save_ldflags}
 
14949
 
 
14950
ac_save_ldflags="$LDFLAGS"
 
14951
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
 
14952
 
 
14953
 
 
14954
echo $ac_n "checking for GLwCreateMDrawingArea in -lGLwM""... $ac_c" 1>&6
 
14955
echo "configure:14956: checking for GLwCreateMDrawingArea in -lGLwM" >&5
 
14956
ac_lib_var=`echo GLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
14957
 
 
14958
ac_save_LIBS="$LIBS"
 
14959
LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
14960
cat > conftest.$ac_ext <<EOF
 
14961
#line 14962 "configure"
 
14962
#include "confdefs.h"
 
14963
/* Override any gcc2 internal prototype to avoid an error.  */
 
14964
/* We use char because int might match the return type of a gcc2
 
14965
    builtin and then its argument prototype would still apply.  */
 
14966
char GLwCreateMDrawingArea();
 
14967
 
 
14968
int main() {
 
14969
GLwCreateMDrawingArea()
 
14970
; return 0; }
 
14971
EOF
 
14972
if { (eval echo configure:14973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
14973
  rm -rf conftest*
 
14974
  eval "ac_cv_lib_$ac_lib_var=yes"
 
14975
else
 
14976
  echo "configure: failed program was:" >&5
 
14977
  cat conftest.$ac_ext >&5
 
14978
  rm -rf conftest*
 
14979
  eval "ac_cv_lib_$ac_lib_var=no"
 
14980
fi
 
14981
rm -f conftest*
 
14982
LIBS="$ac_save_LIBS"
 
14983
 
 
14984
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
14985
  echo "$ac_t""yes" 1>&6
 
14986
  OPENGLWM="$OPENGLWM -lGLwM "
 
14987
else
 
14988
  echo "$ac_t""no" 1>&6
 
14989
 
 
14990
LDFLAGS=${ac_save_ldflags}
 
14991
 
 
14992
ac_save_ldflags="$LDFLAGS"
 
14993
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
 
14994
 
 
14995
 
 
14996
echo $ac_n "checking for GLwCreateM1DrawingArea in -lGLwM""... $ac_c" 1>&6
 
14997
echo "configure:14998: checking for GLwCreateM1DrawingArea in -lGLwM" >&5
 
14998
ac_lib_var=`echo GLwM'_'GLwCreateM1DrawingArea | sed 'y%./+-%__p_%'`
 
14999
 
 
15000
ac_save_LIBS="$LIBS"
 
15001
LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
15002
cat > conftest.$ac_ext <<EOF
 
15003
#line 15004 "configure"
 
15004
#include "confdefs.h"
 
15005
/* Override any gcc2 internal prototype to avoid an error.  */
 
15006
/* We use char because int might match the return type of a gcc2
 
15007
    builtin and then its argument prototype would still apply.  */
 
15008
char GLwCreateM1DrawingArea();
 
15009
 
 
15010
int main() {
 
15011
GLwCreateM1DrawingArea()
 
15012
; return 0; }
 
15013
EOF
 
15014
if { (eval echo configure:15015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15015
  rm -rf conftest*
 
15016
  eval "ac_cv_lib_$ac_lib_var=yes"
 
15017
else
 
15018
  echo "configure: failed program was:" >&5
 
15019
  cat conftest.$ac_ext >&5
 
15020
  rm -rf conftest*
 
15021
  eval "ac_cv_lib_$ac_lib_var=no"
 
15022
fi
 
15023
rm -f conftest*
 
15024
LIBS="$ac_save_LIBS"
 
15025
 
 
15026
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
15027
  echo "$ac_t""yes" 1>&6
 
15028
  OPENGLWM="$OPENGLWM -lGLwM "
 
15029
else
 
15030
  echo "$ac_t""no" 1>&6
 
15031
 
 
15032
LDFLAGS=${ac_save_ldflags}
 
15033
 
 
15034
ac_save_ldflags="$LDFLAGS"
 
15035
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
 
15036
 
 
15037
 
 
15038
echo $ac_n "checking for GLwCreateM2DrawingArea in -lGLwM""... $ac_c" 1>&6
 
15039
echo "configure:15040: checking for GLwCreateM2DrawingArea in -lGLwM" >&5
 
15040
ac_lib_var=`echo GLwM'_'GLwCreateM2DrawingArea | sed 'y%./+-%__p_%'`
 
15041
 
 
15042
ac_save_LIBS="$LIBS"
 
15043
LIBS="-lGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
15044
cat > conftest.$ac_ext <<EOF
 
15045
#line 15046 "configure"
 
15046
#include "confdefs.h"
 
15047
/* Override any gcc2 internal prototype to avoid an error.  */
 
15048
/* We use char because int might match the return type of a gcc2
 
15049
    builtin and then its argument prototype would still apply.  */
 
15050
char GLwCreateM2DrawingArea();
 
15051
 
 
15052
int main() {
 
15053
GLwCreateM2DrawingArea()
 
15054
; return 0; }
 
15055
EOF
 
15056
if { (eval echo configure:15057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15057
  rm -rf conftest*
 
15058
  eval "ac_cv_lib_$ac_lib_var=yes"
 
15059
else
 
15060
  echo "configure: failed program was:" >&5
 
15061
  cat conftest.$ac_ext >&5
 
15062
  rm -rf conftest*
 
15063
  eval "ac_cv_lib_$ac_lib_var=no"
 
15064
fi
 
15065
rm -f conftest*
 
15066
LIBS="$ac_save_LIBS"
 
15067
 
 
15068
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
15069
  echo "$ac_t""yes" 1>&6
 
15070
  OPENGLWM="$OPENGLWM -lGLwM "
 
15071
else
 
15072
  echo "$ac_t""no" 1>&6
 
15073
 
 
15074
LDFLAGS=${ac_save_ldflags}
 
15075
 
 
15076
ac_save_ldflags="$LDFLAGS"
 
15077
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
 
15078
 
 
15079
 
 
15080
 
 
15081
 
 
15082
echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLw""... $ac_c" 1>&6
 
15083
echo "configure:15084: checking for GLwCreateMDrawingArea in -lMesaGLw" >&5
 
15084
ac_lib_var=`echo MesaGLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
15085
 
 
15086
ac_save_LIBS="$LIBS"
 
15087
LIBS="-lMesaGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
15088
cat > conftest.$ac_ext <<EOF
 
15089
#line 15090 "configure"
 
15090
#include "confdefs.h"
 
15091
/* Override any gcc2 internal prototype to avoid an error.  */
 
15092
/* We use char because int might match the return type of a gcc2
 
15093
    builtin and then its argument prototype would still apply.  */
 
15094
char GLwCreateMDrawingArea();
 
15095
 
 
15096
int main() {
 
15097
GLwCreateMDrawingArea()
 
15098
; return 0; }
 
15099
EOF
 
15100
if { (eval echo configure:15101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15101
  rm -rf conftest*
 
15102
  eval "ac_cv_lib_$ac_lib_var=yes"
 
15103
else
 
15104
  echo "configure: failed program was:" >&5
 
15105
  cat conftest.$ac_ext >&5
 
15106
  rm -rf conftest*
 
15107
  eval "ac_cv_lib_$ac_lib_var=no"
 
15108
fi
 
15109
rm -f conftest*
 
15110
LIBS="$ac_save_LIBS"
 
15111
 
 
15112
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
15113
  echo "$ac_t""yes" 1>&6
 
15114
  OPENGLWM="$OPENGLWM -lMesaGLw "
 
15115
else
 
15116
  echo "$ac_t""no" 1>&6
 
15117
 
 
15118
echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLw""... $ac_c" 1>&6
 
15119
echo "configure:15120: checking for GLwCreateMDrawingArea in -lMesaGLw" >&5
 
15120
ac_lib_var=`echo MesaGLw'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
15121
 
 
15122
ac_save_LIBS="$LIBS"
 
15123
LIBS="-lMesaGLw $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $OPENGLULIB $LIBS"
 
15124
cat > conftest.$ac_ext <<EOF
 
15125
#line 15126 "configure"
 
15126
#include "confdefs.h"
 
15127
/* Override any gcc2 internal prototype to avoid an error.  */
 
15128
/* We use char because int might match the return type of a gcc2
 
15129
    builtin and then its argument prototype would still apply.  */
 
15130
char GLwCreateMDrawingArea();
 
15131
 
 
15132
int main() {
 
15133
GLwCreateMDrawingArea()
 
15134
; return 0; }
 
15135
EOF
 
15136
if { (eval echo configure:15137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15137
  rm -rf conftest*
 
15138
  eval "ac_cv_lib_$ac_lib_var=yes"
 
15139
else
 
15140
  echo "configure: failed program was:" >&5
 
15141
  cat conftest.$ac_ext >&5
 
15142
  rm -rf conftest*
 
15143
  eval "ac_cv_lib_$ac_lib_var=no"
 
15144
fi
 
15145
rm -f conftest*
 
15146
LIBS="$ac_save_LIBS"
 
15147
 
 
15148
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
15149
  echo "$ac_t""yes" 1>&6
 
15150
  OPENGLWM="$OPENGLWM -lMesaGLw $OPENGLULIB"
 
15151
else
 
15152
  echo "$ac_t""no" 1>&6
 
15153
 
 
15154
LDFLAGS=${ac_save_ldflags}
 
15155
 
 
15156
ac_save_ldflags="$LDFLAGS"
 
15157
LDFLAGS="$OPENGLWM $XMLIB $OPENGL_LIB_PATH $LDFLAGS"
 
15158
 
 
15159
 
 
15160
 
 
15161
 
 
15162
echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLwM""... $ac_c" 1>&6
 
15163
echo "configure:15164: checking for GLwCreateMDrawingArea in -lMesaGLwM" >&5
 
15164
ac_lib_var=`echo MesaGLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
15165
 
 
15166
ac_save_LIBS="$LIBS"
 
15167
LIBS="-lMesaGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB  $LIBS"
 
15168
cat > conftest.$ac_ext <<EOF
 
15169
#line 15170 "configure"
 
15170
#include "confdefs.h"
 
15171
/* Override any gcc2 internal prototype to avoid an error.  */
 
15172
/* We use char because int might match the return type of a gcc2
 
15173
    builtin and then its argument prototype would still apply.  */
 
15174
char GLwCreateMDrawingArea();
 
15175
 
 
15176
int main() {
 
15177
GLwCreateMDrawingArea()
 
15178
; return 0; }
 
15179
EOF
 
15180
if { (eval echo configure:15181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15181
  rm -rf conftest*
 
15182
  eval "ac_cv_lib_$ac_lib_var=yes"
 
15183
else
 
15184
  echo "configure: failed program was:" >&5
 
15185
  cat conftest.$ac_ext >&5
 
15186
  rm -rf conftest*
 
15187
  eval "ac_cv_lib_$ac_lib_var=no"
 
15188
fi
 
15189
rm -f conftest*
 
15190
LIBS="$ac_save_LIBS"
 
15191
 
 
15192
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
15193
  echo "$ac_t""yes" 1>&6
 
15194
  OPENGLWM="$OPENGLWM -lMesaGLwM "
 
15195
else
 
15196
  echo "$ac_t""no" 1>&6
 
15197
 
 
15198
echo $ac_n "checking for GLwCreateMDrawingArea in -lMesaGLwM""... $ac_c" 1>&6
 
15199
echo "configure:15200: checking for GLwCreateMDrawingArea in -lMesaGLwM" >&5
 
15200
ac_lib_var=`echo MesaGLwM'_'GLwCreateMDrawingArea | sed 'y%./+-%__p_%'`
 
15201
 
 
15202
ac_save_LIBS="$LIBS"
 
15203
LIBS="-lMesaGLwM $X_LIBS $OPENGLLIB -lXm -lXt $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $MATHLIB $OPENGLULIB $LIBS"
 
15204
cat > conftest.$ac_ext <<EOF
 
15205
#line 15206 "configure"
 
15206
#include "confdefs.h"
 
15207
/* Override any gcc2 internal prototype to avoid an error.  */
 
15208
/* We use char because int might match the return type of a gcc2
 
15209
    builtin and then its argument prototype would still apply.  */
 
15210
char GLwCreateMDrawingArea();
 
15211
 
 
15212
int main() {
 
15213
GLwCreateMDrawingArea()
 
15214
; return 0; }
 
15215
EOF
 
15216
if { (eval echo configure:15217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15217
  rm -rf conftest*
 
15218
  eval "ac_cv_lib_$ac_lib_var=yes"
 
15219
else
 
15220
  echo "configure: failed program was:" >&5
 
15221
  cat conftest.$ac_ext >&5
 
15222
  rm -rf conftest*
 
15223
  eval "ac_cv_lib_$ac_lib_var=no"
 
15224
fi
 
15225
rm -f conftest*
 
15226
LIBS="$ac_save_LIBS"
 
15227
 
 
15228
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
15229
  echo "$ac_t""yes" 1>&6
 
15230
  OPENGLWM="$OPENGLWM -lMesaGLwM $OPENGLULIB"
 
15231
else
 
15232
  echo "$ac_t""no" 1>&6
 
15233
 
 
15234
LDFLAGS=${ac_save_ldflags}
 
15235
 
 
15236
    { echo "configure: error: *** Unable to locate GLwM library." 1>&2; exit 1; }
 
15237
 
 
15238
 
 
15239
fi
 
15240
 
 
15241
 
 
15242
 
 
15243
 
 
15244
fi
 
15245
 
 
15246
 
 
15247
 
 
15248
 
 
15249
 
 
15250
 
 
15251
LDFLAGS=${ac_save_ldflags}
 
15252
 
 
15253
 
 
15254
 
 
15255
fi
 
15256
 
 
15257
 
 
15258
 
 
15259
 
 
15260
fi
 
15261
 
 
15262
 
 
15263
 
 
15264
 
 
15265
 
 
15266
 
 
15267
LDFLAGS=${ac_save_ldflags}
 
15268
 
 
15269
 
 
15270
 
 
15271
fi
 
15272
 
 
15273
 
 
15274
 
 
15275
LDFLAGS=${ac_save_ldflags}
 
15276
 
 
15277
 
 
15278
 
 
15279
fi
 
15280
 
 
15281
 
 
15282
 
 
15283
LDFLAGS=${ac_save_ldflags}
 
15284
 
 
15285
 
 
15286
 
 
15287
fi
 
15288
 
 
15289
 
 
15290
 
 
15291
LDFLAGS=${ac_save_ldflags}
 
15292
 
 
15293
 
 
15294
 
 
15295
fi
 
15296
 
 
15297
 
 
15298
 
 
15299
LDFLAGS=${ac_save_ldflags}
 
15300
 
 
15301
 
 
15302
 
 
15303
fi
 
15304
 
 
15305
 
 
15306
 
 
15307
LDFLAGS=${ac_save_ldflags}
 
15308
 
 
15309
 
 
15310
 
 
15311
fi
 
15312
 
 
15313
 
 
15314
 
 
15315
LDFLAGS=${ac_save_ldflags}
 
15316
 
 
15317
 
 
15318
fi # $USE_OPENGL && $USE_MOTIF
 
15319
 
 
15320
 
 
15321
 
 
15322
 
 
15323
# Done checking GLw
 
15324
 
 
15325
# Enable FreeType option
 
15326
 
 
15327
 
 
15328
echo $ac_n "checking whether to use FreeType""... $ac_c" 1>&6
 
15329
echo "configure:15330: checking whether to use FreeType" >&5
 
15330
echo "$ac_t"""$with_freetype"" 1>&6
 
15331
case "$with_freetype" in
 
15332
        "no")   USE_FREETYPE=   ;;
 
15333
        "yes")  USE_FREETYPE="1"        ;;
 
15334
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
15335
esac
 
15336
 
 
15337
 
 
15338
 
 
15339
FTINC=
 
15340
FTLIB=
 
15341
 
 
15342
if test -n "$USE_FREETYPE"; then
 
15343
 
 
15344
# With FreeType includes directory
 
15345
 
 
15346
 
 
15347
echo $ac_n "checking for location of FreeType includes""... $ac_c" 1>&6
 
15348
echo "configure:15349: checking for location of FreeType includes" >&5
 
15349
case "$with_freetype_includes" in
 
15350
y | ye | yes | n | no)
 
15351
        { echo "configure: error: *** You must supply a directory to --with-freetype-includes." 1>&2; exit 1; }
 
15352
        ;;
 
15353
esac
 
15354
echo "$ac_t""$with_freetype_includes" 1>&6
 
15355
 
 
15356
if test -n "$with_freetype_includes" ; then
 
15357
    for dir in $with_freetype_includes; do
 
15358
        if test -d "$dir"; then
 
15359
            FTINC="$FTINC -I$dir"
 
15360
        else
 
15361
            { echo "configure: error: *** FreeType includes directory $dir does not exist." 1>&2; exit 1; }
 
15362
        fi
 
15363
    done
 
15364
fi
 
15365
 
 
15366
 
 
15367
 
 
15368
ac_save_cppflags="$CPPFLAGS"
 
15369
CPPFLAGS="$FTINC $CPPFLAGS"
 
15370
for ac_hdr in ft2build.h
 
15371
do
 
15372
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
15373
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
15374
echo "configure:15375: checking for $ac_hdr" >&5
 
15375
 
 
15376
cat > conftest.$ac_ext <<EOF
 
15377
#line 15378 "configure"
 
15378
#include "confdefs.h"
 
15379
#include <$ac_hdr>
 
15380
EOF
 
15381
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
15382
{ (eval echo configure:15383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
15383
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
15384
if test -z "$ac_err"; then
 
15385
  rm -rf conftest*
 
15386
  eval "ac_cv_header_$ac_safe=yes"
 
15387
else
 
15388
  echo "$ac_err" >&5
 
15389
  echo "configure: failed program was:" >&5
 
15390
  cat conftest.$ac_ext >&5
 
15391
  rm -rf conftest*
 
15392
  eval "ac_cv_header_$ac_safe=no"
 
15393
fi
 
15394
rm -f conftest*
 
15395
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
15396
  echo "$ac_t""yes" 1>&6
 
15397
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
15398
  cat >> confdefs.h <<EOF
 
15399
#define $ac_tr_hdr 1
 
15400
EOF
 
15401
 
 
15402
else
 
15403
  echo "$ac_t""no" 1>&6
 
15404
{ echo "configure: error: *** Unable to locate FreeType includes." 1>&2; exit 1; }
 
15405
 
 
15406
fi
 
15407
done
 
15408
 
 
15409
CPPFLAGS=$ac_save_cppflags
 
15410
 
 
15411
 
 
15412
# With FreeType library directory
 
15413
 
 
15414
 
 
15415
echo $ac_n "checking for location of FreeType library""... $ac_c" 1>&6
 
15416
echo "configure:15417: checking for location of FreeType library" >&5
 
15417
case "$with_freetype_libs" in
 
15418
y | ye | yes | n | no)
 
15419
        { echo "configure: error: *** You must supply a directory to --with-freetype-libs." 1>&2; exit 1; }
 
15420
        ;;
 
15421
esac
 
15422
echo "$ac_t""$with_freetype_libs" 1>&6
 
15423
 
 
15424
if test -n "$with_freetype_libs"; then
 
15425
    for dir in $with_freetype_libs; do
 
15426
        if test -d "$dir"; then
 
15427
            FTLIB="$FTLIB -L$dir"
 
15428
        else
 
15429
            { echo "configure: error: *** FreeType library directory $dir does not exist." 1>&2; exit 1; }
 
15430
        fi
 
15431
    done
 
15432
fi
 
15433
 
 
15434
 
 
15435
 
 
15436
ac_save_ldflags="$LDFLAGS"
 
15437
LDFLAGS="$FTLIB $LDFLAGS"
 
15438
 
 
15439
 
 
15440
echo $ac_n "checking for FT_Init_FreeType in -lfreetype""... $ac_c" 1>&6
 
15441
echo "configure:15442: checking for FT_Init_FreeType in -lfreetype" >&5
 
15442
ac_lib_var=`echo freetype'_'FT_Init_FreeType | sed 'y%./+-%__p_%'`
 
15443
 
 
15444
ac_save_LIBS="$LIBS"
 
15445
LIBS="-lfreetype  $LIBS"
 
15446
cat > conftest.$ac_ext <<EOF
 
15447
#line 15448 "configure"
 
15448
#include "confdefs.h"
 
15449
/* Override any gcc2 internal prototype to avoid an error.  */
 
15450
/* We use char because int might match the return type of a gcc2
 
15451
    builtin and then its argument prototype would still apply.  */
 
15452
char FT_Init_FreeType();
 
15453
 
 
15454
int main() {
 
15455
FT_Init_FreeType()
 
15456
; return 0; }
 
15457
EOF
 
15458
if { (eval echo configure:15459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15459
  rm -rf conftest*
 
15460
  eval "ac_cv_lib_$ac_lib_var=yes"
 
15461
else
 
15462
  echo "configure: failed program was:" >&5
 
15463
  cat conftest.$ac_ext >&5
 
15464
  rm -rf conftest*
 
15465
  eval "ac_cv_lib_$ac_lib_var=no"
 
15466
fi
 
15467
rm -f conftest*
 
15468
LIBS="$ac_save_LIBS"
 
15469
 
 
15470
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
15471
  echo "$ac_t""yes" 1>&6
 
15472
  FTLIB="$FTLIB -lfreetype "
 
15473
else
 
15474
  echo "$ac_t""no" 1>&6
 
15475
 
 
15476
LDFLAGS=${ac_save_ldflags}
 
15477
 
 
15478
    { echo "configure: error: *** Unable to locate FreeType library." 1>&2; exit 1; }
 
15479
 
 
15480
 
 
15481
fi
 
15482
 
 
15483
 
 
15484
 
 
15485
LDFLAGS=${ac_save_ldflags}
 
15486
 
 
15487
 
 
15488
fi # $USE_FREETYPE
 
15489
 
 
15490
 
 
15491
 
 
15492
 
 
15493
# Done checking FreeType
 
15494
 
 
15495
# Enable NLS option
 
15496
 
 
15497
 
 
15498
echo $ac_n "checking whether to use NLS""... $ac_c" 1>&6
 
15499
echo "configure:15500: checking whether to use NLS" >&5
 
15500
echo "$ac_t"""$with_nls"" 1>&6
 
15501
case "$with_nls" in
 
15502
        "no")   USE_NLS=        ;;
 
15503
        "yes")  USE_NLS="1"     ;;
 
15504
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
15505
esac
 
15506
 
 
15507
 
 
15508
 
 
15509
INTLLIB=
 
15510
HAVE_NLS=
 
15511
 
 
15512
if test -n "${USE_NLS}" ; then
 
15513
    cat >> confdefs.h <<\EOF
 
15514
#define USE_NLS 1
 
15515
EOF
 
15516
 
 
15517
 
 
15518
echo $ac_n "checking for gettext""... $ac_c" 1>&6
 
15519
echo "configure:15520: checking for gettext" >&5
 
15520
 
 
15521
cat > conftest.$ac_ext <<EOF
 
15522
#line 15523 "configure"
 
15523
#include "confdefs.h"
 
15524
/* System header to define __stub macros and hopefully few prototypes,
 
15525
    which can conflict with char gettext(); below.  */
 
15526
#include <assert.h>
 
15527
/* Override any gcc2 internal prototype to avoid an error.  */
 
15528
/* We use char because int might match the return type of a gcc2
 
15529
    builtin and then its argument prototype would still apply.  */
 
15530
char gettext();
 
15531
 
 
15532
int main() {
 
15533
 
 
15534
/* The GNU C library defines this for functions which it implements
 
15535
    to always fail with ENOSYS.  Some functions are actually named
 
15536
    something starting with __ and the normal name is an alias.  */
 
15537
#if defined (__stub_gettext) || defined (__stub___gettext)
 
15538
choke me
 
15539
#else
 
15540
gettext();
 
15541
#endif
 
15542
 
 
15543
; return 0; }
 
15544
EOF
 
15545
if { (eval echo configure:15546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15546
  rm -rf conftest*
 
15547
  eval "ac_cv_func_gettext=yes"
 
15548
else
 
15549
  echo "configure: failed program was:" >&5
 
15550
  cat conftest.$ac_ext >&5
 
15551
  rm -rf conftest*
 
15552
  eval "ac_cv_func_gettext=no"
 
15553
fi
 
15554
rm -f conftest*
 
15555
 
 
15556
if eval "test \"`echo '$ac_cv_func_'gettext`\" = yes"; then
 
15557
  echo "$ac_t""yes" 1>&6
 
15558
  INTLLIB=
 
15559
else
 
15560
  echo "$ac_t""no" 1>&6
 
15561
 
 
15562
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
 
15563
echo "configure:15564: checking for gettext in -lintl" >&5
 
15564
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
 
15565
 
 
15566
ac_save_LIBS="$LIBS"
 
15567
LIBS="-lintl  $LIBS"
 
15568
cat > conftest.$ac_ext <<EOF
 
15569
#line 15570 "configure"
 
15570
#include "confdefs.h"
 
15571
/* Override any gcc2 internal prototype to avoid an error.  */
 
15572
/* We use char because int might match the return type of a gcc2
 
15573
    builtin and then its argument prototype would still apply.  */
 
15574
char gettext();
 
15575
 
 
15576
int main() {
 
15577
gettext()
 
15578
; return 0; }
 
15579
EOF
 
15580
if { (eval echo configure:15581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15581
  rm -rf conftest*
 
15582
  eval "ac_cv_lib_$ac_lib_var=yes"
 
15583
else
 
15584
  echo "configure: failed program was:" >&5
 
15585
  cat conftest.$ac_ext >&5
 
15586
  rm -rf conftest*
 
15587
  eval "ac_cv_lib_$ac_lib_var=no"
 
15588
fi
 
15589
rm -f conftest*
 
15590
LIBS="$ac_save_LIBS"
 
15591
 
 
15592
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
 
15593
  echo "$ac_t""yes" 1>&6
 
15594
  INTLLIB=-lintl
 
15595
else
 
15596
  echo "$ac_t""no" 1>&6
 
15597
 
 
15598
    { echo "configure: error: *** Unable to locate gettext() function." 1>&2; exit 1; }
 
15599
 
 
15600
fi
 
15601
 
 
15602
fi
 
15603
 
 
15604
 
 
15605
    HAVE_NLS=1
 
15606
fi
 
15607
 
 
15608
 
 
15609
 
 
15610
 
 
15611
# Enable C++ option
 
15612
 
 
15613
 
 
15614
echo $ac_n "checking whether to use C++""... $ac_c" 1>&6
 
15615
echo "configure:15616: checking whether to use C++" >&5
 
15616
echo "$ac_t"""$with_cxx"" 1>&6
 
15617
case "$with_cxx" in
 
15618
        "no")   USE_CXX=        ;;
 
15619
        "yes")  USE_CXX="1"     ;;
 
15620
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
15621
esac
 
15622
 
 
15623
 
 
15624
 
 
15625
if test -n "$USE_CXX"; then
 
15626
        for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
 
15627
do
 
15628
# Extract the first word of "$ac_prog", so it can be a program name with args.
 
15629
set dummy $ac_prog; ac_word=$2
 
15630
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
15631
echo "configure:15632: checking for $ac_word" >&5
 
15632
 
 
15633
if test -n "$CXX"; then
 
15634
  ac_cv_prog_CXX="$CXX" # Let the user override the test.
 
15635
else
 
15636
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
15637
  ac_dummy="$PATH"
 
15638
  for ac_dir in $ac_dummy; do
 
15639
    test -z "$ac_dir" && ac_dir=.
 
15640
    if test -f $ac_dir/$ac_word; then
 
15641
      ac_cv_prog_CXX="$ac_prog"
 
15642
      break
 
15643
    fi
 
15644
  done
 
15645
  IFS="$ac_save_ifs"
 
15646
fi
 
15647
CXX="$ac_cv_prog_CXX"
 
15648
if test -n "$CXX"; then
 
15649
  echo "$ac_t""$CXX" 1>&6
 
15650
else
 
15651
  echo "$ac_t""no" 1>&6
 
15652
fi
 
15653
 
 
15654
test -n "$CXX" && break
 
15655
done
 
15656
test -n "$CXX" || CXX="gcc"
 
15657
 
 
15658
 
 
15659
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
 
15660
echo "configure:15661: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
 
15661
 
 
15662
ac_ext=C
 
15663
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
15664
ac_cpp='$CXXCPP $CPPFLAGS'
 
15665
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 
15666
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
15667
cross_compiling=$ac_cv_prog_cxx_cross
 
15668
 
 
15669
cat > conftest.$ac_ext << EOF
 
15670
 
 
15671
#line 15672 "configure"
 
15672
#include "confdefs.h"
 
15673
 
 
15674
int main(){return(0);}
 
15675
EOF
 
15676
if { (eval echo configure:15677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 
15677
  ac_cv_prog_cxx_works=yes
 
15678
  # If we can't run a trivial program, we are probably using a cross compiler.
 
15679
  if (./conftest; exit) 2>/dev/null; then
 
15680
    ac_cv_prog_cxx_cross=no
 
15681
  else
 
15682
    ac_cv_prog_cxx_cross=yes
 
15683
  fi
 
15684
else
 
15685
  echo "configure: failed program was:" >&5
 
15686
  cat conftest.$ac_ext >&5
 
15687
  ac_cv_prog_cxx_works=no
 
15688
fi
 
15689
rm -fr conftest*
 
15690
ac_ext=c
 
15691
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
 
15692
ac_cpp='$CPP $CPPFLAGS'
 
15693
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 
15694
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 
15695
cross_compiling=$ac_cv_prog_cc_cross
 
15696
 
 
15697
echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
 
15698
if test $ac_cv_prog_cxx_works = no; then
 
15699
  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
 
15700
fi
 
15701
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
 
15702
echo "configure:15703: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
 
15703
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
 
15704
cross_compiling=$ac_cv_prog_cxx_cross
 
15705
 
 
15706
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
 
15707
echo "configure:15708: checking whether we are using GNU C++" >&5
 
15708
 
 
15709
cat > conftest.C <<EOF
 
15710
#ifdef __GNUC__
 
15711
  yes;
 
15712
#endif
 
15713
EOF
 
15714
if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:15715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
 
15715
  ac_cv_prog_gxx=yes
 
15716
else
 
15717
  ac_cv_prog_gxx=no
 
15718
fi
 
15719
 
 
15720
echo "$ac_t""$ac_cv_prog_gxx" 1>&6
 
15721
 
 
15722
if test $ac_cv_prog_gxx = yes; then
 
15723
  GXX=yes
 
15724
else
 
15725
  GXX=
 
15726
fi
 
15727
 
 
15728
ac_test_CXXFLAGS="${CXXFLAGS+set}"
 
15729
ac_save_CXXFLAGS="$CXXFLAGS"
 
15730
CXXFLAGS=
 
15731
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
 
15732
echo "configure:15733: checking whether ${CXX-g++} accepts -g" >&5
 
15733
 
 
15734
echo 'void f(){}' > conftest.cc
 
15735
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
 
15736
  ac_cv_prog_cxx_g=yes
 
15737
else
 
15738
  ac_cv_prog_cxx_g=no
 
15739
fi
 
15740
rm -f conftest*
 
15741
 
 
15742
 
 
15743
echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
 
15744
if test "$ac_test_CXXFLAGS" = set; then
 
15745
  CXXFLAGS="$ac_save_CXXFLAGS"
 
15746
elif test $ac_cv_prog_cxx_g = yes; then
 
15747
  if test "$GXX" = yes; then
 
15748
    CXXFLAGS="-g -O2"
 
15749
  else
 
15750
    CXXFLAGS="-g"
 
15751
  fi
 
15752
else
 
15753
  if test "$GXX" = yes; then
 
15754
    CXXFLAGS="-O2"
 
15755
  else
 
15756
    CXXFLAGS=
 
15757
  fi
 
15758
fi
 
15759
 
 
15760
else
 
15761
        CXX=
 
15762
        CXXFLAGS=
 
15763
        
 
15764
        
 
15765
fi
 
15766
 
 
15767
# Done checking C++
 
15768
 
 
15769
# Enable openDWG option
 
15770
 
 
15771
 
 
15772
echo $ac_n "checking whether to use openDWG""... $ac_c" 1>&6
 
15773
echo "configure:15774: checking whether to use openDWG" >&5
 
15774
echo "$ac_t"""$with_opendwg"" 1>&6
 
15775
case "$with_opendwg" in
 
15776
        "no")   USE_OPENDWG=    ;;
 
15777
        "yes")  USE_OPENDWG="1" ;;
 
15778
        *)      { echo "configure: error: *** You must answer yes or no." 1>&2; exit 1; }       ;;
 
15779
esac
 
15780
 
 
15781
 
 
15782
 
 
15783
OPENDWGINCPATH=
 
15784
OPENDWGLIBPATH=
 
15785
OPENDWGLIB=
 
15786
 
 
15787
if test -n "${USE_OPENDWG}"; then
 
15788
 
 
15789
# With OPENDWG includes directory
 
15790
 
 
15791
 
 
15792
echo $ac_n "checking for location of openDGW includes""... $ac_c" 1>&6
 
15793
echo "configure:15794: checking for location of openDGW includes" >&5
 
15794
case "$with_opendwg_includes" in
 
15795
y | ye | yes | n | no)
 
15796
        { echo "configure: error: *** You must supply a directory to --with-opendwg-includes." 1>&2; exit 1; }
 
15797
        ;;
 
15798
esac
 
15799
echo "$ac_t""$with_opendwg_includes" 1>&6
 
15800
 
 
15801
if test -n "$with_opendwg_includes" ; then
 
15802
    for dir in $with_opendwg_includes; do
 
15803
        if test -d "$dir"; then
 
15804
            OPENDWGINCPATH="$OPENDWGINCPATH -I$dir"
 
15805
        else
 
15806
            { echo "configure: error: *** openDGW includes directory $dir does not exist." 1>&2; exit 1; }
 
15807
        fi
 
15808
    done
 
15809
fi
 
15810
 
 
15811
 
 
15812
 
 
15813
ac_save_cppflags="$CPPFLAGS"
 
15814
CPPFLAGS="$OPENDWGINCPATH $CPPFLAGS"
 
15815
for ac_hdr in ad2.h
 
15816
do
 
15817
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
15818
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
15819
echo "configure:15820: checking for $ac_hdr" >&5
 
15820
 
 
15821
cat > conftest.$ac_ext <<EOF
 
15822
#line 15823 "configure"
 
15823
#include "confdefs.h"
 
15824
#include <$ac_hdr>
 
15825
EOF
 
15826
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
15827
{ (eval echo configure:15828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
15828
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
15829
if test -z "$ac_err"; then
 
15830
  rm -rf conftest*
 
15831
  eval "ac_cv_header_$ac_safe=yes"
 
15832
else
 
15833
  echo "$ac_err" >&5
 
15834
  echo "configure: failed program was:" >&5
 
15835
  cat conftest.$ac_ext >&5
 
15836
  rm -rf conftest*
 
15837
  eval "ac_cv_header_$ac_safe=no"
 
15838
fi
 
15839
rm -f conftest*
 
15840
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
15841
  echo "$ac_t""yes" 1>&6
 
15842
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
15843
  cat >> confdefs.h <<EOF
 
15844
#define $ac_tr_hdr 1
 
15845
EOF
 
15846
 
 
15847
else
 
15848
  echo "$ac_t""no" 1>&6
 
15849
{ echo "configure: error: *** Unable to locate openDWG includes." 1>&2; exit 1; }
 
15850
 
 
15851
fi
 
15852
done
 
15853
 
 
15854
CPPFLAGS=$ac_save_cppflags
 
15855
 
 
15856
 
 
15857
# With OPENDWG library directory
 
15858
 
 
15859
 
 
15860
echo $ac_n "checking for location of openDWG library""... $ac_c" 1>&6
 
15861
echo "configure:15862: checking for location of openDWG library" >&5
 
15862
case "$with_opendwg_libs" in
 
15863
y | ye | yes | n | no)
 
15864
        { echo "configure: error: *** You must supply a directory to --with-opendwg-libs." 1>&2; exit 1; }
 
15865
        ;;
 
15866
esac
 
15867
echo "$ac_t""$with_opendwg_libs" 1>&6
 
15868
 
 
15869
if test -n "$with_opendwg_libs"; then
 
15870
    for dir in $with_opendwg_libs; do
 
15871
        if test -d "$dir"; then
 
15872
            OPENDWGLIBPATH="$OPENDWGLIBPATH -L$dir"
 
15873
        else
 
15874
            { echo "configure: error: *** openDWG library directory $dir does not exist." 1>&2; exit 1; }
 
15875
        fi
 
15876
    done
 
15877
fi
 
15878
 
 
15879
 
 
15880
#search for ad2.a, ad3.a ... in openDWG toolkit directory:
 
15881
#FIX ME  how to program this test??
 
15882
#LOC_CHECK_LIBS(ad?.a,adSeekLayer,openDWG,$OPENDWGLIBPATH,OPENDWGLIB,,)
 
15883
#
 
15884
#for now hack (but working):
 
15885
TRUEOPENDWGLIBPATH=`echo "$OPENDWGLIBPATH" | cut -b3-`
 
15886
adlib=`ls -1 "$TRUEOPENDWGLIBPATH"/ad?.a | tail -1`
 
15887
OPENDWGLIB="$adlib"
 
15888
 
 
15889
fi # $USE_OPENDWG
 
15890
 
 
15891
 
 
15892
 
 
15893
 
 
15894
 
 
15895
 
 
15896
# Done checking OPENDWG
 
15897
 
 
15898
# Enable LFS (from cdr-tools)
 
15899
# Check whether --enable-largefile or --disable-largefile was given.
 
15900
if test "${enable_largefile+set}" = set; then
 
15901
  enableval="$enable_largefile"
 
15902
  :
 
15903
fi
 
15904
 
 
15905
   if test "$enable_largefile" = yes; then
 
15906
 
 
15907
     echo $ac_n "checking for special C compiler options needed for large files""... $ac_c" 1>&6
 
15908
echo "configure:15909: checking for special C compiler options needed for large files" >&5
 
15909
 
 
15910
ac_cv_sys_largefile_CC=no
 
15911
        largefile_cc_opt=""
 
15912
        if test "$GCC" != yes; then
 
15913
          # IRIX 6.2 and later do not support large files by default,
 
15914
          # so use the C compiler's -n32 option if that helps.
 
15915
          cat > conftest.$ac_ext <<EOF
 
15916
#line 15917 "configure"
 
15917
#include "confdefs.h"
 
15918
#include <sys/types.h>
 
15919
    /* Check that off_t can represent 2**63 - 1 correctly.
 
15920
       We can't simply "#define LARGE_OFF_T 9223372036854775807",
 
15921
       since some C++ compilers masquerading as C compilers
 
15922
       incorrectly reject 9223372036854775807.  */
 
15923
#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
 
15924
    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 
15925
                        && LARGE_OFF_T % 2147483647 == 1)
 
15926
                       ? 1 : -1];
 
15927
  
 
15928
int main() {
 
15929
 
 
15930
; return 0; }
 
15931
EOF
 
15932
if { (eval echo configure:15933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
15933
  :
 
15934
else
 
15935
  echo "configure: failed program was:" >&5
 
15936
  cat conftest.$ac_ext >&5
 
15937
  rm -rf conftest*
 
15938
  ac_save_CC="${CC-cc}"
 
15939
             CC="$CC -n32"
 
15940
             cat > conftest.$ac_ext <<EOF
 
15941
#line 15942 "configure"
 
15942
#include "confdefs.h"
 
15943
#include <sys/types.h>
 
15944
    /* Check that off_t can represent 2**63 - 1 correctly.
 
15945
       We can't simply "#define LARGE_OFF_T 9223372036854775807",
 
15946
       since some C++ compilers masquerading as C compilers
 
15947
       incorrectly reject 9223372036854775807.  */
 
15948
#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
 
15949
    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 
15950
                        && LARGE_OFF_T % 2147483647 == 1)
 
15951
                       ? 1 : -1];
 
15952
  
 
15953
int main() {
 
15954
 
 
15955
; return 0; }
 
15956
EOF
 
15957
if { (eval echo configure:15958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
15958
  rm -rf conftest*
 
15959
  ac_cv_sys_largefile_CC=' -n32'
 
15960
else
 
15961
  echo "configure: failed program was:" >&5
 
15962
  cat conftest.$ac_ext >&5
 
15963
fi
 
15964
rm -f conftest*
 
15965
             CC="$ac_save_CC"
 
15966
fi
 
15967
rm -f conftest*
 
15968
        fi
 
15969
 
 
15970
echo "$ac_t""$ac_cv_sys_largefile_CC" 1>&6
 
15971
     if test "$ac_cv_sys_largefile_CC" != no; then
 
15972
       CC="$CC$ac_cv_sys_largefile_CC"
 
15973
       largefile_cc_opt="$ac_cv_sys_largefile_CC"
 
15974
     fi
 
15975
 
 
15976
     echo $ac_n "checking for _FILE_OFFSET_BITS value needed for large files""... $ac_c" 1>&6
 
15977
echo "configure:15978: checking for _FILE_OFFSET_BITS value needed for large files" >&5
 
15978
 
 
15979
ac_cv_sys_file_offset_bits=no
 
15980
      cat > conftest.$ac_ext <<EOF
 
15981
#line 15982 "configure"
 
15982
#include "confdefs.h"
 
15983
#include <sys/types.h>
 
15984
    /* Check that off_t can represent 2**63 - 1 correctly.
 
15985
       We can't simply "#define LARGE_OFF_T 9223372036854775807",
 
15986
       since some C++ compilers masquerading as C compilers
 
15987
       incorrectly reject 9223372036854775807.  */
 
15988
#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
 
15989
    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 
15990
                        && LARGE_OFF_T % 2147483647 == 1)
 
15991
                       ? 1 : -1];
 
15992
  
 
15993
int main() {
 
15994
 
 
15995
; return 0; }
 
15996
EOF
 
15997
if { (eval echo configure:15998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
15998
  :
 
15999
else
 
16000
  echo "configure: failed program was:" >&5
 
16001
  cat conftest.$ac_ext >&5
 
16002
  rm -rf conftest*
 
16003
  cat > conftest.$ac_ext <<EOF
 
16004
#line 16005 "configure"
 
16005
#include "confdefs.h"
 
16006
#define _FILE_OFFSET_BITS 64
 
16007
#include <sys/types.h>
 
16008
    /* Check that off_t can represent 2**63 - 1 correctly.
 
16009
       We can't simply "#define LARGE_OFF_T 9223372036854775807",
 
16010
       since some C++ compilers masquerading as C compilers
 
16011
       incorrectly reject 9223372036854775807.  */
 
16012
#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
 
16013
    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 
16014
                        && LARGE_OFF_T % 2147483647 == 1)
 
16015
                       ? 1 : -1];
 
16016
  
 
16017
           
 
16018
int main() {
 
16019
 
 
16020
; return 0; }
 
16021
EOF
 
16022
if { (eval echo configure:16023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
16023
  rm -rf conftest*
 
16024
  ac_cv_sys_file_offset_bits=64
 
16025
else
 
16026
  echo "configure: failed program was:" >&5
 
16027
  cat conftest.$ac_ext >&5
 
16028
fi
 
16029
rm -f conftest*
 
16030
fi
 
16031
rm -f conftest*
 
16032
 
 
16033
echo "$ac_t""$ac_cv_sys_file_offset_bits" 1>&6
 
16034
   if test "$ac_cv_sys_file_offset_bits" != no; then
 
16035
     cat >> confdefs.h <<EOF
 
16036
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
 
16037
EOF
 
16038
 
 
16039
   fi
 
16040
     echo $ac_n "checking for _LARGE_FILES value needed for large files""... $ac_c" 1>&6
 
16041
echo "configure:16042: checking for _LARGE_FILES value needed for large files" >&5
 
16042
 
 
16043
ac_cv_sys_large_files=no
 
16044
      cat > conftest.$ac_ext <<EOF
 
16045
#line 16046 "configure"
 
16046
#include "confdefs.h"
 
16047
#include <sys/types.h>
 
16048
    /* Check that off_t can represent 2**63 - 1 correctly.
 
16049
       We can't simply "#define LARGE_OFF_T 9223372036854775807",
 
16050
       since some C++ compilers masquerading as C compilers
 
16051
       incorrectly reject 9223372036854775807.  */
 
16052
#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
 
16053
    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 
16054
                        && LARGE_OFF_T % 2147483647 == 1)
 
16055
                       ? 1 : -1];
 
16056
  
 
16057
int main() {
 
16058
 
 
16059
; return 0; }
 
16060
EOF
 
16061
if { (eval echo configure:16062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
16062
  :
 
16063
else
 
16064
  echo "configure: failed program was:" >&5
 
16065
  cat conftest.$ac_ext >&5
 
16066
  rm -rf conftest*
 
16067
  cat > conftest.$ac_ext <<EOF
 
16068
#line 16069 "configure"
 
16069
#include "confdefs.h"
 
16070
#define _LARGE_FILES 1
 
16071
#include <sys/types.h>
 
16072
    /* Check that off_t can represent 2**63 - 1 correctly.
 
16073
       We can't simply "#define LARGE_OFF_T 9223372036854775807",
 
16074
       since some C++ compilers masquerading as C compilers
 
16075
       incorrectly reject 9223372036854775807.  */
 
16076
#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
 
16077
    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 
16078
                        && LARGE_OFF_T % 2147483647 == 1)
 
16079
                       ? 1 : -1];
 
16080
  
 
16081
           
 
16082
int main() {
 
16083
 
 
16084
; return 0; }
 
16085
EOF
 
16086
if { (eval echo configure:16087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
16087
  rm -rf conftest*
 
16088
  ac_cv_sys_large_files=1
 
16089
else
 
16090
  echo "configure: failed program was:" >&5
 
16091
  cat conftest.$ac_ext >&5
 
16092
fi
 
16093
rm -f conftest*
 
16094
fi
 
16095
rm -f conftest*
 
16096
 
 
16097
echo "$ac_t""$ac_cv_sys_large_files" 1>&6
 
16098
   if test "$ac_cv_sys_large_files" != no; then
 
16099
     cat >> confdefs.h <<EOF
 
16100
#define _LARGE_FILES $ac_cv_sys_large_files
 
16101
EOF
 
16102
 
 
16103
   fi
 
16104
     echo $ac_n "checking for _LARGEFILE_SOURCE value needed for large files""... $ac_c" 1>&6
 
16105
echo "configure:16106: checking for _LARGEFILE_SOURCE value needed for large files" >&5
 
16106
 
 
16107
ac_cv_sys_largefile_source=no
 
16108
      cat > conftest.$ac_ext <<EOF
 
16109
#line 16110 "configure"
 
16110
#include "confdefs.h"
 
16111
#include <stdio.h>
 
16112
int main() {
 
16113
return !fseeko;
 
16114
; return 0; }
 
16115
EOF
 
16116
if { (eval echo configure:16117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
16117
  :
 
16118
else
 
16119
  echo "configure: failed program was:" >&5
 
16120
  cat conftest.$ac_ext >&5
 
16121
  rm -rf conftest*
 
16122
  cat > conftest.$ac_ext <<EOF
 
16123
#line 16124 "configure"
 
16124
#include "confdefs.h"
 
16125
#define _LARGEFILE_SOURCE 1
 
16126
#include <stdio.h>
 
16127
           
 
16128
int main() {
 
16129
return !fseeko;
 
16130
; return 0; }
 
16131
EOF
 
16132
if { (eval echo configure:16133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
16133
  rm -rf conftest*
 
16134
  ac_cv_sys_largefile_source=1
 
16135
else
 
16136
  echo "configure: failed program was:" >&5
 
16137
  cat conftest.$ac_ext >&5
 
16138
fi
 
16139
rm -f conftest*
 
16140
fi
 
16141
rm -f conftest*
 
16142
 
 
16143
echo "$ac_t""$ac_cv_sys_largefile_source" 1>&6
 
16144
   if test "$ac_cv_sys_largefile_source" != no; then
 
16145
     cat >> confdefs.h <<EOF
 
16146
#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
 
16147
EOF
 
16148
 
 
16149
   fi
 
16150
   fi
 
16151
  
 
16152
echo $ac_n "checking if system supports Large Files at all""... $ac_c" 1>&6
 
16153
echo "configure:16154: checking if system supports Large Files at all" >&5
 
16154
 
 
16155
cat > conftest.$ac_ext <<EOF
 
16156
#line 16157 "configure"
 
16157
#include "confdefs.h"
 
16158
#include <stdio.h>
 
16159
#include <sys/types.h>
 
16160
int main() {
 
16161
 
 
16162
/*
 
16163
 * Check that off_t can represent 2**63 - 1 correctly.
 
16164
 * We can't simply "#define LARGE_OFF_T 9223372036854775807",
 
16165
 * since some C++ compilers masquerading as C compilers
 
16166
 * incorrectly reject 9223372036854775807.
 
16167
 *
 
16168
 * For MinGW, off64_t should be used and __MSVCRT_VERSION__ >= 0x0601
 
16169
 * (msvcrt.dll version 6.10 or higher) is needed for _fstat64 and _stat64.
 
16170
 */
 
16171
#ifdef __MINGW32__
 
16172
#   define LARGE_OFF_T (((off64_t) 1 << 62) - 1 + ((off64_t) 1 << 62))
 
16173
#else
 
16174
#   define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
 
16175
#endif
 
16176
    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 
16177
                        && LARGE_OFF_T % 2147483647 == 1)
 
16178
                       ? 1 : -1];
 
16179
#ifdef __MINGW32__
 
16180
return !fseeko64;
 
16181
return !ftello64;
 
16182
#else
 
16183
return !fseeko;
 
16184
return !ftello;
 
16185
#endif
 
16186
; return 0; }
 
16187
EOF
 
16188
if { (eval echo configure:16189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 
16189
  rm -rf conftest*
 
16190
  ac_cv_largefiles=yes
 
16191
else
 
16192
  echo "configure: failed program was:" >&5
 
16193
  cat conftest.$ac_ext >&5
 
16194
  rm -rf conftest*
 
16195
  ac_cv_largefiles=no
 
16196
fi
 
16197
rm -f conftest*
 
16198
 
 
16199
echo "$ac_t""$ac_cv_largefiles" 1>&6
 
16200
        if test $ac_cv_largefiles = yes; then
 
16201
                cat >> confdefs.h <<\EOF
 
16202
#define HAVE_LARGEFILES 1
 
16203
EOF
 
16204
 
 
16205
        fi
 
16206
 
 
16207
USE_LARGEFILES=
 
16208
if test $ac_cv_largefiles = yes; then
 
16209
        USE_LARGEFILES=1
 
16210
fi
 
16211
 
 
16212
# Done large file support
 
16213
 
 
16214
# Python check
 
16215
 
 
16216
echo $ac_n "checking whether to use Python""... $ac_c" 1>&6
 
16217
echo "configure:16218: checking whether to use Python" >&5
 
16218
 
 
16219
PYTHONINC=
 
16220
PYTHONCFLAGS=
 
16221
PYTHONLDFLAGS=
 
16222
USE_PYTHON=
 
16223
MACOSX_ARCHS_PYTHON=
 
16224
 
 
16225
if test "$with_python" = "no" ; then
 
16226
  echo "$ac_t""no" 1>&6
 
16227
else
 
16228
  echo "$ac_t""yes" 1>&6
 
16229
  USE_PYTHON="1"
 
16230
  if test "$with_python" != "yes" ; then
 
16231
    PY_CONFIG="$with_python"
 
16232
  fi
 
16233
 
 
16234
  # Extract the first word of "python-config", so it can be a program name with args.
 
16235
set dummy python-config; ac_word=$2
 
16236
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
16237
echo "configure:16238: checking for $ac_word" >&5
 
16238
 
 
16239
case "$PY_CONFIG" in
 
16240
  /*)
 
16241
  ac_cv_path_PY_CONFIG="$PY_CONFIG" # Let the user override the test with a path.
 
16242
  ;;
 
16243
  ?:/*)                  
 
16244
  ac_cv_path_PY_CONFIG="$PY_CONFIG" # Let the user override the test with a dos path.
 
16245
  ;;
 
16246
  *)
 
16247
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
16248
  ac_dummy="$PATH"
 
16249
  for ac_dir in $ac_dummy; do 
 
16250
    test -z "$ac_dir" && ac_dir=.
 
16251
    if test -f $ac_dir/$ac_word; then
 
16252
      ac_cv_path_PY_CONFIG="$ac_dir/$ac_word"
 
16253
      break
 
16254
    fi
 
16255
  done
 
16256
  IFS="$ac_save_ifs"
 
16257
  test -z "$ac_cv_path_PY_CONFIG" && ac_cv_path_PY_CONFIG="no"
 
16258
  ;;
 
16259
esac
 
16260
PY_CONFIG="$ac_cv_path_PY_CONFIG"
 
16261
if test -n "$PY_CONFIG"; then
 
16262
  echo "$ac_t""$PY_CONFIG" 1>&6
 
16263
else
 
16264
  echo "$ac_t""no" 1>&6
 
16265
fi
 
16266
 
 
16267
 
 
16268
  if test "$PY_CONFIG" != "no" ; then
 
16269
    # With Python includes directory 
 
16270
 
 
16271
    PYTHONINC=`"$PY_CONFIG" --includes`
 
16272
    
 
16273
ac_save_cppflags="$CPPFLAGS"
 
16274
CPPFLAGS="$PYTHONINC $CPPFLAGS"
 
16275
for ac_hdr in Python.h
 
16276
do
 
16277
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
16278
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
16279
echo "configure:16280: checking for $ac_hdr" >&5
 
16280
 
 
16281
cat > conftest.$ac_ext <<EOF
 
16282
#line 16283 "configure"
 
16283
#include "confdefs.h"
 
16284
#include <$ac_hdr>
 
16285
EOF
 
16286
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
16287
{ (eval echo configure:16288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
16288
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
16289
if test -z "$ac_err"; then
 
16290
  rm -rf conftest*
 
16291
  eval "ac_cv_header_$ac_safe=yes"
 
16292
else
 
16293
  echo "$ac_err" >&5
 
16294
  echo "configure: failed program was:" >&5
 
16295
  cat conftest.$ac_ext >&5
 
16296
  rm -rf conftest*
 
16297
  eval "ac_cv_header_$ac_safe=no"
 
16298
fi
 
16299
rm -f conftest*
 
16300
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
16301
  echo "$ac_t""yes" 1>&6
 
16302
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
16303
  cat >> confdefs.h <<EOF
 
16304
#define $ac_tr_hdr 1
 
16305
EOF
 
16306
 
 
16307
else
 
16308
  echo "$ac_t""no" 1>&6
 
16309
{ echo "configure: error: *** Unable to locate Python includes." 1>&2; exit 1; }
 
16310
 
 
16311
fi
 
16312
done
 
16313
 
 
16314
CPPFLAGS=$ac_save_cppflags
 
16315
 
 
16316
 
 
16317
    PYTHONCFLAGS=`"$PY_CONFIG" --cflags`
 
16318
 
 
16319
    # With Python library directory
 
16320
 
 
16321
    PYTHONLDFLAGS=`"$PY_CONFIG" --ldflags`
 
16322
 
 
16323
    # shouldn't have arch flags in C/LD flags on OSX
 
16324
    for a in i386 ppc x86_64 ppc64
 
16325
    do
 
16326
      PYTHONCFLAGS=`echo "$PYTHONCFLAGS" | sed "s/-arch  *$a//g"`
 
16327
      PYTHONLDFLAGS=`echo "$PYTHONLDFLAGS" | sed "s/-arch  *$a//g"`
 
16328
    done
 
16329
  fi
 
16330
 
 
16331
  # check for available OSX archs in Python, assume framework
 
16332
  if test -n "$MACOSX_ARCHS" ; then
 
16333
    pylib=`"$PY_CONFIG" --prefix`/Python
 
16334
    pylibinfo=`file "$pylib"`
 
16335
    for a in i386 ppc x86_64 ppc64
 
16336
    do
 
16337
      # add only if in MACOSX_ARCHS
 
16338
      if test -n "`echo \"$pylibinfo\" | grep \"library $a\"`" ; then
 
16339
        if test -n "`echo "$MACOSX_ARCHS" | grep $a`" ; then
 
16340
          MACOSX_ARCHS_PYTHON="$MACOSX_ARCHS_PYTHON -arch $a"
 
16341
        fi
 
16342
      fi
 
16343
    done
 
16344
  fi
 
16345
 
 
16346
fi # Done checking Python
 
16347
 
 
16348
 
 
16349
 
 
16350
 
 
16351
 
 
16352
 
 
16353
 
 
16354
# Enable wxWidgets support (for wxGUI)
 
16355
 
 
16356
echo $ac_n "checking whether to use wxWidgets""... $ac_c" 1>&6
 
16357
echo "configure:16358: checking whether to use wxWidgets" >&5
 
16358
 
 
16359
WXVERSION=
 
16360
WXWIDGETSCXXFLAGS= 
 
16361
WXWIDGETSCPPFLAGS=  
 
16362
WXWIDGETSLIB=  
 
16363
USE_WXWIDGETS=
 
16364
MACOSX_ARCHS_WXPYTHON=
 
16365
 
 
16366
if test "$with_wxwidgets" = "no" ; then
 
16367
  echo "$ac_t""no" 1>&6
 
16368
else
 
16369
  echo "$ac_t""yes" 1>&6
 
16370
  USE_WXWIDGETS="1"
 
16371
  if test "$with_wxwidgets" != "yes" ; then
 
16372
    WX_CONFIG="$with_wxwidgets"
 
16373
  fi
 
16374
 
 
16375
  # Extract the first word of "wx-config", so it can be a program name with args.
 
16376
set dummy wx-config; ac_word=$2
 
16377
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
 
16378
echo "configure:16379: checking for $ac_word" >&5
 
16379
 
 
16380
case "$WX_CONFIG" in
 
16381
  /*)
 
16382
  ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a path.
 
16383
  ;;
 
16384
  ?:/*)                  
 
16385
  ac_cv_path_WX_CONFIG="$WX_CONFIG" # Let the user override the test with a dos path.
 
16386
  ;;
 
16387
  *)
 
16388
  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 
16389
  ac_dummy="$PATH"
 
16390
  for ac_dir in $ac_dummy; do 
 
16391
    test -z "$ac_dir" && ac_dir=.
 
16392
    if test -f $ac_dir/$ac_word; then
 
16393
      ac_cv_path_WX_CONFIG="$ac_dir/$ac_word"
 
16394
      break
 
16395
    fi
 
16396
  done
 
16397
  IFS="$ac_save_ifs"
 
16398
  test -z "$ac_cv_path_WX_CONFIG" && ac_cv_path_WX_CONFIG="no"
 
16399
  ;;
 
16400
esac
 
16401
WX_CONFIG="$ac_cv_path_WX_CONFIG"
 
16402
if test -n "$WX_CONFIG"; then
 
16403
  echo "$ac_t""$WX_CONFIG" 1>&6
 
16404
else
 
16405
  echo "$ac_t""no" 1>&6
 
16406
fi
 
16407
 
 
16408
 
 
16409
  if test "$WX_CONFIG" = "no" ; then
 
16410
    { echo "configure: error: *** couldn't find wx-config
 
16411
 
 
16412
                  wxWidgets must be installed on your system.
 
16413
  
 
16414
                  Please check that wx-config is in path, the directory
 
16415
                  where wxWidgets libraries are installed (returned by
 
16416
                  'wx-config --libs' or 'wx-config --static --libs' command)
 
16417
                  is in LD_LIBRARY_PATH or equivalent variable and
 
16418
                  wxWidgets version is 2.8.1 or above." 1>&2; exit 1; }
 
16419
 fi
 
16420
 
 
16421
 # Check wxWidgets version
 
16422
 
 
16423
 REQWX="2.8.1"
 
16424
 
 
16425
 echo $ac_n "checking wxWidgets version""... $ac_c" 1>&6
 
16426
echo "configure:16427: checking wxWidgets version" >&5
 
16427
 if WXVERSION=`"$WX_CONFIG" --version`; then
 
16428
   echo "$ac_t""$WXVERSION" 1>&6
 
16429
 else
 
16430
   echo "$ac_t""not found" 1>&6
 
16431
   { echo "configure: error: wxWidgets is required." 1>&2; exit 1; }
 
16432
 fi
 
16433
 if test `expr "$WXVERSION" \< "$REQWX"` = 1 ; then
 
16434
   { echo "configure: error: *** wxWidgets "$REQWX" or later is required." 1>&2; exit 1; }
 
16435
 fi
 
16436
 
 
16437
 # With wxWidgets includes directory 
 
16438
 
 
16439
 WXWIDGETSCXXFLAGS=`"$WX_CONFIG" --cxxflags`
 
16440
 WXWIDGETSCPPFLAGS=`"$WX_CONFIG" --cppflags`
 
16441
 
 
16442
 
 
16443
ac_save_cppflags="$CPPFLAGS"
 
16444
CPPFLAGS="$WXWIDGETSCPPFLAGS $CPPFLAGS"
 
16445
for ac_hdr in wx/wxprec.h
 
16446
do
 
16447
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 
16448
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 
16449
echo "configure:16450: checking for $ac_hdr" >&5
 
16450
 
 
16451
cat > conftest.$ac_ext <<EOF
 
16452
#line 16453 "configure"
 
16453
#include "confdefs.h"
 
16454
#include <$ac_hdr>
 
16455
EOF
 
16456
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 
16457
{ (eval echo configure:16458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 
16458
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 
16459
if test -z "$ac_err"; then
 
16460
  rm -rf conftest*
 
16461
  eval "ac_cv_header_$ac_safe=yes"
 
16462
else
 
16463
  echo "$ac_err" >&5
 
16464
  echo "configure: failed program was:" >&5
 
16465
  cat conftest.$ac_ext >&5
 
16466
  rm -rf conftest*
 
16467
  eval "ac_cv_header_$ac_safe=no"
 
16468
fi
 
16469
rm -f conftest*
 
16470
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
 
16471
  echo "$ac_t""yes" 1>&6
 
16472
    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
 
16473
  cat >> confdefs.h <<EOF
 
16474
#define $ac_tr_hdr 1
 
16475
EOF
 
16476
 
 
16477
else
 
16478
  echo "$ac_t""no" 1>&6
 
16479
{ echo "configure: error: *** Unable to locate wxWidgets includes." 1>&2; exit 1; }
 
16480
 
 
16481
fi
 
16482
done
 
16483
 
 
16484
CPPFLAGS=$ac_save_cppflags
 
16485
 
 
16486
 
 
16487
 # With wxWidgets library directory 
 
16488
 
 
16489
 WXWIDGETSLIB=`"$WX_CONFIG" --libs`
 
16490
 
 
16491
 # shouldn't have arch flags in C/LD flags on OSX
 
16492
 for a in i386 ppc x86_64 ppc64
 
16493
 do
 
16494
   WXWIDGETSCXXFLAGS=`echo "$WXWIDGETSCXXFLAGS" | sed "s/-arch  *$a//g"`
 
16495
   WXWIDGETSCPPFLAGS=`echo "$WXWIDGETSCPPFLAGS" | sed "s/-arch  *$a//g"`
 
16496
   WXWIDGETSLIB=`echo "$WXWIDGETSLIB" | sed "s/-arch  *$a//g"`
 
16497
 done
 
16498
 
 
16499
  # check for available OSX archs in wxPython
 
16500
  if test -n "$MACOSX_ARCHS" ; then
 
16501
    wxver=`"$WX_CONFIG" --version`
 
16502
    wxlib=`"$WX_CONFIG" --prefix`/lib/lib`"$WX_CONFIG" --basename`-`echo "$wxver" | cut -d . -f1,2`.dylib
 
16503
    wxlibinfo=`file -L "$wxlib"`
 
16504
    for a in i386 ppc x86_64 ppc64
 
16505
    do
 
16506
      # add only if in MACOSX_ARCHS
 
16507
      if test -n "`echo \"$wxlibinfo\" | grep \"library $a\"`" ; then
 
16508
        if test -n "`echo \"$MACOSX_ARCHS\" | grep $a`" ; then
 
16509
          MACOSX_ARCHS_WXPYTHON="$MACOSX_ARCHS_WXPYTHON -arch $a"
 
16510
        fi
 
16511
      fi
 
16512
    done
 
16513
  fi
 
16514
fi # $USE_WXWIDGETS
 
16515
 
 
16516
 
 
16517
 
 
16518
 
 
16519
 
 
16520
 
 
16521
 
 
16522
 
 
16523
# Done checking wxWidgets
 
16524
 
 
16525
USE_TERMIO=
 
16526
 
 
16527
 
 
16528
STRIPFLAG=
 
16529
 
 
16530
 
 
16531
GRASS_HOME="${DSTDIR}"
 
16532
 
 
16533
 
 
16534
trap '' 1 2 15
 
16535
 
 
16536
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
 
16537
 
 
16538
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
16539
# Let make expand exec_prefix.
 
16540
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
16541
 
 
16542
# Any assignment to VPATH causes Sun make to only execute
 
16543
# the first set of double-colon rules, so remove it if not needed.
 
16544
# If there is a colon in the path, we need to keep it.
 
16545
if test "x$srcdir" = x.; then
 
16546
  ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
 
16547
fi
 
16548
 
 
16549
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
 
16550
 
 
16551
DEFS=-DHAVE_CONFIG_H
 
16552
 
 
16553
# Without the "./", some shells look in PATH for config.status.
 
16554
: ${CONFIG_STATUS=./config.status}
 
16555
 
 
16556
echo creating $CONFIG_STATUS
 
16557
rm -f $CONFIG_STATUS
 
16558
cat > $CONFIG_STATUS <<EOF
 
16559
#! /bin/sh
 
16560
# Generated automatically by configure.
 
16561
# Run this file to recreate the current configuration.
 
16562
# This directory was configured as follows,
 
16563
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
16564
#
 
16565
# $0 $ac_configure_args
 
16566
#
 
16567
# Compiler output produced by configure, useful for debugging
 
16568
# configure, is in ./config.log if it exists.
 
16569
 
 
16570
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
 
16571
for ac_option
 
16572
do
 
16573
  case "\$ac_option" in
 
16574
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
 
16575
    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
 
16576
    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
 
16577
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
 
16578
    echo "$CONFIG_STATUS generated by autoconf version 2.13"
 
16579
    exit 0 ;;
 
16580
  -help | --help | --hel | --he | --h)
 
16581
    echo "\$ac_cs_usage"; exit 0 ;;
 
16582
  *) echo "\$ac_cs_usage"; exit 1 ;;
 
16583
  esac
 
16584
done
 
16585
 
 
16586
ac_given_srcdir=$srcdir
 
16587
ac_given_INSTALL="$INSTALL"
 
16588
 
 
16589
trap 'rm -fr `echo "include/Make/Grass.make include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h include/winname.h grass.pc include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 
16590
EOF
 
16591
cat >> $CONFIG_STATUS <<EOF
 
16592
 
 
16593
# Protect against being on the right side of a sed subst in config.status.
 
16594
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
 
16595
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
 
16596
$ac_vpsub
 
16597
$extrasub
 
16598
s%@SHELL@%$SHELL%g
 
16599
s%@CFLAGS@%$CFLAGS%g
 
16600
s%@CPPFLAGS@%$CPPFLAGS%g
 
16601
s%@CXXFLAGS@%$CXXFLAGS%g
 
16602
s%@FFLAGS@%$FFLAGS%g
 
16603
s%@DEFS@%$DEFS%g
 
16604
s%@LDFLAGS@%$LDFLAGS%g
 
16605
s%@LIBS@%$LIBS%g
 
16606
s%@exec_prefix@%$exec_prefix%g
 
16607
s%@prefix@%$prefix%g
 
16608
s%@program_transform_name@%$program_transform_name%g
 
16609
s%@bindir@%$bindir%g
 
16610
s%@sbindir@%$sbindir%g
 
16611
s%@libexecdir@%$libexecdir%g
 
16612
s%@datadir@%$datadir%g
 
16613
s%@sysconfdir@%$sysconfdir%g
 
16614
s%@sharedstatedir@%$sharedstatedir%g
 
16615
s%@localstatedir@%$localstatedir%g
 
16616
s%@libdir@%$libdir%g
 
16617
s%@includedir@%$includedir%g
 
16618
s%@oldincludedir@%$oldincludedir%g
 
16619
s%@infodir@%$infodir%g
 
16620
s%@mandir@%$mandir%g
 
16621
s%@host@%$host%g
 
16622
s%@host_alias@%$host_alias%g
 
16623
s%@host_cpu@%$host_cpu%g
 
16624
s%@host_vendor@%$host_vendor%g
 
16625
s%@host_os@%$host_os%g
 
16626
s%@CC@%$CC%g
 
16627
s%@EXEEXT@%$EXEEXT%g
 
16628
s%@MINGW32@%$MINGW32%g
 
16629
s%@BINDIR@%$BINDIR%g
 
16630
s%@pwd@%$pwd%g
 
16631
s%@SRCDIR@%$SRCDIR%g
 
16632
s%@DSTDIR@%$DSTDIR%g
 
16633
s%@ARCH@%$ARCH%g
 
16634
s%@GISBASE@%$GISBASE%g
 
16635
s%@GRASS_BIN@%$GRASS_BIN%g
 
16636
s%@GRASS_VERSION_FILE@%$GRASS_VERSION_FILE%g
 
16637
s%@GRASS_VERSION_MAJOR@%$GRASS_VERSION_MAJOR%g
 
16638
s%@GRASS_VERSION_MINOR@%$GRASS_VERSION_MINOR%g
 
16639
s%@GRASS_VERSION_RELEASE@%$GRASS_VERSION_RELEASE%g
 
16640
s%@GRASS_VERSION_NUMBER@%$GRASS_VERSION_NUMBER%g
 
16641
s%@GRASS_VERSION_DATE@%$GRASS_VERSION_DATE%g
 
16642
s%@NAME_VER@%$NAME_VER%g
 
16643
s%@LIB_VER@%$LIB_VER%g
 
16644
s%@MACOSX_APP@%$MACOSX_APP%g
 
16645
s%@MACOSX_ARCHS@%$MACOSX_ARCHS%g
 
16646
s%@MACOSX_SDK@%$MACOSX_SDK%g
 
16647
s%@INSTDIR@%$INSTDIR%g
 
16648
s%@GRASS_LIB_PREFIX@%$GRASS_LIB_PREFIX%g
 
16649
s%@GRASS_LIB_SUFFIX@%$GRASS_LIB_SUFFIX%g
 
16650
s%@GRASS_LIBRARY_TYPE@%$GRASS_LIBRARY_TYPE%g
 
16651
s%@RANLIB@%$RANLIB%g
 
16652
s%@AR@%$AR%g
 
16653
s%@CPP@%$CPP%g
 
16654
s%@PLAT_OBJS@%$PLAT_OBJS%g
 
16655
s%@CFLAGS_DEBUG@%$CFLAGS_DEBUG%g
 
16656
s%@CFLAGS_OPTIMIZE@%$CFLAGS_OPTIMIZE%g
 
16657
s%@CFLAGS_WARNING@%$CFLAGS_WARNING%g
 
16658
s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
 
16659
s%@LDFLAGS_DEBUG@%$LDFLAGS_DEBUG%g
 
16660
s%@LDFLAGS_OPTIMIZE@%$LDFLAGS_OPTIMIZE%g
 
16661
s%@CC_SEARCH_FLAGS@%$CC_SEARCH_FLAGS%g
 
16662
s%@LD_SEARCH_FLAGS@%$LD_SEARCH_FLAGS%g
 
16663
s%@LD_LIBRARY_PATH_VAR@%$LD_LIBRARY_PATH_VAR%g
 
16664
s%@STLIB_LD@%$STLIB_LD%g
 
16665
s%@SHLIB_LD@%$SHLIB_LD%g
 
16666
s%@GRASS_SHLIB_LD_EXTRAS@%$GRASS_SHLIB_LD_EXTRAS%g
 
16667
s%@SHLIB_LD_FLAGS@%$SHLIB_LD_FLAGS%g
 
16668
s%@SHLIB_LD_LIBS@%$SHLIB_LD_LIBS%g
 
16669
s%@SHLIB_CFLAGS@%$SHLIB_CFLAGS%g
 
16670
s%@SHLIB_SUFFIX@%$SHLIB_SUFFIX%g
 
16671
s%@MAKE_LIB@%$MAKE_LIB%g
 
16672
s%@MAKE_STUB_LIB@%$MAKE_STUB_LIB%g
 
16673
s%@INSTALL_LIB@%$INSTALL_LIB%g
 
16674
s%@INSTALL_STUB_LIB@%$INSTALL_STUB_LIB%g
 
16675
s%@INCLUDE_DIRS@%$INCLUDE_DIRS%g
 
16676
s%@LIBRARY_DIRS@%$LIBRARY_DIRS%g
 
16677
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
 
16678
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
 
16679
s%@INSTALL_DATA@%$INSTALL_DATA%g
 
16680
s%@LEX@%$LEX%g
 
16681
s%@LEXLIB@%$LEXLIB%g
 
16682
s%@LEXPATH@%$LEXPATH%g
 
16683
s%@YACC@%$YACC%g
 
16684
s%@YACCPATH@%$YACCPATH%g
 
16685
s%@ENV@%$ENV%g
 
16686
s%@PERL@%$PERL%g
 
16687
s%@CROSS_COMPILING@%$CROSS_COMPILING%g
 
16688
s%@X_CFLAGS@%$X_CFLAGS%g
 
16689
s%@X_LIBS@%$X_LIBS%g
 
16690
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
 
16691
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
 
16692
s%@XLIB@%$XLIB%g
 
16693
s%@XTLIB@%$XTLIB%g
 
16694
s%@USE_X11@%$USE_X11%g
 
16695
s%@CURSES_MAXY@%$CURSES_MAXY%g
 
16696
s%@CURSESLIB@%$CURSESLIB%g
 
16697
s%@USE_CURSES@%$USE_CURSES%g
 
16698
s%@COMPATLIB@%$COMPATLIB%g
 
16699
s%@DBMIEXTRALIB@%$DBMIEXTRALIB%g
 
16700
s%@XDRLIB@%$XDRLIB%g
 
16701
s%@HAVE_ASPRINTF@%$HAVE_ASPRINTF%g
 
16702
s%@MATHLIB@%$MATHLIB%g
 
16703
s%@DLLIB@%$DLLIB%g
 
16704
s%@ICONVLIB@%$ICONVLIB%g
 
16705
s%@SOCKLIB@%$SOCKLIB%g
 
16706
s%@HAVE_SOCKET@%$HAVE_SOCKET%g
 
16707
s%@ZLIBINCPATH@%$ZLIBINCPATH%g
 
16708
s%@ZLIBLIBPATH@%$ZLIBLIBPATH%g
 
16709
s%@ZLIB@%$ZLIB%g
 
16710
s%@PROJINC@%$PROJINC%g
 
16711
s%@PROJLIB@%$PROJLIB%g
 
16712
s%@PROJSHARE@%$PROJSHARE%g
 
16713
s%@NAD2BIN@%$NAD2BIN%g
 
16714
s%@REGEXINCPATH@%$REGEXINCPATH%g
 
16715
s%@REGEXLIBPATH@%$REGEXLIBPATH%g
 
16716
s%@REGEXLIB@%$REGEXLIB%g
 
16717
s%@USE_REGEX@%$USE_REGEX%g
 
16718
s%@READLINEINCPATH@%$READLINEINCPATH%g
 
16719
s%@READLINELIBPATH@%$READLINELIBPATH%g
 
16720
s%@READLINELIB@%$READLINELIB%g
 
16721
s%@HISTORYLIB@%$HISTORYLIB%g
 
16722
s%@JPEGINCPATH@%$JPEGINCPATH%g
 
16723
s%@JPEGLIBPATH@%$JPEGLIBPATH%g
 
16724
s%@JPEGLIB@%$JPEGLIB%g
 
16725
s%@GDAL_CONFIG@%$GDAL_CONFIG%g
 
16726
s%@GDAL_LIBS@%$GDAL_LIBS%g
 
16727
s%@GDAL_CFLAGS@%$GDAL_CFLAGS%g
 
16728
s%@USE_GDAL@%$USE_GDAL%g
 
16729
s%@USE_OGR@%$USE_OGR%g
 
16730
s%@GEOS_CONFIG@%$GEOS_CONFIG%g
 
16731
s%@GEOS_LIBS@%$GEOS_LIBS%g
 
16732
s%@GEOS_CFLAGS@%$GEOS_CFLAGS%g
 
16733
s%@USE_GEOS@%$USE_GEOS%g
 
16734
s%@TIFF_INCLUDE_DIRS@%$TIFF_INCLUDE_DIRS%g
 
16735
s%@TIFF_LIBRARY_DIRS@%$TIFF_LIBRARY_DIRS%g
 
16736
s%@TIFFLIB@%$TIFFLIB%g
 
16737
s%@PNGINC@%$PNGINC%g
 
16738
s%@PNGLIB@%$PNGLIB%g
 
16739
s%@USE_PNG@%$USE_PNG%g
 
16740
s%@USE_POSTGRES@%$USE_POSTGRES%g
 
16741
s%@PQINCPATH@%$PQINCPATH%g
 
16742
s%@PQLIBPATH@%$PQLIBPATH%g
 
16743
s%@PQLIB@%$PQLIB%g
 
16744
s%@MYSQLD_CONFIG@%$MYSQLD_CONFIG%g
 
16745
s%@USE_MYSQL@%$USE_MYSQL%g
 
16746
s%@MYSQLINCPATH@%$MYSQLINCPATH%g
 
16747
s%@MYSQLLIBPATH@%$MYSQLLIBPATH%g
 
16748
s%@MYSQLLIB@%$MYSQLLIB%g
 
16749
s%@MYSQLDLIB@%$MYSQLDLIB%g
 
16750
s%@USE_SQLITE@%$USE_SQLITE%g
 
16751
s%@SQLITEINCPATH@%$SQLITEINCPATH%g
 
16752
s%@SQLITELIBPATH@%$SQLITELIBPATH%g
 
16753
s%@SQLITELIB@%$SQLITELIB%g
 
16754
s%@USE_FFMPEG@%$USE_FFMPEG%g
 
16755
s%@FFMPEGINCPATH@%$FFMPEGINCPATH%g
 
16756
s%@FFMPEGLIBPATH@%$FFMPEGLIBPATH%g
 
16757
s%@FFMPEGLIB@%$FFMPEGLIB%g
 
16758
s%@USE_OPENGL@%$USE_OPENGL%g
 
16759
s%@OPENGL_X11@%$OPENGL_X11%g
 
16760
s%@OPENGL_AQUA@%$OPENGL_AQUA%g
 
16761
s%@OPENGL_WINDOWS@%$OPENGL_WINDOWS%g
 
16762
s%@OPENGLINC@%$OPENGLINC%g
 
16763
s%@OPENGLLIB@%$OPENGLLIB%g
 
16764
s%@OPENGLULIB@%$OPENGLULIB%g
 
16765
s%@TCLINCDIR@%$TCLINCDIR%g
 
16766
s%@TKINCDIR@%$TKINCDIR%g
 
16767
s%@TCLTKLIBPATH@%$TCLTKLIBPATH%g
 
16768
s%@TCLTKLIBS@%$TCLTKLIBS%g
 
16769
s%@TCL_VERSION@%$TCL_VERSION%g
 
16770
s%@MACOSX_ARCHS_TCLTK@%$MACOSX_ARCHS_TCLTK%g
 
16771
s%@ODBCINC@%$ODBCINC%g
 
16772
s%@ODBCLIB@%$ODBCLIB%g
 
16773
s%@FFTWINC@%$FFTWINC%g
 
16774
s%@FFTWLIB@%$FFTWLIB%g
 
16775
s%@BLASLIB@%$BLASLIB%g
 
16776
s%@BLASINC@%$BLASINC%g
 
16777
s%@LAPACKLIB@%$LAPACKLIB%g
 
16778
s%@LAPACKINC@%$LAPACKINC%g
 
16779
s%@XMINC@%$XMINC%g
 
16780
s%@XMLIB@%$XMLIB%g
 
16781
s%@CAIRO_HAS_XRENDER@%$CAIRO_HAS_XRENDER%g
 
16782
s%@CAIROINC@%$CAIROINC%g
 
16783
s%@CAIROLIB@%$CAIROLIB%g
 
16784
s%@USE_CAIRO@%$USE_CAIRO%g
 
16785
s%@OPENGLWINC@%$OPENGLWINC%g
 
16786
s%@OPENGLWM@%$OPENGLWM%g
 
16787
s%@FTINC@%$FTINC%g
 
16788
s%@FTLIB@%$FTLIB%g
 
16789
s%@INTLLIB@%$INTLLIB%g
 
16790
s%@HAVE_NLS@%$HAVE_NLS%g
 
16791
s%@CXX@%$CXX%g
 
16792
s%@OPENDWGINCPATH@%$OPENDWGINCPATH%g
 
16793
s%@OPENDWGLIBPATH@%$OPENDWGLIBPATH%g
 
16794
s%@OPENDWGLIB@%$OPENDWGLIB%g
 
16795
s%@USE_OPENDWG@%$USE_OPENDWG%g
 
16796
s%@USE_LARGEFILES@%$USE_LARGEFILES%g
 
16797
s%@PY_CONFIG@%$PY_CONFIG%g
 
16798
s%@PYTHONINC@%$PYTHONINC%g
 
16799
s%@PYTHONCFLAGS@%$PYTHONCFLAGS%g
 
16800
s%@PYTHONLDFLAGS@%$PYTHONLDFLAGS%g
 
16801
s%@USE_PYTHON@%$USE_PYTHON%g
 
16802
s%@MACOSX_ARCHS_PYTHON@%$MACOSX_ARCHS_PYTHON%g
 
16803
s%@WX_CONFIG@%$WX_CONFIG%g
 
16804
s%@WXVERSION@%$WXVERSION%g
 
16805
s%@WXWIDGETSCXXFLAGS@%$WXWIDGETSCXXFLAGS%g
 
16806
s%@WXWIDGETSCPPFLAGS@%$WXWIDGETSCPPFLAGS%g
 
16807
s%@WXWIDGETSLIB@%$WXWIDGETSLIB%g
 
16808
s%@USE_WXWIDGETS@%$USE_WXWIDGETS%g
 
16809
s%@MACOSX_ARCHS_WXPYTHON@%$MACOSX_ARCHS_WXPYTHON%g
 
16810
s%@USE_TERMIO@%$USE_TERMIO%g
 
16811
s%@STRIPFLAG@%$STRIPFLAG%g
 
16812
s%@GRASS_HOME@%$GRASS_HOME%g
 
16813
 
 
16814
CEOF
 
16815
EOF
 
16816
 
 
16817
cat >> $CONFIG_STATUS <<\EOF
 
16818
 
 
16819
# Split the substitutions into bite-sized pieces for seds with
 
16820
# small command number limits, like on Digital OSF/1 and HP-UX.
 
16821
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
 
16822
ac_file=1 # Number of current file.
 
16823
ac_beg=1 # First line for current file.
 
16824
ac_end=$ac_max_sed_cmds # Line after last line for current file.
 
16825
ac_more_lines=:
 
16826
ac_sed_cmds=""
 
16827
while $ac_more_lines; do
 
16828
  if test $ac_beg -gt 1; then
 
16829
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
 
16830
  else
 
16831
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
 
16832
  fi
 
16833
  if test ! -s conftest.s$ac_file; then
 
16834
    ac_more_lines=false
 
16835
    rm -f conftest.s$ac_file
 
16836
  else
 
16837
    if test -z "$ac_sed_cmds"; then
 
16838
      ac_sed_cmds="sed -f conftest.s$ac_file"
 
16839
    else
 
16840
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
 
16841
    fi
 
16842
    ac_file=`expr $ac_file + 1`
 
16843
    ac_beg=$ac_end
 
16844
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
 
16845
  fi
 
16846
done
 
16847
if test -z "$ac_sed_cmds"; then
 
16848
  ac_sed_cmds=cat
 
16849
fi
 
16850
EOF
 
16851
 
 
16852
cat >> $CONFIG_STATUS <<EOF
 
16853
 
 
16854
CONFIG_FILES=\${CONFIG_FILES-"include/Make/Grass.make include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex include/version.h include/winname.h grass.pc"}
 
16855
EOF
 
16856
cat >> $CONFIG_STATUS <<\EOF
 
16857
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
 
16858
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
 
16859
  case "$ac_file" in
 
16860
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
 
16861
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
16862
  *) ac_file_in="${ac_file}.in" ;;
 
16863
  esac
 
16864
 
 
16865
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
 
16866
 
 
16867
  # Remove last slash and all that follows it.  Not all systems have dirname.
 
16868
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
 
16869
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
 
16870
    # The file is in a subdirectory.
 
16871
    test ! -d "$ac_dir" && mkdir "$ac_dir"
 
16872
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
 
16873
    # A "../" for each directory in $ac_dir_suffix.
 
16874
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
 
16875
  else
 
16876
    ac_dir_suffix= ac_dots=
 
16877
  fi
 
16878
 
 
16879
  case "$ac_given_srcdir" in
 
16880
  .)  srcdir=.
 
16881
      if test -z "$ac_dots"; then top_srcdir=.
 
16882
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
 
16883
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
 
16884
  *) # Relative path.
 
16885
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
 
16886
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
 
16887
  esac
 
16888
 
 
16889
  case "$ac_given_INSTALL" in
 
16890
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
 
16891
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
 
16892
  esac
 
16893
 
 
16894
  echo creating "$ac_file"
 
16895
  rm -f "$ac_file"
 
16896
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
 
16897
  case "$ac_file" in
 
16898
  *Makefile*) ac_comsub="1i\\
 
16899
# $configure_input" ;;
 
16900
  *) ac_comsub= ;;
 
16901
  esac
 
16902
 
 
16903
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
 
16904
  sed -e "$ac_comsub
 
16905
s%@configure_input@%$configure_input%g
 
16906
s%@srcdir@%$srcdir%g
 
16907
s%@top_srcdir@%$top_srcdir%g
 
16908
s%@INSTALL@%$INSTALL%g
 
16909
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
 
16910
fi; done
 
16911
rm -f conftest.s*
 
16912
 
 
16913
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
 
16914
# NAME is the cpp macro being defined and VALUE is the value it is being given.
 
16915
#
 
16916
# ac_d sets the value in "#define NAME VALUE" lines.
 
16917
ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
 
16918
ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
 
16919
ac_dC='\3'
 
16920
ac_dD='%g'
 
16921
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
 
16922
ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
 
16923
ac_uB='\([      ]\)%\1#\2define\3'
 
16924
ac_uC=' '
 
16925
ac_uD='\4%g'
 
16926
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
 
16927
ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
 
16928
ac_eB='$%\1#\2define\3'
 
16929
ac_eC=' '
 
16930
ac_eD='%g'
 
16931
 
 
16932
if test "${CONFIG_HEADERS+set}" != set; then
 
16933
EOF
 
16934
cat >> $CONFIG_STATUS <<EOF
 
16935
  CONFIG_HEADERS="include/config.h"
 
16936
EOF
 
16937
cat >> $CONFIG_STATUS <<\EOF
 
16938
fi
 
16939
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
 
16940
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
 
16941
  case "$ac_file" in
 
16942
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
 
16943
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
 
16944
  *) ac_file_in="${ac_file}.in" ;;
 
16945
  esac
 
16946
 
 
16947
  echo creating $ac_file
 
16948
 
 
16949
  rm -f conftest.frag conftest.in conftest.out
 
16950
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
 
16951
  cat $ac_file_inputs > conftest.in
 
16952
 
 
16953
EOF
 
16954
 
 
16955
# Transform confdefs.h into a sed script conftest.vals that substitutes
 
16956
# the proper values into config.h.in to produce config.h.  And first:
 
16957
# Protect against being on the right side of a sed subst in config.status.
 
16958
# Protect against being in an unquoted here document in config.status.
 
16959
rm -f conftest.vals
 
16960
cat > conftest.hdr <<\EOF
 
16961
s/[\\&%]/\\&/g
 
16962
s%[\\$`]%\\&%g
 
16963
s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
 
16964
s%ac_d%ac_u%gp
 
16965
s%ac_u%ac_e%gp
 
16966
EOF
 
16967
sed -n -f conftest.hdr confdefs.h > conftest.vals
 
16968
rm -f conftest.hdr
 
16969
 
 
16970
# This sed command replaces #undef with comments.  This is necessary, for
 
16971
# example, in the case of _POSIX_SOURCE, which is predefined and required
 
16972
# on some systems where configure will not decide to define it.
 
16973
cat >> conftest.vals <<\EOF
 
16974
s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
 
16975
EOF
 
16976
 
 
16977
# Break up conftest.vals because some shells have a limit on
 
16978
# the size of here documents, and old seds have small limits too.
 
16979
 
 
16980
rm -f conftest.tail
 
16981
while :
 
16982
do
 
16983
  ac_lines=`grep -c . conftest.vals`
 
16984
  # grep -c gives empty output for an empty file on some AIX systems.
 
16985
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
 
16986
  # Write a limited-size here document to conftest.frag.
 
16987
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
 
16988
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
 
16989
  echo 'CEOF
 
16990
  sed -f conftest.frag conftest.in > conftest.out
 
16991
  rm -f conftest.in
 
16992
  mv conftest.out conftest.in
 
16993
' >> $CONFIG_STATUS
 
16994
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
 
16995
  rm -f conftest.vals
 
16996
  mv conftest.tail conftest.vals
 
16997
done
 
16998
rm -f conftest.vals
 
16999
 
 
17000
cat >> $CONFIG_STATUS <<\EOF
 
17001
  rm -f conftest.frag conftest.h
 
17002
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
 
17003
  cat conftest.in >> conftest.h
 
17004
  rm -f conftest.in
 
17005
  if cmp -s $ac_file conftest.h 2>/dev/null; then
 
17006
    echo "$ac_file is unchanged"
 
17007
    rm -f conftest.h
 
17008
  else
 
17009
    # Remove last slash and all that follows it.  Not all systems have dirname.
 
17010
      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
 
17011
      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
 
17012
      # The file is in a subdirectory.
 
17013
      test ! -d "$ac_dir" && mkdir "$ac_dir"
 
17014
    fi
 
17015
    rm -f $ac_file
 
17016
    mv conftest.h $ac_file
 
17017
  fi
 
17018
fi; done
 
17019
 
 
17020
EOF
 
17021
cat >> $CONFIG_STATUS <<EOF
 
17022
 
 
17023
EOF
 
17024
cat >> $CONFIG_STATUS <<\EOF
 
17025
 
 
17026
exit 0
 
17027
EOF
 
17028
chmod +x $CONFIG_STATUS
 
17029
rm -fr confdefs* $ac_clean_files
 
17030
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
 
17031
 
 
17032
 
 
17033
 
 
17034
echo "Copying config.status to config.status.${ARCH}"
 
17035
 
 
17036
cp -f config.status config.status.${ARCH}
 
17037
 
 
17038
# Display configuration status
 
17039
 
 
17040
USE_TOGL=
 
17041
if test -n "${USE_TCLTK}" -a -n "${USE_OPENGL}" ; then
 
17042
    USE_TOGL="1"
 
17043
fi
 
17044
 
 
17045
 
 
17046
echo ""
 
17047
 
 
17048
 
 
17049
echo "GRASS is now configured for:  ${host}"
 
17050
 
 
17051
 
 
17052
echo ""
 
17053
 
 
17054
 
 
17055
echo "  Source directory:            ${SRCDIR}"
 
17056
 
 
17057
 
 
17058
echo "  Build directory:             ${DSTDIR}"
 
17059
 
 
17060
 
 
17061
echo "  Installation directory:      ${INSTDIR}"
 
17062
 
 
17063
 
 
17064
echo "  Startup script in directory: ${bindir}"
 
17065
 
 
17066
 
 
17067
echo "  C compiler:                  ${CC} ${CFLAGS}"
 
17068
 
 
17069
 
 
17070
echo "  C++ compiler:                ${CXX} ${CXXFLAGS}"
 
17071
 
 
17072
#LOC_MSG([  FORTRAN compiler:            ${F77} ${FFLAGS}])
 
17073
 
 
17074
echo "  Building shared libraries:   ${shared_ok}"
 
17075
 
 
17076
 
 
17077
echo "  64bit support:               ${do64bit}"
 
17078
 
 
17079
 
 
17080
echo "  OpenGL platform:             ${OPENGL_TYPE}"
 
17081
 
 
17082
 
 
17083
echo ""
 
17084
 
 
17085
 
 
17086
echo "  MacOSX application:         `if test -n "${MACOSX_APP}" ; then echo yes ; else echo no ; fi`"
 
17087
 
 
17088
echo "  MacOSX architectures:       ${MACOSX_ARCHS}"
 
17089
 
 
17090
 
 
17091
echo "  MacOSX SDK:                 ${MACOSX_SDK}"
 
17092
 
 
17093
 
 
17094
echo ""
 
17095
 
 
17096
 
 
17097
echo "  NVIZ:                       `if test -n "${USE_TOGL}" ; then echo yes ; else echo no ; fi`"
 
17098
 
 
17099
echo ""
 
17100
 
 
17101
 
 
17102
echo "  BLAS support:               `if test -n "${USE_BLAS}" ; then echo yes ; else echo no ; fi`"
 
17103
 
 
17104
echo "  C++ support:                `if test -n "${USE_CXX}" ; then echo yes ; else echo no ; fi`"
 
17105
 
 
17106
echo "  Cairo support:              `if test -n "${USE_CAIRO}" ; then echo yes ; else echo no ; fi`"
 
17107
 
 
17108
echo "  DWG support:                `if test -n "${USE_OPENDWG}" ; then echo yes ; else echo no ; fi`"
 
17109
 
 
17110
echo "  FFMPEG support:             `if test -n "${USE_FFMPEG}" ; then echo yes ; else echo no ; fi`"
 
17111
 
 
17112
echo "  FFTW support:               `if test -n "${USE_FFTW}" ; then echo yes ; else echo no ; fi`"
 
17113
 
 
17114
echo "  FreeType support:           `if test -n "${USE_FREETYPE}" ; then echo yes ; else echo no ; fi`"
 
17115
 
 
17116
echo "  GDAL support:               `if test -n "${USE_GDAL}" ; then echo yes ; else echo no ; fi`"
 
17117
 
 
17118
echo "  GEOS support:               `if test -n "${USE_GEOS}" ; then echo yes ; else echo no ; fi`"
 
17119
 
 
17120
echo "  GLw support:                `if test -n "${USE_GLW}" ; then echo yes ; else echo no ; fi`"
 
17121
 
 
17122
echo "  JPEG support:               `if test -n "${USE_JPEG}" ; then echo yes ; else echo no ; fi`"
 
17123
 
 
17124
echo "  LAPACK support:             `if test -n "${USE_LAPACK}" ; then echo yes ; else echo no ; fi`"
 
17125
 
 
17126
echo "  Large File support (LFS):   `if test -n "${USE_LARGEFILES}" ; then echo yes ; else echo no ; fi`"
 
17127
 
 
17128
echo "  Motif support:              `if test -n "${USE_MOTIF}" ; then echo yes ; else echo no ; fi`"
 
17129
 
 
17130
echo "  MySQL support:              `if test -n "${USE_MYSQL}" ; then echo yes ; else echo no ; fi`"
 
17131
 
 
17132
echo "  NLS support:                `if test -n "${USE_NLS}" ; then echo yes ; else echo no ; fi`"
 
17133
 
 
17134
echo "  ODBC support:               `if test -n "${USE_ODBC}" ; then echo yes ; else echo no ; fi`"
 
17135
 
 
17136
echo "  OGR support:                `if test -n "${USE_OGR}" ; then echo yes ; else echo no ; fi`"
 
17137
 
 
17138
echo "  OpenGL support:             `if test -n "${USE_OPENGL}" ; then echo yes ; else echo no ; fi`"
 
17139
 
 
17140
echo "  PNG support:                `if test -n "${USE_PNG}" ; then echo yes ; else echo no ; fi`"
 
17141
 
 
17142
echo "  PostgreSQL support:         `if test -n "${USE_POSTGRES}" ; then echo yes ; else echo no ; fi`"
 
17143
 
 
17144
echo "  Python support:             `if test -n "${USE_PYTHON}" ; then echo yes ; else echo no ; fi`"
 
17145
 
 
17146
echo "  Readline support:           `if test -n "${USE_READLINE}" ; then echo yes ; else echo no ; fi`"
 
17147
 
 
17148
echo "  SQLite support:             `if test -n "${USE_SQLITE}" ; then echo yes ; else echo no ; fi`"
 
17149
 
 
17150
echo "  Tcl/Tk support:             `if test -n "${USE_TCLTK}" ; then echo yes ; else echo no ; fi`"
 
17151
 
 
17152
echo "  wxWidgets support:          `if test -n "${USE_WXWIDGETS}" ; then echo yes ; else echo no ; fi`"
 
17153
 
 
17154
echo "  TIFF support:               `if test -n "${USE_TIFF}" ; then echo yes ; else echo no ; fi`"
 
17155
 
 
17156
echo "  X11 support:                `if test -n "${USE_X11}" ; then echo yes ; else echo no ; fi`"
 
17157
 
 
17158
echo ""
 
17159