]> granicus.if.org Git - mutt/commitdiff
Use new CF_CHECK_FUNCDECLS macro for curses functions. This should
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 25 Apr 2000 18:28:46 +0000 (18:28 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 25 Apr 2000 18:28:46 +0000 (18:28 +0000)
catch function declarations and macros alike. Due to a misfeature in
autoheader, we have to explicitly AC_DEFINE the curses functions.
(From Lars Hecking.)

configure.in

index 8dc9929cf3463bb14da13a2356eb1d90f16ebf27..a3c29ed5c6548c7d47fea2e03f4b5901ffd27f95 100644 (file)
@@ -196,10 +196,20 @@ main ()
 
        old_LIBS="$LIBS"
        LIBS="$LIBS $MUTTLIBS"
-       AC_CHECK_FUNC(start_color, [AC_DEFINE(HAVE_COLOR)])
-       AC_CHECK_FUNCS(typeahead bkgdset curs_set meta use_default_colors)
-       AC_CHECK_FUNCS(resizeterm,
-               [MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o"])
+       CF_CHECK_FUNCDECLS([#include <curses.h>], start_color typeahead bkgdset curs_set meta use_default_colors resizeterm)
+       if test "$ac_cv_func_decl_start_color" = yes; then
+               AC_DEFINE(HAVE_START_COLOR)
+               AC_DEFINE(HAVE_COLOR)
+       fi
+       test "$ac_cv_func_decl_typeahead" = yes && AC_DEFINE(HAVE_TYPEAHEAD)
+       test "$ac_cv_func_decl_bkgdset" = yes && AC_DEFINE(HAVE_BKGDSET)
+       test "$ac_cv_func_decl_curs_set" = yes && AC_DEFINE(HAVE_CURS_SET)
+       test "$ac_cv_func_decl_meta" = yes && AC_DEFINE(HAVE_META)
+       test "$ac_cv_func_decl_use_default_colors" = yes && AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
+       if test "$ac_cv_func_decl_resizeterm" = yes; then
+               AC_DEFINE(HAVE_RESIZETERM)
+               MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS resize.o"
+       fi
        LIBS="$old_LIBS"
        ])