summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-12-20 21:27:22 (GMT)
committerGuido van Rossum <guido@python.org>1999-12-20 21:27:22 (GMT)
commite97ee18115fdb566e4146dad99597515f5fd1a8e (patch)
treebc0c267fe770105f25abf483582cfd4669e36e05 /configure.in
parent6f13e9abc9fb895dd0c8e8bf70c2eef16067b5b5 (diff)
downloadcpython-e97ee18115fdb566e4146dad99597515f5fd1a8e.zip
cpython-e97ee18115fdb566e4146dad99597515f5fd1a8e.tar.gz
cpython-e97ee18115fdb566e4146dad99597515f5fd1a8e.tar.bz2
Changes to auto-detect the correct dynload_<platform>.c file.
NOTE: Windows, Mac and OS/2 build procedures must be adapted manually! This is part of a set of patches by Greg Stein.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in33
1 files changed, 33 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 1e6a182..83bf596 100644
--- a/configure.in
+++ b/configure.in
@@ -691,6 +691,7 @@ AC_MSG_CHECKING(for --with-sgi-dl)
AC_ARG_WITH(sgi-dl, [--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking], [
AC_MSG_RESULT($withval)
AC_DEFINE(WITH_SGI_DL)
+DYNLOADFILE="dynload_dl.o"
dldir=$withval
if test -d "$dldir"
then LDFLAGS="$LDFLAGS -L$dldir"
@@ -703,6 +704,7 @@ AC_MSG_CHECKING(for --with-dl-dld)
AC_ARG_WITH(dl-dld, [--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking], [
AC_MSG_RESULT($withval)
AC_DEFINE(WITH_DL_DLD)
+DYNLOADFILE="dynload_dl.o"
dldir=`echo "$withval" | sed 's/,.*//'`
dlddir=`echo "$withval" | sed 's/.*,//'`
if test -d "$dldir" -a -d "$dlddir"
@@ -712,6 +714,37 @@ fi
DLINCLDIR=${dldir}
LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no))
+# the dlopen() function means we might want to use dynload_shlib.o. some
+# platforms, such as AIX, have dlopen(), but don't want to use it.
+AC_CHECK_FUNC(dlopen)
+
+# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
+# loading of modules.
+AC_SUBST(DYNLOADFILE)
+AC_MSG_CHECKING(DYNLOADFILE)
+if test -z "$DYNLOADFILE"
+then
+ case $ac_sys_system/$ac_sys_release in
+ AIX*) DYNLOADFILE="dynload_aix.o";;
+ BeOS*) DYNLOADFILE="dynload_beos.o";;
+ hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
+ next/*) DYNLOADFILE="dynload_next.o";;
+ *)
+ # use dynload_shlib.c and dlopen() if we have it; otherwise stub
+ # out any dynamic loading
+ if test "$ac_cv_func_dlopen" = yes
+ then DYNLOADFILE="dynload_shlib.o"
+ else DYNLOADFILE="dynload_stub.o"
+ fi
+ ;;
+ esac
+fi
+AC_MSG_RESULT($DYNLOADFILE)
+if test "$DYNLOADFILE" != "dynload_stub.o"
+then
+ AC_DEFINE(HAVE_DYNAMIC_LOADING)
+fi
+
# checks for library functions
AC_CHECK_FUNCS(alarm chown clock confstr ctermid ctermid_r dlopen execv \
flock fork fsync fdatasync fpathconf ftime ftruncate \