Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
433c8ade
Kaydet (Commit)
433c8ade
authored
Agu 01, 1994
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merge alpha100 branch back to main trunk
üst
761c7a32
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
605 additions
and
68 deletions
+605
-68
Makefile.in
Makefile.in
+226
-28
README
README
+0
-0
TODO
TODO
+236
-17
configure.in
configure.in
+143
-23
No files found.
Makefile.in
Dosyayı görüntüle @
433c8ade
MAKE
=
make
########################################################################
# Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
# Amsterdam, The Netherlands.
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation, and that the names of Stichting Mathematisch
# Centrum or CWI not be used in advertising or publicity pertaining to
# distribution of the software without specific, written prior permission.
#
# STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
# FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
########################################################################
SUBDIRS
=
Parser Grammar Objects Python
SUBDIRSTOO
=
Include Extensions readline
DISTFILES
=
README Makefile configure configure.in
DIST
=
$(DISTFILES)
$(SUBDIRS)
$(SUBDIRSTOO)
# Toplevel Makefile for Python
# Note -- if recursive makes fail, try adding MAKE=make
all
:
config.status
# Substitutions by configure
srcdir
=
@srcdir@
VPATH
=
@srcdir@
INSTALL
=
@INSTALL@
# Install prefixes are treated specially by the configure script:
# it only changes these lines if it has received a --prefix=... or
# --exec-prefix-... command line option, or if it has figured out
# a value by searching for python in $PATH. Note that $(prefix) is
# also used when compiling config.c in Modules to set the default
# module search path, so if you change it later be sure to change it
# there too and rebuild.
# Install prefix for architecture-independent files
prefix
=
/usr/local
# Install prefix for architecture-dependent files
exec_prefix
=
$(prefix)
# Programs
SHELL
=
/bin/sh
# --with-PACKAGE options for configure script
# e.g. --with-readline --with-svr5 --with-solaris --with-thread
# (see README for an explanation)
WITH
=
# Compiler options passed to subordinate makes
OPT
=
-O
# Subdirectories where to run make recursively
SUBDIRS
=
Parser Objects Python Modules
# Other subdirectories
SUBDIRSTOO
=
Include Lib Doc Misc Demo readline Grammar
# Files and directories to be distributed
CONFIGFILES
=
configure configure.in acconfig.h config.h.in Makefile.in
DISTFILES
=
README ChangeLog
$(CONFIGFILES)
DISTDIRS
=
$(SUBDIRS)
$(SUBDIRSTOO)
Ext-dummy
DIST
=
$(DISTFILES)
$(DISTDIRS)
# Default target
all
:
python
# Build the interpreter
python
:
Makefiles
for
i
in
$(SUBDIRS)
;
do
\
(
echo
$$
i
;
cd
$$
i
;
$(MAKE)
OPT
=
"
$(OPT)
"
all
)
;
\
done
# Test the interpreter (twice, once without .pyc files, once with)
TESTPATH
=
$(srcdir)
/Lib:
$(srcdir)
/Lib/test
test
:
python
-
rm
-f
$(srcdir)
/Lib/test/
*
.pyc
PYTHONPATH
=
$(TESTPATH)
./python
-c
'import autotest'
PYTHONPATH
=
$(TESTPATH)
./python
-c
'import autotest'
# Install the interpreter
install
:
python
$(INSTALL)
python
$(exec_prefix)
/bin/python
@
echo
If this is your first
time
, consider make libinstall...
# Install the library.
# If your system does not support "cp -r", try "copy -r" or perhaps
# something like find Lib -print | cpio -pacvdmu $(DESTDIR)/lib/python
libinstall
:
-
if
test
!
-d
$(prefix)
/lib/python
;
\
then
mkdir
$(prefix)
/lib/python
;
\
fi
cp
-r
$(srcdir)
/Lib/
*
$(prefix)
/lib/python
@
echo
Ideally, run something to compile all modules now...
# install the manual page
maninstall
:
$(INSTALL)
$(srcdir)
/Misc/python.man
\
$(prefix)
/man/man1/python.1
# install the include files
INCLUDEPY
=
$(prefix)
/include/Py
inclinstall
:
-
if
test
!
-d
$(INCLUDEPY)
;
\
then
mkdir
$(INCLUDEPY)
;
\
fi
cp
$(srcdir)
/Include/
*
.h
$(INCLUDEPY)
# install the lib*.a files and miscellaneous stuff needed by extensions
LIBP
=
$(exec_prefix)
/lib/python
LIBPL
=
$(LIBP)
/lib
libainstall
:
all
-
if
test
!
-d
$(LIBP)
;
\
then
mkdir
$(LIBP)
;
\
fi
-
if
test
!
-d
$(LIBPL)
;
\
then
mkdir
$(LIBPL)
;
\
fi
for
i
in
$(SUBDIRS)
;
do
\
(
echo
$$
i
;
cd
$$
i
;
$(MAKE)
all
)
;
\
echo
$$
i
;
$(INSTALL)
$$
i/lib
$$
i.a
$(LIBPL)
/lib
$$
i.a
;
\
done
$(INSTALL)
Modules/config.c
$(LIBPL)
/config.c
$(INSTALL)
$(srcdir)
/Modules/config.c.in
$(LIBPL)
/config.c.in
$(INSTALL)
Modules/Makefile
$(LIBPL)
/Makefile
$(INSTALL)
Modules/Setup
$(LIBPL)
/Setup
$(INSTALL)
$(srcdir)
/Modules/makesetup
$(LIBPL)
/makesetup
$(INSTALL)
config.h
$(LIBPL)
/config.h
$(INSTALL)
$(srcdir)
/Python/frozenmain.c
$(LIBPL)
/frozenmain.c
# Build the sub-Makefiles
Makefiles
:
config.status
(
cd
Modules
;
$(MAKE)
-f
Makefile.pre Makefile
)
for
i
in
.
$(SUBDIRS)
;
do
\
(
echo
$$
i
;
cd
$$
i
;
$(MAKE)
Makefile
)
;
\
done
tags
:
ctags -t Parser/*.[ch] Objects/*.[ch] Python/*.[ch] Include/*.h
# Build the toplevel Makefile
Makefile
:
Makefile.in config.status
CONFIG_FILES
=
Makefile
CONFIG_HEADERS
=
$(SHELL)
config.status
# Run the configure script. If config.status already exists,
# call it with the --recheck argument, which reruns configure with the
# same options as it was run last time; otherwise run the configure
# script with options taken from the $(WITH) variable
config.status
:
$(srcdir)/configure
if
test
-f
config.status
;
\
then
$(SHELL)
config.status
--recheck
;
\
else
$(SHELL)
$(srcdir)
/configure
$(WITH)
;
\
fi
.PRECIOUS
:
config.status python
TAGS
:
etags -t Parser/*.[ch] Objects/*.[ch] Python/*.[ch] Include/*.h
# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
recheck
:
$(SHELL)
config.status
--recheck
# Rebuild the configure script from configure.in; also rebuild config.h.in
autoconf
:
(
cd
$(srcdir)
;
autoconf
;
autoheader
)
# Create a tags file for vi
tags
::
ctags
-w
-t
Include/
*
.h
for
i
in
$(SUBDIRS)
;
do
ctags
-w
-t
-a
$$
i/
*
.[ch]
;
done
sort
tags
-o
tags
# Create a tags file for GNU Emacs
TAGS
::
etags
-t
Include/
*
.h
for
i
in
$(SUBDIRS)
;
do
etags
-t
-a
$$
i/
*
.[ch]
;
done
# Add dependencies to sub-Makefiles
depend
:
for
i
in
$(SUBDIRS)
;
do
\
(
echo
$$
i
;
cd
$$
i
;
$(MAKE)
depend
)
;
\
done
# Sanitation targets -- clean leaves libraries, executables and tags
# files, which clobber removes those as well
localclean
:
-
rm
-f
core
*
~
[
@,#]
*
*
.old
*
.orig
*
.rej
-
(
cd
Include
;
rm
-f
core
*
~
[
@,#]
*
*
.old
*
.orig
*
.rej
)
clean
:
localclean
-
for
i
in
$(SUBDIRS)
;
do
\
(
echo
$$
i
;
cd
$$
i
;
$(MAKE)
clean
)
;
\
(
echo
$$
i
;
cd
$$
i
;
\
if
test
-f
Makefile
;
\
then
$(MAKE)
clean
;
\
else
$(MAKE)
-f
Makefile.
*in
clean
;
\
fi
)
;
\
done
localclobber
:
localclean
-
rm
-f
tags TAGS
config.status
-
rm
-f
tags TAGS
python
clobber
:
localclobber
-
for
i
in
$(SUBDIRS)
;
do
\
(
echo
$$
i
;
cd
$$
i
;
$(MAKE)
clobber
)
;
\
(
echo
$$
i
;
cd
$$
i
;
\
if
test
-f
Makefile
;
\
then
$(MAKE)
clobber
;
\
else
$(MAKE)
-f
Makefile.in clobber
;
\
fi
)
;
\
done
# Make things extra clean, before making a distribution
distclean
:
clobber
-
for
i
in
$(SUBDIRS)
;
do
\
if
test
-f
$$
i/Makefile.in
;
then
\
rm
-f
$$
i/Makefile
;
\
fi
;
\
-
$(MAKE)
SUBDIRS
=
"
$(SUBDIRSTOO)
"
clobber
-
rm
-f
config.status config.h Makefile
-
for
i
in
$(SUBDIRS)
$(SUBDIRSTOO)
;
do
\
for
f
in
$$
i/
*
.in
;
do
\
f
=
`
basename
"
$$
f"
.in
`
;
\
if
test
"
$$
f"
!=
"*"
;
then
\
echo rm
-f
"
$$
i/
$$
f"
;
\
rm
-f
"
$$
i/
$$
f"
;
\
fi
;
\
done
;
\
done
Makefiles
:
config.status
./config.status
config.status
:
configure
./configure
configure
:
configure.in
autoconf
tar
:
dist.tar.Z
# Find files with funny names
find
:
find
$(DISTDIRS)
-type
d
\
-o
-name
'*.[chs]'
\
-o
-name
'*.py'
\
-o
-name
'*.doc'
\
-o
-name
'*.sty'
\
-o
-name
'*.bib'
\
-o
-name
'*.dat'
\
-o
-name
'*.el'
\
-o
-name
'*.fd'
\
-o
-name
'*.in'
\
-o
-name
'*.tex'
\
-o
-name
'*,[vpt]'
\
-o
-name
'Setup'
\
-o
-name
'Setup.*'
\
-o
-name
README
\
-o
-name
Makefile
\
-o
-name
ChangeLog
\
-o
-name
RCS
\
-o
-name
Repository
\
-o
-name
Entries
\
-o
-name
Tag
\
-o
-name
tags
\
-o
-name
TAGS
\
-o
-name
.cvsignore
\
-o
-name
MANIFEST
\
-o
-print
dist.tar.Z
:
$(DIST)
# Build a distribution tar file (run make distclean first)
# (This leaves the RCS and CVS directories in :-( )
tar
:
tar
cf -
$(DIST)
| compress
>
dist.tar.Z
README
Dosyayı görüntüle @
433c8ade
This diff is collapsed.
Click to expand it.
TODO
Dosyayı görüntüle @
433c8ade
CVS committal...
renaming project? (promised but not even started yet!)
better way to specify PYTHONPATH
improve 'install' targets in toplevel Makefile
Add Demo directory again
Add NEWS and HISTORY to Misc directory
fix compilation warnings
non-Sun dynamic linking (SGI 4 dl, and dl-dld elsewhere)
put some stuff into Contrib dir
make freeze script working again (use Extensions/mkext.py as a base?)
write porting guide
update documentation (especially ext.tex!)
test set?
.
.
.
release!
(*) int*int overflow check shouldn't doubles on alpha (cf. John Tromp's mail)
(*) add signal.alarm()
(*) when abort()ing because of unexpected exception, print a message
first (Jack)
----------------------------------------------------------------------
(from BUGS1.0.1)
----------------------------------------------------------------------
document addpack, urllib, ...
(*) import.c from JaapV
document os.exec*
name sunaudiodevmodule.c is too long
(*) play with / include SUIT interface
make regsub.[g]sub() optionally case insensitive
handle printing of errors in lines containing multiline strings
======================================================================
(*) ought to use features from autoconf 1.8
(*) errors in __repr__() are handled wrong when called from format
- long(0x80000000) has wrong value!
- hex(0x80000000) shouldn't have sign (?)
(*) need way to set buffering at file open time
(*) need way to force stdout unbuffered
- document new modules (builtin as well as Lib)
- restart CVS tree
(?) build shared libs for SunOS 4.1.3
- Mac X... code resources as shared libs?
(*) X patches from Adrian Phillips
(*) Jaap's freeze script
Incorporate with contrib status:
- additions to glmodule by rg3h
(*) Jaap's posixfile module (with locking)
(*) pthreads interface
Later:
- put the offending object in IOError and posix.error
- make module marshal work with user-defined file-like objects
- built-in help?
- hierarchical module names?
Big plans:
- allow separate interpreters (a la Xt's Applocation Contexts, and Tcl)
- great renaming
- complete reflexive nature of the language, e.g. have interfaces et
create any kind of object
(*) GUI interface a la Tk
======================================================================
For FAQ:
(*) why don't strings (numbers, tuples, ...) have methods / attributes
(*) why are strings / numbers / tuples immutable
why don't list methods return self
======================================================================
PM/TODO list after Egypt (from mailing list):
make .pyc files executable (how?)
thread status and improvements (lock stmt; signal/wait)
optional optimizations
pthread migration
(*) test/incorporate new SUIT
shorten excessively long filenames (sunaudiodevmodule.c)
(*) default parameter values
multiple interpreter objects
(*) import shlib bug (irix5.2) (reload, dlclose)
(*) addpack.py
(*) newmodule.c (or other hacks to create new modules, classes, functions
etc. from their components)
persistency
new Dbhash.py, dbhash library
reraise; or raise 3rd param for traceback?
-or- except type, value, tbackobjec
redesign exceptions from scratch?
dbm objects miss items(), values() methods
(*) jar's new profile
answer q about coerce()
(*) reconsider pass [expression] ??? -or- don't print non-interactive
exprs -or- option to suppress printing non-None expressions
(*) should be able to hash code objs (add fns to convert between lists/tuples)
describe() ?
distribute demo2 with Holmes
(*) re-reply on try-continue
classes are too slow
add += etc. ?
optimize tuple = tuple
allow (a, b) = [1, 2] and [1, 2] = (1, 2) ???
wustl is not un the northwest of the US?
(*) MPW doesn't like \000 in string literals?
MPW patches, unixemu patches
prepare tar files with
- mac think projects (*)
- mpw makefiles
- dos makefiles
- mac unixemu lib
explain rules about == vs. 'is' for strings (* by others on the list)
(*) bug in ceval.c DELETE_FAST
(*) possible optimize LOAD_NAME -> LOAD_GLOBAL
get dos python with suit (inesc)
(*) docs for try/continue are wrong and unclear
better hashing fn?
(*) add improved nested indent to python-mode.el
(*) add a section to tutorial on "new" features
rewrite section on formatting in tutorial
======================================================================
TODO-TOO list:
test for overflow when converting python long to float
lift restrictions on tuple or list in many cases
(*) allow long ints with sensible values for getargs "i"
(*) multiline string literals
what to do about 64-bit int literals (on 64-bit machines) in .pyc
files? (Currently truncated w/o warning!)
DOCUMENTATION UPDATE! E.g. ref.tex doesn't describe:
(*) - line joins w/o backslash
(*) - double-quoted strings; \" in strings
- more?
Should double-check all changes with docs!
(?) Interrupting output still sometimes doesn't call clearerr() properly
sometimes ghost errors when interrupting during debugging in
'continue' mode?
typing a comment to a primary prompt shouldn't issue a secondary prompt
readline: add hooks to recognize Python syntax and to expand Python
commands and names
should have absolute pathnames in function objects
in general check that all the exceptions are modernized and that the
messages aren't giving the same error twice (e.g., stdwinmodule.c!)
- check read/write allowed for file objects
- introduce macros to set/inspect errno for syscalls, to support things
like getoserr()
======================================================================
DOS/Windows Python
(???) command line options?
(*) os.system()
(???) interrupts
(???) wrap
(*) pc module
(*) dospath.py
DOS/Windows Python -- TO DO
(*) memtest from config.h
(*) copy sources back
(*) build DOS version
(*) distribute 386 version
(*) Mac 1.0.1 release?
======================================================================
configure.in
Dosyayı görüntüle @
433c8ade
dnl Process this file with autoconf to produce a configure script.
dnl Process this file with autoconf 1.8 or later to produce a configure script.
AC_REVISION($Revision$)dnl
AC_PREREQ(1.8)dnl
AC_INIT(Include/object.h)
AC_PREFIX(python)
AC_CONFIG_HEADER(config.h)dnl
# Don't suppress compiler output when --verbose is specified
test -n "$verbose" &&
ac_compile=`echo "$ac_compile" | sed "s|>/dev/null 2>&1||"`
AC_VERBOSE(setting ac_compile to '$ac_compile')
# checks for alternative programs
AC_CHECKING(for --with(out)-gcc)
AC_WITH(gcc, [
case $withval in
no) withval=cc;;
yes) withval=gcc;;
esac
CC=$withval])
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_SUBST(AR)
AC_PROGRAMS_CHECK(AR, ar aal, ar)
# checks for UNIX variants that set C preprocessor variables
AC_AIX
...
...
@@ -12,14 +29,21 @@ AC_ISC_POSIX
AC_MINIX
dnl DYNIX test runs compile so must be last
AC_DYNIX_SEQ
AC_CHECKING(for NeXT)
AC_TEST_PROGRAM([
#ifdef _NEXT_SOURCE
main() { exit(0); }
#endif
], AC_DEFINE(_POSIX_SOURCE))
# checks for header files
AC_STDC_HEADERS
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)
AC_HAVE_HEADERS(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)
AC_DIR_HEADER
# checks for typedefs
AC_GETGROUPS_T
AC_CHECKING(for clock_t in time.h)
AC_HEADER_EGREP(clock_t, time.h, , AC_DEFINE(clock_t, long))
AC_MODE_T
AC_OFF_T
AC_PID_T
...
...
@@ -29,43 +53,124 @@ AC_UID_T
# checks for libraries
AC_HAVE_LIBRARY(dl)
LIBS="${LIBS} -L${READLINESRC-${PWD-${CWD-`pwd`}}/readline}"
AC_HAVE_LIBRARY(readline)
if test -n "${have_lib}"; then
AC_HAVE_LIBRARY(termcap)
AC_CHECKING(for --with-svr4)
AC_WITH(svr4, [
AC_HAVE_LIBRARY(socket)
AC_HAVE_LIBRARY(inet)
AC_HAVE_LIBRARY(nsl)
])
AC_CHECKING(for --with-readline)
AC_WITH(readline, [AC_DEFINE(WITH_READLINE)
if test -d "$withval"
then LIBS="$LIBS -L$withval"
else AC_ERROR(proper usage is --with-readline=DIRECTORY)
fi
termcap=
AC_HAVE_LIBRARY(termcap, [termcap=termcap], [AC_HAVE_LIBRARY(termlib, [termcap=termlib])])
if test ! -z "$termcap"
then LIBS="$LIBS -lreadline"
# Avoid possible conflict between shared libraries termcap and gl
# on IRIX 5: both contain a routine called clear.
if test -f /usr/lib/lib$termcap.a
then LIBS="$LIBS /usr/lib/lib$termcap.a"
else LIBS="$LIBS -l$termcap"
fi
else AC_ERROR(no working termcap/termlib, do not use --with-readline)
fi])
# Check for IRIX or SOLARIS thread interface
AC_HAVE_LIBRARY(mpc)
if test -n "${have_lib}"; then
DEFS="${DEFS} -DUSE_THREAD"
LIBOBJS="${LIBOBJS} thread.o"
AC_CHECKING(for --with-thread)
AC_WITH(thread, [
if test -d "$withval"
then LIBS="$LIBS -L$withval"
fi
AC_HAVE_LIBRARY(pthreads, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lpthreads"
LIBOBJS="$LIBOBJS thread.o"])
AC_HAVE_LIBRARY(mpc, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lmpc"
LIBOBJS="$LIBOBJS thread.o"])
AC_HAVE_LIBRARY(thread, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lthread"
LIBOBJS="$LIBOBJS thread.o"])
])
# -I${DLINCLDIR} is added to the compile rule for import.o
AC_SUBST(DLINCLDIR)
DLINCLDIR=/
AC_HAVE_LIBRARY(thread)
if test -n "${have_lib}"; then
DEFS="${DEFS} -DUSE_THREAD"
LIBOBJS="${LIBOBJS} thread.o"
AC_CHECKING(for --with-sgi-dl)
AC_WITH(sgi-dl, [AC_DEFINE(WITH_SGI_DL)
dldir=$withval
if test -d "$dldir"
then LIBS="$LIBS -L$dldir"
else AC_ERROR(proper usage is --with-sgi-dl=DIRECTORY)
fi
DLINCLDIR=${dldir}
LIBS="$LIBS -ldl -lmld"])
AC_CHECKING(for --with-dl-dld)
AC_WITH(dl-dld, [AC_DEFINE(WITH_DL_DLD)
dldir=`echo "$withval" | sed 's/,.*//'`
dlddir=`echo "$withval" | sed 's/.*,//'`
if test -d "$dldir" -a -d "$dlddir"
then LIBS="$LIBS -L$dldir -L$dlddir"
else AC_ERROR(proper usage is --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY)
fi
DLINCLDIR=${dldir}
LIBS="$LIBS -ldl -ldld"])
# checks for library functions
AC_HAVE_FUNCS(c
lock ftime gettimeofday getpgrp getwd lstat readlink readline select setsid setpgid setpgrp
siginterrupt symlink tcgetpgrp tcsetpgrp times uname waitpid)
AC_REPLACE_FUNCS(dup2 getcwd strerror
strtoul strtod
memmove)
AC_HAVE_FUNCS(c
hown 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)
AC_REPLACE_FUNCS(dup2 getcwd strerror memmove)
AC_FUNC_CHECK(getpgrp, AC_COMPILE_CHECK([argument to getpgrp], [#include <unistd.h>], [getpgrp(0);], AC_DEFINE(GETPGRP_HAVE_ARG)))
# checks for structures
AC_TIME_WITH_SYS_TIME
AC_STRUCT_TM
AC_TIMEZONE
AC_COMPILE_CHECK([whether we have altzone], [#include <time.h>], [return altzone;], AC_DEFINE(HAVE_ALTZONE))
AC_COMPILE_CHECK([whether sys/select.h and sys/time.h may both be included], [
#include <sys/types.h>
#include <sys/select.h>
#include <sys/time.h>
], [;], [AC_DEFINE(SYS_SELECT_WITH_SYS_TIME)])
# checks for compiler characteristics
AC_CHAR_UNSIGNED
AC_CONST
echo checking for prototypes
AC_TEST_PROGRAM([int foo(int x){return 0;} int main(){return foo(10);}], AC_DEFINE(HAVE_PROTOTYPES) have_prototypes=1)
AC_COMPILE_CHECK([wheter we have signed char], [], [signed char c;], [], AC_DEFINE(signed, []))
AC_CHECKING(for prototypes)
AC_TEST_PROGRAM([
int foo(int x) { return 0; }
int main() { return foo(10); }
], AC_DEFINE(HAVE_PROTOTYPES) have_prototypes=1)
AC_CHECKING(for variable length prototypes and stdarg.h)
AC_TEST_PROGRAM([
#include <stdarg.h>
int foo(int x, ...) { return 0; }
int main() { return foo(10, 11, 12); }
], AC_DEFINE(HAVE_STDARG_PROTOTYPES) have_prototypes=1)
if test "$have_prototypes"; then
AC_COMPILE_CHECK(["bad exec* prototypes"], [#include <unistd.h>], [char *
const
*t;execve("@",t,t);], , AC_DEFINE(BAD_EXEC_PROTOTYPES))
AC_COMPILE_CHECK(["bad exec* prototypes"], [#include <unistd.h>], [char **t;execve("@",t,t);], , AC_DEFINE(BAD_EXEC_PROTOTYPES))
fi
AC_CHECKING(for bad static forward)
AC_TEST_PROGRAM([
struct s { int a; int b; };
static struct s foo;
int foobar() { return !foo.a; }
static struct s foo = { 1, 2 };
main() { exit(foobar()); }
], , AC_DEFINE(BAD_STATIC_FORWARD))
# checks for system services
# (none yet)
...
...
@@ -73,5 +178,20 @@ fi
AC_IRIX_SUN
AC_XENIX_DIR
# check for --with-libm=...
AC_SUBST(LIBM)
LIBM=-lm
AC_WITH(libm, [if test "$withval" != yes
then LIBM=$withval
else AC_ERROR(proper usage is --with-libm=STRING)
fi])
# check for --with-libc=...
AC_SUBST(LIBC)
AC_WITH(libc, [if test "$withval" != yes
then LIBC=$withval
else AC_ERROR(proper usage is --with-libc=STRING)
fi])
# generate output files
AC_OUTPUT(
Objects/Makefile Parser/Makefile Python/Makefil
e)
AC_OUTPUT(
Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pr
e)
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