1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(Include/object.h)
5 # checks for alternative programs
9 # checks for UNIX variants that set C preprocessor variables
13 dnl DYNIX test runs compile so must be last
16 # checks for header files
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)
30 # checks for libraries
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)
38 # Check for IRIX or SOLARIS thread interface
40 if test -n "${have_lib}"; then
41 DEFS="${DEFS} -DUSE_THREAD"
42 LIBOBJS="${LIBOBJS} thread.o"
45 AC_HAVE_LIBRARY(thread)
46 if test -n "${have_lib}"; then
47 DEFS="${DEFS} -DUSE_THREAD"
48 LIBOBJS="${LIBOBJS} thread.o"
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)))
56 # checks for structures
61 # checks for compiler characteristics
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))
69 # checks for system services
72 # other checks for UNIX variants
76 # generate output files
77 AC_OUTPUT(Objects/Makefile Parser/Makefile Python/Makefile)