mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* src/FileDialog.c (gncFileNew): clear the non-iso commodities
* src/engine/gnc-commodity.c (gnc_commodity_table_remove_non_iso): new func * src/test/test-xml-commodity.c: remove duplicate string_to_integer * src/gnome/dialog-userpass.c: add missing #include * src/register/gnome/Makefile.am: add gnome & glib flags * src/engine/Makefile.am: add glib libs * src/engine/sql/Makefile.am: add glib flags * configure.in: fix includes used to check for sizes * acinclude.m4: fix guppi macro * macros/: update m4 files git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3776 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
23
ChangeLog
23
ChangeLog
@@ -1,3 +1,26 @@
|
||||
2001-03-13 Dave Peticolas <dave@krondo.com>
|
||||
|
||||
* src/FileDialog.c (gncFileNew): clear the non-iso commodities
|
||||
|
||||
* src/engine/gnc-commodity.c (gnc_commodity_table_remove_non_iso):
|
||||
new func
|
||||
|
||||
* src/test/test-xml-commodity.c: remove duplicate string_to_integer
|
||||
|
||||
* src/gnome/dialog-userpass.c: add missing #include
|
||||
|
||||
* src/register/gnome/Makefile.am: add gnome & glib flags
|
||||
|
||||
* src/engine/Makefile.am: add glib libs
|
||||
|
||||
* src/engine/sql/Makefile.am: add glib flags
|
||||
|
||||
* configure.in: fix includes used to check for sizes
|
||||
|
||||
* acinclude.m4: fix guppi macro
|
||||
|
||||
* macros/: update m4 files
|
||||
|
||||
2001-03-13 James LewisMoss <jimdres@mindspring.com>
|
||||
|
||||
* src/engine/io-gncxml-v2.c (gnc_counter_end_handler): complete
|
||||
|
||||
@@ -124,8 +124,8 @@ AC_ARG_ENABLE(libguppitest, [ --disable-libguppitest Do not try to compil
|
||||
if test "$GNOME_CONFIG" = "no" ; then
|
||||
no_libguppi=yes
|
||||
else
|
||||
LIBGUPPI_CFLAGS=`$GNOME_CONFIG $libguppiconf_args --cflags libguppi`
|
||||
LIBGUPPI_LIBS=`$GNOME_CONFIG $libguppiconf_args --libs libguppi`
|
||||
LIBGUPPI_CFLAGS=`$GNOME_CONFIG $libguppiconf_args --cflags gtk libguppi`
|
||||
LIBGUPPI_LIBS=`$GNOME_CONFIG $libguppiconf_args --libs gtk libguppi`
|
||||
|
||||
libguppi_major_version=`$GNOME_CONFIG --modversion libguppi | \
|
||||
sed 's/libguppi-\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
|
||||
@@ -481,7 +481,7 @@ AC_SUBST(G_WRAP_MODULE_DIR)
|
||||
### Check size of long_long - some guile's are broken.
|
||||
AC_MSG_CHECKING(if guile long_long is at least as big as gint64)
|
||||
GNC_OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="${GNOME_INCLUDEDIR} ${GUILE_INCS} ${CFLAGS}"
|
||||
CFLAGS="${GNOME_INCLUDEDIR} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
|
||||
AC_TRY_RUN([
|
||||
#include <glib.h>
|
||||
#include <libguile/__scm.h>
|
||||
@@ -501,7 +501,7 @@ CFLAGS="$GNC_OLDCFLAGS"
|
||||
# unless you've done sufficient code review/testing.
|
||||
AC_MSG_CHECKING(if unsigned long is at least as big as guint32)
|
||||
GNC_OLDCFLAGS="$CFLAGS"
|
||||
CFLAGS="${GNOME_INCLUDEDIR} ${GUILE_INCS} ${CFLAGS}"
|
||||
CFLAGS="${GNOME_INCLUDEDIR} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
|
||||
AC_TRY_RUN([
|
||||
#include <glib.h>
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
@@ -86,7 +86,7 @@ dnl /*=== End new stuff for acconfig.h ===*/
|
||||
dnl
|
||||
|
||||
|
||||
AC_DEFUN(AC_CHECK_CURSES,[
|
||||
AC_DEFUN([AC_CHECK_CURSES],[
|
||||
search_ncurses=true
|
||||
screen_manager=""
|
||||
has_curses=false
|
||||
@@ -150,7 +150,7 @@ AC_DEFUN(AC_CHECK_CURSES,[
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN(AC_USE_SUNOS_CURSES, [
|
||||
AC_DEFUN([AC_USE_SUNOS_CURSES], [
|
||||
search_ncurses=false
|
||||
screen_manager="SunOS 4.x /usr/5include curses"
|
||||
AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses)
|
||||
@@ -164,7 +164,7 @@ AC_DEFUN(AC_USE_SUNOS_CURSES, [
|
||||
AC_MSG_RESULT(Please note that some screen refreshs may fail)
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_USE_OSF1_CURSES, [
|
||||
AC_DEFUN([AC_USE_OSF1_CURSES], [
|
||||
AC_MSG_RESULT(Using OSF1 curses)
|
||||
search_ncurses=false
|
||||
screen_manager="OSF1 curses"
|
||||
@@ -175,7 +175,7 @@ AC_DEFUN(AC_USE_OSF1_CURSES, [
|
||||
CURSES_LIBS="-lcurses"
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_USE_SYSV_CURSES, [
|
||||
AC_DEFUN([AC_USE_SYSV_CURSES], [
|
||||
AC_MSG_RESULT(Using SysV curses)
|
||||
AC_DEFINE(HAS_CURSES)
|
||||
has_curses=true
|
||||
@@ -210,7 +210,7 @@ dnl)
|
||||
dnl
|
||||
dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename
|
||||
dnl
|
||||
AC_DEFUN(AC_NCURSES, [
|
||||
AC_DEFUN([AC_NCURSES], [
|
||||
if $search_ncurses
|
||||
then
|
||||
if test -f $1/$2
|
||||
@@ -227,7 +227,7 @@ AC_DEFUN(AC_NCURSES, [
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_SEARCH_NCURSES, [
|
||||
AC_DEFUN([AC_SEARCH_NCURSES], [
|
||||
AC_CHECKING("location of ncurses.h file")
|
||||
|
||||
AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include")
|
||||
|
||||
@@ -41,8 +41,8 @@ AC_ARG_ENABLE(bonobotest, [ --disable-bonobotest Do not try to compile an
|
||||
if test "$GNOME_CONFIG" = "no" ; then
|
||||
no_bonobo=yes
|
||||
else
|
||||
BONOBO_CFLAGS=`$GNOME_CONFIG $bonoboconf_args --cflags bonobo`
|
||||
BONOBO_LIBS=`$GNOME_CONFIG $bonoboconf_args --libs bonobo`
|
||||
BONOBO_CFLAGS=`$GNOME_CONFIG $bonoboconf_args --cflags bonobo bonobox`
|
||||
BONOBO_LIBS=`$GNOME_CONFIG $bonoboconf_args --libs bonobo bonobox`
|
||||
|
||||
bonobo_major_version=`$GNOME_CONFIG $bonobo_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
dnl GNOME_CHECK_CXX(not_found_string)
|
||||
AC_DEFUN(GNOME_CHECK_CXX,
|
||||
AC_DEFUN([GNOME_CHECK_CXX],
|
||||
[
|
||||
# see if a C++ compiler exists and works
|
||||
AC_REQUIRE([AC_PROG_CXX])dnl
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
# serial 5
|
||||
|
||||
AC_DEFUN(AM_GNOME_WITH_NLS,
|
||||
AC_DEFUN([AM_GNOME_WITH_NLS],
|
||||
[AC_MSG_CHECKING([whether NLS is requested])
|
||||
dnl Default is enabled NLS
|
||||
AC_ARG_ENABLE(nls,
|
||||
@@ -25,7 +25,7 @@ AC_DEFUN(AM_GNOME_WITH_NLS,
|
||||
|
||||
dnl If we use NLS figure out what method
|
||||
if test "$USE_NLS" = "yes"; then
|
||||
AC_DEFINE(ENABLE_NLS)
|
||||
# AC_DEFINE(ENABLE_NLS)
|
||||
# AC_MSG_CHECKING([whether included gettext is requested])
|
||||
# AC_ARG_WITH(included-gettext,
|
||||
# [ --with-included-gettext use the GNU gettext library included here],
|
||||
@@ -210,7 +210,7 @@ AC_DEFUN(AM_GNOME_WITH_NLS,
|
||||
AC_SUBST(POSUB)
|
||||
])
|
||||
|
||||
AC_DEFUN(AM_GNOME_GETTEXT,
|
||||
AC_DEFUN([AM_GNOME_GETTEXT],
|
||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
|
||||
@@ -6,7 +6,7 @@ dnl that we need to #include some other header files on some
|
||||
dnl systems to get some types.
|
||||
|
||||
dnl AC_LIBGTOP_CHECK_TYPE(TYPE, DEFAULT)
|
||||
AC_DEFUN(AC_LIBGTOP_CHECK_TYPE,
|
||||
AC_DEFUN([AC_LIBGTOP_CHECK_TYPE],
|
||||
[AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||
AC_MSG_CHECKING(for $1)
|
||||
AC_CACHE_VAL(ac_cv_type_$1,
|
||||
|
||||
@@ -3,19 +3,18 @@ dnl GNOME_PILOT_HOOK(script if found, fail)
|
||||
dnl if fail = "failure", abort if gnome-pilot not found
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl
|
||||
|
||||
GNOME_PILOT_CFLAGS=
|
||||
GNOME_PILOT_LIBS=
|
||||
PISOCK_INCLUDEDIR=
|
||||
PISOCK_CFLAGS=
|
||||
PISOCK_LIBS=
|
||||
PILOT_BINS=
|
||||
PILOT_LIBS=
|
||||
|
||||
AC_SUBST(GNOME_PILOT_CFLAGS)
|
||||
AC_SUBST(GNOME_PILOT_LIBS)
|
||||
AC_SUBST(PISOCK_INCLUDEDIR)
|
||||
AC_SUBST(PISOCK_CFLAGS)
|
||||
AC_SUBST(PISOCK_LIBS)
|
||||
AC_SUBST(PILOT_BINS)
|
||||
AC_SUBST(PILOT_LIBS)
|
||||
|
||||
AC_DEFUN([PILOT_LINK_HOOK],[
|
||||
AC_ARG_WITH(pisock,
|
||||
@@ -24,51 +23,64 @@ AC_DEFUN([PILOT_LINK_HOOK],[
|
||||
dnl Note that an empty true branch is not valid sh syntax.
|
||||
ifelse([$1], [], :, [$1])
|
||||
else
|
||||
PISOCK_INCLUDEDIR="-I$withval/include"
|
||||
PISOCK_LIBDIR="-L$withval/lib"
|
||||
PISOCK_LIBS="-lpisock"
|
||||
PISOCK_CFLAGS="-I$withval/include"
|
||||
incdir="$withval/include"
|
||||
PISOCK_LIBS="-L$withval/lib -lpisock"
|
||||
AC_MSG_CHECKING("for existance of $withval/lib/libpisock.so")
|
||||
if test -r $withval/lib/libpisock.so; then
|
||||
AC_MSG_RESULT("yes")
|
||||
else
|
||||
AC_MSG_ERROR("Unable to find libpisock. Try ftp://ryeham.ee.ryerson.ca/pub/PalmOS/.")
|
||||
fi
|
||||
AC_SUBST(PISOCK_INCLUDEDIR)
|
||||
AC_SUBST(PISOCK_LIBDIR)
|
||||
fi
|
||||
])
|
||||
|
||||
if test x$PISOCK_INCLUDEDIR = x; then
|
||||
AC_CHECK_HEADER(pi-version.h, [], [
|
||||
AC_CHECK_HEADER(libpisock/pi-version.h, [PISOCK_INCLUDEDIR="-I/usr/include/libpisock"
|
||||
piversion_include="libpisock/pi-version.h"],
|
||||
AC_MSG_ERROR("Unable to find pi-version.h")) ])
|
||||
if test x$PISOCK_CFLAGS = x; then
|
||||
AC_CHECK_HEADER(pi-version.h, [incdir="/usr/include"], [
|
||||
AC_CHECK_HEADER(libpisock/pi-version.h, [PISOCK_CFLAGS="-I/usr/include/libpisock"
|
||||
piversion_include="libpisock/pi-version.h"
|
||||
incdir="/usr/inlude/libpisock"
|
||||
], [
|
||||
AC_CHECK_HEADER($prefix/include/pi-version.h, [PISOCK_CFLAGS="-I$prefix/include/libpisock"
|
||||
piversion_include="$prefix/include/pi-version.h"
|
||||
if test x$PISOCK_LIBDIR = x; then
|
||||
echo Assuming libpisock in $prefix/lib
|
||||
incdir="$prefix/include"
|
||||
PISOCK_LIBS="-L$prefix/lib -lpisock"
|
||||
fi ],
|
||||
AC_MSG_ERROR("Unable to find pi-version.h"))
|
||||
])
|
||||
])
|
||||
fi
|
||||
|
||||
AC_SUBST(PISOCK_INCLUDEDIR)
|
||||
|
||||
if test x$PISOCK_LIBDIR = x; then
|
||||
|
||||
if test "x$PISOCK_LIBS" = "x"; then
|
||||
AC_CHECK_LIB(pisock, pi_accept, [ PISOCK_LIBS=-lpisock ],
|
||||
[ AC_MSG_ERROR("Unable to find libpisock. Try ftp://ryeham.ee.ryerson.ca/pub/PalmOS/.") ])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(pilotlinktest,
|
||||
[ --enable-pilotlinktest Test for correct version of pilot-link],
|
||||
[ --enable-pilotlinktest Test for correct version of pilot-link],
|
||||
[testplversion=$enableval],
|
||||
[ testplversion=yes ]
|
||||
)
|
||||
|
||||
if test x$piversion_include = x; then
|
||||
piversion_include="pi-version.h"
|
||||
pi_version=`cat $incdir/pi-version.h|grep PILOT_LINK_VERSION|sed 's/#define PILOT_LINK_VERSION \([[0-9]]*\)/\1/'`
|
||||
pi_major=`cat $incdir/pi-version.h|grep PILOT_LINK_MAJOR|sed 's/#define PILOT_LINK_MAJOR \([[0-9]]*\)/\1/'`
|
||||
pi_minor=`cat $incdir/pi-version.h|grep PILOT_LINK_MINOR|sed 's/#define PILOT_LINK_MINOR \([[0-9]]*\)/\1/'`
|
||||
pi_patch=`cat $incdir/pi-version.h|grep PILOT_LINK_PATCH|sed 's/#define PILOT_LINK_PATCH \"\(.*\)\"/\1/'`
|
||||
fi
|
||||
|
||||
PILOT_LINK_VERSION="$pi_version.$pi_major.$pi_minor$pi_patch"
|
||||
|
||||
if test x$testplversion = xyes; then
|
||||
AC_MSG_CHECKING(for pilot-link version >= $1)
|
||||
pl_ve=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
pl_ma=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
pl_mi=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
CFLAGS_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $PISOCK_INCLUDEDIR"
|
||||
CFLAGS="$CFLAGS $PISOCK_CFLAGS"
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
#include <$piversion_include>
|
||||
@@ -87,12 +99,24 @@ AC_DEFUN([PILOT_LINK_HOOK],[
|
||||
exit(1);
|
||||
}
|
||||
],
|
||||
[AC_MSG_RESULT(yes)],
|
||||
[AC_MSG_RESULT(yes (found $PILOT_LINK_VERSION))],
|
||||
[AC_MSG_ERROR("pilot-link >= $1 required")],
|
||||
[AC_MSG_WARN("No action taken for crosscompile")]
|
||||
)
|
||||
CFLAGS="$CFLAGS_save"
|
||||
fi
|
||||
|
||||
PISOCK_CFLAGS="$PISOCK_CFLAGS -DGP_PILOT_LINK_VERSION=\\\"$PILOT_LINK_VERSION\\\""
|
||||
|
||||
unset piversion_include
|
||||
unset pi_verion
|
||||
unset pi_major
|
||||
unset pi_minor
|
||||
unset pi_patch
|
||||
unset incdir
|
||||
unset pl_mi
|
||||
unset pl_ma
|
||||
unset pl_ve
|
||||
])
|
||||
|
||||
AC_DEFUN([PILOT_LINK_CHECK],[
|
||||
@@ -129,7 +153,7 @@ AC_DEFUN([GNOME_PILOT_HOOK],[
|
||||
|
||||
AC_DEFUN([GNOME_PILOT_CHECK],[
|
||||
if test x$1 = x; then
|
||||
GNOME_PILOT_HOOK(0.9.3,[],nofailure)
|
||||
GNOME_PILOT_HOOK(0.9.5,[],nofailure)
|
||||
else
|
||||
GNOME_PILOT_HOOK($1,[],nofailure)
|
||||
fi
|
||||
|
||||
@@ -8,164 +8,56 @@
|
||||
dnl AM_PATH_GNOME_PRINT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
|
||||
dnl Test for GNOME-PRINT, and define GNOME_PRINT_CFLAGS and GNOME_PRINT_LIBS
|
||||
dnl
|
||||
AC_DEFUN(AM_PATH_GNOME_PRINT,
|
||||
[dnl
|
||||
dnl Get the cflags and libraries from the gnome-config script
|
||||
dnl
|
||||
AC_ARG_WITH(gnome-print-prefix,[ --with-gnome-print-prefix=PFX Prefix where GNOME-PRINT is installed (optional)],
|
||||
gnome_print_prefix="$withval", gnome_print_prefix="")
|
||||
AC_ARG_WITH(gnome-print-exec-prefix,[ --with-gnome-print-exec-prefix=PFX Exec prefix where GNOME-PRINT is installed (optional)],
|
||||
gnome_print_exec_prefix="$withval", gnome_print_exec_prefix="")
|
||||
AC_ARG_ENABLE(gnome-printtest, [ --disable-gnome-printtest Do not try to compile and run a test GNOME-PRINT program],
|
||||
, enable_gnome_printtest=yes)
|
||||
AC_DEFUN([AM_PATH_GNOME_PRINT],
|
||||
[
|
||||
min_version=ifelse([$1],,0.21,$1)
|
||||
|
||||
if test x$gnome_print_exec_prefix != x ; then
|
||||
gnome_print_args="$gnome_print_args --exec-prefix=$gnome_print_exec_prefix"
|
||||
if test x${GNOME_CONFIG+set} != xset ; then
|
||||
GNOME_CONFIG=$gnome_print_exec_prefix/bin/gnome-config
|
||||
fi
|
||||
fi
|
||||
if test x$gnome_print_prefix != x ; then
|
||||
gnome_print_args="$gnome_print_args --prefix=$gnome_print_prefix"
|
||||
if test x${GNOME_CONFIG+set} != xset ; then
|
||||
GNOME_CONFIG=$gnome_print_prefix/bin/gnome-config
|
||||
fi
|
||||
fi
|
||||
gnome_print_ok=""
|
||||
|
||||
AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
|
||||
min_gnome_print_version=ifelse([$1], ,0.1.0,$1)
|
||||
AC_MSG_CHECKING(for GNOME-PRINT - version >= $min_gnome_print_version)
|
||||
no_gnome_print=""
|
||||
if test "$GNOME_CONFIG" = "no" ; then
|
||||
no_gnome_print=yes
|
||||
AC_MSG_RESULT(gnome-config is missing, check your gnome installation)
|
||||
else
|
||||
GNOME_PRINT_CFLAGS=`$GNOME_CONFIG $gnome_printconf_args --cflags print`
|
||||
GNOME_PRINT_LIBS=`$GNOME_CONFIG $gnome_printconf_args --libs print`
|
||||
|
||||
gnome_print_major_version=`$GNOME_CONFIG $gnome_print_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
|
||||
gnome_print_minor_version=`$GNOME_CONFIG $gnome_print_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
|
||||
gnome_print_micro_version=`$GNOME_CONFIG $gnome_print_config_args --version | \
|
||||
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
|
||||
if test "x$enable_gnome_printtest" = "xyes" ; then
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS $GNOME_PRINT_CFLAGS"
|
||||
LIBS="$LIBS $GNOME_PRINT_LIBS"
|
||||
dnl
|
||||
dnl Now check if the installed GNOME-PRINT is sufficiently new. (Also sanity
|
||||
dnl checks the results of gnome-config to some extent
|
||||
dnl
|
||||
rm -f conf.gnome_printtest
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libgnomeprint/gnome-print.h>
|
||||
|
||||
static char*
|
||||
my_strdup (char *str)
|
||||
{
|
||||
char *new_str;
|
||||
|
||||
if (str)
|
||||
{
|
||||
new_str = malloc ((strlen (str) + 1) * sizeof(char));
|
||||
strcpy (new_str, str);
|
||||
}
|
||||
else
|
||||
new_str = NULL;
|
||||
|
||||
return new_str;
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
int major, minor, micro;
|
||||
char *tmp_version;
|
||||
|
||||
system ("touch conf.gnome_printtest");
|
||||
|
||||
/* HP/UX 9 (%@#!) writes to sscanf strings */
|
||||
tmp_version = my_strdup("$min_gnome_print_version");
|
||||
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
|
||||
printf("%s, bad version string\n", "$min_gnome_print_version");
|
||||
exit(1);
|
||||
}
|
||||
return 0;
|
||||
#if 0
|
||||
if (($gnome_print_major_version > major) ||
|
||||
(($gnome_print_major_version == major) && ($gnome_print_minor_version > minor)) ||
|
||||
(($gnome_print_major_version == major) && ($gnome_print_minor_version == minor) && ($gnome_print_micro_version >= micro)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("\n*** 'gnome-config print --version' returned %d.%d.%d, but the minimum version\n", $gnome_print_major_version, $gnome_print_minor_version, $gnome_print_micro_version);
|
||||
printf("*** of GNOME-PRINT required is %d.%d.%d. If gnome-config is correct, then it is\n", major, minor, micro);
|
||||
printf("*** best to upgrade to the required version.\n");
|
||||
printf("*** If gnome-config was wrong, set the environment variable GNOME_CONFIG\n");
|
||||
printf("*** to point to the correct copy of gnome-config, and remove the file\n");
|
||||
printf("*** config.cache before re-running configure\n");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
],, no_gnome_print=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
AC_MSG_CHECKING(for GNOME-PRINT - version >= $min_version)
|
||||
if `$GNOME_CONFIG --libs print > /dev/null 2>&1`; then
|
||||
rqmajor=$(echo "$min_version" | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/')
|
||||
rqminor=$(echo "$min_version" | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/')
|
||||
major=$($GNOME_CONFIG --modversion print | sed -e 's/gnome-print-//' | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/')
|
||||
minor=$($GNOME_CONFIG --modversion print | sed -e 's/gnome-print-//' | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/')
|
||||
if test "$major" -ge "$rqmajor"; then
|
||||
if test "$major" -gt "$rqmajor"; then
|
||||
AC_MSG_RESULT("found $major.$minor")
|
||||
gnome_print_ok="yes"
|
||||
else
|
||||
if test "$minor" -ge "$rqminor"; then
|
||||
AC_MSG_RESULT("found $major.$minor")
|
||||
gnome_print_ok="yes"
|
||||
else
|
||||
AC_MSG_RESULT("you have $major.$minor")
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT("you have $major.$minor")
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT("did not find any version")
|
||||
fi
|
||||
fi
|
||||
if test "x$no_gnome_print" = x ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ifelse([$2], , :, [$2])
|
||||
|
||||
if test "x$gnome_print_ok" != "x" ; then
|
||||
GNOME_PRINT_CFLAGS=`$GNOME_CONFIG --cflags print`
|
||||
GNOME_PRINT_LIBS=`$GNOME_CONFIG --libs print`
|
||||
ifelse([$2], , :, [$2])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test "$GNOME_CONFIG" = "no" ; then
|
||||
echo "*** The gnome-config script installed by GNOME-LIBS could not be found"
|
||||
echo "*** If GNOME-PRINT was installed in PREFIX, make sure PREFIX/bin is in"
|
||||
echo "*** your path, or set the GNOME_CONFIG environment variable to the"
|
||||
echo "*** full path to gnome-config."
|
||||
else
|
||||
if test -f conf.gnome_printtest ; then
|
||||
:
|
||||
else
|
||||
echo "*** Could not run GNOME-PRINT test program, checking why..."
|
||||
CFLAGS="$CFLAGS $GNOME_PRINT_CFLAGS"
|
||||
LIBS="$LIBS $GNOME_PRINT_LIBS"
|
||||
AC_TRY_LINK([
|
||||
#include <stdio.h>
|
||||
#include <libgnomeprint/gnome-print.h>
|
||||
], [ return 0; ],
|
||||
[ echo "*** The test program compiled, but did not run. This usually means"
|
||||
echo "*** that the run-time linker is not finding GNOME-PRINT or finding the wrong"
|
||||
echo "*** version of GNOME-PRINT. If it is not finding GNOME-PRINT, 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 "*** The test program failed to compile or link. See the file config.log for the"
|
||||
echo "*** exact error that occured. This usually means GNOME-PRINT was incorrectly installed"
|
||||
echo "*** or that you have moved GNOME-PRINT since it was installed. In the latter case, you"
|
||||
echo "*** may want to edit the gnome-config script: $GNOME_CONFIG" ])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
fi
|
||||
fi
|
||||
GNOME_PRINT_CFLAGS=""
|
||||
GNOME_PRINT_LIBS=""
|
||||
ifelse([$3], , :, [$3])
|
||||
fi
|
||||
|
||||
AC_SUBST(GNOME_PRINT_CFLAGS)
|
||||
AC_SUBST(GNOME_PRINT_LIBS)
|
||||
rm -f conf.gnome_printtest
|
||||
])
|
||||
|
||||
AC_DEFUN([GNOME_PRINT_CHECK], [
|
||||
AM_PATH_GNOME_PRINT(0.1.0,,[AC_MSG_ERROR(GNOME-PRINT not found)])
|
||||
AM_PATH_GNOME_PRINT($1,,[AC_MSG_ERROR(GNOME-PRINT not found or wrong version)])
|
||||
])
|
||||
|
||||
@@ -60,7 +60,7 @@ AC_DEFUN([GNOME_WITH_VFS],[
|
||||
SAMBAFILES=""
|
||||
AC_ARG_WITH(samba,
|
||||
[--with-samba Support smb virtual file system],[
|
||||
if test "x$withval != xno"; then
|
||||
if test "x$withval" != "xno"; then
|
||||
AC_DEFINE(WITH_SMBFS)
|
||||
vfs_flags="$vfs_flags, smbfs"
|
||||
smbfs="smbfs.o"
|
||||
|
||||
@@ -14,6 +14,8 @@ AC_DEFUN([GNOME_XML_HOOK],[
|
||||
AC_MSG_ERROR(Could not find gnome-config)
|
||||
fi
|
||||
fi
|
||||
GNOME_XML_CFLAGS=`$GNOME_CONFIG --cflags xml`
|
||||
AC_SUBST(GNOME_XML_CFLAGS)
|
||||
AC_CHECK_LIB(xml, xmlNewDoc, [
|
||||
$1
|
||||
GNOME_XML_LIB=`$GNOME_CONFIG --libs xml`
|
||||
|
||||
@@ -59,8 +59,8 @@ AC_DEFUN([GNOME_INIT_HOOK],[
|
||||
GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
|
||||
GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
|
||||
ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
|
||||
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`"
|
||||
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`"
|
||||
GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gtk gnorba gnomeui`"
|
||||
GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gtk gnorba gnomeui`"
|
||||
$1
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
dnl
|
||||
dnl Check for struct linger
|
||||
dnl
|
||||
AC_DEFUN(AC_STRUCT_LINGER, [
|
||||
AC_DEFUN([AC_STRUCT_LINGER], [
|
||||
av_struct_linger=no
|
||||
AC_MSG_CHECKING(struct linger is available)
|
||||
AC_TRY_RUN([
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dnl See whether we need a declaration for a function.
|
||||
dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
|
||||
AC_DEFUN(GCC_NEED_DECLARATION,
|
||||
AC_DEFUN([GCC_NEED_DECLARATION],
|
||||
[AC_MSG_CHECKING([whether $1 must be declared])
|
||||
AC_CACHE_VAL(gcc_cv_decl_needed_$1,
|
||||
[AC_TRY_COMPILE([
|
||||
@@ -33,7 +33,7 @@ fi
|
||||
|
||||
dnl Check multiple functions to see whether each needs a declaration.
|
||||
dnl GCC_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
|
||||
AC_DEFUN(GCC_NEED_DECLARATIONS,
|
||||
AC_DEFUN([GCC_NEED_DECLARATIONS],
|
||||
[for ac_func in $1
|
||||
do
|
||||
GCC_NEED_DECLARATION($ac_func, $2)
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
#include "FileDialog.h"
|
||||
#include "Group.h"
|
||||
#include "file-history.h"
|
||||
#include "gnc-commodity.h"
|
||||
#include "gnc-component-manager.h"
|
||||
#include "gnc-engine.h"
|
||||
#include "gnc-engine-util.h"
|
||||
#include "gnc-event.h"
|
||||
#include "gnc-ui.h"
|
||||
@@ -222,6 +224,8 @@ gncFileNew (void)
|
||||
gnc_book_destroy (book);
|
||||
current_book = NULL;
|
||||
|
||||
gnc_commodity_table_remove_non_iso (gnc_engine_commodities ());
|
||||
|
||||
/* start a new book */
|
||||
gncGetCurrentBook ();
|
||||
|
||||
|
||||
@@ -113,6 +113,6 @@ EXTRA_DIST = \
|
||||
|
||||
CFLAGS = @CFLAGS@ ${GLIB_CFLAGS} ${GNOME_XML_CFLAGS} ${GHTTP_CFLAGS}
|
||||
|
||||
LDADD = ${GNOME_XML_LIB}
|
||||
LDADD = ${GNOME_XML_LIB} ${GLIB_LIBS}
|
||||
|
||||
INCLUDES = -I..
|
||||
|
||||
@@ -540,7 +540,7 @@ gnc_commodity_table_delete_namespace(gnc_commodity_table * table,
|
||||
&orig_key,
|
||||
(gpointer)&value)) {
|
||||
g_hash_table_remove(table->table, namespace);
|
||||
|
||||
|
||||
g_hash_table_foreach_remove(value->table, ns_helper, NULL);
|
||||
g_hash_table_destroy(value->table);
|
||||
g_free(value);
|
||||
@@ -550,6 +550,28 @@ gnc_commodity_table_delete_namespace(gnc_commodity_table * table,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gnc_commodity_table_remove_non_iso (gnc_commodity_table *t)
|
||||
{
|
||||
GList *namespaces;
|
||||
GList *node;
|
||||
|
||||
if (!t) return;
|
||||
|
||||
namespaces = gnc_commodity_table_get_namespaces (t);
|
||||
|
||||
for (node = namespaces; node; node = node->next)
|
||||
{
|
||||
char *ns = node->data;
|
||||
|
||||
if (safe_strcmp (ns, GNC_COMMODITY_NS_ISO) == 0)
|
||||
continue;
|
||||
|
||||
gnc_commodity_table_delete_namespace (t, ns);
|
||||
}
|
||||
|
||||
g_list_free (namespaces);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
* gnc_commodity_table_destroy
|
||||
@@ -575,4 +597,3 @@ gnc_commodity_table_destroy(gnc_commodity_table * t) {
|
||||
g_hash_table_destroy(t->table);
|
||||
g_free(t);
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ void gnc_commodity_table_add_namespace(gnc_commodity_table * table,
|
||||
const char * namespace);
|
||||
void gnc_commodity_table_delete_namespace(gnc_commodity_table * t,
|
||||
const char * namespace);
|
||||
|
||||
void gnc_commodity_table_remove_non_iso (gnc_commodity_table *t);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ INCLUDES = -I.. -I/usr/lib/glib/include
|
||||
|
||||
LDFLAGS= -lpq
|
||||
|
||||
CFLAGS = @CFLAGS@ ${GLIB_CFLAGS}
|
||||
|
||||
LDADD = ${GLIB_LIBS}
|
||||
|
||||
# Some of the required C files are built with the m4 pre-processor
|
||||
# As a result, we need to manually specify dependencies, clean targets.
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "glade-gnc-dialogs.h"
|
||||
#include "glade-support.h"
|
||||
#include "gnc-ui.h"
|
||||
|
||||
|
||||
gboolean
|
||||
|
||||
@@ -32,7 +32,7 @@ noinst_HEADERS = \
|
||||
EXTRA_DIST = \
|
||||
.cvsignore
|
||||
|
||||
CFLAGS = @CFLAGS@ @GTK_XIM_FLAGS@
|
||||
CFLAGS = @CFLAGS@ ${GTK_XIM_FLAGS} ${GNOME_INCLUDEDIR} ${GLIB_CFLAGS}
|
||||
|
||||
INCLUDES = \
|
||||
-I${top_srcdir}/src \
|
||||
|
||||
Reference in New Issue
Block a user