X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=236d5f93dd876f34ad338fe35ecb1d669c69ad1b;hb=d4d5d590bab0ae4297adcdbfbece1f07d44d4c25;hp=6b0fc45293092be92f771f36bed28008037da2e7;hpb=7a5eba335c2a925b94c28b4ecaf013932a002f65;p=tig.git diff --git a/configure.ac b/configure.ac index 6b0fc45..236d5f9 100644 --- a/configure.ac +++ b/configure.ac @@ -4,35 +4,23 @@ AC_LANG([C]) AC_CONFIG_HEADER(config.h) AC_CONFIG_SRCDIR(tig.c) -cursed=no -AC_CHECK_HEADERS([ncursesw/ncurses.h], - [AC_SEARCH_LIBS([initscr], [ncursesw], [cursed=yes])]) -case "$cursed" in "no") - AC_CHECK_HEADERS([ncurses/ncurses.h ncurses.h], - [AC_SEARCH_LIBS([wclear], [ncurses], [cursed=yes])]) - - case "$cursed" in "no") - AC_ERROR([ncurses not found]) - esac - +AX_WITH_CURSES +case "$ax_cv_ncurses" in "no") + AC_ERROR([ncurses not found]) +esac +case "$ax_cv_ncursesw" in "no") AC_MSG_WARN([The found ncurses library does not support wide-char.]) AC_MSG_WARN([This means that tig will not correctly render UTF-8.]) esac +AC_SUBST(CURSES_LIB) AM_ICONV AC_PROG_CC -AC_CHECK_PROG(GIT, [git], [git], [AC_ERROR([git not found])]) -AC_MSG_CHECKING([which config command git supports]) -GIT_CONFIG="git repo-config" -git config --list >/dev/null && GIT_CONFIG="git config" -AC_MSG_RESULT([$GIT_CONFIG]) -AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config program]) - -AC_CHECK_PROGS(ASCIIDOC, [asciidoc false]) -AC_CHECK_PROGS(XMLTO, [xmlto false]) -AC_CHECK_PROGS(DOCBOOK2PDF, [docbook2pdf false]) +AC_CHECK_PROGS(ASCIIDOC, [asciidoc], [false]) +AC_CHECK_PROGS(XMLTO, [xmlto], [false]) +AC_CHECK_PROGS(DOCBOOK2PDF, [docbook2pdf], [false]) AC_CONFIG_FILES([config.make]) AC_OUTPUT