diff options
author | Guido van Rossum <guido@python.org> | 1999-01-07 21:50:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-01-07 21:50:41 (GMT) |
commit | df69365f5f6676b6990d1eb6723e264f15f70d49 (patch) | |
tree | c72045669015a21e9a71acd00328d080a2b7f78f /configure.in | |
parent | 257fd514a365c8b315540d889eec2156b1c86418 (diff) | |
download | cpython-df69365f5f6676b6990d1eb6723e264f15f70d49.zip cpython-df69365f5f6676b6990d1eb6723e264f15f70d49.tar.gz cpython-df69365f5f6676b6990d1eb6723e264f15f70d49.tar.bz2 |
Ty Sarna writes:
The following patches (relative to 1.5.2b1) enable Python dynamic
loading to work on NetBSD platforms that use ELF (presnetly mips and
alpha systems). They automaticly determine wether the system is ELF or
a.out rather than using astatic list of platforms so that when other
NetBSD platforms move to ELF, python will continue to work without
change.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/configure.in b/configure.in index d73c11b..0ff6717 100644 --- a/configure.in +++ b/configure.in @@ -359,7 +359,14 @@ then Linux*) LDSHARED="gcc -shared";; dgux*) LDSHARED="ld -G";; FreeBSD*/3*) LDSHARED="gcc -shared";; - FreeBSD*|NetBSD*|OpenBSD*) LDSHARED="ld -Bshareable";; + FreeBSD*|OpenBSD*) LDSHARED="ld -Bshareable";; + NetBSD*) + if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]] + then + LDSHARED="cc -shared" + else + LDSHARED="ld -Bshareable" + fi;; SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";; *) LDSHARED="ld";; esac @@ -376,7 +383,8 @@ then else CCSHARED="+z"; fi;; Linux*) CCSHARED="-fpic";; - FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fpic";; + FreeBSD*|OpenBSD*) CCSHARED="-fpic";; + NetBSD*) CCSHARED="-fPIC";; SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";; IRIX*/6*) case $CC in *gcc*) CCSHARED="-shared";; @@ -398,6 +406,11 @@ then Linux*) LINKFORSHARED="-Xlinker -export-dynamic";; next/*) LINKFORSHARED="-u libsys_s";; SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";; + NetBSD*) + if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]] + then + LINKFORSHARED="-Wl,--export-dynamic" + fi;; SunOS/5*) case $CC in *gcc*) if $CC -Xlinker -V 2>/dev/null | grep BFD >/dev/null @@ -537,7 +550,8 @@ DLINCLDIR=${dldir} LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no)) # checks for library functions -AC_CHECK_FUNCS(alarm chown clock dlopen execv flock fork ftime ftruncate \ +AC_CHECK_FUNCS(alarm chown clock dlopen execv flock fork \ + fsync fdatasync ftime ftruncate \ gethostname_r getpeername getpgrp getpid getpwent gettimeofday getwd \ kill link lstat mkfifo mktime nice pause plock pthread_init putenv readlink \ select setgid setlocale setuid setsid setpgid setpgrp setvbuf \ |