diff options
author | Geoff Levand <geoff@infradead.org> | 2013-07-19 17:07:31 -0700 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2013-07-23 10:39:08 -0700 |
commit | f1599796efed1eb67759cf42f47fe4bf6a9bf93c (patch) | |
tree | 5cf13ffb598e62a45ed9830f76a74958785b2a44 /configure.ac.in | |
parent | f2747434dcdfe71c3a4d1b841070f4c9d8dc4965 (diff) | |
download | petitboot-f1599796efed1eb67759cf42f47fe4bf6a9bf93c.zip petitboot-f1599796efed1eb67759cf42f47fe4bf6a9bf93c.tar.gz |
configure: Update to use AX_WITH_CURSES
For a more portable build system convert to using the
autoconf-archive AX_WITH_CURSES macros. Allows building
on openSUSE, which has a different header file layout than
other distros, and fixes menu entries with UTF-8 characters;
this causes fedora installs (codename "Schrödinger´s cat")
to break the UI.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'configure.ac.in')
-rw-r--r-- | configure.ac.in | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/configure.ac.in b/configure.ac.in index 51cfdb8..8372b98 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -28,14 +28,29 @@ AC_PROG_INSTALL AM_INIT_AUTOMAKE LT_INIT -AC_CHECK_HEADERS([stdarg.h]) -AC_CHECK_HEADERS([varargs.h]) +AX_WITH_CURSES +AX_WITH_CURSES_MENU +AX_WITH_CURSES_FORM + +AM_CONDITIONAL([WITH_NCURSES], [test "x$ax_cv_curses" = "xyes"]) + +if test "x$ax_cv_curses" = xyes; then + if test "x$ax_cv_menu" != xyes; then + AC_MSG_ERROR([--with-ncurses requires the ncurses menu library]) + fi + if test "x$ax_cv_form" != xyes; then + AC_MSG_ERROR([--with-ncurses requires the ncurses form library]) + fi +fi AC_CHECK_LIB([udev], [udev_new], [], [AC_MSG_FAILURE([The libudev development library is required by petitboot. Try installing the package libudev-dev or libudev-devel.])] ) +AC_CHECK_HEADERS([stdarg.h]) +AC_CHECK_HEADERS([varargs.h]) + dnl Checking for va_copy availability AC_MSG_CHECKING([for va_copy]) AC_TRY_LINK([#include <stdarg.h> @@ -58,24 +73,6 @@ else fi AC_ARG_WITH( - [ncurses], - [AS_HELP_STRING([--with-ncurses], - [build text console UI programs using ncurses [default=yes]] - )], - [], - [with_ncurses=yes] -) -AM_CONDITIONAL([WITH_NCURSES], [test "x$with_ncurses" = "xyes"]) - -AS_IF( - [test "x$with_ncurses" = "xyes"], - AC_CHECK_LIB([ncurses], [initscr], - [], - [AC_MSG_FAILURE([--with-ncurses was given but the test for libncurses failed. Try installing the package ncurses-dev or ncurses-devel.])] - ) -) - -AC_ARG_WITH( [twin-x11], [AS_HELP_STRING([--with-twin-x11], [build x11 GUI programs using the twin window system [default=yes]] |