Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1 | #!/bin/sh |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 2 | # From configure.in Revision: 1.5 |
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 | # Don't suppress compiler output when --verbose is specified |
| 320 | test -n "$verbose" && |
| 321 | ac_compile=`echo "$ac_compile" | sed "s|>/dev/null 2>&1||"` |
| 322 | test -n "$verbose" && echo " setting ac_compile to '$ac_compile'" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 323 | |
| 324 | # checks for alternative programs |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 325 | test -n "$silent" || echo "checking for --with(out)-gcc" |
| 326 | # check whether --with-gcc or --without-gcc was given. |
| 327 | withval="$with_gcc" |
| 328 | if test -n "$withval"; then |
| 329 | |
| 330 | case $withval in |
| 331 | no) withval=cc;; |
| 332 | yes) withval=gcc;; |
| 333 | esac |
| 334 | CC=$withval |
| 335 | fi |
| 336 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 337 | if test -z "$CC"; then |
| 338 | # 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] | 339 | set ac_dummy gcc; ac_word=$2 |
| 340 | test -n "$silent" || echo "checking for $ac_word" |
| 341 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 342 | for ac_dir in $PATH; do |
| 343 | test -z "$ac_dir" && ac_dir=. |
| 344 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 345 | CC="gcc" |
| 346 | break |
| 347 | fi |
| 348 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 349 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 350 | fi |
| 351 | test -z "$CC" && CC="cc" |
| 352 | test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC" |
| 353 | |
| 354 | # Find out if we are using GNU C, under whatever name. |
| 355 | cat > conftest.c <<EOF |
| 356 | #ifdef __GNUC__ |
| 357 | yes |
| 358 | #endif |
| 359 | EOF |
| 360 | ${CC-cc} -E conftest.c > conftest.out 2>&1 |
| 361 | if egrep yes conftest.out >/dev/null 2>&1; then |
| 362 | GCC=1 # For later tests. |
| 363 | fi |
| 364 | rm -f conftest* |
| 365 | |
| 366 | if test -z "$RANLIB"; then |
| 367 | # 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] | 368 | set ac_dummy ranlib; ac_word=$2 |
| 369 | test -n "$silent" || echo "checking for $ac_word" |
| 370 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 371 | for ac_dir in $PATH; do |
| 372 | test -z "$ac_dir" && ac_dir=. |
| 373 | if test -f $ac_dir/$ac_word; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 374 | RANLIB="ranlib" |
| 375 | break |
| 376 | fi |
| 377 | done |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 378 | IFS="$ac_save_ifs" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 379 | fi |
| 380 | test -z "$RANLIB" && RANLIB=":" |
| 381 | test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB" |
| 382 | |
| 383 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 384 | for ac_prog in ar aal |
| 385 | do |
| 386 | if test -z "$AR"; then |
| 387 | # Extract the first word of `$ac_prog', so it can be a program name with args. |
| 388 | set ac_dummy $ac_prog; ac_word=$2 |
| 389 | test -n "$silent" || echo "checking for $ac_word" |
| 390 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" |
| 391 | for ac_dir in $PATH; do |
| 392 | test -z "$ac_dir" && ac_dir=. |
| 393 | if test -f $ac_dir/$ac_word; then |
| 394 | AR="$ac_prog" |
| 395 | break |
| 396 | fi |
| 397 | done |
| 398 | IFS="$ac_save_ifs" |
| 399 | fi |
| 400 | |
| 401 | test -n "$AR" && test -n "$verbose" && echo " setting AR to $AR" |
| 402 | |
| 403 | test -n "$AR" && break |
| 404 | done |
| 405 | test -n "$AR" || AR="ar" |
| 406 | |
| 407 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 408 | # Install just never works :-( |
| 409 | if test -z "$INSTALL" |
| 410 | then INSTALL=cp |
| 411 | fi |
| 412 | |
| 413 | # Optimizer/debugger flags passed between Makefiles |
| 414 | if test -z "$OPT" |
| 415 | then OPT=-O |
| 416 | fi |
| 417 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 418 | # checks for UNIX variants that set C preprocessor variables |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 419 | test -n "$silent" || echo "checking for AIX" |
| 420 | test -n "$silent" || echo "checking how to run the C preprocessor" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 421 | if test -z "$CPP"; then |
| 422 | # This must be in double quotes, not single quotes, because CPP may get |
| 423 | # substituted into the Makefile and ``${CC-cc}'' will simply confuse |
| 424 | # make. It must be expanded now. |
| 425 | CPP="${CC-cc} -E" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 426 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 427 | #include "confdefs.h" |
| 428 | #include <stdio.h> |
| 429 | Syntax Error |
| 430 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 431 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 432 | # the parens. |
| 433 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 434 | if test -z "$ac_err"; then |
| 435 | : |
| 436 | else |
| 437 | rm -rf conftest* |
| 438 | CPP="${CC-cc} -E -traditional-cpp" |
| 439 | cat > conftest.${ac_ext} <<EOF |
| 440 | #include "confdefs.h" |
| 441 | #include <stdio.h> |
| 442 | Syntax Error |
| 443 | EOF |
| 444 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 445 | # the parens. |
| 446 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 447 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 448 | : |
| 449 | else |
| 450 | rm -rf conftest* |
| 451 | CPP=/lib/cpp |
| 452 | fi |
| 453 | rm -f conftest* |
| 454 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 455 | rm -f conftest* |
| 456 | fi |
| 457 | test -n "$verbose" && echo " setting CPP to $CPP" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 458 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 459 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 460 | #include "confdefs.h" |
| 461 | #ifdef _AIX |
| 462 | yes |
| 463 | #endif |
| 464 | |
| 465 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 466 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 467 | if egrep "yes" conftest.out >/dev/null 2>&1; then |
| 468 | rm -rf conftest* |
| 469 | |
| 470 | { |
| 471 | test -n "$verbose" && \ |
| 472 | echo " defining _ALL_SOURCE" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 473 | echo "#define" _ALL_SOURCE "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 474 | DEFS="$DEFS -D_ALL_SOURCE=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 475 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD} |
| 476 | \${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD} |
| 477 | \${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD} |
| 478 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 479 | } |
| 480 | |
| 481 | |
| 482 | fi |
| 483 | rm -f conftest* |
| 484 | |
| 485 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 486 | test -n "$silent" || echo "checking for POSIXized ISC" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 487 | if test -d /etc/conf/kconfig.d && |
| 488 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 |
| 489 | then |
| 490 | ISC=1 # If later tests want to check for ISC. |
| 491 | |
| 492 | { |
| 493 | test -n "$verbose" && \ |
| 494 | echo " defining _POSIX_SOURCE" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 495 | echo "#define" _POSIX_SOURCE "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 496 | DEFS="$DEFS -D_POSIX_SOURCE=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 497 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD} |
| 498 | \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD} |
| 499 | \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD} |
| 500 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 501 | } |
| 502 | |
| 503 | if test -n "$GCC"; then |
| 504 | CC="$CC -posix" |
| 505 | else |
| 506 | CC="$CC -Xp" |
| 507 | fi |
| 508 | fi |
| 509 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 510 | test -n "$silent" || echo "checking for minix/config.h" |
| 511 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 512 | #include "confdefs.h" |
| 513 | #include <minix/config.h> |
| 514 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 515 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 516 | # the parens. |
| 517 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 518 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 519 | rm -rf conftest* |
| 520 | MINIX=1 |
| 521 | |
| 522 | fi |
| 523 | rm -f conftest* |
| 524 | |
| 525 | # The Minix shell can't assign to the same variable on the same line! |
| 526 | if test -n "$MINIX"; then |
| 527 | |
| 528 | { |
| 529 | test -n "$verbose" && \ |
| 530 | echo " defining _POSIX_SOURCE" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 531 | echo "#define" _POSIX_SOURCE "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 532 | DEFS="$DEFS -D_POSIX_SOURCE=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 533 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD} |
| 534 | \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD} |
| 535 | \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD} |
| 536 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 537 | } |
| 538 | |
| 539 | |
| 540 | { |
| 541 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 542 | echo " defining" _POSIX_1_SOURCE to be "2" |
| 543 | echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 544 | DEFS="$DEFS -D_POSIX_1_SOURCE=2" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 545 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD} |
| 546 | \${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD} |
| 547 | \${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD} |
| 548 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 549 | } |
| 550 | |
| 551 | |
| 552 | { |
| 553 | test -n "$verbose" && \ |
| 554 | echo " defining _MINIX" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 555 | echo "#define" _MINIX "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 556 | DEFS="$DEFS -D_MINIX=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 557 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD} |
| 558 | \${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD} |
| 559 | \${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD} |
| 560 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 561 | } |
| 562 | |
| 563 | fi |
| 564 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 565 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 566 | LIBS="${LIBS} -lseq" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 567 | ac_have_lib="" |
| 568 | test -n "$silent" || echo "checking for -lseq" |
| 569 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 570 | #include "confdefs.h" |
| 571 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 572 | int main() { return 0; } |
| 573 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 574 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 575 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 576 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 577 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 578 | |
| 579 | fi |
| 580 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 581 | LIBS="${ac_save_LIBS}" |
| 582 | if test -n "${ac_have_lib}"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 583 | :; LIBS="$LIBS -lseq" |
| 584 | else |
| 585 | :; |
| 586 | fi |
| 587 | |
| 588 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 589 | test -n "$silent" || echo "checking for NeXT" |
| 590 | cat > conftest.${ac_ext} <<EOF |
| 591 | #include "confdefs.h" |
| 592 | |
| 593 | #ifdef _NEXT_SOURCE |
| 594 | main() { exit(0); } |
| 595 | #endif |
| 596 | |
| 597 | EOF |
| 598 | eval $ac_compile |
| 599 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 600 | |
| 601 | { |
| 602 | test -n "$verbose" && \ |
| 603 | echo " defining _POSIX_SOURCE" |
| 604 | echo "#define" _POSIX_SOURCE "1" >> confdefs.h |
| 605 | DEFS="$DEFS -D_POSIX_SOURCE=1" |
| 606 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD} |
| 607 | \${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD} |
| 608 | \${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD} |
| 609 | " |
| 610 | } |
| 611 | |
| 612 | |
| 613 | fi |
| 614 | rm -fr conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 615 | |
| 616 | # checks for header files |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 617 | test -n "$silent" || echo "checking for ANSI C header files" |
| 618 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 619 | #include "confdefs.h" |
| 620 | #include <stdlib.h> |
| 621 | #include <stdarg.h> |
| 622 | #include <string.h> |
| 623 | #include <float.h> |
| 624 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 625 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 626 | # the parens. |
| 627 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 628 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 629 | rm -rf conftest* |
| 630 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 631 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 632 | #include <string.h>' > conftest.${ac_ext} |
| 633 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 634 | if egrep "memchr" conftest.out >/dev/null 2>&1; then |
| 635 | rm -rf conftest* |
| 636 | # 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] | 637 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 638 | #include "confdefs.h" |
| 639 | #include <ctype.h> |
| 640 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 641 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 642 | #define XOR(e,f) (((e) && !(f)) || (!(e) && (f))) |
| 643 | int main () { int i; for (i = 0; i < 256; i++) |
| 644 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); |
| 645 | exit (0); } |
| 646 | |
| 647 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 648 | eval $ac_compile |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 649 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 650 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 651 | echo '#include "confdefs.h" |
| 652 | #include <stdlib.h>' > conftest.${ac_ext} |
| 653 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
| 654 | if egrep "free" conftest.out >/dev/null 2>&1; then |
| 655 | rm -rf conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 656 | |
| 657 | { |
| 658 | test -n "$verbose" && \ |
| 659 | echo " defining STDC_HEADERS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 660 | echo "#define" STDC_HEADERS "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 661 | DEFS="$DEFS -DSTDC_HEADERS=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 662 | ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD} |
| 663 | \${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD} |
| 664 | \${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD} |
| 665 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 666 | } |
| 667 | |
| 668 | |
| 669 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 670 | rm -f conftest* |
| 671 | |
| 672 | |
| 673 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 674 | rm -fr conftest* |
| 675 | |
| 676 | fi |
| 677 | rm -f conftest* |
| 678 | |
| 679 | |
| 680 | fi |
| 681 | rm -f conftest* |
| 682 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 683 | 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] | 684 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 685 | ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'` |
| 686 | test -n "$silent" || echo "checking for ${ac_hdr}" |
| 687 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 688 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 689 | #include <${ac_hdr}> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 690 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 691 | # Some shells (Coherent) do redirections in the wrong order, so need |
| 692 | # the parens. |
| 693 | ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` |
| 694 | if test -z "$ac_err"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 695 | rm -rf conftest* |
| 696 | |
| 697 | { |
| 698 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 699 | echo " defining ${ac_tr_hdr}" |
| 700 | echo "#define" ${ac_tr_hdr} "1" >> confdefs.h |
| 701 | DEFS="$DEFS -D${ac_tr_hdr}=1" |
| 702 | ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD} |
| 703 | \${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD} |
| 704 | \${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD} |
| 705 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 706 | } |
| 707 | |
| 708 | |
| 709 | fi |
| 710 | rm -f conftest* |
| 711 | done |
| 712 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 713 | test -n "$silent" || echo "checking for directory library header" |
| 714 | ac_dir_header= |
| 715 | if test -z "$ac_dir_header"; then |
| 716 | test -n "$silent" || echo "checking for dirent.h" |
| 717 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 718 | #include "confdefs.h" |
| 719 | #include <sys/types.h> |
| 720 | #include <dirent.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 721 | int main() { return 0; } |
| 722 | int t() { DIR *dirp = 0;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 723 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 724 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 725 | rm -rf conftest* |
| 726 | |
| 727 | { |
| 728 | test -n "$verbose" && \ |
| 729 | echo " defining DIRENT" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 730 | echo "#define" DIRENT "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 731 | DEFS="$DEFS -DDIRENT=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 732 | ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD} |
| 733 | \${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD} |
| 734 | \${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD} |
| 735 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 736 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 737 | ac_dir_header=dirent.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 738 | |
| 739 | fi |
| 740 | rm -f conftest* |
| 741 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 742 | if test -z "$ac_dir_header"; then |
| 743 | test -n "$silent" || echo "checking for sys/ndir.h" |
| 744 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 745 | #include "confdefs.h" |
| 746 | #include <sys/types.h> |
| 747 | #include <sys/ndir.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 748 | int main() { return 0; } |
| 749 | int t() { DIR *dirp = 0;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 750 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 751 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 752 | rm -rf conftest* |
| 753 | |
| 754 | { |
| 755 | test -n "$verbose" && \ |
| 756 | echo " defining SYSNDIR" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 757 | echo "#define" SYSNDIR "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 758 | DEFS="$DEFS -DSYSNDIR=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 759 | ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD} |
| 760 | \${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD} |
| 761 | \${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD} |
| 762 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 763 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 764 | ac_dir_header=sys/ndir.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 765 | |
| 766 | fi |
| 767 | rm -f conftest* |
| 768 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 769 | if test -z "$ac_dir_header"; then |
| 770 | test -n "$silent" || echo "checking for sys/dir.h" |
| 771 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 772 | #include "confdefs.h" |
| 773 | #include <sys/types.h> |
| 774 | #include <sys/dir.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 775 | int main() { return 0; } |
| 776 | int t() { DIR *dirp = 0;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 777 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 778 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 779 | rm -rf conftest* |
| 780 | |
| 781 | { |
| 782 | test -n "$verbose" && \ |
| 783 | echo " defining SYSDIR" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 784 | echo "#define" SYSDIR "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 785 | DEFS="$DEFS -DSYSDIR=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 786 | ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD} |
| 787 | \${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD} |
| 788 | \${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD} |
| 789 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 790 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 791 | ac_dir_header=sys/dir.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 792 | |
| 793 | fi |
| 794 | rm -f conftest* |
| 795 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 796 | if test -z "$ac_dir_header"; then |
| 797 | test -n "$silent" || echo "checking for ndir.h" |
| 798 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 799 | #include "confdefs.h" |
| 800 | #include <sys/types.h> |
| 801 | #include <ndir.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 802 | int main() { return 0; } |
| 803 | int t() { DIR *dirp = 0;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 804 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 805 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 806 | rm -rf conftest* |
| 807 | |
| 808 | { |
| 809 | test -n "$verbose" && \ |
| 810 | echo " defining NDIR" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 811 | echo "#define" NDIR "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 812 | DEFS="$DEFS -DNDIR=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 813 | ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD} |
| 814 | \${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD} |
| 815 | \${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD} |
| 816 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 817 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 818 | ac_dir_header=ndir.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 819 | |
| 820 | fi |
| 821 | rm -f conftest* |
| 822 | fi |
| 823 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 824 | test -n "$silent" || echo "checking for closedir return value" |
| 825 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 826 | #include "confdefs.h" |
| 827 | #include <sys/types.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 828 | #include <$ac_dir_header> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 829 | int closedir(); main() { exit(closedir(opendir(".")) != 0); } |
| 830 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 831 | eval $ac_compile |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 832 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 833 | : |
| 834 | else |
| 835 | |
| 836 | { |
| 837 | test -n "$verbose" && \ |
| 838 | echo " defining VOID_CLOSEDIR" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 839 | echo "#define" VOID_CLOSEDIR "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 840 | DEFS="$DEFS -DVOID_CLOSEDIR=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 841 | ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD} |
| 842 | \${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD} |
| 843 | \${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD} |
| 844 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 845 | } |
| 846 | |
| 847 | fi |
| 848 | rm -fr conftest* |
| 849 | |
| 850 | |
| 851 | # checks for typedefs |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 852 | test -n "$silent" || echo "checking for clock_t in time.h" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 853 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 854 | #include <time.h>' > conftest.${ac_ext} |
| 855 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
| 856 | if egrep "clock_t" conftest.out >/dev/null 2>&1; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 857 | : |
| 858 | else |
| 859 | rm -rf conftest* |
| 860 | |
| 861 | { |
| 862 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 863 | echo " defining" clock_t to be "long" |
| 864 | echo "#define" clock_t "long" >> confdefs.h |
| 865 | DEFS="$DEFS -Dclock_t=long" |
| 866 | ac_sed_defs="${ac_sed_defs}\${ac_dA}clock_t\${ac_dB}clock_t\${ac_dC}long\${ac_dD} |
| 867 | \${ac_uA}clock_t\${ac_uB}clock_t\${ac_uC}long\${ac_uD} |
| 868 | \${ac_eA}clock_t\${ac_eB}clock_t\${ac_eC}long\${ac_eD} |
| 869 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 870 | } |
| 871 | |
| 872 | fi |
| 873 | rm -f conftest* |
| 874 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 875 | 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] | 876 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 877 | #include <sys/types.h>' > conftest.${ac_ext} |
| 878 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 879 | if egrep "mode_t" conftest.out >/dev/null 2>&1; then |
| 880 | : |
| 881 | else |
| 882 | rm -rf conftest* |
| 883 | |
| 884 | { |
| 885 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 886 | echo " defining" mode_t to be "int" |
| 887 | echo "#define" mode_t "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 888 | DEFS="$DEFS -Dmode_t=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 889 | ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD} |
| 890 | \${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD} |
| 891 | \${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD} |
| 892 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 893 | } |
| 894 | |
| 895 | fi |
| 896 | rm -f conftest* |
| 897 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 898 | 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] | 899 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 900 | #include <sys/types.h>' > conftest.${ac_ext} |
| 901 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 902 | if egrep "off_t" conftest.out >/dev/null 2>&1; then |
| 903 | : |
| 904 | else |
| 905 | rm -rf conftest* |
| 906 | |
| 907 | { |
| 908 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 909 | echo " defining" off_t to be "long" |
| 910 | echo "#define" off_t "long" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 911 | DEFS="$DEFS -Doff_t=long" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 912 | ac_sed_defs="${ac_sed_defs}\${ac_dA}off_t\${ac_dB}off_t\${ac_dC}long\${ac_dD} |
| 913 | \${ac_uA}off_t\${ac_uB}off_t\${ac_uC}long\${ac_uD} |
| 914 | \${ac_eA}off_t\${ac_eB}off_t\${ac_eC}long\${ac_eD} |
| 915 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 916 | } |
| 917 | |
| 918 | fi |
| 919 | rm -f conftest* |
| 920 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 921 | 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] | 922 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 923 | #include <sys/types.h>' > conftest.${ac_ext} |
| 924 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 925 | if egrep "pid_t" conftest.out >/dev/null 2>&1; then |
| 926 | : |
| 927 | else |
| 928 | rm -rf conftest* |
| 929 | |
| 930 | { |
| 931 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 932 | echo " defining" pid_t to be "int" |
| 933 | echo "#define" pid_t "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 934 | DEFS="$DEFS -Dpid_t=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 935 | ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD} |
| 936 | \${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD} |
| 937 | \${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD} |
| 938 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 939 | } |
| 940 | |
| 941 | fi |
| 942 | rm -f conftest* |
| 943 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 944 | test -n "$silent" || echo "checking for return type of signal handlers" |
| 945 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 946 | #include "confdefs.h" |
| 947 | #include <sys/types.h> |
| 948 | #include <signal.h> |
| 949 | #ifdef signal |
| 950 | #undef signal |
| 951 | #endif |
| 952 | extern void (*signal ()) (); |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 953 | int main() { return 0; } |
| 954 | int t() { int i;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 955 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 956 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 957 | rm -rf conftest* |
| 958 | |
| 959 | { |
| 960 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 961 | echo " defining" RETSIGTYPE to be "void" |
| 962 | echo "#define" RETSIGTYPE "void" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 963 | DEFS="$DEFS -DRETSIGTYPE=void" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 964 | ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD} |
| 965 | \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD} |
| 966 | \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD} |
| 967 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 968 | } |
| 969 | |
| 970 | |
| 971 | else |
| 972 | rm -rf conftest* |
| 973 | |
| 974 | { |
| 975 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 976 | echo " defining" RETSIGTYPE to be "int" |
| 977 | echo "#define" RETSIGTYPE "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 978 | DEFS="$DEFS -DRETSIGTYPE=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 979 | ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD} |
| 980 | \${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD} |
| 981 | \${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD} |
| 982 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 983 | } |
| 984 | |
| 985 | fi |
| 986 | rm -f conftest* |
| 987 | |
| 988 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 989 | 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] | 990 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 991 | #include <sys/types.h>' > conftest.${ac_ext} |
| 992 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 993 | if egrep "size_t" conftest.out >/dev/null 2>&1; then |
| 994 | : |
| 995 | else |
| 996 | rm -rf conftest* |
| 997 | |
| 998 | { |
| 999 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1000 | echo " defining" size_t to be "unsigned" |
| 1001 | echo "#define" size_t "unsigned" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1002 | DEFS="$DEFS -Dsize_t=unsigned" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1003 | ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD} |
| 1004 | \${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD} |
| 1005 | \${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD} |
| 1006 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1007 | } |
| 1008 | |
| 1009 | fi |
| 1010 | rm -f conftest* |
| 1011 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1012 | 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] | 1013 | echo '#include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1014 | #include <sys/types.h>' > conftest.${ac_ext} |
| 1015 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1016 | if egrep "uid_t" conftest.out >/dev/null 2>&1; then |
| 1017 | : |
| 1018 | else |
| 1019 | rm -rf conftest* |
| 1020 | |
| 1021 | { |
| 1022 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1023 | echo " defining" uid_t to be "int" |
| 1024 | echo "#define" uid_t "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1025 | DEFS="$DEFS -Duid_t=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1026 | ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD} |
| 1027 | \${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD} |
| 1028 | \${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD} |
| 1029 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1030 | } |
| 1031 | |
| 1032 | { |
| 1033 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1034 | echo " defining" gid_t to be "int" |
| 1035 | echo "#define" gid_t "int" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1036 | DEFS="$DEFS -Dgid_t=int" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1037 | ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD} |
| 1038 | \${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD} |
| 1039 | \${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD} |
| 1040 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1041 | } |
| 1042 | |
| 1043 | fi |
| 1044 | rm -f conftest* |
| 1045 | |
| 1046 | |
| 1047 | # checks for libraries |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1048 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1049 | LIBS="${LIBS} -ldl" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1050 | ac_have_lib="" |
| 1051 | test -n "$silent" || echo "checking for -ldl" |
| 1052 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1053 | #include "confdefs.h" |
| 1054 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1055 | int main() { return 0; } |
| 1056 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1057 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1058 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1059 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1060 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1061 | |
| 1062 | fi |
| 1063 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1064 | LIBS="${ac_save_LIBS}" |
| 1065 | if test -n "${ac_have_lib}"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1066 | |
| 1067 | { |
| 1068 | test -n "$verbose" && \ |
| 1069 | echo " defining HAVE_LIBDL" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1070 | echo "#define" HAVE_LIBDL "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1071 | DEFS="$DEFS -DHAVE_LIBDL=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1072 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDL\${ac_dB}HAVE_LIBDL\${ac_dC}1\${ac_dD} |
| 1073 | \${ac_uA}HAVE_LIBDL\${ac_uB}HAVE_LIBDL\${ac_uC}1\${ac_uD} |
| 1074 | \${ac_eA}HAVE_LIBDL\${ac_eB}HAVE_LIBDL\${ac_eC}1\${ac_eD} |
| 1075 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1076 | } |
| 1077 | |
| 1078 | LIBS="${LIBS} -ldl" |
| 1079 | fi |
| 1080 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1081 | |
| 1082 | test -n "$silent" || echo "checking for --with-svr4" |
| 1083 | # check whether --with-svr4 or --without-svr4 was given. |
| 1084 | withval="$with_svr4" |
| 1085 | if test -n "$withval"; then |
| 1086 | |
| 1087 | ac_save_LIBS="${LIBS}" |
| 1088 | LIBS="${LIBS} -lsocket" |
| 1089 | ac_have_lib="" |
| 1090 | test -n "$silent" || echo "checking for -lsocket" |
| 1091 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1092 | #include "confdefs.h" |
| 1093 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1094 | int main() { return 0; } |
| 1095 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1096 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1097 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1098 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1099 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1100 | |
| 1101 | fi |
| 1102 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1103 | LIBS="${ac_save_LIBS}" |
| 1104 | if test -n "${ac_have_lib}"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1105 | |
| 1106 | { |
| 1107 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1108 | echo " defining HAVE_LIBSOCKET" |
| 1109 | echo "#define" HAVE_LIBSOCKET "1" >> confdefs.h |
| 1110 | DEFS="$DEFS -DHAVE_LIBSOCKET=1" |
| 1111 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBSOCKET\${ac_dB}HAVE_LIBSOCKET\${ac_dC}1\${ac_dD} |
| 1112 | \${ac_uA}HAVE_LIBSOCKET\${ac_uB}HAVE_LIBSOCKET\${ac_uC}1\${ac_uD} |
| 1113 | \${ac_eA}HAVE_LIBSOCKET\${ac_eB}HAVE_LIBSOCKET\${ac_eC}1\${ac_eD} |
| 1114 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1115 | } |
| 1116 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1117 | LIBS="${LIBS} -lsocket" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1118 | fi |
| 1119 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1120 | ac_save_LIBS="${LIBS}" |
| 1121 | LIBS="${LIBS} -linet" |
| 1122 | ac_have_lib="" |
| 1123 | test -n "$silent" || echo "checking for -linet" |
| 1124 | cat > conftest.${ac_ext} <<EOF |
| 1125 | #include "confdefs.h" |
| 1126 | |
| 1127 | int main() { return 0; } |
| 1128 | int t() { main();; return 0; } |
| 1129 | EOF |
| 1130 | if eval $ac_compile; then |
| 1131 | rm -rf conftest* |
| 1132 | ac_have_lib="1" |
| 1133 | |
| 1134 | fi |
| 1135 | rm -f conftest* |
| 1136 | LIBS="${ac_save_LIBS}" |
| 1137 | if test -n "${ac_have_lib}"; then |
| 1138 | |
| 1139 | { |
| 1140 | test -n "$verbose" && \ |
| 1141 | echo " defining HAVE_LIBINET" |
| 1142 | echo "#define" HAVE_LIBINET "1" >> confdefs.h |
| 1143 | DEFS="$DEFS -DHAVE_LIBINET=1" |
| 1144 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBINET\${ac_dB}HAVE_LIBINET\${ac_dC}1\${ac_dD} |
| 1145 | \${ac_uA}HAVE_LIBINET\${ac_uB}HAVE_LIBINET\${ac_uC}1\${ac_uD} |
| 1146 | \${ac_eA}HAVE_LIBINET\${ac_eB}HAVE_LIBINET\${ac_eC}1\${ac_eD} |
| 1147 | " |
| 1148 | } |
| 1149 | |
| 1150 | LIBS="${LIBS} -linet" |
| 1151 | fi |
| 1152 | |
| 1153 | ac_save_LIBS="${LIBS}" |
| 1154 | LIBS="${LIBS} -lnsl" |
| 1155 | ac_have_lib="" |
| 1156 | test -n "$silent" || echo "checking for -lnsl" |
| 1157 | cat > conftest.${ac_ext} <<EOF |
| 1158 | #include "confdefs.h" |
| 1159 | |
| 1160 | int main() { return 0; } |
| 1161 | int t() { main();; return 0; } |
| 1162 | EOF |
| 1163 | if eval $ac_compile; then |
| 1164 | rm -rf conftest* |
| 1165 | ac_have_lib="1" |
| 1166 | |
| 1167 | fi |
| 1168 | rm -f conftest* |
| 1169 | LIBS="${ac_save_LIBS}" |
| 1170 | if test -n "${ac_have_lib}"; then |
| 1171 | |
| 1172 | { |
| 1173 | test -n "$verbose" && \ |
| 1174 | echo " defining HAVE_LIBNSL" |
| 1175 | echo "#define" HAVE_LIBNSL "1" >> confdefs.h |
| 1176 | DEFS="$DEFS -DHAVE_LIBNSL=1" |
| 1177 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBNSL\${ac_dB}HAVE_LIBNSL\${ac_dC}1\${ac_dD} |
| 1178 | \${ac_uA}HAVE_LIBNSL\${ac_uB}HAVE_LIBNSL\${ac_uC}1\${ac_uD} |
| 1179 | \${ac_eA}HAVE_LIBNSL\${ac_eB}HAVE_LIBNSL\${ac_eC}1\${ac_eD} |
| 1180 | " |
| 1181 | } |
| 1182 | |
| 1183 | LIBS="${LIBS} -lnsl" |
| 1184 | fi |
| 1185 | |
| 1186 | |
| 1187 | fi |
| 1188 | |
| 1189 | |
| 1190 | test -n "$silent" || echo "checking for --with-readline" |
| 1191 | # check whether --with-readline or --without-readline was given. |
| 1192 | withval="$with_readline" |
| 1193 | if test -n "$withval"; then |
| 1194 | |
| 1195 | { |
| 1196 | test -n "$verbose" && \ |
| 1197 | echo " defining WITH_READLINE" |
| 1198 | echo "#define" WITH_READLINE "1" >> confdefs.h |
| 1199 | DEFS="$DEFS -DWITH_READLINE=1" |
| 1200 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_READLINE\${ac_dB}WITH_READLINE\${ac_dC}1\${ac_dD} |
| 1201 | \${ac_uA}WITH_READLINE\${ac_uB}WITH_READLINE\${ac_uC}1\${ac_uD} |
| 1202 | \${ac_eA}WITH_READLINE\${ac_eB}WITH_READLINE\${ac_eC}1\${ac_eD} |
| 1203 | " |
| 1204 | } |
| 1205 | |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1206 | if test ! -d "$withval" |
| 1207 | then echo "configure: proper usage is --with-readline=DIRECTORY" >&2; exit 1 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1208 | fi |
| 1209 | termcap= |
| 1210 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1211 | LIBS="${LIBS} -ltermcap" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1212 | ac_have_lib="" |
| 1213 | test -n "$silent" || echo "checking for -ltermcap" |
| 1214 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1215 | #include "confdefs.h" |
| 1216 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1217 | int main() { return 0; } |
| 1218 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1219 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1220 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1221 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1222 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1223 | |
| 1224 | fi |
| 1225 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1226 | LIBS="${ac_save_LIBS}" |
| 1227 | if test -n "${ac_have_lib}"; then |
| 1228 | :; termcap=termcap |
| 1229 | else |
| 1230 | :; ac_save_LIBS="${LIBS}" |
| 1231 | LIBS="${LIBS} -ltermlib" |
| 1232 | ac_have_lib="" |
| 1233 | test -n "$silent" || echo "checking for -ltermlib" |
| 1234 | cat > conftest.${ac_ext} <<EOF |
| 1235 | #include "confdefs.h" |
| 1236 | |
| 1237 | int main() { return 0; } |
| 1238 | int t() { main();; return 0; } |
| 1239 | EOF |
| 1240 | if eval $ac_compile; then |
| 1241 | rm -rf conftest* |
| 1242 | ac_have_lib="1" |
| 1243 | |
| 1244 | fi |
| 1245 | rm -f conftest* |
| 1246 | LIBS="${ac_save_LIBS}" |
| 1247 | if test -n "${ac_have_lib}"; then |
| 1248 | :; termcap=termlib |
| 1249 | else |
| 1250 | :; |
| 1251 | fi |
| 1252 | |
| 1253 | fi |
| 1254 | |
| 1255 | if test ! -z "$termcap" |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 1256 | then LIBS="$LIBS $withval/libreadline.a" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1257 | # Avoid possible conflict between shared libraries termcap and gl |
| 1258 | # on IRIX 5: both contain a routine called clear. |
| 1259 | if test -f /usr/lib/lib$termcap.a |
| 1260 | then LIBS="$LIBS /usr/lib/lib$termcap.a" |
| 1261 | else LIBS="$LIBS -l$termcap" |
| 1262 | fi |
| 1263 | else echo "configure: no working termcap/termlib" >&2; exit 1 |
| 1264 | fi |
| 1265 | fi |
| 1266 | |
| 1267 | |
| 1268 | test -n "$silent" || echo "checking for --with-thread" |
| 1269 | # check whether --with-thread or --without-thread was given. |
| 1270 | withval="$with_thread" |
| 1271 | if test -n "$withval"; then |
| 1272 | |
| 1273 | if test -d "$withval" |
| 1274 | then LIBS="$LIBS -L$withval" |
| 1275 | fi |
| 1276 | ac_save_LIBS="${LIBS}" |
| 1277 | LIBS="${LIBS} -lpthreads" |
| 1278 | ac_have_lib="" |
| 1279 | test -n "$silent" || echo "checking for -lpthreads" |
| 1280 | cat > conftest.${ac_ext} <<EOF |
| 1281 | #include "confdefs.h" |
| 1282 | |
| 1283 | int main() { return 0; } |
| 1284 | int t() { main();; return 0; } |
| 1285 | EOF |
| 1286 | if eval $ac_compile; then |
| 1287 | rm -rf conftest* |
| 1288 | ac_have_lib="1" |
| 1289 | |
| 1290 | fi |
| 1291 | rm -f conftest* |
| 1292 | LIBS="${ac_save_LIBS}" |
| 1293 | if test -n "${ac_have_lib}"; then |
| 1294 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1295 | { |
| 1296 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1297 | echo " defining WITH_THREAD" |
| 1298 | echo "#define" WITH_THREAD "1" >> confdefs.h |
| 1299 | DEFS="$DEFS -DWITH_THREAD=1" |
| 1300 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD} |
| 1301 | \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD} |
| 1302 | \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD} |
| 1303 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1304 | } |
| 1305 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1306 | |
| 1307 | { |
| 1308 | test -n "$verbose" && \ |
| 1309 | echo " defining _POSIX_THREADS" |
| 1310 | echo "#define" _POSIX_THREADS "1" >> confdefs.h |
| 1311 | DEFS="$DEFS -D_POSIX_THREADS=1" |
| 1312 | ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_THREADS\${ac_dB}_POSIX_THREADS\${ac_dC}1\${ac_dD} |
| 1313 | \${ac_uA}_POSIX_THREADS\${ac_uB}_POSIX_THREADS\${ac_uC}1\${ac_uD} |
| 1314 | \${ac_eA}_POSIX_THREADS\${ac_eB}_POSIX_THREADS\${ac_eC}1\${ac_eD} |
| 1315 | " |
| 1316 | } |
| 1317 | |
| 1318 | LIBS="$LIBS -lpthreads" |
| 1319 | LIBOBJS="$LIBOBJS thread.o" |
| 1320 | else |
| 1321 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1322 | fi |
| 1323 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1324 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1325 | LIBS="${LIBS} -lmpc" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1326 | ac_have_lib="" |
| 1327 | test -n "$silent" || echo "checking for -lmpc" |
| 1328 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1329 | #include "confdefs.h" |
| 1330 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1331 | int main() { return 0; } |
| 1332 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1333 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1334 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1335 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1336 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1337 | |
| 1338 | fi |
| 1339 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1340 | LIBS="${ac_save_LIBS}" |
| 1341 | if test -n "${ac_have_lib}"; then |
| 1342 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1343 | { |
| 1344 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1345 | echo " defining WITH_THREAD" |
| 1346 | echo "#define" WITH_THREAD "1" >> confdefs.h |
| 1347 | DEFS="$DEFS -DWITH_THREAD=1" |
| 1348 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD} |
| 1349 | \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD} |
| 1350 | \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD} |
| 1351 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1352 | } |
| 1353 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1354 | LIBS="$LIBS -lmpc" |
| 1355 | LIBOBJS="$LIBOBJS thread.o" |
| 1356 | else |
| 1357 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1358 | fi |
| 1359 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1360 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1361 | LIBS="${LIBS} -lthread" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1362 | ac_have_lib="" |
| 1363 | test -n "$silent" || echo "checking for -lthread" |
| 1364 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1365 | #include "confdefs.h" |
| 1366 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1367 | int main() { return 0; } |
| 1368 | int t() { main();; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1369 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1370 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1371 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1372 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1373 | |
| 1374 | fi |
| 1375 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1376 | LIBS="${ac_save_LIBS}" |
| 1377 | if test -n "${ac_have_lib}"; then |
| 1378 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1379 | { |
| 1380 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1381 | echo " defining WITH_THREAD" |
| 1382 | echo "#define" WITH_THREAD "1" >> confdefs.h |
| 1383 | DEFS="$DEFS -DWITH_THREAD=1" |
| 1384 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD} |
| 1385 | \${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD} |
| 1386 | \${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD} |
| 1387 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1388 | } |
| 1389 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1390 | LIBS="$LIBS -lthread" |
| 1391 | LIBOBJS="$LIBOBJS thread.o" |
| 1392 | else |
| 1393 | :; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1394 | fi |
| 1395 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1396 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1397 | fi |
| 1398 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1399 | |
| 1400 | # -I${DLINCLDIR} is added to the compile rule for import.o |
| 1401 | |
| 1402 | DLINCLDIR=/ |
| 1403 | |
| 1404 | test -n "$silent" || echo "checking for --with-sgi-dl" |
| 1405 | # check whether --with-sgi-dl or --without-sgi-dl was given. |
| 1406 | withval="$with_sgi_dl" |
| 1407 | if test -n "$withval"; then |
| 1408 | |
| 1409 | { |
| 1410 | test -n "$verbose" && \ |
| 1411 | echo " defining WITH_SGI_DL" |
| 1412 | echo "#define" WITH_SGI_DL "1" >> confdefs.h |
| 1413 | DEFS="$DEFS -DWITH_SGI_DL=1" |
| 1414 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_SGI_DL\${ac_dB}WITH_SGI_DL\${ac_dC}1\${ac_dD} |
| 1415 | \${ac_uA}WITH_SGI_DL\${ac_uB}WITH_SGI_DL\${ac_uC}1\${ac_uD} |
| 1416 | \${ac_eA}WITH_SGI_DL\${ac_eB}WITH_SGI_DL\${ac_eC}1\${ac_eD} |
| 1417 | " |
| 1418 | } |
| 1419 | |
| 1420 | dldir=$withval |
| 1421 | if test -d "$dldir" |
| 1422 | then LIBS="$LIBS -L$dldir" |
| 1423 | else echo "configure: proper usage is --with-sgi-dl=DIRECTORY" >&2; exit 1 |
| 1424 | fi |
| 1425 | DLINCLDIR=${dldir} |
| 1426 | LIBS="$LIBS -ldl -lmld" |
| 1427 | fi |
| 1428 | |
| 1429 | |
| 1430 | test -n "$silent" || echo "checking for --with-dl-dld" |
| 1431 | # check whether --with-dl-dld or --without-dl-dld was given. |
| 1432 | withval="$with_dl_dld" |
| 1433 | if test -n "$withval"; then |
| 1434 | |
| 1435 | { |
| 1436 | test -n "$verbose" && \ |
| 1437 | echo " defining WITH_DL_DLD" |
| 1438 | echo "#define" WITH_DL_DLD "1" >> confdefs.h |
| 1439 | DEFS="$DEFS -DWITH_DL_DLD=1" |
| 1440 | ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_DL_DLD\${ac_dB}WITH_DL_DLD\${ac_dC}1\${ac_dD} |
| 1441 | \${ac_uA}WITH_DL_DLD\${ac_uB}WITH_DL_DLD\${ac_uC}1\${ac_uD} |
| 1442 | \${ac_eA}WITH_DL_DLD\${ac_eB}WITH_DL_DLD\${ac_eC}1\${ac_eD} |
| 1443 | " |
| 1444 | } |
| 1445 | |
| 1446 | dldir=`echo "$withval" | sed 's/,.*//'` |
| 1447 | dlddir=`echo "$withval" | sed 's/.*,//'` |
| 1448 | if test -d "$dldir" -a -d "$dlddir" |
| 1449 | then LIBS="$LIBS -L$dldir -L$dlddir" |
| 1450 | else echo "configure: proper usage is --with-dl-dld=DL_DIRECTORY" >&2; exit 1 |
| 1451 | fi |
| 1452 | DLINCLDIR=${dldir} |
| 1453 | LIBS="$LIBS -ldl -ldld" |
| 1454 | fi |
| 1455 | |
| 1456 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1457 | # checks for library functions |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1458 | 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] | 1459 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1460 | ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` |
| 1461 | test -n "$silent" || echo "checking for ${ac_func}" |
| 1462 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1463 | #include "confdefs.h" |
| 1464 | #include <ctype.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1465 | int main() { return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1466 | int t() { |
| 1467 | /* The GNU C library defines this for functions which it implements |
| 1468 | to always fail with ENOSYS. Some functions are actually named |
| 1469 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1470 | #if defined (__stub_${ac_func}) || defined (__stub___${ac_func}) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1471 | choke me |
| 1472 | #else |
| 1473 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1474 | extern char ${ac_func}(); ${ac_func}(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1475 | #endif |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1476 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1477 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1478 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1479 | rm -rf conftest* |
| 1480 | { |
| 1481 | test -n "$verbose" && \ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1482 | echo " defining ${ac_tr_func}" |
| 1483 | echo "#define" ${ac_tr_func} "1" >> confdefs.h |
| 1484 | DEFS="$DEFS -D${ac_tr_func}=1" |
| 1485 | ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD} |
| 1486 | \${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD} |
| 1487 | \${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD} |
| 1488 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1489 | } |
| 1490 | |
| 1491 | |
| 1492 | fi |
| 1493 | rm -f conftest* |
| 1494 | done |
| 1495 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1496 | for ac_func in dup2 getcwd strerror memmove |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1497 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1498 | test -n "$silent" || echo "checking for ${ac_func}" |
| 1499 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1500 | #include "confdefs.h" |
| 1501 | #include <ctype.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1502 | int main() { return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1503 | int t() { |
| 1504 | /* The GNU C library defines this for functions which it implements |
| 1505 | to always fail with ENOSYS. Some functions are actually named |
| 1506 | something starting with __ and the normal name is an alias. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1507 | #if defined (__stub_${ac_func}) || defined (__stub___${ac_func}) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1508 | choke me |
| 1509 | #else |
| 1510 | /* Override any gcc2 internal prototype to avoid an error. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1511 | extern char ${ac_func}(); ${ac_func}(); |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1512 | #endif |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1513 | ; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1514 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1515 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1516 | : |
| 1517 | else |
| 1518 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1519 | LIBOBJS="$LIBOBJS ${ac_func}.o" |
| 1520 | test -n "$verbose" && echo " using ${ac_func}.o instead" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1521 | fi |
| 1522 | rm -f conftest* |
| 1523 | |
| 1524 | done |
| 1525 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1526 | test -n "$silent" || echo "checking for getpgrp" |
| 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. */ |
| 1535 | #if defined (__stub_getpgrp) || defined (__stub___getpgrp) |
| 1536 | choke me |
| 1537 | #else |
| 1538 | /* Override any gcc2 internal prototype to avoid an error. */ |
| 1539 | extern char getpgrp(); getpgrp(); |
| 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* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1545 | test -n "$silent" || echo "checking for argument to getpgrp" |
| 1546 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1547 | #include "confdefs.h" |
| 1548 | #include <unistd.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1549 | int main() { return 0; } |
| 1550 | int t() { getpgrp(0);; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1551 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1552 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1553 | rm -rf conftest* |
| 1554 | |
| 1555 | { |
| 1556 | test -n "$verbose" && \ |
| 1557 | echo " defining GETPGRP_HAVE_ARG" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1558 | echo "#define" GETPGRP_HAVE_ARG "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1559 | DEFS="$DEFS -DGETPGRP_HAVE_ARG=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1560 | ac_sed_defs="${ac_sed_defs}\${ac_dA}GETPGRP_HAVE_ARG\${ac_dB}GETPGRP_HAVE_ARG\${ac_dC}1\${ac_dD} |
| 1561 | \${ac_uA}GETPGRP_HAVE_ARG\${ac_uB}GETPGRP_HAVE_ARG\${ac_uC}1\${ac_uD} |
| 1562 | \${ac_eA}GETPGRP_HAVE_ARG\${ac_eB}GETPGRP_HAVE_ARG\${ac_eC}1\${ac_eD} |
| 1563 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1564 | } |
| 1565 | |
| 1566 | |
| 1567 | fi |
| 1568 | rm -f conftest* |
| 1569 | |
| 1570 | |
| 1571 | fi |
| 1572 | rm -f conftest* |
| 1573 | |
| 1574 | |
| 1575 | # checks for structures |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1576 | test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included" |
| 1577 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1578 | #include "confdefs.h" |
| 1579 | #include <sys/types.h> |
| 1580 | #include <sys/time.h> |
| 1581 | #include <time.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1582 | int main() { return 0; } |
| 1583 | int t() { struct tm *tp;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1584 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1585 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1586 | rm -rf conftest* |
| 1587 | |
| 1588 | { |
| 1589 | test -n "$verbose" && \ |
| 1590 | echo " defining TIME_WITH_SYS_TIME" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1591 | echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1592 | DEFS="$DEFS -DTIME_WITH_SYS_TIME=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1593 | ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD} |
| 1594 | \${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD} |
| 1595 | \${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD} |
| 1596 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1597 | } |
| 1598 | |
| 1599 | |
| 1600 | fi |
| 1601 | rm -f conftest* |
| 1602 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1603 | test -n "$silent" || echo "checking for struct tm in time.h" |
| 1604 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1605 | #include "confdefs.h" |
| 1606 | #include <sys/types.h> |
| 1607 | #include <time.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1608 | int main() { return 0; } |
| 1609 | int t() { struct tm *tp; tp->tm_sec;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1610 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1611 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1612 | : |
| 1613 | else |
| 1614 | rm -rf conftest* |
| 1615 | |
| 1616 | { |
| 1617 | test -n "$verbose" && \ |
| 1618 | echo " defining TM_IN_SYS_TIME" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1619 | echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1620 | DEFS="$DEFS -DTM_IN_SYS_TIME=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1621 | ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD} |
| 1622 | \${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD} |
| 1623 | \${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD} |
| 1624 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1625 | } |
| 1626 | |
| 1627 | fi |
| 1628 | rm -f conftest* |
| 1629 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1630 | ac_decl='#include <sys/types.h> |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1631 | ' |
| 1632 | case "$DEFS" in |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1633 | *TM_IN_SYS_TIME*) ac_decl="$ac_decl |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1634 | #include <sys/time.h> |
| 1635 | " ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1636 | *) ac_decl="$ac_decl |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1637 | #include <time.h> |
| 1638 | " ;; |
| 1639 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1640 | test -n "$silent" || echo "checking for tm_zone in struct tm" |
| 1641 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1642 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1643 | $ac_decl |
| 1644 | int main() { return 0; } |
| 1645 | int t() { struct tm tm; tm.tm_zone;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1646 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1647 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1648 | rm -rf conftest* |
| 1649 | |
| 1650 | { |
| 1651 | test -n "$verbose" && \ |
| 1652 | echo " defining HAVE_TM_ZONE" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1653 | echo "#define" HAVE_TM_ZONE "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1654 | DEFS="$DEFS -DHAVE_TM_ZONE=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1655 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD} |
| 1656 | \${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD} |
| 1657 | \${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD} |
| 1658 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1659 | } |
| 1660 | |
| 1661 | |
| 1662 | else |
| 1663 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1664 | ac_no_tm_zone=1 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1665 | fi |
| 1666 | rm -f conftest* |
| 1667 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1668 | if test -n "$ac_no_tm_zone"; then |
| 1669 | test -n "$silent" || echo "checking for tzname" |
| 1670 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1671 | #include "confdefs.h" |
| 1672 | #include <time.h> |
| 1673 | #ifndef tzname /* For SGI. */ |
| 1674 | extern char *tzname[]; /* RS6000 and others want it this way. */ |
| 1675 | #endif |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1676 | int main() { return 0; } |
| 1677 | int t() { atoi(*tzname);; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1678 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1679 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1680 | rm -rf conftest* |
| 1681 | |
| 1682 | { |
| 1683 | test -n "$verbose" && \ |
| 1684 | echo " defining HAVE_TZNAME" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1685 | echo "#define" HAVE_TZNAME "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1686 | DEFS="$DEFS -DHAVE_TZNAME=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1687 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD} |
| 1688 | \${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD} |
| 1689 | \${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD} |
| 1690 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1691 | } |
| 1692 | |
| 1693 | |
| 1694 | fi |
| 1695 | rm -f conftest* |
| 1696 | |
| 1697 | fi |
| 1698 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1699 | test -n "$silent" || echo "checking for whether we have altzone" |
| 1700 | cat > conftest.${ac_ext} <<EOF |
| 1701 | #include "confdefs.h" |
| 1702 | #include <time.h> |
| 1703 | int main() { return 0; } |
| 1704 | int t() { return altzone;; return 0; } |
| 1705 | EOF |
| 1706 | if eval $ac_compile; then |
| 1707 | rm -rf conftest* |
| 1708 | |
| 1709 | { |
| 1710 | test -n "$verbose" && \ |
| 1711 | echo " defining HAVE_ALTZONE" |
| 1712 | echo "#define" HAVE_ALTZONE "1" >> confdefs.h |
| 1713 | DEFS="$DEFS -DHAVE_ALTZONE=1" |
| 1714 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALTZONE\${ac_dB}HAVE_ALTZONE\${ac_dC}1\${ac_dD} |
| 1715 | \${ac_uA}HAVE_ALTZONE\${ac_uB}HAVE_ALTZONE\${ac_uC}1\${ac_uD} |
| 1716 | \${ac_eA}HAVE_ALTZONE\${ac_eB}HAVE_ALTZONE\${ac_eC}1\${ac_eD} |
| 1717 | " |
| 1718 | } |
| 1719 | |
| 1720 | |
| 1721 | fi |
| 1722 | rm -f conftest* |
| 1723 | |
| 1724 | test -n "$silent" || echo "checking for whether sys/select.h and sys/time.h may both be included" |
| 1725 | cat > conftest.${ac_ext} <<EOF |
| 1726 | #include "confdefs.h" |
| 1727 | |
| 1728 | #include <sys/types.h> |
| 1729 | #include <sys/select.h> |
| 1730 | #include <sys/time.h> |
| 1731 | |
| 1732 | int main() { return 0; } |
| 1733 | int t() { ;; return 0; } |
| 1734 | EOF |
| 1735 | if eval $ac_compile; then |
| 1736 | rm -rf conftest* |
| 1737 | |
| 1738 | { |
| 1739 | test -n "$verbose" && \ |
| 1740 | echo " defining SYS_SELECT_WITH_SYS_TIME" |
| 1741 | echo "#define" SYS_SELECT_WITH_SYS_TIME "1" >> confdefs.h |
| 1742 | DEFS="$DEFS -DSYS_SELECT_WITH_SYS_TIME=1" |
| 1743 | 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} |
| 1744 | \${ac_uA}SYS_SELECT_WITH_SYS_TIME\${ac_uB}SYS_SELECT_WITH_SYS_TIME\${ac_uC}1\${ac_uD} |
| 1745 | \${ac_eA}SYS_SELECT_WITH_SYS_TIME\${ac_eB}SYS_SELECT_WITH_SYS_TIME\${ac_eC}1\${ac_eD} |
| 1746 | " |
| 1747 | } |
| 1748 | |
| 1749 | |
| 1750 | fi |
| 1751 | rm -f conftest* |
| 1752 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1753 | |
| 1754 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1755 | |
| 1756 | test -n "$silent" || echo "checking for unsigned characters" |
| 1757 | cat > conftest.${ac_ext} <<EOF |
| 1758 | #include "confdefs.h" |
| 1759 | /* volatile prevents gcc2 from optimizing the test away on sparcs. */ |
| 1760 | #if !__STDC__ |
| 1761 | #define volatile |
| 1762 | #endif |
| 1763 | main() { |
| 1764 | #ifdef __CHAR_UNSIGNED__ |
| 1765 | exit(1); /* No need to redefine it. */ |
| 1766 | #else |
| 1767 | volatile char c = 255; exit(c < 0); |
| 1768 | #endif |
| 1769 | } |
| 1770 | EOF |
| 1771 | eval $ac_compile |
| 1772 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 1773 | |
| 1774 | { |
| 1775 | test -n "$verbose" && \ |
| 1776 | echo " defining __CHAR_UNSIGNED__" |
| 1777 | echo "#define" __CHAR_UNSIGNED__ "1" >> confdefs.h |
| 1778 | DEFS="$DEFS -D__CHAR_UNSIGNED__=1" |
| 1779 | ac_sed_defs="${ac_sed_defs}\${ac_dA}__CHAR_UNSIGNED__\${ac_dB}__CHAR_UNSIGNED__\${ac_dC}1\${ac_dD} |
| 1780 | \${ac_uA}__CHAR_UNSIGNED__\${ac_uB}__CHAR_UNSIGNED__\${ac_uC}1\${ac_uD} |
| 1781 | \${ac_eA}__CHAR_UNSIGNED__\${ac_eB}__CHAR_UNSIGNED__\${ac_eC}1\${ac_eD} |
| 1782 | " |
| 1783 | } |
| 1784 | |
| 1785 | |
| 1786 | fi |
| 1787 | rm -fr conftest* |
| 1788 | |
| 1789 | |
| 1790 | ac_prog='/* Ultrix mips cc rejects this. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1791 | typedef int charset[2]; const charset x; |
| 1792 | /* SunOS 4.1.1 cc rejects this. */ |
| 1793 | char const *const *ccp; |
| 1794 | char **p; |
| 1795 | /* AIX XL C 1.02.0.0 rejects this. |
| 1796 | It does not let you subtract one const X* pointer from another in an arm |
| 1797 | of an if-expression whose if-part is not a constant expression */ |
| 1798 | const char *g = "string"; |
| 1799 | ccp = &g + (g ? g-g : 0); |
| 1800 | /* HPUX 7.0 cc rejects these. */ |
| 1801 | ++ccp; |
| 1802 | p = (char**) ccp; |
| 1803 | ccp = (char const *const *) p; |
| 1804 | { /* SCO 3.2v4 cc rejects this. */ |
| 1805 | char *t; |
| 1806 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 1807 | |
| 1808 | *t++ = 0; |
| 1809 | } |
| 1810 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 1811 | int x[] = {25,17}; |
| 1812 | const int *foo = &x[0]; |
| 1813 | ++foo; |
| 1814 | } |
| 1815 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 1816 | typedef const int *iptr; |
| 1817 | iptr p = 0; |
| 1818 | ++p; |
| 1819 | } |
| 1820 | { /* AIX XL C 1.02.0.0 rejects this saying |
| 1821 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 1822 | struct s { int j; const int *ap[3]; }; |
| 1823 | struct s *b; b->j = 5; |
| 1824 | } |
| 1825 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 1826 | const int foo = 10; |
| 1827 | }' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1828 | test -n "$silent" || echo "checking for lack of working const" |
| 1829 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1830 | #include "confdefs.h" |
| 1831 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1832 | int main() { return 0; } |
| 1833 | int t() { $ac_prog; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1834 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1835 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1836 | : |
| 1837 | else |
| 1838 | rm -rf conftest* |
| 1839 | |
| 1840 | { |
| 1841 | test -n "$verbose" && \ |
| 1842 | echo " defining" const to be empty |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1843 | echo "#define" const "" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1844 | DEFS="$DEFS -Dconst=" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1845 | ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD} |
| 1846 | \${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD} |
| 1847 | \${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD} |
| 1848 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1849 | } |
| 1850 | |
| 1851 | fi |
| 1852 | rm -f conftest* |
| 1853 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1854 | |
| 1855 | test -n "$silent" || echo "checking for wheter we have signed char" |
| 1856 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1857 | #include "confdefs.h" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1858 | |
| 1859 | int main() { return 0; } |
| 1860 | int t() { signed char c;; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1861 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1862 | if eval $ac_compile; then |
| 1863 | : |
| 1864 | else |
| 1865 | rm -rf conftest* |
| 1866 | |
| 1867 | { |
| 1868 | test -n "$verbose" && \ |
| 1869 | echo " defining" signed to be empty |
| 1870 | echo "#define" signed "" >> confdefs.h |
| 1871 | DEFS="$DEFS -Dsigned=" |
| 1872 | ac_sed_defs="${ac_sed_defs}\${ac_dA}signed\${ac_dB}signed\${ac_dC}\${ac_dD} |
| 1873 | \${ac_uA}signed\${ac_uB}signed\${ac_uC}\${ac_uD} |
| 1874 | \${ac_eA}signed\${ac_eB}signed\${ac_eC}\${ac_eD} |
| 1875 | " |
| 1876 | } |
| 1877 | |
| 1878 | fi |
| 1879 | rm -f conftest* |
| 1880 | |
| 1881 | |
| 1882 | test -n "$silent" || echo "checking for prototypes" |
| 1883 | cat > conftest.${ac_ext} <<EOF |
| 1884 | #include "confdefs.h" |
| 1885 | |
| 1886 | int foo(int x) { return 0; } |
| 1887 | int main() { return foo(10); } |
| 1888 | |
| 1889 | EOF |
| 1890 | eval $ac_compile |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1891 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 1892 | |
| 1893 | { |
| 1894 | test -n "$verbose" && \ |
| 1895 | echo " defining HAVE_PROTOTYPES" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1896 | echo "#define" HAVE_PROTOTYPES "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1897 | DEFS="$DEFS -DHAVE_PROTOTYPES=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1898 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PROTOTYPES\${ac_dB}HAVE_PROTOTYPES\${ac_dC}1\${ac_dD} |
| 1899 | \${ac_uA}HAVE_PROTOTYPES\${ac_uB}HAVE_PROTOTYPES\${ac_uC}1\${ac_uD} |
| 1900 | \${ac_eA}HAVE_PROTOTYPES\${ac_eB}HAVE_PROTOTYPES\${ac_eC}1\${ac_eD} |
| 1901 | " |
| 1902 | } |
| 1903 | have_prototypes=1 |
| 1904 | |
| 1905 | fi |
| 1906 | rm -fr conftest* |
| 1907 | |
| 1908 | test -n "$silent" || echo "checking for variable length prototypes and stdarg.h" |
| 1909 | cat > conftest.${ac_ext} <<EOF |
| 1910 | #include "confdefs.h" |
| 1911 | |
| 1912 | #include <stdarg.h> |
| 1913 | int foo(int x, ...) { return 0; } |
| 1914 | int main() { return foo(10, 11, 12); } |
| 1915 | |
| 1916 | EOF |
| 1917 | eval $ac_compile |
| 1918 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 1919 | |
| 1920 | { |
| 1921 | test -n "$verbose" && \ |
| 1922 | echo " defining HAVE_STDARG_PROTOTYPES" |
| 1923 | echo "#define" HAVE_STDARG_PROTOTYPES "1" >> confdefs.h |
| 1924 | DEFS="$DEFS -DHAVE_STDARG_PROTOTYPES=1" |
| 1925 | ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STDARG_PROTOTYPES\${ac_dB}HAVE_STDARG_PROTOTYPES\${ac_dC}1\${ac_dD} |
| 1926 | \${ac_uA}HAVE_STDARG_PROTOTYPES\${ac_uB}HAVE_STDARG_PROTOTYPES\${ac_uC}1\${ac_uD} |
| 1927 | \${ac_eA}HAVE_STDARG_PROTOTYPES\${ac_eB}HAVE_STDARG_PROTOTYPES\${ac_eC}1\${ac_eD} |
| 1928 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1929 | } |
| 1930 | have_prototypes=1 |
| 1931 | |
| 1932 | fi |
| 1933 | rm -fr conftest* |
| 1934 | if test "$have_prototypes"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1935 | test -n "$silent" || echo "checking for "bad exec* prototypes"" |
| 1936 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1937 | #include "confdefs.h" |
| 1938 | #include <unistd.h> |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1939 | int main() { return 0; } |
| 1940 | int t() { char **t;execve("@",t,t);; return 0; } |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1941 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1942 | if eval $ac_compile; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1943 | : |
| 1944 | else |
| 1945 | rm -rf conftest* |
| 1946 | |
| 1947 | { |
| 1948 | test -n "$verbose" && \ |
| 1949 | echo " defining BAD_EXEC_PROTOTYPES" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1950 | echo "#define" BAD_EXEC_PROTOTYPES "1" >> confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1951 | DEFS="$DEFS -DBAD_EXEC_PROTOTYPES=1" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1952 | ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_EXEC_PROTOTYPES\${ac_dB}BAD_EXEC_PROTOTYPES\${ac_dC}1\${ac_dD} |
| 1953 | \${ac_uA}BAD_EXEC_PROTOTYPES\${ac_uB}BAD_EXEC_PROTOTYPES\${ac_uC}1\${ac_uD} |
| 1954 | \${ac_eA}BAD_EXEC_PROTOTYPES\${ac_eB}BAD_EXEC_PROTOTYPES\${ac_eC}1\${ac_eD} |
| 1955 | " |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1956 | } |
| 1957 | |
| 1958 | fi |
| 1959 | rm -f conftest* |
| 1960 | |
| 1961 | fi |
| 1962 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1963 | test -n "$silent" || echo "checking for bad static forward" |
| 1964 | cat > conftest.${ac_ext} <<EOF |
| 1965 | #include "confdefs.h" |
| 1966 | |
| 1967 | struct s { int a; int b; }; |
| 1968 | static struct s foo; |
| 1969 | int foobar() { return !foo.a; } |
| 1970 | static struct s foo = { 1, 2 }; |
| 1971 | main() { exit(foobar()); } |
| 1972 | |
| 1973 | EOF |
| 1974 | eval $ac_compile |
| 1975 | if test -s conftest && (./conftest; exit) 2>/dev/null; then |
| 1976 | : |
| 1977 | else |
| 1978 | |
| 1979 | { |
| 1980 | test -n "$verbose" && \ |
| 1981 | echo " defining BAD_STATIC_FORWARD" |
| 1982 | echo "#define" BAD_STATIC_FORWARD "1" >> confdefs.h |
| 1983 | DEFS="$DEFS -DBAD_STATIC_FORWARD=1" |
| 1984 | ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_STATIC_FORWARD\${ac_dB}BAD_STATIC_FORWARD\${ac_dC}1\${ac_dD} |
| 1985 | \${ac_uA}BAD_STATIC_FORWARD\${ac_uB}BAD_STATIC_FORWARD\${ac_uC}1\${ac_uD} |
| 1986 | \${ac_eA}BAD_STATIC_FORWARD\${ac_eB}BAD_STATIC_FORWARD\${ac_eC}1\${ac_eD} |
| 1987 | " |
| 1988 | } |
| 1989 | |
| 1990 | fi |
| 1991 | rm -fr conftest* |
| 1992 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1993 | # checks for system services |
| 1994 | # (none yet) |
| 1995 | |
| 1996 | # other checks for UNIX variants |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1997 | ac_save_LIBS="${LIBS}" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1998 | LIBS="${LIBS} -lsun" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1999 | ac_have_lib="" |
| 2000 | test -n "$silent" || echo "checking for -lsun" |
| 2001 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2002 | #include "confdefs.h" |
| 2003 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2004 | int main() { return 0; } |
| 2005 | int t() { main();; 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 | rm -rf conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2009 | ac_have_lib="1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2010 | |
| 2011 | fi |
| 2012 | rm -f conftest* |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2013 | LIBS="${ac_save_LIBS}" |
| 2014 | if test -n "${ac_have_lib}"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2015 | :; LIBS="$LIBS -lsun" |
| 2016 | else |
| 2017 | :; |
| 2018 | fi |
| 2019 | |
| 2020 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2021 | test -n "$silent" || echo "checking for Xenix" |
| 2022 | cat > conftest.${ac_ext} <<EOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2023 | #include "confdefs.h" |
| 2024 | #if defined(M_XENIX) && !defined(M_UNIX) |
| 2025 | yes |
| 2026 | #endif |
| 2027 | |
| 2028 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2029 | eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2030 | if egrep "yes" conftest.out >/dev/null 2>&1; then |
| 2031 | rm -rf conftest* |
| 2032 | XENIX=1 |
| 2033 | |
| 2034 | fi |
| 2035 | rm -f conftest* |
| 2036 | |
| 2037 | if test -n "$XENIX"; then |
| 2038 | LIBS="$LIBS -lx" |
| 2039 | case "$DEFS" in |
| 2040 | *SYSNDIR*) ;; |
| 2041 | *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx. |
| 2042 | esac |
| 2043 | fi |
| 2044 | |
| 2045 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2046 | # check for --with-libm=... |
| 2047 | |
| 2048 | LIBM=-lm |
| 2049 | # check whether --with-libm or --without-libm was given. |
| 2050 | withval="$with_libm" |
| 2051 | if test -n "$withval"; then |
| 2052 | if test "$withval" != yes |
| 2053 | then LIBM=$withval |
| 2054 | else echo "configure: proper usage is --with-libm=STRING" >&2; exit 1 |
| 2055 | fi |
| 2056 | fi |
| 2057 | |
| 2058 | |
| 2059 | # check for --with-libc=... |
| 2060 | |
| 2061 | # check whether --with-libc or --without-libc was given. |
| 2062 | withval="$with_libc" |
| 2063 | if test -n "$withval"; then |
| 2064 | if test "$withval" != yes |
| 2065 | then LIBC=$withval |
| 2066 | else echo "configure: proper usage is --with-libc=STRING" >&2; exit 1 |
| 2067 | fi |
| 2068 | fi |
| 2069 | |
| 2070 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2071 | # generate output files |
| 2072 | # Set default prefixes. |
| 2073 | if test -n "$prefix"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2074 | test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it. |
| 2075 | ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2076 | fi |
| 2077 | if test -n "$exec_prefix"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2078 | ac_prsub="$ac_prsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2079 | s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%" |
| 2080 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2081 | # Any assignment to VPATH causes Sun make to only execute |
| 2082 | # the first set of double-colon rules, so remove it if not needed. |
| 2083 | # If there is a colon in the path, we need to keep it. |
| 2084 | if test "x$srcdir" = x.; then |
| 2085 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' |
| 2086 | fi |
| 2087 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2088 | # Quote sed substitution magic chars in DEFS. |
| 2089 | cat >conftest.def <<EOF |
| 2090 | $DEFS |
| 2091 | EOF |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2092 | ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g' |
| 2093 | DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def` |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2094 | rm -f conftest.def |
| 2095 | # Substitute for predefined variables. |
| 2096 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2097 | trap 'rm -f config.status; exit 1' 1 2 15 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2098 | echo creating config.status |
| 2099 | rm -f config.status |
| 2100 | cat > config.status <<EOF |
| 2101 | #!/bin/sh |
| 2102 | # Generated automatically by configure. |
| 2103 | # Run this file to recreate the current configuration. |
| 2104 | # This directory was configured as follows, |
| 2105 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: |
| 2106 | # |
| 2107 | # $0 $configure_args |
| 2108 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2109 | ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]" |
| 2110 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2111 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2112 | case "\$ac_option" in |
| 2113 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
| 2114 | echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create |
| 2115 | exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;; |
| 2116 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) |
| 2117 | echo "config.status generated by autoconf version 1.8" |
| 2118 | exit 0 ;; |
| 2119 | -help | --help | --hel | --he | --h) |
| 2120 | echo "\$ac_cs_usage"; exit 0 ;; |
| 2121 | *) echo "\$ac_cs_usage"; exit 1 ;; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2122 | esac |
| 2123 | done |
| 2124 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2125 | 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] | 2126 | CC='$CC' |
| 2127 | RANLIB='$RANLIB' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2128 | AR='$AR' |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 2129 | INSTALL='$INSTALL' |
| 2130 | OPT='$OPT' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2131 | CPP='$CPP' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2132 | DLINCLDIR='$DLINCLDIR' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2133 | LIBOBJS='$LIBOBJS' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2134 | LIBM='$LIBM' |
| 2135 | LIBC='$LIBC' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2136 | LIBS='$LIBS' |
| 2137 | srcdir='$srcdir' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2138 | top_srcdir='$top_srcdir' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2139 | prefix='$prefix' |
| 2140 | exec_prefix='$exec_prefix' |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2141 | ac_prsub='$ac_prsub' |
| 2142 | ac_vpsub='$ac_vpsub' |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2143 | extrasub='$extrasub' |
| 2144 | EOF |
| 2145 | cat >> config.status <<\EOF |
| 2146 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2147 | ac_given_srcdir=$srcdir |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2148 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2149 | CONFIG_FILES=${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"} |
| 2150 | 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] | 2151 | # 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] | 2152 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` |
| 2153 | if test "$ac_dir" != "$ac_file"; then |
| 2154 | # The file is in a subdirectory. |
| 2155 | test ! -d "$ac_dir" && mkdir "$ac_dir" |
| 2156 | ac_dir_suffix="/$ac_dir" |
| 2157 | else |
| 2158 | ac_dir_suffix= |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2159 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2160 | |
| 2161 | # A "../" for each directory in $ac_dir_suffix. |
| 2162 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` |
| 2163 | case "$ac_given_srcdir" in |
| 2164 | .) srcdir=.; top_srcdir="$ac_dots." ;; |
| 2165 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; |
| 2166 | *) # Relative path. |
| 2167 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" |
| 2168 | top_srcdir="$ac_dots$ac_given_srcdir" ;; |
| 2169 | esac |
| 2170 | |
| 2171 | echo creating "$ac_file" |
| 2172 | rm -f "$ac_file" |
| 2173 | comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure." |
| 2174 | case "$ac_file" in |
| 2175 | *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;; |
| 2176 | * ) echo "# $comment_str" > "$ac_file" ;; |
| 2177 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2178 | sed -e " |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2179 | $ac_prsub |
| 2180 | $ac_vpsub |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2181 | $extrasub |
| 2182 | s%@CC@%$CC%g |
| 2183 | s%@RANLIB@%$RANLIB%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2184 | s%@AR@%$AR%g |
Guido van Rossum | b1ba03f | 1994-08-19 15:34:50 +0000 | [diff] [blame] | 2185 | s%@INSTALL@%$INSTALL%g |
| 2186 | s%@OPT@%$OPT%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2187 | s%@CPP@%$CPP%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2188 | s%@DLINCLDIR@%$DLINCLDIR%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2189 | s%@LIBOBJS@%$LIBOBJS%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2190 | s%@LIBM@%$LIBM%g |
| 2191 | s%@LIBC@%$LIBC%g |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2192 | s%@LIBS@%$LIBS%g |
| 2193 | s%@srcdir@%$srcdir%g |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2194 | s%@top_srcdir@%$top_srcdir%g |
| 2195 | s%@prefix@%$prefix%g |
| 2196 | s%@exec_prefix@%$exec_prefix%g |
| 2197 | 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] | 2198 | fi; done |
| 2199 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2200 | # These sed commands are put into ac_sed_defs when defining a macro. |
| 2201 | # They are broken into pieces to make the sed script easier to manage. |
| 2202 | # They are passed to sed as "A NAME B NAME C VALUE D", where NAME |
| 2203 | # is the cpp macro being defined and VALUE is the value it is being given. |
| 2204 | # Each defining turns into a single global substitution command. |
| 2205 | # Hopefully no one uses "!" as a variable value. |
| 2206 | # Other candidates for the sed separators, like , and @, do get used. |
| 2207 | # |
| 2208 | # ac_d sets the value in "#define NAME VALUE" lines. |
| 2209 | ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)' |
| 2210 | ac_dB='\([ ][ ]*\)[^ ]*!\1#\2' |
| 2211 | ac_dC='\3' |
| 2212 | ac_dD='!g' |
| 2213 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". |
| 2214 | ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 2215 | ac_uB='\([ ]\)!\1#\2define\3' |
| 2216 | ac_uC=' ' |
| 2217 | ac_uD='\4!g' |
| 2218 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". |
| 2219 | ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' |
| 2220 | ac_eB='$!\1#\2define\3' |
| 2221 | ac_eC=' ' |
| 2222 | ac_eD='!g' |
| 2223 | rm -f conftest.sed |
| 2224 | EOF |
| 2225 | # Turn off quoting long enough to insert the sed commands. |
| 2226 | rm -f conftest.sh |
| 2227 | cat > conftest.sh <<EOF |
| 2228 | $ac_sed_defs |
| 2229 | EOF |
| 2230 | |
| 2231 | # Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit |
| 2232 | # on the size of here documents. |
| 2233 | |
| 2234 | # Maximum number of lines to put in a single here document. |
| 2235 | ac_max_sh_lines=9 |
| 2236 | |
| 2237 | while : |
| 2238 | do |
| 2239 | # wc gives bogus results for an empty file on some AIX systems. |
| 2240 | ac_lines=`grep -c . conftest.sh` |
| 2241 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 2242 | rm -f conftest.s1 conftest.s2 |
| 2243 | sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20. |
| 2244 | sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21. |
| 2245 | # Write a limited-size here document to append to conftest.sed. |
| 2246 | echo 'cat >> conftest.sed <<CONFEOF' >> config.status |
| 2247 | cat conftest.s1 >> config.status |
| 2248 | echo 'CONFEOF' >> config.status |
| 2249 | rm -f conftest.s1 conftest.sh |
| 2250 | mv conftest.s2 conftest.sh |
| 2251 | done |
| 2252 | rm -f conftest.sh |
| 2253 | |
| 2254 | # Now back to your regularly scheduled config.status. |
| 2255 | cat >> config.status <<\EOF |
| 2256 | # This sed command replaces #undef's with comments. This is necessary, for |
| 2257 | # example, in the case of _POSIX_SOURCE, which is predefined and required |
| 2258 | # on some systems where configure will not decide to define it in |
| 2259 | # config.h. |
| 2260 | cat >> conftest.sed <<\CONFEOF |
| 2261 | s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, |
| 2262 | CONFEOF |
| 2263 | rm -f conftest.h |
| 2264 | # Break up the sed commands because old seds have small limits. |
| 2265 | ac_max_sed_lines=20 |
| 2266 | |
| 2267 | CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"} |
| 2268 | for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then |
| 2269 | echo creating $ac_file |
| 2270 | |
| 2271 | cp $ac_given_srcdir/$ac_file.in conftest.h1 |
| 2272 | while : |
| 2273 | do |
| 2274 | ac_lines=`grep -c . conftest.sed` |
| 2275 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi |
| 2276 | rm -f conftest.s1 conftest.s2 conftest.h2 |
| 2277 | sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20. |
| 2278 | sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21. |
| 2279 | sed -f conftest.s1 < conftest.h1 > conftest.h2 |
| 2280 | rm -f conftest.s1 conftest.h1 conftest.sed |
| 2281 | mv conftest.h2 conftest.h1 |
| 2282 | mv conftest.s2 conftest.sed |
| 2283 | done |
| 2284 | rm -f conftest.sed conftest.h |
| 2285 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h |
| 2286 | cat conftest.h1 >> conftest.h |
| 2287 | rm -f conftest.h1 |
| 2288 | if cmp -s $ac_file conftest.h 2>/dev/null; then |
| 2289 | # The file exists and we would not be changing it. |
| 2290 | echo "$ac_file is unchanged" |
| 2291 | rm -f conftest.h |
| 2292 | else |
| 2293 | rm -f $ac_file |
| 2294 | mv conftest.h $ac_file |
| 2295 | fi |
| 2296 | fi; done |
| 2297 | |
| 2298 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2299 | |
| 2300 | exit 0 |
| 2301 | EOF |
| 2302 | chmod +x config.status |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2303 | test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2304 | |