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