From e62ea4d3cba6b8872882879bc663fa486d35f297 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 20 Mar 2008 18:58:05 +0100 Subject: [PATCH] configure: test for git binary and improve config subcommand test --- configure.ac | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 65b5af3..764190a 100644 --- a/configure.ac +++ b/configure.ac @@ -12,12 +12,14 @@ AC_SEARCH_LIBS([wclear], [ncursesw ncurses curses], [], 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_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]) -- 2.30.2