From: pdmef Date: Mon, 14 Mar 2005 14:20:42 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=c630675d53c350801bad8f146713104be84ba997;hp=afc6ec8843e341b9661df5888050ec36536734d0 Rocco Rutte: build fixes for Sun CC/Solaris (_search_ for gdbm, sidebar) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@178 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/configure.in b/configure.in index 3f9cba1..29358ec 100644 --- a/configure.in +++ b/configure.in @@ -823,12 +823,18 @@ AC_ARG_ENABLE(hcache, AC_HELP_STRING([--enable-hcache], [Enable header caching]) AC_ARG_WITH(gdbm, AC_HELP_STRING([--without-gdbm], [Don't use gdbm even if it is available]), ac_prefer_gdbm=$withval) if test x$ac_prefer_gdbm != xno; then - CPPFLAGS="$OLDCPPFLAGS" - LIBS="$OLDLIBS -lgdbm"; - AC_CACHE_CHECK(for gdbm_open, ac_cv_gdbmopen,[ - ac_cv_gdbmopen=no + ac_cv_gdbmopen=no + GDBM_DIRS="$mutt_cv_prefix /usr/local /usr" + AC_MSG_CHECKING([for gdbm_open]) + for d in $GDBM_DIRS; do + if test x$ac_cv_gdbmopen = xno && test -d "$d/include" && test -d "$d/lib"; then + GDBM_INC="-I$d/include" + GDBM_LIB="-L$d/lib" + CPPFLAGS="$OLDCPPFLAGS $GDBM_INC" + LIBS="$OLDLIBS $GDBM_LIB -lgdbm" AC_TRY_LINK([#include ],[gdbm_open(0,0,0,0,0);],[ac_cv_gdbmopen=yes]) - ]) + fi + done fi ac_bdb_prefix=yes @@ -881,8 +887,8 @@ AC_ARG_ENABLE(hcache, AC_HELP_STRING([--enable-hcache], [Enable header caching]) fi if test x$ac_cv_gdbmopen = xyes; then - CPPFLAGS="$OLDCPPFLAGS" - LIBS="$OLDLIBS -lgdbm"; + CPPFLAGS="$OLDCPPFLAGS $GDBM_INC" + LIBS="$OLDLIBS $GDBM_LIB -lgdbm"; AC_DEFINE(HAVE_GDBM, 1, [GDBM Support]) elif test x$ac_cv_dbcreate = xyes; then CPPFLAGS="-I$BDB_INCLUDE_DIR $OLDCPPFLAGS" diff --git a/sidebar.c b/sidebar.c index 001c720..098211d 100644 --- a/sidebar.c +++ b/sidebar.c @@ -26,14 +26,13 @@ #include "buffy.h" #include #include "keymap.h" -#include #include /*BUFFY *CurBuffy = 0;*/ static BUFFY *TopBuffy = 0; static BUFFY *BottomBuffy = 0; static int known_lines = 0; -static bool initialized = false; +static short initialized = 0; static int prev_show_value; static short saveSidebarWidth; static char *entry = 0; @@ -233,7 +232,7 @@ int draw_sidebar(int menu) { prev_show_value = option(OPTMBOXPANE); saveSidebarWidth = SidebarWidth; if(!option(OPTMBOXPANE)) SidebarWidth = 0; - initialized = true; + initialized = 1; } /* save or restore the value SidebarWidth */