Code

Make the branch view always prepare how the main view is loaded
[tig.git] / configure.ac
index 55d81a98811306f99a733084d2e2f5ab9c3fdc41..27a78b12b5bc8e0a1ab8ecaee149cce850b4aae7 100644 (file)
@@ -1,16 +1,28 @@
-AC_INIT([tig], [0],
-       [Jonas Fonseca <fonseca@diku.dk>],
-       [tig])
+AC_INIT([tig], [0], [Jonas Fonseca <fonseca@diku.dk>], [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])
-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])