]> diplodocus.org Git - nmh/blobdiff - configure.ac
That didn't work. Try including termcap.h first, instead of
[nmh] / configure.ac
index 71ae2f6076411009dd79b389f350124a595a57c9..6d140bc2d94f5c1290c588b4038837e75f6cc211 100644 (file)
@@ -324,10 +324,18 @@ AC_CACHE_CHECK(what group owns the mail spool, nmh_cv_ls_mail_grp,
 MAIL_SPOOL_GRP=$nmh_cv_ls_mail_grp
 AC_SUBST(MAIL_SPOOL_GRP)dnl
 
-dnl Temporary probe to see what these file commands will do.
-file --mime configure; echo $?
-file -i configure; echo $?
-dnl
+dnl ---------------------------------------------
+dnl CHECK FOR PROGRAM TO PROVIDE MIME TYPE STRING
+dnl ---------------------------------------------
+AS_IF([file --mime "${srcdir}"/configure >/dev/null 2>&1],
+      [AS_IF([file --brief --mime "${srcdir}"/configure >/dev/null 2>&1],
+             [nmh_mimetypeproc='"file --brief --mime"'],
+             [nmh_mimetypeproc='"file --mime"'])])
+AS_CASE([$nmh_mimetypeproc], [?*],
+        [AC_DEFINE_UNQUOTED([MIMETYPEPROC], [$nmh_mimetypeproc],
+          [Program, with arguments, that provides MIME type string.])])
+AS_ECHO_N(["AS_ESCAPE([checking program to provide MIME type string ... ])"])
+AS_ECHO(["AS_ESCAPE([$nmh_mimetypeproc], [""])"])
 
 dnl ------------------
 dnl CHECK HEADER FILES
@@ -585,14 +593,16 @@ dnl ----------------
 dnl CHECK FLEX FIXUP
 dnl ----------------
 dnl Use LFLAGS make variable setting to work around bugs in flex
-dnl 2.5.35-37 that cause signed/unsigned mismatch,
+dnl 2.5.36 that cause signed/unsigned mismatch,
 dnl http://sourceforge.net/p/flex/bugs/140/
 AS_IF([test "$LEX" = flex],
       [AS_CASE([`$LEX -V`],
                [flex\ 2.5.35], [LFLAGS=\
-'; printf "%s\n" '\''1,$$s/(size_t) \(num_to_read\)/\1/'\'' w q | ed -s $@'],
-               [flex\ 2.5.3@<:@67@:>@], [LFLAGS=\
-'; printf "%s\n" '\''1,$$s/\(  \)int i;/\1yy_size_t i;/'\'' w q | ed -s $@'])
+'; printf "%s\n" '\''1,$$s/(size_t) \(num_to_read\)/\1/'\'' w q | ed -s $@; \
+true'],
+               [flex\ 2.5.36], [LFLAGS=\
+'; printf "%s\n" '\''1,$$s/\(  \)int i;/\1yy_size_t i;/'\'' w q | ed -s $@; \
+true'])
        AC_SUBST([LFLAGS])])
 
 dnl --------------