diff --git a/ChangeLog b/ChangeLog index 046b49d282..7dbc3e9518 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2000-05-12 Dave Peticolas + + * Makefile.in: add -follow arguments to find commands + + * Makefile.common (CFLAGS): removed hard-coded profiling option + + * configure.in: add a profiling argument. + + * src/guile/gnucash.c: use putenv, not setenv. putenv is POSIX, + seems to be more common. + 2000-05-10 Dave Peticolas * many: removed use of SCM registry in favor of scm_protect_object diff --git a/Makefile.common b/Makefile.common index 71472c1c3b..a4b622fb38 100644 --- a/Makefile.common +++ b/Makefile.common @@ -42,7 +42,7 @@ MOTIF_OBJS += $(addprefix obj/motif/,${MOTIF_SRCS:.c=.o}) QT_OBJS := $(addprefix obj/qt/,${COMMON_SRCS:.c=.o}) QT_OBJS += $(addprefix obj/qt/,${QT_SRCS:.cpp=.o}) -CFLAGS += -pg ${DEFS} +CFLAGS += ${DEFS} ifdef GNOME_CONFIG_BIN GNOME_CFLAGS += $(shell ${GNOME_CONFIG_BIN} --cflags gnomeui) diff --git a/Makefile.in b/Makefile.in index ffa475d3a0..d402462d5a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -199,13 +199,13 @@ install: # Share directory # Try to do this in a platform independent way... # Directories - for dir in `find share/scm/ -type d`; do \ + for dir in `find share/scm/ -type d -follow`; do \ dest=`echo $$dir | cut -c 11-` ;\ mkdir -p ${GNC_SHAREDIR}/scm/$$dest; \ done # Files - for file in `find share/scm/ -name "*.scm"`; do \ + for file in `find share/scm/ -name "*.scm" -follow`; do \ dest=`echo $$file | cut -c 11-` ;\ ${INSTALL_DATA} $$file ${GNC_SHAREDIR}/scm/$$dest; \ done diff --git a/config.h.in b/config.h.in index 8b93f84778..45c1cbb356 100644 --- a/config.h.in +++ b/config.h.in @@ -42,6 +42,9 @@ /* Standard C headers present */ #undef STDC_HEADERS +/* limits.h header present */ +#undef HAVE_LIMITS_H + /* memcpy present */ #undef HAVE_MEMCPY diff --git a/configure b/configure index 19a6e1662b..3a1765a286 100755 --- a/configure +++ b/configure @@ -17,6 +17,8 @@ ac_help="$ac_help --with-opt-style-install install everything in subdirs of --prefix" ac_help="$ac_help --enable-debug compile with debugging flags set" +ac_help="$ac_help + --enable-profile compile with profiling set" ac_help="$ac_help --enable-warnings compile with lots of warnings generated" ac_help="$ac_help @@ -601,7 +603,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:605: checking for a BSD compatible install" >&5 +echo "configure:607: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -657,7 +659,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:661: checking whether build environment is sane" >&5 +echo "configure:663: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -714,7 +716,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:718: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:720: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -760,7 +762,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:764: checking for working aclocal" >&5 +echo "configure:766: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -773,7 +775,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:777: checking for working autoconf" >&5 +echo "configure:779: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -786,7 +788,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:790: checking for working automake" >&5 +echo "configure:792: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -799,7 +801,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:803: checking for working autoheader" >&5 +echo "configure:805: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -812,7 +814,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:816: checking for working makeinfo" >&5 +echo "configure:818: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -840,7 +842,7 @@ ALL_LINGUAS="fr de en_GB sv" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:844: checking for a BSD compatible install" >&5 +echo "configure:846: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -895,7 +897,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:899: checking for $ac_word" >&5 +echo "configure:901: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -927,7 +929,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:931: checking for $ac_word" >&5 +echo "configure:933: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -957,7 +959,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:961: checking for $ac_word" >&5 +echo "configure:963: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1008,7 +1010,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1012: checking for $ac_word" >&5 +echo "configure:1014: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1040,7 +1042,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1044: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1046: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1051,12 +1053,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1055 "configure" +#line 1057 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1082,12 +1084,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1086: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1088: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1091: checking whether we are using GNU C" >&5 +echo "configure:1093: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1096,7 +1098,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1115,7 +1117,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1119: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1121: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1148,7 +1150,7 @@ fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1152: checking for POSIXized ISC" >&5 +echo "configure:1154: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1169,14 +1171,14 @@ else fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1173: checking whether byte ordering is bigendian" >&5 +echo "configure:1175: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1187,11 +1189,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1202,7 +1204,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1222,7 +1224,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1259,7 +1261,7 @@ EOF fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1263: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1265: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1286,7 +1288,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1290: checking how to run the C preprocessor" >&5 +echo "configure:1292: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1301,13 +1303,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:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1313: \"$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 : @@ -1318,13 +1320,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:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1330: \"$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 : @@ -1335,13 +1337,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:1345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1347: \"$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 : @@ -1366,12 +1368,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1370: checking for ANSI C header files" >&5 +echo "configure:1372: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1379,7 +1381,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1385: \"$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* @@ -1396,7 +1398,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1414,7 +1416,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1435,7 +1437,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1446,7 +1448,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1470,15 +1472,55 @@ EOF fi +for ac_hdr in limits.h +do +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1480: checking for $ac_hdr" >&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:1490: \"$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* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + cat >> confdefs.h <&6 +fi +done + for ac_func in stpcpy memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1477: checking for $ac_func" >&5 +echo "configure:1519: 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:1547: \"$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 @@ -1526,6 +1568,7 @@ fi done + ### -------------------------------------------------------------------------- ### Variables ### Set up all the initial variable values... @@ -1587,6 +1630,14 @@ EOF fi +# Check whether --enable-profile or --disable-profile was given. +if test "${enable_profile+set}" = set; then + enableval="$enable_profile" + CFLAGS="${CFLAGS} -pg" + LDFLAGS="${LDFLAGS} -pg" +fi + + # Check whether --enable-warnings or --disable-warnings was given. if test "${enable_warnings+set}" = set; then enableval="$enable_warnings" @@ -1620,19 +1671,19 @@ fi ac_cv_header_locale_h=yes if test "$ac_cv_header_locale_h" = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:1624: checking for LC_MESSAGES" >&5 +echo "configure:1675: 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:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1687: \"$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 @@ -1653,7 +1704,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:1657: checking whether NLS is requested" >&5 +echo "configure:1708: 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" @@ -1673,7 +1724,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:1677: checking whether included gettext is requested" >&5 +echo "configure:1728: 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" @@ -1692,17 +1743,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:1696: checking for libintl.h" >&5 +echo "configure:1747: 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:1706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1757: \"$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* @@ -1719,19 +1770,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:1723: checking for gettext in libc" >&5 +echo "configure:1774: 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:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1786: \"$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 @@ -1747,7 +1798,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:1751: checking for bindtextdomain in -lintl" >&5 +echo "configure:1802: 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 @@ -1755,7 +1806,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:1821: \"$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 @@ -1782,12 +1833,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:1786: checking for gettext in libintl" >&5 +echo "configure:1837: 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:1791: checking for gettext in -lintl" >&5 +echo "configure:1842: 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 @@ -1795,7 +1846,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:1861: \"$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 @@ -1845,7 +1896,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:1849: checking for $ac_word" >&5 +echo "configure:1900: 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 @@ -1879,12 +1930,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1883: checking for $ac_func" >&5 +echo "configure:1934: 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:1962: \"$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 @@ -1934,7 +1985,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:1938: checking for $ac_word" >&5 +echo "configure:1989: 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 @@ -1970,7 +2021,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:1974: checking for $ac_word" >&5 +echo "configure:2025: 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 @@ -2006,7 +2057,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:2010: checking for $ac_word" >&5 +echo "configure:2061: 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 @@ -2038,7 +2089,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -2069,7 +2120,7 @@ fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:2073: checking whether catgets can be used" >&5 +echo "configure:2124: 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" @@ -2082,7 +2133,7 @@ fi if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:2086: checking for main in -li" >&5 +echo "configure:2137: 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 @@ -2090,14 +2141,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:2152: \"$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 @@ -2125,12 +2176,12 @@ else fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:2129: checking for catgets" >&5 +echo "configure:2180: 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:2208: \"$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 @@ -2175,7 +2226,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:2179: checking for $ac_word" >&5 +echo "configure:2230: 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 @@ -2211,7 +2262,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:2215: checking for $ac_word" >&5 +echo "configure:2266: 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 @@ -2248,7 +2299,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:2252: checking for $ac_word" >&5 +echo "configure:2303: 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 @@ -2283,7 +2334,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:2287: checking for $ac_word" >&5 +echo "configure:2338: 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 @@ -2341,7 +2392,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:2345: checking for $ac_word" >&5 +echo "configure:2396: 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 @@ -2375,7 +2426,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:2379: checking for $ac_word" >&5 +echo "configure:2430: 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 @@ -2411,7 +2462,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:2415: checking for $ac_word" >&5 +echo "configure:2466: 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 @@ -2506,7 +2557,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:2510: checking for catalogs to be installed" >&5 +echo "configure:2561: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -2581,7 +2632,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:2585: checking for $ac_word" >&5 +echo "configure:2636: 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 @@ -2659,7 +2710,7 @@ fi # 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:2663: checking for $ac_word" >&5 +echo "configure:2714: 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 @@ -2720,7 +2771,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:2724: checking for $ac_word" >&5 +echo "configure:2775: 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 @@ -2771,7 +2822,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:2775: checking for $ac_word" >&5 +echo "configure:2826: 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 @@ -2821,7 +2872,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:2825: checking for X" >&5 +echo "configure:2876: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -2883,12 +2934,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:2892: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2943: \"$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* @@ -2957,14 +3008,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:3019: \"$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. @@ -3070,17 +3121,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:3074: checking whether -R must be followed by a space" >&5 +echo "configure:3125: 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:3135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3096,14 +3147,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:3158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3135,7 +3186,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:3139: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3190: 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 @@ -3143,7 +3194,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:3209: \"$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 @@ -3176,7 +3227,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:3180: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3231: 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 @@ -3184,7 +3235,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:3250: \"$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 @@ -3224,12 +3275,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:3228: checking for gethostbyname" >&5 +echo "configure:3279: 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:3307: \"$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 @@ -3273,7 +3324,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3277: checking for gethostbyname in -lnsl" >&5 +echo "configure:3328: 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 @@ -3281,7 +3332,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:3347: \"$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 @@ -3322,12 +3373,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:3326: checking for connect" >&5 +echo "configure:3377: 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:3405: \"$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 @@ -3371,7 +3422,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3375: checking for connect in -lsocket" >&5 +echo "configure:3426: 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 @@ -3379,7 +3430,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:3445: \"$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 @@ -3414,12 +3465,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:3418: checking for remove" >&5 +echo "configure:3469: 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:3497: \"$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 @@ -3463,7 +3514,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3467: checking for remove in -lposix" >&5 +echo "configure:3518: 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 @@ -3471,7 +3522,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:3537: \"$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 @@ -3506,12 +3557,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3510: checking for shmat" >&5 +echo "configure:3561: 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:3589: \"$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 @@ -3555,7 +3606,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3559: checking for shmat in -lipc" >&5 +echo "configure:3610: 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 @@ -3563,7 +3614,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:3629: \"$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 @@ -3607,7 +3658,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:3611: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3662: 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 @@ -3615,7 +3666,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:3681: \"$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 @@ -3748,7 +3799,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:3752: checking for deflateEnd in -lz" >&5 +echo "configure:3803: 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 @@ -3756,7 +3807,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:3822: \"$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 @@ -3791,7 +3842,7 @@ else fi echo $ac_n "checking for jpeg_read_scanlines in -ljpeg""... $ac_c" 1>&6 -echo "configure:3795: checking for jpeg_read_scanlines in -ljpeg" >&5 +echo "configure:3846: 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 @@ -3799,7 +3850,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:3865: \"$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 @@ -3834,7 +3885,7 @@ else fi echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:3838: checking for png_read_image in -lpng" >&5 +echo "configure:3889: 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 @@ -3842,7 +3893,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:3908: \"$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 @@ -3883,7 +3934,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:3887: checking for XpmReadFileToXpmImage in -lXpm" >&5 +echo "configure:3938: 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 @@ -3891,7 +3942,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:3957: \"$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 @@ -3937,7 +3988,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:3941: checking for XmHTMLTextScrollToLine in -lXmHTML" >&5 +echo "configure:3992: 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 @@ -3945,7 +3996,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:4011: \"$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 @@ -4003,14 +4054,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:4007: checking gtk-xmhtml/gtk-xmhtml.h" >&5 +echo "configure:4058: 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:4014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4065: \"$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* @@ -4032,7 +4083,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:4036: checking for readline in -lreadline" >&5 +echo "configure:4087: 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 @@ -4040,7 +4091,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:4106: \"$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 @@ -4085,7 +4136,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:4089: checking for gtk_xmhtml_new in -lgtkxmhtml" >&5 +echo "configure:4140: 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 @@ -4093,7 +4144,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:4159: \"$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 @@ -4135,7 +4186,7 @@ EXTRALIBS=`$GNOME_CONFIG_BIN --libs xml` #check for libxml echo $ac_n "checking for xmlDefaultSAXHandlerInit in -lxml""... $ac_c" 1>&6 -echo "configure:4139: checking for xmlDefaultSAXHandlerInit in -lxml" >&5 +echo "configure:4190: checking for xmlDefaultSAXHandlerInit in -lxml" >&5 ac_lib_var=`echo xml'_'xmlDefaultSAXHandlerInit | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4143,7 +4194,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lxml $EXTRALIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4209: \"$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 @@ -4192,7 +4243,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:4196: checking for gnome_print_context_new in -lgnomeprint" >&5 +echo "configure:4247: 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 @@ -4200,7 +4251,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:4266: \"$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 @@ -4254,7 +4305,7 @@ G_WRAP_LINK_ARGS="" # Extract the first word of "g-wrap-config", so it can be a program name with args. set dummy g-wrap-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4258: checking for $ac_word" >&5 +echo "configure:4309: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_G_WRAP_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4298,7 +4349,7 @@ fi # Extract the first word of "g-wrap", so it can be a program name with args. set dummy g-wrap; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4302: checking for $ac_word" >&5 +echo "configure:4353: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_G_WRAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4356,7 +4407,7 @@ GUILE_LINK_ARGS="" # 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:4360: checking for $ac_word" >&5 +echo "configure:4411: 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 @@ -4400,7 +4451,7 @@ fi # 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:4404: checking for $ac_word" >&5 +echo "configure:4455: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/configure.in b/configure.in index b942960f99..2d331069fa 100644 --- a/configure.in +++ b/configure.in @@ -40,8 +40,10 @@ AC_C_BIGENDIAN AC_PROG_MAKE_SET AC_HEADER_STDC +AC_CHECK_HEADERS(limits.h) AC_CHECK_FUNCS(stpcpy memcpy) + ### -------------------------------------------------------------------------- ### Variables ### Set up all the initial variable values... @@ -70,6 +72,11 @@ AC_ARG_ENABLE( debug, AC_DEFINE(DEBUG_MEMORY,1) AC_DEFINE(USE_DEBUG,1), AC_DEFINE(DEBUG_MEMORY,0) AC_DEFINE(USE_DEBUG,0) ) +AC_ARG_ENABLE( profile, + [ --enable-profile compile with profiling set], + CFLAGS="${CFLAGS} -pg" + LDFLAGS="${LDFLAGS} -pg") + AC_ARG_ENABLE( warnings, [ --enable-warnings compile with lots of warnings generated], CFLAGS="${CFLAGS} -g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects" diff --git a/doc/README b/doc/README index 027c157c86..d4c957bffe 100644 --- a/doc/README +++ b/doc/README @@ -595,6 +595,7 @@ Peter Pointner QIF import fixes, Qt patches Gavin Porter for euro style dates Tomas Pospisek debian patches Ron Record for SCO Unixware & OpenServer binaries +Keith Refson Solaris fixes Dirk Schoenberger Qt/KDE work Jan Schrage documentation patches Christopher Seawood for XbaeMatrix core dump diff --git a/doc/html/C/xacc-about.html b/doc/html/C/xacc-about.html index 8c8081f1aa..e9ff0661b0 100644 --- a/doc/html/C/xacc-about.html +++ b/doc/html/C/xacc-about.html @@ -447,6 +447,10 @@
for SCO Unixware and OpenServer binaries
+
Keith Refson
+ +
Solaris fixes
+
Dirk Schoenberger
diff --git a/src/SplitLedger.c b/src/SplitLedger.c index 339ab6895a..b790a8ff30 100644 --- a/src/SplitLedger.c +++ b/src/SplitLedger.c @@ -184,7 +184,6 @@ static SRReverseBalanceCallback reverse_balance = NULL; /* The copied split or transaction, if any */ static SCM copied_item = SCM_UNDEFINED; -static SCM copied_item_id = SCM_UNDEFINED; /* static prototypes */ static void xaccSRLoadRegEntry (SplitRegister *reg, Split *split); @@ -278,9 +277,7 @@ xaccSRSetReverseBalanceCallback(SRReverseBalanceCallback callback) } -/* copies basic split values from 'from' split to 'to' split. - * doesn't copy reconciled flag, or open the parent transactions - * for editing. Does *not* insert the 'to' split into an account!! */ +/* Uses the scheme split copying routines */ static void gnc_copy_split_onto_split(Split *from, Split *to) { @@ -296,48 +293,20 @@ gnc_copy_split_onto_split(Split *from, Split *to) gnc_copy_split_scm_onto_split(split_scm, to); } -/* copies the basic transaction values and the splits from the - * 'from' trans to the 'to' trans. Any existing splits in the - * 'to' trans are deleted. Does *not* open the 'to' trans for - * editing!!! Splits are copied using gnc_copy_split_onto_split - * above. The new splits will be in exactly the same order as in - * the 'from' transaction. */ +/* Uses the scheme transaction copying routines */ static void -gnc_copy_trans(Transaction *from, Transaction *to) +gnc_copy_trans_onto_trans(Transaction *from, Transaction *to) { - Split *from_split, *to_split; - Timespec timespec; - int num_splits; - int i; + SCM trans_scm; if ((from == NULL) || (to == NULL)) return; - /* remove the old splits */ - to_split = xaccTransGetSplit(to, 0); - while (to_split != NULL) - { - xaccSplitDestroy(to_split); - to_split = xaccTransGetSplit(to, 0); - } - - /* add in the new splits */ - num_splits = xaccTransCountSplits(from); - for (i = 0; i < num_splits; i++) - { - from_split = xaccTransGetSplit(from, i); - - to_split = xaccMallocSplit(); - gnc_copy_split_onto_split(from_split, to_split); - - xaccTransAppendSplit(to, to_split); - } + trans_scm = gnc_copy_trans(from); + if (trans_scm == SCM_UNDEFINED) + return; - /* now do the transaction-specific values */ - xaccTransGetDateTS(from, ×pec); - xaccTransSetDateTS(to, ×pec); - xaccTransSetDescription(to, xaccTransGetDescription(from)); - xaccTransSetDocref(to, xaccTransGetDocref(from)); + gnc_copy_trans_scm_onto_trans(trans_scm, to); } /* ======================================================== */ @@ -467,7 +436,8 @@ LedgerMoveCursor (Table *table, else if (new_phys_col >= table->num_phys_cols) new_phys_col = table->num_phys_cols - 1; - gnc_table_find_valid_cell_horiz(table, &new_phys_row, &new_phys_col, GNC_F); + gnc_table_find_valid_cell_horiz(table, &new_phys_row, + &new_phys_col, GNC_F); *p_new_phys_row = new_phys_row; *p_new_phys_col = new_phys_col; @@ -887,46 +857,35 @@ xaccSRDuplicateCurrent (SplitRegister *reg) else { Transaction *new_trans; + int split_index; int num_splits; int i; /* We are on a transaction row. Copy the whole transaction. */ - new_trans = xaccMallocTransaction(); - - xaccTransBeginEdit(new_trans, GNC_T); - - gnc_copy_trans(trans, new_trans); - + split_index = -1; num_splits = xaccTransCountSplits(trans); - return_split = NULL; - - /* Link the new splits into the accounts. */ for (i = 0; i < num_splits; i++) - { - Account *account; - Split *old_split; - Split *new_split; - - old_split = xaccTransGetSplit(trans, i); - account = xaccSplitGetAccount(old_split); - - new_split = xaccTransGetSplit(new_trans, i); + if (xaccTransGetSplit(trans, i) == split) + { + split_index = i; + break; + } - xaccAccountBeginEdit(account, GNC_T); - xaccAccountInsertSplit(account, new_split); - xaccAccountCommitEdit(account); + /* we should *always* find the split, but be paranoid */ + if (split_index < 0) + return NULL; - /* Returned split is the transaction split */ - if (old_split == split) - return_split = new_split; - } + new_trans = xaccMallocTransaction(); - xaccTransCommitEdit(new_trans); + gnc_copy_trans_onto_trans(trans, new_trans); /* This shouldn't happen, but be paranoid. */ - if (return_split == NULL) - return_split = xaccTransGetSplit(new_trans, 0); + num_splits = xaccTransCountSplits(new_trans); + if (split_index >= num_splits) + split_index = 0; + + return_split = xaccTransGetSplit(new_trans, split_index); } /* Refresh the GUI. */ @@ -1246,6 +1205,168 @@ xaccSRRedrawRegEntry (SplitRegister *reg) gnc_refresh_main_window(); } +/* ======================================================== */ +/* Copy from the register object to scheme. + * This needs to be in sync with xaccSRSaveRegEntry. */ + +static gncBoolean +xaccSRSaveRegEntryToSCM (SplitRegister *reg, SCM trans_scm, SCM split_scm) +{ + Transaction *trans; + unsigned int changed; + int style; + + /* use the changed flag to avoid heavy-weight updates + * of the split & transaction fields. This will help + * cut down on uneccessary register redraws. */ + changed = xaccSplitRegisterGetChangeFlag (reg); + if (!changed) + return GNC_F; + + style = (reg->type) & REG_STYLE_MASK; + + /* get the handle to the current split and transaction */ + trans = xaccSRGetCurrentTrans (reg); + if (trans == NULL) + return GNC_F; + + /* copy the contents from the cursor to the split */ + if (MOD_DATE & changed) { + Timespec ts; + + xaccDateCellGetDate(reg->dateCell, &ts); + gnc_trans_scm_set_date(trans_scm, &ts); + } + + if (MOD_NUM & changed) + gnc_trans_scm_set_num(trans_scm, reg->numCell->cell.value); + + if (MOD_DESC & changed) + gnc_trans_scm_set_description(trans_scm, reg->descCell->cell.value); + + if (MOD_RECN & changed) + gnc_split_scm_set_reconcile_state(split_scm, reg->recnCell->value[0]); + + if (MOD_ACTN & changed) + gnc_split_scm_set_action(split_scm, reg->actionCell->cell.value); + + if (MOD_MEMO & changed) + gnc_split_scm_set_memo(split_scm, reg->memoCell->cell.value); + + if ((MOD_XFRM | MOD_XTO) & changed) { + Account *new_account; + char *new_name; + + if (MOD_XFRM & changed) + new_name = reg->xfrmCell->cell.value; + else + new_name = reg->xtoCell->cell.value; + + new_account = xaccGetAccountByFullName(trans, new_name, account_separator); + + if (new_account != NULL) + gnc_split_scm_set_account(split_scm, new_account); + } + + if (MOD_MXFRM & changed) { + SCM other_split_scm; + + other_split_scm = gnc_trans_scm_get_other_split_scm(trans_scm, split_scm); + + if (other_split_scm == SCM_UNDEFINED) { + if (gnc_trans_scm_get_num_splits(trans_scm) == 1) { + Split *temp_split; + char *temp_string; + double price; + double amount; + + temp_split = xaccMallocSplit (); + other_split_scm = gnc_copy_split(temp_split); + xaccSplitDestroy(temp_split); + + temp_string = gnc_split_scm_get_memo(split_scm); + if (temp_string != NULL) { + gnc_split_scm_set_memo(other_split_scm, temp_string); + free(temp_string); + } + + temp_string = gnc_split_scm_get_action(split_scm); + if (temp_string != NULL) { + gnc_split_scm_set_action(other_split_scm, temp_string); + free(temp_string); + } + + price = gnc_split_scm_get_share_price(other_split_scm); + amount = gnc_split_scm_get_share_amount(other_split_scm); + gnc_split_scm_set_share_price_and_amount(other_split_scm, + price, amount); + + gnc_trans_scm_append_split_scm(trans_scm, other_split_scm); + } + } + + if (other_split_scm != SCM_UNDEFINED) { + Account *new_account; + + new_account = xaccGetAccountByFullName(trans, reg->mxfrmCell->cell.value, + account_separator); + + if (new_account != NULL) + gnc_split_scm_set_account(other_split_scm, new_account); + } + } + + if ((MOD_AMNT | MOD_NAMNT) & changed) { + double new_amount; + double price; + double credit; + double debit; + + if (MOD_AMNT & changed) { + credit = xaccGetPriceCellValue(reg->creditCell); + debit = xaccGetPriceCellValue(reg->debitCell); + new_amount = debit - credit; + } else { + credit = xaccGetPriceCellValue(reg->ncreditCell); + debit = xaccGetPriceCellValue(reg->ndebitCell); + new_amount = -(debit - credit); + } + + price = gnc_split_scm_get_share_price(split_scm); + + if ((EQUITY_REGISTER == (reg->type & REG_TYPE_MASK)) || + (STOCK_REGISTER == (reg->type & REG_TYPE_MASK)) || + (CURRENCY_REGISTER == (reg->type & REG_TYPE_MASK)) || + (PORTFOLIO_LEDGER == (reg->type & REG_TYPE_MASK))) + ; + else + new_amount = new_amount / price; + + gnc_split_scm_set_share_price_and_amount(split_scm, price, new_amount); + } + + if (MOD_PRIC & changed) { + double price; + double amount; + + price = xaccGetPriceCellValue(reg->priceCell); + amount = gnc_split_scm_get_share_amount(split_scm); + + gnc_split_scm_set_share_price_and_amount(split_scm, price, amount); + } + + if (MOD_VALU & changed) { + double value = xaccGetPriceCellValue(reg->valueCell); + double price = gnc_split_scm_get_share_price(split_scm); + + value = value / price; + + gnc_split_scm_set_share_price_and_amount(split_scm, price, value); + } + + return GNC_T; +} + /* ======================================================== */ /* Copy from the register object to the engine */ @@ -1262,7 +1383,7 @@ xaccSRSaveRegEntry (SplitRegister *reg, Transaction *new_trans) /* use the changed flag to avoid heavy-weight updates * of the split & transaction fields. This will help - * cut down on uneccessary register redraws. */ + * cut down on uneccessary register redraws. */ changed = xaccSplitRegisterGetChangeFlag (reg); if (!changed) return GNC_F; diff --git a/src/SplitLedger.h b/src/SplitLedger.h index 00371c46dd..3eac1e1e05 100644 --- a/src/SplitLedger.h +++ b/src/SplitLedger.h @@ -154,6 +154,10 @@ void xaccSREmptyCurrentTrans (SplitRegister *reg); void xaccSRCancelCursorSplitChanges (SplitRegister *reg); void xaccSRCancelCursorTransChanges (SplitRegister *reg); +void xaccSRCopyCurrent (SplitRegister *reg); +void xaccSRCutCurrent (SplitRegister *reg); +void xaccSRPasteCurrent (SplitRegister *reg); + void xaccSRLoadRegister (SplitRegister *reg, Split **slist, Account *default_source_acc); diff --git a/src/engine/Transaction.c b/src/engine/Transaction.c index c8693a5718..55d0b7277e 100644 --- a/src/engine/Transaction.c +++ b/src/engine/Transaction.c @@ -2131,7 +2131,7 @@ xaccGetAccountByFullName (Transaction *trans, const char * name, s = trans->splits[i]; } - if (!acc) return 0x0; + if (!acc) return NULL; acc = xaccGetPeerAccountFromFullName (acc, name, separator); return acc; diff --git a/src/gnome/dialog-options.c b/src/gnome/dialog-options.c index 9e91361949..0d68aaf020 100644 --- a/src/gnome/dialog-options.c +++ b/src/gnome/dialog-options.c @@ -145,7 +145,7 @@ gnc_option_set_ui_value(GNCOption *option, gboolean use_default) value = gh_cdr(value); row = gnc_option_permissible_value_index(option, item); - if (index < 0) + if (row < 0) { bad_value = TRUE; break; diff --git a/src/messages_i18n.h b/src/messages_i18n.h index 9a286db166..32999b198b 100644 --- a/src/messages_i18n.h +++ b/src/messages_i18n.h @@ -82,6 +82,9 @@ "choose an account to reconcile.\n") #define AMOUNT_NUM_MSG _("The amount must be a number.") #define BALANCE_NUM_MSG _("The balance must be a number.") +#define CHANGE_RECN_MSG _("Do you really want to mark this transaction"\ + "not reconciled?\nDoing so might make future"\ + "reconciliation difficult!") #define DEL_SPLITS_MSG _("Delete all the splits") #define DEL_TRANS_MSG _("Delete the whole transaction") #define DEL_USUAL_MSG _("This selection will delete the whole "\ diff --git a/src/register/datecell.c b/src/register/datecell.c index 7e6f410169..06cf217c41 100644 --- a/src/register/datecell.c +++ b/src/register/datecell.c @@ -376,6 +376,19 @@ xaccCommitDateCell (DateCell *cell) /* ================================================ */ +void +xaccDateCellGetDate (DateCell *cell, Timespec *ts) +{ + if (!cell || !ts) return; + + xaccParseDate (&(cell->date), cell->cell.value); + + ts->tv_sec = mktime(&cell->date); + ts->tv_nsec = 0; +} + +/* ================================================ */ + DateCell * xaccMallocDateCell (void) { diff --git a/src/register/datecell.h b/src/register/datecell.h index b6cf9966e8..911a107849 100644 --- a/src/register/datecell.h +++ b/src/register/datecell.h @@ -88,7 +88,10 @@ #define __XACC_DATE_CELL_C__ #include + #include "basiccell.h" +#include "Transaction.h" + typedef struct _DateCell { BasicCell cell; @@ -106,6 +109,8 @@ void xaccSetDateCellValueSecsL (DateCell *, long long secs); void xaccCommitDateCell (DateCell *); +void xaccDateCellGetDate (DateCell *cell, Timespec *ts); + #endif /* __XACC_DATE_CELL_C__ */ /* --------------- end of file ---------------------- */ diff --git a/src/register/recncell.c b/src/register/recncell.c index 139c0a2fa4..096bdfef13 100644 --- a/src/register/recncell.c +++ b/src/register/recncell.c @@ -1,14 +1,3 @@ -/* - * FILE: - * recncell.c - * - * FUNCTION: - * Implements a mouse-click cell that allows a series - * of values to be clicked through. - * - * HISTORY: - * Copyright (c) 1998 Linas Vepstas - */ /********************************************************************\ * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License as * @@ -21,10 +10,26 @@ * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License* - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * + * along with this program; if not, contact: * + * * + * Free Software Foundation Voice: +1-617-542-5942 * + * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * + * Boston, MA 02111-1307, USA gnu@gnu.org * + * * \********************************************************************/ +/* + * FILE: + * recncell.c + * + * FUNCTION: + * Implements a mouse-click cell that allows a series + * of values to be clicked through. + * + * HISTORY: + * Copyright (c) 1998 Linas Vepstas + */ + #include #include #include @@ -32,6 +37,7 @@ #include "basiccell.h" #include "recncell.h" #include "ui-callbacks.h" +#include "messages.h" /* hack alert -- I am uncomfortable with including engine * stuff here; all code in this directory should really be @@ -41,6 +47,7 @@ */ #include "Transaction.h" + /* ================================================ */ static const char * @@ -59,10 +66,7 @@ ToggleRecn (BasicCell *_cell, const char *cur_val, but that's still perhaps not optimal... */ if(cur_val[0] == YREC) { - if(!gnc_verify_dialog("Do you really want to mark this transaction" - "not reconciled?\nDoing so might make future" - "reconciliation difficult!", - GNC_T)) { + if(!gnc_verify_dialog(CHANGE_RECN_MSG, GNC_T)) { return strdup(cur_val); } } diff --git a/src/register/recncell.h b/src/register/recncell.h index b068044884..0a2221f204 100644 --- a/src/register/recncell.h +++ b/src/register/recncell.h @@ -1,3 +1,23 @@ +/********************************************************************\ + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License as * + * published by the Free Software Foundation; either version 2 of * + * the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License* + * along with this program; if not, contact: * + * * + * Free Software Foundation Voice: +1-617-542-5942 * + * 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * + * Boston, MA 02111-1307, USA gnu@gnu.org * + * * +\********************************************************************/ + /* * FILE: * recncell.h @@ -13,21 +33,6 @@ * HISTORY: * Copyright (c) 1998 Linas Vepstas */ -/********************************************************************\ - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU General Public License as * - * published by the Free Software Foundation; either version 2 of * - * the License, or (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License* - * along with this program; if not, write to the Free Software * - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * -\********************************************************************/ #ifndef __XACC_RECN_CELL_C__ #define __XACC_RECN_CELL_C__ diff --git a/src/scm/engine-interface.scm b/src/scm/engine-interface.scm index a31c025776..f18d2876b0 100644 --- a/src/scm/engine-interface.scm +++ b/src/scm/engine-interface.scm @@ -26,12 +26,15 @@ '(split-guid account-guid transaction-guid memo action docref reconcile-state reconciled-date share-amount share-price))) +;; constructor (define gnc:make-split-scm (record-constructor gnc:split-structure)) +;; type predicate (define gnc:split-scm? (record-predicate gnc:split-structure)) +;; accessors (define gnc:split-scm-get-split-guid (record-accessor gnc:split-structure 'split-guid)) @@ -62,6 +65,37 @@ (define gnc:split-scm-get-share-price (record-accessor gnc:split-structure 'share-price)) +;; modifiers +(define gnc:split-scm-set-split-guid + (record-modifier gnc:split-structure 'split-guid)) + +(define gnc:split-scm-set-account-guid + (record-modifier gnc:split-structure 'account-guid)) + +(define gnc:split-scm-set-transaction-guid + (record-modifier gnc:split-structure 'transaction-guid)) + +(define gnc:split-scm-set-memo + (record-modifier gnc:split-structure 'memo)) + +(define gnc:split-scm-set-action + (record-modifier gnc:split-structure 'action)) + +(define gnc:split-scm-set-docref + (record-modifier gnc:split-structure 'docref)) + +(define gnc:split-scm-set-reconcile-state + (record-modifier gnc:split-structure 'reconcile-state)) + +(define gnc:split-scm-set-reconciled-date + (record-modifier gnc:split-structure 'reconciled-date)) + +(define gnc:split-scm-set-share-amount + (record-modifier gnc:split-structure 'share-amount)) + +(define gnc:split-scm-set-share-price + (record-modifier gnc:split-structure 'share-price)) + ;; This function take a C split and returns a representation ;; of it as a split-structure. Assumes the transaction is open ;; for editing. @@ -87,17 +121,23 @@ (if (pointer-token-null? split) #f (begin + (let ((memo (gnc:split-scm-get-memo split-scm)) + (action (gnc:split-scm-get-action split-scm)) + (docref (gnc:split-scm-get-docref split-scm)) + (price (gnc:split-scm-get-share-price split-scm)) + (amount (gnc:split-scm-get-share-amount split-scm))) + (if memo (gnc:split-set-memo split memo)) + (if action (gnc:split-set-action split action)) + (if docref (gnc:split-set-docref split docref)) + (if (and price amount) + (gnc:split-set-share-price-and-amount split price amount))) (let ((account (gnc:account-lookup (gnc:split-scm-get-account-guid split-scm)))) (if (and account (gnc:account-can-insert-split? account split)) - (gnc:account-insert-split account split))) - (gnc:split-set-memo split (gnc:split-scm-get-memo split-scm)) - (gnc:split-set-action split (gnc:split-scm-get-action split-scm)) - (gnc:split-set-docref split (gnc:split-scm-get-docref split-scm)) - (gnc:split-set-share-price-and-amount - split - (gnc:split-scm-get-share-price split-scm) - (gnc:split-scm-get-share-amount split-scm))))) + (begin + (gnc:account-begin-edit account 1) + (gnc:account-insert-split account split) + (gnc:account-commit-edit account))))))) ;; Returns true if we can insert the C split into the given account. (define (gnc:account-can-insert-split? account split) @@ -113,14 +153,18 @@ (define gnc:transaction-structure (make-record-type "gnc:transaction-structure" - '(transaction-guid date-entered date-posted num description docref splits))) + '(transaction-guid date-entered date-posted num + description docref split-scms))) +;; constructor (define gnc:make-transaction-scm (record-constructor gnc:transaction-structure)) +;; type predicate (define gnc:transaction-scm? (record-predicate gnc:transaction-structure)) +;; accessors (define gnc:transaction-scm-get-transaction-guid (record-accessor gnc:transaction-structure 'transaction-guid)) @@ -139,17 +183,58 @@ (define gnc:transaction-scm-get-docref (record-accessor gnc:transaction-structure 'docref)) -(define gnc:transaction-scm-get-splits - (record-accessor gnc:transaction-structure 'splits)) +(define gnc:transaction-scm-get-split-scms + (record-accessor gnc:transaction-structure 'split-scms)) + +(define (gnc:transaction-scm-get-split-scm trans-scm index) + (let ((split-scms (gnc:transaction-scm-get-split-scms trans-scm))) + (cond ((< index 0) #f) + ((not (pair? split-scms)) #f) + ((>= index (length split-scms)) #f) + (else (list-ref index split-scms))))) + +(define (gnc:transaction-scm-get-other-split-scm trans-scm split-scm) + (let ((split-scms (gnc:transaction-scm-get-split-scms trans-scm))) + (cond ((not (= (length split-scms) 2)) #f) + ((= split-scm (car split-scms)) (cadr split-scms)) + (else (car split-scms))))) + +;; modifiers +(define gnc:transaction-scm-set-transaction-guid + (record-modifier gnc:transaction-structure 'transaction-guid)) + +(define gnc:transaction-scm-set-date-entered + (record-modifier gnc:transaction-structure 'date-entered)) + +(define gnc:transaction-scm-set-date-posted + (record-modifier gnc:transaction-structure 'date-posted)) + +(define gnc:transaction-scm-set-num + (record-modifier gnc:transaction-structure 'num)) + +(define gnc:transaction-scm-set-description + (record-modifier gnc:transaction-structure 'description)) + +(define gnc:transaction-scm-set-docref + (record-modifier gnc:transaction-structure 'docref)) + +(define gnc:transaction-scm-set-split-scms + (record-modifier gnc:transaction-structure 'split-scms)) + +(define (gnc:transaction-scm-append-split-scm trans-scm split-scm) + (let ((split-scms (gnc:transaction-scm-get-split-scms trans-scm))) + (gnc:transaction-scm-set-split-scms + trans-scm (append split-scms (list split-scm))))) ;; This function takes a C transaction and returns ;; a representation of it as a transaction-structure. (define (gnc:transaction->transaction-scm trans) (define (trans-splits i) - (let (split ((gnc:transaction-get-split trans i))) + (let ((split (gnc:transaction-get-split trans i))) (if (pointer-token-null? split) '() - (cons split (trans-splits (+ i 1)))))) + (cons (gnc:split->split-scm split) + (trans-splits (+ i 1)))))) (gnc:make-transaction-scm (gnc:transaction-get-guid trans) (gnc:transaction-get-date-entered trans) @@ -159,6 +244,42 @@ (gnc:transaction-get-docref trans) (trans-splits 0))) +;; Copy a scheme representation of a transaction onto a C transaction. +(define (gnc:transaction-scm-onto-transaction trans-scm trans) + (if (pointer-token-null? trans) + #f + (begin + + ;; open the transaction for editing + (gnc:transaction-begin-edit trans 1) + + ;; copy in the transaction values + (let ((date-posted (gnc:transaction-scm-get-date-posted trans-scm)) + (description (gnc:transaction-scm-get-description trans-scm)) + (docref (gnc:transaction-scm-get-docref trans-scm))) + (if date-posted (gnc:transaction-set-date-posted trans date-posted)) + (if description (gnc:transaction-set-description trans description)) + (if docref (gnc:transaction-set-docref trans docref))) + + ;; strip off the old splits + (let loop ((split (gnc:transaction-get-split trans 0))) + (if (not (pointer-token-null? split)) + (begin + (gnc:split-destroy split) + (loop (gnc:transaction-get-split trans 0))))) + + ;; and put on the new ones! Please note they go in the *same* + ;; order as in the original transaction. This is important. + (let loop ((split-scms (gnc:transaction-scm-get-split-scms trans-scm))) + (if (pair? split-scms) + (let ((new-split (gnc:split-create))) + (gnc:transaction-append-split trans new-split) + (gnc:split-scm-onto-split (car split-scms) new-split) + (loop (cdr split-scms))))) + + ;; close the transaction + (gnc:transaction-commit-edit trans)))) + ;; Return a scheme symbol identifying the type of guid passed in. (define gnc:guid-type #f)