Fix qof/test compilation errors, provide guard for glib_testing.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20107 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls 2011-01-15 19:11:42 +00:00
parent dc4ec4a8ea
commit 886cf5b4e5
5 changed files with 21 additions and 2 deletions

View File

@ -200,6 +200,17 @@ else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING([for GLib testing (glib >= 2.16.0)])
if $PKG_CONFIG 'glib-2.0 >= 2.16.0'
then
AC_MSG_RESULT(yes)
_have_glib_testing=yes
else
AC_MSG_RESULT(no)
_have_glib_testing=no
fi
AM_CONDITIONAL(HAVE_GLIB_TESTING, test "x$_have_glib_testing" = "xyes")
AC_CHECK_HEADERS(dirent.h dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h wctype.h)
# Gnucash replaced dlopen/dlsym by the g_module functions; dlsym
@ -1446,6 +1457,7 @@ AC_CONFIG_FILES(
src/import-export/aqbanking/schemas/Makefile
src/libqof/Makefile
src/libqof/qof/Makefile
src/libqof/qof/test/Makefile
src/optional/Makefile
src/optional/python-bindings/Makefile
src/optional/python-bindings/tests/Makefile

View File

@ -1,4 +1,8 @@
#SUBDIRS = test
if HAVE_GLIB_TESTING
SUBDIRS = . test
else
SUBDIRS = .
endif
lib_LTLIBRARIES = libgnc-qof.la

View File

@ -25,6 +25,7 @@
#include <qof.h>
static const gchar *suitename = "/qof/qofbook";
void test_suite_qofbook ( void );
typedef struct
{

View File

@ -24,6 +24,7 @@
#include <qof.h>
static const gchar *suitename = "/qof/qofinstance";
void test_suite_qofinstance ( void );
typedef struct
{

View File

@ -27,6 +27,7 @@
#include <qofsession-p.h>
static const gchar *suitename = "/qof/qofsession";
void test_suite_qofsession ( void );
typedef struct
{
@ -69,7 +70,7 @@ test_session_safe_save( Fixture *fixture, gconstpointer pData )
g_assert( NULL == qof_session_get_url( fixture->session ));
}
GTestSuite*
void
test_suite_qofsession ( void )
{
g_test_add( suitename, Fixture, NULL, setup, test_session_safe_save, teardown );