Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1 | #!/bin/sh |
| 2 | # From configure.in Revision: 1.3 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3 | #!/bin/sh |
| 4 | # Guess values for system-dependent variables and create Makefiles. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 5 | # Generated automatically using autoconf version 1.8 |
| 6 | # Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 8 | # This configure script is free software; you can redistribute it and/or |
| 9 | # modify it under the terms of the GNU General Public License as published |
| 10 | # by the Free Software Foundation; either version 2, or (at your option) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 11 | # any later version. |
| 12 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 13 | # This script is distributed in the hope that it will be useful, but |
| 14 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
| 16 | # Public License for more details. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 17 | |
| 18 | # You should have received a copy of the GNU General Public License |
| 19 | # along with this program; if not, write to the Free Software |
| 20 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 21 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 22 | # Save the original args to write them into config.status later. |
| 23 | configure_args="$*" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 24 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 25 | # Only options that might do something get documented. |
| 26 | ac_usage="Usage: configure [options] [host] |
| 27 | Options: [defaults in brackets after descriptions] |
| 28 | --build=BUILD configure for building on BUILD [BUILD=HOST] |
| 29 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 30 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 31 | --exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local] |
| 32 | --help print this message |
| 33 | --host=HOST configure for HOST [guessed] |
| 34 | --prefix=PREFIX install host independent files in PREFIX [/usr/local] |
| 35 | --quiet, --silent do not print \`checking for...' messages |
| 36 | --srcdir=DIR find the sources in DIR [configure dir or ..] |
| 37 | --target=TARGET configure for TARGET [TARGET=HOST] |
| 38 | --verbose print results of checks |
| 39 | --version print the version of autoconf that created configure |
| 40 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 41 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 42 | --x-includes=DIR X include files are in DIR |
| 43 | --x-libraries=DIR X library files are in DIR" |
| 44 | |
| 45 | # Initialize some variables set by options. |
| 46 | # The variables have the same names as the options, with |
| 47 | # dashes changed to underlines. |
| 48 | build=NONE |
| 49 | exec_prefix= |
| 50 | host=NONE |
| 51 | no_create= |
| 52 | nonopt=NONE |
| 53 | norecursion= |
| 54 | prefix= |
| 55 | program_prefix= |
| 56 | program_suffix= |
| 57 | program_transform_name= |
| 58 | silent= |
| 59 | srcdir= |
| 60 | target=NONE |
| 61 | verbose= |
| 62 | x_includes= |
| 63 | x_libraries= |
| 64 | |
| 65 | ac_prev= |
| 66 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 67 | do |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 68 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 69 | # If the previous option needs an argument, assign it. |
| 70 | if test -n "$ac_prev"; then |
| 71 | eval "$ac_prev=\$ac_option" |
| 72 | ac_prev= |
| 73 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 74 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 75 | |
| 76 | # Accept (but ignore some of) the important Cygnus configure |
| 77 | # options, so we can diagnose typos. |
| 78 | |
| 79 | case "$ac_option" in |
| 80 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; |
| 81 | *) ac_optarg= ;; |
| 82 | esac |
| 83 | |
| 84 | case "$ac_option" in |
| 85 | |
| 86 | -build | --build | --buil | --bui | --bu | --b) |
| 87 | ac_prev=build ;; |
| 88 | -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) |
| 89 | build="$ac_optarg" ;; |
| 90 | |
| 91 | -disable-* | --disable-*) |
| 92 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` |
| 93 | # Reject names that aren't valid shell variable names. |
| 94 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| 95 | echo "configure: $ac_feature: invalid feature name" >&2; exit 1 |
| 96 | fi |
| 97 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 98 | eval "enable_${ac_feature}=no" ;; |
| 99 | |
| 100 | -enable-* | --enable-*) |
| 101 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` |
| 102 | # Reject names that aren't valid shell variable names. |
| 103 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| 104 | echo "configure: $ac_feature: invalid feature name" >&2; exit 1 |
| 105 | fi |
| 106 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` |
| 107 | case "$ac_option" in |
| 108 | *=*) ;; |
| 109 | *) ac_optarg=yes ;; |
| 110 | esac |
| 111 | eval "enable_${ac_feature}='$ac_optarg'" ;; |
| 112 | |
| 113 | # For backward compatibility, recognize -exec-prefix and --exec_prefix. |
| 114 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 115 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 116 | | --exec | --exe | --ex) |
| 117 | ac_prev=exec_prefix ;; |
| 118 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 119 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 120 | | --exec=* | --exe=* | --ex=*) |
| 121 | exec_prefix="$ac_optarg" ;; |
| 122 | |
| 123 | -gas | --gas | --ga | --g) |
| 124 | with_gas=1 ;; # Obsolete; use --with-gas. |
| 125 | |
| 126 | -help | --help | --hel | --he) |
| 127 | cat << EOF |
| 128 | $ac_usage |
| 129 | EOF |
| 130 | exit 0 ;; |
| 131 | |
| 132 | -host | --host | --hos | --ho) |
| 133 | ac_prev=host ;; |
| 134 | -host=* | --host=* | --hos=* | --ho=*) |
| 135 | host="$ac_optarg" ;; |
| 136 | |
| 137 | -nfp | --nfp | --nf) |
| 138 | with_fp=no ;; # Obsolete; use --without-fp. |
| 139 | |
| 140 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 141 | | --no-cr | --no-c) |
| 142 | no_create=yes ;; |
| 143 | |
| 144 | -norecursion | --norecursion | --norecursio | --norecursi \ |
| 145 | | --norecurs | --norecur | --norecu | --norec | --nore | --nor) |
| 146 | norecursion=yes ;; |
| 147 | |
| 148 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 149 | ac_prev=prefix ;; |
| 150 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 151 | prefix="$ac_optarg" ;; |
| 152 | |
| 153 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 154 | | --program-pre | --program-pr | --program-p) |
| 155 | ac_prev=program_prefix ;; |
| 156 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 157 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 158 | program_prefix="$ac_optarg" ;; |
| 159 | |
| 160 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 161 | | --program-suf | --program-su | --program-s) |
| 162 | ac_prev=program_suffix ;; |
| 163 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 164 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 165 | program_suffix="$ac_optarg" ;; |
| 166 | |
| 167 | -program-transform-name | --program-transform-name \ |
| 168 | | --program-transform-nam | --program-transform-na \ |
| 169 | | --program-transform-n | --program-transform- \ |
| 170 | | --program-transform | --program-transfor \ |
| 171 | | --program-transfo | --program-transf \ |
| 172 | | --program-trans | --program-tran \ |
| 173 | | --progr-tra | --program-tr | --program-t) |
| 174 | ac_prev=program_transform_name ;; |
| 175 | -program-transform-name=* | --program-transform-name=* \ |
| 176 | | --program-transform-nam=* | --program-transform-na=* \ |
| 177 | | --program-transform-n=* | --program-transform-=* \ |
| 178 | | --program-transform=* | --program-transfor=* \ |
| 179 | | --program-transfo=* | --program-transf=* \ |
| 180 | | --program-trans=* | --program-tran=* \ |
| 181 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 182 | program_transform_name="$ac_optarg" ;; |
| 183 | |
| 184 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 185 | | -silent | --silent | --silen | --sile | --sil) |
| 186 | silent=yes ;; |
| 187 | |
| 188 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 189 | ac_prev=srcdir ;; |
| 190 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 191 | srcdir="$ac_optarg" ;; |
| 192 | |
| 193 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 194 | ac_prev=target ;; |
| 195 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 196 | target="$ac_optarg" ;; |
| 197 | |
| 198 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 199 | verbose=yes ;; |
| 200 | |
| 201 | -version | --version | --versio | --versi | --vers) |
| 202 | echo "configure generated by autoconf version 1.8" |
| 203 | exit 0 ;; |
| 204 | |
| 205 | -with-* | --with-*) |
| 206 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` |
| 207 | # Reject names that aren't valid shell variable names. |
| 208 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then |
| 209 | echo "configure: $ac_package: invalid package name" >&2; exit 1 |
| 210 | fi |
| 211 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 212 | case "$ac_option" in |
| 213 | *=*) ;; |
| 214 | *) ac_optarg=yes ;; |
| 215 | esac |
| 216 | eval "with_${ac_package}='$ac_optarg'" ;; |
| 217 | |
| 218 | -without-* | --without-*) |
| 219 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` |
| 220 | # Reject names that aren't valid shell variable names. |
| 221 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then |
| 222 | echo "configure: $ac_package: invalid package name" >&2; exit 1 |
| 223 | fi |
| 224 | ac_package=`echo $ac_package| sed 's/-/_/g'` |
| 225 | eval "with_${ac_package}=no" ;; |
| 226 | |
| 227 | --x) with_x=1 ;; # Obsolete; use --with-x. |
| 228 | |
| 229 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 230 | | --x-incl | --x-inc | --x-in | --x-i) |
| 231 | ac_prev=x_includes ;; |
| 232 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 233 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 234 | x_includes="$ac_optarg" ;; |
| 235 | |
| 236 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 237 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 238 | ac_prev=x_libraries ;; |
| 239 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 240 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 241 | x_libraries="$ac_optarg" ;; |
| 242 | |
| 243 | -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1 |
| 244 | ;; |
| 245 | |
| 246 | *) |
| 247 | if test -n "`echo $ac_option| sed 's/[-a-z0-9]//g'`"; then |
| 248 | echo "configure: warning: $ac_option: invalid host type" >&2 |
| 249 | fi |
| 250 | if test "x$nonopt" -ne xNONE; then |
| 251 | echo "configure: can only configure for one host and one target at a time" >&2; exit 1 |
| 252 | fi |
| 253 | nonopt="$ac_option" |
| 254 | ;; |
| 255 | |
| 256 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 257 | done |
| 258 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 259 | if test -n "$ac_prev"; then |
| 260 | echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1 |
| 261 | fi |
| 262 | |
| 263 | trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 |
| 264 | trap 'rm -fr confdefs* $ac_clean_files' 0 |
| 265 | |
| 266 | # Save the original args if we used an alternate arg parser. |
| 267 | ac_configure_temp="${configure_args-$*}" |
| 268 | # Strip out --no-create and --norecursion so they don't pile up. |
| 269 | configure_args= |
| 270 | for ac_arg in $ac_configure_temp; do |
| 271 | case "$ac_arg" in |
| 272 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 273 | | --no-cr | --no-c) ;; |
| 274 | -norecursion | --norecursion | --norecursio | --norecursi \ |
| 275 | | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;; |
| 276 | *) configure_args="$configure_args $ac_arg" ;; |
| 277 | esac |
| 278 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 279 | |
| 280 | # NLS nuisances. |
| 281 | # These must not be set unconditionally because not all systems understand |
| 282 | # e.g. LANG=C (notably SCO). |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 283 | if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi |
| 284 | if test "${LANG+set}" = 'set'; then LANG=C; export LANG; fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 285 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 286 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 287 | rm -rf conftest* confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 288 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. |
| 289 | echo > confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 290 | |
| 291 | # A filename unique to this package, relative to the directory that |
| 292 | # configure is in, which we can look for to find out if srcdir is correct. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 293 | ac_unique_file=Include/object.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 294 | |
| 295 | # Find the source files, if location was not specified. |
| 296 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 297 | ac_srcdir_defaulted=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 298 | # Try the directory containing this script, then `..'. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 299 | ac_prog=$0 |
| 300 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` |
| 301 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. |
| 302 | srcdir=$ac_confdir |
| 303 | if test ! -r $srcdir/$ac_unique_file; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 304 | srcdir=.. |
| 305 | fi |
| 306 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 307 | if test ! -r $srcdir/$ac_unique_file; then |
| 308 | if test x$ac_srcdir_defaulted = xyes; then |
| 309 | echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 310 | else |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 311 | echo "configure: can not find sources in ${srcdir}" >&2; exit 1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 312 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 313 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 314 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 315 | ac_ext=c |
| 316 | ac_cpp='${CPP} $CFLAGS' |
| 317 | ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 318 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 319 | if test -z "$prefix" |
| 320 | then |
| 321 | test -n "$silent" || echo "checking for python to derive installation directory prefix" |
| 322 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$IFS:" |
| 323 | for ac_dir in $PATH; do |
| 324 | test -z "$ac_dir" && ac_dir=. |
| 325 | if test $ac_dir != . && test -f $ac_dir/python; then |
| 326 | # Not all systems have dirname. |
| 327 | prefix=`echo $ac_dir|sed 's%/[^/][^/]*$%%'` |
| 328 | break |
| 329 | fi |
| 330 | done |
| 331 | IFS="$ac_save_ifs" |
| 332 | test -n "$verbose" && echo " chose installation directory prefix ${prefix}" |
| 333 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 334 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 335 | # Don't suppress compiler output when --verbose is specified |
| 336 | test -n "$verbose" && |
| 337 | ac_compile=`echo "$ac_compile" | sed "s|>/dev/null 2>&1||"` |
| 338 | test -n "$verbose" && echo " setting ac_compile to '$ac_compile'" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 339 | |
| 340 | # checks for alternative programs |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 341 | test -n "$silent" || echo "checking for --with(out)-gcc" |
| 342 | # check whether --with-gcc or --without-gcc was given. |
| 343 | withval="$with_gcc" |
| 344 | if test -n "$withval"; then |
| 345 | |
| 346 | case $withval in |
| 347 | no) withval=cc;; |
| 348 | yes) withval=gcc;; |
| 349 | esac |
| 350 | CC=$withval |
| 351 | fi |
| 352 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 353 | if test -z "$CC"; then |
| 354 | # Extract the first word of `gcc', so it can be a program name with args. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 355 | set ac_dummy gcc; ac_word=$2 |
| 356 | test -n "$silent" || echo "checking for $ac_word" |
| 357 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 358 | for ac_dir in $PATH; do |
| 359 | test -z "$ac_dir" && ac_dir=. |
| 360 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 361 | CC="gcc" |
| 362 | break |
| 363 | fi |
| 364 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 365 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 366 | fi |
| 367 | test -z "$CC" && CC="cc" |
| 368 | test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC" |
| 369 | |
| 370 | # Find out if we are using GNU C, under whatever name. |
| 371 | cat > conftest.c <<EOF |
| 372 | #ifdef __GNUC__ |
| 373 | yes |
| 374 | #endif |
| 375 | EOF |
| 376 | ${CC-cc} -E conftest.c > conftest.out 2>&1 |
| 377 | if egrep yes conftest.out >/dev/null 2>&1; then |
| 378 | GCC=1 # For later tests. |
| 379 | fi |
| 380 | rm -f conftest* |
| 381 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 382 | # Make sure to not get the incompatible SysV /etc/install and |
| 383 | # /usr/sbin/install, which might be in PATH before a BSD-like install, |
| 384 | # or the SunOS /usr/etc/install directory, or the AIX /bin/install, |
| 385 | # or the AFS install, which mishandles nonexistent args, or |
| 386 | # /usr/ucb/install on SVR4, which tries to use the nonexistent group |
| 387 | # `staff', or /sbin/install on IRIX which has incompatible command-line |
| 388 | # syntax. Sigh. |
| 389 | # |
| 390 | # On most BSDish systems install is in /usr/bin, not /usr/ucb |
| 391 | # anyway. |
| 392 | # This turns out not to be true, so the mere pathname isn't an indication |
| 393 | # of whether the program works. What we really need is a set of tests for |
| 394 | # the install program to see if it actually works in all the required ways. |
| 395 | # |
| 396 | # Avoid using ./install, which might have been erroneously created |
| 397 | # by make from ./install.sh. |
| 398 | if test "z${INSTALL}" = "z" ; then |
| 399 | test -n "$silent" || echo "checking for a BSD compatible install" |
| 400 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 401 | for ac_dir in $PATH; do |
| 402 | case "$ac_dir" in |
| 403 | ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;; |
| 404 | *) |
| 405 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 406 | for ac_prog in installbsd scoinst install; do |
| 407 | if test -f $ac_dir/$ac_prog; then |
| 408 | if grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then |
| 409 | : # AIX |
| 410 | else |
| 411 | INSTALL="$ac_dir/$ac_prog -c" |
| 412 | INSTALL_PROGRAM='${INSTALL}' |
| 413 | INSTALL_DATA='${INSTALL} -m 644' |
| 414 | break 2 |
| 415 | fi |
| 416 | fi |
| 417 | done |
| 418 | ;; |
| 419 | esac |
| 420 | done |
| 421 | IFS="$ac_save_ifs" |
| 422 | fi |
| 423 | if test -z "$INSTALL"; then |
| 424 | if test -f ${srcdir}/install.sh; then |
| 425 | # As a last resort, use the slow shell script. |
| 426 | INSTALL='@top_srcdir@/install.sh -c' |
| 427 | else |
| 428 | echo "configure: warning: ${srcdir}/install.sh not found; using cp" >&2 |
| 429 | INSTALL=cp |
| 430 | fi |
| 431 | fi |
| 432 | test -n "$verbose" && echo " setting INSTALL to $INSTALL" |
| 433 | # Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}. |
| 434 | # It thinks the first close brace ends the variable substitution. |
| 435 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 436 | test -n "$verbose" && echo " setting INSTALL_PROGRAM to $INSTALL_PROGRAM" |
| 437 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL}' |
| 438 | test -n "$verbose" && echo " setting INSTALL_DATA to $INSTALL_DATA" |
| 439 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 440 | if test -z "$RANLIB"; then |
| 441 | # Extract the first word of `ranlib', so it can be a program name with args. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 442 | set ac_dummy ranlib; ac_word=$2 |
| 443 | test -n "$silent" || echo "checking for $ac_word" |
| 444 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 445 | for ac_dir in $PATH; do |
| 446 | test -z "$ac_dir" && ac_dir=. |
| 447 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 448 | RANLIB="ranlib" |
| 449 | break |
| 450 | fi |
| 451 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 452 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 453 | fi |
| 454 | test -z "$RANLIB" && RANLIB=":" |
| 455 | test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB" |
| 456 | |
| 457 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 458 | for ac_prog in ar aal |
| 459 | do |
| 460 | if test -z "$AR"; then |
| 461 | # Extract the first word of `$ac_prog', so it can be a program name with args. |
| 462 | set ac_dummy $ac_prog; ac_word=$2 |
| 463 | test -n "$silent" || echo "checking for $ac_word" |
| 464 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 465 | for ac_dir in $PATH; do |
| 466 | test -z "$ac_dir" && ac_dir=. |
| 467 | if test -f $ac_dir/$ac_word; then |
| 468 | AR="$ac_prog" |
| 469 | break |
| 470 | fi |
| 471 | done |
| 472 | IFS="$ac_save_ifs" |
| 473 | fi |
| 474 | |
| 475 | test -n "$AR" && test -n "$verbose" && echo " setting AR to $AR" |
| 476 | |
| 477 | test -n "$AR" && break |
| 478 | done |
| 479 | test -n "$AR" || AR="ar" |
| 480 | |
| 481 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 482 | # checks for UNIX variants that set C preprocessor variables |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 483 | test -n "$silent" || echo "checking for AIX" |
| 484 | test -n "$silent" || echo "checking how to run the C preprocessor" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 485 | if test -z "$CPP"; then |
| 486 | # This must be in double quotes, not single quotes, because CPP may get |
| 487 | # substituted into the Makefile and ``${CC-cc}'' will simply confuse |
| 488 | # make. It must be expanded now. |
| 489 | CPP="${CC-cc} -E" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 490 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 491 | #include "confdefs.h" |
| 492 | #include <stdio.h> |
| 493 | Syntax Error |
| 494 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 495 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 496 | # the parens. |
| 497 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 498 | if test -z "$ac_err"; then |
| 499 | : |
| 500 | else |
| 501 | rm -rf conftest* |
| 502 | CPP="${CC-cc} -E -traditional-cpp" |
| 503 | cat > conftest.${ac_ext} <<EOF |
| 504 | #include "confdefs.h" |
| 505 | #include <stdio.h> |
| 506 | Syntax Error |
| 507 | EOF |
| 508 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 509 | # the parens. |
| 510 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 511 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 512 | : |
| 513 | else |
| 514 | rm -rf conftest* |
| 515 | CPP=/lib/cpp |
| 516 | fi |
| 517 | rm -f conftest* |
| 518 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 519 | rm -f conftest* |
| 520 | fi |
| 521 | test -n "$verbose" && echo " setting CPP to $CPP" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 522 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 523 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 524 | #include "confdefs.h" |
| 525 | #ifdef _AIX |
| 526 | yes |
| 527 | #endif |
| 528 | |
| 529 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 530 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 531 | if egrep "yes" conftest.out >/dev/null 2>&1; then |
| 532 | rm -rf conftest* |
| 533 | |
| 534 | { |
| 535 | test -n "$verbose" && \ |
| 536 | echo " defining _ALL_SOURCE" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 537 | echo "#define" _ALL_SOURCE "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 538 | DEFS="$DEFS -D_ALL_SOURCE=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 539 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD} |
| 540 | \${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD} |
| 541 | \${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD} |
| 542 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 543 | } |
| 544 | |
| 545 | |
| 546 | fi |
| 547 | rm -f conftest* |
| 548 | |
| 549 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 550 | test -n "$silent" || echo "checking for POSIXized ISC" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 551 | if test -d /etc/conf/kconfig.d && |
| 552 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 |
| 553 | then |
| 554 | ISC=1 # If later tests want to check for ISC. |
| 555 | |
| 556 | { |
| 557 | test -n "$verbose" && \ |
| 558 | echo " defining _POSIX_SOURCE" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 559 | echo "#define" _POSIX_SOURCE "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 560 | DEFS="$DEFS -D_POSIX_SOURCE=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 561 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD} |
| 562 | \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD} |
| 563 | \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD} |
| 564 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 565 | } |
| 566 | |
| 567 | if test -n "$GCC"; then |
| 568 | CC="$CC -posix" |
| 569 | else |
| 570 | CC="$CC -Xp" |
| 571 | fi |
| 572 | fi |
| 573 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 574 | test -n "$silent" || echo "checking for minix/config.h" |
| 575 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 576 | #include "confdefs.h" |
| 577 | #include <minix/config.h> |
| 578 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 579 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 580 | # the parens. |
| 581 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 582 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 583 | rm -rf conftest* |
| 584 | MINIX=1 |
| 585 | |
| 586 | fi |
| 587 | rm -f conftest* |
| 588 | |
| 589 | # The Minix shell can't assign to the same variable on the same line! |
| 590 | if test -n "$MINIX"; then |
| 591 | |
| 592 | { |
| 593 | test -n "$verbose" && \ |
| 594 | echo " defining _POSIX_SOURCE" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 595 | echo "#define" _POSIX_SOURCE "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 596 | DEFS="$DEFS -D_POSIX_SOURCE=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 597 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD} |
| 598 | \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD} |
| 599 | \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD} |
| 600 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 601 | } |
| 602 | |
| 603 | |
| 604 | { |
| 605 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 606 | echo " defining" _POSIX_1_SOURCE to be "2" |
| 607 | echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 608 | DEFS="$DEFS -D_POSIX_1_SOURCE=2" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 609 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD} |
| 610 | \${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD} |
| 611 | \${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD} |
| 612 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 613 | } |
| 614 | |
| 615 | |
| 616 | { |
| 617 | test -n "$verbose" && \ |
| 618 | echo " defining _MINIX" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 619 | echo "#define" _MINIX "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 620 | DEFS="$DEFS -D_MINIX=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 621 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD} |
| 622 | \${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD} |
| 623 | \${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD} |
| 624 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 625 | } |
| 626 | |
| 627 | fi |
| 628 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 629 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 630 | LIBS="${LIBS} -lseq" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 631 | ac_have_lib="" |
| 632 | test -n "$silent" || echo "checking for -lseq" |
| 633 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 634 | #include "confdefs.h" |
| 635 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 636 | int main() { return 0; } |
| 637 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 638 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 639 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 640 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 641 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 642 | |
| 643 | fi |
| 644 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 645 | LIBS="${ac_save_LIBS}" |
| 646 | if test -n "${ac_have_lib}"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 647 | :; LIBS="$LIBS -lseq" |
| 648 | else |
| 649 | :; |
| 650 | fi |
| 651 | |
| 652 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 653 | test -n "$silent" || echo "checking for NeXT" |
| 654 | cat > conftest.${ac_ext} <<EOF |
| 655 | #include "confdefs.h" |
| 656 | |
| 657 | #ifdef _NEXT_SOURCE |
| 658 | main() { exit(0); } |
| 659 | #endif |
| 660 | |
| 661 | EOF |
| 662 | eval $ac_compile |
| 663 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 664 | |
| 665 | { |
| 666 | test -n "$verbose" && \ |
| 667 | echo " defining _POSIX_SOURCE" |
| 668 | echo "#define" _POSIX_SOURCE "1" >> confdefs.h |
| 669 | DEFS="$DEFS -D_POSIX_SOURCE=1" |
| 670 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD} |
| 671 | \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD} |
| 672 | \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD} |
| 673 | " |
| 674 | } |
| 675 | |
| 676 | |
| 677 | fi |
| 678 | rm -fr conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 679 | |
| 680 | # checks for header files |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 681 | test -n "$silent" || echo "checking for ANSI C header files" |
| 682 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 683 | #include "confdefs.h" |
| 684 | #include <stdlib.h> |
| 685 | #include <stdarg.h> |
| 686 | #include <string.h> |
| 687 | #include <float.h> |
| 688 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 689 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 690 | # the parens. |
| 691 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 692 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 693 | rm -rf conftest* |
| 694 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 695 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 696 | #include <string.h>' > conftest.${ac_ext} |
| 697 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 698 | if egrep "memchr" conftest.out >/dev/null 2>&1; then |
| 699 | rm -rf conftest* |
| 700 | # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 701 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 702 | #include "confdefs.h" |
| 703 | #include <ctype.h> |
| 704 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 705 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 706 | #define XOR(e,f) (((e) && !(f)) || (!(e) && (f))) |
| 707 | int main () { int i; for (i = 0; i < 256; i++) |
| 708 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 709 | exit (0); } |
| 710 | |
| 711 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 712 | eval $ac_compile |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 713 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 714 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 715 | echo '#include "confdefs.h" |
| 716 | #include <stdlib.h>' > conftest.${ac_ext} |
| 717 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
| 718 | if egrep "free" conftest.out >/dev/null 2>&1; then |
| 719 | rm -rf conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 720 | |
| 721 | { |
| 722 | test -n "$verbose" && \ |
| 723 | echo " defining STDC_HEADERS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 724 | echo "#define" STDC_HEADERS "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 725 | DEFS="$DEFS -DSTDC_HEADERS=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 726 | ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD} |
| 727 | \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD} |
| 728 | \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD} |
| 729 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 730 | } |
| 731 | |
| 732 | |
| 733 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 734 | rm -f conftest* |
| 735 | |
| 736 | |
| 737 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 738 | rm -fr conftest* |
| 739 | |
| 740 | fi |
| 741 | rm -f conftest* |
| 742 | |
| 743 | |
| 744 | fi |
| 745 | rm -f conftest* |
| 746 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 747 | for ac_hdr in dlfcn.h fcntl.h limits.h signal.h stdarg.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 748 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 749 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` |
| 750 | test -n "$silent" || echo "checking for ${ac_hdr}" |
| 751 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 752 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 753 | #include <${ac_hdr}> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 754 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 755 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 756 | # the parens. |
| 757 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 758 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 759 | rm -rf conftest* |
| 760 | |
| 761 | { |
| 762 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 763 | echo " defining ${ac_tr_hdr}" |
| 764 | echo "#define" ${ac_tr_hdr} "1" >> confdefs.h |
| 765 | DEFS="$DEFS -D${ac_tr_hdr}=1" |
| 766 | ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD} |
| 767 | \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD} |
| 768 | \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD} |
| 769 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 770 | } |
| 771 | |
| 772 | |
| 773 | fi |
| 774 | rm -f conftest* |
| 775 | done |
| 776 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 777 | test -n "$silent" || echo "checking for directory library header" |
| 778 | ac_dir_header= |
| 779 | if test -z "$ac_dir_header"; then |
| 780 | test -n "$silent" || echo "checking for dirent.h" |
| 781 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 782 | #include "confdefs.h" |
| 783 | #include <sys/types.h> |
| 784 | #include <dirent.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 785 | int main() { return 0; } |
| 786 | int t() { DIR *dirp = 0;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 787 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 788 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 789 | rm -rf conftest* |
| 790 | |
| 791 | { |
| 792 | test -n "$verbose" && \ |
| 793 | echo " defining DIRENT" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 794 | echo "#define" DIRENT "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 795 | DEFS="$DEFS -DDIRENT=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 796 | ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD} |
| 797 | \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD} |
| 798 | \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD} |
| 799 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 800 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 801 | ac_dir_header=dirent.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 802 | |
| 803 | fi |
| 804 | rm -f conftest* |
| 805 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 806 | if test -z "$ac_dir_header"; then |
| 807 | test -n "$silent" || echo "checking for sys/ndir.h" |
| 808 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 809 | #include "confdefs.h" |
| 810 | #include <sys/types.h> |
| 811 | #include <sys/ndir.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 812 | int main() { return 0; } |
| 813 | int t() { DIR *dirp = 0;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 814 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 815 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 816 | rm -rf conftest* |
| 817 | |
| 818 | { |
| 819 | test -n "$verbose" && \ |
| 820 | echo " defining SYSNDIR" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 821 | echo "#define" SYSNDIR "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 822 | DEFS="$DEFS -DSYSNDIR=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 823 | ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD} |
| 824 | \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD} |
| 825 | \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD} |
| 826 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 827 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 828 | ac_dir_header=sys/ndir.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 829 | |
| 830 | fi |
| 831 | rm -f conftest* |
| 832 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 833 | if test -z "$ac_dir_header"; then |
| 834 | test -n "$silent" || echo "checking for sys/dir.h" |
| 835 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 836 | #include "confdefs.h" |
| 837 | #include <sys/types.h> |
| 838 | #include <sys/dir.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 839 | int main() { return 0; } |
| 840 | int t() { DIR *dirp = 0;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 841 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 842 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 843 | rm -rf conftest* |
| 844 | |
| 845 | { |
| 846 | test -n "$verbose" && \ |
| 847 | echo " defining SYSDIR" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 848 | echo "#define" SYSDIR "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 849 | DEFS="$DEFS -DSYSDIR=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 850 | ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD} |
| 851 | \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD} |
| 852 | \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD} |
| 853 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 854 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 855 | ac_dir_header=sys/dir.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 856 | |
| 857 | fi |
| 858 | rm -f conftest* |
| 859 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 860 | if test -z "$ac_dir_header"; then |
| 861 | test -n "$silent" || echo "checking for ndir.h" |
| 862 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 863 | #include "confdefs.h" |
| 864 | #include <sys/types.h> |
| 865 | #include <ndir.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 866 | int main() { return 0; } |
| 867 | int t() { DIR *dirp = 0;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 868 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 869 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 870 | rm -rf conftest* |
| 871 | |
| 872 | { |
| 873 | test -n "$verbose" && \ |
| 874 | echo " defining NDIR" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 875 | echo "#define" NDIR "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 876 | DEFS="$DEFS -DNDIR=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 877 | ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD} |
| 878 | \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD} |
| 879 | \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD} |
| 880 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 881 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 882 | ac_dir_header=ndir.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 883 | |
| 884 | fi |
| 885 | rm -f conftest* |
| 886 | fi |
| 887 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 888 | test -n "$silent" || echo "checking for closedir return value" |
| 889 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 890 | #include "confdefs.h" |
| 891 | #include <sys/types.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 892 | #include <$ac_dir_header> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 893 | int closedir(); main() { exit(closedir(opendir(".")) != 0); } |
| 894 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 895 | eval $ac_compile |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 896 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 897 | : |
| 898 | else |
| 899 | |
| 900 | { |
| 901 | test -n "$verbose" && \ |
| 902 | echo " defining VOID_CLOSEDIR" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 903 | echo "#define" VOID_CLOSEDIR "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 904 | DEFS="$DEFS -DVOID_CLOSEDIR=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 905 | ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD} |
| 906 | \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD} |
| 907 | \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD} |
| 908 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 909 | } |
| 910 | |
| 911 | fi |
| 912 | rm -fr conftest* |
| 913 | |
| 914 | |
| 915 | # checks for typedefs |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 916 | test -n "$silent" || echo "checking for clock_t in time.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 917 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 918 | #include <time.h>' > conftest.${ac_ext} |
| 919 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
| 920 | if egrep "clock_t" conftest.out >/dev/null 2>&1; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 921 | : |
| 922 | else |
| 923 | rm -rf conftest* |
| 924 | |
| 925 | { |
| 926 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 927 | echo " defining" clock_t to be "long" |
| 928 | echo "#define" clock_t "long" >> confdefs.h |
| 929 | DEFS="$DEFS -Dclock_t=long" |
| 930 | ac_sed_defs="${ac_sed_defs}\${ac_dA}clock_t\${ac_dB}clock_t\${ac_dC}long\${ac_dD} |
| 931 | \${ac_uA}clock_t\${ac_uB}clock_t\${ac_uC}long\${ac_uD} |
| 932 | \${ac_eA}clock_t\${ac_eB}clock_t\${ac_eC}long\${ac_eD} |
| 933 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 934 | } |
| 935 | |
| 936 | fi |
| 937 | rm -f conftest* |
| 938 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 939 | test -n "$silent" || echo "checking for mode_t in sys/types.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 940 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 941 | #include <sys/types.h>' > conftest.${ac_ext} |
| 942 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 943 | if egrep "mode_t" conftest.out >/dev/null 2>&1; then |
| 944 | : |
| 945 | else |
| 946 | rm -rf conftest* |
| 947 | |
| 948 | { |
| 949 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 950 | echo " defining" mode_t to be "int" |
| 951 | echo "#define" mode_t "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 952 | DEFS="$DEFS -Dmode_t=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 953 | ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD} |
| 954 | \${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD} |
| 955 | \${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD} |
| 956 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 957 | } |
| 958 | |
| 959 | fi |
| 960 | rm -f conftest* |
| 961 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 962 | test -n "$silent" || echo "checking for off_t in sys/types.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 963 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 964 | #include <sys/types.h>' > conftest.${ac_ext} |
| 965 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 966 | if egrep "off_t" conftest.out >/dev/null 2>&1; then |
| 967 | : |
| 968 | else |
| 969 | rm -rf conftest* |
| 970 | |
| 971 | { |
| 972 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 973 | echo " defining" off_t to be "long" |
| 974 | echo "#define" off_t "long" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 975 | DEFS="$DEFS -Doff_t=long" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 976 | ac_sed_defs="${ac_sed_defs}\${ac_dA}off_t\${ac_dB}off_t\${ac_dC}long\${ac_dD} |
| 977 | \${ac_uA}off_t\${ac_uB}off_t\${ac_uC}long\${ac_uD} |
| 978 | \${ac_eA}off_t\${ac_eB}off_t\${ac_eC}long\${ac_eD} |
| 979 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 980 | } |
| 981 | |
| 982 | fi |
| 983 | rm -f conftest* |
| 984 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 985 | test -n "$silent" || echo "checking for pid_t in sys/types.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 986 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 987 | #include <sys/types.h>' > conftest.${ac_ext} |
| 988 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 989 | if egrep "pid_t" conftest.out >/dev/null 2>&1; then |
| 990 | : |
| 991 | else |
| 992 | rm -rf conftest* |
| 993 | |
| 994 | { |
| 995 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 996 | echo " defining" pid_t to be "int" |
| 997 | echo "#define" pid_t "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 998 | DEFS="$DEFS -Dpid_t=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 999 | ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD} |
| 1000 | \${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD} |
| 1001 | \${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD} |
| 1002 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1003 | } |
| 1004 | |
| 1005 | fi |
| 1006 | rm -f conftest* |
| 1007 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1008 | test -n "$silent" || echo "checking for return type of signal handlers" |
| 1009 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1010 | #include "confdefs.h" |
| 1011 | #include <sys/types.h> |
| 1012 | #include <signal.h> |
| 1013 | #ifdef signal |
| 1014 | #undef signal |
| 1015 | #endif |
| 1016 | extern void (*signal ()) (); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1017 | int main() { return 0; } |
| 1018 | int t() { int i;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1019 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1020 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1021 | rm -rf conftest* |
| 1022 | |
| 1023 | { |
| 1024 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1025 | echo " defining" RETSIGTYPE to be "void" |
| 1026 | echo "#define" RETSIGTYPE "void" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1027 | DEFS="$DEFS -DRETSIGTYPE=void" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1028 | ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD} |
| 1029 | \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD} |
| 1030 | \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD} |
| 1031 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1032 | } |
| 1033 | |
| 1034 | |
| 1035 | else |
| 1036 | rm -rf conftest* |
| 1037 | |
| 1038 | { |
| 1039 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1040 | echo " defining" RETSIGTYPE to be "int" |
| 1041 | echo "#define" RETSIGTYPE "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1042 | DEFS="$DEFS -DRETSIGTYPE=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1043 | ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD} |
| 1044 | \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD} |
| 1045 | \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD} |
| 1046 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1047 | } |
| 1048 | |
| 1049 | fi |
| 1050 | rm -f conftest* |
| 1051 | |
| 1052 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1053 | test -n "$silent" || echo "checking for size_t in sys/types.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1054 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1055 | #include <sys/types.h>' > conftest.${ac_ext} |
| 1056 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1057 | if egrep "size_t" conftest.out >/dev/null 2>&1; then |
| 1058 | : |
| 1059 | else |
| 1060 | rm -rf conftest* |
| 1061 | |
| 1062 | { |
| 1063 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1064 | echo " defining" size_t to be "unsigned" |
| 1065 | echo "#define" size_t "unsigned" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1066 | DEFS="$DEFS -Dsize_t=unsigned" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1067 | ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD} |
| 1068 | \${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD} |
| 1069 | \${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD} |
| 1070 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1071 | } |
| 1072 | |
| 1073 | fi |
| 1074 | rm -f conftest* |
| 1075 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1076 | test -n "$silent" || echo "checking for uid_t in sys/types.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1077 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1078 | #include <sys/types.h>' > conftest.${ac_ext} |
| 1079 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1080 | if egrep "uid_t" conftest.out >/dev/null 2>&1; then |
| 1081 | : |
| 1082 | else |
| 1083 | rm -rf conftest* |
| 1084 | |
| 1085 | { |
| 1086 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1087 | echo " defining" uid_t to be "int" |
| 1088 | echo "#define" uid_t "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1089 | DEFS="$DEFS -Duid_t=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1090 | ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD} |
| 1091 | \${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD} |
| 1092 | \${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD} |
| 1093 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1094 | } |
| 1095 | |
| 1096 | { |
| 1097 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1098 | echo " defining" gid_t to be "int" |
| 1099 | echo "#define" gid_t "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1100 | DEFS="$DEFS -Dgid_t=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1101 | ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD} |
| 1102 | \${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD} |
| 1103 | \${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD} |
| 1104 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1105 | } |
| 1106 | |
| 1107 | fi |
| 1108 | rm -f conftest* |
| 1109 | |
| 1110 | |
| 1111 | # checks for libraries |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1112 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1113 | LIBS="${LIBS} -ldl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1114 | ac_have_lib="" |
| 1115 | test -n "$silent" || echo "checking for -ldl" |
| 1116 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1117 | #include "confdefs.h" |
| 1118 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1119 | int main() { return 0; } |
| 1120 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1121 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1122 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1123 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1124 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1125 | |
| 1126 | fi |
| 1127 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1128 | LIBS="${ac_save_LIBS}" |
| 1129 | if test -n "${ac_have_lib}"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1130 | |
| 1131 | { |
| 1132 | test -n "$verbose" && \ |
| 1133 | echo " defining HAVE_LIBDL" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1134 | echo "#define" HAVE_LIBDL "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1135 | DEFS="$DEFS -DHAVE_LIBDL=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1136 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDL\${ac_dB}HAVE_LIBDL\${ac_dC}1\${ac_dD} |
| 1137 | \${ac_uA}HAVE_LIBDL\${ac_uB}HAVE_LIBDL\${ac_uC}1\${ac_uD} |
| 1138 | \${ac_eA}HAVE_LIBDL\${ac_eB}HAVE_LIBDL\${ac_eC}1\${ac_eD} |
| 1139 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1140 | } |
| 1141 | |
| 1142 | LIBS="${LIBS} -ldl" |
| 1143 | fi |
| 1144 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1145 | |
| 1146 | test -n "$silent" || echo "checking for --with-svr4" |
| 1147 | # check whether --with-svr4 or --without-svr4 was given. |
| 1148 | withval="$with_svr4" |
| 1149 | if test -n "$withval"; then |
| 1150 | |
| 1151 | ac_save_LIBS="${LIBS}" |
| 1152 | LIBS="${LIBS} -lsocket" |
| 1153 | ac_have_lib="" |
| 1154 | test -n "$silent" || echo "checking for -lsocket" |
| 1155 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1156 | #include "confdefs.h" |
| 1157 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1158 | int main() { return 0; } |
| 1159 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1160 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1161 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1162 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1163 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1164 | |
| 1165 | fi |
| 1166 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1167 | LIBS="${ac_save_LIBS}" |
| 1168 | if test -n "${ac_have_lib}"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1169 | |
| 1170 | { |
| 1171 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1172 | echo " defining HAVE_LIBSOCKET" |
| 1173 | echo "#define" HAVE_LIBSOCKET "1" >> confdefs.h |
| 1174 | DEFS="$DEFS -DHAVE_LIBSOCKET=1" |
| 1175 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBSOCKET\${ac_dB}HAVE_LIBSOCKET\${ac_dC}1\${ac_dD} |
| 1176 | \${ac_uA}HAVE_LIBSOCKET\${ac_uB}HAVE_LIBSOCKET\${ac_uC}1\${ac_uD} |
| 1177 | \${ac_eA}HAVE_LIBSOCKET\${ac_eB}HAVE_LIBSOCKET\${ac_eC}1\${ac_eD} |
| 1178 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1179 | } |
| 1180 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1181 | LIBS="${LIBS} -lsocket" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1182 | fi |
| 1183 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1184 | ac_save_LIBS="${LIBS}" |
| 1185 | LIBS="${LIBS} -linet" |
| 1186 | ac_have_lib="" |
| 1187 | test -n "$silent" || echo "checking for -linet" |
| 1188 | cat > conftest.${ac_ext} <<EOF |
| 1189 | #include "confdefs.h" |
| 1190 | |
| 1191 | int main() { return 0; } |
| 1192 | int t() { main();; return 0; } |
| 1193 | EOF |
| 1194 | if eval $ac_compile; then |
| 1195 | rm -rf conftest* |
| 1196 | ac_have_lib="1" |
| 1197 | |
| 1198 | fi |
| 1199 | rm -f conftest* |
| 1200 | LIBS="${ac_save_LIBS}" |
| 1201 | if test -n "${ac_have_lib}"; then |
| 1202 | |
| 1203 | { |
| 1204 | test -n "$verbose" && \ |
| 1205 | echo " defining HAVE_LIBINET" |
| 1206 | echo "#define" HAVE_LIBINET "1" >> confdefs.h |
| 1207 | DEFS="$DEFS -DHAVE_LIBINET=1" |
| 1208 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBINET\${ac_dB}HAVE_LIBINET\${ac_dC}1\${ac_dD} |
| 1209 | \${ac_uA}HAVE_LIBINET\${ac_uB}HAVE_LIBINET\${ac_uC}1\${ac_uD} |
| 1210 | \${ac_eA}HAVE_LIBINET\${ac_eB}HAVE_LIBINET\${ac_eC}1\${ac_eD} |
| 1211 | " |
| 1212 | } |
| 1213 | |
| 1214 | LIBS="${LIBS} -linet" |
| 1215 | fi |
| 1216 | |
| 1217 | ac_save_LIBS="${LIBS}" |
| 1218 | LIBS="${LIBS} -lnsl" |
| 1219 | ac_have_lib="" |
| 1220 | test -n "$silent" || echo "checking for -lnsl" |
| 1221 | cat > conftest.${ac_ext} <<EOF |
| 1222 | #include "confdefs.h" |
| 1223 | |
| 1224 | int main() { return 0; } |
| 1225 | int t() { main();; return 0; } |
| 1226 | EOF |
| 1227 | if eval $ac_compile; then |
| 1228 | rm -rf conftest* |
| 1229 | ac_have_lib="1" |
| 1230 | |
| 1231 | fi |
| 1232 | rm -f conftest* |
| 1233 | LIBS="${ac_save_LIBS}" |
| 1234 | if test -n "${ac_have_lib}"; then |
| 1235 | |
| 1236 | { |
| 1237 | test -n "$verbose" && \ |
| 1238 | echo " defining HAVE_LIBNSL" |
| 1239 | echo "#define" HAVE_LIBNSL "1" >> confdefs.h |
| 1240 | DEFS="$DEFS -DHAVE_LIBNSL=1" |
| 1241 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBNSL\${ac_dB}HAVE_LIBNSL\${ac_dC}1\${ac_dD} |
| 1242 | \${ac_uA}HAVE_LIBNSL\${ac_uB}HAVE_LIBNSL\${ac_uC}1\${ac_uD} |
| 1243 | \${ac_eA}HAVE_LIBNSL\${ac_eB}HAVE_LIBNSL\${ac_eC}1\${ac_eD} |
| 1244 | " |
| 1245 | } |
| 1246 | |
| 1247 | LIBS="${LIBS} -lnsl" |
| 1248 | fi |
| 1249 | |
| 1250 | |
| 1251 | fi |
| 1252 | |
| 1253 | |
| 1254 | test -n "$silent" || echo "checking for --with-readline" |
| 1255 | # check whether --with-readline or --without-readline was given. |
| 1256 | withval="$with_readline" |
| 1257 | if test -n "$withval"; then |
| 1258 | |
| 1259 | { |
| 1260 | test -n "$verbose" && \ |
| 1261 | echo " defining WITH_READLINE" |
| 1262 | echo "#define" WITH_READLINE "1" >> confdefs.h |
| 1263 | DEFS="$DEFS -DWITH_READLINE=1" |
| 1264 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_READLINE\${ac_dB}WITH_READLINE\${ac_dC}1\${ac_dD} |
| 1265 | \${ac_uA}WITH_READLINE\${ac_uB}WITH_READLINE\${ac_uC}1\${ac_uD} |
| 1266 | \${ac_eA}WITH_READLINE\${ac_eB}WITH_READLINE\${ac_eC}1\${ac_eD} |
| 1267 | " |
| 1268 | } |
| 1269 | |
| 1270 | if test -d "$withval" |
| 1271 | then LIBS="$LIBS -L$withval" |
| 1272 | else echo "configure: proper usage is --with-readline=DIRECTORY" >&2; exit 1 |
| 1273 | fi |
| 1274 | termcap= |
| 1275 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1276 | LIBS="${LIBS} -ltermcap" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1277 | ac_have_lib="" |
| 1278 | test -n "$silent" || echo "checking for -ltermcap" |
| 1279 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1280 | #include "confdefs.h" |
| 1281 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1282 | int main() { return 0; } |
| 1283 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1284 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1285 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1286 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1287 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1288 | |
| 1289 | fi |
| 1290 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1291 | LIBS="${ac_save_LIBS}" |
| 1292 | if test -n "${ac_have_lib}"; then |
| 1293 | :; termcap=termcap |
| 1294 | else |
| 1295 | :; ac_save_LIBS="${LIBS}" |
| 1296 | LIBS="${LIBS} -ltermlib" |
| 1297 | ac_have_lib="" |
| 1298 | test -n "$silent" || echo "checking for -ltermlib" |
| 1299 | cat > conftest.${ac_ext} <<EOF |
| 1300 | #include "confdefs.h" |
| 1301 | |
| 1302 | int main() { return 0; } |
| 1303 | int t() { main();; return 0; } |
| 1304 | EOF |
| 1305 | if eval $ac_compile; then |
| 1306 | rm -rf conftest* |
| 1307 | ac_have_lib="1" |
| 1308 | |
| 1309 | fi |
| 1310 | rm -f conftest* |
| 1311 | LIBS="${ac_save_LIBS}" |
| 1312 | if test -n "${ac_have_lib}"; then |
| 1313 | :; termcap=termlib |
| 1314 | else |
| 1315 | :; |
| 1316 | fi |
| 1317 | |
| 1318 | fi |
| 1319 | |
| 1320 | if test ! -z "$termcap" |
| 1321 | then LIBS="$LIBS -lreadline" |
| 1322 | # Avoid possible conflict between shared libraries termcap and gl |
| 1323 | # on IRIX 5: both contain a routine called clear. |
| 1324 | if test -f /usr/lib/lib$termcap.a |
| 1325 | then LIBS="$LIBS /usr/lib/lib$termcap.a" |
| 1326 | else LIBS="$LIBS -l$termcap" |
| 1327 | fi |
| 1328 | else echo "configure: no working termcap/termlib" >&2; exit 1 |
| 1329 | fi |
| 1330 | fi |
| 1331 | |
| 1332 | |
| 1333 | test -n "$silent" || echo "checking for --with-thread" |
| 1334 | # check whether --with-thread or --without-thread was given. |
| 1335 | withval="$with_thread" |
| 1336 | if test -n "$withval"; then |
| 1337 | |
| 1338 | if test -d "$withval" |
| 1339 | then LIBS="$LIBS -L$withval" |
| 1340 | fi |
| 1341 | ac_save_LIBS="${LIBS}" |
| 1342 | LIBS="${LIBS} -lpthreads" |
| 1343 | ac_have_lib="" |
| 1344 | test -n "$silent" || echo "checking for -lpthreads" |
| 1345 | cat > conftest.${ac_ext} <<EOF |
| 1346 | #include "confdefs.h" |
| 1347 | |
| 1348 | int main() { return 0; } |
| 1349 | int t() { main();; return 0; } |
| 1350 | EOF |
| 1351 | if eval $ac_compile; then |
| 1352 | rm -rf conftest* |
| 1353 | ac_have_lib="1" |
| 1354 | |
| 1355 | fi |
| 1356 | rm -f conftest* |
| 1357 | LIBS="${ac_save_LIBS}" |
| 1358 | if test -n "${ac_have_lib}"; then |
| 1359 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1360 | { |
| 1361 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1362 | echo " defining WITH_THREAD" |
| 1363 | echo "#define" WITH_THREAD "1" >> confdefs.h |
| 1364 | DEFS="$DEFS -DWITH_THREAD=1" |
| 1365 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD} |
| 1366 | \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD} |
| 1367 | \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD} |
| 1368 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1369 | } |
| 1370 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1371 | |
| 1372 | { |
| 1373 | test -n "$verbose" && \ |
| 1374 | echo " defining _POSIX_THREADS" |
| 1375 | echo "#define" _POSIX_THREADS "1" >> confdefs.h |
| 1376 | DEFS="$DEFS -D_POSIX_THREADS=1" |
| 1377 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_THREADS\${ac_dB}_POSIX_THREADS\${ac_dC}1\${ac_dD} |
| 1378 | \${ac_uA}_POSIX_THREADS\${ac_uB}_POSIX_THREADS\${ac_uC}1\${ac_uD} |
| 1379 | \${ac_eA}_POSIX_THREADS\${ac_eB}_POSIX_THREADS\${ac_eC}1\${ac_eD} |
| 1380 | " |
| 1381 | } |
| 1382 | |
| 1383 | LIBS="$LIBS -lpthreads" |
| 1384 | LIBOBJS="$LIBOBJS thread.o" |
| 1385 | else |
| 1386 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1387 | fi |
| 1388 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1389 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1390 | LIBS="${LIBS} -lmpc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1391 | ac_have_lib="" |
| 1392 | test -n "$silent" || echo "checking for -lmpc" |
| 1393 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1394 | #include "confdefs.h" |
| 1395 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1396 | int main() { return 0; } |
| 1397 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1398 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1399 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1400 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1401 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1402 | |
| 1403 | fi |
| 1404 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1405 | LIBS="${ac_save_LIBS}" |
| 1406 | if test -n "${ac_have_lib}"; then |
| 1407 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1408 | { |
| 1409 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1410 | echo " defining WITH_THREAD" |
| 1411 | echo "#define" WITH_THREAD "1" >> confdefs.h |
| 1412 | DEFS="$DEFS -DWITH_THREAD=1" |
| 1413 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD} |
| 1414 | \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD} |
| 1415 | \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD} |
| 1416 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1417 | } |
| 1418 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1419 | LIBS="$LIBS -lmpc" |
| 1420 | LIBOBJS="$LIBOBJS thread.o" |
| 1421 | else |
| 1422 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1423 | fi |
| 1424 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1425 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1426 | LIBS="${LIBS} -lthread" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1427 | ac_have_lib="" |
| 1428 | test -n "$silent" || echo "checking for -lthread" |
| 1429 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1430 | #include "confdefs.h" |
| 1431 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1432 | int main() { return 0; } |
| 1433 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1434 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1435 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1436 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1437 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1438 | |
| 1439 | fi |
| 1440 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1441 | LIBS="${ac_save_LIBS}" |
| 1442 | if test -n "${ac_have_lib}"; then |
| 1443 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1444 | { |
| 1445 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1446 | echo " defining WITH_THREAD" |
| 1447 | echo "#define" WITH_THREAD "1" >> confdefs.h |
| 1448 | DEFS="$DEFS -DWITH_THREAD=1" |
| 1449 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD} |
| 1450 | \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD} |
| 1451 | \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD} |
| 1452 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1453 | } |
| 1454 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1455 | LIBS="$LIBS -lthread" |
| 1456 | LIBOBJS="$LIBOBJS thread.o" |
| 1457 | else |
| 1458 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1459 | fi |
| 1460 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1461 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1462 | fi |
| 1463 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1464 | |
| 1465 | # -I${DLINCLDIR} is added to the compile rule for import.o |
| 1466 | |
| 1467 | DLINCLDIR=/ |
| 1468 | |
| 1469 | test -n "$silent" || echo "checking for --with-sgi-dl" |
| 1470 | # check whether --with-sgi-dl or --without-sgi-dl was given. |
| 1471 | withval="$with_sgi_dl" |
| 1472 | if test -n "$withval"; then |
| 1473 | |
| 1474 | { |
| 1475 | test -n "$verbose" && \ |
| 1476 | echo " defining WITH_SGI_DL" |
| 1477 | echo "#define" WITH_SGI_DL "1" >> confdefs.h |
| 1478 | DEFS="$DEFS -DWITH_SGI_DL=1" |
| 1479 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_SGI_DL\${ac_dB}WITH_SGI_DL\${ac_dC}1\${ac_dD} |
| 1480 | \${ac_uA}WITH_SGI_DL\${ac_uB}WITH_SGI_DL\${ac_uC}1\${ac_uD} |
| 1481 | \${ac_eA}WITH_SGI_DL\${ac_eB}WITH_SGI_DL\${ac_eC}1\${ac_eD} |
| 1482 | " |
| 1483 | } |
| 1484 | |
| 1485 | dldir=$withval |
| 1486 | if test -d "$dldir" |
| 1487 | then LIBS="$LIBS -L$dldir" |
| 1488 | else echo "configure: proper usage is --with-sgi-dl=DIRECTORY" >&2; exit 1 |
| 1489 | fi |
| 1490 | DLINCLDIR=${dldir} |
| 1491 | LIBS="$LIBS -ldl -lmld" |
| 1492 | fi |
| 1493 | |
| 1494 | |
| 1495 | test -n "$silent" || echo "checking for --with-dl-dld" |
| 1496 | # check whether --with-dl-dld or --without-dl-dld was given. |
| 1497 | withval="$with_dl_dld" |
| 1498 | if test -n "$withval"; then |
| 1499 | |
| 1500 | { |
| 1501 | test -n "$verbose" && \ |
| 1502 | echo " defining WITH_DL_DLD" |
| 1503 | echo "#define" WITH_DL_DLD "1" >> confdefs.h |
| 1504 | DEFS="$DEFS -DWITH_DL_DLD=1" |
| 1505 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_DL_DLD\${ac_dB}WITH_DL_DLD\${ac_dC}1\${ac_dD} |
| 1506 | \${ac_uA}WITH_DL_DLD\${ac_uB}WITH_DL_DLD\${ac_uC}1\${ac_uD} |
| 1507 | \${ac_eA}WITH_DL_DLD\${ac_eB}WITH_DL_DLD\${ac_eC}1\${ac_eD} |
| 1508 | " |
| 1509 | } |
| 1510 | |
| 1511 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 1512 | dlddir=`echo "$withval" | sed 's/.*,//'` |
| 1513 | if test -d "$dldir" -a -d "$dlddir" |
| 1514 | then LIBS="$LIBS -L$dldir -L$dlddir" |
| 1515 | else echo "configure: proper usage is --with-dl-dld=DL_DIRECTORY" >&2; exit 1 |
| 1516 | fi |
| 1517 | DLINCLDIR=${dldir} |
| 1518 | LIBS="$LIBS -ldl -ldld" |
| 1519 | fi |
| 1520 | |
| 1521 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1522 | # checks for library functions |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1523 | for ac_func in chown clock dlopen ftime gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt symlink tcgetpgrp tcsetpgrp times uname waitpid |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1524 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1525 | ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` |
| 1526 | test -n "$silent" || echo "checking for ${ac_func}" |
| 1527 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1528 | #include "confdefs.h" |
| 1529 | #include <ctype.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1530 | int main() { return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1531 | int t() { |
| 1532 | /* The GNU C library defines this for functions which it implements |
| 1533 | to always fail with ENOSYS. Some functions are actually named |
| 1534 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1535 | #if defined (__stub_${ac_func}) || defined (__stub___${ac_func}) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1536 | choke me |
| 1537 | #else |
| 1538 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1539 | extern char ${ac_func}(); ${ac_func}(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1540 | #endif |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1541 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1542 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1543 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1544 | rm -rf conftest* |
| 1545 | { |
| 1546 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1547 | echo " defining ${ac_tr_func}" |
| 1548 | echo "#define" ${ac_tr_func} "1" >> confdefs.h |
| 1549 | DEFS="$DEFS -D${ac_tr_func}=1" |
| 1550 | ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD} |
| 1551 | \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD} |
| 1552 | \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD} |
| 1553 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1554 | } |
| 1555 | |
| 1556 | |
| 1557 | fi |
| 1558 | rm -f conftest* |
| 1559 | done |
| 1560 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1561 | for ac_func in dup2 getcwd strerror memmove |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1562 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1563 | test -n "$silent" || echo "checking for ${ac_func}" |
| 1564 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1565 | #include "confdefs.h" |
| 1566 | #include <ctype.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1567 | int main() { return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1568 | int t() { |
| 1569 | /* The GNU C library defines this for functions which it implements |
| 1570 | to always fail with ENOSYS. Some functions are actually named |
| 1571 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1572 | #if defined (__stub_${ac_func}) || defined (__stub___${ac_func}) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1573 | choke me |
| 1574 | #else |
| 1575 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1576 | extern char ${ac_func}(); ${ac_func}(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1577 | #endif |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1578 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1579 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1580 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1581 | : |
| 1582 | else |
| 1583 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1584 | LIBOBJS="$LIBOBJS ${ac_func}.o" |
| 1585 | test -n "$verbose" && echo " using ${ac_func}.o instead" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1586 | fi |
| 1587 | rm -f conftest* |
| 1588 | |
| 1589 | done |
| 1590 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1591 | test -n "$silent" || echo "checking for getpgrp" |
| 1592 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1593 | #include "confdefs.h" |
| 1594 | #include <ctype.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1595 | int main() { return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1596 | int t() { |
| 1597 | /* The GNU C library defines this for functions which it implements |
| 1598 | to always fail with ENOSYS. Some functions are actually named |
| 1599 | something starting with __ and the normal name is an alias. */ |
| 1600 | #if defined (__stub_getpgrp) || defined (__stub___getpgrp) |
| 1601 | choke me |
| 1602 | #else |
| 1603 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1604 | extern char getpgrp(); getpgrp(); |
| 1605 | #endif |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1606 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1607 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1608 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1609 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1610 | test -n "$silent" || echo "checking for argument to getpgrp" |
| 1611 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1612 | #include "confdefs.h" |
| 1613 | #include <unistd.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1614 | int main() { return 0; } |
| 1615 | int t() { getpgrp(0);; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1616 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1617 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1618 | rm -rf conftest* |
| 1619 | |
| 1620 | { |
| 1621 | test -n "$verbose" && \ |
| 1622 | echo " defining GETPGRP_HAVE_ARG" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1623 | echo "#define" GETPGRP_HAVE_ARG "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1624 | DEFS="$DEFS -DGETPGRP_HAVE_ARG=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1625 | ac_sed_defs="${ac_sed_defs}\${ac_dA}GETPGRP_HAVE_ARG\${ac_dB}GETPGRP_HAVE_ARG\${ac_dC}1\${ac_dD} |
| 1626 | \${ac_uA}GETPGRP_HAVE_ARG\${ac_uB}GETPGRP_HAVE_ARG\${ac_uC}1\${ac_uD} |
| 1627 | \${ac_eA}GETPGRP_HAVE_ARG\${ac_eB}GETPGRP_HAVE_ARG\${ac_eC}1\${ac_eD} |
| 1628 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1629 | } |
| 1630 | |
| 1631 | |
| 1632 | fi |
| 1633 | rm -f conftest* |
| 1634 | |
| 1635 | |
| 1636 | fi |
| 1637 | rm -f conftest* |
| 1638 | |
| 1639 | |
| 1640 | # checks for structures |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1641 | test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included" |
| 1642 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1643 | #include "confdefs.h" |
| 1644 | #include <sys/types.h> |
| 1645 | #include <sys/time.h> |
| 1646 | #include <time.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1647 | int main() { return 0; } |
| 1648 | int t() { struct tm *tp;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1649 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1650 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1651 | rm -rf conftest* |
| 1652 | |
| 1653 | { |
| 1654 | test -n "$verbose" && \ |
| 1655 | echo " defining TIME_WITH_SYS_TIME" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1656 | echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1657 | DEFS="$DEFS -DTIME_WITH_SYS_TIME=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1658 | ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD} |
| 1659 | \${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD} |
| 1660 | \${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD} |
| 1661 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1662 | } |
| 1663 | |
| 1664 | |
| 1665 | fi |
| 1666 | rm -f conftest* |
| 1667 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1668 | test -n "$silent" || echo "checking for struct tm in time.h" |
| 1669 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1670 | #include "confdefs.h" |
| 1671 | #include <sys/types.h> |
| 1672 | #include <time.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1673 | int main() { return 0; } |
| 1674 | int t() { struct tm *tp; tp->tm_sec;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1675 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1676 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1677 | : |
| 1678 | else |
| 1679 | rm -rf conftest* |
| 1680 | |
| 1681 | { |
| 1682 | test -n "$verbose" && \ |
| 1683 | echo " defining TM_IN_SYS_TIME" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1684 | echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1685 | DEFS="$DEFS -DTM_IN_SYS_TIME=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1686 | ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD} |
| 1687 | \${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD} |
| 1688 | \${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD} |
| 1689 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1690 | } |
| 1691 | |
| 1692 | fi |
| 1693 | rm -f conftest* |
| 1694 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1695 | ac_decl='#include <sys/types.h> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1696 | ' |
| 1697 | case "$DEFS" in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1698 | *TM_IN_SYS_TIME*) ac_decl="$ac_decl |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1699 | #include <sys/time.h> |
| 1700 | " ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1701 | *) ac_decl="$ac_decl |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1702 | #include <time.h> |
| 1703 | " ;; |
| 1704 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1705 | test -n "$silent" || echo "checking for tm_zone in struct tm" |
| 1706 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1707 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1708 | $ac_decl |
| 1709 | int main() { return 0; } |
| 1710 | int t() { struct tm tm; tm.tm_zone;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1711 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1712 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1713 | rm -rf conftest* |
| 1714 | |
| 1715 | { |
| 1716 | test -n "$verbose" && \ |
| 1717 | echo " defining HAVE_TM_ZONE" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1718 | echo "#define" HAVE_TM_ZONE "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1719 | DEFS="$DEFS -DHAVE_TM_ZONE=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1720 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD} |
| 1721 | \${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD} |
| 1722 | \${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD} |
| 1723 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1724 | } |
| 1725 | |
| 1726 | |
| 1727 | else |
| 1728 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1729 | ac_no_tm_zone=1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1730 | fi |
| 1731 | rm -f conftest* |
| 1732 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1733 | if test -n "$ac_no_tm_zone"; then |
| 1734 | test -n "$silent" || echo "checking for tzname" |
| 1735 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1736 | #include "confdefs.h" |
| 1737 | #include <time.h> |
| 1738 | #ifndef tzname /* For SGI. */ |
| 1739 | extern char *tzname[]; /* RS6000 and others want it this way. */ |
| 1740 | #endif |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1741 | int main() { return 0; } |
| 1742 | int t() { atoi(*tzname);; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1743 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1744 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1745 | rm -rf conftest* |
| 1746 | |
| 1747 | { |
| 1748 | test -n "$verbose" && \ |
| 1749 | echo " defining HAVE_TZNAME" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1750 | echo "#define" HAVE_TZNAME "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1751 | DEFS="$DEFS -DHAVE_TZNAME=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1752 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD} |
| 1753 | \${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD} |
| 1754 | \${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD} |
| 1755 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1756 | } |
| 1757 | |
| 1758 | |
| 1759 | fi |
| 1760 | rm -f conftest* |
| 1761 | |
| 1762 | fi |
| 1763 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1764 | test -n "$silent" || echo "checking for whether we have altzone" |
| 1765 | cat > conftest.${ac_ext} <<EOF |
| 1766 | #include "confdefs.h" |
| 1767 | #include <time.h> |
| 1768 | int main() { return 0; } |
| 1769 | int t() { return altzone;; return 0; } |
| 1770 | EOF |
| 1771 | if eval $ac_compile; then |
| 1772 | rm -rf conftest* |
| 1773 | |
| 1774 | { |
| 1775 | test -n "$verbose" && \ |
| 1776 | echo " defining HAVE_ALTZONE" |
| 1777 | echo "#define" HAVE_ALTZONE "1" >> confdefs.h |
| 1778 | DEFS="$DEFS -DHAVE_ALTZONE=1" |
| 1779 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALTZONE\${ac_dB}HAVE_ALTZONE\${ac_dC}1\${ac_dD} |
| 1780 | \${ac_uA}HAVE_ALTZONE\${ac_uB}HAVE_ALTZONE\${ac_uC}1\${ac_uD} |
| 1781 | \${ac_eA}HAVE_ALTZONE\${ac_eB}HAVE_ALTZONE\${ac_eC}1\${ac_eD} |
| 1782 | " |
| 1783 | } |
| 1784 | |
| 1785 | |
| 1786 | fi |
| 1787 | rm -f conftest* |
| 1788 | |
| 1789 | test -n "$silent" || echo "checking for whether sys/select.h and sys/time.h may both be included" |
| 1790 | cat > conftest.${ac_ext} <<EOF |
| 1791 | #include "confdefs.h" |
| 1792 | |
| 1793 | #include <sys/types.h> |
| 1794 | #include <sys/select.h> |
| 1795 | #include <sys/time.h> |
| 1796 | |
| 1797 | int main() { return 0; } |
| 1798 | int t() { ;; return 0; } |
| 1799 | EOF |
| 1800 | if eval $ac_compile; then |
| 1801 | rm -rf conftest* |
| 1802 | |
| 1803 | { |
| 1804 | test -n "$verbose" && \ |
| 1805 | echo " defining SYS_SELECT_WITH_SYS_TIME" |
| 1806 | echo "#define" SYS_SELECT_WITH_SYS_TIME "1" >> confdefs.h |
| 1807 | DEFS="$DEFS -DSYS_SELECT_WITH_SYS_TIME=1" |
| 1808 | ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_SELECT_WITH_SYS_TIME\${ac_dB}SYS_SELECT_WITH_SYS_TIME\${ac_dC}1\${ac_dD} |
| 1809 | \${ac_uA}SYS_SELECT_WITH_SYS_TIME\${ac_uB}SYS_SELECT_WITH_SYS_TIME\${ac_uC}1\${ac_uD} |
| 1810 | \${ac_eA}SYS_SELECT_WITH_SYS_TIME\${ac_eB}SYS_SELECT_WITH_SYS_TIME\${ac_eC}1\${ac_eD} |
| 1811 | " |
| 1812 | } |
| 1813 | |
| 1814 | |
| 1815 | fi |
| 1816 | rm -f conftest* |
| 1817 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1818 | |
| 1819 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1820 | |
| 1821 | test -n "$silent" || echo "checking for unsigned characters" |
| 1822 | cat > conftest.${ac_ext} <<EOF |
| 1823 | #include "confdefs.h" |
| 1824 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
| 1825 | #if !__STDC__ |
| 1826 | #define volatile |
| 1827 | #endif |
| 1828 | main() { |
| 1829 | #ifdef __CHAR_UNSIGNED__ |
| 1830 | exit(1); /* No need to redefine it. */ |
| 1831 | #else |
| 1832 | volatile char c = 255; exit(c < 0); |
| 1833 | #endif |
| 1834 | } |
| 1835 | EOF |
| 1836 | eval $ac_compile |
| 1837 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 1838 | |
| 1839 | { |
| 1840 | test -n "$verbose" && \ |
| 1841 | echo " defining __CHAR_UNSIGNED__" |
| 1842 | echo "#define" __CHAR_UNSIGNED__ "1" >> confdefs.h |
| 1843 | DEFS="$DEFS -D__CHAR_UNSIGNED__=1" |
| 1844 | ac_sed_defs="${ac_sed_defs}\${ac_dA}__CHAR_UNSIGNED__\${ac_dB}__CHAR_UNSIGNED__\${ac_dC}1\${ac_dD} |
| 1845 | \${ac_uA}__CHAR_UNSIGNED__\${ac_uB}__CHAR_UNSIGNED__\${ac_uC}1\${ac_uD} |
| 1846 | \${ac_eA}__CHAR_UNSIGNED__\${ac_eB}__CHAR_UNSIGNED__\${ac_eC}1\${ac_eD} |
| 1847 | " |
| 1848 | } |
| 1849 | |
| 1850 | |
| 1851 | fi |
| 1852 | rm -fr conftest* |
| 1853 | |
| 1854 | |
| 1855 | ac_prog='/* Ultrix mips cc rejects this. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1856 | typedef int charset[2]; const charset x; |
| 1857 | /* SunOS 4.1.1 cc rejects this. */ |
| 1858 | char const *const *ccp; |
| 1859 | char **p; |
| 1860 | /* AIX XL C 1.02.0.0 rejects this. |
| 1861 | It does not let you subtract one const X* pointer from another in an arm |
| 1862 | of an if-expression whose if-part is not a constant expression */ |
| 1863 | const char *g = "string"; |
| 1864 | ccp = &g + (g ? g-g : 0); |
| 1865 | /* HPUX 7.0 cc rejects these. */ |
| 1866 | ++ccp; |
| 1867 | p = (char**) ccp; |
| 1868 | ccp = (char const *const *) p; |
| 1869 | { /* SCO 3.2v4 cc rejects this. */ |
| 1870 | char *t; |
| 1871 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 1872 | |
| 1873 | *t++ = 0; |
| 1874 | } |
| 1875 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 1876 | int x[] = {25,17}; |
| 1877 | const int *foo = &x[0]; |
| 1878 | ++foo; |
| 1879 | } |
| 1880 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 1881 | typedef const int *iptr; |
| 1882 | iptr p = 0; |
| 1883 | ++p; |
| 1884 | } |
| 1885 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 1886 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 1887 | struct s { int j; const int *ap[3]; }; |
| 1888 | struct s *b; b->j = 5; |
| 1889 | } |
| 1890 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 1891 | const int foo = 10; |
| 1892 | }' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1893 | test -n "$silent" || echo "checking for lack of working const" |
| 1894 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1895 | #include "confdefs.h" |
| 1896 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1897 | int main() { return 0; } |
| 1898 | int t() { $ac_prog; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1899 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1900 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1901 | : |
| 1902 | else |
| 1903 | rm -rf conftest* |
| 1904 | |
| 1905 | { |
| 1906 | test -n "$verbose" && \ |
| 1907 | echo " defining" const to be empty |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1908 | echo "#define" const "" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1909 | DEFS="$DEFS -Dconst=" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1910 | ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD} |
| 1911 | \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD} |
| 1912 | \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD} |
| 1913 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1914 | } |
| 1915 | |
| 1916 | fi |
| 1917 | rm -f conftest* |
| 1918 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1919 | |
| 1920 | test -n "$silent" || echo "checking for wheter we have signed char" |
| 1921 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1922 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1923 | |
| 1924 | int main() { return 0; } |
| 1925 | int t() { signed char c;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1926 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1927 | if eval $ac_compile; then |
| 1928 | : |
| 1929 | else |
| 1930 | rm -rf conftest* |
| 1931 | |
| 1932 | { |
| 1933 | test -n "$verbose" && \ |
| 1934 | echo " defining" signed to be empty |
| 1935 | echo "#define" signed "" >> confdefs.h |
| 1936 | DEFS="$DEFS -Dsigned=" |
| 1937 | ac_sed_defs="${ac_sed_defs}\${ac_dA}signed\${ac_dB}signed\${ac_dC}\${ac_dD} |
| 1938 | \${ac_uA}signed\${ac_uB}signed\${ac_uC}\${ac_uD} |
| 1939 | \${ac_eA}signed\${ac_eB}signed\${ac_eC}\${ac_eD} |
| 1940 | " |
| 1941 | } |
| 1942 | |
| 1943 | fi |
| 1944 | rm -f conftest* |
| 1945 | |
| 1946 | |
| 1947 | test -n "$silent" || echo "checking for prototypes" |
| 1948 | cat > conftest.${ac_ext} <<EOF |
| 1949 | #include "confdefs.h" |
| 1950 | |
| 1951 | int foo(int x) { return 0; } |
| 1952 | int main() { return foo(10); } |
| 1953 | |
| 1954 | EOF |
| 1955 | eval $ac_compile |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1956 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 1957 | |
| 1958 | { |
| 1959 | test -n "$verbose" && \ |
| 1960 | echo " defining HAVE_PROTOTYPES" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1961 | echo "#define" HAVE_PROTOTYPES "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1962 | DEFS="$DEFS -DHAVE_PROTOTYPES=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 1963 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PROTOTYPES\${ac_dB}HAVE_PROTOTYPES\${ac_dC}1\${ac_dD} |
| 1964 | \${ac_uA}HAVE_PROTOTYPES\${ac_uB}HAVE_PROTOTYPES\${ac_uC}1\${ac_uD} |
| 1965 | \${ac_eA}HAVE_PROTOTYPES\${ac_eB}HAVE_PROTOTYPES\${ac_eC}1\${ac_eD} |
| 1966 | " |
| 1967 | } |
| 1968 | have_prototypes=1 |
| 1969 | |
| 1970 | fi |
| 1971 | rm -fr conftest* |
| 1972 | |
| 1973 | test -n "$silent" || echo "checking for variable length prototypes and stdarg.h" |
| 1974 | cat > conftest.${ac_ext} <<EOF |
| 1975 | #include "confdefs.h" |
| 1976 | |
| 1977 | #include <stdarg.h> |
| 1978 | int foo(int x, ...) { return 0; } |
| 1979 | int main() { return foo(10, 11, 12); } |
| 1980 | |
| 1981 | EOF |
| 1982 | eval $ac_compile |
| 1983 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 1984 | |
| 1985 | { |
| 1986 | test -n "$verbose" && \ |
| 1987 | echo " defining HAVE_STDARG_PROTOTYPES" |
| 1988 | echo "#define" HAVE_STDARG_PROTOTYPES "1" >> confdefs.h |
| 1989 | DEFS="$DEFS -DHAVE_STDARG_PROTOTYPES=1" |
| 1990 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STDARG_PROTOTYPES\${ac_dB}HAVE_STDARG_PROTOTYPES\${ac_dC}1\${ac_dD} |
| 1991 | \${ac_uA}HAVE_STDARG_PROTOTYPES\${ac_uB}HAVE_STDARG_PROTOTYPES\${ac_uC}1\${ac_uD} |
| 1992 | \${ac_eA}HAVE_STDARG_PROTOTYPES\${ac_eB}HAVE_STDARG_PROTOTYPES\${ac_eC}1\${ac_eD} |
| 1993 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1994 | } |
| 1995 | have_prototypes=1 |
| 1996 | |
| 1997 | fi |
| 1998 | rm -fr conftest* |
| 1999 | if test "$have_prototypes"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2000 | test -n "$silent" || echo "checking for "bad exec* prototypes"" |
| 2001 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2002 | #include "confdefs.h" |
| 2003 | #include <unistd.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2004 | int main() { return 0; } |
| 2005 | int t() { char **t;execve("@",t,t);; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2006 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2007 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2008 | : |
| 2009 | else |
| 2010 | rm -rf conftest* |
| 2011 | |
| 2012 | { |
| 2013 | test -n "$verbose" && \ |
| 2014 | echo " defining BAD_EXEC_PROTOTYPES" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2015 | echo "#define" BAD_EXEC_PROTOTYPES "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2016 | DEFS="$DEFS -DBAD_EXEC_PROTOTYPES=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2017 | ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_EXEC_PROTOTYPES\${ac_dB}BAD_EXEC_PROTOTYPES\${ac_dC}1\${ac_dD} |
| 2018 | \${ac_uA}BAD_EXEC_PROTOTYPES\${ac_uB}BAD_EXEC_PROTOTYPES\${ac_uC}1\${ac_uD} |
| 2019 | \${ac_eA}BAD_EXEC_PROTOTYPES\${ac_eB}BAD_EXEC_PROTOTYPES\${ac_eC}1\${ac_eD} |
| 2020 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2021 | } |
| 2022 | |
| 2023 | fi |
| 2024 | rm -f conftest* |
| 2025 | |
| 2026 | fi |
| 2027 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2028 | test -n "$silent" || echo "checking for bad static forward" |
| 2029 | cat > conftest.${ac_ext} <<EOF |
| 2030 | #include "confdefs.h" |
| 2031 | |
| 2032 | struct s { int a; int b; }; |
| 2033 | static struct s foo; |
| 2034 | int foobar() { return !foo.a; } |
| 2035 | static struct s foo = { 1, 2 }; |
| 2036 | main() { exit(foobar()); } |
| 2037 | |
| 2038 | EOF |
| 2039 | eval $ac_compile |
| 2040 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 2041 | : |
| 2042 | else |
| 2043 | |
| 2044 | { |
| 2045 | test -n "$verbose" && \ |
| 2046 | echo " defining BAD_STATIC_FORWARD" |
| 2047 | echo "#define" BAD_STATIC_FORWARD "1" >> confdefs.h |
| 2048 | DEFS="$DEFS -DBAD_STATIC_FORWARD=1" |
| 2049 | ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_STATIC_FORWARD\${ac_dB}BAD_STATIC_FORWARD\${ac_dC}1\${ac_dD} |
| 2050 | \${ac_uA}BAD_STATIC_FORWARD\${ac_uB}BAD_STATIC_FORWARD\${ac_uC}1\${ac_uD} |
| 2051 | \${ac_eA}BAD_STATIC_FORWARD\${ac_eB}BAD_STATIC_FORWARD\${ac_eC}1\${ac_eD} |
| 2052 | " |
| 2053 | } |
| 2054 | |
| 2055 | fi |
| 2056 | rm -fr conftest* |
| 2057 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2058 | # checks for system services |
| 2059 | # (none yet) |
| 2060 | |
| 2061 | # other checks for UNIX variants |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2062 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2063 | LIBS="${LIBS} -lsun" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2064 | ac_have_lib="" |
| 2065 | test -n "$silent" || echo "checking for -lsun" |
| 2066 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2067 | #include "confdefs.h" |
| 2068 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2069 | int main() { return 0; } |
| 2070 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2071 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2072 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2073 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2074 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2075 | |
| 2076 | fi |
| 2077 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2078 | LIBS="${ac_save_LIBS}" |
| 2079 | if test -n "${ac_have_lib}"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2080 | :; LIBS="$LIBS -lsun" |
| 2081 | else |
| 2082 | :; |
| 2083 | fi |
| 2084 | |
| 2085 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2086 | test -n "$silent" || echo "checking for Xenix" |
| 2087 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2088 | #include "confdefs.h" |
| 2089 | #if defined(M_XENIX) && !defined(M_UNIX) |
| 2090 | yes |
| 2091 | #endif |
| 2092 | |
| 2093 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2094 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2095 | if egrep "yes" conftest.out >/dev/null 2>&1; then |
| 2096 | rm -rf conftest* |
| 2097 | XENIX=1 |
| 2098 | |
| 2099 | fi |
| 2100 | rm -f conftest* |
| 2101 | |
| 2102 | if test -n "$XENIX"; then |
| 2103 | LIBS="$LIBS -lx" |
| 2104 | case "$DEFS" in |
| 2105 | *SYSNDIR*) ;; |
| 2106 | *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx. |
| 2107 | esac |
| 2108 | fi |
| 2109 | |
| 2110 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2111 | # check for --with-libm=... |
| 2112 | |
| 2113 | LIBM=-lm |
| 2114 | # check whether --with-libm or --without-libm was given. |
| 2115 | withval="$with_libm" |
| 2116 | if test -n "$withval"; then |
| 2117 | if test "$withval" != yes |
| 2118 | then LIBM=$withval |
| 2119 | else echo "configure: proper usage is --with-libm=STRING" >&2; exit 1 |
| 2120 | fi |
| 2121 | fi |
| 2122 | |
| 2123 | |
| 2124 | # check for --with-libc=... |
| 2125 | |
| 2126 | # check whether --with-libc or --without-libc was given. |
| 2127 | withval="$with_libc" |
| 2128 | if test -n "$withval"; then |
| 2129 | if test "$withval" != yes |
| 2130 | then LIBC=$withval |
| 2131 | else echo "configure: proper usage is --with-libc=STRING" >&2; exit 1 |
| 2132 | fi |
| 2133 | fi |
| 2134 | |
| 2135 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2136 | # generate output files |
| 2137 | # Set default prefixes. |
| 2138 | if test -n "$prefix"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2139 | test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it. |
| 2140 | ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2141 | fi |
| 2142 | if test -n "$exec_prefix"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2143 | ac_prsub="$ac_prsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2144 | s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%" |
| 2145 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2146 | # Any assignment to VPATH causes Sun make to only execute |
| 2147 | # the first set of double-colon rules, so remove it if not needed. |
| 2148 | # If there is a colon in the path, we need to keep it. |
| 2149 | if test "x$srcdir" = x.; then |
| 2150 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 2151 | fi |
| 2152 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2153 | # Quote sed substitution magic chars in DEFS. |
| 2154 | cat >conftest.def <<EOF |
| 2155 | $DEFS |
| 2156 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2157 | ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g' |
| 2158 | DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def` |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2159 | rm -f conftest.def |
| 2160 | # Substitute for predefined variables. |
| 2161 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2162 | trap 'rm -f config.status; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2163 | echo creating config.status |
| 2164 | rm -f config.status |
| 2165 | cat > config.status <<EOF |
| 2166 | #!/bin/sh |
| 2167 | # Generated automatically by configure. |
| 2168 | # Run this file to recreate the current configuration. |
| 2169 | # This directory was configured as follows, |
| 2170 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 2171 | # |
| 2172 | # $0 $configure_args |
| 2173 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2174 | ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]" |
| 2175 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2176 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2177 | case "\$ac_option" in |
| 2178 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
| 2179 | echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create |
| 2180 | exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;; |
| 2181 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
| 2182 | echo "config.status generated by autoconf version 1.8" |
| 2183 | exit 0 ;; |
| 2184 | -help | --help | --hel | --he | --h) |
| 2185 | echo "\$ac_cs_usage"; exit 0 ;; |
| 2186 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2187 | esac |
| 2188 | done |
| 2189 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2190 | trap 'rm -fr Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre config.h conftest*; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2191 | CC='$CC' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2192 | INSTALL='$INSTALL' |
| 2193 | INSTALL_PROGRAM='$INSTALL_PROGRAM' |
| 2194 | INSTALL_DATA='$INSTALL_DATA' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2195 | RANLIB='$RANLIB' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2196 | AR='$AR' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2197 | CPP='$CPP' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2198 | DLINCLDIR='$DLINCLDIR' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2199 | LIBOBJS='$LIBOBJS' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2200 | LIBM='$LIBM' |
| 2201 | LIBC='$LIBC' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2202 | LIBS='$LIBS' |
| 2203 | srcdir='$srcdir' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2204 | top_srcdir='$top_srcdir' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2205 | prefix='$prefix' |
| 2206 | exec_prefix='$exec_prefix' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2207 | ac_prsub='$ac_prsub' |
| 2208 | ac_vpsub='$ac_vpsub' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2209 | extrasub='$extrasub' |
| 2210 | EOF |
| 2211 | cat >> config.status <<\EOF |
| 2212 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2213 | ac_given_srcdir=$srcdir |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2214 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2215 | CONFIG_FILES=${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"} |
| 2216 | for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2217 | # Remove last slash and all that follows it. Not all systems have dirname. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2218 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 2219 | if test "$ac_dir" != "$ac_file"; then |
| 2220 | # The file is in a subdirectory. |
| 2221 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 2222 | ac_dir_suffix="/$ac_dir" |
| 2223 | else |
| 2224 | ac_dir_suffix= |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2225 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2226 | |
| 2227 | # A "../" for each directory in $ac_dir_suffix. |
| 2228 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 2229 | case "$ac_given_srcdir" in |
| 2230 | .) srcdir=.; top_srcdir="$ac_dots." ;; |
| 2231 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 2232 | *) # Relative path. |
| 2233 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 2234 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 2235 | esac |
| 2236 | |
| 2237 | echo creating "$ac_file" |
| 2238 | rm -f "$ac_file" |
| 2239 | comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure." |
| 2240 | case "$ac_file" in |
| 2241 | *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;; |
| 2242 | * ) echo "# $comment_str" > "$ac_file" ;; |
| 2243 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2244 | sed -e " |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2245 | $ac_prsub |
| 2246 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2247 | $extrasub |
| 2248 | s%@CC@%$CC%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2249 | s%@INSTALL@%$INSTALL%g |
| 2250 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g |
| 2251 | s%@INSTALL_DATA@%$INSTALL_DATA%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2252 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2253 | s%@AR@%$AR%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2254 | s%@CPP@%$CPP%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2255 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2256 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2257 | s%@LIBM@%$LIBM%g |
| 2258 | s%@LIBC@%$LIBC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2259 | s%@LIBS@%$LIBS%g |
| 2260 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2261 | s%@top_srcdir@%$top_srcdir%g |
| 2262 | s%@prefix@%$prefix%g |
| 2263 | s%@exec_prefix@%$exec_prefix%g |
| 2264 | s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2265 | fi; done |
| 2266 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2267 | # These sed commands are put into ac_sed_defs when defining a macro. |
| 2268 | # They are broken into pieces to make the sed script easier to manage. |
| 2269 | # They are passed to sed as "A NAME B NAME C VALUE D", where NAME |
| 2270 | # is the cpp macro being defined and VALUE is the value it is being given. |
| 2271 | # Each defining turns into a single global substitution command. |
| 2272 | # Hopefully no one uses "!" as a variable value. |
| 2273 | # Other candidates for the sed separators, like , and @, do get used. |
| 2274 | # |
| 2275 | # ac_d sets the value in "#define NAME VALUE" lines. |
| 2276 | ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 2277 | ac_dB='\([ ][ ]*\)[^ ]*!\1#\2' |
| 2278 | ac_dC='\3' |
| 2279 | ac_dD='!g' |
| 2280 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
| 2281 | ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 2282 | ac_uB='\([ ]\)!\1#\2define\3' |
| 2283 | ac_uC=' ' |
| 2284 | ac_uD='\4!g' |
| 2285 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
| 2286 | ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 2287 | ac_eB='$!\1#\2define\3' |
| 2288 | ac_eC=' ' |
| 2289 | ac_eD='!g' |
| 2290 | rm -f conftest.sed |
| 2291 | EOF |
| 2292 | # Turn off quoting long enough to insert the sed commands. |
| 2293 | rm -f conftest.sh |
| 2294 | cat > conftest.sh <<EOF |
| 2295 | $ac_sed_defs |
| 2296 | EOF |
| 2297 | |
| 2298 | # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit |
| 2299 | # on the size of here documents. |
| 2300 | |
| 2301 | # Maximum number of lines to put in a single here document. |
| 2302 | ac_max_sh_lines=9 |
| 2303 | |
| 2304 | while : |
| 2305 | do |
| 2306 | # wc gives bogus results for an empty file on some AIX systems. |
| 2307 | ac_lines=`grep -c . conftest.sh` |
| 2308 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 2309 | rm -f conftest.s1 conftest.s2 |
| 2310 | sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20. |
| 2311 | sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21. |
| 2312 | # Write a limited-size here document to append to conftest.sed. |
| 2313 | echo 'cat >> conftest.sed <<CONFEOF' >> config.status |
| 2314 | cat conftest.s1 >> config.status |
| 2315 | echo 'CONFEOF' >> config.status |
| 2316 | rm -f conftest.s1 conftest.sh |
| 2317 | mv conftest.s2 conftest.sh |
| 2318 | done |
| 2319 | rm -f conftest.sh |
| 2320 | |
| 2321 | # Now back to your regularly scheduled config.status. |
| 2322 | cat >> config.status <<\EOF |
| 2323 | # This sed command replaces #undef's with comments. This is necessary, for |
| 2324 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 2325 | # on some systems where configure will not decide to define it in |
| 2326 | # config.h. |
| 2327 | cat >> conftest.sed <<\CONFEOF |
| 2328 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
| 2329 | CONFEOF |
| 2330 | rm -f conftest.h |
| 2331 | # Break up the sed commands because old seds have small limits. |
| 2332 | ac_max_sed_lines=20 |
| 2333 | |
| 2334 | CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} |
| 2335 | for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then |
| 2336 | echo creating $ac_file |
| 2337 | |
| 2338 | cp $ac_given_srcdir/$ac_file.in conftest.h1 |
| 2339 | while : |
| 2340 | do |
| 2341 | ac_lines=`grep -c . conftest.sed` |
| 2342 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 2343 | rm -f conftest.s1 conftest.s2 conftest.h2 |
| 2344 | sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20. |
| 2345 | sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21. |
| 2346 | sed -f conftest.s1 < conftest.h1 > conftest.h2 |
| 2347 | rm -f conftest.s1 conftest.h1 conftest.sed |
| 2348 | mv conftest.h2 conftest.h1 |
| 2349 | mv conftest.s2 conftest.sed |
| 2350 | done |
| 2351 | rm -f conftest.sed conftest.h |
| 2352 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
| 2353 | cat conftest.h1 >> conftest.h |
| 2354 | rm -f conftest.h1 |
| 2355 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
| 2356 | # The file exists and we would not be changing it. |
| 2357 | echo "$ac_file is unchanged" |
| 2358 | rm -f conftest.h |
| 2359 | else |
| 2360 | rm -f $ac_file |
| 2361 | mv conftest.h $ac_file |
| 2362 | fi |
| 2363 | fi; done |
| 2364 | |
| 2365 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2366 | |
| 2367 | exit 0 |
| 2368 | EOF |
| 2369 | chmod +x config.status |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame^] | 2370 | test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2371 | |