X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=b179389febd36f351cad70e0cd26e313ecc55a16;hb=1cb715dd72650568a45b63f69dc9470304d5d35c;hp=764190a40a8eecc3f0068e5d67b5db13dcb55a91;hpb=e62ea4d3cba6b8872882879bc663fa486d35f297;p=tig.git diff --git a/configure.ac b/configure.ac index 764190a..b179389 100644 --- a/configure.ac +++ b/configure.ac @@ -1,24 +1,34 @@ -AC_INIT([tig], [0], - [Jonas Fonseca ], - [tig]) +AC_INIT([tig], [0], [Jonas Fonseca ], [tig]) AC_LANG([C]) AC_CONFIG_HEADER(config.h) AC_CONFIG_SRCDIR(tig.c) -AC_SEARCH_LIBS([wclear], [ncursesw ncurses curses], [], - [AC_ERROR([curses not found])]) +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 + + 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 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_CHECKING([which config subcommand git supports]) +GIT_CONFIG="repo-config" +git config --list >/dev/null && GIT_CONFIG="config" AC_MSG_RESULT([$GIT_CONFIG]) -AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config program]) +AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config subcommand]) AC_CHECK_PROGS(ASCIIDOC, [asciidoc false]) AC_CHECK_PROGS(XMLTO, [xmlto false]) @@ -26,9 +36,3 @@ AC_CHECK_PROGS(DOCBOOK2PDF, [docbook2pdf false]) AC_CONFIG_FILES([config.make]) AC_OUTPUT - -case "$LIBS" in -*-lncursesw*) ;; -*) AC_MSG_RESULT([NOTE: The found ncurses library does not support wide-char.]) - AC_MSG_RESULT([NOTE: This means that tig will not correctly render UTF-8]) -esac