Hi,

doc.patch:
The first patch will allow the user to disable/enable the doc subdirectory.

ncursesw.patch:
Cleanup ncursesw detection. Handle the case where onyl include/ncurses.h
in available for ncursesw distribution.

regards,

-- 
Sylvain
--- configure.ac
+++ configure.ac
@@ -114,6 +114,15 @@
 MUTT_C99_INTTYPES
 AC_TYPE_LONG_LONG_INT
 
+AC_ARG_ENABLE(doc, AS_HELP_STRING([--disable-doc],[do not build doc]),
+[       if test x$enableval = xno ; then
+               do_build_doc=no
+       else
+               do_build_doc=yes
+        fi
+], [do_build_doc=yes])
+AM_CONDITIONAL(BUILD_DOC, test x$do_build_doc = xyes)
+
 ac_aux_path_sendmail=/usr/sbin:/usr/lib
 AC_PATH_PROG(SENDMAIL, sendmail, /usr/sbin/sendmail, 
$PATH:$ac_aux_path_sendmail)
 AC_DEFINE_UNQUOTED(SENDMAIL,"$ac_cv_path_SENDMAIL", [Where to find sendmail on 
your system.])


--- Makefile.am
+++ Makefile.am
@@ -10,7 +10,11 @@
 IMAP_INCLUDES = -I$(top_srcdir)/imap
 endif
 
-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR)
+if BUILD_DOC
+DOC_SUBDIR = doc
+endif
+
+SUBDIRS = m4 po intl $(DOC_SUBDIR) contrib $(IMAP_SUBDIR)
 
 bin_SCRIPTS = muttbug flea $(SMIMEAUX_TARGET)
 
--- configure.ac
+++ configure.ac
@@ -282,7 +282,7 @@
 
         [mutt_cv_curses=/usr
         AC_ARG_WITH(curses, AS_HELP_STRING([--with-curses=DIR],[Where ncurses 
is installed]),
-                [if test $withval != yes; then
+                [if test x$withval != xyes; then
                         mutt_cv_curses=$withval
                 fi
                 if test x$mutt_cv_curses != x/usr; then
@@ -299,10 +299,15 @@
         AC_CHECK_LIB($cf_ncurses, initscr,
                 [MUTTLIBS="$MUTTLIBS -l$cf_ncurses"
 
-                AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS -ltinfo"])
+               if test "$cf_ncurses" = ncursesw; then
+                       AC_CHECK_LIB(tinfow, tgetent, [MUTTLIBS="$MUTTLIBS 
-ltinfow"])
+               else
+                       AC_CHECK_LIB(tinfo, tgetent, [MUTTLIBS="$MUTTLIBS 
-ltinfo"])
+               fi
 
                 if test "$cf_ncurses" = ncursesw; then
-                       
AC_CHECK_HEADERS(ncursesw/ncurses.h,[cf_cv_ncurses_header="ncursesw/ncurses.h"])
+                       
AC_CHECK_HEADERS(ncursesw/ncurses.h,[cf_cv_ncurses_header="ncursesw/ncurses.h"],
+                               
[AC_CHECK_HEADERS(ncurses.h,[cf_cv_ncurses_header="ncurses.h"])])
                else
                   
AC_CHECK_HEADERS(ncurses/ncurses.h,[cf_cv_ncurses_header="ncurses/ncurses.h"],
                     
[AC_CHECK_HEADERS(ncurses.h,[cf_cv_ncurses_header="ncurses.h"])])

Reply via email to