annotate rogue4/acinclude.m4 @ 113:aa582a02eb5d

srogue: remove unnecessary pointer cast. Casting char* to int before a comparison doesn't alter the result, and isn't safe if sizeof(char *) != sizeof(int).
author John "Elwin" Edwards
date Thu, 27 Mar 2014 11:09:30 -0700
parents a1dc75e38e73
children 029c1f5c5588
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
51
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
1 AC_DEFUN([MP_WITH_CURSES],
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
2 [AC_ARG_WITH(ncurses, [ --with-ncurses Force the use of ncurses over curses],,)
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
3 mp_save_LIBS="$LIBS"
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
4 CURSES_LIB=""
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
5 if test "$with_ncurses" != yes
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
6 then
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
7 AC_CACHE_CHECK([for working curses], mp_cv_curses,
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
8 [LIBS="$LIBS -lcurses"
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
9 AC_TRY_LINK(
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
10 [#include <curses.h>],
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
11 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
12 mp_cv_curses=yes, mp_cv_curses=no)])
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
13 if test "$mp_cv_curses" = yes
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
14 then
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
15 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested])
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
16 #AC_DEFINE(HAVE_CURSES_H)
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
17 CURSES_LIB="-lcurses"
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
18 fi
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
19 fi
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents:
diff changeset
20 if test ! "$CURSES_LIB"
a1dc75e38e73 rogue4: ported to autoconf.
elwin
parents: