Commit a2ef3836 authored by Guido van Rossum's avatar Guido van Rossum

Split some long lines (headers, functions).

Rework --with-readline and --with-thread.
parent 1a535600
...@@ -58,7 +58,10 @@ AC_MINIX ...@@ -58,7 +58,10 @@ AC_MINIX
# checks for header files # checks for header files
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h ncurses.h signal.h stdarg.h stddef.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 sys/wait.h) AC_CHECK_HEADERS(dlfcn.h fcntl.h limits.h ncurses.h \
signal.h stdarg.h stddef.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 sys/wait.h)
AC_HEADER_DIRENT AC_HEADER_DIRENT
# checks for typedefs # checks for typedefs
...@@ -175,25 +178,27 @@ fi ...@@ -175,25 +178,27 @@ fi
# XXX need to check whether libreadline.a actually exists there! # XXX need to check whether libreadline.a actually exists there!
# XXX Also, on some systems, it's libreadline.so... # XXX Also, on some systems, it's libreadline.so...
AC_MSG_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] use GNU readline library], [
AC_MSG_RESULT($withval) 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 LIBS="$LIBS -L$withval"
fi fi
termcap= termcap=
AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [ AC_CHECK_LIB(termcap, tgetent, [termcap=termcap], [
AC_CHECK_LIB(termlib, tgetent, [termcap=termlib])]) AC_CHECK_LIB(termlib, tgetent, [termcap=termlib], [
if test ! -z "$termcap" AC_ERROR(no working termcap/termlib -- do not use --with-readline)])])
then LIBS="$LIBS $withval/libreadline.a" AC_CHECK_LIB(readline, readline, [
# Avoid possible conflict between shared libraries termcap and gl LIBS="$LIBS -lreadline"
# on IRIX 5: both contain a routine called clear. # Avoid possible conflict between shared libraries termcap and gl
if test -f /usr/lib/lib$termcap.a # on IRIX 5: both contain a routine called clear.
then LIBS="$LIBS /usr/lib/lib$termcap.a" if test -f /usr/lib/lib$termcap.a
else LIBS="$LIBS -l$termcap" then LIBS="$LIBS /usr/lib/lib$termcap.a"
fi else LIBS="$LIBS -l$termcap"
else AC_ERROR(no working termcap/termlib, do not use --with-readline) fi
fi], AC_MSG_RESULT(no)) ], [AC_ERROR(no working GNU readline -- do not use --with-readline)],
-l$termcap)],
AC_MSG_RESULT(no))
AC_MSG_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], [
...@@ -204,7 +209,12 @@ fi ...@@ -204,7 +209,12 @@ fi
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD) AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS) AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lpthreads" LIBS="$LIBS -lpthreads"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lpthread"
LIBOBJS="$LIBOBJS thread.o"]) LIBOBJS="$LIBOBJS thread.o"])
])
AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD) AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lmpc" LIBS="$LIBS -lmpc"
LIBOBJS="$LIBOBJS thread.o"]) LIBOBJS="$LIBOBJS thread.o"])
...@@ -243,7 +253,7 @@ DLINCLDIR=${dldir} ...@@ -243,7 +253,7 @@ DLINCLDIR=${dldir}
LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no)) LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no))
# checks for library functions # checks for library functions
AC_CHECK_FUNCS(chown clock dlopen ftime ftruncate \ AC_CHECK_FUNCS(chown clock dlopen flock ftime ftruncate \
gethostname_r getpeername getpgrp getpid gettimeofday getwd \ gethostname_r getpeername getpgrp getpid gettimeofday getwd \
link lstat mkfifo nice readlink \ link lstat mkfifo nice readlink \
select setgid setuid setsid setpgid setpgrp setvbuf \ select setgid setuid setsid setpgid setpgrp setvbuf \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment