# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
- AC_INIT([homebank], [5.2.6])
+ AC_INIT([homebank], [5.2.7])
#AC_INIT([homebank], [x.x-rc])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.9 foreign])
+LT_PREREQ([2.2])
+LT_INIT([dlopen])
+AC_CONFIG_MACRO_DIR([m4])
+
# If the source code has changed at all, increment REVISION
# If any interfaces have been added, removed, or changed, increment CURRENT, and set REVISION to 0.
# If any interfaces have been added since the last public release, then increment AGE.
AC_PROG_INTLTOOL
# Checks for libraries.
-PKG_CHECK_MODULES(DEPS, gtk+-3.0 >= 3.16 glib-2.0 >= 2.39)
+PKG_CHECK_MODULES(DEPS, gtk+-3.0 >= 3.16 glib-2.0 >= 2.39 gmodule-2.0 >= 2.39)
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_LIBS)
AC_CHECK_LIB(m, pow)
then
AC_CHECK_LIB(ofx, ofx_set_status_cb, OFX_0_7="-DOFX_ENABLE")
DEPS_LIBS="-lofx ${DEPS_LIBS}"
- CFLAGS="${CFLAGS} $OFX_0_7"
+ CPPFLAGS="${CPPFLAGS} $OFX_0_7"
else
noofx=true
AC_MSG_RESULT([Libofx header missing. Check your libofx installation])
fi
AM_CONDITIONAL(NOOFX, test x$noofx = xtrue)
+AC_ARG_WITH(perl,
+ [ --with-perl build with perl plug-in support [default=without]],
+ [build_perl=$withval],
+ [build_perl=no]
+)
+if test x$build_perl != xno
+then
+ test x$build_perl != xyes -a -x "$build_perl" && PERL=$build_perl
+ AC_PATH_PROG(PERL, perl, perl)
+ AC_MSG_CHECKING(if perl can be embedded)
+ if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1
+ then
+ AC_MSG_RESULT(yes)
+ CPPFLAGS="${CPPFLAGS} -DPERL_ENABLE"
+ PERL_CPPFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
+ PERL_OBJS="ext-perl.o perlxsi.o"
+ PERL_PRIVLIBEXP="`$PERL -MConfig -e 'print $Config{privlibexp}'`"
+ PERL_SITELIBEXP="`$PERL -MConfig -e 'print $Config{sitelibexp}'`"
+ DEPS_LIBS="`$PERL -MExtUtils::Embed -e ldopts` ${DEPS_LIBS}"
+ if test -e "$PERL_SITELIBEXP/ExtUtils/xsubpp"
+ then
+ XSUBPP="$PERL $PERL_SITELIBEXP/ExtUtils/xsubpp"
+ else
+ XSUBPP="$PERL $PERL_PRIVLIBEXP/ExtUtils/xsubpp"
+ fi
+ else
+ AC_MSG_ERROR([no working perl found, or perl not version >= 5.8])
+ fi
+fi
+AC_SUBST(PERL_CPPFLAGS)
+AC_SUBST(PERL_OBJS)
+AC_SUBST(PERL_PRIVLIBEXP)
+AC_SUBST(PERL_SITELIBEXP)
+AC_SUBST(XSUBPP)
+
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([libintl.h locale.h stdlib.h string.h])
po/Makefile.in
doc/Makefile
doc/images/Makefile
+plugins/Makefile
])
AC_OUTPUT
echo
echo Compiler................ : $CC
echo Build with OFX support.. : $build_ofx
+echo Build with perl support. : $build_perl
if test "x$noofx" = "xtrue" ; then
echo ........................ : **error** libofx header is missing, ofx feature will be disabled. Check your libofx installation
fi
#include "hb-archive.h"
#include "hb-split.h"
+#include "ext.h"
+#include "refcount.h"
+
/****************************************************************************/
/* Debug macros */
/****************************************************************************/
extern struct HomeBank *GLOBALS;
- if(item != NULL)
+ /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
+
+
+ static void
+ da_archive_clean(Archive *item)
+ {
+ if(item != NULL)
+ {
+ if(item->memo != NULL)
+ {
+ g_free(item->memo);
+ item->memo = NULL;
+ }
+
+
+
+
+
+ //5.3 added as it was a leak
+ if(item->tags != NULL)
+ {
+ g_free(item->tags);
+ item->tags = NULL;
+ }
+ if(item->splits != NULL)
+ {
+ da_split_destroy(item->splits);
+ item->splits = NULL;
+ item->flags &= ~(OF_SPLIT); //Flag that Splits are cleared
+ }
+ }
+ }
+
+
+ void da_archive_free(Archive *item)
+ {
- g_free(item);
++ if(rc_unref(item))
+ {
+ da_archive_clean(item);
++ rc_free(item);
+ }
+ }
+
+
Archive *da_archive_malloc(void)
{
Archive *item;
- item = g_malloc0(sizeof(Archive));
+ item = rc_alloc(sizeof(Archive));
item->key = 1;
return item;
}
Archive *da_archive_clone(Archive *src_item)
{
-Archive *new_item = g_memdup(src_item, sizeof(Archive));
+Archive *new_item = rc_dup(src_item, sizeof(Archive));
if(new_item)
{
}
- void da_archive_free(Archive *item)
- {
- if(rc_unref(item))
- {
- if(item->memo != NULL)
- g_free(item->memo);
- if(item->splits != NULL)
- da_split_destroy(item->splits);
- rc_free(item);
- }
- }
-
-
void da_archive_destroy(GList *list)
{
GList *tmplist = g_list_first(list);
#define HB_VERSION_MAJOR 5
#define HB_VERSION_MINOR 2
- #define HB_VERSION_MICRO 6
+ #define HB_VERSION_MICRO 7
- #define HB_VERSION "5.2.6"
+ #define HB_VERSION "5.2.7"
#define HB_VERSION_NUM (HB_VERSION_MAJOR*10000) + (HB_VERSION_MINOR*100) + HB_VERSION_MICRO
#define FILE_VERSION 1.3
- #define PREF_VERSION 526
+ #define PREF_VERSION 527
#if HB_UNSTABLE == FALSE
#define PROGNAME "HomeBank"
const gchar *homebank_app_get_locale_dir (void);
const gchar *homebank_app_get_help_dir (void);
const gchar *homebank_app_get_datas_dir (void);
+const gchar *homebank_app_get_pkglib_dir (void);
guint32 homebank_app_date_get_julian(void);
/* - - - - obsolete things - - - - */