diff options
author | Louie Shprung <lshprung@scu.edu> | 2023-01-07 14:37:43 -0800 |
---|---|---|
committer | Louie Shprung <lshprung@scu.edu> | 2023-01-07 14:37:43 -0800 |
commit | 3c64e633185d7065c1a72673394acef89ff4740e (patch) | |
tree | 3f7c220040eb07246a5c8d65d5de3e8820784cb0 /configure.ac | |
parent | 877917a7e5ebce25a2088d3198410423d60e6768 (diff) |
Use AX_WITH_CURSES in configure
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index a203db3..205deb8 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,31 @@ AC_INIT([terminal-media-launcher], [0.1]) +AC_CONFIG_SRCDIR([src/draw.c]) +#AC_CONFIG_HEADERS([config.h]) + AM_INIT_AUTOMAKE([foreign]) + +# Checks for programs. AC_PROG_CC -AC_CONFIG_FILES([ - Makefile - src/Makefile - ]) -AC_CHECK_HEADERS([ncurses.h], [], AC_MSG_ERROR(missing ncurses.h)) + +# Checks for libraries. +AC_CHECK_LIB([ncurses], [initscr]) + +# Checks for header files. +AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_CHECK_HEADER_STDBOOL + +# Checks for library functions. +AC_FUNC_MALLOC +AC_CHECK_FUNCS([mkdir strrchr]) + +# Check for curses with color support +AX_WITH_CURSES +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]) +fi + +AC_CONFIG_FILES([Makefile + src/Makefile]) AC_OUTPUT |