OSDN Git Service

Add MS7619SE
[uclinux-h8/uClinux-dist.git] / user / gnugk / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-radius               enable RADIUS support (default=yes)"
16 ac_help="$ac_help
17   --with-large-fdset[=MAXFD]    Maximum number of sockets supported (default=1024)"
18 ac_help="$ac_help
19   --enable-mysql                enable MySQL support (default=yes)"
20 ac_help="$ac_help
21   --with-mysql-include-dir=DIR  directory where the MySQL includes may be found "
22 ac_help="$ac_help
23   --with-mysql-lib-dir=DIR      directory where the MySQL libraries may be found "
24 ac_help="$ac_help
25   --with-mysql-dir=DIR          base directory where MySQL is installed "
26 ac_help="$ac_help
27   --enable-pgsql                enable PostgreSQL support (default=yes)"
28 ac_help="$ac_help
29   --with-pgsql-include-dir=DIR  directory where the PostgreSQL includes may be found "
30 ac_help="$ac_help
31   --with-pgsql-lib-dir=DIR      directory where the PostgreSQL libraries may be found "
32 ac_help="$ac_help
33   --with-pgsql-dir=DIR          base directory where PostgreSQL is installed "
34 ac_help="$ac_help
35   --enable-firebird                enable Interbase/Firebird support (default=yes)"
36 ac_help="$ac_help
37   --with-firebird-include-dir=DIR  directory where Firebird includes may be found "
38 ac_help="$ac_help
39   --with-firebird-lib-dir=DIR      directory where Firebird libraries may be found "
40 ac_help="$ac_help
41   --with-firebird-dir=DIR          base directory where Firebird is installed "
42
43 # Initialize some variables set by options.
44 # The variables have the same names as the options, with
45 # dashes changed to underlines.
46 build=NONE
47 cache_file=./config.cache
48 exec_prefix=NONE
49 host=NONE
50 no_create=
51 nonopt=NONE
52 no_recursion=
53 prefix=NONE
54 program_prefix=NONE
55 program_suffix=NONE
56 program_transform_name=s,x,x,
57 silent=
58 site=
59 srcdir=
60 target=NONE
61 verbose=
62 x_includes=NONE
63 x_libraries=NONE
64 bindir='${exec_prefix}/bin'
65 sbindir='${exec_prefix}/sbin'
66 libexecdir='${exec_prefix}/libexec'
67 datadir='${prefix}/share'
68 sysconfdir='${prefix}/etc'
69 sharedstatedir='${prefix}/com'
70 localstatedir='${prefix}/var'
71 libdir='${exec_prefix}/lib'
72 includedir='${prefix}/include'
73 oldincludedir='/usr/include'
74 infodir='${prefix}/info'
75 mandir='${prefix}/man'
76
77 # Initialize some other variables.
78 subdirs=
79 MFLAGS= MAKEFLAGS=
80 SHELL=${CONFIG_SHELL-/bin/sh}
81 # Maximum number of lines to put in a shell here document.
82 ac_max_here_lines=12
83
84 ac_prev=
85 for ac_option
86 do
87
88   # If the previous option needs an argument, assign it.
89   if test -n "$ac_prev"; then
90     eval "$ac_prev=\$ac_option"
91     ac_prev=
92     continue
93   fi
94
95   case "$ac_option" in
96   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
97   *) ac_optarg= ;;
98   esac
99
100   # Accept the important Cygnus configure options, so we can diagnose typos.
101
102   case "$ac_option" in
103
104   -bindir | --bindir | --bindi | --bind | --bin | --bi)
105     ac_prev=bindir ;;
106   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
107     bindir="$ac_optarg" ;;
108
109   -build | --build | --buil | --bui | --bu)
110     ac_prev=build ;;
111   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
112     build="$ac_optarg" ;;
113
114   -cache-file | --cache-file | --cache-fil | --cache-fi \
115   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
116     ac_prev=cache_file ;;
117   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
118   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
119     cache_file="$ac_optarg" ;;
120
121   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
122     ac_prev=datadir ;;
123   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
124   | --da=*)
125     datadir="$ac_optarg" ;;
126
127   -disable-* | --disable-*)
128     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
129     # Reject names that are not valid shell variable names.
130     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
131       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
132     fi
133     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134     eval "enable_${ac_feature}=no" ;;
135
136   -enable-* | --enable-*)
137     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
138     # Reject names that are not valid shell variable names.
139     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
140       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
141     fi
142     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
143     case "$ac_option" in
144       *=*) ;;
145       *) ac_optarg=yes ;;
146     esac
147     eval "enable_${ac_feature}='$ac_optarg'" ;;
148
149   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
150   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
151   | --exec | --exe | --ex)
152     ac_prev=exec_prefix ;;
153   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
154   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
155   | --exec=* | --exe=* | --ex=*)
156     exec_prefix="$ac_optarg" ;;
157
158   -gas | --gas | --ga | --g)
159     # Obsolete; use --with-gas.
160     with_gas=yes ;;
161
162   -help | --help | --hel | --he)
163     # Omit some internal or obsolete options to make the list less imposing.
164     # This message is too long to be a string in the A/UX 3.1 sh.
165     cat << EOF
166 Usage: configure [options] [host]
167 Options: [defaults in brackets after descriptions]
168 Configuration:
169   --cache-file=FILE       cache test results in FILE
170   --help                  print this message
171   --no-create             do not create output files
172   --quiet, --silent       do not print \`checking...' messages
173   --version               print the version of autoconf that created configure
174 Directory and file names:
175   --prefix=PREFIX         install architecture-independent files in PREFIX
176                           [$ac_default_prefix]
177   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
178                           [same as prefix]
179   --bindir=DIR            user executables in DIR [EPREFIX/bin]
180   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
181   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
182   --datadir=DIR           read-only architecture-independent data in DIR
183                           [PREFIX/share]
184   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
185   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
186                           [PREFIX/com]
187   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
188   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
189   --includedir=DIR        C header files in DIR [PREFIX/include]
190   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
191   --infodir=DIR           info documentation in DIR [PREFIX/info]
192   --mandir=DIR            man documentation in DIR [PREFIX/man]
193   --srcdir=DIR            find the sources in DIR [configure dir or ..]
194   --program-prefix=PREFIX prepend PREFIX to installed program names
195   --program-suffix=SUFFIX append SUFFIX to installed program names
196   --program-transform-name=PROGRAM
197                           run sed PROGRAM on installed program names
198 EOF
199     cat << EOF
200 Host type:
201   --build=BUILD           configure for building on BUILD [BUILD=HOST]
202   --host=HOST             configure for HOST [guessed]
203   --target=TARGET         configure for TARGET [TARGET=HOST]
204 Features and packages:
205   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
206   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
207   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
208   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
209   --x-includes=DIR        X include files are in DIR
210   --x-libraries=DIR       X library files are in DIR
211 EOF
212     if test -n "$ac_help"; then
213       echo "--enable and --with options recognized:$ac_help"
214     fi
215     exit 0 ;;
216
217   -host | --host | --hos | --ho)
218     ac_prev=host ;;
219   -host=* | --host=* | --hos=* | --ho=*)
220     host="$ac_optarg" ;;
221
222   -includedir | --includedir | --includedi | --included | --include \
223   | --includ | --inclu | --incl | --inc)
224     ac_prev=includedir ;;
225   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
226   | --includ=* | --inclu=* | --incl=* | --inc=*)
227     includedir="$ac_optarg" ;;
228
229   -infodir | --infodir | --infodi | --infod | --info | --inf)
230     ac_prev=infodir ;;
231   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
232     infodir="$ac_optarg" ;;
233
234   -libdir | --libdir | --libdi | --libd)
235     ac_prev=libdir ;;
236   -libdir=* | --libdir=* | --libdi=* | --libd=*)
237     libdir="$ac_optarg" ;;
238
239   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
240   | --libexe | --libex | --libe)
241     ac_prev=libexecdir ;;
242   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
243   | --libexe=* | --libex=* | --libe=*)
244     libexecdir="$ac_optarg" ;;
245
246   -localstatedir | --localstatedir | --localstatedi | --localstated \
247   | --localstate | --localstat | --localsta | --localst \
248   | --locals | --local | --loca | --loc | --lo)
249     ac_prev=localstatedir ;;
250   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
251   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
252   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
253     localstatedir="$ac_optarg" ;;
254
255   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
256     ac_prev=mandir ;;
257   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
258     mandir="$ac_optarg" ;;
259
260   -nfp | --nfp | --nf)
261     # Obsolete; use --without-fp.
262     with_fp=no ;;
263
264   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
265   | --no-cr | --no-c)
266     no_create=yes ;;
267
268   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
269   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
270     no_recursion=yes ;;
271
272   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
273   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
274   | --oldin | --oldi | --old | --ol | --o)
275     ac_prev=oldincludedir ;;
276   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
277   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
278   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
279     oldincludedir="$ac_optarg" ;;
280
281   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
282     ac_prev=prefix ;;
283   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
284     prefix="$ac_optarg" ;;
285
286   -program-prefix | --program-prefix | --program-prefi | --program-pref \
287   | --program-pre | --program-pr | --program-p)
288     ac_prev=program_prefix ;;
289   -program-prefix=* | --program-prefix=* | --program-prefi=* \
290   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
291     program_prefix="$ac_optarg" ;;
292
293   -program-suffix | --program-suffix | --program-suffi | --program-suff \
294   | --program-suf | --program-su | --program-s)
295     ac_prev=program_suffix ;;
296   -program-suffix=* | --program-suffix=* | --program-suffi=* \
297   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
298     program_suffix="$ac_optarg" ;;
299
300   -program-transform-name | --program-transform-name \
301   | --program-transform-nam | --program-transform-na \
302   | --program-transform-n | --program-transform- \
303   | --program-transform | --program-transfor \
304   | --program-transfo | --program-transf \
305   | --program-trans | --program-tran \
306   | --progr-tra | --program-tr | --program-t)
307     ac_prev=program_transform_name ;;
308   -program-transform-name=* | --program-transform-name=* \
309   | --program-transform-nam=* | --program-transform-na=* \
310   | --program-transform-n=* | --program-transform-=* \
311   | --program-transform=* | --program-transfor=* \
312   | --program-transfo=* | --program-transf=* \
313   | --program-trans=* | --program-tran=* \
314   | --progr-tra=* | --program-tr=* | --program-t=*)
315     program_transform_name="$ac_optarg" ;;
316
317   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
318   | -silent | --silent | --silen | --sile | --sil)
319     silent=yes ;;
320
321   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
322     ac_prev=sbindir ;;
323   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
324   | --sbi=* | --sb=*)
325     sbindir="$ac_optarg" ;;
326
327   -sharedstatedir | --sharedstatedir | --sharedstatedi \
328   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
329   | --sharedst | --shareds | --shared | --share | --shar \
330   | --sha | --sh)
331     ac_prev=sharedstatedir ;;
332   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
333   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
334   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
335   | --sha=* | --sh=*)
336     sharedstatedir="$ac_optarg" ;;
337
338   -site | --site | --sit)
339     ac_prev=site ;;
340   -site=* | --site=* | --sit=*)
341     site="$ac_optarg" ;;
342
343   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
344     ac_prev=srcdir ;;
345   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
346     srcdir="$ac_optarg" ;;
347
348   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
349   | --syscon | --sysco | --sysc | --sys | --sy)
350     ac_prev=sysconfdir ;;
351   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
352   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
353     sysconfdir="$ac_optarg" ;;
354
355   -target | --target | --targe | --targ | --tar | --ta | --t)
356     ac_prev=target ;;
357   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
358     target="$ac_optarg" ;;
359
360   -v | -verbose | --verbose | --verbos | --verbo | --verb)
361     verbose=yes ;;
362
363   -version | --version | --versio | --versi | --vers)
364     echo "configure generated by autoconf version 2.13"
365     exit 0 ;;
366
367   -with-* | --with-*)
368     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
369     # Reject names that are not valid shell variable names.
370     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
371       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
372     fi
373     ac_package=`echo $ac_package| sed 's/-/_/g'`
374     case "$ac_option" in
375       *=*) ;;
376       *) ac_optarg=yes ;;
377     esac
378     eval "with_${ac_package}='$ac_optarg'" ;;
379
380   -without-* | --without-*)
381     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
382     # Reject names that are not valid shell variable names.
383     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
384       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
385     fi
386     ac_package=`echo $ac_package| sed 's/-/_/g'`
387     eval "with_${ac_package}=no" ;;
388
389   --x)
390     # Obsolete; use --with-x.
391     with_x=yes ;;
392
393   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
394   | --x-incl | --x-inc | --x-in | --x-i)
395     ac_prev=x_includes ;;
396   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
397   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
398     x_includes="$ac_optarg" ;;
399
400   -x-libraries | --x-libraries | --x-librarie | --x-librari \
401   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
402     ac_prev=x_libraries ;;
403   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
404   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
405     x_libraries="$ac_optarg" ;;
406
407   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
408     ;;
409
410   *)
411     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
412       echo "configure: warning: $ac_option: invalid host type" 1>&2
413     fi
414     if test "x$nonopt" != xNONE; then
415       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
416     fi
417     nonopt="$ac_option"
418     ;;
419
420   esac
421 done
422
423 if test -n "$ac_prev"; then
424   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
425 fi
426
427 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
428
429 # File descriptor usage:
430 # 0 standard input
431 # 1 file creation
432 # 2 errors and warnings
433 # 3 some systems may open it to /dev/tty
434 # 4 used on the Kubota Titan
435 # 6 checking for... messages and results
436 # 5 compiler messages saved in config.log
437 if test "$silent" = yes; then
438   exec 6>/dev/null
439 else
440   exec 6>&1
441 fi
442 exec 5>./config.log
443
444 echo "\
445 This file contains any messages produced by compilers while
446 running configure, to aid debugging if configure makes a mistake.
447 " 1>&5
448
449 # Strip out --no-create and --no-recursion so they do not pile up.
450 # Also quote any args containing shell metacharacters.
451 ac_configure_args=
452 for ac_arg
453 do
454   case "$ac_arg" in
455   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
456   | --no-cr | --no-c) ;;
457   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
458   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
459   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
460   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
461   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
462   esac
463 done
464
465 # NLS nuisances.
466 # Only set these to C if already set.  These must not be set unconditionally
467 # because not all systems understand e.g. LANG=C (notably SCO).
468 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
469 # Non-C LC_CTYPE values break the ctype check.
470 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
471 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
472 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
473 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
474
475 # confdefs.h avoids OS command line length limits that DEFS can exceed.
476 rm -rf conftest* confdefs.h
477 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
478 echo > confdefs.h
479
480 # A filename unique to this package, relative to the directory that
481 # configure is in, which we can look for to find out if srcdir is correct.
482 ac_unique_file=gk.h
483
484 # Find the source files, if location was not specified.
485 if test -z "$srcdir"; then
486   ac_srcdir_defaulted=yes
487   # Try the directory containing this script, then its parent.
488   ac_prog=$0
489   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
490   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
491   srcdir=$ac_confdir
492   if test ! -r $srcdir/$ac_unique_file; then
493     srcdir=..
494   fi
495 else
496   ac_srcdir_defaulted=no
497 fi
498 if test ! -r $srcdir/$ac_unique_file; then
499   if test "$ac_srcdir_defaulted" = yes; then
500     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
501   else
502     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
503   fi
504 fi
505 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
506
507 # Prefer explicitly selected file to automatically selected ones.
508 if test -z "$CONFIG_SITE"; then
509   if test "x$prefix" != xNONE; then
510     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
511   else
512     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
513   fi
514 fi
515 for ac_site_file in $CONFIG_SITE; do
516   if test -r "$ac_site_file"; then
517     echo "loading site script $ac_site_file"
518     . "$ac_site_file"
519   fi
520 done
521
522 if test -r "$cache_file"; then
523   echo "loading cache $cache_file"
524   . $cache_file
525 else
526   echo "creating cache $cache_file"
527   > $cache_file
528 fi
529
530 ac_ext=c
531 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
532 ac_cpp='$CPP $CPPFLAGS'
533 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
534 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
535 cross_compiling=$ac_cv_prog_cc_cross
536
537 ac_exeext=
538 ac_objext=o
539 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
540   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
541   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
542     ac_n= ac_c='
543 ' ac_t='        '
544   else
545     ac_n=-n ac_c= ac_t=
546   fi
547 else
548   ac_n= ac_c='\c' ac_t=
549 fi
550
551
552
553 # Extract the first word of "gcc", so it can be a program name with args.
554 set dummy gcc; ac_word=$2
555 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
556 echo "configure:557: checking for $ac_word" >&5
557 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
558   echo $ac_n "(cached) $ac_c" 1>&6
559 else
560   if test -n "$CC"; then
561   ac_cv_prog_CC="$CC" # Let the user override the test.
562 else
563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
564   ac_dummy="$PATH"
565   for ac_dir in $ac_dummy; do
566     test -z "$ac_dir" && ac_dir=.
567     if test -f $ac_dir/$ac_word; then
568       ac_cv_prog_CC="gcc"
569       break
570     fi
571   done
572   IFS="$ac_save_ifs"
573 fi
574 fi
575 CC="$ac_cv_prog_CC"
576 if test -n "$CC"; then
577   echo "$ac_t""$CC" 1>&6
578 else
579   echo "$ac_t""no" 1>&6
580 fi
581
582 if test -z "$CC"; then
583   # Extract the first word of "cc", so it can be a program name with args.
584 set dummy cc; ac_word=$2
585 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
586 echo "configure:587: checking for $ac_word" >&5
587 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
588   echo $ac_n "(cached) $ac_c" 1>&6
589 else
590   if test -n "$CC"; then
591   ac_cv_prog_CC="$CC" # Let the user override the test.
592 else
593   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
594   ac_prog_rejected=no
595   ac_dummy="$PATH"
596   for ac_dir in $ac_dummy; do
597     test -z "$ac_dir" && ac_dir=.
598     if test -f $ac_dir/$ac_word; then
599       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
600         ac_prog_rejected=yes
601         continue
602       fi
603       ac_cv_prog_CC="cc"
604       break
605     fi
606   done
607   IFS="$ac_save_ifs"
608 if test $ac_prog_rejected = yes; then
609   # We found a bogon in the path, so make sure we never use it.
610   set dummy $ac_cv_prog_CC
611   shift
612   if test $# -gt 0; then
613     # We chose a different compiler from the bogus one.
614     # However, it has the same basename, so the bogon will be chosen
615     # first if we set CC to just the basename; use the full file name.
616     shift
617     set dummy "$ac_dir/$ac_word" "$@"
618     shift
619     ac_cv_prog_CC="$@"
620   fi
621 fi
622 fi
623 fi
624 CC="$ac_cv_prog_CC"
625 if test -n "$CC"; then
626   echo "$ac_t""$CC" 1>&6
627 else
628   echo "$ac_t""no" 1>&6
629 fi
630
631   if test -z "$CC"; then
632     case "`uname -s`" in
633     *win32* | *WIN32*)
634       # Extract the first word of "cl", so it can be a program name with args.
635 set dummy cl; ac_word=$2
636 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
637 echo "configure:638: checking for $ac_word" >&5
638 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
639   echo $ac_n "(cached) $ac_c" 1>&6
640 else
641   if test -n "$CC"; then
642   ac_cv_prog_CC="$CC" # Let the user override the test.
643 else
644   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
645   ac_dummy="$PATH"
646   for ac_dir in $ac_dummy; do
647     test -z "$ac_dir" && ac_dir=.
648     if test -f $ac_dir/$ac_word; then
649       ac_cv_prog_CC="cl"
650       break
651     fi
652   done
653   IFS="$ac_save_ifs"
654 fi
655 fi
656 CC="$ac_cv_prog_CC"
657 if test -n "$CC"; then
658   echo "$ac_t""$CC" 1>&6
659 else
660   echo "$ac_t""no" 1>&6
661 fi
662  ;;
663     esac
664   fi
665   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
666 fi
667
668 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
669 echo "configure:670: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
670
671 ac_ext=c
672 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
673 ac_cpp='$CPP $CPPFLAGS'
674 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
675 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
676 cross_compiling=$ac_cv_prog_cc_cross
677
678 cat > conftest.$ac_ext << EOF
679
680 #line 681 "configure"
681 #include "confdefs.h"
682
683 main(){return(0);}
684 EOF
685 if { (eval echo configure:686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
686   ac_cv_prog_cc_works=yes
687   # If we can't run a trivial program, we are probably using a cross compiler.
688   if (./conftest; exit) 2>/dev/null; then
689     ac_cv_prog_cc_cross=no
690   else
691     ac_cv_prog_cc_cross=yes
692   fi
693 else
694   echo "configure: failed program was:" >&5
695   cat conftest.$ac_ext >&5
696   ac_cv_prog_cc_works=no
697 fi
698 rm -fr conftest*
699 ac_ext=c
700 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
701 ac_cpp='$CPP $CPPFLAGS'
702 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
703 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
704 cross_compiling=$ac_cv_prog_cc_cross
705
706 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
707 if test $ac_cv_prog_cc_works = no; then
708   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
709 fi
710 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
711 echo "configure:712: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
712 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
713 cross_compiling=$ac_cv_prog_cc_cross
714
715 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
716 echo "configure:717: checking whether we are using GNU C" >&5
717 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
718   echo $ac_n "(cached) $ac_c" 1>&6
719 else
720   cat > conftest.c <<EOF
721 #ifdef __GNUC__
722   yes;
723 #endif
724 EOF
725 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
726   ac_cv_prog_gcc=yes
727 else
728   ac_cv_prog_gcc=no
729 fi
730 fi
731
732 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
733
734 if test $ac_cv_prog_gcc = yes; then
735   GCC=yes
736 else
737   GCC=
738 fi
739
740 ac_test_CFLAGS="${CFLAGS+set}"
741 ac_save_CFLAGS="$CFLAGS"
742 CFLAGS=
743 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
744 echo "configure:745: checking whether ${CC-cc} accepts -g" >&5
745 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
746   echo $ac_n "(cached) $ac_c" 1>&6
747 else
748   echo 'void f(){}' > conftest.c
749 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
750   ac_cv_prog_cc_g=yes
751 else
752   ac_cv_prog_cc_g=no
753 fi
754 rm -f conftest*
755
756 fi
757
758 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
759 if test "$ac_test_CFLAGS" = set; then
760   CFLAGS="$ac_save_CFLAGS"
761 elif test $ac_cv_prog_cc_g = yes; then
762   if test "$GCC" = yes; then
763     CFLAGS="-g -O2"
764   else
765     CFLAGS="-g"
766   fi
767 else
768   if test "$GCC" = yes; then
769     CFLAGS="-O2"
770   else
771     CFLAGS=
772   fi
773 fi
774
775 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
776 do
777 # Extract the first word of "$ac_prog", so it can be a program name with args.
778 set dummy $ac_prog; ac_word=$2
779 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
780 echo "configure:781: checking for $ac_word" >&5
781 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
782   echo $ac_n "(cached) $ac_c" 1>&6
783 else
784   if test -n "$CXX"; then
785   ac_cv_prog_CXX="$CXX" # Let the user override the test.
786 else
787   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
788   ac_dummy="$PATH"
789   for ac_dir in $ac_dummy; do
790     test -z "$ac_dir" && ac_dir=.
791     if test -f $ac_dir/$ac_word; then
792       ac_cv_prog_CXX="$ac_prog"
793       break
794     fi
795   done
796   IFS="$ac_save_ifs"
797 fi
798 fi
799 CXX="$ac_cv_prog_CXX"
800 if test -n "$CXX"; then
801   echo "$ac_t""$CXX" 1>&6
802 else
803   echo "$ac_t""no" 1>&6
804 fi
805
806 test -n "$CXX" && break
807 done
808 test -n "$CXX" || CXX="gcc"
809
810
811 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
812 echo "configure:813: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
813
814 ac_ext=C
815 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
816 ac_cpp='$CXXCPP $CPPFLAGS'
817 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
818 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
819 cross_compiling=$ac_cv_prog_cxx_cross
820
821 cat > conftest.$ac_ext << EOF
822
823 #line 824 "configure"
824 #include "confdefs.h"
825
826 int main(){return(0);}
827 EOF
828 if { (eval echo configure:829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
829   ac_cv_prog_cxx_works=yes
830   # If we can't run a trivial program, we are probably using a cross compiler.
831   if (./conftest; exit) 2>/dev/null; then
832     ac_cv_prog_cxx_cross=no
833   else
834     ac_cv_prog_cxx_cross=yes
835   fi
836 else
837   echo "configure: failed program was:" >&5
838   cat conftest.$ac_ext >&5
839   ac_cv_prog_cxx_works=no
840 fi
841 rm -fr conftest*
842 ac_ext=c
843 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
844 ac_cpp='$CPP $CPPFLAGS'
845 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
846 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
847 cross_compiling=$ac_cv_prog_cc_cross
848
849 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
850 if test $ac_cv_prog_cxx_works = no; then
851   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
852 fi
853 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
854 echo "configure:855: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
855 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
856 cross_compiling=$ac_cv_prog_cxx_cross
857
858 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
859 echo "configure:860: checking whether we are using GNU C++" >&5
860 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
861   echo $ac_n "(cached) $ac_c" 1>&6
862 else
863   cat > conftest.C <<EOF
864 #ifdef __GNUC__
865   yes;
866 #endif
867 EOF
868 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
869   ac_cv_prog_gxx=yes
870 else
871   ac_cv_prog_gxx=no
872 fi
873 fi
874
875 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
876
877 if test $ac_cv_prog_gxx = yes; then
878   GXX=yes
879 else
880   GXX=
881 fi
882
883 ac_test_CXXFLAGS="${CXXFLAGS+set}"
884 ac_save_CXXFLAGS="$CXXFLAGS"
885 CXXFLAGS=
886 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
887 echo "configure:888: checking whether ${CXX-g++} accepts -g" >&5
888 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
889   echo $ac_n "(cached) $ac_c" 1>&6
890 else
891   echo 'void f(){}' > conftest.cc
892 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
893   ac_cv_prog_cxx_g=yes
894 else
895   ac_cv_prog_cxx_g=no
896 fi
897 rm -f conftest*
898
899 fi
900
901 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
902 if test "$ac_test_CXXFLAGS" = set; then
903   CXXFLAGS="$ac_save_CXXFLAGS"
904 elif test $ac_cv_prog_cxx_g = yes; then
905   if test "$GXX" = yes; then
906     CXXFLAGS="-g -O2"
907   else
908     CXXFLAGS="-g"
909   fi
910 else
911   if test "$GXX" = yes; then
912     CXXFLAGS="-O2"
913   else
914     CXXFLAGS=
915   fi
916 fi
917
918
919 echo $ac_n "checking if MSG_NOSIGNAL is supported by recv call""... $ac_c" 1>&6
920 echo "configure:921: checking if MSG_NOSIGNAL is supported by recv call" >&5
921 cat > conftest.$ac_ext <<EOF
922 #line 923 "configure"
923 #include "confdefs.h"
924
925 #include <sys/types.h>
926 #include <sys/socket.h>
927
928 int main() {
929 recv(0,NULL,1,MSG_NOSIGNAL);
930 ; return 0; }
931 EOF
932 if { (eval echo configure:933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
933   rm -rf conftest*
934   HAS_MSG_NOSIGNAL=1
935 else
936   echo "configure: failed program was:" >&5
937   cat conftest.$ac_ext >&5
938   rm -rf conftest*
939   HAS_MSG_NOSIGNAL=0
940 fi
941 rm -f conftest*
942 if test "$HAS_MSG_NOSIGNAL" = 0 ; then
943   echo "$ac_t""no" 1>&6
944 else
945   echo "$ac_t""yes" 1>&6
946   STDCCFLAGS="-DHAS_MSG_NOSIGNAL=1 $STDCCFLAGS"
947 fi
948
949
950 #if test "${PWLIBDIR:-unset}" != "unset" ; then
951 #  if test -d ${PWLIBDIR}; then
952 #       AC_CHECK_FILE(${PWLIBDIR}/make/unix.mak, HAS_PTLIB=1)
953 #  fi
954 #  if test "${HAS_PTLIB:-unset}" != "unset" ; then
955 #    AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${PWLIBDIR}/make)
956 #  fi
957 #fi
958 #if test "${HAS_PTLIB:-unset}" = "unset" ; then
959 #  if test -d ${HOME}/pwlib/include; then
960 #       AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PTLIB=1)
961 #  fi
962 #  if test "${HAS_PTLIB:-unset}" != "unset" ; then
963 #    PWLIBDIR="${HOME}/pwlib"
964 #    AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${PWLIBDIR}/make)
965 #  else
966 #       if test -d ../pwlib; then
967 #         AC_CHECK_FILE(../pwlib/include/ptlib.h, HAS_PTLIB=1)
968 #       fi
969 #       if test "${HAS_PTLIB:-unset}" != "unset" ; then
970 #      PWLIBDIR="../pwlib"
971 #      AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${PWLIBDIR}/make)
972 #       else
973 #      if test -d /usr/local/include; then
974 #           AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PTLIB=1)
975 #         fi
976 #      if test "${HAS_PTLIB:-unset}" != "unset" ; then
977 #        AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/share/pwlib/make:/usr/local/bin)
978 #      else
979 #           if test -d /usr/include; then
980 #          AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PTLIB=1)
981 #           fi
982 #        if test "${HAS_PTLIB:-unset}" != "unset" ; then
983 #          AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make/)
984 #        fi
985 #      fi
986 #    fi
987 #  fi
988 #fi
989 #
990 #if test "${HAS_PTLIB:-unset}" = "unset" ; then
991 #  echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
992 #  exit
993 #fi
994 #
995 #if test "${PWLIBDIR:-unset}" = "unset" ; then
996 #  if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
997 #    echo "Cannot find ptlib-config - please install and try again"
998 #    exit
999 #  fi
1000 #  PWLIBDIR=`$PTLIB_CONFIG --pwlibdir`
1001 #fi
1002
1003 echo "PWLib prefix set to $PWLIBDIR"
1004
1005
1006
1007 if test "${PTLIB_CONFIG:-unset}" = "unset"; then
1008   #AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PWLIB_VERSION_FILE=1)
1009   if test "${HAS_PWLIB_VERSION_FILE:-unset}" != "unset"; then
1010     PWLIB_MAJOR_VERSION=`cat ${PWLIBDIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '`
1011     PWLIB_MINOR_VERSION=`cat ${PWLIBDIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '`
1012     PWLIB_BUILD_NUMBER=`cat ${PWLIBDIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '`
1013     PWLIB_VERSION="${PWLIB_MAJOR_VERSION}.${PWLIB_MINOR_VERSION}.${PWLIB_BUILD_NUMBER}"
1014   else
1015     
1016 ac_safe=`echo "${PWLIBDIR}/ptbuildopts.h" | sed 'y%./+-%__p_%'`
1017 echo $ac_n "checking for ${PWLIBDIR}/ptbuildopts.h""... $ac_c" 1>&6
1018 echo "configure:1019: checking for ${PWLIBDIR}/ptbuildopts.h" >&5
1019 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1020   echo $ac_n "(cached) $ac_c" 1>&6
1021 else
1022   if test "$cross_compiling" = yes; then
1023     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1024 else
1025   if test -r ${PWLIBDIR}/ptbuildopts.h; then
1026     eval "ac_cv_file_$ac_safe=yes"
1027   else
1028     eval "ac_cv_file_$ac_safe=no"
1029   fi
1030 fi
1031 fi
1032 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1033   echo "$ac_t""yes" 1>&6
1034   HAS_PWLIB_VERSION_FILE=1
1035 else
1036   echo "$ac_t""no" 1>&6
1037
1038 fi
1039
1040         if test "${HAS_PWLIB_VERSION_FILE:-unset}" != "unset"; then
1041       PWLIB_MAJOR_VERSION=`cat ${PWLIBDIR}/ptbuildopts.h | grep PWLIB_MAJOR | cut -f3 -d' '`
1042       PWLIB_MINOR_VERSION=`cat ${PWLIBDIR}/ptbuildopts.h | grep PWLIB_MINOR | cut -f3 -d' '`
1043       PWLIB_BUILD_NUMBER=`cat ${PWLIBDIR}/ptbuildopts.h | grep PWLIB_BUILD | cut -f3 -d' '`
1044       PWLIB_VERSION="${PWLIB_MAJOR_VERSION}.${PWLIB_MINOR_VERSION}.${PWLIB_BUILD_NUMBER}"
1045     fi
1046   fi
1047 else
1048   PWLIB_VERSION=`${PTLIB_CONFIG} --version`
1049   PWLIB_MAJOR_VERSION=`echo "${PWLIB_VERSION}" | sed -e "s/\([0-9]*\)\.[0-9]*\.[0-9]*.*/\1/"`
1050   PWLIB_MINOR_VERSION=`echo "${PWLIB_VERSION}" | sed -e 's/[0-9]*\.\([0-9]*\)\.[0-9]*.*/\1/'`
1051   PWLIB_BUILD_NUMBER=`echo "${PWLIB_VERSION}" | sed -e 's/[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/'`
1052 fi
1053 if test "${PWLIB_VERSION:-unset}" = "unset" -o "${PWLIB_VERSION}" = ".."; then
1054   echo "Error: could not determine PWLib version"
1055   exit
1056 fi
1057
1058 echo "PTLib version is ${PWLIB_VERSION}"
1059
1060 if test ${PWLIB_MAJOR_VERSION} -lt 1; then
1061   echo "Error: at leat PWLib version 1.7.5.2 (Pandora) required"
1062   exit
1063 fi
1064 if test ${PWLIB_MAJOR_VERSION} -eq 1; then
1065   if test ${PWLIB_MINOR_VERSION} -lt 7; then
1066     echo "Error: at leat PWLib version 1.7.5.2 (Pandora) required"
1067     exit
1068   elif test ${PWLIB_MINOR_VERSION} -eq 7; then
1069     if test ${PWLIB_BUILD_NUMBER} -lt 5; then
1070       echo "Error: at leat PWLib version 1.7.5.2 (Pandora) required"
1071       exit
1072     fi
1073   fi
1074 fi
1075
1076
1077
1078
1079 NEEDOPENH323PREFIX=0
1080
1081 #if test "${OPENH323DIR:-unset}" != "unset" ; then
1082 #  if test -d ${OPENH323DIR}; then
1083 #    AC_CHECK_FILE(${OPENH323DIR}/openh323u.mak, HAS_OPENH323=1)
1084 #  fi
1085 #fi
1086 #if test "${HAS_OPENH323:-unset}" = "unset" ; then
1087 #  if test -d ${PWLIBDIR}/../openh323; then
1088 #    AC_CHECK_FILE(${PWLIBDIR}/../openh323/version.h, HAS_OPENH323=1)
1089 #  fi
1090 #  if test "${HAS_OPENH323:-unset}" != "unset" ; then
1091 #    OPENH323DIR="${PWLIBDIR}/../openh323"
1092 #  else
1093 #    if test -d ${HOME}/openh323/include; then
1094 #      AC_CHECK_FILE(${HOME}/openh323/include/h323.h, HAS_OPENH323=1)
1095 #       fi
1096 #    if test "${HAS_OPENH323:-unset}" != "unset" ; then
1097 #      OPENH323DIR="${HOME}/openh323"
1098 #    else
1099 #         if test -d /usr/local/include/openh323; then
1100 #        AC_CHECK_FILE(/usr/local/include/openh323/h323.h, HAS_OPENH323=1)
1101 #         fi
1102 #      if test "${HAS_OPENH323:-unset}" != "unset" ; then
1103 #        OPENH323DIR="/usr/local"
1104 #               OPENH323INSTALLPREFIX="/usr/local"
1105 #               NEEDOPENH323PREFIX=1
1106 #      else
1107 #           if test -d /usr/include/openh323; then
1108 #          AC_CHECK_FILE(/usr/include/openh323/h323.h, HAS_OPENH323=1)
1109 #               fi
1110 #        if test "${HAS_OPENH323:-unset}" != "unset" ; then
1111 #                 OPENH323DIR="/usr"
1112 #                 OPENH323INSTALLPREFIX="/usr"
1113 #                 NEEDOPENH323PREFIX=1
1114 #        fi
1115 #      fi
1116 #    fi
1117 #  fi
1118 #fi
1119
1120 if test "${HAS_OPENH323:-unset}" = "unset" ; then
1121   echo "Cannot find OpenH323 - please install or set OPENH323DIR and try again"
1122   exit
1123 fi
1124
1125 if test -d "${OPENH323DIR}/share/openh323"; then
1126   OPENH323MAKEDIR=${OPENH323DIR}/share/openh323/
1127 fi
1128
1129 echo "OpenH323 prefix set to $OPENH323DIR"
1130
1131 if test "${OPENH323MAKEDIR:-unset}" = "unset"; then
1132   OPENH323MAKEDIR=${OPENH323DIR}
1133 fi
1134
1135
1136
1137
1138 if test -d ${OPENH323DIR}; then
1139 #  AC_CHECK_FILE(${OPENH323DIR}/version.h, HAS_OPENH323_VERSIONFILE=1)
1140   if test "${HAS_OPENH323_VERSIONFILE:-unset}" != "unset"; then
1141     OPENH323_VERSION_FILE=${OPENH323DIR}/version.h
1142         OPENH323_MAJOR_VERSION=`cat ${OPENH323_VERSION_FILE} | grep MAJOR_VERSION | cut -f3 -d' '`
1143         OPENH323_MINOR_VERSION=`cat ${OPENH323_VERSION_FILE} | grep MINOR_VERSION | cut -f3 -d' '`
1144         OPENH323_BUILD_NUMBER=`cat ${OPENH323_VERSION_FILE} | grep BUILD_NUMBER | cut -f3 -d' '`
1145   else
1146     
1147 ac_safe=`echo "${OPENH323MAKEDIR}/openh323buildopts.h" | sed 'y%./+-%__p_%'`
1148 echo $ac_n "checking for ${OPENH323MAKEDIR}/openh323buildopts.h""... $ac_c" 1>&6
1149 echo "configure:1150: checking for ${OPENH323MAKEDIR}/openh323buildopts.h" >&5
1150 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1151   echo $ac_n "(cached) $ac_c" 1>&6
1152 else
1153   if test "$cross_compiling" = yes; then
1154     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1155 else
1156   if test -r ${OPENH323MAKEDIR}/openh323buildopts.h; then
1157     eval "ac_cv_file_$ac_safe=yes"
1158   else
1159     eval "ac_cv_file_$ac_safe=no"
1160   fi
1161 fi
1162 fi
1163 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1164   echo "$ac_t""yes" 1>&6
1165   HAS_OPENH323_VERSIONFILE=1
1166 else
1167   echo "$ac_t""no" 1>&6
1168
1169 fi
1170
1171     if test "${HAS_OPENH323_VERSIONFILE:-unset}" != "unset"; then
1172       OPENH323_VERSION_FILE=${OPENH323MAKEDIR}/openh323buildopts.h
1173       OPENH323_MAJOR_VERSION=`cat ${OPENH323_VERSION_FILE} | grep OPENH323_MAJOR | cut -f3 -d' '`
1174       OPENH323_MINOR_VERSION=`cat ${OPENH323_VERSION_FILE} | grep OPENH323_MINOR | cut -f3 -d' '`
1175       OPENH323_BUILD_NUMBER=`cat ${OPENH323_VERSION_FILE} | grep OPENH323_BUILD | cut -f3 -d' '`
1176     else
1177       
1178 ac_safe=`echo "${OPENH323MAKEDIR}/../../include/openh323/openh323buildopts.h" | sed 'y%./+-%__p_%'`
1179 echo $ac_n "checking for ${OPENH323MAKEDIR}/../../include/openh323/openh323buildopts.h""... $ac_c" 1>&6
1180 echo "configure:1181: checking for ${OPENH323MAKEDIR}/../../include/openh323/openh323buildopts.h" >&5
1181 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1182   echo $ac_n "(cached) $ac_c" 1>&6
1183 else
1184   if test "$cross_compiling" = yes; then
1185     { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1186 else
1187   if test -r ${OPENH323MAKEDIR}/../../include/openh323/openh323buildopts.h; then
1188     eval "ac_cv_file_$ac_safe=yes"
1189   else
1190     eval "ac_cv_file_$ac_safe=no"
1191   fi
1192 fi
1193 fi
1194 if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1195   echo "$ac_t""yes" 1>&6
1196   HAS_OPENH323_VERSIONFILE=1
1197 else
1198   echo "$ac_t""no" 1>&6
1199
1200 fi
1201
1202       if test "${HAS_OPENH323_VERSIONFILE:-unset}" != "unset"; then
1203         OPENH323_VERSION_FILE=${OPENH323MAKEDIR}/../../include/openh323/openh323buildopts.h
1204         OPENH323_MAJOR_VERSION=`cat ${OPENH323_VERSION_FILE} | grep OPENH323_MAJOR | cut -f2 -d' '`
1205         OPENH323_MINOR_VERSION=`cat ${OPENH323_VERSION_FILE} | grep OPENH323_MINOR | cut -f2 -d' '`
1206         OPENH323_BUILD_NUMBER=`cat ${OPENH323_VERSION_FILE} | grep "OPENH323_BUILD " | cut -f2 -d' '`
1207       fi
1208     fi
1209   fi
1210 fi
1211 if test "${HAS_OPENH323_VERSIONFILE:-unset}" != "unset"; then
1212   if test "${OPENH323_MAJOR_VERSION}" = ""; then
1213     echo "Error: Could not determine OpenH323 version"
1214     exit
1215   fi
1216   OPENH323_VERSION="${OPENH323_MAJOR_VERSION}.${OPENH323_MINOR_VERSION}.${OPENH323_BUILD_NUMBER}"
1217   echo "OpenH323 version is ${OPENH323_VERSION}"
1218 else
1219   echo "Error: Could not determine OpenH323 version"
1220   exit
1221 fi
1222
1223 if test ${OPENH323_MAJOR_VERSION} -lt 1; then
1224   echo "Error: at leat OpenH323 version 1.14.4.2 (Pandora) required"
1225   exit
1226 fi
1227 if test ${OPENH323_MAJOR_VERSION} -eq 1; then
1228   if test ${OPENH323_MINOR_VERSION} -lt 14; then
1229     echo "Error: at leat OpenH323 version 1.14.4.2 (Pandora) required"
1230     exit
1231   elif test ${OPENH323_MINOR_VERSION} -eq 14; then
1232     if test ${OPENH323_BUILD_NUMBER} -lt 4; then
1233       echo "Error: at leat OpenH323 version 1.14.4.2 (Pandora) required"
1234       exit
1235     fi
1236   fi
1237 fi
1238
1239
1240
1241 if test "x$prefix" = "xNONE"; then
1242    INSTALLPREFIX="/usr/local"
1243 else
1244    INSTALLPREFIX="${prefix}"
1245 fi
1246
1247
1248
1249 # Check whether --enable-radius or --disable-radius was given.
1250 if test "${enable_radius+set}" = set; then
1251   enableval="$enable_radius"
1252    radius="${enableval}" 
1253 else
1254   radius="yes" 
1255
1256 fi
1257
1258         
1259 if test "x${radius}" != "xno" ; then     
1260    HAS_RADIUS=1
1261    STDCCFLAGS="-DHAS_RADIUS=1 $STDCCFLAGS"
1262    SOURCES="$SOURCES radproto.cxx radauth.cxx radacct.cxx"
1263    HEADERS="$HEADERS radproto.h radauth.h radacct.h"
1264    echo "RADIUS support enabled"
1265 else
1266    echo "RADIUS support disabled"
1267    HAS_RADIUS=0
1268 fi
1269
1270
1271 # Check whether --with-large-fdset or --without-large-fdset was given.
1272 if test "${with_large_fdset+set}" = set; then
1273   withval="$with_large_fdset"
1274    largefdset="$withval" 
1275 else
1276    largefdset="no" 
1277
1278 fi
1279
1280
1281 if test "x${largefdset}" != "xno" ; then     
1282         if test "x${largefdset}" = "xyes"; then
1283                 LARGE_FDSET=8192
1284         else
1285                 LARGE_FDSET=${largefdset}
1286         fi
1287         STDCCFLAGS="-DLARGE_FDSET=${LARGE_FDSET} $STDCCFLAGS"
1288         echo "LARGE FDSET support enabled"
1289 else
1290         echo "LARGE FDSET support disabled"
1291 fi
1292
1293
1294 # Check whether --enable-mysql or --disable-mysql was given.
1295 if test "${enable_mysql+set}" = set; then
1296   enableval="$enable_mysql"
1297    mysql="${enableval}" 
1298 else
1299    mysql="yes" 
1300
1301 fi
1302
1303
1304 # Check whether --with-mysql-include-dir or --without-mysql-include-dir was given.
1305 if test "${with_mysql_include_dir+set}" = set; then
1306   withval="$with_mysql_include_dir"
1307    mysql_include_dir="$withval" 
1308
1309 fi
1310
1311
1312 # Check whether --with-mysql-lib-dir or --without-mysql-lib-dir was given.
1313 if test "${with_mysql_lib_dir+set}" = set; then
1314   withval="$with_mysql_lib_dir"
1315    mysql_lib_dir="$withval" 
1316
1317 fi
1318
1319
1320 # Check whether --with-mysql-dir or --without-mysql-dir was given.
1321 if test "${with_mysql_dir+set}" = set; then
1322   withval="$with_mysql_dir"
1323    mysql_lib_dir="$withval/lib/mysql"
1324   mysql_include_dir="$withval/include/mysql"
1325
1326
1327 fi
1328
1329
1330 if test "x${mysql}" != "xno"; then
1331
1332         echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
1333 echo "configure:1334: checking for compress in -lz" >&5
1334 ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'`
1335 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1336   echo $ac_n "(cached) $ac_c" 1>&6
1337 else
1338   ac_save_LIBS="$LIBS"
1339 LIBS="-lz  $LIBS"
1340 cat > conftest.$ac_ext <<EOF
1341 #line 1342 "configure"
1342 #include "confdefs.h"
1343 /* Override any gcc2 internal prototype to avoid an error.  */
1344 /* We use char because int might match the return type of a gcc2
1345     builtin and then its argument prototype would still apply.  */
1346 char compress();
1347
1348 int main() {
1349 compress()
1350 ; return 0; }
1351 EOF
1352 if { (eval echo configure:1353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1353   rm -rf conftest*
1354   eval "ac_cv_lib_$ac_lib_var=yes"
1355 else
1356   echo "configure: failed program was:" >&5
1357   cat conftest.$ac_ext >&5
1358   rm -rf conftest*
1359   eval "ac_cv_lib_$ac_lib_var=no"
1360 fi
1361 rm -f conftest*
1362 LIBS="$ac_save_LIBS"
1363
1364 fi
1365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1366   echo "$ac_t""yes" 1>&6
1367   MYSQL_LIBS=" -lz"
1368 else
1369   echo "$ac_t""no" 1>&6
1370 fi
1371
1372         echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
1373 echo "configure:1374: checking for compress in -lz" >&5
1374 ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'`
1375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1376   echo $ac_n "(cached) $ac_c" 1>&6
1377 else
1378   ac_save_LIBS="$LIBS"
1379 LIBS="-lz  $LIBS"
1380 cat > conftest.$ac_ext <<EOF
1381 #line 1382 "configure"
1382 #include "confdefs.h"
1383 /* Override any gcc2 internal prototype to avoid an error.  */
1384 /* We use char because int might match the return type of a gcc2
1385     builtin and then its argument prototype would still apply.  */
1386 char compress();
1387
1388 int main() {
1389 compress()
1390 ; return 0; }
1391 EOF
1392 if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1393   rm -rf conftest*
1394   eval "ac_cv_lib_$ac_lib_var=yes"
1395 else
1396   echo "configure: failed program was:" >&5
1397   cat conftest.$ac_ext >&5
1398   rm -rf conftest*
1399   eval "ac_cv_lib_$ac_lib_var=no"
1400 fi
1401 rm -f conftest*
1402 LIBS="$ac_save_LIBS"
1403
1404 fi
1405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1406   echo "$ac_t""yes" 1>&6
1407   MYSQL_LIBS+=" -lm"
1408 else
1409   echo "$ac_t""no" 1>&6
1410 fi
1411
1412
1413         echo $ac_n "checking for mysql.h""... $ac_c" 1>&6
1414 echo "configure:1415: checking for mysql.h" >&5
1415
1416         cat > conftest.$ac_ext <<EOF
1417 #line 1418 "configure"
1418 #include "confdefs.h"
1419 #include <mysql.h>
1420 int main() {
1421 int a = 1;
1422 ; return 0; }
1423 EOF
1424 if { (eval echo configure:1425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1425   rm -rf conftest*
1426   MYSQL_INCLUDE=" "
1427 else
1428   echo "configure: failed program was:" >&5
1429   cat conftest.$ac_ext >&5
1430   rm -rf conftest*
1431   MYSQL_INCLUDE=
1432         
1433 fi
1434 rm -f conftest*
1435
1436         if test "x$MYSQL_INCLUDE" = "x"; then
1437                 old_CFLAGS="$CFLAGS"
1438
1439                 for try in $mysql_include_dir /usr/include/mysql /usr/local/include/mysql /usr/local/mysql/include/mysql; do
1440                         if test -d $try; then
1441                                 CFLAGS="$old_CFLAGS -I$try"
1442                                 cat > conftest.$ac_ext <<EOF
1443 #line 1444 "configure"
1444 #include "confdefs.h"
1445 #include <mysql.h>
1446 int main() {
1447 int a = 1;
1448 ; return 0; }
1449 EOF
1450 if { (eval echo configure:1451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1451   rm -rf conftest*
1452   MYSQL_INCLUDE="-I$try"
1453 else
1454   echo "configure: failed program was:" >&5
1455   cat conftest.$ac_ext >&5
1456   rm -rf conftest*
1457   MYSQL_INCLUDE=
1458                                 
1459 fi
1460 rm -f conftest*
1461                                 if test "x$MYSQL_INCLUDE" != "x"; then
1462                                         break;
1463                                 fi
1464                         fi
1465                 done
1466                 CFLAGS="$old_CFLAGS"
1467         fi
1468
1469         if test "x$MYSQL_INCLUDE" = "x"; then
1470                 echo "$ac_t""no" 1>&6
1471                 echo "configure: warning: mysql headers not found. Use --with-mysql-include-dir=<path>" 1>&2
1472                 mysql="no"
1473         else
1474                 sql_mysql_cflags="${sql_mysql_cflags} ${MYSQL_INCLUDE}"
1475                 echo "$ac_t""yes" 1>&6
1476
1477                 echo $ac_n "checking for mysql_init in -lmysqlclient""... $ac_c" 1>&6
1478 echo "configure:1479: checking for mysql_init in -lmysqlclient" >&5
1479
1480                 old_LIBS="$LIBS"
1481
1482                 for try in $mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql; do
1483                         if test -d $try; then
1484                                 LIBS="$old_LIBS -L$try -lmysqlclient ${MYSQL_LIBS}"
1485                                 cat > conftest.$ac_ext <<EOF
1486 #line 1487 "configure"
1487 #include "confdefs.h"
1488 extern char mysql_init();
1489 int main() {
1490 mysql_init()
1491 ; return 0; }
1492 EOF
1493 if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1494   rm -rf conftest*
1495    MYSQL_LIBS="-lmysqlclient ${MYSQL_LIBS}"
1496                                           MYSQL_LDFLAGS="-L$try"
1497                                         
1498                                 
1499 else
1500   echo "configure: failed program was:" >&5
1501   cat conftest.$ac_ext >&5
1502 fi
1503 rm -f conftest*
1504                                 if test "x$MYSQL_LDFLAGS" != "x"; then
1505                                         break;
1506                                 fi
1507                         fi
1508                 done
1509                 LIBS="$old_LIBS"
1510
1511                                                 if test "x$MYSQL_LDFLAGS" = "x"; then
1512                         echo "$ac_t""no" 1>&6
1513                         MYSQL_INCLUDE=
1514                         echo "configure: warning: mysql lib not found. Use --with-mysql-lib-dir=<path>" 1>&2
1515                         mysql="no"
1516                 else
1517                         echo "$ac_t""yes" 1>&6 
1518                         sql_mysql_ldflags="$sql_mysql_ldflags $MYSQL_LDFLAGS"
1519                 fi
1520         fi
1521
1522         sql_mysql_ldflags="$sql_mysql_ldflags $LIBS"
1523
1524         if test "x$mysql" = "xno"; then
1525                 echo "configure: warning: MySQL disabled" 1>&2
1526         fi
1527 else
1528         mysql="no"
1529 fi
1530
1531 if test "x$mysql" != "xno"; then
1532         HAS_MYSQL=1
1533         SOURCES="$SOURCES gksql_mysql.cxx"
1534         STDCCFLAGS="${sql_mysql_cflags} -DHAS_MYSQL=1 $STDCCFLAGS"
1535         LDFLAGS="$MYSQL_LDFLAGS $LDFLAGS"
1536         ENDLDLIBS="$MYSQL_LIBS $ENDLDLIBS"
1537     echo "MySQL support enabled"
1538 else
1539     echo "MySQL support disabled"
1540         HAS_MYSQL=0
1541 fi
1542
1543
1544 # Check whether --enable-pgsql or --disable-pgsql was given.
1545 if test "${enable_pgsql+set}" = set; then
1546   enableval="$enable_pgsql"
1547    pgsql="${enableval}" 
1548 else
1549    pgsql="yes" 
1550
1551 fi
1552
1553
1554 # Check whether --with-pgsql-include-dir or --without-pgsql-include-dir was given.
1555 if test "${with_pgsql_include_dir+set}" = set; then
1556   withval="$with_pgsql_include_dir"
1557    pgsql_include_dir="$withval" 
1558
1559 fi
1560
1561
1562 # Check whether --with-pgsql-lib-dir or --without-pgsql-lib-dir was given.
1563 if test "${with_pgsql_lib_dir+set}" = set; then
1564   withval="$with_pgsql_lib_dir"
1565    pgsql_lib_dir="$withval" 
1566
1567 fi
1568
1569
1570 # Check whether --with-pgsql-dir or --without-pgsql-dir was given.
1571 if test "${with_pgsql_dir+set}" = set; then
1572   withval="$with_pgsql_dir"
1573    pgsql_lib_dir="$withval/lib"
1574   pgsql_include_dir="$withval/include"
1575
1576
1577 fi
1578
1579
1580 if test "x${pgsql}" != "xno"; then
1581
1582         echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
1583 echo "configure:1584: checking for libpq-fe.h" >&5
1584
1585         cat > conftest.$ac_ext <<EOF
1586 #line 1587 "configure"
1587 #include "confdefs.h"
1588 #include <libpq-fe.h>
1589 int main() {
1590 int a = 1;
1591 ; return 0; }
1592 EOF
1593 if { (eval echo configure:1594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1594   rm -rf conftest*
1595   PGSQL_INCLUDE=" "
1596 else
1597   echo "configure: failed program was:" >&5
1598   cat conftest.$ac_ext >&5
1599   rm -rf conftest*
1600   PGSQL_INCLUDE=
1601         
1602 fi
1603 rm -f conftest*
1604
1605         if test "x$PGSQL_INCLUDE" = "x"; then
1606                 old_CFLAGS="$CFLAGS"
1607
1608                 for try in /usr/include/pgsql /usr/local/include /usr/local/include/pgsql /usr/local/pgsql/include $pgsql_include_dir; do
1609                         if test -d $try; then
1610                                 CFLAGS="$old_CFLAGS -I$try"
1611                                 cat > conftest.$ac_ext <<EOF
1612 #line 1613 "configure"
1613 #include "confdefs.h"
1614 #include <libpq-fe.h>
1615 int main() {
1616 int a = 1;
1617 ; return 0; }
1618 EOF
1619 if { (eval echo configure:1620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1620   rm -rf conftest*
1621   PGSQL_INCLUDE="-I$try"
1622 else
1623   echo "configure: failed program was:" >&5
1624   cat conftest.$ac_ext >&5
1625   rm -rf conftest*
1626   PGSQL_INCLUDE=
1627                                 
1628 fi
1629 rm -f conftest*
1630                                 if test "x$PGSQL_INCLUDE" != "x"; then
1631                                         break;
1632                                 fi
1633                         fi
1634                 done
1635                 CFLAGS="$old_CFLAGS"
1636         fi
1637
1638         if test "x$PGSQL_INCLUDE" = "x"; then
1639                 echo "$ac_t""no" 1>&6
1640                 echo "configure: warning: pgsql headers not found. Use --with-pgsql-include-dir=<path>" 1>&2
1641                 pgsql="no"
1642         else
1643                 sql_pgsql_cflags="${sql_pgsql_cflags} ${PGSQL_INCLUDE}"
1644                 echo "$ac_t""yes" 1>&6
1645
1646                 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
1647 echo "configure:1648: checking for PQconnectdb in -lpq" >&5
1648
1649                 old_LIBS="$LIBS"
1650
1651                 for try in /usr/lib /usr/local/lib /usr/local/pgsql/lib $pgsql_lib_dir; do
1652                         if test -d $try; then
1653                                 LIBS="$old_LIBS -L$try -lpq -lcrypt ${PGSQL_LIBS}"
1654                                 cat > conftest.$ac_ext <<EOF
1655 #line 1656 "configure"
1656 #include "confdefs.h"
1657 extern char PQconnectdb();
1658 int main() {
1659 PQconnectdb
1660 ; return 0; }
1661 EOF
1662 if { (eval echo configure:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1663   rm -rf conftest*
1664    PGSQL_LIBS="-lpq -lcrypt ${PGSQL_LIBS}"
1665                                           PGSQL_LDFLAGS="-L$try"
1666                                         
1667                                 
1668 else
1669   echo "configure: failed program was:" >&5
1670   cat conftest.$ac_ext >&5
1671 fi
1672 rm -f conftest*
1673                                 if test "x$PGSQL_LDFLAGS" != "x"; then
1674                                         break;
1675                                 fi
1676                         fi
1677                 done
1678                 LIBS="$old_LIBS"
1679
1680                                                 if test "x$PGSQL_LDFLAGS" = "x"; then
1681                         echo "$ac_t""no" 1>&6
1682                         PGSQL_INCLUDE=
1683                         echo "configure: warning: pgsql lib not found. Use --with-pgsql-lib-dir=<path>" 1>&2
1684                         pgsql="no"
1685                 else
1686                         echo "$ac_t""yes" 1>&6 
1687                         sql_pgsql_ldflags="$sql_pgsql_ldflags $PGSQL_LDFLAGS"
1688                 fi
1689         fi
1690
1691         sql_pgsql_ldflags="$sql_pgsql_ldflags $LIBS"
1692
1693         if test "x$pgsql" = "xno"; then
1694                 echo "configure: warning: PostgreSQL disabled" 1>&2
1695         fi
1696 else
1697         pgsql="no"
1698 fi
1699
1700 if test "x$pgsql" != "xno"; then
1701         HAS_PGSQL=1
1702         SOURCES="$SOURCES gksql_pgsql.cxx"
1703         STDCCFLAGS="${sql_pgsql_cflags} -DHAS_PGSQL=1 $STDCCFLAGS"
1704         LDFLAGS="$PGSQL_LDFLAGS $LDFLAGS"
1705         ENDLDLIBS="$PGSQL_LIBS $ENDLDLIBS"
1706     echo "PostgreSQL support enabled"
1707 else
1708     echo "PostgreSQL support disabled"
1709         HAS_PGSQL=0
1710 fi
1711
1712
1713 if test "x$pgsql" != "xno" -o "x$mysql" != "xno"; then
1714         SOURCES="$SOURCES sqlauth.cxx sqlacct.cxx gksql.cxx"
1715         HEADERS="$HEADERS sqlacct.h gksql.h"
1716 fi
1717
1718 # Check whether --enable-firebird or --disable-firebird was given.
1719 if test "${enable_firebird+set}" = set; then
1720   enableval="$enable_firebird"
1721    firebird="${enableval}" 
1722 else
1723    firebird="yes" 
1724
1725 fi
1726
1727
1728 # Check whether --with-firebird-include-dir or --without-firebird-include-dir was given.
1729 if test "${with_firebird_include_dir+set}" = set; then
1730   withval="$with_firebird_include_dir"
1731    firebird_include_dir="$withval" 
1732
1733 fi
1734
1735
1736 # Check whether --with-firebird-lib-dir or --without-firebird-lib-dir was given.
1737 if test "${with_firebird_lib_dir+set}" = set; then
1738   withval="$with_firebird_lib_dir"
1739    firebird_lib_dir="$withval" 
1740
1741 fi
1742
1743
1744 # Check whether --with-firebird-dir or --without-firebird-dir was given.
1745 if test "${with_firebird_dir+set}" = set; then
1746   withval="$with_firebird_dir"
1747    firebird_lib_dir="$withval/lib"
1748   firebird_include_dir="$withval/include"
1749
1750
1751 fi
1752
1753
1754 if test "x${firebird}" != "xno"; then
1755
1756         echo $ac_n "checking for ibase.h""... $ac_c" 1>&6
1757 echo "configure:1758: checking for ibase.h" >&5
1758
1759         cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1762 #include <ibase.h>
1763 int main() {
1764 int a = 1;
1765 ; return 0; }
1766 EOF
1767 if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1768   rm -rf conftest*
1769   FIREBIRD_INCLUDE=" "
1770 else
1771   echo "configure: failed program was:" >&5
1772   cat conftest.$ac_ext >&5
1773   rm -rf conftest*
1774   FIREBIRD_INCLUDE=
1775         
1776 fi
1777 rm -f conftest*
1778
1779         if test "x$FIREBIRD_INCLUDE" = "x"; then
1780                 old_CFLAGS="$CFLAGS"
1781
1782                 for try in /usr/include/firebird /usr/local/include/firebird /usr/local/firebird/include $firebird_include_dir; do
1783                         if test -d $try; then
1784                                 CFLAGS="$old_CFLAGS -I$try"
1785                                 cat > conftest.$ac_ext <<EOF
1786 #line 1787 "configure"
1787 #include "confdefs.h"
1788 #include <ibase.h>
1789 int main() {
1790 int a = 1;
1791 ; return 0; }
1792 EOF
1793 if { (eval echo configure:1794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1794   rm -rf conftest*
1795   FIREBIRD_INCLUDE="-I$try"
1796 else
1797   echo "configure: failed program was:" >&5
1798   cat conftest.$ac_ext >&5
1799   rm -rf conftest*
1800   FIREBIRD_INCLUDE=
1801                                 
1802 fi
1803 rm -f conftest*
1804                                 if test "x$FIREBIRD_INCLUDE" != "x"; then
1805                                         break;
1806                                 fi
1807                         fi
1808                 done
1809                 CFLAGS="$old_CFLAGS"
1810         fi
1811
1812         if test "x$FIREBIRD_INCLUDE" = "x"; then
1813                 echo "$ac_t""no" 1>&6
1814                 echo "configure: warning: Firebird headers not found. Use --with-firebird-include-dir=<path>" 1>&2
1815                 firebird="no"
1816         else
1817                 sql_firebird_cflags="${sql_firebird_cflags} ${FIREBIRD_INCLUDE}"
1818                 echo "$ac_t""yes" 1>&6
1819
1820                 echo $ac_n "checking for isc_attach_database in -lfbclient""... $ac_c" 1>&6
1821 echo "configure:1822: checking for isc_attach_database in -lfbclient" >&5
1822
1823                 old_LIBS="$LIBS"
1824
1825                 for try in /usr/lib /usr/lib/firebird /usr/local/lib /usr/local/lib/firebird /usr/local/firebird/lib $firebird_lib_dir; do
1826                         if test -d $try; then
1827                                 LIBS="$old_LIBS -L$try -lfbclient ${FIREBIRD_LIBS}"
1828                                 cat > conftest.$ac_ext <<EOF
1829 #line 1830 "configure"
1830 #include "confdefs.h"
1831 extern char isc_attach_database();
1832 int main() {
1833 isc_attach_database()
1834 ; return 0; }
1835 EOF
1836 if { (eval echo configure:1837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1837   rm -rf conftest*
1838    FIREBIRD_LIBS="-lfbclient ${FIREBIRD_LIBS}"
1839                                           FIREBIRD_LDFLAGS="-L$try"
1840                                         
1841                                 
1842 else
1843   echo "configure: failed program was:" >&5
1844   cat conftest.$ac_ext >&5
1845 fi
1846 rm -f conftest*
1847                                 if test "x$FIREBIRD_LDFLAGS" != "x"; then
1848                                         break;
1849                                 fi
1850                         fi
1851                 done
1852                 LIBS="$old_LIBS"
1853
1854                                                 if test "x$FIREBIRD_LDFLAGS" = "x"; then
1855                         echo "$ac_t""no" 1>&6
1856                         FIREBIRD_INCLUDE=
1857                         echo "configure: warning: Firebird lib not found. Use --with-firebird-lib-dir=<path>" 1>&2
1858                         firebird="no"
1859                 else
1860                         echo "$ac_t""yes" 1>&6 
1861                         sql_firebird_ldflags="$sql_firebird_ldflags $FIREBIRD_LDFLAGS"
1862                 fi
1863         fi
1864
1865         sql_firebird_ldflags="$sql_firebird_ldflags $LIBS"
1866
1867         if test "x$firebird" = "xno"; then
1868                 echo "configure: warning: Firebird disabled" 1>&2
1869         fi
1870 else
1871         firebird="no"
1872 fi
1873
1874 if test "x$firebird" != "xno"; then
1875         HAS_FIREBIRD=1
1876         SOURCES="$SOURCES gksql_firebird.cxx"
1877         STDCCFLAGS="${sql_firebird_cflags} -DHAS_FIREBIRD=1 $STDCCFLAGS"
1878         LDFLAGS="$FIREBIRD_LDFLAGS $LDFLAGS"
1879         ENDLDLIBS="$FIREBIRD_LIBS $ENDLDLIBS"
1880     echo "Firebird support enabled"
1881 else
1882     echo "Firebird support disabled"
1883         HAS_FIREBIRD=0
1884 fi
1885
1886
1887
1888 GNUGK_MAJOR_VERSION=`cat version.h | grep "define GNUGK_MAJOR_VERSION" | cut -f4 -d' '`
1889 GNUGK_MINOR_VERSION=`cat version.h | grep "define GNUGK_MINOR_VERSION" | cut -f4 -d' '`
1890 GNUGK_BUILD_NUMBER=`cat version.h | grep "define GNUGK_BUILD_NUMBER" | cut -f4 -d' '`
1891 GNUGK_BUILD_TYPE=`cat version.h | grep "define GNUGK_BUILD_TYPE" | cut -f4 -d' '`
1892 GNUGK_VERSION="${GNUGK_MAJOR_VERSION}.${GNUGK_MINOR_VERSION}.${GNUGK_BUILD_NUMBER}"
1893 echo "GNU Gatkeeper version is ${GNUGK_VERSION}"
1894
1895
1896
1897
1898
1899
1900 MANUFACTURER="GNU"
1901 PROGRAMNAME="Gatekeeper"
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916 trap '' 1 2 15
1917 cat > confcache <<\EOF
1918 # This file is a shell script that caches the results of configure
1919 # tests run on this system so they can be shared between configure
1920 # scripts and configure runs.  It is not useful on other systems.
1921 # If it contains results you don't want to keep, you may remove or edit it.
1922 #
1923 # By default, configure uses ./config.cache as the cache file,
1924 # creating it if it does not exist already.  You can give configure
1925 # the --cache-file=FILE option to use a different cache file; that is
1926 # what configure does when it calls configure scripts in
1927 # subdirectories, so they share the cache.
1928 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1929 # config.status only pays attention to the cache file if you give it the
1930 # --recheck option to rerun configure.
1931 #
1932 EOF
1933 # The following way of writing the cache mishandles newlines in values,
1934 # but we know of no workaround that is simple, portable, and efficient.
1935 # So, don't put newlines in cache variables' values.
1936 # Ultrix sh set writes to stderr and can't be redirected directly,
1937 # and sets the high bit in the cache file unless we assign to the vars.
1938 (set) 2>&1 |
1939   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1940   *ac_space=\ *)
1941     # `set' does not quote correctly, so add quotes (double-quote substitution
1942     # turns \\\\ into \\, and sed turns \\ into \).
1943     sed -n \
1944       -e "s/'/'\\\\''/g" \
1945       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1946     ;;
1947   *)
1948     # `set' quotes correctly as required by POSIX, so do not add quotes.
1949     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1950     ;;
1951   esac >> confcache
1952 if cmp -s $cache_file confcache; then
1953   :
1954 else
1955   if test -w $cache_file; then
1956     echo "updating cache $cache_file"
1957     cat confcache > $cache_file
1958   else
1959     echo "not updating unwritable cache $cache_file"
1960   fi
1961 fi
1962 rm -f confcache
1963
1964 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1965
1966 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1967 # Let make expand exec_prefix.
1968 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1969
1970 # Any assignment to VPATH causes Sun make to only execute
1971 # the first set of double-colon rules, so remove it if not needed.
1972 # If there is a colon in the path, we need to keep it.
1973 if test "x$srcdir" = x.; then
1974   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1975 fi
1976
1977 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1978
1979 # Transform confdefs.h into DEFS.
1980 # Protect against shell expansion while executing Makefile rules.
1981 # Protect against Makefile macro expansion.
1982 cat > conftest.defs <<\EOF
1983 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1984 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1985 s%\[%\\&%g
1986 s%\]%\\&%g
1987 s%\$%$$%g
1988 EOF
1989 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1990 rm -f conftest.defs
1991
1992
1993 # Without the "./", some shells look in PATH for config.status.
1994 : ${CONFIG_STATUS=./config.status}
1995
1996 echo creating $CONFIG_STATUS
1997 rm -f $CONFIG_STATUS
1998 cat > $CONFIG_STATUS <<EOF
1999 #! /bin/sh
2000 # Generated automatically by configure.
2001 # Run this file to recreate the current configuration.
2002 # This directory was configured as follows,
2003 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2004 #
2005 # $0 $ac_configure_args
2006 #
2007 # Compiler output produced by configure, useful for debugging
2008 # configure, is in ./config.log if it exists.
2009
2010 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2011 for ac_option
2012 do
2013   case "\$ac_option" in
2014   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2015     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2016     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2017   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2018     echo "$CONFIG_STATUS generated by autoconf version 2.13"
2019     exit 0 ;;
2020   -help | --help | --hel | --he | --h)
2021     echo "\$ac_cs_usage"; exit 0 ;;
2022   *) echo "\$ac_cs_usage"; exit 1 ;;
2023   esac
2024 done
2025
2026 ac_given_srcdir=$srcdir
2027
2028 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2029 EOF
2030 cat >> $CONFIG_STATUS <<EOF
2031
2032 # Protect against being on the right side of a sed subst in config.status.
2033 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2034  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2035 $ac_vpsub
2036 $extrasub
2037 s%@SHELL@%$SHELL%g
2038 s%@CFLAGS@%$CFLAGS%g
2039 s%@CPPFLAGS@%$CPPFLAGS%g
2040 s%@CXXFLAGS@%$CXXFLAGS%g
2041 s%@FFLAGS@%$FFLAGS%g
2042 s%@DEFS@%$DEFS%g
2043 s%@LDFLAGS@%$LDFLAGS%g
2044 s%@LIBS@%$LIBS%g
2045 s%@exec_prefix@%$exec_prefix%g
2046 s%@prefix@%$prefix%g
2047 s%@program_transform_name@%$program_transform_name%g
2048 s%@bindir@%$bindir%g
2049 s%@sbindir@%$sbindir%g
2050 s%@libexecdir@%$libexecdir%g
2051 s%@datadir@%$datadir%g
2052 s%@sysconfdir@%$sysconfdir%g
2053 s%@sharedstatedir@%$sharedstatedir%g
2054 s%@localstatedir@%$localstatedir%g
2055 s%@libdir@%$libdir%g
2056 s%@includedir@%$includedir%g
2057 s%@oldincludedir@%$oldincludedir%g
2058 s%@infodir@%$infodir%g
2059 s%@mandir@%$mandir%g
2060 s%@CC@%$CC%g
2061 s%@CXX@%$CXX%g
2062 s%@PWLIBDIR@%$PWLIBDIR%g
2063 s%@PWLIB_VERSION@%$PWLIB_VERSION%g
2064 s%@OPENH323DIR@%$OPENH323DIR%g
2065 s%@OPENH323MAKEDIR@%$OPENH323MAKEDIR%g
2066 s%@OPENH323_VERSION@%$OPENH323_VERSION%g
2067 s%@INSTALLPREFIX@%$INSTALLPREFIX%g
2068 s%@HAS_RADIUS@%$HAS_RADIUS%g
2069 s%@LARGE_FDSET@%$LARGE_FDSET%g
2070 s%@HAS_MYSQL@%$HAS_MYSQL%g
2071 s%@HAS_PGSQL@%$HAS_PGSQL%g
2072 s%@HAS_FIREBIRD@%$HAS_FIREBIRD%g
2073 s%@GNUGK_VERSION@%$GNUGK_VERSION%g
2074 s%@GNUGK_MAJOR_VERSION@%$GNUGK_MAJOR_VERSION%g
2075 s%@GNUGK_MINOR_VERSION@%$GNUGK_MINOR_VERSION%g
2076 s%@GNUGK_BUILD_NUMBER@%$GNUGK_BUILD_NUMBER%g
2077 s%@GNUGK_BUILD_TYPE@%$GNUGK_BUILD_TYPE%g
2078 s%@MANUFACTURER@%$MANUFACTURER%g
2079 s%@PROGRAMNAME@%$PROGRAMNAME%g
2080 s%@STDCCFLAGS@%$STDCCFLAGS%g
2081 s%@ENDLDLIBS@%$ENDLDLIBS%g
2082 s%@ENDLDFLAGS@%$ENDLDFLAGS%g
2083 s%@SOURCES@%$SOURCES%g
2084 s%@HEADERS@%$HEADERS%g
2085 s%@HAS_MSG_NOSIGNAL@%$HAS_MSG_NOSIGNAL%g
2086 s%@NEEDOPENH323PREFIX@%$NEEDOPENH323PREFIX%g
2087 s%@OPENH323INSTALLPREFIX@%$OPENH323INSTALLPREFIX%g
2088
2089 CEOF
2090 EOF
2091
2092 cat >> $CONFIG_STATUS <<\EOF
2093
2094 # Split the substitutions into bite-sized pieces for seds with
2095 # small command number limits, like on Digital OSF/1 and HP-UX.
2096 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2097 ac_file=1 # Number of current file.
2098 ac_beg=1 # First line for current file.
2099 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2100 ac_more_lines=:
2101 ac_sed_cmds=""
2102 while $ac_more_lines; do
2103   if test $ac_beg -gt 1; then
2104     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2105   else
2106     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2107   fi
2108   if test ! -s conftest.s$ac_file; then
2109     ac_more_lines=false
2110     rm -f conftest.s$ac_file
2111   else
2112     if test -z "$ac_sed_cmds"; then
2113       ac_sed_cmds="sed -f conftest.s$ac_file"
2114     else
2115       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2116     fi
2117     ac_file=`expr $ac_file + 1`
2118     ac_beg=$ac_end
2119     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2120   fi
2121 done
2122 if test -z "$ac_sed_cmds"; then
2123   ac_sed_cmds=cat
2124 fi
2125 EOF
2126
2127 cat >> $CONFIG_STATUS <<EOF
2128
2129 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2130 EOF
2131 cat >> $CONFIG_STATUS <<\EOF
2132 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2133   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2134   case "$ac_file" in
2135   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2136        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2137   *) ac_file_in="${ac_file}.in" ;;
2138   esac
2139
2140   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2141
2142   # Remove last slash and all that follows it.  Not all systems have dirname.
2143   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2144   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2145     # The file is in a subdirectory.
2146     test ! -d "$ac_dir" && mkdir "$ac_dir"
2147     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2148     # A "../" for each directory in $ac_dir_suffix.
2149     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2150   else
2151     ac_dir_suffix= ac_dots=
2152   fi
2153
2154   case "$ac_given_srcdir" in
2155   .)  srcdir=.
2156       if test -z "$ac_dots"; then top_srcdir=.
2157       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2158   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2159   *) # Relative path.
2160     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2161     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2162   esac
2163
2164
2165   echo creating "$ac_file"
2166   rm -f "$ac_file"
2167   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2168   case "$ac_file" in
2169   *Makefile*) ac_comsub="1i\\
2170 # $configure_input" ;;
2171   *) ac_comsub= ;;
2172   esac
2173
2174   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2175   sed -e "$ac_comsub
2176 s%@configure_input@%$configure_input%g
2177 s%@srcdir@%$srcdir%g
2178 s%@top_srcdir@%$top_srcdir%g
2179 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2180 fi; done
2181 rm -f conftest.s*
2182
2183 EOF
2184 cat >> $CONFIG_STATUS <<EOF
2185
2186 EOF
2187 cat >> $CONFIG_STATUS <<\EOF
2188
2189 exit 0
2190 EOF
2191 chmod +x $CONFIG_STATUS
2192 rm -fr confdefs* $ac_clean_files
2193 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2194
2195