| 1 | #! /bin/sh
|
|---|
| 2 |
|
|---|
| 3 | # Guess values for system-dependent variables and create Makefiles.
|
|---|
| 4 | # Generated automatically using autoconf version 2.13.20030927
|
|---|
| 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 |
|
|---|
| 15 | # Initialize some variables set by options.
|
|---|
| 16 | # The variables have the same names as the options, with
|
|---|
| 17 | # dashes changed to underlines.
|
|---|
| 18 | build=NONE
|
|---|
| 19 | cache_file=./config.cache
|
|---|
| 20 | exec_prefix=NONE
|
|---|
| 21 | host=NONE
|
|---|
| 22 | no_create=
|
|---|
| 23 | nonopt=NONE
|
|---|
| 24 | no_recursion=
|
|---|
| 25 | prefix=NONE
|
|---|
| 26 | program_prefix=NONE
|
|---|
| 27 | program_suffix=NONE
|
|---|
| 28 | program_transform_name=s,x,x,
|
|---|
| 29 | silent=
|
|---|
| 30 | site=
|
|---|
| 31 | srcdir=
|
|---|
| 32 | target=NONE
|
|---|
| 33 | verbose=
|
|---|
| 34 | x_includes=NONE
|
|---|
| 35 | x_libraries=NONE
|
|---|
| 36 | bindir='${exec_prefix}/bin'
|
|---|
| 37 | sbindir='${exec_prefix}/sbin'
|
|---|
| 38 | libexecdir='${exec_prefix}/libexec'
|
|---|
| 39 | datadir='${prefix}/share'
|
|---|
| 40 | sysconfdir='${prefix}/etc'
|
|---|
| 41 | sharedstatedir='${prefix}/com'
|
|---|
| 42 | localstatedir='${prefix}/var'
|
|---|
| 43 | libdir='${exec_prefix}/lib'
|
|---|
| 44 | includedir='${prefix}/include'
|
|---|
| 45 | oldincludedir='/usr/include'
|
|---|
| 46 | infodir='${prefix}/info'
|
|---|
| 47 | mandir='${prefix}/man'
|
|---|
| 48 |
|
|---|
| 49 | # Initialize some other variables.
|
|---|
| 50 | subdirs=
|
|---|
| 51 | MFLAGS= MAKEFLAGS=
|
|---|
| 52 | SHELL=${CONFIG_SHELL-/bin/sh}
|
|---|
| 53 | # Maximum number of lines to put in a shell here document.
|
|---|
| 54 | ac_max_here_lines=12
|
|---|
| 55 |
|
|---|
| 56 | ac_prev=
|
|---|
| 57 | for ac_option
|
|---|
| 58 | do
|
|---|
| 59 |
|
|---|
| 60 | # If the previous option needs an argument, assign it.
|
|---|
| 61 | if test -n "$ac_prev"; then
|
|---|
| 62 | eval "$ac_prev=\$ac_option"
|
|---|
| 63 | ac_prev=
|
|---|
| 64 | continue
|
|---|
| 65 | fi
|
|---|
| 66 |
|
|---|
| 67 | case "$ac_option" in
|
|---|
| 68 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
|---|
| 69 | *) ac_optarg= ;;
|
|---|
| 70 | esac
|
|---|
| 71 |
|
|---|
| 72 | # Accept the important Cygnus configure options, so we can diagnose typos.
|
|---|
| 73 |
|
|---|
| 74 | case "$ac_option" in
|
|---|
| 75 |
|
|---|
| 76 | -bindir | --bindir | --bindi | --bind | --bin | --bi)
|
|---|
| 77 | ac_prev=bindir ;;
|
|---|
| 78 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
|
|---|
| 79 | bindir="$ac_optarg" ;;
|
|---|
| 80 |
|
|---|
| 81 | -build | --build | --buil | --bui | --bu)
|
|---|
| 82 | ac_prev=build ;;
|
|---|
| 83 | -build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
|---|
| 84 | build="$ac_optarg" ;;
|
|---|
| 85 |
|
|---|
| 86 | -cache-file | --cache-file | --cache-fil | --cache-fi \
|
|---|
| 87 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
|
|---|
| 88 | ac_prev=cache_file ;;
|
|---|
| 89 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
|
|---|
| 90 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
|
|---|
| 91 | cache_file="$ac_optarg" ;;
|
|---|
| 92 |
|
|---|
| 93 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
|
|---|
| 94 | ac_prev=datadir ;;
|
|---|
| 95 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
|
|---|
| 96 | | --da=*)
|
|---|
| 97 | datadir="$ac_optarg" ;;
|
|---|
| 98 |
|
|---|
| 99 | -disable-* | --disable-*)
|
|---|
| 100 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
|
|---|
| 101 | # Reject names that are not valid shell variable names.
|
|---|
| 102 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
|---|
| 103 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
|
|---|
| 104 | fi
|
|---|
| 105 | ac_feature=`echo $ac_feature| sed 's/-/_/g'`
|
|---|
| 106 | eval "enable_${ac_feature}=no" ;;
|
|---|
| 107 |
|
|---|
| 108 | -enable-* | --enable-*)
|
|---|
| 109 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
|
|---|
| 110 | # Reject names that are not valid shell variable names.
|
|---|
| 111 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
|
|---|
| 112 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
|
|---|
| 113 | fi
|
|---|
| 114 | ac_feature=`echo $ac_feature| sed 's/-/_/g'`
|
|---|
| 115 | case "$ac_option" in
|
|---|
| 116 | *=*) ;;
|
|---|
| 117 | *) ac_optarg=yes ;;
|
|---|
| 118 | esac
|
|---|
| 119 | eval "enable_${ac_feature}='$ac_optarg'" ;;
|
|---|
| 120 |
|
|---|
| 121 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
|
|---|
| 122 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
|
|---|
| 123 | | --exec | --exe | --ex)
|
|---|
| 124 | ac_prev=exec_prefix ;;
|
|---|
| 125 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
|
|---|
| 126 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
|
|---|
| 127 | | --exec=* | --exe=* | --ex=*)
|
|---|
| 128 | exec_prefix="$ac_optarg" ;;
|
|---|
| 129 |
|
|---|
| 130 | -gas | --gas | --ga | --g)
|
|---|
| 131 | # Obsolete; use --with-gas.
|
|---|
| 132 | with_gas=yes ;;
|
|---|
| 133 |
|
|---|
| 134 | -help | --help | --hel | --he)
|
|---|
| 135 | # Omit some internal or obsolete options to make the list less imposing.
|
|---|
| 136 | # This message is too long to be a string in the A/UX 3.1 sh.
|
|---|
| 137 | cat << EOF
|
|---|
| 138 | Usage: configure [options] [host]
|
|---|
| 139 | Options: [defaults in brackets after descriptions]
|
|---|
| 140 | Configuration:
|
|---|
| 141 | --cache-file=FILE cache test results in FILE
|
|---|
| 142 | --help print this message
|
|---|
| 143 | --no-create do not create output files
|
|---|
| 144 | --quiet, --silent do not print \`checking...' messages
|
|---|
| 145 | --version print the version of autoconf that created configure
|
|---|
| 146 | Directory and file names:
|
|---|
| 147 | --prefix=PREFIX install architecture-independent files in PREFIX
|
|---|
| 148 | [$ac_default_prefix]
|
|---|
| 149 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
|---|
| 150 | [same as prefix]
|
|---|
| 151 | --bindir=DIR user executables in DIR [EPREFIX/bin]
|
|---|
| 152 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
|
|---|
| 153 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
|
|---|
| 154 | --datadir=DIR read-only architecture-independent data in DIR
|
|---|
| 155 | [PREFIX/share]
|
|---|
| 156 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
|
|---|
| 157 | --sharedstatedir=DIR modifiable architecture-independent data in DIR
|
|---|
| 158 | [PREFIX/com]
|
|---|
| 159 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
|
|---|
| 160 | --libdir=DIR object code libraries in DIR [EPREFIX/lib]
|
|---|
| 161 | --includedir=DIR C header files in DIR [PREFIX/include]
|
|---|
| 162 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
|
|---|
| 163 | --infodir=DIR info documentation in DIR [PREFIX/info]
|
|---|
| 164 | --mandir=DIR man documentation in DIR [PREFIX/man]
|
|---|
| 165 | --srcdir=DIR find the sources in DIR [configure dir or ..]
|
|---|
| 166 | --program-prefix=PREFIX prepend PREFIX to installed program names
|
|---|
| 167 | --program-suffix=SUFFIX append SUFFIX to installed program names
|
|---|
| 168 | --program-transform-name=PROGRAM
|
|---|
| 169 | run sed PROGRAM on installed program names
|
|---|
| 170 | EOF
|
|---|
| 171 | cat << EOF
|
|---|
| 172 | Host type:
|
|---|
| 173 | --build=BUILD configure for building on BUILD [BUILD=HOST]
|
|---|
| 174 | --host=HOST configure for HOST [guessed]
|
|---|
| 175 | --target=TARGET configure for TARGET [TARGET=HOST]
|
|---|
| 176 | Features and packages:
|
|---|
| 177 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
|---|
| 178 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
|---|
| 179 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
|---|
| 180 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
|---|
| 181 | --x-includes=DIR X include files are in DIR
|
|---|
| 182 | --x-libraries=DIR X library files are in DIR
|
|---|
| 183 | EOF
|
|---|
| 184 | cat <<\EOF
|
|---|
| 185 | --enable and --with options recognized:
|
|---|
| 186 | --with-curses-dir=DIR directory in which (n)curses is installed
|
|---|
| 187 | --with-5lib use SunOS sysv-libraries
|
|---|
| 188 | --with-ncursesw use wide ncurses-libraries (installed)
|
|---|
| 189 | --with-ncurses use ncurses-libraries (installed)
|
|---|
| 190 | EOF
|
|---|
| 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.20030927"
|
|---|
| 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.
|
|---|
| 458 | ac_unique_file=ncurses.c
|
|---|
| 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 |
|
|---|
| 530 |
|
|---|
| 531 | test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
|
|---|
| 532 |
|
|---|
| 533 |
|
|---|
| 534 | test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
|
|---|
| 535 |
|
|---|
| 536 | ac_aux_dir=
|
|---|
| 537 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
|
|---|
| 538 | if test -f $ac_dir/install-sh; then
|
|---|
| 539 | ac_aux_dir=$ac_dir
|
|---|
| 540 | ac_install_sh="$ac_aux_dir/install-sh -c"
|
|---|
| 541 | break
|
|---|
| 542 | elif test -f $ac_dir/install.sh; then
|
|---|
| 543 | ac_aux_dir=$ac_dir
|
|---|
| 544 | ac_install_sh="$ac_aux_dir/install.sh -c"
|
|---|
| 545 | break
|
|---|
| 546 | fi
|
|---|
| 547 | done
|
|---|
| 548 | if test -z "$ac_aux_dir"; then
|
|---|
| 549 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
|
|---|
| 550 | fi
|
|---|
| 551 | ac_config_guess=$ac_aux_dir/config.guess
|
|---|
| 552 | ac_config_sub=$ac_aux_dir/config.sub
|
|---|
| 553 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
|---|
| 554 |
|
|---|
| 555 |
|
|---|
| 556 | if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
|
|---|
| 557 |
|
|---|
| 558 | # Make sure we can run config.sub.
|
|---|
| 559 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
|
|---|
| 560 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
|---|
| 561 | fi
|
|---|
| 562 |
|
|---|
| 563 | echo $ac_n "checking host system type""... $ac_c" 1>&6
|
|---|
| 564 | echo "configure:565: checking host system type" >&5
|
|---|
| 565 |
|
|---|
| 566 | host_alias=$host
|
|---|
| 567 | case "$host_alias" in
|
|---|
| 568 | NONE)
|
|---|
| 569 | case $nonopt in
|
|---|
| 570 | NONE)
|
|---|
| 571 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
|
|---|
| 572 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
|
|---|
| 573 | fi ;;
|
|---|
| 574 | *) host_alias=$nonopt ;;
|
|---|
| 575 | esac ;;
|
|---|
| 576 | esac
|
|---|
| 577 |
|
|---|
| 578 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
|
|---|
| 579 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
|---|
| 580 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
|---|
| 581 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
|---|
| 582 | echo "$ac_t""$host" 1>&6
|
|---|
| 583 |
|
|---|
| 584 | system_name="$host_os"
|
|---|
| 585 | else
|
|---|
| 586 | system_name="`(uname -s -r) 2>/dev/null`"
|
|---|
| 587 | if test -z "$system_name" ; then
|
|---|
| 588 | system_name="`(hostname) 2>/dev/null`"
|
|---|
| 589 | fi
|
|---|
| 590 | fi
|
|---|
| 591 | test -n "$system_name" && cat >> confdefs.h <<EOF
|
|---|
| 592 | #define SYSTEM_NAME "$system_name"
|
|---|
| 593 | EOF
|
|---|
| 594 |
|
|---|
| 595 | if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
|
|---|
| 596 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 597 | else
|
|---|
| 598 | cf_cv_system_name="$system_name"
|
|---|
| 599 | fi
|
|---|
| 600 |
|
|---|
| 601 |
|
|---|
| 602 | test -z "$system_name" && system_name="$cf_cv_system_name"
|
|---|
| 603 | test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
|
|---|
| 604 |
|
|---|
| 605 | if test ".$system_name" != ".$cf_cv_system_name" ; then
|
|---|
| 606 | echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
|
|---|
| 607 | { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
|
|---|
| 608 | fi
|
|---|
| 609 |
|
|---|
| 610 |
|
|---|
| 611 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
|---|
| 612 | echo "configure:613: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
|---|
| 613 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
|---|
| 614 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
|---|
| 615 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 616 | else
|
|---|
| 617 | cat > conftestmake <<\EOF
|
|---|
| 618 | all:
|
|---|
| 619 | @echo 'ac_maketemp="${MAKE}"'
|
|---|
| 620 | EOF
|
|---|
| 621 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
|---|
| 622 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
|
|---|
| 623 | if test -n "$ac_maketemp"; then
|
|---|
| 624 | eval ac_cv_prog_make_${ac_make}_set=yes
|
|---|
| 625 | else
|
|---|
| 626 | eval ac_cv_prog_make_${ac_make}_set=no
|
|---|
| 627 | fi
|
|---|
| 628 | rm -f conftestmake
|
|---|
| 629 | fi
|
|---|
| 630 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
|
|---|
| 631 | echo "$ac_t""yes" 1>&6
|
|---|
| 632 | SET_MAKE=
|
|---|
| 633 | else
|
|---|
| 634 | echo "$ac_t""no" 1>&6
|
|---|
| 635 | SET_MAKE="MAKE=${MAKE-make}"
|
|---|
| 636 | fi
|
|---|
| 637 |
|
|---|
| 638 | # Extract the first word of "gcc", so it can be a program name with args.
|
|---|
| 639 | set dummy gcc; ac_word=$2
|
|---|
| 640 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|---|
| 641 | echo "configure:642: checking for $ac_word" >&5
|
|---|
| 642 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
|---|
| 643 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 644 | else
|
|---|
| 645 | if test -n "$CC"; then
|
|---|
| 646 | ac_cv_prog_CC="$CC" # Let the user override the test.
|
|---|
| 647 | else
|
|---|
| 648 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|---|
| 649 | ac_dummy="$PATH"
|
|---|
| 650 | for ac_dir in $ac_dummy; do
|
|---|
| 651 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 652 | if test -f $ac_dir/$ac_word; then
|
|---|
| 653 | ac_cv_prog_CC="gcc"
|
|---|
| 654 | break
|
|---|
| 655 | fi
|
|---|
| 656 | done
|
|---|
| 657 | IFS="$ac_save_ifs"
|
|---|
| 658 | fi
|
|---|
| 659 | fi
|
|---|
| 660 | CC="$ac_cv_prog_CC"
|
|---|
| 661 | if test -n "$CC"; then
|
|---|
| 662 | echo "$ac_t""$CC" 1>&6
|
|---|
| 663 | else
|
|---|
| 664 | echo "$ac_t""no" 1>&6
|
|---|
| 665 | fi
|
|---|
| 666 |
|
|---|
| 667 | if test -z "$CC"; then
|
|---|
| 668 | # Extract the first word of "cc", so it can be a program name with args.
|
|---|
| 669 | set dummy cc; ac_word=$2
|
|---|
| 670 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|---|
| 671 | echo "configure:672: checking for $ac_word" >&5
|
|---|
| 672 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
|---|
| 673 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 674 | else
|
|---|
| 675 | if test -n "$CC"; then
|
|---|
| 676 | ac_cv_prog_CC="$CC" # Let the user override the test.
|
|---|
| 677 | else
|
|---|
| 678 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|---|
| 679 | ac_prog_rejected=no
|
|---|
| 680 | ac_dummy="$PATH"
|
|---|
| 681 | for ac_dir in $ac_dummy; do
|
|---|
| 682 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 683 | if test -f $ac_dir/$ac_word; then
|
|---|
| 684 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
|
|---|
| 685 | ac_prog_rejected=yes
|
|---|
| 686 | continue
|
|---|
| 687 | fi
|
|---|
| 688 | ac_cv_prog_CC="cc"
|
|---|
| 689 | break
|
|---|
| 690 | fi
|
|---|
| 691 | done
|
|---|
| 692 | IFS="$ac_save_ifs"
|
|---|
| 693 | if test $ac_prog_rejected = yes; then
|
|---|
| 694 | # We found a bogon in the path, so make sure we never use it.
|
|---|
| 695 | set dummy $ac_cv_prog_CC
|
|---|
| 696 | shift
|
|---|
| 697 | if test $# -gt 0; then
|
|---|
| 698 | # We chose a different compiler from the bogus one.
|
|---|
| 699 | # However, it has the same basename, so the bogon will be chosen
|
|---|
| 700 | # first if we set CC to just the basename; use the full file name.
|
|---|
| 701 | shift
|
|---|
| 702 | set dummy "$ac_dir/$ac_word" "$@"
|
|---|
| 703 | shift
|
|---|
| 704 | ac_cv_prog_CC="$@"
|
|---|
| 705 | fi
|
|---|
| 706 | fi
|
|---|
| 707 | fi
|
|---|
| 708 | fi
|
|---|
| 709 | CC="$ac_cv_prog_CC"
|
|---|
| 710 | if test -n "$CC"; then
|
|---|
| 711 | echo "$ac_t""$CC" 1>&6
|
|---|
| 712 | else
|
|---|
| 713 | echo "$ac_t""no" 1>&6
|
|---|
| 714 | fi
|
|---|
| 715 |
|
|---|
| 716 | if test -z "$CC"; then
|
|---|
| 717 | case "`uname -s`" in
|
|---|
| 718 | *win32* | *WIN32*)
|
|---|
| 719 | # Extract the first word of "cl", so it can be a program name with args.
|
|---|
| 720 | set dummy cl; ac_word=$2
|
|---|
| 721 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
|---|
| 722 | echo "configure:723: checking for $ac_word" >&5
|
|---|
| 723 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
|
|---|
| 724 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 725 | else
|
|---|
| 726 | if test -n "$CC"; then
|
|---|
| 727 | ac_cv_prog_CC="$CC" # Let the user override the test.
|
|---|
| 728 | else
|
|---|
| 729 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
|---|
| 730 | ac_dummy="$PATH"
|
|---|
| 731 | for ac_dir in $ac_dummy; do
|
|---|
| 732 | test -z "$ac_dir" && ac_dir=.
|
|---|
| 733 | if test -f $ac_dir/$ac_word; then
|
|---|
| 734 | ac_cv_prog_CC="cl"
|
|---|
| 735 | break
|
|---|
| 736 | fi
|
|---|
| 737 | done
|
|---|
| 738 | IFS="$ac_save_ifs"
|
|---|
| 739 | fi
|
|---|
| 740 | fi
|
|---|
| 741 | CC="$ac_cv_prog_CC"
|
|---|
| 742 | if test -n "$CC"; then
|
|---|
| 743 | echo "$ac_t""$CC" 1>&6
|
|---|
| 744 | else
|
|---|
| 745 | echo "$ac_t""no" 1>&6
|
|---|
| 746 | fi
|
|---|
| 747 | ;;
|
|---|
| 748 | esac
|
|---|
| 749 | fi
|
|---|
| 750 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
|
|---|
| 751 | fi
|
|---|
| 752 |
|
|---|
| 753 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
|---|
| 754 | echo "configure:755: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
|---|
| 755 |
|
|---|
| 756 | ac_ext=c
|
|---|
| 757 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|---|
| 758 | ac_cpp='$CPP $CPPFLAGS'
|
|---|
| 759 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|---|
| 760 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|---|
| 761 | cross_compiling=$ac_cv_prog_cc_cross
|
|---|
| 762 |
|
|---|
| 763 | cat > conftest.$ac_ext << EOF
|
|---|
| 764 |
|
|---|
| 765 | #line 766 "configure"
|
|---|
| 766 | #include "confdefs.h"
|
|---|
| 767 |
|
|---|
| 768 | main(){return(0);}
|
|---|
| 769 | EOF
|
|---|
| 770 | if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 771 | ac_cv_prog_cc_works=yes
|
|---|
| 772 | # If we can't run a trivial program, we are probably using a cross compiler.
|
|---|
| 773 | if (./conftest; exit) 2>/dev/null; then
|
|---|
| 774 | ac_cv_prog_cc_cross=no
|
|---|
| 775 | else
|
|---|
| 776 | ac_cv_prog_cc_cross=yes
|
|---|
| 777 | fi
|
|---|
| 778 | else
|
|---|
| 779 | echo "configure: failed program was:" >&5
|
|---|
| 780 | cat conftest.$ac_ext >&5
|
|---|
| 781 | ac_cv_prog_cc_works=no
|
|---|
| 782 | fi
|
|---|
| 783 | rm -fr conftest*
|
|---|
| 784 | ac_ext=c
|
|---|
| 785 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|---|
| 786 | ac_cpp='$CPP $CPPFLAGS'
|
|---|
| 787 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
|---|
| 788 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
|---|
| 789 | cross_compiling=$ac_cv_prog_cc_cross
|
|---|
| 790 |
|
|---|
| 791 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
|
|---|
| 792 | if test $ac_cv_prog_cc_works = no; then
|
|---|
| 793 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
|
|---|
| 794 | fi
|
|---|
| 795 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
|
|---|
| 796 | echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
|---|
| 797 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
|
|---|
| 798 | cross_compiling=$ac_cv_prog_cc_cross
|
|---|
| 799 |
|
|---|
| 800 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
|
|---|
| 801 | echo "configure:802: checking whether we are using GNU C" >&5
|
|---|
| 802 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
|
|---|
| 803 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 804 | else
|
|---|
| 805 | cat > conftest.c <<EOF
|
|---|
| 806 | #ifdef __GNUC__
|
|---|
| 807 | yes;
|
|---|
| 808 | #endif
|
|---|
| 809 | EOF
|
|---|
| 810 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
|
|---|
| 811 | ac_cv_prog_gcc=yes
|
|---|
| 812 | else
|
|---|
| 813 | ac_cv_prog_gcc=no
|
|---|
| 814 | fi
|
|---|
| 815 | fi
|
|---|
| 816 |
|
|---|
| 817 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
|---|
| 818 |
|
|---|
| 819 | if test $ac_cv_prog_gcc = yes; then
|
|---|
| 820 | GCC=yes
|
|---|
| 821 | else
|
|---|
| 822 | GCC=
|
|---|
| 823 | fi
|
|---|
| 824 |
|
|---|
| 825 | ac_test_CFLAGS="${CFLAGS+set}"
|
|---|
| 826 | ac_save_CFLAGS="$CFLAGS"
|
|---|
| 827 | CFLAGS=
|
|---|
| 828 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
|
|---|
| 829 | echo "configure:830: checking whether ${CC-cc} accepts -g" >&5
|
|---|
| 830 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
|
|---|
| 831 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 832 | else
|
|---|
| 833 | echo 'void f(){}' > conftest.c
|
|---|
| 834 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
|
|---|
| 835 | ac_cv_prog_cc_g=yes
|
|---|
| 836 | else
|
|---|
| 837 | ac_cv_prog_cc_g=no
|
|---|
| 838 | fi
|
|---|
| 839 | rm -f conftest*
|
|---|
| 840 |
|
|---|
| 841 | fi
|
|---|
| 842 |
|
|---|
| 843 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
|
|---|
| 844 | if test "$ac_test_CFLAGS" = set; then
|
|---|
| 845 | CFLAGS="$ac_save_CFLAGS"
|
|---|
| 846 | elif test $ac_cv_prog_cc_g = yes; then
|
|---|
| 847 | if test "$GCC" = yes; then
|
|---|
| 848 | CFLAGS="-g -O2"
|
|---|
| 849 | else
|
|---|
| 850 | CFLAGS="-g"
|
|---|
| 851 | fi
|
|---|
| 852 | else
|
|---|
| 853 | if test "$GCC" = yes; then
|
|---|
| 854 | CFLAGS="-O2"
|
|---|
| 855 | else
|
|---|
| 856 | CFLAGS=
|
|---|
| 857 | fi
|
|---|
| 858 | fi
|
|---|
| 859 |
|
|---|
| 860 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
|
|---|
| 861 | echo "configure:862: checking how to run the C preprocessor" >&5
|
|---|
| 862 | # On Suns, sometimes $CPP names a directory.
|
|---|
| 863 | if test -n "$CPP" && test -d "$CPP"; then
|
|---|
| 864 | CPP=
|
|---|
| 865 | fi
|
|---|
| 866 | if test -z "$CPP"; then
|
|---|
| 867 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
|
|---|
| 868 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 869 | else
|
|---|
| 870 | # This must be in double quotes, not single quotes, because CPP may get
|
|---|
| 871 | # substituted into the Makefile and "${CC-cc}" will confuse make.
|
|---|
| 872 | CPP="${CC-cc} -E"
|
|---|
| 873 | # On the NeXT, cc -E runs the code through the compiler's parser,
|
|---|
| 874 | # not just through cpp.
|
|---|
| 875 | cat > conftest.$ac_ext <<EOF
|
|---|
| 876 | #line 877 "configure"
|
|---|
| 877 | #include "confdefs.h"
|
|---|
| 878 | #include <assert.h>
|
|---|
| 879 | Syntax Error
|
|---|
| 880 | EOF
|
|---|
| 881 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|---|
| 882 | { (eval echo configure:883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|---|
| 883 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|---|
| 884 | if test -z "$ac_err"; then
|
|---|
| 885 | :
|
|---|
| 886 | else
|
|---|
| 887 | echo "$ac_err" >&5
|
|---|
| 888 | echo "configure: failed program was:" >&5
|
|---|
| 889 | cat conftest.$ac_ext >&5
|
|---|
| 890 | rm -rf conftest*
|
|---|
| 891 | CPP="${CC-cc} -E -traditional-cpp"
|
|---|
| 892 | cat > conftest.$ac_ext <<EOF
|
|---|
| 893 | #line 894 "configure"
|
|---|
| 894 | #include "confdefs.h"
|
|---|
| 895 | #include <assert.h>
|
|---|
| 896 | Syntax Error
|
|---|
| 897 | EOF
|
|---|
| 898 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|---|
| 899 | { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|---|
| 900 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|---|
| 901 | if test -z "$ac_err"; then
|
|---|
| 902 | :
|
|---|
| 903 | else
|
|---|
| 904 | echo "$ac_err" >&5
|
|---|
| 905 | echo "configure: failed program was:" >&5
|
|---|
| 906 | cat conftest.$ac_ext >&5
|
|---|
| 907 | rm -rf conftest*
|
|---|
| 908 | CPP="${CC-cc} -nologo -E"
|
|---|
| 909 | cat > conftest.$ac_ext <<EOF
|
|---|
| 910 | #line 911 "configure"
|
|---|
| 911 | #include "confdefs.h"
|
|---|
| 912 | #include <assert.h>
|
|---|
| 913 | Syntax Error
|
|---|
| 914 | EOF
|
|---|
| 915 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|---|
| 916 | { (eval echo configure:917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|---|
| 917 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|---|
| 918 | if test -z "$ac_err"; then
|
|---|
| 919 | :
|
|---|
| 920 | else
|
|---|
| 921 | echo "$ac_err" >&5
|
|---|
| 922 | echo "configure: failed program was:" >&5
|
|---|
| 923 | cat conftest.$ac_ext >&5
|
|---|
| 924 | rm -rf conftest*
|
|---|
| 925 | CPP=/lib/cpp
|
|---|
| 926 | fi
|
|---|
| 927 | rm -f conftest*
|
|---|
| 928 | fi
|
|---|
| 929 | rm -f conftest*
|
|---|
| 930 | fi
|
|---|
| 931 | rm -f conftest*
|
|---|
| 932 | ac_cv_prog_CPP="$CPP"
|
|---|
| 933 | fi
|
|---|
| 934 | CPP="$ac_cv_prog_CPP"
|
|---|
| 935 | else
|
|---|
| 936 | ac_cv_prog_CPP="$CPP"
|
|---|
| 937 | fi
|
|---|
| 938 | echo "$ac_t""$CPP" 1>&6
|
|---|
| 939 |
|
|---|
| 940 |
|
|---|
| 941 | CC_G_OPT="-g"
|
|---|
| 942 | CC_SHARED_OPTS=unknown
|
|---|
| 943 | CPPFLAGS="$CPPFLAGS"
|
|---|
| 944 | DFT_DEP_SUFFIX=""
|
|---|
| 945 | DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
|
|---|
| 946 | DFT_UPR_MODEL="NORMAL"
|
|---|
| 947 | ECHO_LINK='@ echo linking $@ ... ;'
|
|---|
| 948 | LD="ld"
|
|---|
| 949 | LDFLAGS_SHARED=""
|
|---|
| 950 | LD_MODEL=""
|
|---|
| 951 | LD_SHARED_OPTS=""
|
|---|
| 952 | LIBTOOL=""
|
|---|
| 953 | LIB_CLEAN=""
|
|---|
| 954 | LIB_COMPILE=""
|
|---|
| 955 | LIB_LINK=""
|
|---|
| 956 | LIB_NAME=curses
|
|---|
| 957 | LIB_PREFIX="-l"
|
|---|
| 958 | LINK_TESTS=""
|
|---|
| 959 | LINT=lint
|
|---|
| 960 | LINT_OPTS=""
|
|---|
| 961 | LOCAL_LDFLAGS=""
|
|---|
| 962 | MATH_LIB="-lm"
|
|---|
| 963 | TEST_ARGS=""
|
|---|
| 964 | TEST_DEPS=""
|
|---|
| 965 | TINFO_ARGS='$(LIBS_CURSES)'
|
|---|
| 966 | cf_cv_abi_version=""
|
|---|
| 967 | cf_cv_rel_version=""
|
|---|
| 968 |
|
|---|
| 969 | cf_cv_screen=curses
|
|---|
| 970 | cf_cv_libtype=
|
|---|
| 971 |
|
|---|
| 972 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
|
|---|
| 973 | echo "configure:974: checking for Cygwin environment" >&5
|
|---|
| 974 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
|
|---|
| 975 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 976 | else
|
|---|
| 977 | cat > conftest.$ac_ext <<EOF
|
|---|
| 978 | #line 979 "configure"
|
|---|
| 979 | #include "confdefs.h"
|
|---|
| 980 |
|
|---|
| 981 | int main() {
|
|---|
| 982 |
|
|---|
| 983 | #ifndef __CYGWIN__
|
|---|
| 984 | #define __CYGWIN__ __CYGWIN32__
|
|---|
| 985 | #endif
|
|---|
| 986 | return __CYGWIN__;
|
|---|
| 987 | ; return 0; }
|
|---|
| 988 | EOF
|
|---|
| 989 | if { (eval echo configure:990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 990 | rm -rf conftest*
|
|---|
| 991 | ac_cv_cygwin=yes
|
|---|
| 992 | else
|
|---|
| 993 | echo "configure: failed program was:" >&5
|
|---|
| 994 | cat conftest.$ac_ext >&5
|
|---|
| 995 | rm -rf conftest*
|
|---|
| 996 | ac_cv_cygwin=no
|
|---|
| 997 | fi
|
|---|
| 998 | rm -f conftest*
|
|---|
| 999 | rm -f conftest*
|
|---|
| 1000 | fi
|
|---|
| 1001 |
|
|---|
| 1002 | echo "$ac_t""$ac_cv_cygwin" 1>&6
|
|---|
| 1003 | CYGWIN=
|
|---|
| 1004 | test "$ac_cv_cygwin" = yes && CYGWIN=yes
|
|---|
| 1005 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
|
|---|
| 1006 | echo "configure:1007: checking for mingw32 environment" >&5
|
|---|
| 1007 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
|
|---|
| 1008 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1009 | else
|
|---|
| 1010 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1011 | #line 1012 "configure"
|
|---|
| 1012 | #include "confdefs.h"
|
|---|
| 1013 |
|
|---|
| 1014 | int main() {
|
|---|
| 1015 | return __MINGW32__;
|
|---|
| 1016 | ; return 0; }
|
|---|
| 1017 | EOF
|
|---|
| 1018 | if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1019 | rm -rf conftest*
|
|---|
| 1020 | ac_cv_mingw32=yes
|
|---|
| 1021 | else
|
|---|
| 1022 | echo "configure: failed program was:" >&5
|
|---|
| 1023 | cat conftest.$ac_ext >&5
|
|---|
| 1024 | rm -rf conftest*
|
|---|
| 1025 | ac_cv_mingw32=no
|
|---|
| 1026 | fi
|
|---|
| 1027 | rm -f conftest*
|
|---|
| 1028 | rm -f conftest*
|
|---|
| 1029 | fi
|
|---|
| 1030 |
|
|---|
| 1031 | echo "$ac_t""$ac_cv_mingw32" 1>&6
|
|---|
| 1032 | MINGW32=
|
|---|
| 1033 | test "$ac_cv_mingw32" = yes && MINGW32=yes
|
|---|
| 1034 |
|
|---|
| 1035 |
|
|---|
| 1036 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
|
|---|
| 1037 | echo "configure:1038: checking for executable suffix" >&5
|
|---|
| 1038 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
|
|---|
| 1039 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1040 | else
|
|---|
| 1041 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
|
|---|
| 1042 | ac_cv_exeext=.exe
|
|---|
| 1043 | else
|
|---|
| 1044 | rm -f conftest*
|
|---|
| 1045 | echo 'int main () { return 0; }' > conftest.$ac_ext
|
|---|
| 1046 | ac_cv_exeext=
|
|---|
| 1047 | if { (eval echo configure:1048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
|---|
| 1048 | for file in conftest.*; do
|
|---|
| 1049 | case $file in
|
|---|
| 1050 | *.c | *.o | *.obj) ;;
|
|---|
| 1051 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
|
|---|
| 1052 | esac
|
|---|
| 1053 | done
|
|---|
| 1054 | else
|
|---|
| 1055 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
|
|---|
| 1056 | fi
|
|---|
| 1057 | rm -f conftest*
|
|---|
| 1058 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
|
|---|
| 1059 | fi
|
|---|
| 1060 | fi
|
|---|
| 1061 |
|
|---|
| 1062 | EXEEXT=""
|
|---|
| 1063 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
|
|---|
| 1064 | echo "$ac_t""${ac_cv_exeext}" 1>&6
|
|---|
| 1065 | ac_exeext=$EXEEXT
|
|---|
| 1066 |
|
|---|
| 1067 | echo $ac_n "checking for object suffix""... $ac_c" 1>&6
|
|---|
| 1068 | echo "configure:1069: checking for object suffix" >&5
|
|---|
| 1069 | if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
|
|---|
| 1070 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1071 | else
|
|---|
| 1072 | rm -f conftest*
|
|---|
| 1073 | echo 'int i = 1;' > conftest.$ac_ext
|
|---|
| 1074 | if { (eval echo configure:1075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1075 | for ac_file in conftest.*; do
|
|---|
| 1076 | case $ac_file in
|
|---|
| 1077 | *.c) ;;
|
|---|
| 1078 | *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
|
|---|
| 1079 | esac
|
|---|
| 1080 | done
|
|---|
| 1081 | else
|
|---|
| 1082 | { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
|
|---|
| 1083 | fi
|
|---|
| 1084 | rm -f conftest*
|
|---|
| 1085 | fi
|
|---|
| 1086 |
|
|---|
| 1087 | echo "$ac_t""$ac_cv_objext" 1>&6
|
|---|
| 1088 | OBJEXT=$ac_cv_objext
|
|---|
| 1089 | ac_objext=$ac_cv_objext
|
|---|
| 1090 |
|
|---|
| 1091 |
|
|---|
| 1092 |
|
|---|
| 1093 | echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
|
|---|
| 1094 | echo "configure:1095: checking for ${CC-cc} option to accept ANSI C" >&5
|
|---|
| 1095 | if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
|
|---|
| 1096 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1097 | else
|
|---|
| 1098 |
|
|---|
| 1099 | cf_cv_ansi_cc=no
|
|---|
| 1100 | cf_save_CFLAGS="$CFLAGS"
|
|---|
| 1101 | cf_save_CPPFLAGS="$CPPFLAGS"
|
|---|
| 1102 | # Don't try gcc -ansi; that turns off useful extensions and
|
|---|
| 1103 | # breaks some systems' header files.
|
|---|
| 1104 | # AIX -qlanglvl=ansi
|
|---|
| 1105 | # Ultrix and OSF/1 -std1
|
|---|
| 1106 | # HP-UX -Aa -D_HPUX_SOURCE
|
|---|
| 1107 | # SVR4 -Xc
|
|---|
| 1108 | # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
|
|---|
| 1109 | for cf_arg in "-DCC_HAS_PROTOS" \
|
|---|
| 1110 | "" \
|
|---|
| 1111 | -qlanglvl=ansi \
|
|---|
| 1112 | -std1 \
|
|---|
| 1113 | -Ae \
|
|---|
| 1114 | "-Aa -D_HPUX_SOURCE" \
|
|---|
| 1115 | -Xc
|
|---|
| 1116 | do
|
|---|
| 1117 |
|
|---|
| 1118 | cf_fix_cppflags=no
|
|---|
| 1119 | cf_new_cflags=
|
|---|
| 1120 | cf_new_cppflags=
|
|---|
| 1121 | cf_new_extra_cppflags=
|
|---|
| 1122 |
|
|---|
| 1123 | for cf_add_cflags in $cf_arg
|
|---|
| 1124 | do
|
|---|
| 1125 | case $cf_fix_cppflags in
|
|---|
| 1126 | no)
|
|---|
| 1127 | case $cf_add_cflags in #(vi
|
|---|
| 1128 | -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
|
|---|
| 1129 | case $cf_add_cflags in
|
|---|
| 1130 | -D*)
|
|---|
| 1131 | cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
|
|---|
| 1132 |
|
|---|
| 1133 | test "${cf_add_cflags}" != "${cf_tst_cflags}" \
|
|---|
| 1134 | && test -z "${cf_tst_cflags}" \
|
|---|
| 1135 | && cf_fix_cppflags=yes
|
|---|
| 1136 |
|
|---|
| 1137 | if test $cf_fix_cppflags = yes ; then
|
|---|
| 1138 | cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
|
|---|
| 1139 | continue
|
|---|
| 1140 | elif test "${cf_tst_cflags}" = "\"'" ; then
|
|---|
| 1141 | cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
|
|---|
| 1142 | continue
|
|---|
| 1143 | fi
|
|---|
| 1144 | ;;
|
|---|
| 1145 | esac
|
|---|
| 1146 | case "$CPPFLAGS" in
|
|---|
| 1147 | *$cf_add_cflags) #(vi
|
|---|
| 1148 | ;;
|
|---|
| 1149 | *) #(vi
|
|---|
| 1150 | cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
|
|---|
| 1151 | ;;
|
|---|
| 1152 | esac
|
|---|
| 1153 | ;;
|
|---|
| 1154 | *)
|
|---|
| 1155 | cf_new_cflags="$cf_new_cflags $cf_add_cflags"
|
|---|
| 1156 | ;;
|
|---|
| 1157 | esac
|
|---|
| 1158 | ;;
|
|---|
| 1159 | yes)
|
|---|
| 1160 | cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
|
|---|
| 1161 |
|
|---|
| 1162 | cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
|
|---|
| 1163 |
|
|---|
| 1164 | test "${cf_add_cflags}" != "${cf_tst_cflags}" \
|
|---|
| 1165 | && test -z "${cf_tst_cflags}" \
|
|---|
| 1166 | && cf_fix_cppflags=no
|
|---|
| 1167 | ;;
|
|---|
| 1168 | esac
|
|---|
| 1169 | done
|
|---|
| 1170 |
|
|---|
| 1171 | if test -n "$cf_new_cflags" ; then
|
|---|
| 1172 |
|
|---|
| 1173 | CFLAGS="$CFLAGS $cf_new_cflags"
|
|---|
| 1174 | fi
|
|---|
| 1175 |
|
|---|
| 1176 | if test -n "$cf_new_cppflags" ; then
|
|---|
| 1177 |
|
|---|
| 1178 | CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
|
|---|
| 1179 | fi
|
|---|
| 1180 |
|
|---|
| 1181 | if test -n "$cf_new_extra_cppflags" ; then
|
|---|
| 1182 |
|
|---|
| 1183 | EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
|
|---|
| 1184 | fi
|
|---|
| 1185 |
|
|---|
| 1186 |
|
|---|
| 1187 |
|
|---|
| 1188 |
|
|---|
| 1189 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1190 | #line 1191 "configure"
|
|---|
| 1191 | #include "confdefs.h"
|
|---|
| 1192 |
|
|---|
| 1193 | #ifndef CC_HAS_PROTOS
|
|---|
| 1194 | #if !defined(__STDC__) || (__STDC__ != 1)
|
|---|
| 1195 | choke me
|
|---|
| 1196 | #endif
|
|---|
| 1197 | #endif
|
|---|
| 1198 |
|
|---|
| 1199 | int main() {
|
|---|
| 1200 |
|
|---|
| 1201 | int test (int i, double x);
|
|---|
| 1202 | struct s1 {int (*f) (int a);};
|
|---|
| 1203 | struct s2 {int (*f) (double a);};
|
|---|
| 1204 | ; return 0; }
|
|---|
| 1205 | EOF
|
|---|
| 1206 | if { (eval echo configure:1207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1207 | rm -rf conftest*
|
|---|
| 1208 | cf_cv_ansi_cc="$cf_arg"; break
|
|---|
| 1209 | else
|
|---|
| 1210 | echo "configure: failed program was:" >&5
|
|---|
| 1211 | cat conftest.$ac_ext >&5
|
|---|
| 1212 | fi
|
|---|
| 1213 | rm -f conftest*
|
|---|
| 1214 | done
|
|---|
| 1215 | CFLAGS="$cf_save_CFLAGS"
|
|---|
| 1216 | CPPFLAGS="$cf_save_CPPFLAGS"
|
|---|
| 1217 |
|
|---|
| 1218 | fi
|
|---|
| 1219 |
|
|---|
| 1220 | echo "$ac_t""$cf_cv_ansi_cc" 1>&6
|
|---|
| 1221 |
|
|---|
| 1222 | if test "$cf_cv_ansi_cc" != "no"; then
|
|---|
| 1223 | if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
|
|---|
| 1224 |
|
|---|
| 1225 | cf_fix_cppflags=no
|
|---|
| 1226 | cf_new_cflags=
|
|---|
| 1227 | cf_new_cppflags=
|
|---|
| 1228 | cf_new_extra_cppflags=
|
|---|
| 1229 |
|
|---|
| 1230 | for cf_add_cflags in $cf_cv_ansi_cc
|
|---|
| 1231 | do
|
|---|
| 1232 | case $cf_fix_cppflags in
|
|---|
| 1233 | no)
|
|---|
| 1234 | case $cf_add_cflags in #(vi
|
|---|
| 1235 | -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
|
|---|
| 1236 | case $cf_add_cflags in
|
|---|
| 1237 | -D*)
|
|---|
| 1238 | cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
|
|---|
| 1239 |
|
|---|
| 1240 | test "${cf_add_cflags}" != "${cf_tst_cflags}" \
|
|---|
| 1241 | && test -z "${cf_tst_cflags}" \
|
|---|
| 1242 | && cf_fix_cppflags=yes
|
|---|
| 1243 |
|
|---|
| 1244 | if test $cf_fix_cppflags = yes ; then
|
|---|
| 1245 | cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
|
|---|
| 1246 | continue
|
|---|
| 1247 | elif test "${cf_tst_cflags}" = "\"'" ; then
|
|---|
| 1248 | cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
|
|---|
| 1249 | continue
|
|---|
| 1250 | fi
|
|---|
| 1251 | ;;
|
|---|
| 1252 | esac
|
|---|
| 1253 | case "$CPPFLAGS" in
|
|---|
| 1254 | *$cf_add_cflags) #(vi
|
|---|
| 1255 | ;;
|
|---|
| 1256 | *) #(vi
|
|---|
| 1257 | cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
|
|---|
| 1258 | ;;
|
|---|
| 1259 | esac
|
|---|
| 1260 | ;;
|
|---|
| 1261 | *)
|
|---|
| 1262 | cf_new_cflags="$cf_new_cflags $cf_add_cflags"
|
|---|
| 1263 | ;;
|
|---|
| 1264 | esac
|
|---|
| 1265 | ;;
|
|---|
| 1266 | yes)
|
|---|
| 1267 | cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
|
|---|
| 1268 |
|
|---|
| 1269 | cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
|
|---|
| 1270 |
|
|---|
| 1271 | test "${cf_add_cflags}" != "${cf_tst_cflags}" \
|
|---|
| 1272 | && test -z "${cf_tst_cflags}" \
|
|---|
| 1273 | && cf_fix_cppflags=no
|
|---|
| 1274 | ;;
|
|---|
| 1275 | esac
|
|---|
| 1276 | done
|
|---|
| 1277 |
|
|---|
| 1278 | if test -n "$cf_new_cflags" ; then
|
|---|
| 1279 |
|
|---|
| 1280 | CFLAGS="$CFLAGS $cf_new_cflags"
|
|---|
| 1281 | fi
|
|---|
| 1282 |
|
|---|
| 1283 | if test -n "$cf_new_cppflags" ; then
|
|---|
| 1284 |
|
|---|
| 1285 | CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
|
|---|
| 1286 | fi
|
|---|
| 1287 |
|
|---|
| 1288 | if test -n "$cf_new_extra_cppflags" ; then
|
|---|
| 1289 |
|
|---|
| 1290 | EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
|
|---|
| 1291 | fi
|
|---|
| 1292 |
|
|---|
| 1293 |
|
|---|
| 1294 |
|
|---|
| 1295 |
|
|---|
| 1296 | else
|
|---|
| 1297 | cat >> confdefs.h <<\EOF
|
|---|
| 1298 | #define CC_HAS_PROTOS 1
|
|---|
| 1299 | EOF
|
|---|
| 1300 |
|
|---|
| 1301 | fi
|
|---|
| 1302 | fi
|
|---|
| 1303 |
|
|---|
| 1304 |
|
|---|
| 1305 | if test "$cf_cv_ansi_cc" = "no"; then
|
|---|
| 1306 | { echo "configure: error: Your compiler does not appear to recognize prototypes.
|
|---|
| 1307 | You have the following choices:
|
|---|
| 1308 | a. adjust your compiler options
|
|---|
| 1309 | b. get an up-to-date compiler
|
|---|
| 1310 | c. use a wrapper such as unproto" 1>&2; exit 1; }
|
|---|
| 1311 | fi
|
|---|
| 1312 |
|
|---|
| 1313 |
|
|---|
| 1314 |
|
|---|
| 1315 |
|
|---|
| 1316 | INTEL_COMPILER=no
|
|---|
| 1317 |
|
|---|
| 1318 | if test "$GCC" = yes ; then
|
|---|
| 1319 | case $host_os in
|
|---|
| 1320 | linux*|gnu*)
|
|---|
| 1321 | echo $ac_n "checking if this is really Intel compiler""... $ac_c" 1>&6
|
|---|
| 1322 | echo "configure:1323: checking if this is really Intel compiler" >&5
|
|---|
| 1323 | cf_save_CFLAGS="$CFLAGS"
|
|---|
| 1324 | CFLAGS="$CFLAGS -no-gcc"
|
|---|
| 1325 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1326 | #line 1327 "configure"
|
|---|
| 1327 | #include "confdefs.h"
|
|---|
| 1328 |
|
|---|
| 1329 | int main() {
|
|---|
| 1330 |
|
|---|
| 1331 | #ifdef __INTEL_COMPILER
|
|---|
| 1332 | #else
|
|---|
| 1333 | make an error
|
|---|
| 1334 | #endif
|
|---|
| 1335 |
|
|---|
| 1336 | ; return 0; }
|
|---|
| 1337 | EOF
|
|---|
| 1338 | if { (eval echo configure:1339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1339 | rm -rf conftest*
|
|---|
| 1340 | INTEL_COMPILER=yes
|
|---|
| 1341 | cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
|
|---|
| 1342 |
|
|---|
| 1343 | else
|
|---|
| 1344 | echo "configure: failed program was:" >&5
|
|---|
| 1345 | cat conftest.$ac_ext >&5
|
|---|
| 1346 | fi
|
|---|
| 1347 | rm -f conftest*
|
|---|
| 1348 | CFLAGS="$cf_save_CFLAGS"
|
|---|
| 1349 | echo "$ac_t""$INTEL_COMPILER" 1>&6
|
|---|
| 1350 | ;;
|
|---|
| 1351 | esac
|
|---|
| 1352 | fi
|
|---|
| 1353 |
|
|---|
| 1354 |
|
|---|
| 1355 |
|
|---|
| 1356 | cf_XOPEN_SOURCE=500
|
|---|
| 1357 | cf_POSIX_C_SOURCE=199506L
|
|---|
| 1358 |
|
|---|
| 1359 | case $host_os in #(vi
|
|---|
| 1360 | aix[45]*) #(vi
|
|---|
| 1361 | CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
|
|---|
| 1362 | ;;
|
|---|
| 1363 | freebsd*) #(vi
|
|---|
| 1364 | # 5.x headers associate
|
|---|
| 1365 | # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
|
|---|
| 1366 | # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
|
|---|
| 1367 | cf_POSIX_C_SOURCE=200112L
|
|---|
| 1368 | cf_XOPEN_SOURCE=600
|
|---|
| 1369 | CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
|
|---|
| 1370 | ;;
|
|---|
| 1371 | hpux*) #(vi
|
|---|
| 1372 | CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
|
|---|
| 1373 | ;;
|
|---|
| 1374 | irix[56].*) #(vi
|
|---|
| 1375 | CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
|
|---|
| 1376 | ;;
|
|---|
| 1377 | linux*|gnu*) #(vi
|
|---|
| 1378 |
|
|---|
| 1379 |
|
|---|
| 1380 |
|
|---|
| 1381 | if test "$INTEL_COMPILER" = no ; then
|
|---|
| 1382 | echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
|
|---|
| 1383 | echo "configure:1384: checking if we must define _GNU_SOURCE" >&5
|
|---|
| 1384 | if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
|
|---|
| 1385 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1386 | else
|
|---|
| 1387 |
|
|---|
| 1388 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1389 | #line 1390 "configure"
|
|---|
| 1390 | #include "confdefs.h"
|
|---|
| 1391 | #include <sys/types.h>
|
|---|
| 1392 | int main() {
|
|---|
| 1393 |
|
|---|
| 1394 | #ifndef _XOPEN_SOURCE
|
|---|
| 1395 | make an error
|
|---|
| 1396 | #endif
|
|---|
| 1397 | ; return 0; }
|
|---|
| 1398 | EOF
|
|---|
| 1399 | if { (eval echo configure:1400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1400 | rm -rf conftest*
|
|---|
| 1401 | cf_cv_gnu_source=no
|
|---|
| 1402 | else
|
|---|
| 1403 | echo "configure: failed program was:" >&5
|
|---|
| 1404 | cat conftest.$ac_ext >&5
|
|---|
| 1405 | rm -rf conftest*
|
|---|
| 1406 | cf_save="$CPPFLAGS"
|
|---|
| 1407 | CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
|---|
| 1408 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1409 | #line 1410 "configure"
|
|---|
| 1410 | #include "confdefs.h"
|
|---|
| 1411 | #include <sys/types.h>
|
|---|
| 1412 | int main() {
|
|---|
| 1413 |
|
|---|
| 1414 | #ifdef _XOPEN_SOURCE
|
|---|
| 1415 | make an error
|
|---|
| 1416 | #endif
|
|---|
| 1417 | ; return 0; }
|
|---|
| 1418 | EOF
|
|---|
| 1419 | if { (eval echo configure:1420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1420 | rm -rf conftest*
|
|---|
| 1421 | cf_cv_gnu_source=no
|
|---|
| 1422 | else
|
|---|
| 1423 | echo "configure: failed program was:" >&5
|
|---|
| 1424 | cat conftest.$ac_ext >&5
|
|---|
| 1425 | rm -rf conftest*
|
|---|
| 1426 | cf_cv_gnu_source=yes
|
|---|
| 1427 | fi
|
|---|
| 1428 | rm -f conftest*
|
|---|
| 1429 | CPPFLAGS="$cf_save"
|
|---|
| 1430 |
|
|---|
| 1431 | fi
|
|---|
| 1432 | rm -f conftest*
|
|---|
| 1433 |
|
|---|
| 1434 | fi
|
|---|
| 1435 |
|
|---|
| 1436 | echo "$ac_t""$cf_cv_gnu_source" 1>&6
|
|---|
| 1437 | test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
|---|
| 1438 | fi
|
|---|
| 1439 |
|
|---|
| 1440 | ;;
|
|---|
| 1441 | mirbsd*) #(vi
|
|---|
| 1442 | # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
|
|---|
| 1443 | ;;
|
|---|
| 1444 | netbsd*) #(vi
|
|---|
| 1445 | # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
|
|---|
| 1446 | ;;
|
|---|
| 1447 | openbsd*) #(vi
|
|---|
| 1448 | # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
|
|---|
| 1449 | ;;
|
|---|
| 1450 | osf[45]*) #(vi
|
|---|
| 1451 | CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
|
|---|
| 1452 | ;;
|
|---|
| 1453 | sco*) #(vi
|
|---|
| 1454 | # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
|
|---|
| 1455 | ;;
|
|---|
| 1456 | solaris*) #(vi
|
|---|
| 1457 | CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
|
|---|
| 1458 | ;;
|
|---|
| 1459 | *)
|
|---|
| 1460 | echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
|
|---|
| 1461 | echo "configure:1462: checking if we should define _XOPEN_SOURCE" >&5
|
|---|
| 1462 | if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
|
|---|
| 1463 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1464 | else
|
|---|
| 1465 |
|
|---|
| 1466 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1467 | #line 1468 "configure"
|
|---|
| 1468 | #include "confdefs.h"
|
|---|
| 1469 | #include <sys/types.h>
|
|---|
| 1470 | int main() {
|
|---|
| 1471 |
|
|---|
| 1472 | #ifndef _XOPEN_SOURCE
|
|---|
| 1473 | make an error
|
|---|
| 1474 | #endif
|
|---|
| 1475 | ; return 0; }
|
|---|
| 1476 | EOF
|
|---|
| 1477 | if { (eval echo configure:1478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1478 | rm -rf conftest*
|
|---|
| 1479 | cf_cv_xopen_source=no
|
|---|
| 1480 | else
|
|---|
| 1481 | echo "configure: failed program was:" >&5
|
|---|
| 1482 | cat conftest.$ac_ext >&5
|
|---|
| 1483 | rm -rf conftest*
|
|---|
| 1484 | cf_save="$CPPFLAGS"
|
|---|
| 1485 | CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
|
|---|
| 1486 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1487 | #line 1488 "configure"
|
|---|
| 1488 | #include "confdefs.h"
|
|---|
| 1489 | #include <sys/types.h>
|
|---|
| 1490 | int main() {
|
|---|
| 1491 |
|
|---|
| 1492 | #ifdef _XOPEN_SOURCE
|
|---|
| 1493 | make an error
|
|---|
| 1494 | #endif
|
|---|
| 1495 | ; return 0; }
|
|---|
| 1496 | EOF
|
|---|
| 1497 | if { (eval echo configure:1498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1498 | rm -rf conftest*
|
|---|
| 1499 | cf_cv_xopen_source=no
|
|---|
| 1500 | else
|
|---|
| 1501 | echo "configure: failed program was:" >&5
|
|---|
| 1502 | cat conftest.$ac_ext >&5
|
|---|
| 1503 | rm -rf conftest*
|
|---|
| 1504 | cf_cv_xopen_source=$cf_XOPEN_SOURCE
|
|---|
| 1505 | fi
|
|---|
| 1506 | rm -f conftest*
|
|---|
| 1507 | CPPFLAGS="$cf_save"
|
|---|
| 1508 |
|
|---|
| 1509 | fi
|
|---|
| 1510 | rm -f conftest*
|
|---|
| 1511 |
|
|---|
| 1512 | fi
|
|---|
| 1513 |
|
|---|
| 1514 | echo "$ac_t""$cf_cv_xopen_source" 1>&6
|
|---|
| 1515 | test "$cf_cv_xopen_source" != no && CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE -D_XOPEN_SOURCE=$cf_cv_xopen_source"
|
|---|
| 1516 |
|
|---|
| 1517 | cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
|
|---|
| 1518 | echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
|
|---|
| 1519 | echo "configure:1520: checking if we should define _POSIX_C_SOURCE" >&5
|
|---|
| 1520 | if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
|
|---|
| 1521 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1522 | else
|
|---|
| 1523 |
|
|---|
| 1524 |
|
|---|
| 1525 | echo "(line 1526) testing if the symbol is already defined go no further ..." 1>&5
|
|---|
| 1526 |
|
|---|
| 1527 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1528 | #line 1529 "configure"
|
|---|
| 1529 | #include "confdefs.h"
|
|---|
| 1530 | #include <sys/types.h>
|
|---|
| 1531 | int main() {
|
|---|
| 1532 |
|
|---|
| 1533 | #ifndef _POSIX_C_SOURCE
|
|---|
| 1534 | make an error
|
|---|
| 1535 | #endif
|
|---|
| 1536 | ; return 0; }
|
|---|
| 1537 | EOF
|
|---|
| 1538 | if { (eval echo configure:1539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1539 | rm -rf conftest*
|
|---|
| 1540 | cf_cv_posix_c_source=no
|
|---|
| 1541 | else
|
|---|
| 1542 | echo "configure: failed program was:" >&5
|
|---|
| 1543 | cat conftest.$ac_ext >&5
|
|---|
| 1544 | rm -rf conftest*
|
|---|
| 1545 | cf_want_posix_source=no
|
|---|
| 1546 | case .$cf_POSIX_C_SOURCE in
|
|---|
| 1547 | .[12]??*)
|
|---|
| 1548 | cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
|
|---|
| 1549 | ;;
|
|---|
| 1550 | .2)
|
|---|
| 1551 | cf_cv_posix_c_source="-U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
|
|---|
| 1552 | cf_want_posix_source=yes
|
|---|
| 1553 | ;;
|
|---|
| 1554 | .*)
|
|---|
| 1555 | cf_want_posix_source=yes
|
|---|
| 1556 | ;;
|
|---|
| 1557 | esac
|
|---|
| 1558 | if test "$cf_want_posix_source" = yes ; then
|
|---|
| 1559 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1560 | #line 1561 "configure"
|
|---|
| 1561 | #include "confdefs.h"
|
|---|
| 1562 | #include <sys/types.h>
|
|---|
| 1563 | int main() {
|
|---|
| 1564 |
|
|---|
| 1565 | #ifdef _POSIX_SOURCE
|
|---|
| 1566 | make an error
|
|---|
| 1567 | #endif
|
|---|
| 1568 | ; return 0; }
|
|---|
| 1569 | EOF
|
|---|
| 1570 | if { (eval echo configure:1571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1571 | :
|
|---|
| 1572 | else
|
|---|
| 1573 | echo "configure: failed program was:" >&5
|
|---|
| 1574 | cat conftest.$ac_ext >&5
|
|---|
| 1575 | rm -rf conftest*
|
|---|
| 1576 | cf_cv_posix_c_source="$cf_cv_posix_c_source -U_POSIX_SOURCE -D_POSIX_SOURCE"
|
|---|
| 1577 | fi
|
|---|
| 1578 | rm -f conftest*
|
|---|
| 1579 | fi
|
|---|
| 1580 |
|
|---|
| 1581 | echo "(line 1582) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
|
|---|
| 1582 |
|
|---|
| 1583 | cf_save="$CPPFLAGS"
|
|---|
| 1584 | CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
|
|---|
| 1585 |
|
|---|
| 1586 | echo "(line 1587) testing if the second compile does not leave our definition intact error ..." 1>&5
|
|---|
| 1587 |
|
|---|
| 1588 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1589 | #line 1590 "configure"
|
|---|
| 1590 | #include "confdefs.h"
|
|---|
| 1591 | #include <sys/types.h>
|
|---|
| 1592 | int main() {
|
|---|
| 1593 |
|
|---|
| 1594 | #ifndef _POSIX_C_SOURCE
|
|---|
| 1595 | make an error
|
|---|
| 1596 | #endif
|
|---|
| 1597 | ; return 0; }
|
|---|
| 1598 | EOF
|
|---|
| 1599 | if { (eval echo configure:1600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1600 | :
|
|---|
| 1601 | else
|
|---|
| 1602 | echo "configure: failed program was:" >&5
|
|---|
| 1603 | cat conftest.$ac_ext >&5
|
|---|
| 1604 | rm -rf conftest*
|
|---|
| 1605 | cf_cv_posix_c_source=no
|
|---|
| 1606 | fi
|
|---|
| 1607 | rm -f conftest*
|
|---|
| 1608 | CPPFLAGS="$cf_save"
|
|---|
| 1609 |
|
|---|
| 1610 | fi
|
|---|
| 1611 | rm -f conftest*
|
|---|
| 1612 |
|
|---|
| 1613 | fi
|
|---|
| 1614 |
|
|---|
| 1615 | echo "$ac_t""$cf_cv_posix_c_source" 1>&6
|
|---|
| 1616 | test "$cf_cv_posix_c_source" != no && CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
|
|---|
| 1617 |
|
|---|
| 1618 | ;;
|
|---|
| 1619 | esac
|
|---|
| 1620 |
|
|---|
| 1621 |
|
|---|
| 1622 |
|
|---|
| 1623 |
|
|---|
| 1624 | # Check whether --with-curses-dir or --without-curses-dir was given.
|
|---|
| 1625 | if test "${with_curses_dir+set}" = set; then
|
|---|
| 1626 | withval="$with_curses_dir"
|
|---|
| 1627 |
|
|---|
| 1628 | case ".$withval" in #(vi
|
|---|
| 1629 | .\$\(*\)*|.\'*\'*) #(vi
|
|---|
| 1630 | ;;
|
|---|
| 1631 | ..|./*|.\\*) #(vi
|
|---|
| 1632 | ;;
|
|---|
| 1633 | .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
|
|---|
| 1634 | ;;
|
|---|
| 1635 | .\${*prefix}*) #(vi
|
|---|
| 1636 | eval withval="$withval"
|
|---|
| 1637 | case ".$withval" in #(vi
|
|---|
| 1638 | .NONE/*)
|
|---|
| 1639 | withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
|
|---|
| 1640 | ;;
|
|---|
| 1641 | esac
|
|---|
| 1642 | ;; #(vi
|
|---|
| 1643 | .NONE/*)
|
|---|
| 1644 | withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
|
|---|
| 1645 | ;;
|
|---|
| 1646 | *)
|
|---|
| 1647 | { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
|
|---|
| 1648 | ;;
|
|---|
| 1649 | esac
|
|---|
| 1650 |
|
|---|
| 1651 | cf_cv_curses_dir=$withval
|
|---|
| 1652 | else
|
|---|
| 1653 | cf_cv_curses_dir=no
|
|---|
| 1654 | fi
|
|---|
| 1655 |
|
|---|
| 1656 |
|
|---|
| 1657 |
|
|---|
| 1658 |
|
|---|
| 1659 | # Check whether --with-5lib or --without-5lib was given.
|
|---|
| 1660 | if test "${with_5lib+set}" = set; then
|
|---|
| 1661 | withval="$with_5lib"
|
|---|
| 1662 | LIBS="-L/usr/5lib $LIBS"
|
|---|
| 1663 | CPPFLAGS="$CPPFLAGS -I/usr/5include"
|
|---|
| 1664 | fi
|
|---|
| 1665 |
|
|---|
| 1666 |
|
|---|
| 1667 |
|
|---|
| 1668 | # Check whether --with-ncursesw or --without-ncursesw was given.
|
|---|
| 1669 | if test "${with_ncursesw+set}" = set; then
|
|---|
| 1670 | withval="$with_ncursesw"
|
|---|
| 1671 | cf_cv_screen=ncursesw
|
|---|
| 1672 | fi
|
|---|
| 1673 |
|
|---|
| 1674 |
|
|---|
| 1675 |
|
|---|
| 1676 | # Check whether --with-ncurses or --without-ncurses was given.
|
|---|
| 1677 | if test "${with_ncurses+set}" = set; then
|
|---|
| 1678 | withval="$with_ncurses"
|
|---|
| 1679 | cf_cv_screen=ncurses
|
|---|
| 1680 | fi
|
|---|
| 1681 |
|
|---|
| 1682 |
|
|---|
| 1683 | case $cf_cv_screen in
|
|---|
| 1684 | curses)
|
|---|
| 1685 |
|
|---|
| 1686 |
|
|---|
| 1687 | echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
|
|---|
| 1688 | echo "configure:1689: checking for extra include directories" >&5
|
|---|
| 1689 | if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
|
|---|
| 1690 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1691 | else
|
|---|
| 1692 |
|
|---|
| 1693 | cf_cv_curses_incdir=no
|
|---|
| 1694 | case $host_os in #(vi
|
|---|
| 1695 | hpux10.*|hpux11.*) #(vi
|
|---|
| 1696 | test -d /usr/include/curses_colr && \
|
|---|
| 1697 | cf_cv_curses_incdir="-I/usr/include/curses_colr"
|
|---|
| 1698 | ;;
|
|---|
| 1699 | sunos3*|sunos4*)
|
|---|
| 1700 | test -d /usr/5lib && \
|
|---|
| 1701 | test -d /usr/5include && \
|
|---|
| 1702 | cf_cv_curses_incdir="-I/usr/5include"
|
|---|
| 1703 | ;;
|
|---|
| 1704 | esac
|
|---|
| 1705 |
|
|---|
| 1706 | fi
|
|---|
| 1707 |
|
|---|
| 1708 | echo "$ac_t""$cf_cv_curses_incdir" 1>&6
|
|---|
| 1709 | test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
|
|---|
| 1710 |
|
|---|
| 1711 | echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
|
|---|
| 1712 | echo "configure:1713: checking if we have identified curses headers" >&5
|
|---|
| 1713 | if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
|
|---|
| 1714 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1715 | else
|
|---|
| 1716 |
|
|---|
| 1717 | cf_cv_ncurses_header=none
|
|---|
| 1718 | for cf_header in \
|
|---|
| 1719 | curses.h \
|
|---|
| 1720 | ncurses.h \
|
|---|
| 1721 | ncurses/curses.h \
|
|---|
| 1722 | ncurses/ncurses.h
|
|---|
| 1723 | do
|
|---|
| 1724 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1725 | #line 1726 "configure"
|
|---|
| 1726 | #include "confdefs.h"
|
|---|
| 1727 | #include <${cf_header}>
|
|---|
| 1728 | int main() {
|
|---|
| 1729 | initscr(); tgoto("?", 0,0)
|
|---|
| 1730 | ; return 0; }
|
|---|
| 1731 | EOF
|
|---|
| 1732 | if { (eval echo configure:1733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 1733 | rm -rf conftest*
|
|---|
| 1734 | cf_cv_ncurses_header=$cf_header; break
|
|---|
| 1735 | else
|
|---|
| 1736 | echo "configure: failed program was:" >&5
|
|---|
| 1737 | cat conftest.$ac_ext >&5
|
|---|
| 1738 | fi
|
|---|
| 1739 | rm -f conftest*
|
|---|
| 1740 | done
|
|---|
| 1741 |
|
|---|
| 1742 | fi
|
|---|
| 1743 |
|
|---|
| 1744 | echo "$ac_t""$cf_cv_ncurses_header" 1>&6
|
|---|
| 1745 |
|
|---|
| 1746 | if test "$cf_cv_ncurses_header" = none ; then
|
|---|
| 1747 | { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
|
|---|
| 1748 | fi
|
|---|
| 1749 |
|
|---|
| 1750 | # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
|
|---|
| 1751 | for ac_hdr in $cf_cv_ncurses_header
|
|---|
| 1752 | do
|
|---|
| 1753 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
|---|
| 1754 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
|---|
| 1755 | echo "configure:1756: checking for $ac_hdr" >&5
|
|---|
| 1756 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|---|
| 1757 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1758 | else
|
|---|
| 1759 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1760 | #line 1761 "configure"
|
|---|
| 1761 | #include "confdefs.h"
|
|---|
| 1762 | #include <$ac_hdr>
|
|---|
| 1763 | EOF
|
|---|
| 1764 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|---|
| 1765 | { (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|---|
| 1766 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|---|
| 1767 | if test -z "$ac_err"; then
|
|---|
| 1768 | rm -rf conftest*
|
|---|
| 1769 | eval "ac_cv_header_$ac_safe=yes"
|
|---|
| 1770 | else
|
|---|
| 1771 | echo "$ac_err" >&5
|
|---|
| 1772 | echo "configure: failed program was:" >&5
|
|---|
| 1773 | cat conftest.$ac_ext >&5
|
|---|
| 1774 | rm -rf conftest*
|
|---|
| 1775 | eval "ac_cv_header_$ac_safe=no"
|
|---|
| 1776 | fi
|
|---|
| 1777 | rm -f conftest*
|
|---|
| 1778 | fi
|
|---|
| 1779 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
|---|
| 1780 | echo "$ac_t""yes" 1>&6
|
|---|
| 1781 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
|
|---|
| 1782 | cat >> confdefs.h <<EOF
|
|---|
| 1783 | #define $ac_tr_hdr 1
|
|---|
| 1784 | EOF
|
|---|
| 1785 |
|
|---|
| 1786 | else
|
|---|
| 1787 | echo "$ac_t""no" 1>&6
|
|---|
| 1788 | fi
|
|---|
| 1789 | done
|
|---|
| 1790 |
|
|---|
| 1791 |
|
|---|
| 1792 |
|
|---|
| 1793 |
|
|---|
| 1794 | echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
|
|---|
| 1795 | echo "configure:1796: checking for ncurses version" >&5
|
|---|
| 1796 | if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
|
|---|
| 1797 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1798 | else
|
|---|
| 1799 |
|
|---|
| 1800 | cf_cv_ncurses_version=no
|
|---|
| 1801 | cf_tempfile=out$$
|
|---|
| 1802 | rm -f $cf_tempfile
|
|---|
| 1803 | if test "$cross_compiling" = yes; then
|
|---|
| 1804 |
|
|---|
| 1805 |
|
|---|
| 1806 | # This will not work if the preprocessor splits the line after the
|
|---|
| 1807 | # Autoconf token. The 'unproto' program does that.
|
|---|
| 1808 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1809 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 1810 | #undef Autoconf
|
|---|
| 1811 | #ifdef NCURSES_VERSION
|
|---|
| 1812 | Autoconf NCURSES_VERSION
|
|---|
| 1813 | #else
|
|---|
| 1814 | #ifdef __NCURSES_H
|
|---|
| 1815 | Autoconf "old"
|
|---|
| 1816 | #endif
|
|---|
| 1817 | ;
|
|---|
| 1818 | #endif
|
|---|
| 1819 | EOF
|
|---|
| 1820 | cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
|
|---|
| 1821 | { (eval echo configure:1822: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
|
|---|
| 1822 | if test -f conftest.out ; then
|
|---|
| 1823 | cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
|
|---|
| 1824 | test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
|
|---|
| 1825 | rm -f conftest.out
|
|---|
| 1826 | fi
|
|---|
| 1827 |
|
|---|
| 1828 | else
|
|---|
| 1829 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1830 | #line 1831 "configure"
|
|---|
| 1831 | #include "confdefs.h"
|
|---|
| 1832 |
|
|---|
| 1833 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 1834 | #include <stdio.h>
|
|---|
| 1835 | int main()
|
|---|
| 1836 | {
|
|---|
| 1837 | FILE *fp = fopen("$cf_tempfile", "w");
|
|---|
| 1838 | #ifdef NCURSES_VERSION
|
|---|
| 1839 | # ifdef NCURSES_VERSION_PATCH
|
|---|
| 1840 | fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
|
|---|
| 1841 | # else
|
|---|
| 1842 | fprintf(fp, "%s\n", NCURSES_VERSION);
|
|---|
| 1843 | # endif
|
|---|
| 1844 | #else
|
|---|
| 1845 | # ifdef __NCURSES_H
|
|---|
| 1846 | fprintf(fp, "old\n");
|
|---|
| 1847 | # else
|
|---|
| 1848 | make an error
|
|---|
| 1849 | # endif
|
|---|
| 1850 | #endif
|
|---|
| 1851 | exit(0);
|
|---|
| 1852 | }
|
|---|
| 1853 | EOF
|
|---|
| 1854 | if { (eval echo configure:1855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|---|
| 1855 | then
|
|---|
| 1856 |
|
|---|
| 1857 | cf_cv_ncurses_version=`cat $cf_tempfile`
|
|---|
| 1858 | else
|
|---|
| 1859 | echo "configure: failed program was:" >&5
|
|---|
| 1860 | cat conftest.$ac_ext >&5
|
|---|
| 1861 | fi
|
|---|
| 1862 | rm -fr conftest*
|
|---|
| 1863 | fi
|
|---|
| 1864 |
|
|---|
| 1865 | rm -f $cf_tempfile
|
|---|
| 1866 |
|
|---|
| 1867 | fi
|
|---|
| 1868 |
|
|---|
| 1869 | echo "$ac_t""$cf_cv_ncurses_version" 1>&6
|
|---|
| 1870 | test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
|
|---|
| 1871 | #define NCURSES 1
|
|---|
| 1872 | EOF
|
|---|
| 1873 |
|
|---|
| 1874 |
|
|---|
| 1875 |
|
|---|
| 1876 |
|
|---|
| 1877 | echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
|
|---|
| 1878 | echo "configure:1879: checking if we have identified curses libraries" >&5
|
|---|
| 1879 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1880 | #line 1881 "configure"
|
|---|
| 1881 | #include "confdefs.h"
|
|---|
| 1882 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 1883 | int main() {
|
|---|
| 1884 | initscr(); tgoto("?", 0,0)
|
|---|
| 1885 | ; return 0; }
|
|---|
| 1886 | EOF
|
|---|
| 1887 | if { (eval echo configure:1888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 1888 | rm -rf conftest*
|
|---|
| 1889 | cf_result=yes
|
|---|
| 1890 | else
|
|---|
| 1891 | echo "configure: failed program was:" >&5
|
|---|
| 1892 | cat conftest.$ac_ext >&5
|
|---|
| 1893 | rm -rf conftest*
|
|---|
| 1894 | cf_result=no
|
|---|
| 1895 | fi
|
|---|
| 1896 | rm -f conftest*
|
|---|
| 1897 | echo "$ac_t""$cf_result" 1>&6
|
|---|
| 1898 |
|
|---|
| 1899 | if test "$cf_result" = no ; then
|
|---|
| 1900 | case $host_os in #(vi
|
|---|
| 1901 | freebsd*) #(vi
|
|---|
| 1902 | echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
|
|---|
| 1903 | echo "configure:1904: checking for tgoto in -lmytinfo" >&5
|
|---|
| 1904 | ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
|
|---|
| 1905 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 1906 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1907 | else
|
|---|
| 1908 | ac_save_LIBS="$LIBS"
|
|---|
| 1909 | LIBS="-lmytinfo $LIBS"
|
|---|
| 1910 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1911 | #line 1912 "configure"
|
|---|
| 1912 | #include "confdefs.h"
|
|---|
| 1913 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 1914 | /* We use char because int might match the return type of a gcc2
|
|---|
| 1915 | builtin and then its argument prototype would still apply. */
|
|---|
| 1916 | char tgoto();
|
|---|
| 1917 |
|
|---|
| 1918 | int main() {
|
|---|
| 1919 | tgoto()
|
|---|
| 1920 | ; return 0; }
|
|---|
| 1921 | EOF
|
|---|
| 1922 | if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 1923 | rm -rf conftest*
|
|---|
| 1924 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 1925 | else
|
|---|
| 1926 | echo "configure: failed program was:" >&5
|
|---|
| 1927 | cat conftest.$ac_ext >&5
|
|---|
| 1928 | rm -rf conftest*
|
|---|
| 1929 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 1930 | fi
|
|---|
| 1931 | rm -f conftest*
|
|---|
| 1932 | LIBS="$ac_save_LIBS"
|
|---|
| 1933 |
|
|---|
| 1934 | fi
|
|---|
| 1935 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 1936 | echo "$ac_t""yes" 1>&6
|
|---|
| 1937 | LIBS="-lmytinfo $LIBS"
|
|---|
| 1938 | else
|
|---|
| 1939 | echo "$ac_t""no" 1>&6
|
|---|
| 1940 | fi
|
|---|
| 1941 |
|
|---|
| 1942 | ;;
|
|---|
| 1943 | hpux10.*|hpux11.*) #(vi
|
|---|
| 1944 | echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
|
|---|
| 1945 | echo "configure:1946: checking for initscr in -lcur_colr" >&5
|
|---|
| 1946 | ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
|
|---|
| 1947 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 1948 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1949 | else
|
|---|
| 1950 | ac_save_LIBS="$LIBS"
|
|---|
| 1951 | LIBS="-lcur_colr $LIBS"
|
|---|
| 1952 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1953 | #line 1954 "configure"
|
|---|
| 1954 | #include "confdefs.h"
|
|---|
| 1955 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 1956 | /* We use char because int might match the return type of a gcc2
|
|---|
| 1957 | builtin and then its argument prototype would still apply. */
|
|---|
| 1958 | char initscr();
|
|---|
| 1959 |
|
|---|
| 1960 | int main() {
|
|---|
| 1961 | initscr()
|
|---|
| 1962 | ; return 0; }
|
|---|
| 1963 | EOF
|
|---|
| 1964 | if { (eval echo configure:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 1965 | rm -rf conftest*
|
|---|
| 1966 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 1967 | else
|
|---|
| 1968 | echo "configure: failed program was:" >&5
|
|---|
| 1969 | cat conftest.$ac_ext >&5
|
|---|
| 1970 | rm -rf conftest*
|
|---|
| 1971 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 1972 | fi
|
|---|
| 1973 | rm -f conftest*
|
|---|
| 1974 | LIBS="$ac_save_LIBS"
|
|---|
| 1975 |
|
|---|
| 1976 | fi
|
|---|
| 1977 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 1978 | echo "$ac_t""yes" 1>&6
|
|---|
| 1979 |
|
|---|
| 1980 | LIBS="-lcur_colr $LIBS"
|
|---|
| 1981 | ac_cv_func_initscr=yes
|
|---|
| 1982 |
|
|---|
| 1983 | else
|
|---|
| 1984 | echo "$ac_t""no" 1>&6
|
|---|
| 1985 |
|
|---|
| 1986 | echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
|
|---|
| 1987 | echo "configure:1988: checking for initscr in -lHcurses" >&5
|
|---|
| 1988 | ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
|
|---|
| 1989 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 1990 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 1991 | else
|
|---|
| 1992 | ac_save_LIBS="$LIBS"
|
|---|
| 1993 | LIBS="-lHcurses $LIBS"
|
|---|
| 1994 | cat > conftest.$ac_ext <<EOF
|
|---|
| 1995 | #line 1996 "configure"
|
|---|
| 1996 | #include "confdefs.h"
|
|---|
| 1997 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 1998 | /* We use char because int might match the return type of a gcc2
|
|---|
| 1999 | builtin and then its argument prototype would still apply. */
|
|---|
| 2000 | char initscr();
|
|---|
| 2001 |
|
|---|
| 2002 | int main() {
|
|---|
| 2003 | initscr()
|
|---|
| 2004 | ; return 0; }
|
|---|
| 2005 | EOF
|
|---|
| 2006 | if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2007 | rm -rf conftest*
|
|---|
| 2008 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 2009 | else
|
|---|
| 2010 | echo "configure: failed program was:" >&5
|
|---|
| 2011 | cat conftest.$ac_ext >&5
|
|---|
| 2012 | rm -rf conftest*
|
|---|
| 2013 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 2014 | fi
|
|---|
| 2015 | rm -f conftest*
|
|---|
| 2016 | LIBS="$ac_save_LIBS"
|
|---|
| 2017 |
|
|---|
| 2018 | fi
|
|---|
| 2019 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 2020 | echo "$ac_t""yes" 1>&6
|
|---|
| 2021 |
|
|---|
| 2022 | # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
|
|---|
| 2023 | LIBS="-lHcurses $LIBS"
|
|---|
| 2024 | CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
|
|---|
| 2025 | ac_cv_func_initscr=yes
|
|---|
| 2026 |
|
|---|
| 2027 | else
|
|---|
| 2028 | echo "$ac_t""no" 1>&6
|
|---|
| 2029 | fi
|
|---|
| 2030 |
|
|---|
| 2031 | fi
|
|---|
| 2032 |
|
|---|
| 2033 | ;;
|
|---|
| 2034 | linux*) # Suse Linux does not follow /usr/lib convention
|
|---|
| 2035 | LIBS="$LIBS -L/lib"
|
|---|
| 2036 | ;;
|
|---|
| 2037 | sunos3*|sunos4*)
|
|---|
| 2038 | test -d /usr/5lib && \
|
|---|
| 2039 | LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
|
|---|
| 2040 | ac_cv_func_initscr=yes
|
|---|
| 2041 | ;;
|
|---|
| 2042 | esac
|
|---|
| 2043 |
|
|---|
| 2044 | if test ".$ac_cv_func_initscr" != .yes ; then
|
|---|
| 2045 | cf_save_LIBS="$LIBS"
|
|---|
| 2046 | cf_term_lib=""
|
|---|
| 2047 | cf_curs_lib=""
|
|---|
| 2048 |
|
|---|
| 2049 | if test ".${cf_cv_ncurses_version-no}" != .no
|
|---|
| 2050 | then
|
|---|
| 2051 | cf_check_list="ncurses curses cursesX"
|
|---|
| 2052 | else
|
|---|
| 2053 | cf_check_list="cursesX curses ncurses"
|
|---|
| 2054 | fi
|
|---|
| 2055 |
|
|---|
| 2056 | # Check for library containing tgoto. Do this before curses library
|
|---|
| 2057 | # because it may be needed to link the test-case for initscr.
|
|---|
| 2058 | echo $ac_n "checking for tgoto""... $ac_c" 1>&6
|
|---|
| 2059 | echo "configure:2060: checking for tgoto" >&5
|
|---|
| 2060 | if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
|
|---|
| 2061 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2062 | else
|
|---|
| 2063 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2064 | #line 2065 "configure"
|
|---|
| 2065 | #include "confdefs.h"
|
|---|
| 2066 | /* System header to define __stub macros and hopefully few prototypes,
|
|---|
| 2067 | which can conflict with char tgoto(); below. */
|
|---|
| 2068 | #include <assert.h>
|
|---|
| 2069 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 2070 | /* We use char because int might match the return type of a gcc2
|
|---|
| 2071 | builtin and then its argument prototype would still apply. */
|
|---|
| 2072 | char tgoto();
|
|---|
| 2073 |
|
|---|
| 2074 | int main() {
|
|---|
| 2075 |
|
|---|
| 2076 | /* The GNU C library defines this for functions which it implements
|
|---|
| 2077 | to always fail with ENOSYS. Some functions are actually named
|
|---|
| 2078 | something starting with __ and the normal name is an alias. */
|
|---|
| 2079 | #if defined (__stub_tgoto) || defined (__stub___tgoto)
|
|---|
| 2080 | choke me
|
|---|
| 2081 | #else
|
|---|
| 2082 | tgoto();
|
|---|
| 2083 | #endif
|
|---|
| 2084 |
|
|---|
| 2085 | ; return 0; }
|
|---|
| 2086 | EOF
|
|---|
| 2087 | if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2088 | rm -rf conftest*
|
|---|
| 2089 | eval "ac_cv_func_tgoto=yes"
|
|---|
| 2090 | else
|
|---|
| 2091 | echo "configure: failed program was:" >&5
|
|---|
| 2092 | cat conftest.$ac_ext >&5
|
|---|
| 2093 | rm -rf conftest*
|
|---|
| 2094 | eval "ac_cv_func_tgoto=no"
|
|---|
| 2095 | fi
|
|---|
| 2096 | rm -f conftest*
|
|---|
| 2097 | fi
|
|---|
| 2098 |
|
|---|
| 2099 | if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
|
|---|
| 2100 | echo "$ac_t""yes" 1>&6
|
|---|
| 2101 | cf_term_lib=predefined
|
|---|
| 2102 | else
|
|---|
| 2103 | echo "$ac_t""no" 1>&6
|
|---|
| 2104 |
|
|---|
| 2105 | for cf_term_lib in $cf_check_list termcap termlib unknown
|
|---|
| 2106 | do
|
|---|
| 2107 | echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
|
|---|
| 2108 | echo "configure:2109: checking for tgoto in -l$cf_term_lib" >&5
|
|---|
| 2109 | ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
|
|---|
| 2110 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 2111 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2112 | else
|
|---|
| 2113 | ac_save_LIBS="$LIBS"
|
|---|
| 2114 | LIBS="-l$cf_term_lib $LIBS"
|
|---|
| 2115 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2116 | #line 2117 "configure"
|
|---|
| 2117 | #include "confdefs.h"
|
|---|
| 2118 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 2119 | /* We use char because int might match the return type of a gcc2
|
|---|
| 2120 | builtin and then its argument prototype would still apply. */
|
|---|
| 2121 | char tgoto();
|
|---|
| 2122 |
|
|---|
| 2123 | int main() {
|
|---|
| 2124 | tgoto()
|
|---|
| 2125 | ; return 0; }
|
|---|
| 2126 | EOF
|
|---|
| 2127 | if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2128 | rm -rf conftest*
|
|---|
| 2129 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 2130 | else
|
|---|
| 2131 | echo "configure: failed program was:" >&5
|
|---|
| 2132 | cat conftest.$ac_ext >&5
|
|---|
| 2133 | rm -rf conftest*
|
|---|
| 2134 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 2135 | fi
|
|---|
| 2136 | rm -f conftest*
|
|---|
| 2137 | LIBS="$ac_save_LIBS"
|
|---|
| 2138 |
|
|---|
| 2139 | fi
|
|---|
| 2140 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 2141 | echo "$ac_t""yes" 1>&6
|
|---|
| 2142 | break
|
|---|
| 2143 | else
|
|---|
| 2144 | echo "$ac_t""no" 1>&6
|
|---|
| 2145 | fi
|
|---|
| 2146 |
|
|---|
| 2147 | done
|
|---|
| 2148 |
|
|---|
| 2149 | fi
|
|---|
| 2150 |
|
|---|
| 2151 |
|
|---|
| 2152 | # Check for library containing initscr
|
|---|
| 2153 | test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
|
|---|
| 2154 | for cf_curs_lib in $cf_check_list xcurses jcurses unknown
|
|---|
| 2155 | do
|
|---|
| 2156 | echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
|
|---|
| 2157 | echo "configure:2158: checking for initscr in -l$cf_curs_lib" >&5
|
|---|
| 2158 | ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
|
|---|
| 2159 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 2160 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2161 | else
|
|---|
| 2162 | ac_save_LIBS="$LIBS"
|
|---|
| 2163 | LIBS="-l$cf_curs_lib $LIBS"
|
|---|
| 2164 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2165 | #line 2166 "configure"
|
|---|
| 2166 | #include "confdefs.h"
|
|---|
| 2167 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 2168 | /* We use char because int might match the return type of a gcc2
|
|---|
| 2169 | builtin and then its argument prototype would still apply. */
|
|---|
| 2170 | char initscr();
|
|---|
| 2171 |
|
|---|
| 2172 | int main() {
|
|---|
| 2173 | initscr()
|
|---|
| 2174 | ; return 0; }
|
|---|
| 2175 | EOF
|
|---|
| 2176 | if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2177 | rm -rf conftest*
|
|---|
| 2178 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 2179 | else
|
|---|
| 2180 | echo "configure: failed program was:" >&5
|
|---|
| 2181 | cat conftest.$ac_ext >&5
|
|---|
| 2182 | rm -rf conftest*
|
|---|
| 2183 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 2184 | fi
|
|---|
| 2185 | rm -f conftest*
|
|---|
| 2186 | LIBS="$ac_save_LIBS"
|
|---|
| 2187 |
|
|---|
| 2188 | fi
|
|---|
| 2189 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 2190 | echo "$ac_t""yes" 1>&6
|
|---|
| 2191 | break
|
|---|
| 2192 | else
|
|---|
| 2193 | echo "$ac_t""no" 1>&6
|
|---|
| 2194 | fi
|
|---|
| 2195 |
|
|---|
| 2196 | done
|
|---|
| 2197 | test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
|
|---|
| 2198 |
|
|---|
| 2199 | LIBS="-l$cf_curs_lib $cf_save_LIBS"
|
|---|
| 2200 | if test "$cf_term_lib" = unknown ; then
|
|---|
| 2201 | echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
|
|---|
| 2202 | echo "configure:2203: checking if we can link with $cf_curs_lib library" >&5
|
|---|
| 2203 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2204 | #line 2205 "configure"
|
|---|
| 2205 | #include "confdefs.h"
|
|---|
| 2206 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 2207 | int main() {
|
|---|
| 2208 | initscr()
|
|---|
| 2209 | ; return 0; }
|
|---|
| 2210 | EOF
|
|---|
| 2211 | if { (eval echo configure:2212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2212 | rm -rf conftest*
|
|---|
| 2213 | cf_result=yes
|
|---|
| 2214 | else
|
|---|
| 2215 | echo "configure: failed program was:" >&5
|
|---|
| 2216 | cat conftest.$ac_ext >&5
|
|---|
| 2217 | rm -rf conftest*
|
|---|
| 2218 | cf_result=no
|
|---|
| 2219 | fi
|
|---|
| 2220 | rm -f conftest*
|
|---|
| 2221 | echo "$ac_t""$cf_result" 1>&6
|
|---|
| 2222 | test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
|
|---|
| 2223 | elif test "$cf_curs_lib" = "$cf_term_lib" ; then
|
|---|
| 2224 | :
|
|---|
| 2225 | elif test "$cf_term_lib" != predefined ; then
|
|---|
| 2226 | echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
|
|---|
| 2227 | echo "configure:2228: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
|
|---|
| 2228 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2229 | #line 2230 "configure"
|
|---|
| 2230 | #include "confdefs.h"
|
|---|
| 2231 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 2232 | int main() {
|
|---|
| 2233 | initscr(); tgoto((char *)0, 0, 0);
|
|---|
| 2234 | ; return 0; }
|
|---|
| 2235 | EOF
|
|---|
| 2236 | if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2237 | rm -rf conftest*
|
|---|
| 2238 | cf_result=no
|
|---|
| 2239 | else
|
|---|
| 2240 | echo "configure: failed program was:" >&5
|
|---|
| 2241 | cat conftest.$ac_ext >&5
|
|---|
| 2242 | rm -rf conftest*
|
|---|
| 2243 |
|
|---|
| 2244 | LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
|
|---|
| 2245 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2246 | #line 2247 "configure"
|
|---|
| 2247 | #include "confdefs.h"
|
|---|
| 2248 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 2249 | int main() {
|
|---|
| 2250 | initscr()
|
|---|
| 2251 | ; return 0; }
|
|---|
| 2252 | EOF
|
|---|
| 2253 | if { (eval echo configure:2254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2254 | rm -rf conftest*
|
|---|
| 2255 | cf_result=yes
|
|---|
| 2256 | else
|
|---|
| 2257 | echo "configure: failed program was:" >&5
|
|---|
| 2258 | cat conftest.$ac_ext >&5
|
|---|
| 2259 | rm -rf conftest*
|
|---|
| 2260 | cf_result=error
|
|---|
| 2261 | fi
|
|---|
| 2262 | rm -f conftest*
|
|---|
| 2263 |
|
|---|
| 2264 | fi
|
|---|
| 2265 | rm -f conftest*
|
|---|
| 2266 | echo "$ac_t""$cf_result" 1>&6
|
|---|
| 2267 | fi
|
|---|
| 2268 | fi
|
|---|
| 2269 | fi
|
|---|
| 2270 |
|
|---|
| 2271 |
|
|---|
| 2272 | ;;
|
|---|
| 2273 | ncurses)
|
|---|
| 2274 |
|
|---|
| 2275 |
|
|---|
| 2276 | cf_ncuhdr_root=ncurses
|
|---|
| 2277 |
|
|---|
| 2278 | test -n "$cf_cv_curses_dir" && \
|
|---|
| 2279 | test "$cf_cv_curses_dir" != "no" && \
|
|---|
| 2280 | CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
|
|---|
| 2281 |
|
|---|
| 2282 | echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
|
|---|
| 2283 | echo "configure:2284: checking for $cf_ncuhdr_root header in include-path" >&5
|
|---|
| 2284 | if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
|
|---|
| 2285 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2286 | else
|
|---|
| 2287 |
|
|---|
| 2288 | cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
|
|---|
| 2289 | ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
|
|---|
| 2290 | for cf_header in $cf_header_list
|
|---|
| 2291 | do
|
|---|
| 2292 |
|
|---|
| 2293 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2294 | #line 2295 "configure"
|
|---|
| 2295 | #include "confdefs.h"
|
|---|
| 2296 |
|
|---|
| 2297 |
|
|---|
| 2298 | #include <$cf_header>
|
|---|
| 2299 | int main() {
|
|---|
| 2300 |
|
|---|
| 2301 | #ifdef NCURSES_VERSION
|
|---|
| 2302 |
|
|---|
| 2303 | printf("%s\n", NCURSES_VERSION);
|
|---|
| 2304 | #else
|
|---|
| 2305 | #ifdef __NCURSES_H
|
|---|
| 2306 | printf("old\n");
|
|---|
| 2307 | #else
|
|---|
| 2308 | make an error
|
|---|
| 2309 | #endif
|
|---|
| 2310 | #endif
|
|---|
| 2311 |
|
|---|
| 2312 |
|
|---|
| 2313 | ; return 0; }
|
|---|
| 2314 | EOF
|
|---|
| 2315 | if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 2316 | rm -rf conftest*
|
|---|
| 2317 | cf_cv_ncurses_h=$cf_header
|
|---|
| 2318 |
|
|---|
| 2319 | else
|
|---|
| 2320 | echo "configure: failed program was:" >&5
|
|---|
| 2321 | cat conftest.$ac_ext >&5
|
|---|
| 2322 | rm -rf conftest*
|
|---|
| 2323 | cf_cv_ncurses_h=no
|
|---|
| 2324 | fi
|
|---|
| 2325 | rm -f conftest*
|
|---|
| 2326 |
|
|---|
| 2327 | test "$cf_cv_ncurses_h" != no && break
|
|---|
| 2328 | done
|
|---|
| 2329 |
|
|---|
| 2330 | fi
|
|---|
| 2331 |
|
|---|
| 2332 | echo "$ac_t""$cf_cv_ncurses_h" 1>&6
|
|---|
| 2333 |
|
|---|
| 2334 | if test "$cf_cv_ncurses_h" != no ; then
|
|---|
| 2335 | cf_cv_ncurses_header=$cf_cv_ncurses_h
|
|---|
| 2336 | else
|
|---|
| 2337 | echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
|
|---|
| 2338 | echo "configure:2339: checking for $cf_ncuhdr_root include-path" >&5
|
|---|
| 2339 | if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
|
|---|
| 2340 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2341 | else
|
|---|
| 2342 |
|
|---|
| 2343 | test -n "$verbose" && echo
|
|---|
| 2344 | cf_search=""
|
|---|
| 2345 |
|
|---|
| 2346 | test -d $HOME && {
|
|---|
| 2347 | test -n "$verbose" && echo " ... testing include-directories under $HOME"
|
|---|
| 2348 | test -d $HOME/include && cf_search="$cf_search $HOME/include"
|
|---|
| 2349 | test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
|
|---|
| 2350 | test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
|
|---|
| 2351 | }
|
|---|
| 2352 |
|
|---|
| 2353 | # For other stuff under the home directory, it should be sufficient to put
|
|---|
| 2354 | # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
|
|---|
| 2355 | test -d $HOME/$cf_ncuhdr_root && {
|
|---|
| 2356 | test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
|
|---|
| 2357 | test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
|
|---|
| 2358 | test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
|
|---|
| 2359 | }
|
|---|
| 2360 |
|
|---|
| 2361 | test "$prefix" != /usr/local && \
|
|---|
| 2362 | test -d /usr/local && {
|
|---|
| 2363 | test -n "$verbose" && echo " ... testing include-directories under /usr/local"
|
|---|
| 2364 | test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
|
|---|
| 2365 | test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
|
|---|
| 2366 | test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
|
|---|
| 2367 | test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
|
|---|
| 2368 | test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
|
|---|
| 2369 | }
|
|---|
| 2370 |
|
|---|
| 2371 | test "$prefix" != NONE && \
|
|---|
| 2372 | test -d $prefix && {
|
|---|
| 2373 | test -n "$verbose" && echo " ... testing include-directories under $prefix"
|
|---|
| 2374 | test -d $prefix/include && cf_search="$cf_search $prefix/include"
|
|---|
| 2375 | test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
|
|---|
| 2376 | test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
|
|---|
| 2377 | test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
|
|---|
| 2378 | test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
|
|---|
| 2379 | }
|
|---|
| 2380 |
|
|---|
| 2381 | test "$prefix" != /opt && \
|
|---|
| 2382 | test -d /opt && {
|
|---|
| 2383 | test -n "$verbose" && echo " ... testing include-directories under /opt"
|
|---|
| 2384 | test -d /opt/include && cf_search="$cf_search /opt/include"
|
|---|
| 2385 | test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
|
|---|
| 2386 | test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
|
|---|
| 2387 | test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
|
|---|
| 2388 | test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
|
|---|
| 2389 | }
|
|---|
| 2390 |
|
|---|
| 2391 | test "$prefix" != /usr && \
|
|---|
| 2392 | test -d /usr && {
|
|---|
| 2393 | test -n "$verbose" && echo " ... testing include-directories under /usr"
|
|---|
| 2394 | test -d /usr/include && cf_search="$cf_search /usr/include"
|
|---|
| 2395 | test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
|
|---|
| 2396 | test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
|
|---|
| 2397 | test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
|
|---|
| 2398 | }
|
|---|
| 2399 |
|
|---|
| 2400 | test "$includedir" != NONE && \
|
|---|
| 2401 | test "$includedir" != "/usr/include" && \
|
|---|
| 2402 | test -d "$includedir" && {
|
|---|
| 2403 | test -d $includedir && cf_search="$cf_search $includedir"
|
|---|
| 2404 | test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
|
|---|
| 2405 | }
|
|---|
| 2406 |
|
|---|
| 2407 | test "$oldincludedir" != NONE && \
|
|---|
| 2408 | test "$oldincludedir" != "/usr/include" && \
|
|---|
| 2409 | test -d "$oldincludedir" && {
|
|---|
| 2410 | test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
|
|---|
| 2411 | test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
|
|---|
| 2412 | }
|
|---|
| 2413 |
|
|---|
| 2414 |
|
|---|
| 2415 | test -n "$verbose" && echo search path $cf_search
|
|---|
| 2416 | cf_save2_CPPFLAGS="$CPPFLAGS"
|
|---|
| 2417 | for cf_incdir in $cf_search
|
|---|
| 2418 | do
|
|---|
| 2419 |
|
|---|
| 2420 | for cf_add_incdir in $cf_incdir
|
|---|
| 2421 | do
|
|---|
| 2422 | while true
|
|---|
| 2423 | do
|
|---|
| 2424 | case $cf_add_incdir in
|
|---|
| 2425 | /usr/include) # (vi
|
|---|
| 2426 | ;;
|
|---|
| 2427 | /usr/local/include) # (vi
|
|---|
| 2428 | if test "$GCC" = yes
|
|---|
| 2429 | then
|
|---|
| 2430 | cf_save_CPPFLAGS="$CPPFLAGS"
|
|---|
| 2431 | CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
|
|---|
| 2432 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2433 | #line 2434 "configure"
|
|---|
| 2434 | #include "confdefs.h"
|
|---|
| 2435 | #include <stdio.h>
|
|---|
| 2436 | int main() {
|
|---|
| 2437 | printf("Hello")
|
|---|
| 2438 | ; return 0; }
|
|---|
| 2439 | EOF
|
|---|
| 2440 | if { (eval echo configure:2441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 2441 | :
|
|---|
| 2442 | else
|
|---|
| 2443 | echo "configure: failed program was:" >&5
|
|---|
| 2444 | cat conftest.$ac_ext >&5
|
|---|
| 2445 | rm -rf conftest*
|
|---|
| 2446 | CPPFLAGS="$cf_save_CPPFLAGS"
|
|---|
| 2447 | fi
|
|---|
| 2448 | rm -f conftest*
|
|---|
| 2449 | fi
|
|---|
| 2450 | ;;
|
|---|
| 2451 | *) # (vi
|
|---|
| 2452 | CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
|
|---|
| 2453 | ;;
|
|---|
| 2454 | esac
|
|---|
| 2455 | cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
|
|---|
| 2456 | test "$cf_top_incdir" = "$cf_add_incdir" && break
|
|---|
| 2457 | cf_add_incdir="$cf_top_incdir"
|
|---|
| 2458 | done
|
|---|
| 2459 | done
|
|---|
| 2460 |
|
|---|
| 2461 | for cf_header in \
|
|---|
| 2462 | ncurses.h \
|
|---|
| 2463 | curses.h
|
|---|
| 2464 | do
|
|---|
| 2465 |
|
|---|
| 2466 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2467 | #line 2468 "configure"
|
|---|
| 2468 | #include "confdefs.h"
|
|---|
| 2469 |
|
|---|
| 2470 |
|
|---|
| 2471 | #include <$cf_header>
|
|---|
| 2472 | int main() {
|
|---|
| 2473 |
|
|---|
| 2474 | #ifdef NCURSES_VERSION
|
|---|
| 2475 |
|
|---|
| 2476 | printf("%s\n", NCURSES_VERSION);
|
|---|
| 2477 | #else
|
|---|
| 2478 | #ifdef __NCURSES_H
|
|---|
| 2479 | printf("old\n");
|
|---|
| 2480 | #else
|
|---|
| 2481 | make an error
|
|---|
| 2482 | #endif
|
|---|
| 2483 | #endif
|
|---|
| 2484 |
|
|---|
| 2485 |
|
|---|
| 2486 | ; return 0; }
|
|---|
| 2487 | EOF
|
|---|
| 2488 | if { (eval echo configure:2489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 2489 | rm -rf conftest*
|
|---|
| 2490 | cf_cv_ncurses_h2=$cf_header
|
|---|
| 2491 |
|
|---|
| 2492 | else
|
|---|
| 2493 | echo "configure: failed program was:" >&5
|
|---|
| 2494 | cat conftest.$ac_ext >&5
|
|---|
| 2495 | rm -rf conftest*
|
|---|
| 2496 | cf_cv_ncurses_h2=no
|
|---|
| 2497 | fi
|
|---|
| 2498 | rm -f conftest*
|
|---|
| 2499 |
|
|---|
| 2500 | if test "$cf_cv_ncurses_h2" != no ; then
|
|---|
| 2501 | cf_cv_ncurses_h2=$cf_incdir/$cf_header
|
|---|
| 2502 | test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
|
|---|
| 2503 | break
|
|---|
| 2504 | fi
|
|---|
| 2505 | test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
|
|---|
| 2506 | done
|
|---|
| 2507 | CPPFLAGS="$cf_save2_CPPFLAGS"
|
|---|
| 2508 | test "$cf_cv_ncurses_h2" != no && break
|
|---|
| 2509 | done
|
|---|
| 2510 | test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
|
|---|
| 2511 |
|
|---|
| 2512 | fi
|
|---|
| 2513 |
|
|---|
| 2514 | echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
|
|---|
| 2515 |
|
|---|
| 2516 | cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
|
|---|
| 2517 | cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
|
|---|
| 2518 | if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
|
|---|
| 2519 | cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
|
|---|
| 2520 | fi
|
|---|
| 2521 |
|
|---|
| 2522 | for cf_add_incdir in $cf_1st_incdir
|
|---|
| 2523 | do
|
|---|
| 2524 | while true
|
|---|
| 2525 | do
|
|---|
| 2526 | case $cf_add_incdir in
|
|---|
| 2527 | /usr/include) # (vi
|
|---|
| 2528 | ;;
|
|---|
| 2529 | /usr/local/include) # (vi
|
|---|
| 2530 | if test "$GCC" = yes
|
|---|
| 2531 | then
|
|---|
| 2532 | cf_save_CPPFLAGS="$CPPFLAGS"
|
|---|
| 2533 | CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
|
|---|
| 2534 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2535 | #line 2536 "configure"
|
|---|
| 2536 | #include "confdefs.h"
|
|---|
| 2537 | #include <stdio.h>
|
|---|
| 2538 | int main() {
|
|---|
| 2539 | printf("Hello")
|
|---|
| 2540 | ; return 0; }
|
|---|
| 2541 | EOF
|
|---|
| 2542 | if { (eval echo configure:2543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 2543 | :
|
|---|
| 2544 | else
|
|---|
| 2545 | echo "configure: failed program was:" >&5
|
|---|
| 2546 | cat conftest.$ac_ext >&5
|
|---|
| 2547 | rm -rf conftest*
|
|---|
| 2548 | CPPFLAGS="$cf_save_CPPFLAGS"
|
|---|
| 2549 | fi
|
|---|
| 2550 | rm -f conftest*
|
|---|
| 2551 | fi
|
|---|
| 2552 | ;;
|
|---|
| 2553 | *) # (vi
|
|---|
| 2554 | CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
|
|---|
| 2555 | ;;
|
|---|
| 2556 | esac
|
|---|
| 2557 | cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
|
|---|
| 2558 | test "$cf_top_incdir" = "$cf_add_incdir" && break
|
|---|
| 2559 | cf_add_incdir="$cf_top_incdir"
|
|---|
| 2560 | done
|
|---|
| 2561 | done
|
|---|
| 2562 |
|
|---|
| 2563 |
|
|---|
| 2564 | fi
|
|---|
| 2565 |
|
|---|
| 2566 | cat >> confdefs.h <<\EOF
|
|---|
| 2567 | #define NCURSES 1
|
|---|
| 2568 | EOF
|
|---|
| 2569 |
|
|---|
| 2570 |
|
|---|
| 2571 | case $cf_cv_ncurses_header in # (vi
|
|---|
| 2572 | *ncurses.h)
|
|---|
| 2573 | cat >> confdefs.h <<\EOF
|
|---|
| 2574 | #define HAVE_NCURSES_H 1
|
|---|
| 2575 | EOF
|
|---|
| 2576 |
|
|---|
| 2577 | ;;
|
|---|
| 2578 | esac
|
|---|
| 2579 |
|
|---|
| 2580 | case $cf_cv_ncurses_header in # (vi
|
|---|
| 2581 | ncurses/curses.h|ncurses/ncurses.h)
|
|---|
| 2582 | cat >> confdefs.h <<\EOF
|
|---|
| 2583 | #define HAVE_NCURSES_NCURSES_H 1
|
|---|
| 2584 | EOF
|
|---|
| 2585 |
|
|---|
| 2586 | ;;
|
|---|
| 2587 | ncursesw/curses.h|ncursesw/ncurses.h)
|
|---|
| 2588 | cat >> confdefs.h <<\EOF
|
|---|
| 2589 | #define HAVE_NCURSESW_NCURSES_H 1
|
|---|
| 2590 | EOF
|
|---|
| 2591 |
|
|---|
| 2592 | ;;
|
|---|
| 2593 | esac
|
|---|
| 2594 |
|
|---|
| 2595 |
|
|---|
| 2596 | echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
|
|---|
| 2597 | echo "configure:2598: checking for ncurses version" >&5
|
|---|
| 2598 | if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
|
|---|
| 2599 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2600 | else
|
|---|
| 2601 |
|
|---|
| 2602 | cf_cv_ncurses_version=no
|
|---|
| 2603 | cf_tempfile=out$$
|
|---|
| 2604 | rm -f $cf_tempfile
|
|---|
| 2605 | if test "$cross_compiling" = yes; then
|
|---|
| 2606 |
|
|---|
| 2607 |
|
|---|
| 2608 | # This will not work if the preprocessor splits the line after the
|
|---|
| 2609 | # Autoconf token. The 'unproto' program does that.
|
|---|
| 2610 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2611 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 2612 | #undef Autoconf
|
|---|
| 2613 | #ifdef NCURSES_VERSION
|
|---|
| 2614 | Autoconf NCURSES_VERSION
|
|---|
| 2615 | #else
|
|---|
| 2616 | #ifdef __NCURSES_H
|
|---|
| 2617 | Autoconf "old"
|
|---|
| 2618 | #endif
|
|---|
| 2619 | ;
|
|---|
| 2620 | #endif
|
|---|
| 2621 | EOF
|
|---|
| 2622 | cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
|
|---|
| 2623 | { (eval echo configure:2624: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
|
|---|
| 2624 | if test -f conftest.out ; then
|
|---|
| 2625 | cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
|
|---|
| 2626 | test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
|
|---|
| 2627 | rm -f conftest.out
|
|---|
| 2628 | fi
|
|---|
| 2629 |
|
|---|
| 2630 | else
|
|---|
| 2631 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2632 | #line 2633 "configure"
|
|---|
| 2633 | #include "confdefs.h"
|
|---|
| 2634 |
|
|---|
| 2635 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 2636 | #include <stdio.h>
|
|---|
| 2637 | int main()
|
|---|
| 2638 | {
|
|---|
| 2639 | FILE *fp = fopen("$cf_tempfile", "w");
|
|---|
| 2640 | #ifdef NCURSES_VERSION
|
|---|
| 2641 | # ifdef NCURSES_VERSION_PATCH
|
|---|
| 2642 | fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
|
|---|
| 2643 | # else
|
|---|
| 2644 | fprintf(fp, "%s\n", NCURSES_VERSION);
|
|---|
| 2645 | # endif
|
|---|
| 2646 | #else
|
|---|
| 2647 | # ifdef __NCURSES_H
|
|---|
| 2648 | fprintf(fp, "old\n");
|
|---|
| 2649 | # else
|
|---|
| 2650 | make an error
|
|---|
| 2651 | # endif
|
|---|
| 2652 | #endif
|
|---|
| 2653 | exit(0);
|
|---|
| 2654 | }
|
|---|
| 2655 | EOF
|
|---|
| 2656 | if { (eval echo configure:2657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|---|
| 2657 | then
|
|---|
| 2658 |
|
|---|
| 2659 | cf_cv_ncurses_version=`cat $cf_tempfile`
|
|---|
| 2660 | else
|
|---|
| 2661 | echo "configure: failed program was:" >&5
|
|---|
| 2662 | cat conftest.$ac_ext >&5
|
|---|
| 2663 | fi
|
|---|
| 2664 | rm -fr conftest*
|
|---|
| 2665 | fi
|
|---|
| 2666 |
|
|---|
| 2667 | rm -f $cf_tempfile
|
|---|
| 2668 |
|
|---|
| 2669 | fi
|
|---|
| 2670 |
|
|---|
| 2671 | echo "$ac_t""$cf_cv_ncurses_version" 1>&6
|
|---|
| 2672 | test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
|
|---|
| 2673 | #define NCURSES 1
|
|---|
| 2674 | EOF
|
|---|
| 2675 |
|
|---|
| 2676 |
|
|---|
| 2677 |
|
|---|
| 2678 |
|
|---|
| 2679 |
|
|---|
| 2680 | cf_nculib_root=ncurses
|
|---|
| 2681 | # This works, except for the special case where we find gpm, but
|
|---|
| 2682 | # ncurses is in a nonstandard location via $LIBS, and we really want
|
|---|
| 2683 | # to link gpm.
|
|---|
| 2684 | cf_ncurses_LIBS=""
|
|---|
| 2685 | cf_ncurses_SAVE="$LIBS"
|
|---|
| 2686 | echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
|
|---|
| 2687 | echo "configure:2688: checking for Gpm_Open in -lgpm" >&5
|
|---|
| 2688 | ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
|
|---|
| 2689 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 2690 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2691 | else
|
|---|
| 2692 | ac_save_LIBS="$LIBS"
|
|---|
| 2693 | LIBS="-lgpm $LIBS"
|
|---|
| 2694 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2695 | #line 2696 "configure"
|
|---|
| 2696 | #include "confdefs.h"
|
|---|
| 2697 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 2698 | /* We use char because int might match the return type of a gcc2
|
|---|
| 2699 | builtin and then its argument prototype would still apply. */
|
|---|
| 2700 | char Gpm_Open();
|
|---|
| 2701 |
|
|---|
| 2702 | int main() {
|
|---|
| 2703 | Gpm_Open()
|
|---|
| 2704 | ; return 0; }
|
|---|
| 2705 | EOF
|
|---|
| 2706 | if { (eval echo configure:2707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2707 | rm -rf conftest*
|
|---|
| 2708 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 2709 | else
|
|---|
| 2710 | echo "configure: failed program was:" >&5
|
|---|
| 2711 | cat conftest.$ac_ext >&5
|
|---|
| 2712 | rm -rf conftest*
|
|---|
| 2713 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 2714 | fi
|
|---|
| 2715 | rm -f conftest*
|
|---|
| 2716 | LIBS="$ac_save_LIBS"
|
|---|
| 2717 |
|
|---|
| 2718 | fi
|
|---|
| 2719 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 2720 | echo "$ac_t""yes" 1>&6
|
|---|
| 2721 | echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
|
|---|
| 2722 | echo "configure:2723: checking for initscr in -lgpm" >&5
|
|---|
| 2723 | ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
|
|---|
| 2724 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 2725 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2726 | else
|
|---|
| 2727 | ac_save_LIBS="$LIBS"
|
|---|
| 2728 | LIBS="-lgpm $LIBS"
|
|---|
| 2729 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2730 | #line 2731 "configure"
|
|---|
| 2731 | #include "confdefs.h"
|
|---|
| 2732 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 2733 | /* We use char because int might match the return type of a gcc2
|
|---|
| 2734 | builtin and then its argument prototype would still apply. */
|
|---|
| 2735 | char initscr();
|
|---|
| 2736 |
|
|---|
| 2737 | int main() {
|
|---|
| 2738 | initscr()
|
|---|
| 2739 | ; return 0; }
|
|---|
| 2740 | EOF
|
|---|
| 2741 | if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2742 | rm -rf conftest*
|
|---|
| 2743 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 2744 | else
|
|---|
| 2745 | echo "configure: failed program was:" >&5
|
|---|
| 2746 | cat conftest.$ac_ext >&5
|
|---|
| 2747 | rm -rf conftest*
|
|---|
| 2748 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 2749 | fi
|
|---|
| 2750 | rm -f conftest*
|
|---|
| 2751 | LIBS="$ac_save_LIBS"
|
|---|
| 2752 |
|
|---|
| 2753 | fi
|
|---|
| 2754 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 2755 | echo "$ac_t""yes" 1>&6
|
|---|
| 2756 | LIBS="$cf_ncurses_SAVE"
|
|---|
| 2757 | else
|
|---|
| 2758 | echo "$ac_t""no" 1>&6
|
|---|
| 2759 | cf_ncurses_LIBS="-lgpm"
|
|---|
| 2760 | fi
|
|---|
| 2761 |
|
|---|
| 2762 | else
|
|---|
| 2763 | echo "$ac_t""no" 1>&6
|
|---|
| 2764 | fi
|
|---|
| 2765 |
|
|---|
| 2766 |
|
|---|
| 2767 | case $host_os in #(vi
|
|---|
| 2768 | freebsd*)
|
|---|
| 2769 | # This is only necessary if you are linking against an obsolete
|
|---|
| 2770 | # version of ncurses (but it should do no harm, since it's static).
|
|---|
| 2771 | if test "$cf_nculib_root" = ncurses ; then
|
|---|
| 2772 | echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
|
|---|
| 2773 | echo "configure:2774: checking for tgoto in -lmytinfo" >&5
|
|---|
| 2774 | ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
|
|---|
| 2775 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 2776 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2777 | else
|
|---|
| 2778 | ac_save_LIBS="$LIBS"
|
|---|
| 2779 | LIBS="-lmytinfo $LIBS"
|
|---|
| 2780 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2781 | #line 2782 "configure"
|
|---|
| 2782 | #include "confdefs.h"
|
|---|
| 2783 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 2784 | /* We use char because int might match the return type of a gcc2
|
|---|
| 2785 | builtin and then its argument prototype would still apply. */
|
|---|
| 2786 | char tgoto();
|
|---|
| 2787 |
|
|---|
| 2788 | int main() {
|
|---|
| 2789 | tgoto()
|
|---|
| 2790 | ; return 0; }
|
|---|
| 2791 | EOF
|
|---|
| 2792 | if { (eval echo configure:2793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2793 | rm -rf conftest*
|
|---|
| 2794 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 2795 | else
|
|---|
| 2796 | echo "configure: failed program was:" >&5
|
|---|
| 2797 | cat conftest.$ac_ext >&5
|
|---|
| 2798 | rm -rf conftest*
|
|---|
| 2799 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 2800 | fi
|
|---|
| 2801 | rm -f conftest*
|
|---|
| 2802 | LIBS="$ac_save_LIBS"
|
|---|
| 2803 |
|
|---|
| 2804 | fi
|
|---|
| 2805 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 2806 | echo "$ac_t""yes" 1>&6
|
|---|
| 2807 | cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
|
|---|
| 2808 | else
|
|---|
| 2809 | echo "$ac_t""no" 1>&6
|
|---|
| 2810 | fi
|
|---|
| 2811 |
|
|---|
| 2812 | fi
|
|---|
| 2813 | ;;
|
|---|
| 2814 | esac
|
|---|
| 2815 |
|
|---|
| 2816 | LIBS="$cf_ncurses_LIBS $LIBS"
|
|---|
| 2817 |
|
|---|
| 2818 | if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
|
|---|
| 2819 | then
|
|---|
| 2820 | LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
|
|---|
| 2821 | else
|
|---|
| 2822 |
|
|---|
| 2823 | eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
|
|---|
| 2824 | cf_libdir=""
|
|---|
| 2825 | echo $ac_n "checking for initscr""... $ac_c" 1>&6
|
|---|
| 2826 | echo "configure:2827: checking for initscr" >&5
|
|---|
| 2827 | if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
|
|---|
| 2828 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 2829 | else
|
|---|
| 2830 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2831 | #line 2832 "configure"
|
|---|
| 2832 | #include "confdefs.h"
|
|---|
| 2833 | /* System header to define __stub macros and hopefully few prototypes,
|
|---|
| 2834 | which can conflict with char initscr(); below. */
|
|---|
| 2835 | #include <assert.h>
|
|---|
| 2836 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 2837 | /* We use char because int might match the return type of a gcc2
|
|---|
| 2838 | builtin and then its argument prototype would still apply. */
|
|---|
| 2839 | char initscr();
|
|---|
| 2840 |
|
|---|
| 2841 | int main() {
|
|---|
| 2842 |
|
|---|
| 2843 | /* The GNU C library defines this for functions which it implements
|
|---|
| 2844 | to always fail with ENOSYS. Some functions are actually named
|
|---|
| 2845 | something starting with __ and the normal name is an alias. */
|
|---|
| 2846 | #if defined (__stub_initscr) || defined (__stub___initscr)
|
|---|
| 2847 | choke me
|
|---|
| 2848 | #else
|
|---|
| 2849 | initscr();
|
|---|
| 2850 | #endif
|
|---|
| 2851 |
|
|---|
| 2852 | ; return 0; }
|
|---|
| 2853 | EOF
|
|---|
| 2854 | if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2855 | rm -rf conftest*
|
|---|
| 2856 | eval "ac_cv_func_initscr=yes"
|
|---|
| 2857 | else
|
|---|
| 2858 | echo "configure: failed program was:" >&5
|
|---|
| 2859 | cat conftest.$ac_ext >&5
|
|---|
| 2860 | rm -rf conftest*
|
|---|
| 2861 | eval "ac_cv_func_initscr=no"
|
|---|
| 2862 | fi
|
|---|
| 2863 | rm -f conftest*
|
|---|
| 2864 | fi
|
|---|
| 2865 |
|
|---|
| 2866 | if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
|
|---|
| 2867 | echo "$ac_t""yes" 1>&6
|
|---|
| 2868 | eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
|
|---|
| 2869 | else
|
|---|
| 2870 | echo "$ac_t""no" 1>&6
|
|---|
| 2871 |
|
|---|
| 2872 | cf_save_LIBS="$LIBS"
|
|---|
| 2873 | echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
|
|---|
| 2874 | echo "configure:2875: checking for initscr in -l$cf_nculib_root" >&5
|
|---|
| 2875 | LIBS="-l$cf_nculib_root $LIBS"
|
|---|
| 2876 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2877 | #line 2878 "configure"
|
|---|
| 2878 | #include "confdefs.h"
|
|---|
| 2879 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 2880 | int main() {
|
|---|
| 2881 | initscr()
|
|---|
| 2882 | ; return 0; }
|
|---|
| 2883 | EOF
|
|---|
| 2884 | if { (eval echo configure:2885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2885 | rm -rf conftest*
|
|---|
| 2886 | echo "$ac_t""yes" 1>&6
|
|---|
| 2887 | eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
|
|---|
| 2888 |
|
|---|
| 2889 | else
|
|---|
| 2890 | echo "configure: failed program was:" >&5
|
|---|
| 2891 | cat conftest.$ac_ext >&5
|
|---|
| 2892 | rm -rf conftest*
|
|---|
| 2893 | echo "$ac_t""no" 1>&6
|
|---|
| 2894 | cf_search=""
|
|---|
| 2895 |
|
|---|
| 2896 | test -d $HOME && {
|
|---|
| 2897 | test -n "$verbose" && echo " ... testing lib-directories under $HOME"
|
|---|
| 2898 | test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
|
|---|
| 2899 | test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
|
|---|
| 2900 | test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
|
|---|
| 2901 | }
|
|---|
| 2902 |
|
|---|
| 2903 | # For other stuff under the home directory, it should be sufficient to put
|
|---|
| 2904 | # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
|
|---|
| 2905 | test -d $HOME/$cf_nculib_root && {
|
|---|
| 2906 | test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
|
|---|
| 2907 | test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
|
|---|
| 2908 | test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
|
|---|
| 2909 | }
|
|---|
| 2910 |
|
|---|
| 2911 | test "$prefix" != /usr/local && \
|
|---|
| 2912 | test -d /usr/local && {
|
|---|
| 2913 | test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
|
|---|
| 2914 | test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
|
|---|
| 2915 | test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
|
|---|
| 2916 | test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
|
|---|
| 2917 | test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
|
|---|
| 2918 | test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
|
|---|
| 2919 | }
|
|---|
| 2920 |
|
|---|
| 2921 | test "$prefix" != NONE && \
|
|---|
| 2922 | test -d $prefix && {
|
|---|
| 2923 | test -n "$verbose" && echo " ... testing lib-directories under $prefix"
|
|---|
| 2924 | test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
|
|---|
| 2925 | test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
|
|---|
| 2926 | test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
|
|---|
| 2927 | test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
|
|---|
| 2928 | test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
|
|---|
| 2929 | }
|
|---|
| 2930 |
|
|---|
| 2931 | test "$prefix" != /opt && \
|
|---|
| 2932 | test -d /opt && {
|
|---|
| 2933 | test -n "$verbose" && echo " ... testing lib-directories under /opt"
|
|---|
| 2934 | test -d /opt/lib && cf_search="$cf_search /opt/lib"
|
|---|
| 2935 | test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
|
|---|
| 2936 | test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
|
|---|
| 2937 | test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
|
|---|
| 2938 | test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
|
|---|
| 2939 | }
|
|---|
| 2940 |
|
|---|
| 2941 | test "$prefix" != /usr && \
|
|---|
| 2942 | test -d /usr && {
|
|---|
| 2943 | test -n "$verbose" && echo " ... testing lib-directories under /usr"
|
|---|
| 2944 | test -d /usr/lib && cf_search="$cf_search /usr/lib"
|
|---|
| 2945 | test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
|
|---|
| 2946 | test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
|
|---|
| 2947 | test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
|
|---|
| 2948 | }
|
|---|
| 2949 |
|
|---|
| 2950 | for cf_libdir in $cf_search
|
|---|
| 2951 | do
|
|---|
| 2952 | echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
|
|---|
| 2953 | echo "configure:2954: checking for -l$cf_nculib_root in $cf_libdir" >&5
|
|---|
| 2954 | LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
|
|---|
| 2955 | cat > conftest.$ac_ext <<EOF
|
|---|
| 2956 | #line 2957 "configure"
|
|---|
| 2957 | #include "confdefs.h"
|
|---|
| 2958 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 2959 | int main() {
|
|---|
| 2960 | initscr()
|
|---|
| 2961 | ; return 0; }
|
|---|
| 2962 | EOF
|
|---|
| 2963 | if { (eval echo configure:2964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 2964 | rm -rf conftest*
|
|---|
| 2965 | echo "$ac_t""yes" 1>&6
|
|---|
| 2966 | eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
|
|---|
| 2967 | break
|
|---|
| 2968 | else
|
|---|
| 2969 | echo "configure: failed program was:" >&5
|
|---|
| 2970 | cat conftest.$ac_ext >&5
|
|---|
| 2971 | rm -rf conftest*
|
|---|
| 2972 | echo "$ac_t""no" 1>&6
|
|---|
| 2973 | LIBS="$cf_save_LIBS"
|
|---|
| 2974 | fi
|
|---|
| 2975 | rm -f conftest*
|
|---|
| 2976 | done
|
|---|
| 2977 |
|
|---|
| 2978 | fi
|
|---|
| 2979 | rm -f conftest*
|
|---|
| 2980 |
|
|---|
| 2981 | fi
|
|---|
| 2982 |
|
|---|
| 2983 | eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
|
|---|
| 2984 |
|
|---|
| 2985 | if test $cf_found_library = no ; then
|
|---|
| 2986 | { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
|
|---|
| 2987 | fi
|
|---|
| 2988 |
|
|---|
| 2989 |
|
|---|
| 2990 | fi
|
|---|
| 2991 |
|
|---|
| 2992 | if test -n "$cf_ncurses_LIBS" ; then
|
|---|
| 2993 | echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
|
|---|
| 2994 | echo "configure:2995: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
|
|---|
| 2995 | cf_ncurses_SAVE="$LIBS"
|
|---|
| 2996 | for p in $cf_ncurses_LIBS ; do
|
|---|
| 2997 | q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
|
|---|
| 2998 | if test "$q" != "$LIBS" ; then
|
|---|
| 2999 | LIBS="$q"
|
|---|
| 3000 | fi
|
|---|
| 3001 | done
|
|---|
| 3002 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3003 | #line 3004 "configure"
|
|---|
| 3004 | #include "confdefs.h"
|
|---|
| 3005 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 3006 | int main() {
|
|---|
| 3007 | initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
|
|---|
| 3008 | ; return 0; }
|
|---|
| 3009 | EOF
|
|---|
| 3010 | if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3011 | rm -rf conftest*
|
|---|
| 3012 | echo "$ac_t""yes" 1>&6
|
|---|
| 3013 | else
|
|---|
| 3014 | echo "configure: failed program was:" >&5
|
|---|
| 3015 | cat conftest.$ac_ext >&5
|
|---|
| 3016 | rm -rf conftest*
|
|---|
| 3017 | echo "$ac_t""no" 1>&6
|
|---|
| 3018 | LIBS="$cf_ncurses_SAVE"
|
|---|
| 3019 | fi
|
|---|
| 3020 | rm -f conftest*
|
|---|
| 3021 | fi
|
|---|
| 3022 |
|
|---|
| 3023 |
|
|---|
| 3024 | cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
|
|---|
| 3025 |
|
|---|
| 3026 | cat >> confdefs.h <<EOF
|
|---|
| 3027 | #define $cf_nculib_ROOT 1
|
|---|
| 3028 | EOF
|
|---|
| 3029 |
|
|---|
| 3030 |
|
|---|
| 3031 | LIB_NAME=ncurses
|
|---|
| 3032 | ;;
|
|---|
| 3033 | ncursesw)
|
|---|
| 3034 | cf_cv_libtype=w
|
|---|
| 3035 |
|
|---|
| 3036 | echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
|
|---|
| 3037 | echo "configure:3038: checking for multibyte character support" >&5
|
|---|
| 3038 | if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
|
|---|
| 3039 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3040 | else
|
|---|
| 3041 |
|
|---|
| 3042 | cf_save_LIBS="$LIBS"
|
|---|
| 3043 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3044 | #line 3045 "configure"
|
|---|
| 3045 | #include "confdefs.h"
|
|---|
| 3046 |
|
|---|
| 3047 | #include <stdlib.h>
|
|---|
| 3048 | int main() {
|
|---|
| 3049 | putwc(0,0);
|
|---|
| 3050 | ; return 0; }
|
|---|
| 3051 | EOF
|
|---|
| 3052 | if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3053 | rm -rf conftest*
|
|---|
| 3054 | cf_cv_utf8_lib=yes
|
|---|
| 3055 | else
|
|---|
| 3056 | echo "configure: failed program was:" >&5
|
|---|
| 3057 | cat conftest.$ac_ext >&5
|
|---|
| 3058 | rm -rf conftest*
|
|---|
| 3059 | LIBS="-lutf8 $LIBS"
|
|---|
| 3060 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3061 | #line 3062 "configure"
|
|---|
| 3062 | #include "confdefs.h"
|
|---|
| 3063 |
|
|---|
| 3064 | #include <libutf8.h>
|
|---|
| 3065 | int main() {
|
|---|
| 3066 | putwc(0,0);
|
|---|
| 3067 | ; return 0; }
|
|---|
| 3068 | EOF
|
|---|
| 3069 | if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3070 | rm -rf conftest*
|
|---|
| 3071 | cf_cv_utf8_lib=add-on
|
|---|
| 3072 | else
|
|---|
| 3073 | echo "configure: failed program was:" >&5
|
|---|
| 3074 | cat conftest.$ac_ext >&5
|
|---|
| 3075 | rm -rf conftest*
|
|---|
| 3076 | cf_cv_utf8_lib=no
|
|---|
| 3077 | fi
|
|---|
| 3078 | rm -f conftest*
|
|---|
| 3079 | LIBS="$cf_save_LIBS"
|
|---|
| 3080 |
|
|---|
| 3081 | fi
|
|---|
| 3082 | rm -f conftest*
|
|---|
| 3083 | fi
|
|---|
| 3084 |
|
|---|
| 3085 | echo "$ac_t""$cf_cv_utf8_lib" 1>&6
|
|---|
| 3086 |
|
|---|
| 3087 | # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
|
|---|
| 3088 | # ncurses/ncursesw:
|
|---|
| 3089 | if test "$cf_cv_utf8_lib" = "add-on" ; then
|
|---|
| 3090 | cat >> confdefs.h <<\EOF
|
|---|
| 3091 | #define HAVE_LIBUTF8_H 1
|
|---|
| 3092 | EOF
|
|---|
| 3093 |
|
|---|
| 3094 | LIBS="-lutf8 $LIBS"
|
|---|
| 3095 | fi
|
|---|
| 3096 |
|
|---|
| 3097 |
|
|---|
| 3098 |
|
|---|
| 3099 | cf_ncuhdr_root=ncursesw
|
|---|
| 3100 |
|
|---|
| 3101 | test -n "$cf_cv_curses_dir" && \
|
|---|
| 3102 | test "$cf_cv_curses_dir" != "no" && \
|
|---|
| 3103 | CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
|
|---|
| 3104 |
|
|---|
| 3105 | echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
|
|---|
| 3106 | echo "configure:3107: checking for $cf_ncuhdr_root header in include-path" >&5
|
|---|
| 3107 | if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
|
|---|
| 3108 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3109 | else
|
|---|
| 3110 |
|
|---|
| 3111 | cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
|
|---|
| 3112 | ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
|
|---|
| 3113 | for cf_header in $cf_header_list
|
|---|
| 3114 | do
|
|---|
| 3115 |
|
|---|
| 3116 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3117 | #line 3118 "configure"
|
|---|
| 3118 | #include "confdefs.h"
|
|---|
| 3119 |
|
|---|
| 3120 |
|
|---|
| 3121 | #define _XOPEN_SOURCE_EXTENDED
|
|---|
| 3122 | #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
|
|---|
| 3123 | #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
|
|---|
| 3124 |
|
|---|
| 3125 | #include <$cf_header>
|
|---|
| 3126 | int main() {
|
|---|
| 3127 |
|
|---|
| 3128 | #ifdef NCURSES_VERSION
|
|---|
| 3129 |
|
|---|
| 3130 | #ifndef WACS_BSSB
|
|---|
| 3131 | make an error
|
|---|
| 3132 | #endif
|
|---|
| 3133 |
|
|---|
| 3134 | printf("%s\n", NCURSES_VERSION);
|
|---|
| 3135 | #else
|
|---|
| 3136 | #ifdef __NCURSES_H
|
|---|
| 3137 | printf("old\n");
|
|---|
| 3138 | #else
|
|---|
| 3139 | make an error
|
|---|
| 3140 | #endif
|
|---|
| 3141 | #endif
|
|---|
| 3142 |
|
|---|
| 3143 |
|
|---|
| 3144 | ; return 0; }
|
|---|
| 3145 | EOF
|
|---|
| 3146 | if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 3147 | rm -rf conftest*
|
|---|
| 3148 | cf_cv_ncurses_h=$cf_header
|
|---|
| 3149 |
|
|---|
| 3150 | else
|
|---|
| 3151 | echo "configure: failed program was:" >&5
|
|---|
| 3152 | cat conftest.$ac_ext >&5
|
|---|
| 3153 | rm -rf conftest*
|
|---|
| 3154 | cf_cv_ncurses_h=no
|
|---|
| 3155 | fi
|
|---|
| 3156 | rm -f conftest*
|
|---|
| 3157 |
|
|---|
| 3158 | test "$cf_cv_ncurses_h" != no && break
|
|---|
| 3159 | done
|
|---|
| 3160 |
|
|---|
| 3161 | fi
|
|---|
| 3162 |
|
|---|
| 3163 | echo "$ac_t""$cf_cv_ncurses_h" 1>&6
|
|---|
| 3164 |
|
|---|
| 3165 | if test "$cf_cv_ncurses_h" != no ; then
|
|---|
| 3166 | cf_cv_ncurses_header=$cf_cv_ncurses_h
|
|---|
| 3167 | else
|
|---|
| 3168 | echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
|
|---|
| 3169 | echo "configure:3170: checking for $cf_ncuhdr_root include-path" >&5
|
|---|
| 3170 | if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
|
|---|
| 3171 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3172 | else
|
|---|
| 3173 |
|
|---|
| 3174 | test -n "$verbose" && echo
|
|---|
| 3175 | cf_search=""
|
|---|
| 3176 |
|
|---|
| 3177 | test -d $HOME && {
|
|---|
| 3178 | test -n "$verbose" && echo " ... testing include-directories under $HOME"
|
|---|
| 3179 | test -d $HOME/include && cf_search="$cf_search $HOME/include"
|
|---|
| 3180 | test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
|
|---|
| 3181 | test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
|
|---|
| 3182 | }
|
|---|
| 3183 |
|
|---|
| 3184 | # For other stuff under the home directory, it should be sufficient to put
|
|---|
| 3185 | # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
|
|---|
| 3186 | test -d $HOME/$cf_ncuhdr_root && {
|
|---|
| 3187 | test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
|
|---|
| 3188 | test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
|
|---|
| 3189 | test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
|
|---|
| 3190 | }
|
|---|
| 3191 |
|
|---|
| 3192 | test "$prefix" != /usr/local && \
|
|---|
| 3193 | test -d /usr/local && {
|
|---|
| 3194 | test -n "$verbose" && echo " ... testing include-directories under /usr/local"
|
|---|
| 3195 | test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
|
|---|
| 3196 | test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
|
|---|
| 3197 | test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
|
|---|
| 3198 | test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
|
|---|
| 3199 | test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
|
|---|
| 3200 | }
|
|---|
| 3201 |
|
|---|
| 3202 | test "$prefix" != NONE && \
|
|---|
| 3203 | test -d $prefix && {
|
|---|
| 3204 | test -n "$verbose" && echo " ... testing include-directories under $prefix"
|
|---|
| 3205 | test -d $prefix/include && cf_search="$cf_search $prefix/include"
|
|---|
| 3206 | test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
|
|---|
| 3207 | test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
|
|---|
| 3208 | test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
|
|---|
| 3209 | test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
|
|---|
| 3210 | }
|
|---|
| 3211 |
|
|---|
| 3212 | test "$prefix" != /opt && \
|
|---|
| 3213 | test -d /opt && {
|
|---|
| 3214 | test -n "$verbose" && echo " ... testing include-directories under /opt"
|
|---|
| 3215 | test -d /opt/include && cf_search="$cf_search /opt/include"
|
|---|
| 3216 | test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
|
|---|
| 3217 | test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
|
|---|
| 3218 | test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
|
|---|
| 3219 | test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
|
|---|
| 3220 | }
|
|---|
| 3221 |
|
|---|
| 3222 | test "$prefix" != /usr && \
|
|---|
| 3223 | test -d /usr && {
|
|---|
| 3224 | test -n "$verbose" && echo " ... testing include-directories under /usr"
|
|---|
| 3225 | test -d /usr/include && cf_search="$cf_search /usr/include"
|
|---|
| 3226 | test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
|
|---|
| 3227 | test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
|
|---|
| 3228 | test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
|
|---|
| 3229 | }
|
|---|
| 3230 |
|
|---|
| 3231 | test "$includedir" != NONE && \
|
|---|
| 3232 | test "$includedir" != "/usr/include" && \
|
|---|
| 3233 | test -d "$includedir" && {
|
|---|
| 3234 | test -d $includedir && cf_search="$cf_search $includedir"
|
|---|
| 3235 | test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
|
|---|
| 3236 | }
|
|---|
| 3237 |
|
|---|
| 3238 | test "$oldincludedir" != NONE && \
|
|---|
| 3239 | test "$oldincludedir" != "/usr/include" && \
|
|---|
| 3240 | test -d "$oldincludedir" && {
|
|---|
| 3241 | test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
|
|---|
| 3242 | test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
|
|---|
| 3243 | }
|
|---|
| 3244 |
|
|---|
| 3245 |
|
|---|
| 3246 | test -n "$verbose" && echo search path $cf_search
|
|---|
| 3247 | cf_save2_CPPFLAGS="$CPPFLAGS"
|
|---|
| 3248 | for cf_incdir in $cf_search
|
|---|
| 3249 | do
|
|---|
| 3250 |
|
|---|
| 3251 | for cf_add_incdir in $cf_incdir
|
|---|
| 3252 | do
|
|---|
| 3253 | while true
|
|---|
| 3254 | do
|
|---|
| 3255 | case $cf_add_incdir in
|
|---|
| 3256 | /usr/include) # (vi
|
|---|
| 3257 | ;;
|
|---|
| 3258 | /usr/local/include) # (vi
|
|---|
| 3259 | if test "$GCC" = yes
|
|---|
| 3260 | then
|
|---|
| 3261 | cf_save_CPPFLAGS="$CPPFLAGS"
|
|---|
| 3262 | CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
|
|---|
| 3263 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3264 | #line 3265 "configure"
|
|---|
| 3265 | #include "confdefs.h"
|
|---|
| 3266 | #include <stdio.h>
|
|---|
| 3267 | int main() {
|
|---|
| 3268 | printf("Hello")
|
|---|
| 3269 | ; return 0; }
|
|---|
| 3270 | EOF
|
|---|
| 3271 | if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 3272 | :
|
|---|
| 3273 | else
|
|---|
| 3274 | echo "configure: failed program was:" >&5
|
|---|
| 3275 | cat conftest.$ac_ext >&5
|
|---|
| 3276 | rm -rf conftest*
|
|---|
| 3277 | CPPFLAGS="$cf_save_CPPFLAGS"
|
|---|
| 3278 | fi
|
|---|
| 3279 | rm -f conftest*
|
|---|
| 3280 | fi
|
|---|
| 3281 | ;;
|
|---|
| 3282 | *) # (vi
|
|---|
| 3283 | CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
|
|---|
| 3284 | ;;
|
|---|
| 3285 | esac
|
|---|
| 3286 | cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
|
|---|
| 3287 | test "$cf_top_incdir" = "$cf_add_incdir" && break
|
|---|
| 3288 | cf_add_incdir="$cf_top_incdir"
|
|---|
| 3289 | done
|
|---|
| 3290 | done
|
|---|
| 3291 |
|
|---|
| 3292 | for cf_header in \
|
|---|
| 3293 | ncurses.h \
|
|---|
| 3294 | curses.h
|
|---|
| 3295 | do
|
|---|
| 3296 |
|
|---|
| 3297 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3298 | #line 3299 "configure"
|
|---|
| 3299 | #include "confdefs.h"
|
|---|
| 3300 |
|
|---|
| 3301 |
|
|---|
| 3302 | #define _XOPEN_SOURCE_EXTENDED
|
|---|
| 3303 | #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
|
|---|
| 3304 | #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
|
|---|
| 3305 |
|
|---|
| 3306 | #include <$cf_header>
|
|---|
| 3307 | int main() {
|
|---|
| 3308 |
|
|---|
| 3309 | #ifdef NCURSES_VERSION
|
|---|
| 3310 |
|
|---|
| 3311 | #ifndef WACS_BSSB
|
|---|
| 3312 | make an error
|
|---|
| 3313 | #endif
|
|---|
| 3314 |
|
|---|
| 3315 | printf("%s\n", NCURSES_VERSION);
|
|---|
| 3316 | #else
|
|---|
| 3317 | #ifdef __NCURSES_H
|
|---|
| 3318 | printf("old\n");
|
|---|
| 3319 | #else
|
|---|
| 3320 | make an error
|
|---|
| 3321 | #endif
|
|---|
| 3322 | #endif
|
|---|
| 3323 |
|
|---|
| 3324 |
|
|---|
| 3325 | ; return 0; }
|
|---|
| 3326 | EOF
|
|---|
| 3327 | if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 3328 | rm -rf conftest*
|
|---|
| 3329 | cf_cv_ncurses_h2=$cf_header
|
|---|
| 3330 |
|
|---|
| 3331 | else
|
|---|
| 3332 | echo "configure: failed program was:" >&5
|
|---|
| 3333 | cat conftest.$ac_ext >&5
|
|---|
| 3334 | rm -rf conftest*
|
|---|
| 3335 | cf_cv_ncurses_h2=no
|
|---|
| 3336 | fi
|
|---|
| 3337 | rm -f conftest*
|
|---|
| 3338 |
|
|---|
| 3339 | if test "$cf_cv_ncurses_h2" != no ; then
|
|---|
| 3340 | cf_cv_ncurses_h2=$cf_incdir/$cf_header
|
|---|
| 3341 | test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
|
|---|
| 3342 | break
|
|---|
| 3343 | fi
|
|---|
| 3344 | test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
|
|---|
| 3345 | done
|
|---|
| 3346 | CPPFLAGS="$cf_save2_CPPFLAGS"
|
|---|
| 3347 | test "$cf_cv_ncurses_h2" != no && break
|
|---|
| 3348 | done
|
|---|
| 3349 | test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
|
|---|
| 3350 |
|
|---|
| 3351 | fi
|
|---|
| 3352 |
|
|---|
| 3353 | echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
|
|---|
| 3354 |
|
|---|
| 3355 | cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
|
|---|
| 3356 | cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
|
|---|
| 3357 | if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
|
|---|
| 3358 | cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
|
|---|
| 3359 | fi
|
|---|
| 3360 |
|
|---|
| 3361 | for cf_add_incdir in $cf_1st_incdir
|
|---|
| 3362 | do
|
|---|
| 3363 | while true
|
|---|
| 3364 | do
|
|---|
| 3365 | case $cf_add_incdir in
|
|---|
| 3366 | /usr/include) # (vi
|
|---|
| 3367 | ;;
|
|---|
| 3368 | /usr/local/include) # (vi
|
|---|
| 3369 | if test "$GCC" = yes
|
|---|
| 3370 | then
|
|---|
| 3371 | cf_save_CPPFLAGS="$CPPFLAGS"
|
|---|
| 3372 | CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
|
|---|
| 3373 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3374 | #line 3375 "configure"
|
|---|
| 3375 | #include "confdefs.h"
|
|---|
| 3376 | #include <stdio.h>
|
|---|
| 3377 | int main() {
|
|---|
| 3378 | printf("Hello")
|
|---|
| 3379 | ; return 0; }
|
|---|
| 3380 | EOF
|
|---|
| 3381 | if { (eval echo configure:3382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 3382 | :
|
|---|
| 3383 | else
|
|---|
| 3384 | echo "configure: failed program was:" >&5
|
|---|
| 3385 | cat conftest.$ac_ext >&5
|
|---|
| 3386 | rm -rf conftest*
|
|---|
| 3387 | CPPFLAGS="$cf_save_CPPFLAGS"
|
|---|
| 3388 | fi
|
|---|
| 3389 | rm -f conftest*
|
|---|
| 3390 | fi
|
|---|
| 3391 | ;;
|
|---|
| 3392 | *) # (vi
|
|---|
| 3393 | CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
|
|---|
| 3394 | ;;
|
|---|
| 3395 | esac
|
|---|
| 3396 | cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
|
|---|
| 3397 | test "$cf_top_incdir" = "$cf_add_incdir" && break
|
|---|
| 3398 | cf_add_incdir="$cf_top_incdir"
|
|---|
| 3399 | done
|
|---|
| 3400 | done
|
|---|
| 3401 |
|
|---|
| 3402 |
|
|---|
| 3403 | fi
|
|---|
| 3404 |
|
|---|
| 3405 | cat >> confdefs.h <<\EOF
|
|---|
| 3406 | #define NCURSES 1
|
|---|
| 3407 | EOF
|
|---|
| 3408 |
|
|---|
| 3409 |
|
|---|
| 3410 | case $cf_cv_ncurses_header in # (vi
|
|---|
| 3411 | *ncurses.h)
|
|---|
| 3412 | cat >> confdefs.h <<\EOF
|
|---|
| 3413 | #define HAVE_NCURSES_H 1
|
|---|
| 3414 | EOF
|
|---|
| 3415 |
|
|---|
| 3416 | ;;
|
|---|
| 3417 | esac
|
|---|
| 3418 |
|
|---|
| 3419 | case $cf_cv_ncurses_header in # (vi
|
|---|
| 3420 | ncurses/curses.h|ncurses/ncurses.h)
|
|---|
| 3421 | cat >> confdefs.h <<\EOF
|
|---|
| 3422 | #define HAVE_NCURSES_NCURSES_H 1
|
|---|
| 3423 | EOF
|
|---|
| 3424 |
|
|---|
| 3425 | ;;
|
|---|
| 3426 | ncursesw/curses.h|ncursesw/ncurses.h)
|
|---|
| 3427 | cat >> confdefs.h <<\EOF
|
|---|
| 3428 | #define HAVE_NCURSESW_NCURSES_H 1
|
|---|
| 3429 | EOF
|
|---|
| 3430 |
|
|---|
| 3431 | ;;
|
|---|
| 3432 | esac
|
|---|
| 3433 |
|
|---|
| 3434 |
|
|---|
| 3435 | echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
|
|---|
| 3436 | echo "configure:3437: checking for ncurses version" >&5
|
|---|
| 3437 | if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
|
|---|
| 3438 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3439 | else
|
|---|
| 3440 |
|
|---|
| 3441 | cf_cv_ncurses_version=no
|
|---|
| 3442 | cf_tempfile=out$$
|
|---|
| 3443 | rm -f $cf_tempfile
|
|---|
| 3444 | if test "$cross_compiling" = yes; then
|
|---|
| 3445 |
|
|---|
| 3446 |
|
|---|
| 3447 | # This will not work if the preprocessor splits the line after the
|
|---|
| 3448 | # Autoconf token. The 'unproto' program does that.
|
|---|
| 3449 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3450 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 3451 | #undef Autoconf
|
|---|
| 3452 | #ifdef NCURSES_VERSION
|
|---|
| 3453 | Autoconf NCURSES_VERSION
|
|---|
| 3454 | #else
|
|---|
| 3455 | #ifdef __NCURSES_H
|
|---|
| 3456 | Autoconf "old"
|
|---|
| 3457 | #endif
|
|---|
| 3458 | ;
|
|---|
| 3459 | #endif
|
|---|
| 3460 | EOF
|
|---|
| 3461 | cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
|
|---|
| 3462 | { (eval echo configure:3463: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
|
|---|
| 3463 | if test -f conftest.out ; then
|
|---|
| 3464 | cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
|
|---|
| 3465 | test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
|
|---|
| 3466 | rm -f conftest.out
|
|---|
| 3467 | fi
|
|---|
| 3468 |
|
|---|
| 3469 | else
|
|---|
| 3470 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3471 | #line 3472 "configure"
|
|---|
| 3472 | #include "confdefs.h"
|
|---|
| 3473 |
|
|---|
| 3474 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 3475 | #include <stdio.h>
|
|---|
| 3476 | int main()
|
|---|
| 3477 | {
|
|---|
| 3478 | FILE *fp = fopen("$cf_tempfile", "w");
|
|---|
| 3479 | #ifdef NCURSES_VERSION
|
|---|
| 3480 | # ifdef NCURSES_VERSION_PATCH
|
|---|
| 3481 | fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
|
|---|
| 3482 | # else
|
|---|
| 3483 | fprintf(fp, "%s\n", NCURSES_VERSION);
|
|---|
| 3484 | # endif
|
|---|
| 3485 | #else
|
|---|
| 3486 | # ifdef __NCURSES_H
|
|---|
| 3487 | fprintf(fp, "old\n");
|
|---|
| 3488 | # else
|
|---|
| 3489 | make an error
|
|---|
| 3490 | # endif
|
|---|
| 3491 | #endif
|
|---|
| 3492 | exit(0);
|
|---|
| 3493 | }
|
|---|
| 3494 | EOF
|
|---|
| 3495 | if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|---|
| 3496 | then
|
|---|
| 3497 |
|
|---|
| 3498 | cf_cv_ncurses_version=`cat $cf_tempfile`
|
|---|
| 3499 | else
|
|---|
| 3500 | echo "configure: failed program was:" >&5
|
|---|
| 3501 | cat conftest.$ac_ext >&5
|
|---|
| 3502 | fi
|
|---|
| 3503 | rm -fr conftest*
|
|---|
| 3504 | fi
|
|---|
| 3505 |
|
|---|
| 3506 | rm -f $cf_tempfile
|
|---|
| 3507 |
|
|---|
| 3508 | fi
|
|---|
| 3509 |
|
|---|
| 3510 | echo "$ac_t""$cf_cv_ncurses_version" 1>&6
|
|---|
| 3511 | test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
|
|---|
| 3512 | #define NCURSES 1
|
|---|
| 3513 | EOF
|
|---|
| 3514 |
|
|---|
| 3515 |
|
|---|
| 3516 |
|
|---|
| 3517 |
|
|---|
| 3518 |
|
|---|
| 3519 | cf_nculib_root=ncursesw
|
|---|
| 3520 | # This works, except for the special case where we find gpm, but
|
|---|
| 3521 | # ncurses is in a nonstandard location via $LIBS, and we really want
|
|---|
| 3522 | # to link gpm.
|
|---|
| 3523 | cf_ncurses_LIBS=""
|
|---|
| 3524 | cf_ncurses_SAVE="$LIBS"
|
|---|
| 3525 | echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
|
|---|
| 3526 | echo "configure:3527: checking for Gpm_Open in -lgpm" >&5
|
|---|
| 3527 | ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
|
|---|
| 3528 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 3529 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3530 | else
|
|---|
| 3531 | ac_save_LIBS="$LIBS"
|
|---|
| 3532 | LIBS="-lgpm $LIBS"
|
|---|
| 3533 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3534 | #line 3535 "configure"
|
|---|
| 3535 | #include "confdefs.h"
|
|---|
| 3536 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 3537 | /* We use char because int might match the return type of a gcc2
|
|---|
| 3538 | builtin and then its argument prototype would still apply. */
|
|---|
| 3539 | char Gpm_Open();
|
|---|
| 3540 |
|
|---|
| 3541 | int main() {
|
|---|
| 3542 | Gpm_Open()
|
|---|
| 3543 | ; return 0; }
|
|---|
| 3544 | EOF
|
|---|
| 3545 | if { (eval echo configure:3546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3546 | rm -rf conftest*
|
|---|
| 3547 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 3548 | else
|
|---|
| 3549 | echo "configure: failed program was:" >&5
|
|---|
| 3550 | cat conftest.$ac_ext >&5
|
|---|
| 3551 | rm -rf conftest*
|
|---|
| 3552 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 3553 | fi
|
|---|
| 3554 | rm -f conftest*
|
|---|
| 3555 | LIBS="$ac_save_LIBS"
|
|---|
| 3556 |
|
|---|
| 3557 | fi
|
|---|
| 3558 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 3559 | echo "$ac_t""yes" 1>&6
|
|---|
| 3560 | echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
|
|---|
| 3561 | echo "configure:3562: checking for initscr in -lgpm" >&5
|
|---|
| 3562 | ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
|
|---|
| 3563 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 3564 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3565 | else
|
|---|
| 3566 | ac_save_LIBS="$LIBS"
|
|---|
| 3567 | LIBS="-lgpm $LIBS"
|
|---|
| 3568 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3569 | #line 3570 "configure"
|
|---|
| 3570 | #include "confdefs.h"
|
|---|
| 3571 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 3572 | /* We use char because int might match the return type of a gcc2
|
|---|
| 3573 | builtin and then its argument prototype would still apply. */
|
|---|
| 3574 | char initscr();
|
|---|
| 3575 |
|
|---|
| 3576 | int main() {
|
|---|
| 3577 | initscr()
|
|---|
| 3578 | ; return 0; }
|
|---|
| 3579 | EOF
|
|---|
| 3580 | if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3581 | rm -rf conftest*
|
|---|
| 3582 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 3583 | else
|
|---|
| 3584 | echo "configure: failed program was:" >&5
|
|---|
| 3585 | cat conftest.$ac_ext >&5
|
|---|
| 3586 | rm -rf conftest*
|
|---|
| 3587 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 3588 | fi
|
|---|
| 3589 | rm -f conftest*
|
|---|
| 3590 | LIBS="$ac_save_LIBS"
|
|---|
| 3591 |
|
|---|
| 3592 | fi
|
|---|
| 3593 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 3594 | echo "$ac_t""yes" 1>&6
|
|---|
| 3595 | LIBS="$cf_ncurses_SAVE"
|
|---|
| 3596 | else
|
|---|
| 3597 | echo "$ac_t""no" 1>&6
|
|---|
| 3598 | cf_ncurses_LIBS="-lgpm"
|
|---|
| 3599 | fi
|
|---|
| 3600 |
|
|---|
| 3601 | else
|
|---|
| 3602 | echo "$ac_t""no" 1>&6
|
|---|
| 3603 | fi
|
|---|
| 3604 |
|
|---|
| 3605 |
|
|---|
| 3606 | case $host_os in #(vi
|
|---|
| 3607 | freebsd*)
|
|---|
| 3608 | # This is only necessary if you are linking against an obsolete
|
|---|
| 3609 | # version of ncurses (but it should do no harm, since it's static).
|
|---|
| 3610 | if test "$cf_nculib_root" = ncurses ; then
|
|---|
| 3611 | echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
|
|---|
| 3612 | echo "configure:3613: checking for tgoto in -lmytinfo" >&5
|
|---|
| 3613 | ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
|
|---|
| 3614 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 3615 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3616 | else
|
|---|
| 3617 | ac_save_LIBS="$LIBS"
|
|---|
| 3618 | LIBS="-lmytinfo $LIBS"
|
|---|
| 3619 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3620 | #line 3621 "configure"
|
|---|
| 3621 | #include "confdefs.h"
|
|---|
| 3622 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 3623 | /* We use char because int might match the return type of a gcc2
|
|---|
| 3624 | builtin and then its argument prototype would still apply. */
|
|---|
| 3625 | char tgoto();
|
|---|
| 3626 |
|
|---|
| 3627 | int main() {
|
|---|
| 3628 | tgoto()
|
|---|
| 3629 | ; return 0; }
|
|---|
| 3630 | EOF
|
|---|
| 3631 | if { (eval echo configure:3632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3632 | rm -rf conftest*
|
|---|
| 3633 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 3634 | else
|
|---|
| 3635 | echo "configure: failed program was:" >&5
|
|---|
| 3636 | cat conftest.$ac_ext >&5
|
|---|
| 3637 | rm -rf conftest*
|
|---|
| 3638 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 3639 | fi
|
|---|
| 3640 | rm -f conftest*
|
|---|
| 3641 | LIBS="$ac_save_LIBS"
|
|---|
| 3642 |
|
|---|
| 3643 | fi
|
|---|
| 3644 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 3645 | echo "$ac_t""yes" 1>&6
|
|---|
| 3646 | cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
|
|---|
| 3647 | else
|
|---|
| 3648 | echo "$ac_t""no" 1>&6
|
|---|
| 3649 | fi
|
|---|
| 3650 |
|
|---|
| 3651 | fi
|
|---|
| 3652 | ;;
|
|---|
| 3653 | esac
|
|---|
| 3654 |
|
|---|
| 3655 | LIBS="$cf_ncurses_LIBS $LIBS"
|
|---|
| 3656 |
|
|---|
| 3657 | if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
|
|---|
| 3658 | then
|
|---|
| 3659 | LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
|
|---|
| 3660 | else
|
|---|
| 3661 |
|
|---|
| 3662 | eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
|
|---|
| 3663 | cf_libdir=""
|
|---|
| 3664 | echo $ac_n "checking for initscr""... $ac_c" 1>&6
|
|---|
| 3665 | echo "configure:3666: checking for initscr" >&5
|
|---|
| 3666 | if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
|
|---|
| 3667 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3668 | else
|
|---|
| 3669 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3670 | #line 3671 "configure"
|
|---|
| 3671 | #include "confdefs.h"
|
|---|
| 3672 | /* System header to define __stub macros and hopefully few prototypes,
|
|---|
| 3673 | which can conflict with char initscr(); below. */
|
|---|
| 3674 | #include <assert.h>
|
|---|
| 3675 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 3676 | /* We use char because int might match the return type of a gcc2
|
|---|
| 3677 | builtin and then its argument prototype would still apply. */
|
|---|
| 3678 | char initscr();
|
|---|
| 3679 |
|
|---|
| 3680 | int main() {
|
|---|
| 3681 |
|
|---|
| 3682 | /* The GNU C library defines this for functions which it implements
|
|---|
| 3683 | to always fail with ENOSYS. Some functions are actually named
|
|---|
| 3684 | something starting with __ and the normal name is an alias. */
|
|---|
| 3685 | #if defined (__stub_initscr) || defined (__stub___initscr)
|
|---|
| 3686 | choke me
|
|---|
| 3687 | #else
|
|---|
| 3688 | initscr();
|
|---|
| 3689 | #endif
|
|---|
| 3690 |
|
|---|
| 3691 | ; return 0; }
|
|---|
| 3692 | EOF
|
|---|
| 3693 | if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3694 | rm -rf conftest*
|
|---|
| 3695 | eval "ac_cv_func_initscr=yes"
|
|---|
| 3696 | else
|
|---|
| 3697 | echo "configure: failed program was:" >&5
|
|---|
| 3698 | cat conftest.$ac_ext >&5
|
|---|
| 3699 | rm -rf conftest*
|
|---|
| 3700 | eval "ac_cv_func_initscr=no"
|
|---|
| 3701 | fi
|
|---|
| 3702 | rm -f conftest*
|
|---|
| 3703 | fi
|
|---|
| 3704 |
|
|---|
| 3705 | if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
|
|---|
| 3706 | echo "$ac_t""yes" 1>&6
|
|---|
| 3707 | eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
|
|---|
| 3708 | else
|
|---|
| 3709 | echo "$ac_t""no" 1>&6
|
|---|
| 3710 |
|
|---|
| 3711 | cf_save_LIBS="$LIBS"
|
|---|
| 3712 | echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
|
|---|
| 3713 | echo "configure:3714: checking for initscr in -l$cf_nculib_root" >&5
|
|---|
| 3714 | LIBS="-l$cf_nculib_root $LIBS"
|
|---|
| 3715 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3716 | #line 3717 "configure"
|
|---|
| 3717 | #include "confdefs.h"
|
|---|
| 3718 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 3719 | int main() {
|
|---|
| 3720 | initscr()
|
|---|
| 3721 | ; return 0; }
|
|---|
| 3722 | EOF
|
|---|
| 3723 | if { (eval echo configure:3724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3724 | rm -rf conftest*
|
|---|
| 3725 | echo "$ac_t""yes" 1>&6
|
|---|
| 3726 | eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
|
|---|
| 3727 |
|
|---|
| 3728 | else
|
|---|
| 3729 | echo "configure: failed program was:" >&5
|
|---|
| 3730 | cat conftest.$ac_ext >&5
|
|---|
| 3731 | rm -rf conftest*
|
|---|
| 3732 | echo "$ac_t""no" 1>&6
|
|---|
| 3733 | cf_search=""
|
|---|
| 3734 |
|
|---|
| 3735 | test -d $HOME && {
|
|---|
| 3736 | test -n "$verbose" && echo " ... testing lib-directories under $HOME"
|
|---|
| 3737 | test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
|
|---|
| 3738 | test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
|
|---|
| 3739 | test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
|
|---|
| 3740 | }
|
|---|
| 3741 |
|
|---|
| 3742 | # For other stuff under the home directory, it should be sufficient to put
|
|---|
| 3743 | # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
|
|---|
| 3744 | test -d $HOME/$cf_nculib_root && {
|
|---|
| 3745 | test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
|
|---|
| 3746 | test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
|
|---|
| 3747 | test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
|
|---|
| 3748 | }
|
|---|
| 3749 |
|
|---|
| 3750 | test "$prefix" != /usr/local && \
|
|---|
| 3751 | test -d /usr/local && {
|
|---|
| 3752 | test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
|
|---|
| 3753 | test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
|
|---|
| 3754 | test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
|
|---|
| 3755 | test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
|
|---|
| 3756 | test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
|
|---|
| 3757 | test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
|
|---|
| 3758 | }
|
|---|
| 3759 |
|
|---|
| 3760 | test "$prefix" != NONE && \
|
|---|
| 3761 | test -d $prefix && {
|
|---|
| 3762 | test -n "$verbose" && echo " ... testing lib-directories under $prefix"
|
|---|
| 3763 | test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
|
|---|
| 3764 | test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
|
|---|
| 3765 | test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
|
|---|
| 3766 | test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
|
|---|
| 3767 | test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
|
|---|
| 3768 | }
|
|---|
| 3769 |
|
|---|
| 3770 | test "$prefix" != /opt && \
|
|---|
| 3771 | test -d /opt && {
|
|---|
| 3772 | test -n "$verbose" && echo " ... testing lib-directories under /opt"
|
|---|
| 3773 | test -d /opt/lib && cf_search="$cf_search /opt/lib"
|
|---|
| 3774 | test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
|
|---|
| 3775 | test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
|
|---|
| 3776 | test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
|
|---|
| 3777 | test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
|
|---|
| 3778 | }
|
|---|
| 3779 |
|
|---|
| 3780 | test "$prefix" != /usr && \
|
|---|
| 3781 | test -d /usr && {
|
|---|
| 3782 | test -n "$verbose" && echo " ... testing lib-directories under /usr"
|
|---|
| 3783 | test -d /usr/lib && cf_search="$cf_search /usr/lib"
|
|---|
| 3784 | test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
|
|---|
| 3785 | test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
|
|---|
| 3786 | test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
|
|---|
| 3787 | }
|
|---|
| 3788 |
|
|---|
| 3789 | for cf_libdir in $cf_search
|
|---|
| 3790 | do
|
|---|
| 3791 | echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
|
|---|
| 3792 | echo "configure:3793: checking for -l$cf_nculib_root in $cf_libdir" >&5
|
|---|
| 3793 | LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
|
|---|
| 3794 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3795 | #line 3796 "configure"
|
|---|
| 3796 | #include "confdefs.h"
|
|---|
| 3797 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 3798 | int main() {
|
|---|
| 3799 | initscr()
|
|---|
| 3800 | ; return 0; }
|
|---|
| 3801 | EOF
|
|---|
| 3802 | if { (eval echo configure:3803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3803 | rm -rf conftest*
|
|---|
| 3804 | echo "$ac_t""yes" 1>&6
|
|---|
| 3805 | eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
|
|---|
| 3806 | break
|
|---|
| 3807 | else
|
|---|
| 3808 | echo "configure: failed program was:" >&5
|
|---|
| 3809 | cat conftest.$ac_ext >&5
|
|---|
| 3810 | rm -rf conftest*
|
|---|
| 3811 | echo "$ac_t""no" 1>&6
|
|---|
| 3812 | LIBS="$cf_save_LIBS"
|
|---|
| 3813 | fi
|
|---|
| 3814 | rm -f conftest*
|
|---|
| 3815 | done
|
|---|
| 3816 |
|
|---|
| 3817 | fi
|
|---|
| 3818 | rm -f conftest*
|
|---|
| 3819 |
|
|---|
| 3820 | fi
|
|---|
| 3821 |
|
|---|
| 3822 | eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
|
|---|
| 3823 |
|
|---|
| 3824 | if test $cf_found_library = no ; then
|
|---|
| 3825 | { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
|
|---|
| 3826 | fi
|
|---|
| 3827 |
|
|---|
| 3828 |
|
|---|
| 3829 | fi
|
|---|
| 3830 |
|
|---|
| 3831 | if test -n "$cf_ncurses_LIBS" ; then
|
|---|
| 3832 | echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
|
|---|
| 3833 | echo "configure:3834: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
|
|---|
| 3834 | cf_ncurses_SAVE="$LIBS"
|
|---|
| 3835 | for p in $cf_ncurses_LIBS ; do
|
|---|
| 3836 | q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
|
|---|
| 3837 | if test "$q" != "$LIBS" ; then
|
|---|
| 3838 | LIBS="$q"
|
|---|
| 3839 | fi
|
|---|
| 3840 | done
|
|---|
| 3841 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3842 | #line 3843 "configure"
|
|---|
| 3843 | #include "confdefs.h"
|
|---|
| 3844 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 3845 | int main() {
|
|---|
| 3846 | initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
|
|---|
| 3847 | ; return 0; }
|
|---|
| 3848 | EOF
|
|---|
| 3849 | if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3850 | rm -rf conftest*
|
|---|
| 3851 | echo "$ac_t""yes" 1>&6
|
|---|
| 3852 | else
|
|---|
| 3853 | echo "configure: failed program was:" >&5
|
|---|
| 3854 | cat conftest.$ac_ext >&5
|
|---|
| 3855 | rm -rf conftest*
|
|---|
| 3856 | echo "$ac_t""no" 1>&6
|
|---|
| 3857 | LIBS="$cf_ncurses_SAVE"
|
|---|
| 3858 | fi
|
|---|
| 3859 | rm -f conftest*
|
|---|
| 3860 | fi
|
|---|
| 3861 |
|
|---|
| 3862 |
|
|---|
| 3863 | cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
|
|---|
| 3864 |
|
|---|
| 3865 | cat >> confdefs.h <<EOF
|
|---|
| 3866 | #define $cf_nculib_ROOT 1
|
|---|
| 3867 | EOF
|
|---|
| 3868 |
|
|---|
| 3869 |
|
|---|
| 3870 | LIB_NAME=ncursesw
|
|---|
| 3871 | ;;
|
|---|
| 3872 | esac
|
|---|
| 3873 |
|
|---|
| 3874 |
|
|---|
| 3875 |
|
|---|
| 3876 | echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
|
|---|
| 3877 | echo "configure:3878: checking for new_panel in -lpanel$cf_cv_libtype" >&5
|
|---|
| 3878 | ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
|
|---|
| 3879 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 3880 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3881 | else
|
|---|
| 3882 | ac_save_LIBS="$LIBS"
|
|---|
| 3883 | LIBS="-lpanel$cf_cv_libtype $LIBS"
|
|---|
| 3884 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3885 | #line 3886 "configure"
|
|---|
| 3886 | #include "confdefs.h"
|
|---|
| 3887 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 3888 | /* We use char because int might match the return type of a gcc2
|
|---|
| 3889 | builtin and then its argument prototype would still apply. */
|
|---|
| 3890 | char new_panel();
|
|---|
| 3891 |
|
|---|
| 3892 | int main() {
|
|---|
| 3893 | new_panel()
|
|---|
| 3894 | ; return 0; }
|
|---|
| 3895 | EOF
|
|---|
| 3896 | if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3897 | rm -rf conftest*
|
|---|
| 3898 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 3899 | else
|
|---|
| 3900 | echo "configure: failed program was:" >&5
|
|---|
| 3901 | cat conftest.$ac_ext >&5
|
|---|
| 3902 | rm -rf conftest*
|
|---|
| 3903 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 3904 | fi
|
|---|
| 3905 | rm -f conftest*
|
|---|
| 3906 | LIBS="$ac_save_LIBS"
|
|---|
| 3907 |
|
|---|
| 3908 | fi
|
|---|
| 3909 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 3910 | echo "$ac_t""yes" 1>&6
|
|---|
| 3911 | ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
|
|---|
| 3912 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
|
|---|
| 3913 | cat >> confdefs.h <<EOF
|
|---|
| 3914 | #define $ac_tr_lib 1
|
|---|
| 3915 | EOF
|
|---|
| 3916 |
|
|---|
| 3917 | LIBS="-lpanel$cf_cv_libtype $LIBS"
|
|---|
| 3918 |
|
|---|
| 3919 | else
|
|---|
| 3920 | echo "$ac_t""no" 1>&6
|
|---|
| 3921 | fi
|
|---|
| 3922 |
|
|---|
| 3923 | echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
|
|---|
| 3924 | echo "configure:3925: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
|
|---|
| 3925 | ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
|
|---|
| 3926 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 3927 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3928 | else
|
|---|
| 3929 | ac_save_LIBS="$LIBS"
|
|---|
| 3930 | LIBS="-lmenu$cf_cv_libtype $LIBS"
|
|---|
| 3931 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3932 | #line 3933 "configure"
|
|---|
| 3933 | #include "confdefs.h"
|
|---|
| 3934 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 3935 | /* We use char because int might match the return type of a gcc2
|
|---|
| 3936 | builtin and then its argument prototype would still apply. */
|
|---|
| 3937 | char menu_driver();
|
|---|
| 3938 |
|
|---|
| 3939 | int main() {
|
|---|
| 3940 | menu_driver()
|
|---|
| 3941 | ; return 0; }
|
|---|
| 3942 | EOF
|
|---|
| 3943 | if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3944 | rm -rf conftest*
|
|---|
| 3945 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 3946 | else
|
|---|
| 3947 | echo "configure: failed program was:" >&5
|
|---|
| 3948 | cat conftest.$ac_ext >&5
|
|---|
| 3949 | rm -rf conftest*
|
|---|
| 3950 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 3951 | fi
|
|---|
| 3952 | rm -f conftest*
|
|---|
| 3953 | LIBS="$ac_save_LIBS"
|
|---|
| 3954 |
|
|---|
| 3955 | fi
|
|---|
| 3956 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 3957 | echo "$ac_t""yes" 1>&6
|
|---|
| 3958 | ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
|
|---|
| 3959 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
|
|---|
| 3960 | cat >> confdefs.h <<EOF
|
|---|
| 3961 | #define $ac_tr_lib 1
|
|---|
| 3962 | EOF
|
|---|
| 3963 |
|
|---|
| 3964 | LIBS="-lmenu$cf_cv_libtype $LIBS"
|
|---|
| 3965 |
|
|---|
| 3966 | else
|
|---|
| 3967 | echo "$ac_t""no" 1>&6
|
|---|
| 3968 | fi
|
|---|
| 3969 |
|
|---|
| 3970 | echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
|
|---|
| 3971 | echo "configure:3972: checking for form_driver in -lform$cf_cv_libtype" >&5
|
|---|
| 3972 | ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
|
|---|
| 3973 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
|---|
| 3974 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 3975 | else
|
|---|
| 3976 | ac_save_LIBS="$LIBS"
|
|---|
| 3977 | LIBS="-lform$cf_cv_libtype $LIBS"
|
|---|
| 3978 | cat > conftest.$ac_ext <<EOF
|
|---|
| 3979 | #line 3980 "configure"
|
|---|
| 3980 | #include "confdefs.h"
|
|---|
| 3981 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 3982 | /* We use char because int might match the return type of a gcc2
|
|---|
| 3983 | builtin and then its argument prototype would still apply. */
|
|---|
| 3984 | char form_driver();
|
|---|
| 3985 |
|
|---|
| 3986 | int main() {
|
|---|
| 3987 | form_driver()
|
|---|
| 3988 | ; return 0; }
|
|---|
| 3989 | EOF
|
|---|
| 3990 | if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 3991 | rm -rf conftest*
|
|---|
| 3992 | eval "ac_cv_lib_$ac_lib_var=yes"
|
|---|
| 3993 | else
|
|---|
| 3994 | echo "configure: failed program was:" >&5
|
|---|
| 3995 | cat conftest.$ac_ext >&5
|
|---|
| 3996 | rm -rf conftest*
|
|---|
| 3997 | eval "ac_cv_lib_$ac_lib_var=no"
|
|---|
| 3998 | fi
|
|---|
| 3999 | rm -f conftest*
|
|---|
| 4000 | LIBS="$ac_save_LIBS"
|
|---|
| 4001 |
|
|---|
| 4002 | fi
|
|---|
| 4003 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
|---|
| 4004 | echo "$ac_t""yes" 1>&6
|
|---|
| 4005 | ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
|
|---|
| 4006 | -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
|
|---|
| 4007 | cat >> confdefs.h <<EOF
|
|---|
| 4008 | #define $ac_tr_lib 1
|
|---|
| 4009 | EOF
|
|---|
| 4010 |
|
|---|
| 4011 | LIBS="-lform$cf_cv_libtype $LIBS"
|
|---|
| 4012 |
|
|---|
| 4013 | else
|
|---|
| 4014 | echo "$ac_t""no" 1>&6
|
|---|
| 4015 | fi
|
|---|
| 4016 |
|
|---|
| 4017 |
|
|---|
| 4018 | echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
|
|---|
| 4019 | echo "configure:4020: checking return type of signal handlers" >&5
|
|---|
| 4020 | if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
|
|---|
| 4021 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4022 | else
|
|---|
| 4023 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4024 | #line 4025 "configure"
|
|---|
| 4025 | #include "confdefs.h"
|
|---|
| 4026 | #include <sys/types.h>
|
|---|
| 4027 | #include <signal.h>
|
|---|
| 4028 | #ifdef signal
|
|---|
| 4029 | #undef signal
|
|---|
| 4030 | #endif
|
|---|
| 4031 | #ifdef __cplusplus
|
|---|
| 4032 | extern "C" void (*signal (int, void (*)(int)))(int);
|
|---|
| 4033 | #else
|
|---|
| 4034 | void (*signal ()) ();
|
|---|
| 4035 | #endif
|
|---|
| 4036 |
|
|---|
| 4037 | int main() {
|
|---|
| 4038 | int i;
|
|---|
| 4039 | ; return 0; }
|
|---|
| 4040 | EOF
|
|---|
| 4041 | if { (eval echo configure:4042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 4042 | rm -rf conftest*
|
|---|
| 4043 | ac_cv_type_signal=void
|
|---|
| 4044 | else
|
|---|
| 4045 | echo "configure: failed program was:" >&5
|
|---|
| 4046 | cat conftest.$ac_ext >&5
|
|---|
| 4047 | rm -rf conftest*
|
|---|
| 4048 | ac_cv_type_signal=int
|
|---|
| 4049 | fi
|
|---|
| 4050 | rm -f conftest*
|
|---|
| 4051 | fi
|
|---|
| 4052 |
|
|---|
| 4053 | echo "$ac_t""$ac_cv_type_signal" 1>&6
|
|---|
| 4054 | cat >> confdefs.h <<EOF
|
|---|
| 4055 | #define RETSIGTYPE $ac_cv_type_signal
|
|---|
| 4056 | EOF
|
|---|
| 4057 |
|
|---|
| 4058 |
|
|---|
| 4059 |
|
|---|
| 4060 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
|
|---|
| 4061 | echo "configure:4062: checking for ANSI C header files" >&5
|
|---|
| 4062 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
|
|---|
| 4063 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4064 | else
|
|---|
| 4065 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4066 | #line 4067 "configure"
|
|---|
| 4067 | #include "confdefs.h"
|
|---|
| 4068 | #include <stdlib.h>
|
|---|
| 4069 | #include <stdarg.h>
|
|---|
| 4070 | #include <string.h>
|
|---|
| 4071 | #include <float.h>
|
|---|
| 4072 | EOF
|
|---|
| 4073 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|---|
| 4074 | { (eval echo configure:4075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|---|
| 4075 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|---|
| 4076 | if test -z "$ac_err"; then
|
|---|
| 4077 | rm -rf conftest*
|
|---|
| 4078 | ac_cv_header_stdc=yes
|
|---|
| 4079 | else
|
|---|
| 4080 | echo "$ac_err" >&5
|
|---|
| 4081 | echo "configure: failed program was:" >&5
|
|---|
| 4082 | cat conftest.$ac_ext >&5
|
|---|
| 4083 | rm -rf conftest*
|
|---|
| 4084 | ac_cv_header_stdc=no
|
|---|
| 4085 | fi
|
|---|
| 4086 | rm -f conftest*
|
|---|
| 4087 |
|
|---|
| 4088 | if test $ac_cv_header_stdc = yes; then
|
|---|
| 4089 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
|
|---|
| 4090 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4091 | #line 4092 "configure"
|
|---|
| 4092 | #include "confdefs.h"
|
|---|
| 4093 | #include <string.h>
|
|---|
| 4094 | EOF
|
|---|
| 4095 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|---|
| 4096 | egrep "memchr" >/dev/null 2>&1; then
|
|---|
| 4097 | :
|
|---|
| 4098 | else
|
|---|
| 4099 | rm -rf conftest*
|
|---|
| 4100 | ac_cv_header_stdc=no
|
|---|
| 4101 | fi
|
|---|
| 4102 | rm -f conftest*
|
|---|
| 4103 |
|
|---|
| 4104 | fi
|
|---|
| 4105 |
|
|---|
| 4106 | if test $ac_cv_header_stdc = yes; then
|
|---|
| 4107 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
|
|---|
| 4108 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4109 | #line 4110 "configure"
|
|---|
| 4110 | #include "confdefs.h"
|
|---|
| 4111 | #include <stdlib.h>
|
|---|
| 4112 | EOF
|
|---|
| 4113 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
|---|
| 4114 | egrep "free" >/dev/null 2>&1; then
|
|---|
| 4115 | :
|
|---|
| 4116 | else
|
|---|
| 4117 | rm -rf conftest*
|
|---|
| 4118 | ac_cv_header_stdc=no
|
|---|
| 4119 | fi
|
|---|
| 4120 | rm -f conftest*
|
|---|
| 4121 |
|
|---|
| 4122 | fi
|
|---|
| 4123 |
|
|---|
| 4124 | if test $ac_cv_header_stdc = yes; then
|
|---|
| 4125 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
|
|---|
| 4126 | if test "$cross_compiling" = yes; then
|
|---|
| 4127 | :
|
|---|
| 4128 | else
|
|---|
| 4129 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4130 | #line 4131 "configure"
|
|---|
| 4131 | #include "confdefs.h"
|
|---|
| 4132 | #include <ctype.h>
|
|---|
| 4133 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
|
|---|
| 4134 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
|
|---|
| 4135 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
|
|---|
| 4136 | int main () { int i; for (i = 0; i < 256; i++)
|
|---|
| 4137 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
|
|---|
| 4138 | exit (0); }
|
|---|
| 4139 |
|
|---|
| 4140 | EOF
|
|---|
| 4141 | if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|---|
| 4142 | then
|
|---|
| 4143 | :
|
|---|
| 4144 | else
|
|---|
| 4145 | echo "configure: failed program was:" >&5
|
|---|
| 4146 | cat conftest.$ac_ext >&5
|
|---|
| 4147 | rm -fr conftest*
|
|---|
| 4148 | ac_cv_header_stdc=no
|
|---|
| 4149 | fi
|
|---|
| 4150 | rm -fr conftest*
|
|---|
| 4151 | fi
|
|---|
| 4152 |
|
|---|
| 4153 | fi
|
|---|
| 4154 | fi
|
|---|
| 4155 |
|
|---|
| 4156 | echo "$ac_t""$ac_cv_header_stdc" 1>&6
|
|---|
| 4157 | if test $ac_cv_header_stdc = yes; then
|
|---|
| 4158 | cat >> confdefs.h <<\EOF
|
|---|
| 4159 | #define STDC_HEADERS 1
|
|---|
| 4160 | EOF
|
|---|
| 4161 |
|
|---|
| 4162 | fi
|
|---|
| 4163 |
|
|---|
| 4164 | echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
|
|---|
| 4165 | echo "configure:4166: checking whether time.h and sys/time.h may both be included" >&5
|
|---|
| 4166 | if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
|
|---|
| 4167 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4168 | else
|
|---|
| 4169 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4170 | #line 4171 "configure"
|
|---|
| 4171 | #include "confdefs.h"
|
|---|
| 4172 | #include <sys/types.h>
|
|---|
| 4173 | #include <sys/time.h>
|
|---|
| 4174 | #include <time.h>
|
|---|
| 4175 | int main() {
|
|---|
| 4176 | struct tm *tp;
|
|---|
| 4177 | ; return 0; }
|
|---|
| 4178 | EOF
|
|---|
| 4179 | if { (eval echo configure:4180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 4180 | rm -rf conftest*
|
|---|
| 4181 | ac_cv_header_time=yes
|
|---|
| 4182 | else
|
|---|
| 4183 | echo "configure: failed program was:" >&5
|
|---|
| 4184 | cat conftest.$ac_ext >&5
|
|---|
| 4185 | rm -rf conftest*
|
|---|
| 4186 | ac_cv_header_time=no
|
|---|
| 4187 | fi
|
|---|
| 4188 | rm -f conftest*
|
|---|
| 4189 | fi
|
|---|
| 4190 |
|
|---|
| 4191 | echo "$ac_t""$ac_cv_header_time" 1>&6
|
|---|
| 4192 | if test $ac_cv_header_time = yes; then
|
|---|
| 4193 | cat >> confdefs.h <<\EOF
|
|---|
| 4194 | #define TIME_WITH_SYS_TIME 1
|
|---|
| 4195 | EOF
|
|---|
| 4196 |
|
|---|
| 4197 | fi
|
|---|
| 4198 |
|
|---|
| 4199 | for ac_hdr in \
|
|---|
| 4200 | form.h \
|
|---|
| 4201 | getopt.h \
|
|---|
| 4202 | locale.h \
|
|---|
| 4203 | menu.h \
|
|---|
| 4204 | nc_alloc.h \
|
|---|
| 4205 | nomacros.h \
|
|---|
| 4206 | panel.h \
|
|---|
| 4207 | sys/ioctl.h \
|
|---|
| 4208 | sys/select.h \
|
|---|
| 4209 | sys/time.h \
|
|---|
| 4210 | termios.h \
|
|---|
| 4211 | unistd.h \
|
|---|
| 4212 |
|
|---|
| 4213 | do
|
|---|
| 4214 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
|---|
| 4215 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
|---|
| 4216 | echo "configure:4217: checking for $ac_hdr" >&5
|
|---|
| 4217 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
|---|
| 4218 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4219 | else
|
|---|
| 4220 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4221 | #line 4222 "configure"
|
|---|
| 4222 | #include "confdefs.h"
|
|---|
| 4223 | #include <$ac_hdr>
|
|---|
| 4224 | EOF
|
|---|
| 4225 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
|---|
| 4226 | { (eval echo configure:4227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
|---|
| 4227 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
|---|
| 4228 | if test -z "$ac_err"; then
|
|---|
| 4229 | rm -rf conftest*
|
|---|
| 4230 | eval "ac_cv_header_$ac_safe=yes"
|
|---|
| 4231 | else
|
|---|
| 4232 | echo "$ac_err" >&5
|
|---|
| 4233 | echo "configure: failed program was:" >&5
|
|---|
| 4234 | cat conftest.$ac_ext >&5
|
|---|
| 4235 | rm -rf conftest*
|
|---|
| 4236 | eval "ac_cv_header_$ac_safe=no"
|
|---|
| 4237 | fi
|
|---|
| 4238 | rm -f conftest*
|
|---|
| 4239 | fi
|
|---|
| 4240 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
|---|
| 4241 | echo "$ac_t""yes" 1>&6
|
|---|
| 4242 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
|
|---|
| 4243 | cat >> confdefs.h <<EOF
|
|---|
| 4244 | #define $ac_tr_hdr 1
|
|---|
| 4245 | EOF
|
|---|
| 4246 |
|
|---|
| 4247 | else
|
|---|
| 4248 | echo "$ac_t""no" 1>&6
|
|---|
| 4249 | fi
|
|---|
| 4250 | done
|
|---|
| 4251 |
|
|---|
| 4252 |
|
|---|
| 4253 | for ac_func in \
|
|---|
| 4254 | color_set \
|
|---|
| 4255 | getnstr \
|
|---|
| 4256 | gettimeofday \
|
|---|
| 4257 | napms \
|
|---|
| 4258 | resize_term \
|
|---|
| 4259 | resizeterm \
|
|---|
| 4260 | slk_color \
|
|---|
| 4261 | strdup \
|
|---|
| 4262 | use_default_colors \
|
|---|
| 4263 | vsscanf \
|
|---|
| 4264 | wchgat \
|
|---|
| 4265 | wresize \
|
|---|
| 4266 |
|
|---|
| 4267 | do
|
|---|
| 4268 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
|---|
| 4269 | echo "configure:4270: checking for $ac_func" >&5
|
|---|
| 4270 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
|---|
| 4271 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4272 | else
|
|---|
| 4273 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4274 | #line 4275 "configure"
|
|---|
| 4275 | #include "confdefs.h"
|
|---|
| 4276 | /* System header to define __stub macros and hopefully few prototypes,
|
|---|
| 4277 | which can conflict with char $ac_func(); below. */
|
|---|
| 4278 | #include <assert.h>
|
|---|
| 4279 | /* Override any gcc2 internal prototype to avoid an error. */
|
|---|
| 4280 | /* We use char because int might match the return type of a gcc2
|
|---|
| 4281 | builtin and then its argument prototype would still apply. */
|
|---|
| 4282 | char $ac_func();
|
|---|
| 4283 |
|
|---|
| 4284 | int main() {
|
|---|
| 4285 |
|
|---|
| 4286 | /* The GNU C library defines this for functions which it implements
|
|---|
| 4287 | to always fail with ENOSYS. Some functions are actually named
|
|---|
| 4288 | something starting with __ and the normal name is an alias. */
|
|---|
| 4289 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
|---|
| 4290 | choke me
|
|---|
| 4291 | #else
|
|---|
| 4292 | $ac_func();
|
|---|
| 4293 | #endif
|
|---|
| 4294 |
|
|---|
| 4295 | ; return 0; }
|
|---|
| 4296 | EOF
|
|---|
| 4297 | if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 4298 | rm -rf conftest*
|
|---|
| 4299 | eval "ac_cv_func_$ac_func=yes"
|
|---|
| 4300 | else
|
|---|
| 4301 | echo "configure: failed program was:" >&5
|
|---|
| 4302 | cat conftest.$ac_ext >&5
|
|---|
| 4303 | rm -rf conftest*
|
|---|
| 4304 | eval "ac_cv_func_$ac_func=no"
|
|---|
| 4305 | fi
|
|---|
| 4306 | rm -f conftest*
|
|---|
| 4307 | fi
|
|---|
| 4308 |
|
|---|
| 4309 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
|---|
| 4310 | echo "$ac_t""yes" 1>&6
|
|---|
| 4311 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
|---|
| 4312 | cat >> confdefs.h <<EOF
|
|---|
| 4313 | #define $ac_tr_func 1
|
|---|
| 4314 | EOF
|
|---|
| 4315 |
|
|---|
| 4316 | else
|
|---|
| 4317 | echo "$ac_t""no" 1>&6
|
|---|
| 4318 | fi
|
|---|
| 4319 | done
|
|---|
| 4320 |
|
|---|
| 4321 |
|
|---|
| 4322 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4323 | #line 4324 "configure"
|
|---|
| 4324 | #include "confdefs.h"
|
|---|
| 4325 |
|
|---|
| 4326 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 4327 | int main() {
|
|---|
| 4328 |
|
|---|
| 4329 | (void) assume_default_colors (0, 0);
|
|---|
| 4330 | (void) curses_version ();
|
|---|
| 4331 | (void) define_key (0, 0);
|
|---|
| 4332 | (void) is_term_resized (0, 0);
|
|---|
| 4333 | (void) key_defined (0);
|
|---|
| 4334 | (void) keybound (0, 0);
|
|---|
| 4335 | (void) keyok (0, 0);
|
|---|
| 4336 | (void) resize_term (0, 0);
|
|---|
| 4337 | (void) resizeterm (0, 0);
|
|---|
| 4338 | (void) use_default_colors ();
|
|---|
| 4339 | (void) use_extended_names (0);
|
|---|
| 4340 | (void) wresize (0, 0, 0);
|
|---|
| 4341 |
|
|---|
| 4342 | ; return 0; }
|
|---|
| 4343 | EOF
|
|---|
| 4344 | if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 4345 | rm -rf conftest*
|
|---|
| 4346 | cat >> confdefs.h <<\EOF
|
|---|
| 4347 | #define NCURSES_EXT_FUNCS 1
|
|---|
| 4348 | EOF
|
|---|
| 4349 |
|
|---|
| 4350 | else
|
|---|
| 4351 | echo "configure: failed program was:" >&5
|
|---|
| 4352 | cat conftest.$ac_ext >&5
|
|---|
| 4353 | fi
|
|---|
| 4354 | rm -f conftest*
|
|---|
| 4355 |
|
|---|
| 4356 |
|
|---|
| 4357 | echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
|
|---|
| 4358 | echo "configure:4359: checking if sys/time.h works with sys/select.h" >&5
|
|---|
| 4359 | if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
|
|---|
| 4360 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4361 | else
|
|---|
| 4362 |
|
|---|
| 4363 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4364 | #line 4365 "configure"
|
|---|
| 4365 | #include "confdefs.h"
|
|---|
| 4366 |
|
|---|
| 4367 | #include <sys/types.h>
|
|---|
| 4368 | #ifdef HAVE_SYS_TIME_H
|
|---|
| 4369 | #include <sys/time.h>
|
|---|
| 4370 | #endif
|
|---|
| 4371 | #ifdef HAVE_SYS_SELECT_H
|
|---|
| 4372 | #include <sys/select.h>
|
|---|
| 4373 | #endif
|
|---|
| 4374 |
|
|---|
| 4375 | int main() {
|
|---|
| 4376 |
|
|---|
| 4377 | ; return 0; }
|
|---|
| 4378 | EOF
|
|---|
| 4379 | if { (eval echo configure:4380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 4380 | rm -rf conftest*
|
|---|
| 4381 | cf_cv_sys_time_select=yes
|
|---|
| 4382 | else
|
|---|
| 4383 | echo "configure: failed program was:" >&5
|
|---|
| 4384 | cat conftest.$ac_ext >&5
|
|---|
| 4385 | rm -rf conftest*
|
|---|
| 4386 | cf_cv_sys_time_select=no
|
|---|
| 4387 | fi
|
|---|
| 4388 | rm -f conftest*
|
|---|
| 4389 |
|
|---|
| 4390 | fi
|
|---|
| 4391 |
|
|---|
| 4392 | echo "$ac_t""$cf_cv_sys_time_select" 1>&6
|
|---|
| 4393 | test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
|
|---|
| 4394 | #define HAVE_SYS_TIME_SELECT 1
|
|---|
| 4395 | EOF
|
|---|
| 4396 |
|
|---|
| 4397 |
|
|---|
| 4398 |
|
|---|
| 4399 | echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
|
|---|
| 4400 | echo "configure:4401: checking for function curses_version" >&5
|
|---|
| 4401 | if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
|
|---|
| 4402 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4403 | else
|
|---|
| 4404 |
|
|---|
| 4405 | if test "$cross_compiling" = yes; then
|
|---|
| 4406 | cf_cv_func_curses_version=unknown
|
|---|
| 4407 | else
|
|---|
| 4408 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4409 | #line 4410 "configure"
|
|---|
| 4410 | #include "confdefs.h"
|
|---|
| 4411 |
|
|---|
| 4412 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 4413 | int main()
|
|---|
| 4414 | {
|
|---|
| 4415 | char temp[1024];
|
|---|
| 4416 | sprintf(temp, "%s\n", curses_version());
|
|---|
| 4417 | exit(0);
|
|---|
| 4418 | }
|
|---|
| 4419 |
|
|---|
| 4420 | EOF
|
|---|
| 4421 | if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
|---|
| 4422 | then
|
|---|
| 4423 | cf_cv_func_curses_version=yes
|
|---|
| 4424 |
|
|---|
| 4425 | else
|
|---|
| 4426 | echo "configure: failed program was:" >&5
|
|---|
| 4427 | cat conftest.$ac_ext >&5
|
|---|
| 4428 | rm -fr conftest*
|
|---|
| 4429 | cf_cv_func_curses_version=no
|
|---|
| 4430 |
|
|---|
| 4431 | fi
|
|---|
| 4432 | rm -fr conftest*
|
|---|
| 4433 | fi
|
|---|
| 4434 |
|
|---|
| 4435 | rm -f core
|
|---|
| 4436 | fi
|
|---|
| 4437 |
|
|---|
| 4438 | echo "$ac_t""$cf_cv_func_curses_version" 1>&6
|
|---|
| 4439 | test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
|
|---|
| 4440 | #define HAVE_CURSES_VERSION 1
|
|---|
| 4441 | EOF
|
|---|
| 4442 |
|
|---|
| 4443 |
|
|---|
| 4444 |
|
|---|
| 4445 | echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
|
|---|
| 4446 | echo "configure:4447: checking for alternate character set array" >&5
|
|---|
| 4447 | if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
|
|---|
| 4448 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4449 | else
|
|---|
| 4450 |
|
|---|
| 4451 | cf_cv_curses_acs_map=unknown
|
|---|
| 4452 | for name in acs_map _acs_map __acs_map _nc_acs_map
|
|---|
| 4453 | do
|
|---|
| 4454 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4455 | #line 4456 "configure"
|
|---|
| 4456 | #include "confdefs.h"
|
|---|
| 4457 |
|
|---|
| 4458 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 4459 |
|
|---|
| 4460 | int main() {
|
|---|
| 4461 |
|
|---|
| 4462 | $name['k'] = ACS_PLUS
|
|---|
| 4463 |
|
|---|
| 4464 | ; return 0; }
|
|---|
| 4465 | EOF
|
|---|
| 4466 | if { (eval echo configure:4467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 4467 | rm -rf conftest*
|
|---|
| 4468 | cf_cv_curses_acs_map=$name; break
|
|---|
| 4469 | else
|
|---|
| 4470 | echo "configure: failed program was:" >&5
|
|---|
| 4471 | cat conftest.$ac_ext >&5
|
|---|
| 4472 | fi
|
|---|
| 4473 | rm -f conftest*
|
|---|
| 4474 | done
|
|---|
| 4475 |
|
|---|
| 4476 | fi
|
|---|
| 4477 |
|
|---|
| 4478 | echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
|
|---|
| 4479 |
|
|---|
| 4480 | test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
|
|---|
| 4481 | #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
|
|---|
| 4482 | EOF
|
|---|
| 4483 |
|
|---|
| 4484 |
|
|---|
| 4485 |
|
|---|
| 4486 | echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
|
|---|
| 4487 | echo "configure:4488: checking for wide alternate character set array" >&5
|
|---|
| 4488 | if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
|
|---|
| 4489 | echo $ac_n "(cached) $ac_c" 1>&6
|
|---|
| 4490 | else
|
|---|
| 4491 |
|
|---|
| 4492 | cf_cv_curses_wacs_map=unknown
|
|---|
| 4493 | for name in wacs_map _wacs_map __wacs_map _nc_wacs
|
|---|
| 4494 | do
|
|---|
| 4495 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4496 | #line 4497 "configure"
|
|---|
| 4497 | #include "confdefs.h"
|
|---|
| 4498 |
|
|---|
| 4499 | #ifndef _XOPEN_SOURCE_EXTENDED
|
|---|
| 4500 | #define _XOPEN_SOURCE_EXTENDED
|
|---|
| 4501 | #endif
|
|---|
| 4502 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 4503 | int main() {
|
|---|
| 4504 | $name['k'] = *WACS_PLUS
|
|---|
| 4505 | ; return 0; }
|
|---|
| 4506 | EOF
|
|---|
| 4507 | if { (eval echo configure:4508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
|---|
| 4508 | rm -rf conftest*
|
|---|
| 4509 | cf_cv_curses_wacs_map=$name
|
|---|
| 4510 | break
|
|---|
| 4511 | else
|
|---|
| 4512 | echo "configure: failed program was:" >&5
|
|---|
| 4513 | cat conftest.$ac_ext >&5
|
|---|
| 4514 | fi
|
|---|
| 4515 | rm -f conftest*
|
|---|
| 4516 | done
|
|---|
| 4517 | fi
|
|---|
| 4518 |
|
|---|
| 4519 | echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
|
|---|
| 4520 |
|
|---|
| 4521 |
|
|---|
| 4522 | echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
|
|---|
| 4523 | echo "configure:4524: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
|
|---|
| 4524 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4525 | #line 4526 "configure"
|
|---|
| 4526 | #include "confdefs.h"
|
|---|
| 4527 |
|
|---|
| 4528 | #ifndef _XOPEN_SOURCE_EXTENDED
|
|---|
| 4529 | #define _XOPEN_SOURCE_EXTENDED
|
|---|
| 4530 | #endif
|
|---|
| 4531 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 4532 | int main() {
|
|---|
| 4533 |
|
|---|
| 4534 | attr_t foo
|
|---|
| 4535 |
|
|---|
| 4536 | ; return 0; }
|
|---|
| 4537 | EOF
|
|---|
| 4538 | if { (eval echo configure:4539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 4539 | rm -rf conftest*
|
|---|
| 4540 | cf_result=yes
|
|---|
| 4541 | else
|
|---|
| 4542 | echo "configure: failed program was:" >&5
|
|---|
| 4543 | cat conftest.$ac_ext >&5
|
|---|
| 4544 | rm -rf conftest*
|
|---|
| 4545 | cf_result=no
|
|---|
| 4546 | fi
|
|---|
| 4547 | rm -f conftest*
|
|---|
| 4548 | echo "$ac_t""$cf_result" 1>&6
|
|---|
| 4549 | if test $cf_result = yes ; then
|
|---|
| 4550 |
|
|---|
| 4551 | cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
|
|---|
| 4552 |
|
|---|
| 4553 | cat >> confdefs.h <<EOF
|
|---|
| 4554 | #define $cf_result 1
|
|---|
| 4555 | EOF
|
|---|
| 4556 |
|
|---|
| 4557 | else
|
|---|
| 4558 | cat >> confdefs.h <<EOF
|
|---|
| 4559 | #define attr_t long
|
|---|
| 4560 | EOF
|
|---|
| 4561 |
|
|---|
| 4562 | fi
|
|---|
| 4563 |
|
|---|
| 4564 |
|
|---|
| 4565 | echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
|
|---|
| 4566 | echo "configure:4567: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
|
|---|
| 4567 | cat > conftest.$ac_ext <<EOF
|
|---|
| 4568 | #line 4569 "configure"
|
|---|
| 4569 | #include "confdefs.h"
|
|---|
| 4570 |
|
|---|
| 4571 | #ifndef _XOPEN_SOURCE_EXTENDED
|
|---|
| 4572 | #define _XOPEN_SOURCE_EXTENDED
|
|---|
| 4573 | #endif
|
|---|
| 4574 | #include <${cf_cv_ncurses_header-curses.h}>
|
|---|
| 4575 | int main() {
|
|---|
| 4576 |
|
|---|
| 4577 | mbstate_t foo
|
|---|
| 4578 |
|
|---|
| 4579 | ; return 0; }
|
|---|
| 4580 | EOF
|
|---|
| 4581 | if { (eval echo configure:4582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
|---|
| 4582 | rm -rf conftest*
|
|---|
| 4583 | cf_result=yes
|
|---|
| 4584 | else
|
|---|
| 4585 | echo "configure: failed program was:" >&5
|
|---|
| 4586 | cat conftest.$ac_ext >&5
|
|---|
| 4587 | rm -rf conftest*
|
|---|
| 4588 | cf_result=no
|
|---|
| 4589 | fi
|
|---|
| 4590 | rm -f conftest*
|
|---|
| 4591 | echo "$ac_t""$cf_result" 1>&6
|
|---|
| 4592 | if test $cf_result = yes ; then
|
|---|
| 4593 |
|
|---|
| 4594 | cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
|
|---|
| 4595 |
|
|---|
| 4596 | cat >> confdefs.h <<EOF
|
|---|
| 4597 | #define $cf_result 1
|
|---|
| 4598 | EOF
|
|---|
| 4599 |
|
|---|
| 4600 | else
|
|---|
| 4601 | cat >> confdefs.h <<EOF
|
|---|
| 4602 | #define mbstate_t long
|
|---|
| 4603 | EOF
|
|---|
| 4604 |
|
|---|
| 4605 | fi
|
|---|
| 4606 |
|
|---|
| 4607 |
|
|---|
| 4608 | TEST_ARGS="$LIBS"
|
|---|
| 4609 | LIBS=
|
|---|
| 4610 |
|
|---|
| 4611 |
|
|---|
| 4612 | trap '' 1 2 15
|
|---|
| 4613 | cat > confcache <<\EOF
|
|---|
| 4614 | # This file is a shell script that caches the results of configure
|
|---|
| 4615 | # tests run on this system so they can be shared between configure
|
|---|
| 4616 | # scripts and configure runs. It is not useful on other systems.
|
|---|
| 4617 | # If it contains results you don't want to keep, you may remove or edit it.
|
|---|
| 4618 | #
|
|---|
| 4619 | # By default, configure uses ./config.cache as the cache file,
|
|---|
| 4620 | # creating it if it does not exist already. You can give configure
|
|---|
| 4621 | # the --cache-file=FILE option to use a different cache file; that is
|
|---|
| 4622 | # what configure does when it calls configure scripts in
|
|---|
| 4623 | # subdirectories, so they share the cache.
|
|---|
| 4624 | # Giving --cache-file=/dev/null disables caching, for debugging configure.
|
|---|
| 4625 | # config.status only pays attention to the cache file if you give it the
|
|---|
| 4626 | # --recheck option to rerun configure.
|
|---|
| 4627 | #
|
|---|
| 4628 | EOF
|
|---|
| 4629 | # The following way of writing the cache mishandles newlines in values,
|
|---|
| 4630 | # but we know of no workaround that is simple, portable, and efficient.
|
|---|
| 4631 | # So, don't put newlines in cache variables' values.
|
|---|
| 4632 | # Ultrix sh set writes to stderr and can't be redirected directly,
|
|---|
| 4633 | # and sets the high bit in the cache file unless we assign to the vars.
|
|---|
| 4634 | (set) 2>&1 |
|
|---|
| 4635 | case `(ac_space=' '; set | grep ac_space) 2>&1` in
|
|---|
| 4636 | *ac_space=\ *)
|
|---|
| 4637 | # `set' does not quote correctly, so add quotes (double-quote substitution
|
|---|
| 4638 | # turns \\\\ into \\, and sed turns \\ into \).
|
|---|
| 4639 | sed -n \
|
|---|
| 4640 | -e "s/'/'\\\\''/g" \
|
|---|
| 4641 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
|
|---|
| 4642 | ;;
|
|---|
| 4643 | *)
|
|---|
| 4644 | # `set' quotes correctly as required by POSIX, so do not add quotes.
|
|---|
| 4645 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
|
|---|
| 4646 | ;;
|
|---|
| 4647 | esac >> confcache
|
|---|
| 4648 | if cmp -s $cache_file confcache; then
|
|---|
| 4649 | :
|
|---|
| 4650 | else
|
|---|
| 4651 | if test -w $cache_file; then
|
|---|
| 4652 | echo "updating cache $cache_file"
|
|---|
| 4653 | cat confcache > $cache_file
|
|---|
| 4654 | else
|
|---|
| 4655 | echo "not updating unwritable cache $cache_file"
|
|---|
| 4656 | fi
|
|---|
| 4657 | fi
|
|---|
| 4658 | rm -f confcache
|
|---|
| 4659 |
|
|---|
| 4660 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
|
|---|
| 4661 |
|
|---|
| 4662 | test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
|---|
| 4663 | # Let make expand exec_prefix.
|
|---|
| 4664 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
|---|
| 4665 |
|
|---|
| 4666 | # Any assignment to VPATH causes Sun make to only execute
|
|---|
| 4667 | # the first set of double-colon rules, so remove it if not needed.
|
|---|
| 4668 | # If there is a colon in the path, we need to keep it.
|
|---|
| 4669 | if test "x$srcdir" = x.; then
|
|---|
| 4670 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
|
|---|
| 4671 | fi
|
|---|
| 4672 |
|
|---|
| 4673 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
|---|
| 4674 |
|
|---|
| 4675 | DEFS=-DHAVE_CONFIG_H
|
|---|
| 4676 |
|
|---|
| 4677 | # Without the "./", some shells look in PATH for config.status.
|
|---|
| 4678 | : ${CONFIG_STATUS=./config.status}
|
|---|
| 4679 |
|
|---|
| 4680 | echo creating $CONFIG_STATUS
|
|---|
| 4681 | rm -f $CONFIG_STATUS
|
|---|
| 4682 | cat > $CONFIG_STATUS <<EOF
|
|---|
| 4683 | #! /bin/sh
|
|---|
| 4684 | # Generated automatically by configure.
|
|---|
| 4685 | # Run this file to recreate the current configuration.
|
|---|
| 4686 | # This directory was configured as follows,
|
|---|
| 4687 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
|---|
| 4688 | #
|
|---|
| 4689 | # $0 $ac_configure_args
|
|---|
| 4690 | #
|
|---|
| 4691 | # Compiler output produced by configure, useful for debugging
|
|---|
| 4692 | # configure, is in ./config.log if it exists.
|
|---|
| 4693 |
|
|---|
| 4694 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
|
|---|
| 4695 | for ac_option
|
|---|
| 4696 | do
|
|---|
| 4697 | case "\$ac_option" in
|
|---|
| 4698 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
|
|---|
| 4699 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
|---|
| 4700 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
|---|
| 4701 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
|---|
| 4702 | echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
|
|---|
| 4703 | exit 0 ;;
|
|---|
| 4704 | -help | --help | --hel | --he | --h)
|
|---|
| 4705 | echo "\$ac_cs_usage"; exit 0 ;;
|
|---|
| 4706 | *) echo "\$ac_cs_usage"; exit 1 ;;
|
|---|
| 4707 | esac
|
|---|
| 4708 | done
|
|---|
| 4709 |
|
|---|
| 4710 | ac_given_srcdir=$srcdir
|
|---|
| 4711 |
|
|---|
| 4712 | trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
|
|---|
| 4713 | EOF
|
|---|
| 4714 | cat >> $CONFIG_STATUS <<EOF
|
|---|
| 4715 |
|
|---|
| 4716 | # Protect against being on the right side of a sed subst in config.status.
|
|---|
| 4717 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
|---|
| 4718 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
|---|
| 4719 | $ac_vpsub
|
|---|
| 4720 | $extrasub
|
|---|
| 4721 | s%@SHELL@%$SHELL%g
|
|---|
| 4722 | s%@CFLAGS@%$CFLAGS%g
|
|---|
| 4723 | s%@CPPFLAGS@%$CPPFLAGS%g
|
|---|
| 4724 | s%@CXXFLAGS@%$CXXFLAGS%g
|
|---|
| 4725 | s%@FFLAGS@%$FFLAGS%g
|
|---|
| 4726 | s%@DEFS@%$DEFS%g
|
|---|
| 4727 | s%@LDFLAGS@%$LDFLAGS%g
|
|---|
| 4728 | s%@LIBS@%$LIBS%g
|
|---|
| 4729 | s%@exec_prefix@%$exec_prefix%g
|
|---|
| 4730 | s%@prefix@%$prefix%g
|
|---|
| 4731 | s%@program_transform_name@%$program_transform_name%g
|
|---|
| 4732 | s%@bindir@%$bindir%g
|
|---|
| 4733 | s%@sbindir@%$sbindir%g
|
|---|
| 4734 | s%@libexecdir@%$libexecdir%g
|
|---|
| 4735 | s%@datadir@%$datadir%g
|
|---|
| 4736 | s%@sysconfdir@%$sysconfdir%g
|
|---|
| 4737 | s%@sharedstatedir@%$sharedstatedir%g
|
|---|
| 4738 | s%@localstatedir@%$localstatedir%g
|
|---|
| 4739 | s%@libdir@%$libdir%g
|
|---|
| 4740 | s%@includedir@%$includedir%g
|
|---|
| 4741 | s%@oldincludedir@%$oldincludedir%g
|
|---|
| 4742 | s%@infodir@%$infodir%g
|
|---|
| 4743 | s%@mandir@%$mandir%g
|
|---|
| 4744 | s%@host@%$host%g
|
|---|
| 4745 | s%@host_alias@%$host_alias%g
|
|---|
| 4746 | s%@host_cpu@%$host_cpu%g
|
|---|
| 4747 | s%@host_vendor@%$host_vendor%g
|
|---|
| 4748 | s%@host_os@%$host_os%g
|
|---|
| 4749 | s%@SET_MAKE@%$SET_MAKE%g
|
|---|
| 4750 | s%@CC@%$CC%g
|
|---|
| 4751 | s%@CPP@%$CPP%g
|
|---|
| 4752 | s%@CC_G_OPT@%$CC_G_OPT%g
|
|---|
| 4753 | s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
|
|---|
| 4754 | s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
|
|---|
| 4755 | s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
|
|---|
| 4756 | s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
|
|---|
| 4757 | s%@ECHO_LINK@%$ECHO_LINK%g
|
|---|
| 4758 | s%@LD@%$LD%g
|
|---|
| 4759 | s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
|
|---|
| 4760 | s%@LD_MODEL@%$LD_MODEL%g
|
|---|
| 4761 | s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
|
|---|
| 4762 | s%@LIBTOOL@%$LIBTOOL%g
|
|---|
| 4763 | s%@LIB_CLEAN@%$LIB_CLEAN%g
|
|---|
| 4764 | s%@LIB_COMPILE@%$LIB_COMPILE%g
|
|---|
| 4765 | s%@LIB_LINK@%$LIB_LINK%g
|
|---|
| 4766 | s%@LIB_NAME@%$LIB_NAME%g
|
|---|
| 4767 | s%@LIB_PREFIX@%$LIB_PREFIX%g
|
|---|
| 4768 | s%@LINK_TESTS@%$LINK_TESTS%g
|
|---|
| 4769 | s%@LINT@%$LINT%g
|
|---|
| 4770 | s%@LINT_OPTS@%$LINT_OPTS%g
|
|---|
| 4771 | s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
|
|---|
| 4772 | s%@MATH_LIB@%$MATH_LIB%g
|
|---|
| 4773 | s%@TEST_ARGS@%$TEST_ARGS%g
|
|---|
| 4774 | s%@TEST_DEPS@%$TEST_DEPS%g
|
|---|
| 4775 | s%@TINFO_ARGS@%$TINFO_ARGS%g
|
|---|
| 4776 | s%@cf_cv_abi_version@%$cf_cv_abi_version%g
|
|---|
| 4777 | s%@cf_cv_rel_version@%$cf_cv_rel_version%g
|
|---|
| 4778 | s%@EXEEXT@%$EXEEXT%g
|
|---|
| 4779 | s%@OBJEXT@%$OBJEXT%g
|
|---|
| 4780 | s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
|
|---|
| 4781 |
|
|---|
| 4782 | CEOF
|
|---|
| 4783 | EOF
|
|---|
| 4784 |
|
|---|
| 4785 | cat >> $CONFIG_STATUS <<\EOF
|
|---|
| 4786 |
|
|---|
| 4787 | # Split the substitutions into bite-sized pieces for seds with
|
|---|
| 4788 | # small command number limits, like on Digital OSF/1 and HP-UX.
|
|---|
| 4789 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
|
|---|
| 4790 | ac_file=1 # Number of current file.
|
|---|
| 4791 | ac_beg=1 # First line for current file.
|
|---|
| 4792 | ac_end=$ac_max_sed_cmds # Line after last line for current file.
|
|---|
| 4793 | ac_more_lines=:
|
|---|
| 4794 | ac_sed_cmds=""
|
|---|
| 4795 | while $ac_more_lines; do
|
|---|
| 4796 | if test $ac_beg -gt 1; then
|
|---|
| 4797 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
|
|---|
| 4798 | else
|
|---|
| 4799 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file
|
|---|
| 4800 | fi
|
|---|
| 4801 | if test ! -s conftest.s$ac_file; then
|
|---|
| 4802 | ac_more_lines=false
|
|---|
| 4803 | rm -f conftest.s$ac_file
|
|---|
| 4804 | else
|
|---|
| 4805 | if test -z "$ac_sed_cmds"; then
|
|---|
| 4806 | ac_sed_cmds="sed -f conftest.s$ac_file"
|
|---|
| 4807 | else
|
|---|
| 4808 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
|
|---|
| 4809 | fi
|
|---|
| 4810 | ac_file=`expr $ac_file + 1`
|
|---|
| 4811 | ac_beg=$ac_end
|
|---|
| 4812 | ac_end=`expr $ac_end + $ac_max_sed_cmds`
|
|---|
| 4813 | fi
|
|---|
| 4814 | done
|
|---|
| 4815 | if test -z "$ac_sed_cmds"; then
|
|---|
| 4816 | ac_sed_cmds=cat
|
|---|
| 4817 | fi
|
|---|
| 4818 | EOF
|
|---|
| 4819 |
|
|---|
| 4820 | cat >> $CONFIG_STATUS <<EOF
|
|---|
| 4821 |
|
|---|
| 4822 | CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
|
|---|
| 4823 | EOF
|
|---|
| 4824 | cat >> $CONFIG_STATUS <<\EOF
|
|---|
| 4825 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
|
|---|
| 4826 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
|
|---|
| 4827 | case "$ac_file" in
|
|---|
| 4828 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
|
|---|
| 4829 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
|---|
| 4830 | *) ac_file_in="${ac_file}.in" ;;
|
|---|
| 4831 | esac
|
|---|
| 4832 |
|
|---|
| 4833 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
|
|---|
| 4834 |
|
|---|
| 4835 | # Remove last slash and all that follows it. Not all systems have dirname.
|
|---|
| 4836 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
|
|---|
| 4837 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
|
|---|
| 4838 | # The file is in a subdirectory.
|
|---|
| 4839 | test ! -d "$ac_dir" && mkdir "$ac_dir"
|
|---|
| 4840 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
|
|---|
| 4841 | # A "../" for each directory in $ac_dir_suffix.
|
|---|
| 4842 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
|
|---|
| 4843 | else
|
|---|
| 4844 | ac_dir_suffix= ac_dots=
|
|---|
| 4845 | fi
|
|---|
| 4846 |
|
|---|
| 4847 | case "$ac_given_srcdir" in
|
|---|
| 4848 | .) srcdir=.
|
|---|
| 4849 | if test -z "$ac_dots"; then top_srcdir=.
|
|---|
| 4850 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
|
|---|
| 4851 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
|
|---|
| 4852 | *) # Relative path.
|
|---|
| 4853 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
|
|---|
| 4854 | top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
|---|
| 4855 | esac
|
|---|
| 4856 |
|
|---|
| 4857 |
|
|---|
| 4858 | echo creating "$ac_file"
|
|---|
| 4859 | rm -f "$ac_file"
|
|---|
| 4860 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
|
|---|
| 4861 | case "$ac_file" in
|
|---|
| 4862 | *Makefile*) ac_comsub="1i\\
|
|---|
| 4863 | # $configure_input" ;;
|
|---|
| 4864 | *) ac_comsub= ;;
|
|---|
| 4865 | esac
|
|---|
| 4866 |
|
|---|
| 4867 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
|
|---|
| 4868 | sed -e "$ac_comsub
|
|---|
| 4869 | s%@configure_input@%$configure_input%g
|
|---|
| 4870 | s%@srcdir@%$srcdir%g
|
|---|
| 4871 | s%@top_srcdir@%$top_srcdir%g
|
|---|
| 4872 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
|
|---|
| 4873 | fi; done
|
|---|
| 4874 | rm -f conftest.s*
|
|---|
| 4875 |
|
|---|
| 4876 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
|
|---|
| 4877 | # NAME is the cpp macro being defined and VALUE is the value it is being given.
|
|---|
| 4878 | #
|
|---|
| 4879 | # ac_d sets the value in "#define NAME VALUE" lines.
|
|---|
| 4880 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
|
|---|
| 4881 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
|
|---|
| 4882 | ac_dC='\3'
|
|---|
| 4883 | ac_dD='%g'
|
|---|
| 4884 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
|
|---|
| 4885 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
|---|
| 4886 | ac_uB='\([ ]\)%\1#\2define\3'
|
|---|
| 4887 | ac_uC=' '
|
|---|
| 4888 | ac_uD='\4%g'
|
|---|
| 4889 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
|
|---|
| 4890 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
|---|
| 4891 | ac_eB='$%\1#\2define\3'
|
|---|
| 4892 | ac_eC=' '
|
|---|
| 4893 | ac_eD='%g'
|
|---|
| 4894 |
|
|---|
| 4895 | if test "${CONFIG_HEADERS+set}" != set; then
|
|---|
| 4896 | EOF
|
|---|
| 4897 | cat >> $CONFIG_STATUS <<EOF
|
|---|
| 4898 | CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
|
|---|
| 4899 | EOF
|
|---|
| 4900 | cat >> $CONFIG_STATUS <<\EOF
|
|---|
| 4901 | fi
|
|---|
| 4902 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
|
|---|
| 4903 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
|
|---|
| 4904 | case "$ac_file" in
|
|---|
| 4905 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
|
|---|
| 4906 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
|---|
| 4907 | *) ac_file_in="${ac_file}.in" ;;
|
|---|
| 4908 | esac
|
|---|
| 4909 |
|
|---|
| 4910 | echo creating $ac_file
|
|---|
| 4911 |
|
|---|
| 4912 | rm -f conftest.frag conftest.in conftest.out
|
|---|
| 4913 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
|
|---|
| 4914 | cat $ac_file_inputs > conftest.in
|
|---|
| 4915 |
|
|---|
| 4916 | EOF
|
|---|
| 4917 |
|
|---|
| 4918 |
|
|---|
| 4919 | # Transform confdefs.h into a list of #define's. We won't use it as a sed
|
|---|
| 4920 | # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
|
|---|
| 4921 | # be either 'cat' or 'sort'.
|
|---|
| 4922 | sort confdefs.h >conftest.vals
|
|---|
| 4923 |
|
|---|
| 4924 | # Break up conftest.vals because some shells have a limit on
|
|---|
| 4925 | # the size of here documents, and old seds have small limits too.
|
|---|
| 4926 |
|
|---|
| 4927 | rm -f conftest.tail
|
|---|
| 4928 | echo ' rm -f conftest.frag' >> $CONFIG_STATUS
|
|---|
| 4929 | while :
|
|---|
| 4930 | do
|
|---|
| 4931 | ac_lines=`grep -c . conftest.vals`
|
|---|
| 4932 | # grep -c gives empty output for an empty file on some AIX systems.
|
|---|
| 4933 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
|
|---|
| 4934 | # Write chunks of a limited-size here document to conftest.frag.
|
|---|
| 4935 | echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
|
|---|
| 4936 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
|
|---|
| 4937 | echo 'CEOF' >> $CONFIG_STATUS
|
|---|
| 4938 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
|
|---|
| 4939 | rm -f conftest.vals
|
|---|
| 4940 | mv conftest.tail conftest.vals
|
|---|
| 4941 | done
|
|---|
| 4942 | rm -f conftest.vals
|
|---|
| 4943 |
|
|---|
| 4944 | # Run sed to substitute the contents of conftest.frag into conftest.in at the
|
|---|
| 4945 | # marker @DEFS@.
|
|---|
| 4946 | echo ' cat >> conftest.edit <<CEOF
|
|---|
| 4947 | /@DEFS@/r conftest.frag
|
|---|
| 4948 | /@DEFS@/d
|
|---|
| 4949 | CEOF
|
|---|
| 4950 | sed -f conftest.edit conftest.in > conftest.out
|
|---|
| 4951 | rm -f conftest.in
|
|---|
| 4952 | mv conftest.out conftest.in
|
|---|
| 4953 | rm -f conftest.edit conftest.frag
|
|---|
| 4954 | ' >> $CONFIG_STATUS
|
|---|
| 4955 |
|
|---|
| 4956 |
|
|---|
| 4957 | cat >> $CONFIG_STATUS <<\EOF
|
|---|
| 4958 | rm -f conftest.frag conftest.h
|
|---|
| 4959 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
|
|---|
| 4960 | cat conftest.in >> conftest.h
|
|---|
| 4961 | rm -f conftest.in
|
|---|
| 4962 | if cmp -s $ac_file conftest.h 2>/dev/null; then
|
|---|
| 4963 | echo "$ac_file is unchanged"
|
|---|
| 4964 | rm -f conftest.h
|
|---|
| 4965 | else
|
|---|
| 4966 | # Remove last slash and all that follows it. Not all systems have dirname.
|
|---|
| 4967 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
|
|---|
| 4968 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
|
|---|
| 4969 | # The file is in a subdirectory.
|
|---|
| 4970 | test ! -d "$ac_dir" && mkdir "$ac_dir"
|
|---|
| 4971 | fi
|
|---|
| 4972 | rm -f $ac_file
|
|---|
| 4973 | mv conftest.h $ac_file
|
|---|
| 4974 | fi
|
|---|
| 4975 | fi; done
|
|---|
| 4976 |
|
|---|
| 4977 | EOF
|
|---|
| 4978 | cat >> $CONFIG_STATUS <<EOF
|
|---|
| 4979 | # Extra initialization commands, if any
|
|---|
| 4980 |
|
|---|
| 4981 | EOF
|
|---|
| 4982 | cat >> $CONFIG_STATUS <<\EOF
|
|---|
| 4983 | # Extra commands, if any
|
|---|
| 4984 |
|
|---|
| 4985 | cat >>Makefile <<TEST_EOF
|
|---|
| 4986 |
|
|---|
| 4987 | # These rules are generated so we do not rely on suffix rules, which do not
|
|---|
| 4988 | # work consistently for different make-programs (the '\$(MODEL)/' confuses
|
|---|
| 4989 | # some, and the '\$x' confuses others).
|
|---|
| 4990 | TEST_EOF
|
|---|
| 4991 | LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
|
|---|
| 4992 | for N in $LIST
|
|---|
| 4993 | do
|
|---|
| 4994 | cat >>Makefile <<TEST_EOF
|
|---|
| 4995 |
|
|---|
| 4996 | \$(MODEL)/$N.o : $N.c \\
|
|---|
| 4997 | test.priv.h \\
|
|---|
| 4998 | ncurses_cfg.h
|
|---|
| 4999 | @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
|
|---|
| 5000 | TEST_EOF
|
|---|
| 5001 | done
|
|---|
| 5002 |
|
|---|
| 5003 | exit 0
|
|---|
| 5004 | EOF
|
|---|
| 5005 | chmod +x $CONFIG_STATUS
|
|---|
| 5006 | rm -fr confdefs* $ac_clean_files
|
|---|
| 5007 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
|
|---|
| 5008 |
|
|---|