Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1 | dnl Process this file with autoconf to produce a configure script. |
| 2 | |
Guido van Rossum | 6085e32 | 1993-12-26 18:24:40 +0000 | [diff] [blame] | 3 | AC_INIT(Include/object.h) |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4 | |
| 5 | # checks for alternative programs |
| 6 | AC_PROG_CC |
| 7 | AC_PROG_RANLIB |
| 8 | |
| 9 | # checks for UNIX variants that set C preprocessor variables |
| 10 | AC_AIX |
| 11 | AC_ISC_POSIX |
| 12 | AC_MINIX |
| 13 | dnl DYNIX test runs compile so must be last |
| 14 | AC_DYNIX_SEQ |
| 15 | |
| 16 | # checks for header files |
| 17 | AC_STDC_HEADERS |
| 18 | AC_HAVE_HEADERS(dlfcn.h signal.h stdarg.h unistd.h utime.h sys/param.h sys/select.h sys/times.h sys/utsname.h) |
| 19 | AC_DIR_HEADER |
| 20 | |
| 21 | # checks for typedefs |
| 22 | AC_GETGROUPS_T |
| 23 | AC_MODE_T |
| 24 | AC_OFF_T |
| 25 | AC_PID_T |
| 26 | AC_RETSIGTYPE |
| 27 | AC_SIZE_T |
| 28 | AC_UID_T |
| 29 | |
| 30 | # checks for libraries |
| 31 | AC_HAVE_LIBRARY(dl) |
| 32 | LIBS="${LIBS} -L${READLINESRC-${PWD-${CWD-`pwd`}}/readline}" |
| 33 | AC_HAVE_LIBRARY(readline) |
| 34 | if test -n "${have_lib}"; then |
| 35 | AC_HAVE_LIBRARY(termcap) |
| 36 | fi |
| 37 | |
| 38 | # Check for IRIX or SOLARIS thread interface |
| 39 | AC_HAVE_LIBRARY(mpc) |
| 40 | if test -n "${have_lib}"; then |
| 41 | DEFS="${DEFS} -DUSE_THREAD" |
| 42 | LIBOBJS="${LIBOBJS} thread.o" |
| 43 | fi |
| 44 | |
| 45 | AC_HAVE_LIBRARY(thread) |
| 46 | if test -n "${have_lib}"; then |
| 47 | DEFS="${DEFS} -DUSE_THREAD" |
| 48 | LIBOBJS="${LIBOBJS} thread.o" |
| 49 | fi |
| 50 | |
| 51 | # checks for library functions |
| 52 | AC_HAVE_FUNCS(clock ftime gettimeofday getpgrp getwd lstat readlink readline select setsid setpgid setpgrp siginterrupt symlink tcgetpgrp tcsetpgrp times uname waitpid) |
| 53 | AC_REPLACE_FUNCS(dup2 getcwd strerror strtoul strtod memmove) |
| 54 | AC_FUNC_CHECK(getpgrp, AC_COMPILE_CHECK([argument to getpgrp], [#include <unistd.h>], [getpgrp(0);], AC_DEFINE(GETPGRP_HAVE_ARG))) |
| 55 | |
| 56 | # checks for structures |
| 57 | AC_TIME_WITH_SYS_TIME |
| 58 | AC_STRUCT_TM |
| 59 | AC_TIMEZONE |
| 60 | |
| 61 | # checks for compiler characteristics |
| 62 | AC_CONST |
| 63 | echo checking for prototypes |
| 64 | AC_TEST_PROGRAM([int foo(int x){return 0;} int main(){return foo(10);}], AC_DEFINE(HAVE_PROTOTYPES) have_prototypes=1) |
| 65 | if test "$have_prototypes"; then |
| 66 | AC_COMPILE_CHECK(["bad exec* prototypes"], [#include <unistd.h>], [char *const*t;execve("@",t,t);], , AC_DEFINE(BAD_EXEC_PROTOTYPES)) |
| 67 | fi |
| 68 | |
| 69 | # checks for system services |
| 70 | # (none yet) |
| 71 | |
| 72 | # other checks for UNIX variants |
| 73 | AC_IRIX_SUN |
| 74 | AC_XENIX_DIR |
| 75 | |
| 76 | # generate output files |
| 77 | AC_OUTPUT(Objects/Makefile Parser/Makefile Python/Makefile) |