1
0
mirror of https://git.zap.org.au/git/trader.git synced 2025-02-02 15:08:13 -05:00

Update ax_with_curses.m4 to latest version from the Autoconf Archive

This commit is contained in:
John Zaitseff 2011-07-29 11:51:21 +10:00
parent 6afcaa0532
commit d1d7716667

View File

@ -8,17 +8,17 @@
# #
# DESCRIPTION # DESCRIPTION
# #
# This macro checks whether a SysV or X/Open-compatible Curses library # This macro checks whether a SysV or X/Open-compatible Curses library is
# is present, along with the associated header file. The NcursesW # present, along with the associated header file. The NcursesW
# (wide-character) library is searched for first, followed by Ncurses, # (wide-character) library is searched for first, followed by Ncurses,
# then the system-default plain Curses. The first library found is the # then the system-default plain Curses. The first library found is the
# one returned. # one returned.
# #
# The following options are understood: --with-ncursesw, --with-ncurses, # The following options are understood: --with-ncursesw, --with-ncurses,
# --without-ncursesw, --without-ncurses. The "--with" options force # --without-ncursesw, --without-ncurses. The "--with" options force the
# the macro to use that particular library, terminating with an error # macro to use that particular library, terminating with an error if not
# if not found. The "--without" options simply skip the check for that # found. The "--without" options simply skip the check for that library.
# library. The effect on the search pattern is: # The effect on the search pattern is:
# #
# (no options) - NcursesW, Ncurses, Curses # (no options) - NcursesW, Ncurses, Curses
# --with-ncurses --with-ncursesw - NcursesW only [*] # --with-ncurses --with-ncursesw - NcursesW only [*]
@ -31,10 +31,11 @@
# --without-ncurses - NcursesW, Curses # --without-ncurses - NcursesW, Curses
# #
# [*] If the library is not found, abort the configure script. # [*] If the library is not found, abort the configure script.
#
# [**] If the second library (Ncurses) is not found, abort configure. # [**] If the second library (Ncurses) is not found, abort configure.
# #
# The following preprocessor symbols may be defined by this macro if # The following preprocessor symbols may be defined by this macro if the
# the appropriate conditions are met: # appropriate conditions are met:
# #
# HAVE_CURSES - if any SysV or X/Open Curses library found # HAVE_CURSES - if any SysV or X/Open Curses library found
# HAVE_CURSES_ENHANCED - if library supports X/Open Enhanced functions # HAVE_CURSES_ENHANCED - if library supports X/Open Enhanced functions
@ -51,23 +52,23 @@
# #
# (These preprocessor symbols are discussed later in this document.) # (These preprocessor symbols are discussed later in this document.)
# #
# The following output variable is defined by this macro; it is # The following output variable is defined by this macro; it is precious
# precious and may be overridden on the ./configure command line: # and may be overridden on the ./configure command line:
# #
# CURSES_LIB - library to add to xxx_LDADD # CURSES_LIB - library to add to xxx_LDADD
# #
# The library listed in CURSES_LIB is NOT added to LIBS by default. # The library listed in CURSES_LIB is NOT added to LIBS by default. You
# You need to add CURSES_LIB to the appropriate xxx_LDADD line in your # need to add CURSES_LIB to the appropriate xxx_LDADD line in your
# Makefile.am. For example: # Makefile.am. For example:
# #
# prog_LDADD = @CURSES_LIB@ # prog_LDADD = @CURSES_LIB@
# #
# If CURSES_LIB is set on the configure command line (such as by # If CURSES_LIB is set on the configure command line (such as by running
# running "./configure CURSES_LIB=-lmycurses"), then the only header # "./configure CURSES_LIB=-lmycurses"), then the only header searched for
# searched for is <curses.h>. The user may use the CPPFLAGS precious # is <curses.h>. The user may use the CPPFLAGS precious variable to
# variable to override the standard #include search path. If the user # override the standard #include search path. If the user needs to
# needs to specify an alternative path for a library (such as for a # specify an alternative path for a library (such as for a non-standard
# non-standard NcurseW), the user should use the LDFLAGS variable. # NcurseW), the user should use the LDFLAGS variable.
# #
# The following shell variables may be defined by this macro: # The following shell variables may be defined by this macro:
# #
@ -81,36 +82,35 @@
# ax_cv_plaincurses - set to "yes" if plain Curses library found # ax_cv_plaincurses - set to "yes" if plain Curses library found
# ax_cv_curses_which - set to "ncursesw", "ncurses", "plaincurses" or "no" # ax_cv_curses_which - set to "ncursesw", "ncurses", "plaincurses" or "no"
# #
# These variables can be used in your configure.ac to determine the # These variables can be used in your configure.ac to determine the level
# level of support you need from the Curses library. For example, if # of support you need from the Curses library. For example, if you must
# you must have either Ncurses or NcursesW, you could include: # have either Ncurses or NcursesW, you could include:
# #
# AX_WITH_CURSES # AX_WITH_CURSES
# if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then # if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
# AX_MSG_ERROR([requires either NcursesW or Ncurses library]) # AX_MSG_ERROR([requires either NcursesW or Ncurses library])
# fi # fi
# #
# If any Curses library will do (but one must be present and must # If any Curses library will do (but one must be present and must support
# support color), you could use: # color), you could use:
# #
# AX_WITH_CURSES # AX_WITH_CURSES
# if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then # if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then
# AC_MSG_ERROR([requires an X/Open-compatible Curses library with color]) # AC_MSG_ERROR([requires an X/Open-compatible Curses library with color])
# fi # fi
# #
# Certain preprocessor symbols and shell variables defined by this # Certain preprocessor symbols and shell variables defined by this macro
# macro can be used to determine various features of the Curses # can be used to determine various features of the Curses library. In
# library. In particular, HAVE_CURSES and ax_cv_curses are defined if # particular, HAVE_CURSES and ax_cv_curses are defined if the Curses
# the Curses library found conforms to the traditional SysV and/or # library found conforms to the traditional SysV and/or X/Open Base Curses
# X/Open Base Curses definition. Any working Curses library conforms # definition. Any working Curses library conforms to this level.
# to this level.
# #
# HAVE_CURSES_ENHANCED and ax_cv_curses_enhanced are defined if the # HAVE_CURSES_ENHANCED and ax_cv_curses_enhanced are defined if the
# library supports the X/Open Enhanced Curses definition. In # library supports the X/Open Enhanced Curses definition. In particular,
# particular, the wide-character types attr_t, cchar_t and wint_t, the # the wide-character types attr_t, cchar_t and wint_t, the functions
# functions wattr_set() and wget_wch() and the macros WA_NORMAL and # wattr_set() and wget_wch() and the macros WA_NORMAL and _XOPEN_CURSES
# _XOPEN_CURSES are checked. The Ncurses library does NOT conform to # are checked. The Ncurses library does NOT conform to this definition,
# this definition, although NcursesW does. # although NcursesW does.
# #
# HAVE_CURSES_COLOR and ax_cv_curses_color are defined if the library # HAVE_CURSES_COLOR and ax_cv_curses_color are defined if the library
# supports color functions and macros such as COLOR_PAIR, A_COLOR, # supports color functions and macros such as COLOR_PAIR, A_COLOR,
@ -120,8 +120,8 @@
# NcursesW. # NcursesW.
# #
# HAVE_CURSES_OBSOLETE and ax_cv_curses_obsolete are defined if the # HAVE_CURSES_OBSOLETE and ax_cv_curses_obsolete are defined if the
# library supports certain features present in SysV and BSD Curses but # library supports certain features present in SysV and BSD Curses but not
# not defined in the X/Open definition. In particular, the functions # defined in the X/Open definition. In particular, the functions
# getattrs(), getcurx() and getmaxx() are checked. # getattrs(), getcurx() and getmaxx() are checked.
# #
# To use the HAVE_xxx_H preprocessor symbols, insert the following into # To use the HAVE_xxx_H preprocessor symbols, insert the following into
@ -141,14 +141,13 @@
# # error "SysV or X/Open-compatible Curses header file required" # # error "SysV or X/Open-compatible Curses header file required"
# #endif # #endif
# #
# For previous users of this macro: you should not need to change # For previous users of this macro: you should not need to change anything
# anything in your configure.ac or Makefile.am, as the previous (serial # in your configure.ac or Makefile.am, as the previous (serial 10)
# 10) semantics are still valid. However, you should update your # semantics are still valid. However, you should update your system.h (or
# system.h (or equivalent) header file to the fragment shown above. # equivalent) header file to the fragment shown above. You are encouraged
# You are encouraged also to make use of the extended functionality # also to make use of the extended functionality provided by this version
# provided by this version of AX_WITH_CURSES, as well as in the # of AX_WITH_CURSES, as well as in the additional macros
# additional macros AX_WITH_CURSES_PANEL, AX_WITH_CURSES_MENU and # AX_WITH_CURSES_PANEL, AX_WITH_CURSES_MENU and AX_WITH_CURSES_FORM.
# AX_WITH_CURSES_FORM.
# #
# LICENSE # LICENSE
# #
@ -184,6 +183,7 @@
# exception to the GPL to apply to your modified version as well. # exception to the GPL to apply to your modified version as well.
#serial 11 #serial 11
AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES]) AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES])
AC_DEFUN([AX_WITH_CURSES], [ AC_DEFUN([AX_WITH_CURSES], [
AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses]) AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses])