3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf.
5 # Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 # Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp]
22 # [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]]
23 # Ignores all args except --srcdir, --prefix, --exec-prefix, and
24 # --with-PACKAGE[=VALUE] unless this script has special code to handle it.
28 # Handle --exec-prefix with a space before the argument.
29 if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
30 # Handle --host with a space before the argument.
31 elif test x$next_host = xyes; then next_host=
32 # Handle --prefix with a space before the argument.
33 elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
34 # Handle --srcdir with a space before the argument.
35 elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
38 # For backward compatibility, recognize -exec-prefix and --exec_prefix.
39 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
40 exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
41 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
42 next_exec_prefix=yes ;;
44 -gas | --gas | --ga | --g) ;;
46 -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
47 -host | --host | --hos | --ho | --h)
50 -nfp | --nfp | --nf) ;;
52 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
53 prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
54 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
57 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
58 srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
59 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
63 package=`echo $arg|sed -e 's/-*with-//' -e 's/=.*//'`
64 # Reject names that aren't valid shell variable names.
65 if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then
66 echo "configure: $package: invalid package name" >&2; exit 1
68 package=`echo $package| sed 's/-/_/g'`
70 *=*) val="`echo $arg|sed 's/[^=]*=//'`" ;;
73 eval "with_$package='$val'" ;;
75 -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
83 trap 'rm -fr conftest* confdefs* core; exit 1' 1 3 15
84 trap 'rm -f confdefs*' 0
87 # These must not be set unconditionally because not all systems understand
88 # e.g. LANG=C (notably SCO).
89 if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
90 if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi
92 rm -f conftest* confdefs.h
93 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
95 compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1'
97 # A filename unique to this package, relative to the directory that
98 # configure is in, which we can look for to find out if srcdir is correct.
99 unique_file=Include/object.h
101 # Find the source files, if location was not specified.
102 if test -z "$srcdir"; then
104 # Try the directory containing this script, then `..'.
106 confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
107 test "X$confdir" = "X$prog" && confdir=.
109 if test ! -r $srcdir/$unique_file; then
113 if test ! -r $srcdir/$unique_file; then
114 if test x$srcdirdefaulted = xyes; then
115 echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
117 echo "configure: Can not find sources in \`${srcdir}'." 1>&2
121 # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
122 # But we can't avoid them for `..', to make subdirectories work.
125 *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
129 # Save the original args to write them into config.status later.
133 # checks for alternative programs
134 if test -z "$CC"; then
135 # Extract the first word of `gcc', so it can be a program name with args.
136 set dummy gcc; word=$2
137 echo checking for $word
138 IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:"
140 test -z "$dir" && dir=.
141 if test -f $dir/$word; then
148 test -z "$CC" && CC="cc"
149 test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC"
151 # Find out if we are using GNU C, under whatever name.
152 cat > conftest.c <<EOF
157 ${CC-cc} -E conftest.c > conftest.out 2>&1
158 if egrep yes conftest.out >/dev/null 2>&1; then
159 GCC=1 # For later tests.
163 if test -z "$RANLIB"; then
164 # Extract the first word of `ranlib', so it can be a program name with args.
165 set dummy ranlib; word=$2
166 echo checking for $word
167 IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:"
169 test -z "$dir" && dir=.
170 if test -f $dir/$word; then
177 test -z "$RANLIB" && RANLIB=":"
178 test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB"
181 # checks for UNIX variants that set C preprocessor variables
182 echo checking for AIX
183 echo checking how to run the C preprocessor
184 if test -z "$CPP"; then
185 # This must be in double quotes, not single quotes, because CPP may get
186 # substituted into the Makefile and ``${CC-cc}'' will simply confuse
187 # make. It must be expanded now.
189 cat > conftest.c <<EOF
190 #include "confdefs.h"
194 err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
195 if test -z "$err"; then
203 test ".${verbose}" != "." && echo " setting CPP to $CPP"
205 cat > conftest.c <<EOF
206 #include "confdefs.h"
212 eval "$CPP conftest.c > conftest.out 2>&1"
213 if egrep "yes" conftest.out >/dev/null 2>&1; then
217 test -n "$verbose" && \
218 echo " defining _ALL_SOURCE"
219 echo "#define" _ALL_SOURCE 1 >> confdefs.h
220 DEFS="$DEFS -D_ALL_SOURCE=1"
228 echo checking for POSIXized ISC
229 if test -d /etc/conf/kconfig.d &&
230 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
232 ISC=1 # If later tests want to check for ISC.
235 test -n "$verbose" && \
236 echo " defining _POSIX_SOURCE"
237 echo "#define" _POSIX_SOURCE 1 >> confdefs.h
238 DEFS="$DEFS -D_POSIX_SOURCE=1"
241 if test -n "$GCC"; then
248 echo checking for minix/config.h
249 cat > conftest.c <<EOF
250 #include "confdefs.h"
251 #include <minix/config.h>
253 err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
254 if test -z "$err"; then
261 # The Minix shell can't assign to the same variable on the same line!
262 if test -n "$MINIX"; then
265 test -n "$verbose" && \
266 echo " defining _POSIX_SOURCE"
267 echo "#define" _POSIX_SOURCE 1 >> confdefs.h
268 DEFS="$DEFS -D_POSIX_SOURCE=1"
273 test -n "$verbose" && \
274 echo " defining" _POSIX_1_SOURCE to be 2
275 echo "#define" _POSIX_1_SOURCE 2 >> confdefs.h
276 DEFS="$DEFS -D_POSIX_1_SOURCE=2"
281 test -n "$verbose" && \
282 echo " defining _MINIX"
283 echo "#define" _MINIX 1 >> confdefs.h
284 DEFS="$DEFS -D_MINIX=1"
292 echo checking for -lseq
293 cat > conftest.c <<EOF
294 #include "confdefs.h"
296 int main() { exit(0); }
299 if eval $compile; then
306 if test -n "${have_lib}"; then
307 :; LIBS="$LIBS -lseq"
314 # checks for header files
315 echo checking for ANSI C header files
316 cat > conftest.c <<EOF
317 #include "confdefs.h"
323 err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
324 if test -z "$err"; then
326 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
327 echo '#include "confdefs.h"
328 #include <string.h>' > conftest.c
329 eval "$CPP conftest.c > conftest.out 2>&1"
330 if egrep "memchr" conftest.out >/dev/null 2>&1; then
332 # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
333 cat > conftest.c <<EOF
334 #include "confdefs.h"
336 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
337 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
338 #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
339 int main () { int i; for (i = 0; i < 256; i++)
340 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
345 if test -s conftest && (./conftest; exit) 2>/dev/null; then
348 test -n "$verbose" && \
349 echo " defining STDC_HEADERS"
350 echo "#define" STDC_HEADERS 1 >> confdefs.h
351 DEFS="$DEFS -DSTDC_HEADERS=1"
365 for hdr in dlfcn.h signal.h stdarg.h unistd.h utime.h sys/param.h sys/select.h sys/times.h sys/utsname.h
367 trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
368 echo checking for ${hdr}
369 cat > conftest.c <<EOF
370 #include "confdefs.h"
373 err=`eval "($CPP conftest.c >/dev/null) 2>&1"`
374 if test -z "$err"; then
378 test -n "$verbose" && \
379 echo " defining ${trhdr}"
380 echo "#define" ${trhdr} 1 >> confdefs.h
381 DEFS="$DEFS -D${trhdr}=1"
389 echo checking for directory library header
391 if test -z "$dirheader"; then
392 echo checking for dirent.h
393 cat > conftest.c <<EOF
394 #include "confdefs.h"
395 #include <sys/types.h>
397 int main() { exit(0); }
398 int t() { DIR *dirp = 0; }
400 if eval $compile; then
404 test -n "$verbose" && \
405 echo " defining DIRENT"
406 echo "#define" DIRENT 1 >> confdefs.h
407 DEFS="$DEFS -DDIRENT=1"
414 if test -z "$dirheader"; then
415 echo checking for sys/ndir.h
416 cat > conftest.c <<EOF
417 #include "confdefs.h"
418 #include <sys/types.h>
419 #include <sys/ndir.h>
420 int main() { exit(0); }
421 int t() { DIR *dirp = 0; }
423 if eval $compile; then
427 test -n "$verbose" && \
428 echo " defining SYSNDIR"
429 echo "#define" SYSNDIR 1 >> confdefs.h
430 DEFS="$DEFS -DSYSNDIR=1"
437 if test -z "$dirheader"; then
438 echo checking for sys/dir.h
439 cat > conftest.c <<EOF
440 #include "confdefs.h"
441 #include <sys/types.h>
443 int main() { exit(0); }
444 int t() { DIR *dirp = 0; }
446 if eval $compile; then
450 test -n "$verbose" && \
451 echo " defining SYSDIR"
452 echo "#define" SYSDIR 1 >> confdefs.h
453 DEFS="$DEFS -DSYSDIR=1"
460 if test -z "$dirheader"; then
461 echo checking for ndir.h
462 cat > conftest.c <<EOF
463 #include "confdefs.h"
464 #include <sys/types.h>
466 int main() { exit(0); }
467 int t() { DIR *dirp = 0; }
469 if eval $compile; then
473 test -n "$verbose" && \
474 echo " defining NDIR"
475 echo "#define" NDIR 1 >> confdefs.h
476 DEFS="$DEFS -DNDIR=1"
484 echo checking for closedir return value
485 cat > conftest.c <<EOF
486 #include "confdefs.h"
487 #include <sys/types.h>
488 #include <$dirheader>
489 int closedir(); main() { exit(closedir(opendir(".")) != 0); }
492 if test -s conftest && (./conftest; exit) 2>/dev/null; then
497 test -n "$verbose" && \
498 echo " defining VOID_CLOSEDIR"
499 echo "#define" VOID_CLOSEDIR 1 >> confdefs.h
500 DEFS="$DEFS -DVOID_CLOSEDIR=1"
507 # checks for typedefs
508 echo checking for uid_t in sys/types.h
509 echo '#include "confdefs.h"
510 #include <sys/types.h>' > conftest.c
511 eval "$CPP conftest.c > conftest.out 2>&1"
512 if egrep "uid_t" conftest.out >/dev/null 2>&1; then
518 test -n "$verbose" && \
519 echo " defining" uid_t to be int
520 echo "#define" uid_t int >> confdefs.h
521 DEFS="$DEFS -Duid_t=int"
525 test -n "$verbose" && \
526 echo " defining" gid_t to be int
527 echo "#define" gid_t int >> confdefs.h
528 DEFS="$DEFS -Dgid_t=int"
534 echo checking for type of array argument to getgroups
535 prog='/* Thanks to Mike Rendell for this test. */
536 #include <sys/types.h>
539 #define MAX(x,y) ((x) > (y) ? (x) : (y))
544 union { gid_t gval; long lval; } val;
547 for (i = 0; i < NGID; i++)
548 gidset[i] = val.gval;
549 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
551 /* Exit non-zero if getgroups seems to require an array of ints. This
552 happens when gid_t is short but getgroups modifies an array of ints. */
553 exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
555 cat > conftest.c <<EOF
556 #include "confdefs.h"
560 if test -s conftest && (./conftest; exit) 2>/dev/null; then
563 test -n "$verbose" && \
564 echo " defining" GETGROUPS_T to be gid_t
565 echo "#define" GETGROUPS_T gid_t >> confdefs.h
566 DEFS="$DEFS -DGETGROUPS_T=gid_t"
573 test -n "$verbose" && \
574 echo " defining" GETGROUPS_T to be int
575 echo "#define" GETGROUPS_T int >> confdefs.h
576 DEFS="$DEFS -DGETGROUPS_T=int"
582 echo checking for mode_t in sys/types.h
583 echo '#include "confdefs.h"
584 #include <sys/types.h>' > conftest.c
585 eval "$CPP conftest.c > conftest.out 2>&1"
586 if egrep "mode_t" conftest.out >/dev/null 2>&1; then
592 test -n "$verbose" && \
593 echo " defining" mode_t to be int
594 echo "#define" mode_t int >> confdefs.h
595 DEFS="$DEFS -Dmode_t=int"
601 echo checking for off_t in sys/types.h
602 echo '#include "confdefs.h"
603 #include <sys/types.h>' > conftest.c
604 eval "$CPP conftest.c > conftest.out 2>&1"
605 if egrep "off_t" conftest.out >/dev/null 2>&1; then
611 test -n "$verbose" && \
612 echo " defining" off_t to be long
613 echo "#define" off_t long >> confdefs.h
614 DEFS="$DEFS -Doff_t=long"
620 echo checking for pid_t in sys/types.h
621 echo '#include "confdefs.h"
622 #include <sys/types.h>' > conftest.c
623 eval "$CPP conftest.c > conftest.out 2>&1"
624 if egrep "pid_t" conftest.out >/dev/null 2>&1; then
630 test -n "$verbose" && \
631 echo " defining" pid_t to be int
632 echo "#define" pid_t int >> confdefs.h
633 DEFS="$DEFS -Dpid_t=int"
639 echo checking for return type of signal handlers
640 cat > conftest.c <<EOF
641 #include "confdefs.h"
642 #include <sys/types.h>
647 extern void (*signal ()) ();
648 int main() { exit(0); }
651 if eval $compile; then
655 test -n "$verbose" && \
656 echo " defining" RETSIGTYPE to be void
657 echo "#define" RETSIGTYPE void >> confdefs.h
658 DEFS="$DEFS -DRETSIGTYPE=void"
666 test -n "$verbose" && \
667 echo " defining" RETSIGTYPE to be int
668 echo "#define" RETSIGTYPE int >> confdefs.h
669 DEFS="$DEFS -DRETSIGTYPE=int"
676 echo checking for size_t in sys/types.h
677 echo '#include "confdefs.h"
678 #include <sys/types.h>' > conftest.c
679 eval "$CPP conftest.c > conftest.out 2>&1"
680 if egrep "size_t" conftest.out >/dev/null 2>&1; then
686 test -n "$verbose" && \
687 echo " defining" size_t to be unsigned
688 echo "#define" size_t unsigned >> confdefs.h
689 DEFS="$DEFS -Dsize_t=unsigned"
695 echo checking for uid_t in sys/types.h
696 echo '#include "confdefs.h"
697 #include <sys/types.h>' > conftest.c
698 eval "$CPP conftest.c > conftest.out 2>&1"
699 if egrep "uid_t" conftest.out >/dev/null 2>&1; then
705 test -n "$verbose" && \
706 echo " defining" uid_t to be int
707 echo "#define" uid_t int >> confdefs.h
708 DEFS="$DEFS -Duid_t=int"
712 test -n "$verbose" && \
713 echo " defining" gid_t to be int
714 echo "#define" gid_t int >> confdefs.h
715 DEFS="$DEFS -Dgid_t=int"
722 # checks for libraries
726 echo checking for -ldl
727 cat > conftest.c <<EOF
728 #include "confdefs.h"
730 int main() { exit(0); }
733 if eval $compile; then
740 if test -n "${have_lib}"; then
743 test -n "$verbose" && \
744 echo " defining HAVE_LIBDL"
745 echo "#define" HAVE_LIBDL 1 >> confdefs.h
746 DEFS="$DEFS -DHAVE_LIBDL=1"
752 LIBS="${LIBS} -L${READLINESRC-${PWD-${CWD-`pwd`}}/readline}"
754 LIBS="${LIBS} -lreadline"
756 echo checking for -lreadline
757 cat > conftest.c <<EOF
758 #include "confdefs.h"
760 int main() { exit(0); }
763 if eval $compile; then
770 if test -n "${have_lib}"; then
773 test -n "$verbose" && \
774 echo " defining HAVE_LIBREADLINE"
775 echo "#define" HAVE_LIBREADLINE 1 >> confdefs.h
776 DEFS="$DEFS -DHAVE_LIBREADLINE=1"
779 LIBS="${LIBS} -lreadline"
782 if test -n "${have_lib}"; then
784 LIBS="${LIBS} -ltermcap"
786 echo checking for -ltermcap
787 cat > conftest.c <<EOF
788 #include "confdefs.h"
790 int main() { exit(0); }
793 if eval $compile; then
800 if test -n "${have_lib}"; then
803 test -n "$verbose" && \
804 echo " defining HAVE_LIBTERMCAP"
805 echo "#define" HAVE_LIBTERMCAP 1 >> confdefs.h
806 DEFS="$DEFS -DHAVE_LIBTERMCAP=1"
809 LIBS="${LIBS} -ltermcap"
814 # Check for IRIX or SOLARIS thread interface
818 echo checking for -lmpc
819 cat > conftest.c <<EOF
820 #include "confdefs.h"
822 int main() { exit(0); }
825 if eval $compile; then
832 if test -n "${have_lib}"; then
835 test -n "$verbose" && \
836 echo " defining HAVE_LIBMPC"
837 echo "#define" HAVE_LIBMPC 1 >> confdefs.h
838 DEFS="$DEFS -DHAVE_LIBMPC=1"
844 if test -n "${have_lib}"; then
845 DEFS="${DEFS} -DUSE_THREAD"
846 LIBOBJS="${LIBOBJS} thread.o"
850 LIBS="${LIBS} -lthread"
852 echo checking for -lthread
853 cat > conftest.c <<EOF
854 #include "confdefs.h"
856 int main() { exit(0); }
859 if eval $compile; then
866 if test -n "${have_lib}"; then
869 test -n "$verbose" && \
870 echo " defining HAVE_LIBTHREAD"
871 echo "#define" HAVE_LIBTHREAD 1 >> confdefs.h
872 DEFS="$DEFS -DHAVE_LIBTHREAD=1"
875 LIBS="${LIBS} -lthread"
878 if test -n "${have_lib}"; then
879 DEFS="${DEFS} -DUSE_THREAD"
880 LIBOBJS="${LIBOBJS} thread.o"
883 # checks for library functions
884 for func in clock ftime gettimeofday getpgrp getwd lstat readlink readline select setsid setpgid setpgrp siginterrupt symlink tcgetpgrp tcsetpgrp times uname waitpid
886 trfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'`
887 echo checking for ${func}
888 cat > conftest.c <<EOF
889 #include "confdefs.h"
891 int main() { exit(0); }
893 /* The GNU C library defines this for functions which it implements
894 to always fail with ENOSYS. Some functions are actually named
895 something starting with __ and the normal name is an alias. */
896 #if defined (__stub_${func}) || defined (__stub___${func})
899 /* Override any gcc2 internal prototype to avoid an error. */
900 extern char ${func}(); ${func}();
904 if eval $compile; then
907 test -n "$verbose" && \
908 echo " defining ${trfunc}"
909 echo "#define" ${trfunc} 1 >> confdefs.h
910 DEFS="$DEFS -D${trfunc}=1"
918 for func in dup2 getcwd strerror strtoul strtod memmove
920 echo checking for ${func}
921 cat > conftest.c <<EOF
922 #include "confdefs.h"
924 int main() { exit(0); }
926 /* The GNU C library defines this for functions which it implements
927 to always fail with ENOSYS. Some functions are actually named
928 something starting with __ and the normal name is an alias. */
929 #if defined (__stub_${func}) || defined (__stub___${func})
932 /* Override any gcc2 internal prototype to avoid an error. */
933 extern char ${func}(); ${func}();
937 if eval $compile; then
941 LIBOBJS="$LIBOBJS ${func}.o"
942 test -n "$verbose" && echo " using ${func}.o instead"
948 echo checking for getpgrp
949 cat > conftest.c <<EOF
950 #include "confdefs.h"
952 int main() { exit(0); }
954 /* The GNU C library defines this for functions which it implements
955 to always fail with ENOSYS. Some functions are actually named
956 something starting with __ and the normal name is an alias. */
957 #if defined (__stub_getpgrp) || defined (__stub___getpgrp)
960 /* Override any gcc2 internal prototype to avoid an error. */
961 extern char getpgrp(); getpgrp();
965 if eval $compile; then
967 echo checking for argument to getpgrp
968 cat > conftest.c <<EOF
969 #include "confdefs.h"
971 int main() { exit(0); }
972 int t() { getpgrp(0); }
974 if eval $compile; then
978 test -n "$verbose" && \
979 echo " defining GETPGRP_HAVE_ARG"
980 echo "#define" GETPGRP_HAVE_ARG 1 >> confdefs.h
981 DEFS="$DEFS -DGETPGRP_HAVE_ARG=1"
993 # checks for structures
994 echo checking for whether time.h and sys/time.h may both be included
995 cat > conftest.c <<EOF
996 #include "confdefs.h"
997 #include <sys/types.h>
998 #include <sys/time.h>
1000 int main() { exit(0); }
1001 int t() { struct tm *tp; }
1003 if eval $compile; then
1007 test -n "$verbose" && \
1008 echo " defining TIME_WITH_SYS_TIME"
1009 echo "#define" TIME_WITH_SYS_TIME 1 >> confdefs.h
1010 DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
1017 echo checking for struct tm in time.h
1018 cat > conftest.c <<EOF
1019 #include "confdefs.h"
1020 #include <sys/types.h>
1022 int main() { exit(0); }
1023 int t() { struct tm *tp; tp->tm_sec; }
1025 if eval $compile; then
1031 test -n "$verbose" && \
1032 echo " defining TM_IN_SYS_TIME"
1033 echo "#define" TM_IN_SYS_TIME 1 >> confdefs.h
1034 DEFS="$DEFS -DTM_IN_SYS_TIME=1"
1040 decl='#include <sys/types.h>
1043 *TM_IN_SYS_TIME*) decl="$decl
1044 #include <sys/time.h>
1050 echo checking for tm_zone in struct tm
1051 cat > conftest.c <<EOF
1052 #include "confdefs.h"
1054 int main() { exit(0); }
1055 int t() { struct tm tm; tm.tm_zone; }
1057 if eval $compile; then
1061 test -n "$verbose" && \
1062 echo " defining HAVE_TM_ZONE"
1063 echo "#define" HAVE_TM_ZONE 1 >> confdefs.h
1064 DEFS="$DEFS -DHAVE_TM_ZONE=1"
1074 if test -n "$no_tm_zone"; then
1075 echo checking for tzname
1076 cat > conftest.c <<EOF
1077 #include "confdefs.h"
1079 #ifndef tzname /* For SGI. */
1080 extern char *tzname[]; /* RS6000 and others want it this way. */
1082 int main() { exit(0); }
1083 int t() { atoi(*tzname); }
1085 if eval $compile; then
1089 test -n "$verbose" && \
1090 echo " defining HAVE_TZNAME"
1091 echo "#define" HAVE_TZNAME 1 >> confdefs.h
1092 DEFS="$DEFS -DHAVE_TZNAME=1"
1102 # checks for compiler characteristics
1103 prog='/* Ultrix mips cc rejects this. */
1104 typedef int charset[2]; const charset x;
1105 /* SunOS 4.1.1 cc rejects this. */
1106 char const *const *ccp;
1108 /* AIX XL C 1.02.0.0 rejects this.
1109 It does not let you subtract one const X* pointer from another in an arm
1110 of an if-expression whose if-part is not a constant expression */
1111 const char *g = "string";
1112 ccp = &g + (g ? g-g : 0);
1113 /* HPUX 7.0 cc rejects these. */
1116 ccp = (char const *const *) p;
1117 { /* SCO 3.2v4 cc rejects this. */
1119 char const *s = 0 ? (char *) 0 : (char const *) 0;
1123 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1125 const int *foo = &x[0];
1128 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1129 typedef const int *iptr;
1133 { /* AIX XL C 1.02.0.0 rejects this saying
1134 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1135 struct s { int j; const int *ap[3]; };
1136 struct s *b; b->j = 5;
1138 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1141 echo checking for lack of working const
1142 cat > conftest.c <<EOF
1143 #include "confdefs.h"
1145 int main() { exit(0); }
1148 if eval $compile; then
1154 test -n "$verbose" && \
1155 echo " defining" const to be empty
1156 echo "#define" const >> confdefs.h
1157 DEFS="$DEFS -Dconst="
1163 echo checking for prototypes
1164 cat > conftest.c <<EOF
1165 #include "confdefs.h"
1166 int foo(int x){return 0;} int main(){return foo(10);}
1169 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1172 test -n "$verbose" && \
1173 echo " defining HAVE_PROTOTYPES"
1174 echo "#define" HAVE_PROTOTYPES 1 >> confdefs.h
1175 DEFS="$DEFS -DHAVE_PROTOTYPES=1"
1181 if test "$have_prototypes"; then
1182 echo checking for "bad exec* prototypes"
1183 cat > conftest.c <<EOF
1184 #include "confdefs.h"
1186 int main() { exit(0); }
1187 int t() { char *const*t;execve("@",t,t); }
1189 if eval $compile; then
1195 test -n "$verbose" && \
1196 echo " defining BAD_EXEC_PROTOTYPES"
1197 echo "#define" BAD_EXEC_PROTOTYPES 1 >> confdefs.h
1198 DEFS="$DEFS -DBAD_EXEC_PROTOTYPES=1"
1206 # checks for system services
1209 # other checks for UNIX variants
1211 LIBS="${LIBS} -lsun"
1213 echo checking for -lsun
1214 cat > conftest.c <<EOF
1215 #include "confdefs.h"
1217 int main() { exit(0); }
1220 if eval $compile; then
1227 if test -n "${have_lib}"; then
1228 :; LIBS="$LIBS -lsun"
1234 echo checking for Xenix
1235 cat > conftest.c <<EOF
1236 #include "confdefs.h"
1237 #if defined(M_XENIX) && !defined(M_UNIX)
1242 eval "$CPP conftest.c > conftest.out 2>&1"
1243 if egrep "yes" conftest.out >/dev/null 2>&1; then
1250 if test -n "$XENIX"; then
1254 *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
1259 # generate output files
1260 # Set default prefixes.
1261 if test -n "$prefix"; then
1262 test -z "$exec_prefix" && exec_prefix='${prefix}'
1263 prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
1265 if test -n "$exec_prefix"; then
1267 s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
1269 # Quote sed substitution magic chars in DEFS.
1270 cat >conftest.def <<EOF
1273 escape_ampersand_and_backslash='s%[&\\]%\\&%g'
1274 DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
1276 # Substitute for predefined variables.
1278 trap 'rm -f config.status; exit 1' 1 3 15
1279 echo creating config.status
1281 cat > config.status <<EOF
1283 # Generated automatically by configure.
1284 # Run this file to recreate the current configuration.
1285 # This directory was configured as follows,
1286 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1288 # $0 $configure_args
1293 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1294 echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args
1295 exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;;
1296 *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
1300 trap 'rm -f Objects/Makefile Parser/Makefile Python/Makefile; exit 1' 1 3 15
1309 exec_prefix='$exec_prefix'
1311 extrasub='$extrasub'
1313 cat >> config.status <<\EOF
1317 CONFIG_FILES=${CONFIG_FILES-"Objects/Makefile Parser/Makefile Python/Makefile"}
1318 for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then
1320 # Remove last slash and all that follows it. Not all systems have dirname.
1321 dir=`echo $file|sed 's%/[^/][^/]*$%%'`
1322 if test "$dir" != "$file"; then
1323 test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
1324 test ! -d $dir && mkdir $dir
1328 echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
1333 s%@RANLIB@%$RANLIB%g
1335 s%@LIBOBJS@%$LIBOBJS%g
1337 s%@srcdir@%$srcdir%g
1339 " $top_srcdir/${file}.in >> $file
1345 chmod +x config.status
1346 ${CONFIG_SHELL-/bin/sh} config.status