Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5739e7ec
Commit
5739e7ec
authored
Jan 20, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modernize all tests to use cache and report outcome
parent
9bc247a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
34 deletions
+67
-34
configure.in
configure.in
+67
-34
No files found.
configure.in
View file @
5739e7ec
...
@@ -5,13 +5,18 @@ AC_INIT(Include/object.h)
...
@@ -5,13 +5,18 @@ AC_INIT(Include/object.h)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_HEADER(config.h)
# checks for alternative programs
# checks for alternative programs
AC_
CHECKING(for --with(out)
-gcc)
AC_
MSG_CHECKING(for --without
-gcc)
AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
case $withval in
case $withval in
no) withval=cc;;
no) CC=cc
yes) withval=gcc;;
without_gcc=yes;;
esac
yes) CC=gcc
CC=$withval])
without_gcc=no;;
*) CC=$withval
without_gcc=$withval;;
esac], [without_gcc=no])
AC_MSG_RESULT($without_gcc)
AC_PROG_CC
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_RANLIB
AC_SUBST(AR)
AC_SUBST(AR)
...
@@ -39,12 +44,15 @@ fi
...
@@ -39,12 +44,15 @@ fi
AC_AIX
AC_AIX
AC_ISC_POSIX
AC_ISC_POSIX
AC_MINIX
AC_MINIX
AC_CHECKING(for NeXT)
was_it_defined=no
AC_TRY_RUN([
AC_TRY_RUN([
#ifdef _NEXT_SOURCE
#ifdef _NEXT_SOURCE
main() { exit(0); }
main() { exit(0); }
#endif
#endif
], AC_DEFINE(_POSIX_SOURCE))
], AC_DEFINE(_POSIX_SOURCE) was_it_defined=yes)
AC_MSG_CHECKING(for NeXT)
AC_MSG_RESULT($was_it_defined)
# checks for header files
# checks for header files
AC_HEADER_STDC
AC_HEADER_STDC
...
@@ -52,8 +60,11 @@ AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h th
...
@@ -52,8 +60,11 @@ AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.h stdlib.h th
AC_HEADER_DIRENT
AC_HEADER_DIRENT
# checks for typedefs
# checks for typedefs
AC_CHECKING(for clock_t in time.h)
was_it_defined=no
AC_EGREP_HEADER(clock_t, time.h, , AC_DEFINE(clock_t, long))
AC_MSG_CHECKING(for clock_t in time.h)
AC_EGREP_HEADER(clock_t, time.h, was_it_defined=yes, AC_DEFINE(clock_t, long))
AC_MSG_RESULT($was_it_defined)
AC_TYPE_MODE_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_PID_T
...
@@ -138,8 +149,9 @@ AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
...
@@ -138,8 +149,9 @@ AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(inet, gethostbyname, [LIBS="-linet $LIBS"], [], -lnsl) # Sequent
AC_CHECK_LIB(inet, gethostbyname, [LIBS="-linet $LIBS"], [], -lnsl) # Sequent
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
AC_CHECKING(for --with-readline)
AC_
MSG_
CHECKING(for --with-readline)
AC_ARG_WITH(readline, [--with-readline=DIRECTORY GNU readline], [
AC_ARG_WITH(readline, [--with-readline=DIRECTORY GNU readline], [
AC_MSG_RESULT($withval)
AC_DEFINE(WITH_READLINE)
AC_DEFINE(WITH_READLINE)
if test ! -d "$withval"
if test ! -d "$withval"
then AC_ERROR(proper usage is --with-readline=DIRECTORY)
then AC_ERROR(proper usage is --with-readline=DIRECTORY)
...
@@ -156,10 +168,11 @@ then LIBS="$LIBS $withval/libreadline.a"
...
@@ -156,10 +168,11 @@ then LIBS="$LIBS $withval/libreadline.a"
else LIBS="$LIBS -l$termcap"
else LIBS="$LIBS -l$termcap"
fi
fi
else AC_ERROR(no working termcap/termlib, do not use --with-readline)
else AC_ERROR(no working termcap/termlib, do not use --with-readline)
fi])
fi]
, AC_MSG_RESULT(no)
)
AC_CHECKING(for --with-thread)
AC_
MSG_
CHECKING(for --with-thread)
AC_ARG_WITH(thread, [--with-thread[=DIRECTORY] make interpreter thread-safe], [
AC_ARG_WITH(thread, [--with-thread[=DIRECTORY] make interpreter thread-safe], [
AC_MSG_RESULT($withval)
if test -d "$withval"
if test -d "$withval"
then LIBS="$LIBS -L$withval"
then LIBS="$LIBS -L$withval"
fi
fi
...
@@ -173,14 +186,15 @@ LIBOBJS="$LIBOBJS thread.o"])
...
@@ -173,14 +186,15 @@ LIBOBJS="$LIBOBJS thread.o"])
AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lthread"
LIBS="$LIBS -lthread"
LIBOBJS="$LIBOBJS thread.o"])
LIBOBJS="$LIBOBJS thread.o"])
])
]
, AC_MSG_RESULT(no)
)
# -I${DLINCLDIR} is added to the compile rule for import.o
# -I${DLINCLDIR} is added to the compile rule for import.o
AC_SUBST(DLINCLDIR)
AC_SUBST(DLINCLDIR)
DLINCLDIR=/
DLINCLDIR=/
AC_CHECKING(for --with-sgi-dl)
AC_
MSG_
CHECKING(for --with-sgi-dl)
AC_ARG_WITH(sgi-dl, [--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking], [
AC_ARG_WITH(sgi-dl, [--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking], [
AC_MSG_RESULT($withval)
AC_DEFINE(WITH_SGI_DL)
AC_DEFINE(WITH_SGI_DL)
dldir=$withval
dldir=$withval
if test -d "$dldir"
if test -d "$dldir"
...
@@ -188,10 +202,11 @@ then LIBS="$LIBS -L$dldir"
...
@@ -188,10 +202,11 @@ then LIBS="$LIBS -L$dldir"
else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY)
else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY)
fi
fi
DLINCLDIR=${dldir}
DLINCLDIR=${dldir}
LIBS="$LIBS -ldl -lmld"])
LIBS="$LIBS -ldl -lmld"]
, AC_MSG_RESULT(no)
)
AC_CHECKING(for --with-dl-dld)
AC_
MSG_
CHECKING(for --with-dl-dld)
AC_ARG_WITH(dl-dld, [--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking], [
AC_ARG_WITH(dl-dld, [--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking], [
AC_MSG_RESULT($withval)
AC_DEFINE(WITH_DL_DLD)
AC_DEFINE(WITH_DL_DLD)
dldir=`echo "$withval" | sed 's/,.*//'`
dldir=`echo "$withval" | sed 's/,.*//'`
dlddir=`echo "$withval" | sed 's/.*,//'`
dlddir=`echo "$withval" | sed 's/.*,//'`
...
@@ -200,7 +215,7 @@ then LIBS="$LIBS -L$dldir -L$dlddir"
...
@@ -200,7 +215,7 @@ then LIBS="$LIBS -L$dldir -L$dlddir"
else AC_ERROR(proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY)
else AC_ERROR(proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY)
fi
fi
DLINCLDIR=${dldir}
DLINCLDIR=${dldir}
LIBS="$LIBS -ldl -ldld"])
LIBS="$LIBS -ldl -ldld"]
, AC_MSG_RESULT(no)
)
# checks for library functions
# checks for library functions
AC_CHECK_FUNCS(chown clock dlopen ftime ftruncate gethostname_r gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt symlink tcgetpgrp tcsetpgrp times truncate uname waitpid)
AC_CHECK_FUNCS(chown clock dlopen ftime ftruncate gethostname_r gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt symlink tcgetpgrp tcsetpgrp times truncate uname waitpid)
...
@@ -224,12 +239,14 @@ if test $ac_cv_header_time_altzone = yes; then
...
@@ -224,12 +239,14 @@ if test $ac_cv_header_time_altzone = yes; then
AC_DEFINE(HAVE_ALTZONE)
AC_DEFINE(HAVE_ALTZONE)
fi
fi
AC_CHECKING(whether sys/select.h and sys/time.h may both be included)
was_it_defined=no
AC_MSG_CHECKING(whether sys/select.h and sys/time.h may both be included)
AC_TRY_COMPILE([
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/types.h>
#include <sys/select.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/time.h>
], [;], [AC_DEFINE(SYS_SELECT_WITH_SYS_TIME)])
], [;], [AC_DEFINE(SYS_SELECT_WITH_SYS_TIME) was_it_defined=yes])
AC_MSG_RESULT($was_it_defined)
# checks for compiler characteristics
# checks for compiler characteristics
...
@@ -237,29 +254,41 @@ AC_C_CHAR_UNSIGNED
...
@@ -237,29 +254,41 @@ AC_C_CHAR_UNSIGNED
AC_C_CONST
AC_C_CONST
AC_CHECKING(for working volatile)
works=no
AC_TRY_COMPILE([],[volatile int x; x = 0;],,AC_DEFINE(volatile, []))
AC_MSG_CHECKING(for working volatile)
AC_TRY_COMPILE([],[volatile int x; x = 0;], works=yes, AC_DEFINE(volatile, []))
AC_MSG_RESULT($works)
AC_CHECKING(for working signed char)
works=no
AC_TRY_COMPILE([], [signed char c;],,AC_DEFINE(signed, []))
AC_MSG_CHECKING(for working signed char)
AC_TRY_COMPILE([], [signed char c;], works=yes, AC_DEFINE(signed, []))
AC_MSG_RESULT($works)
AC_CHECKING(for prototypes)
have_prototypes=no
AC_MSG_CHECKING(for prototypes)
AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],
AC_DEFINE(HAVE_PROTOTYPES) have_prototypes=yes)
AC_DEFINE(HAVE_PROTOTYPES) have_prototypes=yes)
AC_MSG_RESULT($have_prototypes)
AC_CHECKING(for variable length prototypes and stdarg.h)
works=no
AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
AC_TRY_COMPILE([
AC_TRY_COMPILE([
#include <stdarg.h>
#include <stdarg.h>
int foo(int x, ...) { return 0; }
int foo(int x, ...) { return 0; }
], [return foo(10, 11, 12);],
], [return foo(10, 11, 12);],
AC_DEFINE(HAVE_STDARG_PROTOTYPES))
AC_DEFINE(HAVE_STDARG_PROTOTYPES) works=yes)
AC_MSG_RESULT($works)
if test "$have_prototypes"; then
AC_CHECKING(for bad exec* prototypes)
if test "$have_prototypes" = yes; then
AC_TRY_COMPILE([#include <unistd.h>], [char **t;execve("@",t,t);], , AC_DEFINE(BAD_EXEC_PROTOTYPES))
bad_prototypes=no
AC_MSG_CHECKING(for bad exec* prototypes)
AC_TRY_COMPILE([#include <unistd.h>], [char **t;execve("@",t,t);], ,
AC_DEFINE(BAD_EXEC_PROTOTYPES) bad_prototypes=yes)
AC_MSG_RESULT($bad_prototypes)
fi
fi
AC_CHECKING(for bad static forward)
bad_forward=no
AC_MSG_CHECKING(for bad static forward)
AC_TRY_RUN([
AC_TRY_RUN([
struct s { int a; int b; };
struct s { int a; int b; };
static struct s foo;
static struct s foo;
...
@@ -272,16 +301,20 @@ static struct s foo = { 1, 2 };
...
@@ -272,16 +301,20 @@ static struct s foo = { 1, 2 };
main() {
main() {
exit(!((int)&foo == foobar()));
exit(!((int)&foo == foobar()));
}
}
], , AC_DEFINE(BAD_STATIC_FORWARD))
], , AC_DEFINE(BAD_STATIC_FORWARD) bad_forward=yes)
AC_MSG_RESULT($bad_forward)
AC_CHECKING(whether va_list is an array)
va_list_is_array=no
AC_MSG_CHECKING(whether va_list is an array)
AC_TRY_COMPILE([
AC_TRY_COMPILE([
#ifdef HAVE_STDARG_PROTOTYPES
#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
#include <stdarg.h>
#else
#else
#include <varargs.h>
#include <varargs.h>
#endif
#endif
], [va_list list1, list2; list1 = list2;], , AC_DEFINE(VA_LIST_IS_ARRAY))
], [va_list list1, list2; list1 = list2;], ,
AC_DEFINE(VA_LIST_IS_ARRAY) va_list_is_array=yes)
AC_MSG_RESULT($va_list_is_array)
# checks for system services
# checks for system services
# (none yet)
# (none yet)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment