Hi,

Am Sonntag, den 17.06.2007, 15:17 +0200 schrieb Christian Stimming:
> Currently gwenhyfar uses the $target setting (in m4/os.m4) to switch 
> OS-dependent things, just as all of Martin's packages do. If I understand the 
> latest message correctly, this should be changed and instead it should check 
> $host.  Would that be (more) correct?

Correct.

> Additionally I'd fully believe that a distinction between the build and the 
> host system should exist at various places throughout gwen/aqbankig, but 
> clearly it doesn't right now.

Tell us the places and maybe someone will take a look at it someday ;-)

Thanks for considering the attachments.

> Christian

-- andi5

Replace all target tests by ones for the host system type.  Host and
target would only differ if we were about to build a cross-compiler, but
using host is more precise nonetheless.  Use AC_CANONICAL_BUILD and
_HOST, but not _TARGET.

---
 ChangeLog    |    8 ++++++++
 configure.ac |    3 ++-
 m4/os.m4     |   10 +++++-----
 3 files changed, 15 insertions(+), 6 deletions(-)

Index: src/m4/os.m4
===================================================================
--- src.orig/m4/os.m4	2007-06-17 20:34:24.000000000 +0200
+++ src/m4/os.m4	2007-06-17 21:15:45.019140738 +0200
@@ -18,13 +18,13 @@
 dnl      OS_LINUX, OS_OPENBSD, OS_FREEBSD, OS_BEOS, OS_WIN32
 
 # check for OS
-AC_MSG_CHECKING([target system type])
+AC_MSG_CHECKING([host system type])
 OSYSTEM=""
 OS_TYPE=""
 MAKE_DLL_TARGET=""
 INSTALL_DLL_TARGET=""
-AC_DEFINE_UNQUOTED(OS_NAME,"$target", [target system])
-case "$target" in
+AC_DEFINE_UNQUOTED(OS_NAME,"$host", [host system])
+case "$host" in
     *-linux*)
 	OSYSTEM="linux"
 	AC_DEFINE(OS_LINUX,1,[if linux is used])
@@ -89,7 +89,7 @@
 	OS_TYPE="palmos"
         ;;
     *)
-	AC_MSG_WARN([Sorry, but target $target is not supported.
+	AC_MSG_WARN([Sorry, but host $host is not supported.
         Please report if it works anyway. We will assume that your system
         is a posix system and continue.])
 	OSYSTEM="unknown"
@@ -99,7 +99,7 @@
 esac
 
 AC_SUBST(OSYSTEM)
-AC_DEFINE_UNQUOTED(OS_SHORTNAME,"$OSYSTEM",[target system])
+AC_DEFINE_UNQUOTED(OS_SHORTNAME,"$OSYSTEM",[host system])
 AC_SUBST(OS_TYPE)
 AC_DEFINE_UNQUOTED(OS_TYPE,"$OS_TYPE",[system type])
 AC_SUBST(MAKE_DLL_TARGET)
Index: src/ChangeLog
===================================================================
--- src.orig/ChangeLog	2007-06-17 16:30:34.000000000 +0200
+++ src/ChangeLog	2007-06-17 21:05:55.529547641 +0200
@@ -3,6 +3,14 @@
   ! as soon as the next release of GnuCash is out (2.0.0)                !
   ------------------------------------------------------------------------
 
+2007-06-17  Andreas Köhler  <[EMAIL PROTECTED]>
+
+	* m4/os.m4: Replace all target tests by ones for the host system
+	type.  Host and target would only differ if we were about to build
+	a cross-compiler, but using host is more precise nonetheless.
+
+	* configure.ac: Use AC_CANONICAL_BUILD and _HOST, but not _TARGET
+
 ===========================================================================
 MARK: released gwenhywfar-2.6.0 (2007/06/09, r1225)
 ===========================================================================
Index: src/configure.ac
===================================================================
--- src.orig/configure.ac	2007-06-17 20:34:27.000000000 +0200
+++ src/configure.ac	2007-06-17 20:42:05.960081120 +0200
@@ -18,7 +18,8 @@
 
 AC_PREREQ(2.56)
 AC_INIT
-AC_CANONICAL_TARGET([])
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
 AC_CONFIG_SRCDIR([src/gwenhywfarapi.h])
 AC_CONFIG_HEADERS([config.h])
 
When searching for files and choosing the path separator, examine $build
instead of $host.

---
 ChangeLog         |    3 +++
 m4/searchfiles.m4 |    6 +++---
 2 files changed, 6 insertions(+), 3 deletions(-)

Index: src/m4/searchfiles.m4
===================================================================
--- src.orig/m4/searchfiles.m4	2007-06-17 21:53:45.777113728 +0200
+++ src/m4/searchfiles.m4	2007-06-17 21:53:59.209879217 +0200
@@ -12,9 +12,9 @@
 ls=$1
 ld="$2"
 for li in $ld; do
-    case "$OS_TYPE" in 
-      windows) fname="$li\\$ls" ;;
-      *)       fname="$li/$ls"  ;;
+    case "$build" in
+      *-win32*) fname="$li\\$ls" ;;
+      *)        fname="$li/$ls"  ;;
     esac
     
     if test -r "$fname"; then
Index: src/ChangeLog
===================================================================
--- src.orig/ChangeLog	2007-06-17 21:53:45.797114868 +0200
+++ src/ChangeLog	2007-06-17 21:53:59.213879445 +0200
@@ -5,6 +5,9 @@
 
 2007-06-17  Andreas Köhler  <[EMAIL PROTECTED]>
 
+	* m4/searchfiles.m4: When searching for files and choosing the
+	path separator, examine $build instead of $host.
+
 	* m4/os.m4: Replace all target tests by ones for the host system
 	type.  Host and target would only differ if we were about to build
 	a cross-compiler, but using host is more precise nonetheless.
For the gwentest libxml2 check and --cflags and --libs retrieval, use
pkg-config rather than xml2-config.

---
 ChangeLog    |    3 +++
 configure.ac |    8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

Index: src/configure.ac
===================================================================
--- src.orig/configure.ac	2007-06-17 21:59:39.157251714 +0200
+++ src/configure.ac	2007-06-17 22:00:04.690706783 +0200
@@ -399,12 +399,12 @@
 #
 # check for LibXML for test/gwentest.c
 #
-AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config, NO)
+AC_CHECK_PROG(PKG_CONFIG, pkg-config, pkg-config, NO)
 AC_MSG_CHECKING([whether LibXML2 example should be used])
-if test "x${XML2_CONFIG}" != "xNO"; then
+if test "x${PKG_CONFIG}" != "xNO" && $PKG_CONFIG --exists libxml-2.0; then
   AC_DEFINE(USE_LIBXML2, 1, [whether LibXML2 example should be used])
-  xml_includes="`${XML2_CONFIG} --cflags`"
-  xml_libraries="`${XML2_CONFIG} --libs`"
+  xml_includes="`${PKG_CONFIG} --cflags libxml-2.0`"
+  xml_libraries="`${PKG_CONFIG} --libs libxml-2.0`"
   AC_MSG_RESULT([yes])
 else
   AC_MSG_RESULT([no])
Index: src/ChangeLog
===================================================================
--- src.orig/ChangeLog	2007-06-17 21:59:41.465383247 +0200
+++ src/ChangeLog	2007-06-17 22:03:21.965948858 +0200
@@ -5,6 +5,9 @@
 
 2007-06-17  Andreas Köhler  <[EMAIL PROTECTED]>
 
+	* configure.ac: For the gwentest libxml2 check and --cflags and
+	--libs retrieval, use pkg-config rather than xml2-config.
+
 	* m4/searchfiles.m4: When searching for files and choosing the
 	path separator, examine $build instead of $host.
 
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Aqbanking-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aqbanking-devel

Reply via email to