~ubuntu-branches/ubuntu/quantal/orpie/quantal

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Uwe Steinmann
  • Date: 2004-09-20 14:18:45 UTC
  • Revision ID: james.westby@ubuntu.com-20040920141845-j092sbrg4hd0nfsf
Tags: upstream-1.4.1
ImportĀ upstreamĀ versionĀ 1.4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Available from the GNU Autoconf Macro Archive at:
 
2
dnl http://www.gnu.org/software/ac-archive/htmldoc/mp_with_curses.html
 
3
dnl
 
4
AC_DEFUN([MP_WITH_CURSES],
 
5
  [AC_ARG_WITH(ncurses, [  --with-ncurses          Force the use of ncurses over curses],,)
 
6
   mp_save_LIBS="$LIBS"
 
7
   CURSES_LIB=""
 
8
   if test "$with_ncurses" != yes
 
9
   then
 
10
     AC_CACHE_CHECK([for working curses], mp_cv_curses,
 
11
       [LIBS="$LIBS -lcurses"
 
12
        AC_TRY_LINK(
 
13
          [#include <curses.h>],
 
14
          [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
 
15
          mp_cv_curses=yes, mp_cv_curses=no)])
 
16
     if test "$mp_cv_curses" = yes
 
17
     then
 
18
       AC_DEFINE(HAVE_CURSES_H)
 
19
       CURSES_LIB="-lcurses"
 
20
     fi
 
21
   fi
 
22
   if test ! "$CURSES_LIB"
 
23
   then
 
24
     AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses,
 
25
       [LIBS="$mp_save_LIBS -lncurses"
 
26
        AC_TRY_LINK(
 
27
          [#include <ncurses.h>],
 
28
          [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
 
29
          mp_cv_ncurses=yes, mp_cv_ncurses=no)])
 
30
     if test "$mp_cv_ncurses" = yes
 
31
     then
 
32
       AC_DEFINE(HAVE_NCURSES_H)
 
33
       CURSES_LIB="-lncurses"
 
34
     fi
 
35
   fi
 
36
   LIBS="$mp_save_LIBS"
 
37
])dnl
 
38
 
 
39
 
 
40