X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=configure.ac;h=b179389febd36f351cad70e0cd26e313ecc55a16;hb=6a72f9bcd5aa5ef11500357077eb00a3c271bb61;hp=422039eb4876c71e57c45705140bbc43cdb26ca9;hpb=bfb1ff9519ef60d33d6befe6c24b77233b776a33;p=tig.git diff --git a/configure.ac b/configure.ac index 422039e..b179389 100644 --- a/configure.ac +++ b/configure.ac @@ -1,20 +1,35 @@ -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], [ncurses curses]) +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_PROGS(GIT_CONFIG, [git-config git-repo-config]) -if test "${ac_cv_prog_GIT_CONFIG}" = ""; then - AC_CHECK_PROGS(GIT, [git]) - GIT_CONFIG="${ac_cv_prog_GIT} config" -fi -AC_DEFINE_UNQUOTED(GIT_CONFIG,"$GIT_CONFIG",[git config program]) + +AC_CHECK_PROG(GIT, [git], [git], [AC_ERROR([git not found])]) +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 subcommand]) + AC_CHECK_PROGS(ASCIIDOC, [asciidoc false]) AC_CHECK_PROGS(XMLTO, [xmlto false]) AC_CHECK_PROGS(DOCBOOK2PDF, [docbook2pdf false])