2004-09-04 Christian Stimming <stimming@tuhh.de>

* src/import-export/hbci/*.h, *.c, macros/aqbanking.m4,
	configure.in: Major change for HBCI. It is no longer based on the
	openhbci2 library but instead on the aqbanking library
	http://sf.net/projects/aqbanking which is Martin Preuss' successor
	of openhbci2. This means that now aqbanking-0.9.2 is required
	instead of any of the openhbci[2] package. Still needs more
	testing, though.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10256 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming
2004-09-04 12:03:31 +00:00
parent eded6e8bd2
commit d7768d2aed
29 changed files with 964 additions and 5055 deletions

View File

@@ -30,7 +30,8 @@ MACROS= \
gperf-check.m4 \
linger.m4 \
need-declaration.m4 \
openhbci.m4
openhbci.m4 \
aqbanking.m4
EXTRA_DIST=$(MACROS) gnome-common.m4 autogen.sh
MAINTAINERCLEANFILES=macros.dep

126
macros/aqbanking.m4 Normal file
View File

@@ -0,0 +1,126 @@
# $Id$
# (c) 2004 Martin Preuss<martin@libchipcard.de>
# This function checks for AqBanking
AC_DEFUN(AC_AQBANKING, [
dnl searches for aqbanking
dnl Arguments:
dnl $1: major version minimum
dnl $2: minor version minimum
dnl $3: patchlevel version minimum
dnl $4: build version minimum
dnl Returns: aqbanking_dir
dnl aqbanking_libs
dnl aqbanking_libspp
dnl aqbanking_data
dnl aqbanking_plugins
dnl aqbanking_includes
dnl have_aqbanking
if test -z "$1"; then vma="0"; else vma="$1"; fi
if test -z "$2"; then vmi="1"; else vmi="$2"; fi
if test -z "$3"; then vpl="0"; else vpl="$3"; fi
if test -z "$4"; then vbld="0"; else vbld="$4"; fi
AC_MSG_CHECKING(if aqbanking support desired)
AC_ARG_ENABLE(aqbanking,
[ --enable-aqbanking enable aqbanking support (default=yes)],
enable_aqbanking="$enableval",
enable_aqbanking="yes")
AC_MSG_RESULT($enable_aqbanking)
have_aqbanking="no"
aqbanking_dir=""
aqbanking_data=""
aqbanking_plugins=""
aqbanking_libs=""
aqbanking_libspp=""
aqbanking_includes=""
if test "$enable_aqbanking" != "no"; then
AC_MSG_CHECKING(for aqbanking)
AC_ARG_WITH(aqbanking-dir, [ --with-aqbanking-dir=DIR
uses aqbanking from given dir],
[lcc_dir="$withval"],
[lcc_dir="${prefix} \
/usr/local \
/usr \
/"])
for li in $lcc_dir; do
if test -x "$li/bin/aqbanking-config"; then
aqbanking_dir="$li";
break
fi
done
if test -z "$aqbanking_dir"; then
AC_MSG_RESULT([not found ])
AC_MSG_ERROR([
*** The library AqBanking was not found. Obtain it from
*** http://www.aquamaniac.de.
*** If it is already installed (including the -devel package),
*** you might need to specify the location with the
*** option --with-aqbanking-dir=DIR.])
else
AC_MSG_RESULT($aqbanking_dir)
AC_MSG_CHECKING(for aqbanking libs)
aqbanking_libs="`$aqbanking_dir/bin/aqbanking-config --libraries`"
AC_MSG_RESULT($aqbanking_libs)
AC_MSG_CHECKING(for aqbanking C++ libs)
aqbanking_libspp="`$aqbanking_dir/bin/aqbanking-config --libraries++`"
AC_MSG_RESULT($aqbanking_libspp)
AC_MSG_CHECKING(for aqbanking includes)
aqbanking_includes="`$aqbanking_dir/bin/aqbanking-config --includes`"
AC_MSG_RESULT($aqbanking_includes)
AC_MSG_CHECKING(for aqbanking plugins)
aqbanking_plugins="`$aqbanking_dir/bin/aqbanking-config --plugins`"
AC_MSG_RESULT($aqbanking_plugins)
AC_MSG_CHECKING(for aqbanking data)
aqbanking_data="`$aqbanking_dir/bin/aqbanking-config --data`"
AC_MSG_RESULT($aqbanking_data)
fi
AC_MSG_CHECKING(if aqbanking test desired)
AC_ARG_ENABLE(aqbanking,
[ --enable-aqbanking-test enable aqbanking-test (default=yes)],
enable_aqbanking_test="$enableval",
enable_aqbanking_test="yes")
AC_MSG_RESULT($enable_aqbanking_test)
AC_MSG_CHECKING(for AqBanking version >=$vma.$vmi.$vpl.$vbld)
if test "$enable_aqbanking_test" != "no"; then
aqbanking_versionstring="`$aqbanking_dir/bin/aqbanking-config --vstring`.`$aqbanking_dir/bin/aqbanking-config --vbuild`"
AC_MSG_RESULT([found $aqbanking_versionstring])
if test "$vma" -gt "`$aqbanking_dir/bin/aqbanking-config --vmajor`"; then
AC_MSG_ERROR([Your AqBanking version is way too old.
Please update from http://www.aquamaniac.de/aqbanking/])
elif test "$vma" = "`$aqbanking_dir/bin/aqbanking-config --vmajor`"; then
if test "$vmi" -gt "`$aqbanking_dir/bin/aqbanking-config --vminor`"; then
AC_MSG_ERROR([Your AqBanking version is too old.
Please update from http://www.aquamaniac.de/aqbanking/])
elif test "$vmi" = "`$aqbanking_dir/bin/aqbanking-config --vminor`"; then
if test "$vpl" -gt "`$aqbanking_dir/bin/aqbanking-config --vpatchlevel`"; then
AC_MSG_ERROR([Your AqBanking version is a little bit too old.
Please update from http://www.aquamaniac.de/aqbanking/])
elif test "$vpl" = "`$aqbanking_dir/bin/aqbanking-config --vpatchlevel`"; then
if test "$vbld" -gt "`$aqbanking_dir/bin/aqbanking-config --vbuild`"; then
AC_MSG_ERROR([Your AqBanking version is a little bit too old.
Please update to the latest CVS version. Instructions for accessing
CVS can be found on http://www.aquamaniac.de/aqbanking/])
fi
fi
fi
fi
have_aqbanking="yes"
#AC_MSG_RESULT(yes)
else
have_aqbanking="yes"
AC_MSG_RESULT(assuming yes)
fi
dnl end of "if enable-aqbanking"
fi
AC_SUBST(aqbanking_dir)
AC_SUBST(aqbanking_plugins)
AC_SUBST(aqbanking_libs)
AC_SUBST(aqbanking_libspp)
AC_SUBST(aqbanking_data)
AC_SUBST(aqbanking_includes)
])

View File

@@ -1,196 +0,0 @@
# Configure paths for OpenHBCI
# by Christian Stimming 2002-07-30, updated 2003-05-09
# Copied from glib-2.0.m4 by Owen Taylor 1997-2001
dnl AM_PATH_OPENHBCI2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for OPENHBCI, and define OPENHBCI_CFLAGS, OPENHBCI_CXXFLAGS and OPENHBCI_LIBS
dnl
AC_DEFUN(AM_PATH_OPENHBCI2, [
dnl
dnl Get the c[xx]flags and libraries from openhbci2-config
dnl
AC_MSG_CHECKING(for OpenHBCI)
AC_ARG_ENABLE(openhbcitest, [ --disable-openhbcitest do not try to compile and run a test OpenHBCI program],
, enable_openhbcitest=yes)
AC_ARG_WITH( openhbci-prefix,
[ --with-openhbci-prefix=PFX Prefix where OpenHBCI is installed],
OPENHBCI_PREFIX="$with_openhbci_prefix",
OPENHBCI_PREFIX="${prefix} \
/usr/local \
/usr/local/openhbci \
/usr")
hbci_config=""
for li in $OPENHBCI_PREFIX; do
if test -x "${li}/bin/openhbci2-config"; then
hbci_config="${li}/bin/openhbci2-config"
hbci_dir="${li}"
break
fi
done
if test -x "${hbci_config}" ; then
OPENHBCI_LIBS="`${hbci_config} --libraries`"
OPENHBCI_CFLAGS="`${hbci_config} --includes`"
OPENHBCI_CXXFLAGS="`${hbci_config} --includes`"
OPENHBCI_PLUGINS="`${hbci_config} --plugins`"
else
AC_MSG_ERROR([
Could not find bin/openhbci2-config in prefix ${OPENHBCI_PREFIX}.
Please specify the right path by --with-openhbci-prefix=PREFIX.
])
fi
AC_MSG_RESULT($hbci_dir)
min_openhbci_version=ifelse([$1], ,0.9.0.0,$1)
AC_MSG_CHECKING(for OpenHBCI - version >= $min_openhbci_version)
dnl AC_LANG_PUSH(C++) -- DON'T use C++ here!!!
if test "x$enable_openhbcitest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $OPENHBCI_CFLAGS"
LIBS="$OPENHBCI_LIBS $LIBS"
dnl
dnl Now check if the installed OpenHBCI is sufficiently new. (Also sanity
dnl checks the results of path guessing to some extent)
dnl
rm -f conf.openhbcitest
AC_TRY_RUN([
#include <openhbci2.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifndef OPENHBCI_VERSION_BUILD
# define OPENHBCI_VERSION_BUILD 0
#endif
int
main ()
{
int major, minor, micro, build;
int getmajor, getminor, getmicro, getbuild;
char *tmp_version;
system ("touch conf.openhbcitest");
/* HP/UX 9 writes to sscanf strings */
tmp_version = strdup("$min_openhbci_version");
build=0;
if (sscanf(tmp_version, "%d.%d.%d.%d", &major, &minor, &micro, &build) != 4)
{
build = 0;
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3)
{
micro = 0;
if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2)
{
minor = 0;
if (sscanf(tmp_version, "%d", &major) != 1)
{
printf("\n*** AM PATH OPENHBCI: bad version string: %s\n", "$min_openhbci_version");
exit(1);
}
}
}
}
HBCI_Hbci_libraryVersion_build(&getmajor, &getminor, &getmicro, &getbuild);
if ((getmajor != OPENHBCI_VERSION_MAJOR) ||
(getminor != OPENHBCI_VERSION_MINOR) ||
(getmicro != OPENHBCI_VERSION_PATCHLEVEL) ||
(getbuild != OPENHBCI_VERSION_BUILD))
{
printf("\n*** OpenHBCI header files openhbci2.h "
"(version %d.%d.%d build %d) do not match\n",
OPENHBCI_VERSION_MAJOR,
OPENHBCI_VERSION_MINOR,
OPENHBCI_VERSION_PATCHLEVEL,
OPENHBCI_VERSION_BUILD);
printf("*** installed library libopenhbci.so "
"(version %d.%d.%d build %d)\n",
getmajor, getminor, getmicro, getbuild);
exit(1);
}
else
{
if ((getmajor > major) ||
((getmajor == major) && (getminor > minor)) ||
((getmajor == major) && (getminor == minor) && (getmicro > micro)) ||
((getmajor == major) && (getminor == minor) &&
(getmicro == micro) && (getbuild >= build)))
{
return 0;
}
else
{
printf("\n*** An old version of OpenHBCI (%d.%d.%d build %d) was found.\n",
getmajor, getminor, getmicro, getbuild);
printf("*** You need OpenHBCI in version %d.%d.%d build %d or newer. The latest\n",
major, minor, micro, build);
printf("*** version of OpenHBCI is always available from http://www.openhbci.de.\n");
if (build > 0)
printf("*** Note: The non-zero build number '%d' indicates that the latest CVS \n"
"*** version of openhbci is required.\n", build);
printf("***\n"
"*** If you have already installed a sufficiently new version, this error\n"
"*** probably means that you need to specify the right path by\n"
"*** --with-openhbci-prefix=PATH. (Also, check that your LD_LIBRARY_PATH\n"
"*** enviroment variable is correct, or edit /etc/ld.so.conf\n"
"*** so that the correct libraries are found at run-time)\n");
}
}
return 1;
}
],, no_openhbci=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "x$no_openhbci" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test -f conf.openhbcitest ; then
:
else
echo "*** Could not run OpenHBCI test program, checking why..."
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $OPENHBCI_CFLAGS"
LIBS="$LIBS $OPENHBCI_LIBS"
AC_TRY_LINK([
#include <openhbci2.h>
#include <stdio.h>
], [ return ((OPENHBCI_VERSION_MAJOR) || (OPENHBCI_VERSION_MINOR)); ],
[ echo "***"
echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding OpenHBCI or finding the wrong"
echo "*** version of OpenHBCI. If it is not finding OpenHBCI, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system."
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH."
echo "***" ],
[ echo "***"
echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means OpenHBCI is incorrectly installed."])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
OPENHBCI_CFLAGS=""
OPENHBCI_LIBS=""
ifelse([$3], , :, [$3])
exit 1;
fi
AC_SUBST(OPENHBCI_CFLAGS)
AC_SUBST(OPENHBCI_LIBS)
AC_SUBST(OPENHBCI_CXXFLAGS)
AC_SUBST(OPENHBCI_PLUGINS)
dnl AC_LANG_POP(C++)
rm -f conf.openhbcitest
])