comparison xrogue/acinclude.m4 @ 312:029c1f5c5588

Update the Autoconf files. These are mostly automatic updates for obsolete macros.
author John "Elwin" Edwards
date Tue, 11 May 2021 22:30:03 -0400
parents 3e1146666ae5
children
comparison
equal deleted inserted replaced
311:28e22fb35989 312:029c1f5c5588
4 CURSES_LIB="" 4 CURSES_LIB=""
5 if test "$with_ncurses" != yes 5 if test "$with_ncurses" != yes
6 then 6 then
7 AC_CACHE_CHECK([for working curses], mp_cv_curses, 7 AC_CACHE_CHECK([for working curses], mp_cv_curses,
8 [LIBS="$LIBS -lcurses" 8 [LIBS="$LIBS -lcurses"
9 AC_TRY_LINK( 9 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ]])],[mp_cv_curses=yes],[mp_cv_curses=no])])
10 [#include <curses.h>],
11 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
12 mp_cv_curses=yes, mp_cv_curses=no)])
13 if test "$mp_cv_curses" = yes 10 if test "$mp_cv_curses" = yes
14 then 11 then
15 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested]) 12 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested])
16 #AC_DEFINE(HAVE_CURSES_H)
17 CURSES_LIB="-lcurses" 13 CURSES_LIB="-lcurses"
18 fi 14 fi
19 fi 15 fi
20 if test ! "$CURSES_LIB" 16 if test ! "$CURSES_LIB"
21 then 17 then
22 AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses, 18 AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses,
23 [LIBS="$mp_save_LIBS -lncurses" 19 [LIBS="$mp_save_LIBS -lncurses"
24 AC_TRY_LINK( 20 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <ncurses.h>]], [[chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ]])],[mp_cv_ncurses=yes],[mp_cv_ncurses=no])])
25 [#include <ncurses.h>],
26 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
27 mp_cv_ncurses=yes, mp_cv_ncurses=no)])
28 if test "$mp_cv_ncurses" = yes 21 if test "$mp_cv_ncurses" = yes
29 then 22 then
30 AC_DEFINE(HAVE_NCURSES_H, 1, [Define to 1 if libncurses is requested]) 23 AC_DEFINE(HAVE_NCURSES_H, 1, [Define to 1 if libncurses is requested])
31 CURSES_LIB="-lncurses" 24 CURSES_LIB="-lncurses"
32 fi 25 fi
33 fi 26 fi
34 if test ! "$CURSES_LIB" 27 if test ! "$CURSES_LIB"
35 then 28 then
36 AC_CACHE_CHECK([for working pdcurses], mp_cv_pdcurses, 29 AC_CACHE_CHECK([for working pdcurses], mp_cv_pdcurses,
37 [LIBS="$mp_save_LIBS -lpdcurses" 30 [LIBS="$mp_save_LIBS -lpdcurses"
38 AC_TRY_LINK( 31 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ]])],[mp_cv_pdcurses=yes],[mp_cv_pdcurses=no])])
39 [#include <curses.h>],
40 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
41 mp_cv_pdcurses=yes, mp_cv_pdcurses=no)])
42 if test "$mp_cv_pdcurses" = yes 32 if test "$mp_cv_pdcurses" = yes
43 then 33 then
44 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested]) 34 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested])
45 CURSES_LIB="-lpdcurses" 35 CURSES_LIB="-lpdcurses"
46 fi 36 fi
47 fi 37 fi
48 if test ! "$CURSES_LIB" 38 if test ! "$CURSES_LIB"
49 then 39 then
50 AC_CACHE_CHECK([for working pdcur], mp_cv_pdcur, 40 AC_CACHE_CHECK([for working pdcur], mp_cv_pdcur,
51 [LIBS="$mp_save_LIBS -lpdcur" 41 [LIBS="$mp_save_LIBS -lpdcur"
52 AC_TRY_LINK( 42 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ]])],[mp_cv_pdcur=yes],[mp_cv_pdcur=no])])
53 [#include <curses.h>],
54 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
55 mp_cv_pdcur=yes, mp_cv_pdcur=no)])
56 if test "$mp_cv_pdcur" = yes 43 if test "$mp_cv_pdcur" = yes
57 then 44 then
58 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested]) 45 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested])
59 CURSES_LIB="-lpdcur" 46 CURSES_LIB="-lpdcur"
60 fi 47 fi
61 fi 48 fi
62 if test ! "$CURSES_LIB" 49 if test ! "$CURSES_LIB"
63 then 50 then
64 AC_CACHE_CHECK([for working peer pdcurses], mp_cv_lpdcurses, 51 AC_CACHE_CHECK([for working peer pdcurses], mp_cv_lpdcurses,
65 [LIBS="$mp_save_LIBS ../pdcurses/pdcurses.a" 52 [LIBS="$mp_save_LIBS ../pdcurses/pdcurses.a"
66 AC_TRY_LINK( 53 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "../pdcurses/curses.h"]], [[chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ]])],[mp_cv_lpdcurses=yes],[mp_cv_lpdcurses=no])])
67 [#include "../pdcurses/curses.h"],
68 [chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
69 mp_cv_lpdcurses=yes, mp_cv_lpdcurses=no)])
70 if test "$mp_cv_lpdcurses" = yes 54 if test "$mp_cv_lpdcurses" = yes
71 then 55 then
72 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested]) 56 AC_DEFINE(HAVE_CURSES_H, 1, [Define to 1 if libcurses is requested])
73 CURSES_LIB="../pdcurses/pdcurses.a" 57 CURSES_LIB="../pdcurses/pdcurses.a"
74 RF_ADDTO(CPPFLAGS,"-I../pdcurses") 58 RF_ADDTO(CPPFLAGS,"-I../pdcurses")
75 fi 59 fi
76 fi 60 fi
77 AC_CACHE_CHECK([for ESCDELAY variable], 61 AC_CACHE_CHECK([for ESCDELAY variable],
78 [mc_cv_ncurses_escdelay], 62 [mc_cv_ncurses_escdelay],
79 [AC_TRY_LINK([], [ 63 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
80 extern int ESCDELAY; 64 extern int ESCDELAY;
81 ESCDELAY = 0; 65 ESCDELAY = 0;
82 ], 66 ]])],[mc_cv_ncurses_escdelay=yes],[mc_cv_ncurses_escdelay=no])
83 [mc_cv_ncurses_escdelay=yes],
84 [mc_cv_ncurses_escdelay=no])
85 ]) 67 ])
86 if test "$mc_cv_ncurses_escdelay" = yes; then 68 if test "$mc_cv_ncurses_escdelay" = yes; then
87 AC_DEFINE(HAVE_ESCDELAY, 1, 69 AC_DEFINE(HAVE_ESCDELAY, 1,
88 [Define if ncurses has ESCDELAY variable]) 70 [Define if ncurses has ESCDELAY variable])
89 fi 71 fi