annotate xrogue/acinclude.m4 @ 164:49af2fd0bb0c

Move some autotools files to where configure can find them. rogue5 uses config.guess and config.sub to find the canonical system names. The configure script expects them to be in the same directory as install-sh. So they have been relocated to the top level. This is a quick and dirty fix. The eventual plan is to relocate them to /dev/null. I also suspect they should be used to set HOST, not TARGET. Rogue is not a cross-compiler.
author John "Elwin" Edwards
date Tue, 16 Jun 2015 11:44:49 -0400
parents 3e1146666ae5
children 029c1f5c5588
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
156
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
1 AC_DEFUN([MP_WITH_CURSES],
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
2 [AC_ARG_WITH(ncurses, [ --with-ncurses Force the use of ncurses over curses],,)
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
3 mp_save_LIBS="$LIBS"
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
4 CURSES_LIB=""
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
5 if test "$with_ncurses" != yes
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
6 then
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
7 AC_CACHE_CHECK([for working curses], mp_cv_curses,
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
8 [LIBS="$LIBS -lcurses"
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
9 AC_TRY_LINK(
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
10 [#include <curses.h>],
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
11 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
12 mp_cv_curses=yes, mp_cv_curses=no)])
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
13 if test "$mp_cv_curses" = yes
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
14 then
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
15 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested])
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
16 #AC_DEFINE(HAVE_CURSES_H)
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
17 CURSES_LIB="-lcurses"
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
18 fi
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
19 fi
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
20 if test ! "$CURSES_LIB"
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
21 then
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
22 AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses,
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
23 [LIBS="$mp_save_LIBS -lncurses"
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
24 AC_TRY_LINK(
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
25 [#include <ncurses.h>],
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
26 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
27 mp_cv_ncurses=yes, mp_cv_ncurses=no)])
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
28 if test "$mp_cv_ncurses" = yes
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
29 then
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
30 AC_DEFINE(HAVE_NCURSES_H, 1, [Define to 1 if libncurses is requested])
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
31 CURSES_LIB="-lncurses"
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
32 fi
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
33 fi
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
34 if test ! "$CURSES_LIB"
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
35 then
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
36 AC_CACHE_CHECK([for working pdcurses], mp_cv_pdcurses,
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
37 [LIBS="$mp_save_LIBS -lpdcurses"
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
38 AC_TRY_LINK(
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
39 [#include <curses.h>],
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
40 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
41 mp_cv_pdcurses=yes, mp_cv_pdcurses=no)])
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents:
diff changeset
42 if test "$mp_cv_pdcurses" = yes
3e1146666ae5 arogue7, xrogue: begin using autoconf.
John "Elwin" Edwards
parents: