Code

get_author_initials: various fixes
[tig.git] / configure.ac
index 65b5af34c6087d39902c22ecda9a69ac20562c8d..236d5f93dd876f34ad338fe35ecb1d669c69ad1b 100644 (file)
@@ -1,32 +1,26 @@
-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], [ncursesw ncurses curses], [],
-              [AC_ERROR([curses not found])])
+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_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_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
-
-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