X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.in;h=80be29a284a8fa5f453102c954dff065027d6d53;hb=2884da5b722f65467ca0e72d5eea3a6dbe8011d1;hp=8eecf2159eb39485079355192860f57a2794ce38;hpb=8e0fe80ede558a84618ee63adbf8f4292d67e3ee;p=ghc-hetmet.git diff --git a/configure.in b/configure.in index 8eecf21..80be29a 100644 --- a/configure.in +++ b/configure.in @@ -407,15 +407,27 @@ dnl -------------------------------------------------------------- dnl ** does #! work? AC_SYS_INTERPRETER() -dnl ** look for `perl', but watch out for version 4.035 -AC_PATH_PROG(PerlCmd,perl) -if test -z "$PerlCmd"; then - echo "You must install perl before you can continue" - echo "Perhaps it is already installed, but not in your PATH?" - exit 1 -else -FPTOOLS_CHECK_PERL_VERSION -fi +dnl ** look for `perl', but only in /bin on Windows +case $HostOS_CPP in +cygwin32|mingw32) + AC_CHECK_PROG(PerlCmd,perl,/bin/perl,,/bin) + if test -z "$PerlCmd"; then + echo "You must install the version of Perl shipped with GHC" + echo "(or a compatible one) in /bin." + exit 1 + fi + ;; +*) + AC_PATH_PROG(PerlCmd,perl) + if test -z "$PerlCmd"; then + echo "You must install perl before you can continue" + echo "Perhaps it is already installed, but not in your PATH?" + exit 1 + else + FPTOOLS_CHECK_PERL_VERSION + fi + ;; +esac dnl ** does #! path/to/perl work? (sometimes it's too long...) FPTOOLS_SHEBANG_PERL @@ -476,6 +488,9 @@ AC_PATH_PROGS(TarCmd,gtar tar,tar) dnl ** check for gzip/compress AC_PATH_PROGS(CompressCmd,gzip compress,gzip) +dnl ** check for jade/openjade +AC_PATH_PROGS(JadeCmd,openjade jade,jade) + compress_nm=`basename $CompressCmd` if test x"$compress_nm" = xgzip; then CompressCmd="$CompressCmd -d" @@ -504,7 +519,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 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 +696,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