From 47abc657dd1624f6567eed64e3e6ccc547e21411 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Fri, 31 Mar 2000 09:41:07 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2142 57a11ea4-9604-0410-9ed3-97b8803252fd --- Makefile.common | 6 + Makefile.in | 11 +- Makefile.init.in | 10 +- configure | 358 +++++++++++--------- configure.in | 79 +++-- doc/build-system | 38 +++ gnucash | 2 +- make-gnucash-patch => make-gnucash-patch.in | 6 +- src/MultiLedger.c | 23 +- src/SplitLedger.c | 52 +-- src/gnome/window-register.c | 123 ++++--- src/scm/Makefile.in | 4 +- src/scm/bootstrap.scm.in | 4 +- src/scm/main.scm | 17 +- src/scm/printing/number-to-words.scm | 2 +- src/scm/printing/print-check.scm | 6 +- src/scm/qif-import/qif-dialog-utils.scm | 2 +- src/scm/qif-import/qif-file.scm | 8 +- src/scm/qif-import/qif-guess-map.scm | 2 +- src/scm/qif-import/qif-import.scm | 18 +- src/scm/qif-import/qif-objects.scm | 4 +- src/scm/qif-import/qif-parse.scm | 2 +- src/scm/qif-import/qif-to-gnc.scm | 2 +- src/scm/qif-import/qif-utils.scm | 2 +- src/scm/qif-import/simple-obj.scm | 2 +- 25 files changed, 449 insertions(+), 334 deletions(-) create mode 100644 doc/build-system rename make-gnucash-patch => make-gnucash-patch.in (98%) mode change 100755 => 100644 diff --git a/Makefile.common b/Makefile.common index 9cd23e2867..e242ffe35e 100644 --- a/Makefile.common +++ b/Makefile.common @@ -15,6 +15,11 @@ # OBJS is for flavor independent files # GNOME/MOTIF_OBJS is for flavor dependent files +# Clear all of the default suffix rules. They were causing a great +# deal of agony when trying to get the .tmpl rules to work. In +# general, we want to take charge of these for now. +.SUFFIXES: + OBJS := $(addprefix obj/,${INDEP_SRCS:.c=.o}) GNOME_OBJS := $(addprefix obj/gnome/,${COMMON_SRCS:.c=.o}) GNOME_OBJS += $(addprefix obj/gnome/,${GNOME_SRCS:.c=.o}) @@ -32,6 +37,7 @@ endif QT_FLAGS := +# All c files depend on headers with the same names. %.c : %.h # Basically take the output foo.d file and put it in the right diff --git a/Makefile.in b/Makefile.in index 6e0e3c3a96..f1d31ef9bf 100644 --- a/Makefile.in +++ b/Makefile.in @@ -54,8 +54,8 @@ gnome-static: gnome.static qt-static: qt.static build-flavor: config.status - @cd lib; $(MAKE) ${FLAVOR} - @cd src; $(MAKE) ${FLAVOR} + @cd lib && ${MAKE} ${FLAVOR} + @cd src && ${MAKE} ${FLAVOR} ln -sf gnucash.${FLAVOR} gnucash.bin (cd share && rm -f scm && ln -sf ../src/scm scm) @@ -101,6 +101,8 @@ qt.disable: echo "Qt build disabled by configure. Try configure --enable-qt" false +.PHONY: all + depend: @echo make depend is now superfluous. @@ -134,7 +136,8 @@ install-bin: gnucash.${FLAVOR} (cd ${GNC_BINDIR} && ln -sf gnucash.${FLAVOR} gnucash) install: - $(INSTALL) -d ${GNC_BINDIR} ${GNC_LIBDIR} ${GNC_DOCDIR} + $(INSTALL) -d ${GNC_BINDIR} ${GNC_LIBDIR} + $(INSTALL) -d ${GNC_DOCDIR} ${GNC_CONFIGDIR} $(INSTALL) -d ${GNC_DOCDIR}/examples ${GNC_MANDIR}/man1 $(INSTALL) -d ${GNC_SHAREDIR} ${GNC_SHAREDIR}/html $(INSTALL) -d ${GNC_SHAREDIR}/html/C ${GNC_SHAREDIR}/html/C/pix @@ -209,7 +212,7 @@ install: # place for this stuff ... For now, we will simply touch the one file that # the scheme initialization is looking for, and punt on the rest ... - $(INSTALL_DATA) etc/conf* ${GNC_SHAREDIR} + $(INSTALL_DATA) etc/conf* ${GNC_CONFIGDIR} $(MAKE) -C po install diff --git a/Makefile.init.in b/Makefile.init.in index c2dea06a3d..7213df60a9 100644 --- a/Makefile.init.in +++ b/Makefile.init.in @@ -1,11 +1,8 @@ -# -*-makefile-*- - @SET_MAKE@ export PATH := @GUILE_BIN@:@ABSOLUTE_TOP_SRCDIR@/lib/g-wrap-install/bin/:${PATH} srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix=@prefix@ @@ -23,6 +20,8 @@ sysconfdir=@sysconfdir@ includedir=@includedir@ +ABSOLUTE_TOP_SRCDIR=@ABSOLUTE_TOP_SRCDIR@ + CC = @CC@ CXX = @CXX@ CFLAGS = @CFLAGS@ @@ -33,7 +32,6 @@ RANLIB = @RANLIB@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ SWIG = @SWIG@ -GWRAP = @top_srcdir@/lib/g-wrap-install/bin PERL = @PERL@ CPU = @target_cpu@ @@ -51,3 +49,7 @@ GNC_MANDIR=@GNC_MANDIR@ HAVE_PLOTUTILS=@HAVE_PLOTUTILS@ GLIB_CONFIG_BIN=@GLIB_CONFIG_BIN@ GNOME_CONFIG_BIN=@GNOME_CONFIG_BIN@ + +# Local Variables: +# mode: makefile +# End: diff --git a/configure b/configure index 8a7c3f7d04..0b1bfc67c5 100755 --- a/configure +++ b/configure @@ -1348,6 +1348,28 @@ fi done +### -------------------------------------------------------------------------- +### Useful POSIX shell functions +### + +# This has to be a variable because we need to be able to export it, +# and POSIX shells AFAIK don't have "export -f" + +gnc_recursively_expand_var () { + + # Note that this function will only work for cases where any sign of + # a $ means that there is a variable reference that can be expanded. + # I.e. it would fail miserably for something like pattern='^bar.*$'. + + local expanded_var=${1} + while echo $expanded_var | grep '\$' > /dev/null + do + expanded_var=$(eval echo ${expanded_var}) + done + echo $expanded_var +} + + ### -------------------------------------------------------------------------- ### Variables ### Set up all the initial variable values... @@ -1436,9 +1458,13 @@ else fi +GNC_EXPANDED_LOCALE_DIR=$(gnc_recursively_expand_var "${GNC_LOCALE_DIR}") + + + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1442: checking how to run the C preprocessor" >&5 +echo "configure:1468: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1453,13 +1479,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1470,13 +1496,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1487,13 +1513,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1519,17 +1545,17 @@ echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for locale.h""... $ac_c" 1>&6 -echo "configure:1523: checking for locale.h" >&5 +echo "configure:1549: checking for locale.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1553,19 +1579,19 @@ fi if test "$ac_cv_header_locale_h" = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:1557: checking for LC_MESSAGES" >&5 +echo "configure:1583: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -1586,7 +1612,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:1590: checking whether NLS is requested" >&5 +echo "configure:1616: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -1606,7 +1632,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:1610: checking whether included gettext is requested" >&5 +echo "configure:1636: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -1625,17 +1651,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:1629: checking for libintl.h" >&5 +echo "configure:1655: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1652,19 +1678,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:1656: checking for gettext in libc" >&5 +echo "configure:1682: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:1668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -1680,7 +1706,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:1684: checking for bindtextdomain in -lintl" >&5 +echo "configure:1710: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1688,7 +1714,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1715,12 +1741,12 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:1719: checking for gettext in libintl" >&5 +echo "configure:1745: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6 -echo "configure:1724: checking for gettext in -lintl" >&5 +echo "configure:1750: checking for gettext in -lintl" >&5 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1728,7 +1754,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1778,7 +1804,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1782: checking for $ac_word" >&5 +echo "configure:1808: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1812,12 +1838,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1816: checking for $ac_func" >&5 +echo "configure:1842: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1867,7 +1893,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1871: checking for $ac_word" >&5 +echo "configure:1897: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1903,7 +1929,7 @@ fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1907: checking for $ac_word" >&5 +echo "configure:1933: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGMERGE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1939,7 +1965,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1943: checking for $ac_word" >&5 +echo "configure:1969: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1971,7 +1997,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -2002,7 +2028,7 @@ fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:2006: checking whether catgets can be used" >&5 +echo "configure:2032: checking whether catgets can be used" >&5 # Check whether --with-catgets or --without-catgets was given. if test "${with_catgets+set}" = set; then withval="$with_catgets" @@ -2015,7 +2041,7 @@ fi if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:2019: checking for main in -li" >&5 +echo "configure:2045: checking for main in -li" >&5 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2023,14 +2049,14 @@ else ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2058,12 +2084,12 @@ else fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:2062: checking for catgets" >&5 +echo "configure:2088: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_catgets=yes" else @@ -2108,7 +2134,7 @@ EOF # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2112: checking for $ac_word" >&5 +echo "configure:2138: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2144,7 +2170,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2148: checking for $ac_word" >&5 +echo "configure:2174: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2181,7 +2207,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2185: checking for $ac_word" >&5 +echo "configure:2211: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2216,7 +2242,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2220: checking for $ac_word" >&5 +echo "configure:2246: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2274,7 +2300,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2278: checking for $ac_word" >&5 +echo "configure:2304: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2308,7 +2334,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2312: checking for $ac_word" >&5 +echo "configure:2338: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2344,7 +2370,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2348: checking for $ac_word" >&5 +echo "configure:2374: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2439,7 +2465,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:2443: checking for catalogs to be installed" >&5 +echo "configure:2469: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -2519,7 +2545,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2523: checking for $ac_word" >&5 +echo "configure:2549: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2598,7 +2624,7 @@ fi # Extract the first word of "eperl", so it can be a program name with args. set dummy eperl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2602: checking for $ac_word" >&5 +echo "configure:2628: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_EPERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2646,8 +2672,9 @@ fi # for some reason the code needs both the full path and the basename. # these get dumped into src/guile/pathconfig.h -EPERL_PATH="$EPERL" -EPERL_NAME=`basename $EPERL` +GNC_EXPANDED_EPERL_PATH=$(gnc_recursively_expand_var "${EPERL}") +EPERL_NAME=$(basename $EPERL) + @@ -2657,7 +2684,7 @@ EPERL_NAME=`basename $EPERL` # Extract the first word of "swig", so it can be a program name with args. set dummy swig; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2661: checking for $ac_word" >&5 +echo "configure:2688: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SWIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2718,7 +2745,7 @@ then # Extract the first word of "glib-config", so it can be a program name with args. set dummy glib-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2722: checking for $ac_word" >&5 +echo "configure:2749: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GLIB_CONFIG_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2769,7 +2796,7 @@ then # Extract the first word of "gnome-config", so it can be a program name with args. set dummy gnome-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2773: checking for $ac_word" >&5 +echo "configure:2800: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2819,7 +2846,7 @@ LIBS="$LIBS -lm" # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:2823: checking for X" >&5 +echo "configure:2850: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -2881,12 +2908,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2955,14 +2982,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -3068,17 +3095,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:3072: checking whether -R must be followed by a space" >&5 +echo "configure:3099: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3094,14 +3121,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3133,7 +3160,7 @@ rm -f conftest* # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:3137: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3164: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3141,7 +3168,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3174,7 +3201,7 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:3178: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3205: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3182,7 +3209,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3222,12 +3249,12 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:3226: checking for gethostbyname" >&5 +echo "configure:3253: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -3271,7 +3298,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3275: checking for gethostbyname in -lnsl" >&5 +echo "configure:3302: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3279,7 +3306,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3320,12 +3347,12 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:3324: checking for connect" >&5 +echo "configure:3351: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -3369,7 +3396,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3373: checking for connect in -lsocket" >&5 +echo "configure:3400: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3377,7 +3404,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3412,12 +3439,12 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:3416: checking for remove" >&5 +echo "configure:3443: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -3461,7 +3488,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3465: checking for remove in -lposix" >&5 +echo "configure:3492: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3469,7 +3496,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3504,12 +3531,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3508: checking for shmat" >&5 +echo "configure:3535: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -3553,7 +3580,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3557: checking for shmat in -lipc" >&5 +echo "configure:3584: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3561,7 +3588,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3605,7 +3632,7 @@ fi # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:3609: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3636: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3613,7 +3640,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3746,7 +3773,7 @@ fi # the XmHTML widget needs libz, libjpeg, libpng and libm # it also uses #ifdef's not #if's so DONT #def to zero. echo $ac_n "checking for deflateEnd in -lz""... $ac_c" 1>&6 -echo "configure:3750: checking for deflateEnd in -lz" >&5 +echo "configure:3777: checking for deflateEnd in -lz" >&5 ac_lib_var=`echo z'_'deflateEnd | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3754,7 +3781,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3789,7 +3816,7 @@ else fi echo $ac_n "checking for jpeg_read_scanlines in -ljpeg""... $ac_c" 1>&6 -echo "configure:3793: checking for jpeg_read_scanlines in -ljpeg" >&5 +echo "configure:3820: checking for jpeg_read_scanlines in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_read_scanlines | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3797,7 +3824,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ljpeg $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3832,7 +3859,7 @@ else fi echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:3836: checking for png_read_image in -lpng" >&5 +echo "configure:3863: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3840,7 +3867,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpng $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3881,7 +3908,7 @@ fi # LIBS="-lXmu -lXt -lXext $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS $LIBS" echo $ac_n "checking for XpmReadFileToXpmImage in -lXpm""... $ac_c" 1>&6 -echo "configure:3885: checking for XpmReadFileToXpmImage in -lXpm" >&5 +echo "configure:3912: checking for XpmReadFileToXpmImage in -lXpm" >&5 ac_lib_var=`echo Xpm'_'XpmReadFileToXpmImage | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3889,7 +3916,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXpm $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3931,7 +3958,7 @@ fi # Don't build the xmhtml source if user already has it installed... # this is ugly, there must be a nicer way of setting this up ... echo $ac_n "checking for XmHTMLTextScrollToLine in -lXmHTML""... $ac_c" 1>&6 -echo "configure:3935: checking for XmHTMLTextScrollToLine in -lXmHTML" >&5 +echo "configure:3962: checking for XmHTMLTextScrollToLine in -lXmHTML" >&5 ac_lib_var=`echo XmHTML'_'XmHTMLTextScrollToLine | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3939,7 +3966,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lXmHTML $X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS $X_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3997,14 +4024,14 @@ GNOME_STATIC_TARGET="gnome.static.real" #AC_CHECK_HEADER might work, but I'm not sure it uses CPPFLAGS # this guarantees it - it works. Promise!! echo $ac_n "checking gtk-xmhtml/gtk-xmhtml.h""... $ac_c" 1>&6 -echo "configure:4001: checking gtk-xmhtml/gtk-xmhtml.h" >&5 +echo "configure:4028: checking gtk-xmhtml/gtk-xmhtml.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4026,7 +4053,7 @@ CPPFLAGS="$OLDCPPFLAGS" ### -------------------------------------------------------------------------- # If readline exists, just assume that guile needs it. It probably does. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:4030: checking for readline in -lreadline" >&5 +echo "configure:4057: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4034,7 +4061,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4079,7 +4106,7 @@ EXTRALIBS=`$GNOME_CONFIG_BIN --libs gtkxmhtml` #check for gtkxmhtml, export library link to variable GTK_XMHTML echo $ac_n "checking for gtk_xmhtml_new in -lgtkxmhtml""... $ac_c" 1>&6 -echo "configure:4083: checking for gtk_xmhtml_new in -lgtkxmhtml" >&5 +echo "configure:4110: checking for gtk_xmhtml_new in -lgtkxmhtml" >&5 ac_lib_var=`echo gtkxmhtml'_'gtk_xmhtml_new | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4087,7 +4114,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgtkxmhtml $EXTRALIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4130,7 +4157,7 @@ EXTRALIBS=`$GNOME_CONFIG_BIN --libs print` # check for gnome-print and enable it via HAVE_LIBGNOMEPRINT # if found echo $ac_n "checking for gnome_print_context_new in -lgnomeprint""... $ac_c" 1>&6 -echo "configure:4134: checking for gnome_print_context_new in -lgnomeprint" >&5 +echo "configure:4161: checking for gnome_print_context_new in -lgnomeprint" >&5 ac_lib_var=`echo gnomeprint'_'gnome_print_context_new | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4138,7 +4165,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnomeprint $EXTRALIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4200,7 +4227,7 @@ fi if test "${with_guile_config+set}" = set; then withval="$with_guile_config" echo $ac_n "checking for guile-config""... $ac_c" 1>&6 -echo "configure:4204: checking for guile-config" >&5 +echo "configure:4231: checking for guile-config" >&5 echo "$ac_t""${with_guile_config}" 1>&6 GUILE_CONFIG="$with_guile_config" LIBS="`${GUILE_CONFIG} link` ${LIBS}" @@ -4213,7 +4240,7 @@ if test x"$GUILE_CONFIG" = x; then # Extract the first word of "guile-config", so it can be a program name with args. set dummy guile-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4217: checking for $ac_word" >&5 +echo "configure:4244: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GUILE_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4269,7 +4296,7 @@ if test x"$GUILE_CONFIG" = x; then GNC_LIBS_SAFE=${LIBS} echo $ac_n "checking for guile""... $ac_c" 1>&6 -echo "configure:4273: checking for guile" >&5 +echo "configure:4300: checking for guile" >&5 if eval "test \"`echo '$''{'ac_cv_lib_guile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4282,14 +4309,14 @@ else else LIBS="${GNC_TEST_LIBS} ${GNC_LIBS_SAFE}" cat > conftest.$ac_ext < int main() { gh_eval_file; ; return 0; } EOF -if { (eval echo configure:4293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* GUILELIBS="${GNC_TEST_LIBS}" else @@ -4316,7 +4343,7 @@ if test x"$GUILE_CONFIG" != x; then # Extract the first word of "guile", so it can be a program name with args. set dummy guile; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4320: checking for $ac_word" >&5 +echo "configure:4347: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GUILE_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4355,7 +4382,7 @@ if test x"$GUILE_BIN" = x && test x"$with_guile" != x; then # Extract the first word of "guile", so it can be a program name with args. set dummy guile; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4359: checking for $ac_word" >&5 +echo "configure:4386: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GUILE_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4394,7 +4421,7 @@ if test x"${GUILE_BIN}" = x; then # Extract the first word of "guile", so it can be a program name with args. set dummy guile; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4398: checking for $ac_word" >&5 +echo "configure:4425: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GUILE_BIN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4480,6 +4507,10 @@ else GNC_SHAREDIR=${datadir}/gnucash fi +GNC_EXPANDED_LIBDIR=$(gnc_recursively_expand_var "${GNC_LIBDIR}") +GNC_EXPANDED_CONFIGDIR=$(gnc_recursively_expand_var "${GNC_CONFIGDIR}") +GNC_EXPANDED_SHAREDIR=$(gnc_recursively_expand_var "${GNC_SHAREDIR}") + GNC_MANDIR=${mandir} @@ -4490,27 +4521,22 @@ GNC_MANDIR=${mandir} + + # HACK : inserts the path to gnucash.pm, which is used in the # reporting code and is defined in gnucash.h -GNC_RUNTIME_PERLLIBPATH=`eval echo ${GNC_LIBDIR}` +GNC_EXPANDED_PERLLIBPATH=$(gnc_recursively_expand_var "${GNC_LIBDIR}") - -# The variables GNC_RUNTIME_SHAREDIR and GNC_RUNTIME_CONFIGDIR are used -# to configure bootstrap.scm and gnucash.h. This configuration is performed -# by Makefile.config.finish, invoked at the end of AC_OUTPUT. We have to -# handle these separately, because they are the *runtime* (not install -# time) defaults, and thus -# 1) We don't want them to change if you do -# make prefix=foo install -# This allows you to build distributions in a separate directory. -# 2) They are normally defined in terms of $prefix, and AC_OUPUT does -# not do recursive substitution, i.e., if we USED AC_OUTPUT to -# generate them, we would get ${prefix}/share/gnucash instead -# of the fully expanded directory name. - +# Get the absolute top level directory. This is only used to add some +# ./lib/* paths to PATH for local build binaries like gwrap. For all +# other purposes, you should probably be using top_srcdir. configure +# automagically provides it, but you have to be careful to set it +# directly within each Makefile.in since it's the *relative* path to +# the top of the source tree rather than an absolute path. You can't +# just put it in Makefile.init.in or Makefile.common. ABSOLUTE_TOP_SRCDIR=`pwd` @@ -4620,24 +4646,28 @@ ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile Makefile.init + make-gnucash-patch src/Makefile src/engine/Makefile src/guile/Makefile + src/guile/gnucash.h src/guile/i18n.h src/scm/Makefile + src/scm/bootstrap.scm src/g-wrap/Makefile src/gnome/Makefile src/motif/Makefile src/qt/Makefile + src/quotes/gnc-prices src/register/Makefile src/register/gnome/Makefile src/reports/Makefile - src/reports/pathconfig.h + src/reports/pathconfig.h src/swig/Makefile src/swig/perl5/Makefile po/Makefile.in po/extract-macros.perl - include/messages_i18n.h + include/messages_i18n.h lib/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile @@ -4688,6 +4718,7 @@ s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g s%@OPT_STYLE_INSTALL@%$OPT_STYLE_INSTALL%g s%@LOCALE_DIR@%$LOCALE_DIR%g +s%@GNC_EXPANDED_LOCALE_DIR@%$GNC_EXPANDED_LOCALE_DIR%g s%@CPP@%$CPP%g s%@USE_NLS@%$USE_NLS%g s%@MSGFMT@%$MSGFMT%g @@ -4714,7 +4745,7 @@ s%@QT_STATIC_TARGET@%$QT_STATIC_TARGET%g s%@PERL@%$PERL%g s%@PERLINCL@%$PERLINCL%g s%@EPERL@%$EPERL%g -s%@EPERL_PATH@%$EPERL_PATH%g +s%@GNC_EXPANDED_EPERL_PATH@%$GNC_EXPANDED_EPERL_PATH%g s%@EPERL_NAME@%$EPERL_NAME%g s%@SWIG@%$SWIG%g s%@GLIB_CONFIG_BIN@%$GLIB_CONFIG_BIN%g @@ -4739,7 +4770,10 @@ s%@GNC_LIBDIR@%$GNC_LIBDIR%g s%@GNC_CONFIGDIR@%$GNC_CONFIGDIR%g s%@GNC_SHAREDIR@%$GNC_SHAREDIR%g s%@GNC_MANDIR@%$GNC_MANDIR%g -s%@GNC_RUNTIME_PERLLIBPATH@%$GNC_RUNTIME_PERLLIBPATH%g +s%@GNC_EXPANDED_LIBDIR@%$GNC_EXPANDED_LIBDIR%g +s%@GNC_EXPANDED_CONFIGDIR@%$GNC_EXPANDED_CONFIGDIR%g +s%@GNC_EXPANDED_SHAREDIR@%$GNC_EXPANDED_SHAREDIR%g +s%@GNC_EXPANDED_PERLLIBPATH@%$GNC_EXPANDED_PERLLIBPATH%g s%@ABSOLUTE_TOP_SRCDIR@%$ABSOLUTE_TOP_SRCDIR%g CEOF @@ -4784,24 +4818,28 @@ cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac -chmod +x gnucash - ${MAKE-make} -f Makefile.config.finish +chmod a+x ./gnucash + chmod a+x ./make-gnucash-patch exit 0 EOF chmod +x $CONFIG_STATUS diff --git a/configure.in b/configure.in index c19bbaaa1e..102126466e 100644 --- a/configure.in +++ b/configure.in @@ -16,6 +16,7 @@ # Footer - Autoconf footer stuff + ### -------------------------------------------------------------------------- ### Headers ### check for various programs, and stuff (do this first because later @@ -40,6 +41,28 @@ AC_PROG_MAKE_SET AC_CHECK_FUNCS(stpcpy) +### -------------------------------------------------------------------------- +### Useful POSIX shell functions +### + +# This has to be a variable because we need to be able to export it, +# and POSIX shells AFAIK don't have "export -f" + +gnc_recursively_expand_var () { + + # Note that this function will only work for cases where any sign of + # a $ means that there is a variable reference that can be expanded. + # I.e. it would fail miserably for something like pattern='^bar.*$'. + + local expanded_var=${1} + while echo $expanded_var | grep '\$' > /dev/null + do + expanded_var=$(eval echo ${expanded_var}) + done + echo $expanded_var +} + + ### -------------------------------------------------------------------------- ### Variables ### Set up all the initial variable values... @@ -81,7 +104,11 @@ AC_ARG_WITH( locale-dir, [ --with-locale-dir=PATH specify where to look for locale-specific information], LOCALE_DIR="$with_locale_dir", LOCALE_DIR="$prefix/share/locale") + +GNC_EXPANDED_LOCALE_DIR=$(gnc_recursively_expand_var "${GNC_LOCALE_DIR}") + AC_SUBST(LOCALE_DIR) +AC_SUBST(GNC_EXPANDED_LOCALE_DIR) AC_CHECK_HEADER(locale.h, ac_cv_header_locale_h=yes, ac_cv_header_locale_h=no) AC_CAN_USE_GNU_GETTEXT @@ -164,9 +191,10 @@ fi # for some reason the code needs both the full path and the basename. # these get dumped into src/guile/pathconfig.h -EPERL_PATH="$EPERL" -EPERL_NAME=`basename $EPERL` -AC_SUBST(EPERL_PATH) +GNC_EXPANDED_EPERL_PATH=$(gnc_recursively_expand_var "${EPERL}") +EPERL_NAME=$(basename $EPERL) + +AC_SUBST(GNC_EXPANDED_EPERL_PATH) AC_SUBST(EPERL_NAME) ### ------------------------------------------------------------------- @@ -510,6 +538,10 @@ else GNC_SHAREDIR=${datadir}/gnucash fi +GNC_EXPANDED_LIBDIR=$(gnc_recursively_expand_var "${GNC_LIBDIR}") +GNC_EXPANDED_CONFIGDIR=$(gnc_recursively_expand_var "${GNC_CONFIGDIR}") +GNC_EXPANDED_SHAREDIR=$(gnc_recursively_expand_var "${GNC_SHAREDIR}") + GNC_MANDIR=${mandir} AC_SUBST(GNC_DOCDIR) @@ -518,29 +550,24 @@ AC_SUBST(GNC_LIBDIR) AC_SUBST(GNC_CONFIGDIR) AC_SUBST(GNC_SHAREDIR) AC_SUBST(GNC_MANDIR) - +AC_SUBST(GNC_EXPANDED_LIBDIR) +AC_SUBST(GNC_EXPANDED_CONFIGDIR) +AC_SUBST(GNC_EXPANDED_SHAREDIR) # HACK : inserts the path to gnucash.pm, which is used in the # reporting code and is defined in gnucash.h -GNC_RUNTIME_PERLLIBPATH=`eval echo ${GNC_LIBDIR}` +GNC_EXPANDED_PERLLIBPATH=$(gnc_recursively_expand_var "${GNC_LIBDIR}") -AC_SUBST(GNC_RUNTIME_PERLLIBPATH) - - -# The variables GNC_RUNTIME_SHAREDIR and GNC_RUNTIME_CONFIGDIR are used -# to configure bootstrap.scm and gnucash.h. This configuration is performed -# by Makefile.config.finish, invoked at the end of AC_OUTPUT. We have to -# handle these separately, because they are the *runtime* (not install -# time) defaults, and thus -# 1) We don't want them to change if you do -# make prefix=foo install -# This allows you to build distributions in a separate directory. -# 2) They are normally defined in terms of $prefix, and AC_OUPUT does -# not do recursive substitution, i.e., if we USED AC_OUTPUT to -# generate them, we would get ${prefix}/share/gnucash instead -# of the fully expanded directory name. +AC_SUBST(GNC_EXPANDED_PERLLIBPATH) +# Get the absolute top level directory. This is only used to add some +# ./lib/* paths to PATH for local build binaries like gwrap. For all +# other purposes, you should probably be using top_srcdir. configure +# automagically provides it, but you have to be careful to set it +# directly within each Makefile.in since it's the *relative* path to +# the top of the source tree rather than an absolute path. You can't +# just put it in Makefile.init.in or Makefile.common. ABSOLUTE_TOP_SRCDIR=`pwd` AC_SUBST(ABSOLUTE_TOP_SRCDIR) @@ -549,27 +576,31 @@ AC_CONFIG_HEADER(config.h) AC_OUTPUT(Makefile Makefile.init + make-gnucash-patch src/Makefile src/engine/Makefile src/guile/Makefile + src/guile/gnucash.h src/guile/i18n.h src/scm/Makefile + src/scm/bootstrap.scm src/g-wrap/Makefile src/gnome/Makefile src/motif/Makefile src/qt/Makefile + src/quotes/gnc-prices src/register/Makefile src/register/gnome/Makefile src/reports/Makefile - src/reports/pathconfig.h + src/reports/pathconfig.h src/swig/Makefile src/swig/perl5/Makefile po/Makefile.in po/extract-macros.perl - include/messages_i18n.h + include/messages_i18n.h lib/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile lib/ComboBox-1.33/Makefile, - chmod +x gnucash - ${MAKE-make} -f Makefile.config.finish) + chmod a+x ./gnucash + chmod a+x ./make-gnucash-patch) diff --git a/doc/build-system b/doc/build-system new file mode 100644 index 0000000000..229cf6d78b --- /dev/null +++ b/doc/build-system @@ -0,0 +1,38 @@ +-*-text-*- + +=========================================================================== + +Deleting .SUFFIX rules + +While working on some other problems, I discovered that this implicit +rule + + % : %.tmpl + ... + +fails for files like message_i18n.h.tmpl because some other .h +implicit rule that's been defined is keeping this one from working. I +could have worked around it by defining a "terminal rule" using "::" +instead (See "Match-Anything Pattern Rules" in the make info pages), +and in truth, :: might be more appropriate here anyway, but instead I +used .SUFFIX: to delete all the default suffix rules. I think that we +probably want control of this anyhow... + +=========================================================================== + +*EXPANDED* .in file variables: + +I've added some rules to configure.in that look like GNC_EXPANDED_*. +These are intended for use in any non-makefile .in files. The +difference between them and another variable of the same name +(i.e. the difference between GNC_LIBDIR and GNC_EXPANDED_LIBDIR is +that the latter has been expended in configure.in via +recursively_expand(). This is critical for variables that are going +in to non-makefiles because there's no other way for any variable +references to get expanded. For example, what if configure were to +assign GNC_CONFIGDIR to be "${prefix}/etc/gnucash" and then this exact +string were substituted into gnucash.h.in or bootstrap.scm? The C +compiler and Scheme interpreter would have no idea what to do with +$prefix, so you'd be stuck. recursively_expand fixes this. + +=========================================================================== diff --git a/gnucash b/gnucash index bc6b42041f..b140fe0cad 100755 --- a/gnucash +++ b/gnucash @@ -9,5 +9,5 @@ exec ./gnucash.bin \ --debug \ --share-dir ./share \ --config-dir ./etc \ - --doc-path '("./Docs/En" "./Docs" "./Reports")' \ + --doc-path '("./doc/html/C")' \ "$@" diff --git a/make-gnucash-patch b/make-gnucash-patch.in old mode 100755 new mode 100644 similarity index 98% rename from make-gnucash-patch rename to make-gnucash-patch.in index 4077d13ed2..ed1d076fc8 --- a/make-gnucash-patch +++ b/make-gnucash-patch.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ # # This perl script is used to make a patch for your GnuCash # development work. All patches should be submitted to the @@ -79,6 +79,10 @@ system('uuencode gnucash.diff.gz gnucash.diff.gz > gnucash.diff.gz.uue'); exit(0); +# Local Variables: +# mode: perl +# End: + __DATA__ obj diff --git a/src/MultiLedger.c b/src/MultiLedger.c index 5715afb15a..029aeef7ec 100644 --- a/src/MultiLedger.c +++ b/src/MultiLedger.c @@ -147,7 +147,7 @@ ledgerIsMember (xaccLedgerDisplay *reg, Account * acc) xaccLedgerDisplay * xaccLedgerDisplaySimple (Account *acc) - { +{ xaccLedgerDisplay *retval; int acc_type; int reg_type = -1; @@ -197,7 +197,7 @@ xaccLedgerDisplaySimple (Account *acc) retval = xaccLedgerDisplayGeneral (acc, NULL, reg_type); return retval; - } +} /********************************************************************\ * xaccLedgerDisplayAccGroup * @@ -229,8 +229,8 @@ xaccLedgerDisplayAccGroup (Account *acc) case CREDIT: case LIABILITY: /* if any of the sub-accounts have STOCK or MUTUAL types, - * then we must use the PORTFOLIO type ledger. Otherise, - * a plain old GEN_LEDGER will do. */ + * then we must use the PORTFOLIO_LEDGER ledger. Otherwise, + * a plain old GENERAL_LEDGER will do. */ ledger_type = GENERAL_LEDGER; le = list[0]; @@ -238,7 +238,7 @@ xaccLedgerDisplayAccGroup (Account *acc) while (le) { le_type = xaccAccountGetType (le); if ((STOCK == le_type) || (MUTUAL == le_type)) { - ledger_type = PORTFOLIO; + ledger_type = PORTFOLIO_LEDGER; } n++; le = list[n]; @@ -247,9 +247,9 @@ xaccLedgerDisplayAccGroup (Account *acc) case STOCK: case MUTUAL: - ledger_type = PORTFOLIO; + ledger_type = PORTFOLIO_LEDGER; break; - + case INCOME: case EXPENSE: ledger_type = INCOME_LEDGER; @@ -314,7 +314,8 @@ xaccLedgerDisplaySetHelp(void *user_data, const char *help_str) \********************************************************************/ xaccLedgerDisplay * -xaccLedgerDisplayGeneral (Account *lead_acc, Account **acclist, int ledger_type) +xaccLedgerDisplayGeneral (Account *lead_acc, Account **acclist, + int ledger_type) { xaccLedgerDisplay *regData = NULL; @@ -333,7 +334,7 @@ xaccLedgerDisplayGeneral (Account *lead_acc, Account **acclist, int ledger_type) * * A third possibility exists: a multiple-account register, with * no leader account. In such a case, the list of accounts being - * displayed have no particular relationshp to each other. There + * displayed have no particular relationship to each other. There * can be an arbitrary number of multiple-account leader-less * registers. */ @@ -345,7 +346,7 @@ xaccLedgerDisplayGeneral (Account *lead_acc, Account **acclist, int ledger_type) FETCH_FROM_LIST (xaccLedgerDisplay, ledgerList, lead_acc, leader, regData); } } - + /* if regData is null, then no leader account was specified */ if (!regData) { regData = (xaccLedgerDisplay *) malloc (sizeof (xaccLedgerDisplay)); @@ -395,7 +396,7 @@ xaccLedgerDisplayGeneral (Account *lead_acc, Account **acclist, int ledger_type) regData->dirty = 1; xaccLedgerDisplayRefresh (regData); - + return regData; } diff --git a/src/SplitLedger.c b/src/SplitLedger.c index 3aadee5d54..7651680b98 100644 --- a/src/SplitLedger.c +++ b/src/SplitLedger.c @@ -1341,7 +1341,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, Transaction *newtrans) if (((MOD_AMNT | MOD_PRIC | MOD_VALU) & changed) && ((STOCK_REGISTER == (reg->type & REG_TYPE_MASK)) || (CURRENCY_REGISTER == (reg->type & REG_TYPE_MASK)) || - (PORTFOLIO == (reg->type & REG_TYPE_MASK)))) { + (PORTFOLIO_LEDGER == (reg->type & REG_TYPE_MASK)))) { double value; double price; @@ -1469,62 +1469,32 @@ xaccSRSaveRegEntry (SplitRegister *reg, Transaction *newtrans) if ((EQUITY_REGISTER == (reg->type & REG_TYPE_MASK)) || (STOCK_REGISTER == (reg->type & REG_TYPE_MASK)) || (CURRENCY_REGISTER == (reg->type & REG_TYPE_MASK)) || - (PORTFOLIO == (reg->type & REG_TYPE_MASK))) + (PORTFOLIO_LEDGER == (reg->type & REG_TYPE_MASK))) xaccSplitSetShareAmount (split, new_amount); else xaccSplitSetValue (split, new_amount); } if (MOD_PRIC & changed) { - Account *acc; double price; - int n; price = xaccGetPriceCellValue(reg->priceCell); DEBUG ("xaccSRSaveRegEntry(): MOD_PRIC: %f\n", price); xaccSplitSetSharePrice (split, price); - - /* Here we handle a very special case: the user just created - * an account, which now has two splits in it, and the user - * is editing the opening balance split. Then copy the price - * over to the last split, so that the account balance, when - * computed, won't be obviously bad. Strictly speaking, everything - * will automatically fix itself once the user closes the window, - * or if they start editing the second split, and so we don't - * really have to do this. This is more of a feel-good thing, - * so that they won't see even briefly what looks like bad values, - * and that might give them the willies. We want them to feel good. - */ - acc = xaccSplitGetAccount (split); - n = xaccAccountGetNumSplits (acc); - if (2 == n) { - Split *s = xaccAccountGetSplit (acc, 0); - if (s == split) { - Transaction *t; - double currprice; - s = xaccAccountGetSplit (acc, 1); - currprice = xaccSplitGetSharePrice (s); - if (DEQ (currprice, 1.0)) { - t = xaccSplitGetParent (s); - xaccTransBeginEdit (t, 0); - xaccSplitSetSharePrice (s, price); - xaccTransCommitEdit (t); - } - } - } } if (MOD_VALU & changed) { double value = xaccGetPriceCellValue(reg->valueCell); DEBUG ("xaccSRSaveRegEntry(): MOD_VALU: %f\n", value); + xaccSplitSetValue (split, value); } PINFO ("xaccSRSaveRegEntry(): finished saving split %s of trans %s \n", - xaccSplitGetMemo(split), xaccTransGetDescription(trans)); + xaccSplitGetMemo(split), xaccTransGetDescription(trans)); /* If the modified split is the "blank split", then it is now an * official part of the account. Set the blank split to NULL, so @@ -1668,7 +1638,7 @@ xaccSRLoadTransEntry (SplitRegister *reg, Split *split, int do_commit) if ((EQUITY_REGISTER == typo) || (STOCK_REGISTER == typo) || (CURRENCY_REGISTER == typo) || - (PORTFOLIO == typo)) + (PORTFOLIO_LEDGER == typo)) { amt = xaccSplitGetShareAmount (split); } else { @@ -2071,8 +2041,8 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist, * when doing stock accounts. This will guess incorrectly for a * ledger showing multiple stocks, but seems cool for a single stock. */ - if ((STOCK_REGISTER == type) || - (PORTFOLIO == type)) + if ((STOCK_REGISTER == type) || + (PORTFOLIO_LEDGER == type)) { last_price = xaccSplitGetSharePrice (last_split); xaccSplitSetSharePrice (split, last_price); @@ -2120,10 +2090,14 @@ xaccSRLoadRegister (SplitRegister *reg, Split **slist, { xaccSplitRegisterRestoreCursorChanged(reg, reg_buffer); xaccCommitCursor (reg->table); - xaccDestroySplitRegisterBuffer(reg_buffer); - reg_buffer = NULL; } } + + if (reg_buffer != NULL) + { + xaccDestroySplitRegisterBuffer(reg_buffer); + reg_buffer = NULL; + } } /* If we didn't find the pending transaction, it was removed diff --git a/src/gnome/window-register.c b/src/gnome/window-register.c index 085ab51bb3..c31e80afe9 100644 --- a/src/gnome/window-register.c +++ b/src/gnome/window-register.c @@ -838,6 +838,21 @@ gnc_register_create_status_bar(RegWindow *regData) GNC_T, /* has status area */ GNOME_PREFERENCES_USER); + regData->statusbar = statusbar; + + switch (regData->ledger->ledger->type & REG_TYPE_MASK) + { + case GENERAL_LEDGER: + case INCOME_LEDGER: + case PORTFOLIO_LEDGER: + case SEARCH_LEDGER: + regData->cleared_label = NULL; + regData->balance_label = NULL; + return statusbar; + default: + break; + } + hbox = gtk_hbox_new(FALSE, 2); gtk_box_pack_end(GTK_BOX(statusbar), hbox, FALSE, FALSE, 5); @@ -862,8 +877,6 @@ gnc_register_create_status_bar(RegWindow *regData) regData->balance_label = label; gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0); - regData->statusbar = statusbar; - return statusbar; } @@ -1382,36 +1395,44 @@ gnc_reg_set_window_name(RegWindow *regData) gchar *windowname; gchar *account_name; gchar *reg_name; + gboolean single_account; if (regData == NULL) return; + switch (regData->ledger->type & REG_TYPE_MASK) + { + case GENERAL_LEDGER: + case INCOME_LEDGER: + reg_name = GENERAL_LEDGER_STR; + single_account = GNC_F; + break; + case PORTFOLIO_LEDGER: + reg_name = PORTFOLIO_STR; + single_account = GNC_F; + break; + case SEARCH_LEDGER: + reg_name = SEARCH_RESULTS_STR; + single_account = GNC_F; + break; + default: + reg_name = REGISTER_STR; + single_account = GNC_T; + break; + } + leader = regData->ledger->leader; - if (leader != NULL) + if ((leader != NULL) && single_account) { account_name = xaccAccountGetFullName(leader, gnc_get_account_separator()); - switch (regData->ledger->type) - { - case GENERAL_LEDGER: - case INCOME_LEDGER: - reg_name = GENERAL_LEDGER_STR; - break; - case PORTFOLIO: - reg_name = PORTFOLIO_STR; - break; - default: - reg_name = REGISTER_STR; - break; - } - windowname = g_strconcat(account_name, " - ", reg_name, NULL); free(account_name); } else - windowname = g_strdup(GENERAL_LEDGER_STR); + windowname = g_strdup(reg_name); gtk_window_set_title(GTK_WINDOW(regData->window), windowname); @@ -1431,7 +1452,7 @@ gnc_toolbar_change_cb(void *data) * opens up a ledger window for the account list * * * * Args: ledger - ledger data structure * - * Return: regData - the register window instance * + * Return: regData - the register window instance * \********************************************************************/ RegWindow * regWindowLedger(xaccLedgerDisplay *ledger) @@ -1474,8 +1495,7 @@ regWindowLedger(xaccLedgerDisplay *ledger) /* Invoked when window is being destroyed. */ gtk_signal_connect(GTK_OBJECT(regData->window), "destroy", - GTK_SIGNAL_FUNC (gnc_register_destroy_cb), - (gpointer) regData); + GTK_SIGNAL_FUNC (gnc_register_destroy_cb), regData); regData->date_window = gnc_register_date_window(regData); gnc_register_set_date_range(regData); @@ -1563,7 +1583,7 @@ regWindowLedger(xaccLedgerDisplay *ledger) switch (type) { case STOCK_REGISTER: - case PORTFOLIO: + case PORTFOLIO_LEDGER: case CURRENCY_REGISTER: prefix = "reg_stock_win"; width = &last_stock_width; @@ -1619,21 +1639,27 @@ regRefresh(xaccLedgerDisplay *ledger) gboolean reverse = gnc_reverse_balance(ledger->leader); double amount; - amount = ledger->balance; - if (reverse) - amount = -amount; + if (regData->balance_label != NULL) + { + amount = ledger->balance; + if (reverse) + amount = -amount; - gnc_set_label_color(regData->balance_label, amount); - gtk_label_set_text(GTK_LABEL(regData->balance_label), - xaccPrintAmount(amount, print_flags)); + gnc_set_label_color(regData->balance_label, amount); + gtk_label_set_text(GTK_LABEL(regData->balance_label), + xaccPrintAmount(amount, print_flags)); + } - amount = ledger->clearedBalance; - if (reverse) - amount = -amount; + if (regData->cleared_label != NULL) + { + amount = ledger->clearedBalance; + if (reverse) + amount = -amount; - gnc_set_label_color(regData->cleared_label, amount); - gtk_label_set_text(GTK_LABEL(regData->cleared_label), - xaccPrintAmount(amount, print_flags)); + gnc_set_label_color(regData->cleared_label, amount); + gtk_label_set_text(GTK_LABEL(regData->cleared_label), + xaccPrintAmount(amount, print_flags)); + } gnc_reg_set_window_name(regData); } @@ -1643,15 +1669,13 @@ regRefresh(xaccLedgerDisplay *ledger) static void gnc_reg_save_size(RegWindow *regData) { - int type; int *width; char *prefix; - type = regData->ledger->ledger->type & REG_TYPE_MASK; - switch (type) + switch (regData->ledger->ledger->type & REG_TYPE_MASK) { case STOCK_REGISTER: - case PORTFOLIO: + case PORTFOLIO_LEDGER: case CURRENCY_REGISTER: prefix = "reg_stock_win"; width = &last_stock_width; @@ -1989,13 +2013,15 @@ gnc_transaction_delete_query(GtkWindow *parent) gchar *usual = DEL_USUAL_MSG; gchar *warn = DEL_WARN_MSG; + DeleteType return_value; + dialog = gnome_dialog_new(DEL_TRANS_STR, GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL); gnome_dialog_set_default(GNOME_DIALOG(dialog), 0); - gnome_dialog_close_hides(GNOME_DIALOG(dialog), FALSE); + gnome_dialog_close_hides(GNOME_DIALOG(dialog), TRUE); gnome_dialog_set_parent(GNOME_DIALOG(dialog), parent); dvbox = GNOME_DIALOG(dialog)->vbox; @@ -2037,15 +2063,17 @@ gnc_transaction_delete_query(GtkWindow *parent) result = gnome_dialog_run_and_close(GNOME_DIALOG(dialog)); if (result != 0) - return DELETE_CANCEL; + return_value = DELETE_CANCEL; + else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(trans_button))) + return_value = DELETE_TRANS; + else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(splits_button))) + return_value = DELETE_SPLITS; + else + return_value = DELETE_CANCEL; - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(trans_button))) - return DELETE_TRANS; + gtk_widget_destroy(dialog); - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(splits_button))) - return DELETE_SPLITS; - - return DELETE_CANCEL; + return return_value; } @@ -2132,7 +2160,8 @@ deleteCB(GtkWidget *widget, gpointer data) return; } - /* At this point we are on a transaction cursor with more than 2 splits. + /* At this point we are on a transaction cursor with more than 2 splits + * or we are on a transaction cursor in multi-line mode or an auto mode. * We give the user two choices: delete the whole transaction or delete * all the splits except the transaction split. */ { diff --git a/src/scm/Makefile.in b/src/scm/Makefile.in index 76a86eacd5..e4375edfce 100644 --- a/src/scm/Makefile.in +++ b/src/scm/Makefile.in @@ -15,7 +15,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -include @top_srcdir@/Makefile.init +top_srcdir = @top_srcdir@ + +include ${top_srcdir}/Makefile.init ###################################################################### # See Makefile.common for information about these variables. diff --git a/src/scm/bootstrap.scm.in b/src/scm/bootstrap.scm.in index 8a83479518..0e5a8034d5 100644 --- a/src/scm/bootstrap.scm.in +++ b/src/scm/bootstrap.scm.in @@ -74,8 +74,8 @@ (primitive-load boot-file))) ;; Automatically generated defaults... -(define gnc:_config-dir-default_ "@GNC_RUNTIME_CONFIGDIR@") -(define gnc:_share-dir-default_ "@GNC_RUNTIME_SHAREDIR@") +(define gnc:_config-dir-default_ "@GNC_EXPANDED_CONFIGDIR@") +(define gnc:_share-dir-default_ "@GNC_EXPANDED_SHAREDIR@") ;; These will be converted to config vars later (see prefs.scm) (define gnc:*load-path* #f) diff --git a/src/scm/main.scm b/src/scm/main.scm index 01d53813bb..b0f3dd534a 100644 --- a/src/scm/main.scm +++ b/src/scm/main.scm @@ -19,21 +19,8 @@ (gnc:depend "text-export.scm") (gnc:depend "report.scm") (gnc:depend "report/report-list.scm") - - (gnc:config-var-value-set! - gnc:*load-path* #f - (let loop ((load-path (gnc:config-var-value-get gnc:*load-path*))) - (if (null? load-path) '() - (cons - (string-append (car load-path) "/printing") - (cons - (string-append (car load-path) "/qif-import") - (cons - (car load-path) - (loop (cdr load-path)))))))) - - (gnc:depend "qif-import.scm") - (gnc:depend "print-check.scm") + (gnc:depend "qif-import/qif-import.scm") + (gnc:depend "printing/print-check.scm") ;; Load the system configs (if (not (gnc:load-system-config-if-needed)) diff --git a/src/scm/printing/number-to-words.scm b/src/scm/printing/number-to-words.scm index ab906be1db..01f01a05a6 100644 --- a/src/scm/printing/number-to-words.scm +++ b/src/scm/printing/number-to-words.scm @@ -6,7 +6,7 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "number-to-words.scm") +(gnc:support "printing/number-to-words.scm") (define (integer-to-words val) (let ((current-string "") diff --git a/src/scm/printing/print-check.scm b/src/scm/printing/print-check.scm index c5d3d5f21e..df2c4f45a8 100644 --- a/src/scm/printing/print-check.scm +++ b/src/scm/printing/print-check.scm @@ -6,9 +6,9 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "print-check.scm") -(gnc:depend "number-to-words.scm") -(gnc:depend "simple-obj.scm") +(gnc:support "printing/print-check.scm") +(gnc:depend "printing/number-to-words.scm") +(gnc:depend "qif-import/simple-obj.scm") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/scm/qif-import/qif-dialog-utils.scm b/src/scm/qif-import/qif-dialog-utils.scm index af0c1b5cdc..cdc4fe6a8d 100644 --- a/src/scm/qif-import/qif-dialog-utils.scm +++ b/src/scm/qif-import/qif-dialog-utils.scm @@ -7,7 +7,7 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "qif-dialog-utils.scm") +(gnc:support "qif-import/qif-dialog-utils.scm") (define (qif-dialog:munge-account-mapping old-map new-info) (let ((new-name (car new-info)) diff --git a/src/scm/qif-import/qif-file.scm b/src/scm/qif-import/qif-file.scm index f33443f95c..2b0b0ac8ac 100644 --- a/src/scm/qif-import/qif-file.scm +++ b/src/scm/qif-import/qif-file.scm @@ -6,10 +6,10 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "qif-file.scm") -(gnc:depend "qif-objects.scm") -(gnc:depend "qif-parse.scm") -(gnc:depend "qif-utils.scm") +(gnc:support "qif-import/qif-file.scm") +(gnc:depend "qif-import/qif-objects.scm") +(gnc:depend "qif-import/qif-parse.scm") +(gnc:depend "qif-import/qif-utils.scm") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; qif-file:read-file self path diff --git a/src/scm/qif-import/qif-guess-map.scm b/src/scm/qif-import/qif-guess-map.scm index f6bd287287..ddadd9c33b 100644 --- a/src/scm/qif-import/qif-guess-map.scm +++ b/src/scm/qif-import/qif-guess-map.scm @@ -6,7 +6,7 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "qif-guess-map.scm") +(gnc:support "qif-import/qif-guess-map.scm") (define GNC-BANK-TYPE 0) (define GNC-CASH-TYPE 1) diff --git a/src/scm/qif-import/qif-import.scm b/src/scm/qif-import/qif-import.scm index 5564828a83..50af611657 100644 --- a/src/scm/qif-import/qif-import.scm +++ b/src/scm/qif-import/qif-import.scm @@ -6,15 +6,15 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "qif-import.scm") +(gnc:support "qif-import/qif-import.scm") -(gnc:depend "simple-obj.scm") -(gnc:depend "qif-objects.scm") ;; class definitions -(gnc:depend "qif-parse.scm") ;; string-to-value, date parsing -(gnc:depend "qif-utils.scm") -(gnc:depend "qif-file.scm") ;; actual file reading -(gnc:depend "qif-dialog-utils.scm") ;; build displays for dialog -(gnc:depend "qif-guess-map.scm") ;; build QIF->gnc acct mappings -(gnc:depend "qif-to-gnc.scm") ;; conv QIF xtns/acct to GNC xtns/acct +(gnc:depend "qif-import/simple-obj.scm") +(gnc:depend "qif-import/qif-objects.scm") ;; class definitions +(gnc:depend "qif-import/qif-parse.scm") ;; string-to-value, date parsing +(gnc:depend "qif-import/qif-utils.scm") +(gnc:depend "qif-import/qif-file.scm") ;; actual file reading +(gnc:depend "qif-import/qif-dialog-utils.scm") ;; build displays for dialog +(gnc:depend "qif-import/qif-guess-map.scm") ;; build QIF->gnc acct mappings +(gnc:depend "qif-import/qif-to-gnc.scm") ;; conv QIF xtns/acct to GNC xtns/acct diff --git a/src/scm/qif-import/qif-objects.scm b/src/scm/qif-import/qif-objects.scm index 997f51ef6f..5cf0141822 100644 --- a/src/scm/qif-import/qif-objects.scm +++ b/src/scm/qif-import/qif-objects.scm @@ -6,8 +6,8 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "qif-objects.scm") -(gnc:depend "simple-obj.scm") +(gnc:support "qif-import/qif-objects.scm") +(gnc:depend "qif-import/simple-obj.scm") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/src/scm/qif-import/qif-parse.scm b/src/scm/qif-import/qif-parse.scm index 40178e4d7c..89346e099f 100644 --- a/src/scm/qif-import/qif-parse.scm +++ b/src/scm/qif-import/qif-parse.scm @@ -6,7 +6,7 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "qif-parse.scm") +(gnc:support "qif-import/qif-parse.scm") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; qif-split:parse-category diff --git a/src/scm/qif-import/qif-to-gnc.scm b/src/scm/qif-import/qif-to-gnc.scm index 128045b302..96cc2e6b6d 100644 --- a/src/scm/qif-import/qif-to-gnc.scm +++ b/src/scm/qif-import/qif-to-gnc.scm @@ -7,7 +7,7 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "qif-to-gnc.scm") +(gnc:support "qif-import/qif-to-gnc.scm") ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; find-or-make-acct: diff --git a/src/scm/qif-import/qif-utils.scm b/src/scm/qif-import/qif-utils.scm index 2a040b3466..b89455776d 100644 --- a/src/scm/qif-import/qif-utils.scm +++ b/src/scm/qif-import/qif-utils.scm @@ -6,7 +6,7 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "qif-utils.scm") +(gnc:support "qif-import/qif-utils.scm") (define (simple-filter pred list) (let ((retval '())) diff --git a/src/scm/qif-import/simple-obj.scm b/src/scm/qif-import/simple-obj.scm index 04e45135d3..5c378c9343 100644 --- a/src/scm/qif-import/simple-obj.scm +++ b/src/scm/qif-import/simple-obj.scm @@ -6,7 +6,7 @@ ;;; $Id$ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(gnc:support "simple-obj.scm") +(gnc:support "qif-import/simple-obj.scm") ;; this is an extremely rudimentary object system. Each object is a ;; cons cell, where the car is a symbol with the class name and the