Commit 70331ad0 authored by panne's avatar panne

[project @ 2000-04-21 18:05:19 by panne]

/tmp/msg
parent 624ff0c7
......@@ -81,6 +81,12 @@
/* Define if compiler supports prototypes. */
#define HAVE_PROTOTYPES 0
/* Define if readline/readline.h and readline/history.h exist */
#undef HAVE_READLINE_HEADERS
/* Define if readline plus any additional libs needed for it exist */
#undef HAVE_READLINE_LIBS
/* Define if time.h or sys/time.h define the timezone variable */
#undef HAVE_TIMEZONE
......@@ -90,9 +96,6 @@
/* Define if you support the production (and use) of Win32 DLLs. */
#undef HAVE_WIN32_DLL_SUPPORT
/* Define if you have and want to use readline in Hugs. */
#undef HAVE_LIBREADLINE
/* Define if C Symbols have a leading underscore added by the compiler */
#undef LEADING_UNDERSCORE
......
......@@ -504,7 +504,19 @@ dnl ** check for full ANSI header (.h) files
AC_HEADER_STDC
dnl ** check for specific header (.h) files that we are interested in
AC_CHECK_HEADERS(Files.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdint.h stdlib.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/limits.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netinet/tcp.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/vadvise.h sys/wait.h termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h readline/readline.h readline/history.h bfd.h winsock.h)
AC_CHECK_HEADERS(Files.h assert.h console.h ctype.h dirent.h errno.h fcntl.h float.h ftw.h grp.h ieee754.h malloc.h memory.h nlist.h pascal.h pwd.h sgtty.h siginfo.h signal.h stat.h stdint.h stdlib.h stdarg.h string.h sys/fault.h sys/file.h sys/ioctl.h sys/limits.h sys/mman.h sys/param.h sys/procfs.h sys/resource.h sys/signal.h sys/socket.h netinet/tcp.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/vadvise.h sys/wait.h termio.h termios.h time.h types.h unistd.h utime.h values.h vfork.h bfd.h winsock.h)
AC_CHECK_HEADER(readline/readline.h, HaveReadlineReadlineH=YES, HaveReadlineReadlineH=NO)
AC_CHECK_HEADER(readline/history.h, HaveReadlineHistoryH=YES, HaveReadlineHistoryH=NO)
if test $HaveReadlineReadlineH = YES && test $HaveReadlineHistoryH = YES ; then
HaveReadlineHeaders=YES
AC_DEFINE(HAVE_READLINE_HEADERS,1)
else
HaveReadlineHeaders=NO
AC_DEFINE(HAVE_READLINE_HEADERS,0)
fi
AC_SUBST(HaveReadlineHeaders)
dnl ** check for DOS include files
AC_CHECK_HEADERS(dos.h conio.h io.h std.h)
......@@ -669,22 +681,27 @@ dnl the order of these tests matters: bfd needs liberty
AC_CHECK_LIB(iberty, xmalloc)
AC_CHECK_LIB(bfd, bfd_init)
dnl ** check for readline, for Hugs
dnl termcap is obsoleted by ncurses, but for compatibility, we have to
dnl check for both...
AC_SEARCH_LIBS(tputs, [ncurses termcap])
AC_CHECK_LIB(readline, readline,
[
AC_DEFINE(HAVE_LIBREADLINE,1)
HaveLibReadline=YES
],
[
AC_DEFINE(HAVE_LIBREADLINE,0)
HaveLibReadline=NO
])
AC_SUBST(HaveLibReadline)
dnl ** check for readline, for Hugs and hslibs' Readline
dnl ncurses supersedes termcap and curses, but for compatibility,
dnl we have to check for all...
AC_CHECK_LIB(ncurses, tputs, HaveLibTermcap=YES; LibTermcap=ncurses,
AC_CHECK_LIB(termcap, tputs, HaveLibTermcap=YES; LibTermcap=termcap,
AC_CHECK_LIB(curses, tputs, HaveLibTermcap=YES; LibTermcap=curses,
HaveLibTermcap=NO; LibTermcap=not-installed)))
if test $HaveLibTermcap = YES ; then
LIBS="-l$LibTermcap $LIBS"
AC_CHECK_LIB(readline, readline, HaveLibReadline=YES, HaveLibReadline=NO)
fi
if test $HaveLibTermcap = YES && test x"$HaveLibReadline" = xYES ; then
AC_DEFINE(HAVE_READLINE_LIBS,1)
LibsReadline="-lreadline -l$LibTermcap"
else
AC_DEFINE(HAVE_READLINE_LIBS,0)
LibsReadline=
fi
AC_SUBST(LibsReadline)
dnl ################################################################
dnl Check for libraries
......
#-----------------------------------------------------------------------------
# $Id: Makefile,v 1.27 1999/11/25 10:38:59 simonpj Exp $
# $Id: Makefile,v 1.28 2000/04/21 18:05:19 panne Exp $
# We create two driver scripts:
# - one to run in-place in the build tree for building libraries
......@@ -53,7 +53,7 @@ SCRIPT_SUBST_VARS := \
GHC_LIB_DIR GHC_RUNTIME_DIR GHC_INCLUDE_DIR \
GHC_OPT_HILEV_ASM GhcWithNativeCodeGen LeadingUnderscore\
GHC_UNLIT GHC_HSCPP GHC_MKDEPENDHS GHC_HSC GHC_SYSMAN EnableWin32DLLs \
CP RM CONTEXT_DIFF LibGmp GhcWithRegisterised \
CP RM CONTEXT_DIFF LibGmp GhcWithRegisterised LibsReadline \
$(USER_WAY_NAMES) $(USER_WAY_OPTS)
#
......
......@@ -2650,7 +2650,7 @@ sub add_syslib {
, 'lang concurrent posix' # Syslib dependencies
, '' # extra ghc opts
, '' # extra cc opts
, '' # extra ld opts
, "$LibsReadline" # extra ld opts
],
win32,
......
# --------------------------------------------------------------------------- #
# $Id: Makefile,v 1.31 2000/04/14 15:11:25 sewardj Exp $ #
# $Id: Makefile,v 1.32 2000/04/21 18:05:19 panne Exp $ #
# --------------------------------------------------------------------------- #
TOP = ..
......@@ -19,12 +19,6 @@ DYN_EXT=.so
LIB_DL=-ldl
endif
ifeq "$(HaveLibReadline)$" "YES"
LIB_READLINE=-lreadline -ltermcap
else
LIB_READLINE=
endif
ifeq "$(HaveLibGmp)$" "YES"
LIB_GMP=-lgmp
else
......@@ -56,7 +50,7 @@ hugs: $(C_OBJS) ../rts/Sanity.o ../rts/Assembler.o ../rts/Disassembler.o \
../rts/StgCRun.o ../rts/PrimOps.o ../rts/Prelude.o ../rts/Storage.o \
../rts/Schedule.o ../rts/libHSrts.a
$(CC) -o $@ $(CC_OPTS) $^ $(GHC_LIBS_NEEDED) \
-lbfd -liberty $(LIB_READLINE) $(LIB_DL) \
-lbfd -liberty $(LibsReadline) $(LIB_DL) \
$(LIB_GMP) -lm
foobar:
......@@ -120,7 +114,7 @@ CLEAN_FILES += parser.c
INSTALL_LIBEXECS = hugs
depend :: $(LOOPS) $(SRCS_UGNHS)
depend :: parser.c $(LOOPS) $(SRCS_UGNHS)
include $(TOP)/mk/target.mk
......
......@@ -9,8 +9,8 @@
* included in the distribution.
*
* $RCSfile: input.c,v $
* $Revision: 1.27 $
* $Date: 2000/04/06 00:36:12 $
* $Revision: 1.28 $
* $Date: 2000/04/21 18:05:19 $
* ------------------------------------------------------------------------*/
#include "hugsbasictypes.h"
......@@ -31,7 +31,7 @@
#undef IN
#endif
#if HAVE_LIBREADLINE && HAVE_READLINE_READLINE_H && HAVE_READLINE_HISTORY_H
#if HAVE_READLINE_LIBS && HAVE_READLINE_HEADERS
#define USE_READLINE 1
#else
#define USE_READLINE 0
......
......@@ -132,6 +132,12 @@
/* Define if compiler supports prototypes. */
#define HAVE_PROTOTYPES 0
/* Define if readline/readline.h and readline/history.h exist */
#undef HAVE_READLINE_HEADERS
/* Define if readline plus any additional libs needed for it exist */
#undef HAVE_READLINE_LIBS
/* Define if time.h or sys/time.h define the timezone variable */
#undef HAVE_TIMEZONE
......@@ -141,9 +147,6 @@
/* Define if you support the production (and use) of Win32 DLLs. */
#undef HAVE_WIN32_DLL_SUPPORT
/* Define if you have and want to use readline in Hugs. */
#undef HAVE_LIBREADLINE
/* Define if C Symbols have a leading underscore added by the compiler */
#undef LEADING_UNDERSCORE
......@@ -389,12 +392,6 @@
/* Define if you have the <pwd.h> header file. */
#undef HAVE_PWD_H
/* Define if you have the <readline/history.h> header file. */
#undef HAVE_READLINE_HISTORY_H
/* Define if you have the <readline/readline.h> header file. */
#undef HAVE_READLINE_READLINE_H
/* Define if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
......@@ -413,6 +410,9 @@
/* Define if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
......
......@@ -269,13 +269,15 @@ GhcLibToolsHcOpts=-O
# Build the Haskell Readline bindings?
#
GhcLibsWithReadline=NO
#
GhcLibsWithReadline=@HaveReadlineHeaders@
# Libraries needed for linking with readline
LibsReadline=@LibsReadline@
# Include path to readline.h
# (no path == in standard include path)
#
ReadlineIncludePath=
HaveLibReadline=@HaveLibReadline@
################################################################################
#
......
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