diff --git a/config.h.in b/config.h.in index 53e065810d..f9add2f783 100644 --- a/config.h.in +++ b/config.h.in @@ -55,6 +55,9 @@ /* Use the new XmHTML widdget instead of the old htmlw widget */ #define HAVE_LIBXMHTML 1 +/* use gnomeprint if it's available */ +#undef HAVE_LIBGNOMEPRINT + /* misc image and compression libs needed by html widget */ #undef HAVE_ZLIB #undef HAVE_PNG diff --git a/configure b/configure index 863cf7f972..fb11d2f880 100755 --- a/configure +++ b/configure @@ -19,6 +19,14 @@ ac_help="$ac_help --enable-debug compile with debugging flags set" ac_help="$ac_help --enable-warnings compile with lots of warnings generated" +ac_help="$ac_help + --with-locale-dir=PATH specify where to look for locale-specific information" +ac_help="$ac_help + --disable-nls do not use Native Language Support" +ac_help="$ac_help + --with-included-gettext use the GNU gettext library included here" +ac_help="$ac_help + --with-catgets use catgets functions if available" ac_help="$ac_help --enable-qt enable building of the Qt version of gnucash" ac_help="$ac_help @@ -57,14 +65,6 @@ ac_help="$ac_help --with-guile-config=executable which guile-config to use to find guile " ac_help="$ac_help --with-guile=PATH specify where to look for guile includes and libs" -ac_help="$ac_help - --with-locale-dir=PATH specify where to look for locale-specific information" -ac_help="$ac_help - --disable-nls do not use Native Language Support" -ac_help="$ac_help - --with-included-gettext use the GNU gettext library included here" -ac_help="$ac_help - --with-catgets use catgets functions if available" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -1352,9 +1352,6 @@ done ### Variables ### Set up all the initial variable values... - - - # USE_QUICKFILL: cat >> confdefs.h <<\EOF #define USE_QUICKFILL 1 @@ -1427,6 +1424,1070 @@ EOF fi + +### -------------------------------------------------------------------------- +### i18n +# Check whether --with-locale-dir or --without-locale-dir was given. +if test "${with_locale_dir+set}" = set; then + withval="$with_locale_dir" + LOCALE_DIR="$with_locale_dir" +else + LOCALE_DIR="$prefix/share/locale" +fi + + + +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 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # 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; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + 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; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +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 +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; } +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_cv_header_locale_h=yes +else + echo "$ac_t""no" 1>&6 +ac_cv_header_locale_h=no +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 +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 + rm -rf conftest* + am_cv_val_LC_MESSAGES=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_val_LC_MESSAGES=no +fi +rm -f conftest* +fi + +echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 + if test "$am_cv_val_LC_MESSAGES" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_LC_MESSAGES 1 +EOF + + fi + fi + echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +echo "configure:1590: 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" + USE_NLS=$enableval +else + USE_NLS=yes +fi + + echo "$ac_t""$USE_NLS" 1>&6 + + + USE_INCLUDED_LIBINTL=no + + if test "$USE_NLS" = "yes"; then + cat >> confdefs.h <<\EOF +#define ENABLE_NLS 1 +EOF + + echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +echo "configure:1610: 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" + nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi + + echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + nls_cv_header_intl= + nls_cv_header_libgt= + CATOBJEXT=NONE + + 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 +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; } +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 + echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 +echo "configure:1656: 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 + rm -rf conftest* + gt_cv_func_gettext_libc=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + gt_cv_func_gettext_libc=no +fi +rm -f conftest* +fi + +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 +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 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +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 +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 +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 +else + ac_save_LIBS="$LIBS" +LIBS="-lintl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + gt_cv_func_gettext_libintl=yes +else + echo "$ac_t""no" 1>&6 +gt_cv_func_gettext_libintl=no +fi + +fi + +echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + fi + + if test "$gt_cv_func_gettext_libc" = "yes" \ + || test "$gt_cv_func_gettext_libintl" = "yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_GETTEXT 1 +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 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$MSGFMT" != "no"; then + 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 +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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1844: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +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 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +if eval "test \"`echo '$''{'ac_cv_path_GMSGMERGE'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGMERGE" in + /*) + ac_cv_path_GMSGMERGE="$GMSGMERGE" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGMERGE="$GMSGMERGE" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGMERGE="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGMERGE" && ac_cv_path_GMSGMERGE=":" + ;; +esac +fi +GMSGMERGE="$ac_cv_path_GMSGMERGE" +if test -n "$GMSGMERGE"; then + echo "$ac_t""$GMSGMERGE" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + CATOBJEXT=.gmo + DATADIRNAME=share +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CATOBJEXT=.mo + DATADIRNAME=lib +fi +rm -f conftest* + INSTOBJEXT=.mo + fi + fi + +else + echo "$ac_t""no" 1>&6 +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 + # Check whether --with-catgets or --without-catgets was given. +if test "${with_catgets+set}" = set; then + withval="$with_catgets" + nls_cv_use_catgets=$withval +else + nls_cv_use_catgets=no +fi + + echo "$ac_t""$nls_cv_use_catgets" 1>&6 + + 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 +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 +else + ac_save_LIBS="$LIBS" +LIBS="-li $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + echo $ac_n "checking for catgets""... $ac_c" 1>&6 +echo "configure:2062: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char catgets(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_catgets) || defined (__stub___catgets) +choke me +#else +catgets(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2090: \"$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 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_catgets=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_CATGETS 1 +EOF + + INTLOBJS="\$(CATOBJS)" + # 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 +if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GENCAT" in + /*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GENCAT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no" + ;; +esac +fi +GENCAT="$ac_cv_path_GENCAT" +if test -n "$GENCAT"; then + echo "$ac_t""$GENCAT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + if test "$GENCAT" != "no"; then + # 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 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$GMSGFMT" = "no"; then + # 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 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + 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 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.cat + INSTOBJEXT=.cat + DATADIRNAME=lib + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + if test "$CATOBJEXT" = "NONE"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + INTLOBJS="\$(GETTOBJS)" + # 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 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test -n "$MSGFMT"; then + echo "$ac_t""$MSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$GMSGFMT" in + /*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_GMSGFMT="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT="$ac_cv_path_GMSGFMT" +if test -n "$GMSGFMT"; then + echo "$ac_t""$GMSGFMT" 1>&6 +else + echo "$ac_t""no" 1>&6 +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 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test -n "$XGETTEXT"; then + echo "$ac_t""$XGETTEXT" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + + USE_INCLUDED_LIBINTL=yes + CATOBJEXT=.gmo + INSTOBJEXT=.mo + DATADIRNAME=share + INTLDEPS='$(top_builddir)/intl/libintl.a' + INTLLIBS=$INTLDEPS + LIBS=`echo $LIBS | sed -e 's/-lintl//'` + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 + XGETTEXT=":" + fi + fi + + # We need to process the po/ directory. + POSUB=po + else + DATADIRNAME=share + nls_cv_header_intl=intl/libintl.h + nls_cv_header_libgt=intl/libgettext.h + fi + + + + + # If this is used in GNU gettext we have to set USE_NLS to `yes' + # because some of the sources are only built for this goal. + if test "$PACKAGE" = gettext; then + USE_NLS=yes + USE_INCLUDED_LIBINTL=yes + fi + + for lang in $ALL_LINGUAS; do + GMOFILES="$GMOFILES $lang.gmo" + POFILES="$POFILES $lang.po" + POXFILES="$POXFILES $lang.pox" + done + + + + + + + + + + + + + + + + if test "x$CATOBJEXT" != "x"; then + if test "x$ALL_LINGUAS" = "x"; then + 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 + NEW_LINGUAS= + for lang in ${LINGUAS=$ALL_LINGUAS}; do + case "$ALL_LINGUAS" in + *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; + esac + done + LINGUAS=$NEW_LINGUAS + echo "$ac_t""$LINGUAS" 1>&6 + fi + + if test -n "$LINGUAS"; then + for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done + fi + fi + + if test "$ac_cv_header_locale_h" = yes; then + INCLUDE_LOCALE_H="#include " + else + INCLUDE_LOCALE_H="\ +/* The system does not provide the header . Take care yourself. */" + fi + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + test -d po || mkdir po + if test "x$srcdir" != "x."; then + if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then + posrcprefix="$srcdir/" + else + posrcprefix="../$srcdir/" + fi + else + posrcprefix="../" + fi + rm -f po/POTFILES + sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ + < $srcdir/po/POTFILES.in > po/POTFILES + + + ### -------------------------------------------------------------------------- ## qt-version of gnucash # The qt version of gnucash is far from doing anything usefull, so most people @@ -1458,7 +2519,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:1462: checking for $ac_word" >&5 +echo "configure:2523: 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 @@ -1537,7 +2598,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:1541: checking for $ac_word" >&5 +echo "configure:2602: 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 @@ -1596,7 +2657,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:1600: checking for $ac_word" >&5 +echo "configure:2661: 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 @@ -1657,7 +2718,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:1661: checking for $ac_word" >&5 +echo "configure:2722: 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 @@ -1708,7 +2769,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:1712: checking for $ac_word" >&5 +echo "configure:2773: 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 @@ -1753,92 +2814,12 @@ LIBS="$LIBS -lm" # This allows us to be careful about libarary ordering, in case that's # important. -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1758: checking how to run the C preprocessor" >&5 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # 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:1779: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - 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:1796: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - 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:1813: \"$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 - : -else - echo "$ac_err" >&5 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CPP=/lib/cpp -fi -rm -f conftest* -fi -rm -f conftest* -fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" -fi - CPP="$ac_cv_prog_CPP" -else - ac_cv_prog_CPP="$CPP" -fi -echo "$ac_t""$CPP" 1>&6 - # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # 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:1842: checking for X" >&5 +echo "configure:2823: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1900,12 +2881,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:1909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2890: \"$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* @@ -1974,14 +2955,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:2966: \"$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. @@ -2087,17 +3068,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:2091: checking whether -R must be followed by a space" >&5 +echo "configure:3072: 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:3082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -2113,14 +3094,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:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -2152,7 +3133,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:2156: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3137: 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 @@ -2160,7 +3141,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:3156: \"$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 @@ -2193,7 +3174,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:2197: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3178: 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 @@ -2201,7 +3182,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:3197: \"$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 @@ -2241,12 +3222,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:2245: checking for gethostbyname" >&5 +echo "configure:3226: 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:3254: \"$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 @@ -2290,7 +3271,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2294: checking for gethostbyname in -lnsl" >&5 +echo "configure:3275: 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 @@ -2298,7 +3279,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:3294: \"$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 @@ -2339,12 +3320,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:2343: checking for connect" >&5 +echo "configure:3324: 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:3352: \"$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 @@ -2388,7 +3369,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2392: checking for connect in -lsocket" >&5 +echo "configure:3373: 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 @@ -2396,7 +3377,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:3392: \"$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 @@ -2431,12 +3412,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:2435: checking for remove" >&5 +echo "configure:3416: 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:3444: \"$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 @@ -2480,7 +3461,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2484: checking for remove in -lposix" >&5 +echo "configure:3465: 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 @@ -2488,7 +3469,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:3484: \"$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 @@ -2523,12 +3504,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2527: checking for shmat" >&5 +echo "configure:3508: 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:3536: \"$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 @@ -2572,7 +3553,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2576: checking for shmat in -lipc" >&5 +echo "configure:3557: 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 @@ -2580,7 +3561,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:3576: \"$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 @@ -2624,7 +3605,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:2628: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3609: 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 @@ -2632,7 +3613,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:3628: \"$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 @@ -2765,7 +3746,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:2769: checking for deflateEnd in -lz" >&5 +echo "configure:3750: 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 @@ -2773,7 +3754,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:3769: \"$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 @@ -2808,7 +3789,7 @@ else fi echo $ac_n "checking for jpeg_read_scanlines in -ljpeg""... $ac_c" 1>&6 -echo "configure:2812: checking for jpeg_read_scanlines in -ljpeg" >&5 +echo "configure:3793: 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 @@ -2816,7 +3797,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:3812: \"$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 @@ -2851,7 +3832,7 @@ else fi echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:2855: checking for png_read_image in -lpng" >&5 +echo "configure:3836: 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 @@ -2859,7 +3840,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:3855: \"$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 @@ -2900,7 +3881,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:2904: checking for XpmReadFileToXpmImage in -lXpm" >&5 +echo "configure:3885: 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 @@ -2908,7 +3889,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:3904: \"$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 @@ -2950,7 +3931,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:2954: checking for XmHTMLTextScrollToLine in -lXmHTML" >&5 +echo "configure:3935: 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 @@ -2958,7 +3939,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:3954: \"$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 @@ -3016,14 +3997,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:3020: checking gtk-xmhtml/gtk-xmhtml.h" >&5 +echo "configure:4001: 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:3027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4008: \"$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* @@ -3042,65 +4023,10 @@ rm -f conftest* #undo damage to CPPFLAGS CPPFLAGS="$OLDCPPFLAGS" -OLDLDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS `$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:3051: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lgtkxmhtml $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - GTK_XMHTML="gtkxmhtml" -else - echo "$ac_t""no" 1>&6 -echo "configure: warning: Cannotfind libgtkxmhtml -- gnome build disabled (not required for motif)" 1>&2 - GNOME_TARGET="gnome.disabled" - GNOME_STATIC_TARGET="gnome.disabled" -fi - - -LDFLAGS="$OLDLDFLAGS" - -# XXX - should we export these here or later in the configure script? - - - - ### -------------------------------------------------------------------------- # 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:3104: checking for readline in -lreadline" >&5 +echo "configure:4030: 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 @@ -3108,7 +4034,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:4049: \"$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 @@ -3148,6 +4074,115 @@ fi +### -------------------------------------------------------------------------- +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 +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 +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 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + GTK_XMHTML="gtkxmhtml" +else + echo "$ac_t""no" 1>&6 +echo "configure: warning: Cannotfind libgtkxmhtml -- gnome build disabled (not required for motif)" 1>&2 + GNOME_TARGET="gnome.disabled" + GNOME_STATIC_TARGET="gnome.disabled" +fi + + + + +### -------------------------------------------------------------------------- +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 +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 +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 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo gnomeprint | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + + + +# XXX - should we export these here or later in the configure script? + + + + ### -------------------------------------------------------------------------- ### Guile (libraries and executable) @@ -3165,7 +4200,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:3169: checking for guile-config" >&5 +echo "configure:4204: checking for guile-config" >&5 echo "$ac_t""${with_guile_config}" 1>&6 GUILE_CONFIG="$with_guile_config" LIBS="`${GUILE_CONFIG} link` ${LIBS}" @@ -3178,7 +4213,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:3182: checking for $ac_word" >&5 +echo "configure:4217: 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 @@ -3234,7 +4269,7 @@ if test x"$GUILE_CONFIG" = x; then GNC_LIBS_SAFE=${LIBS} echo $ac_n "checking for guile""... $ac_c" 1>&6 -echo "configure:3238: checking for guile" >&5 +echo "configure:4273: checking for guile" >&5 if eval "test \"`echo '$''{'ac_cv_lib_guile'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3247,14 +4282,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:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* GUILELIBS="${GNC_TEST_LIBS}" else @@ -3281,7 +4316,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:3285: checking for $ac_word" >&5 +echo "configure:4320: 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 @@ -3320,7 +4355,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:3324: checking for $ac_word" >&5 +echo "configure:4359: 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 @@ -3359,7 +4394,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:3363: checking for $ac_word" >&5 +echo "configure:4398: 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 @@ -3477,990 +4512,6 @@ GNC_RUNTIME_PERLLIBPATH=`eval echo ${GNC_LIBDIR}` ABSOLUTE_TOP_SRCDIR=`pwd` -### Begin i18n - -# Check whether --with-locale-dir or --without-locale-dir was given. -if test "${with_locale_dir+set}" = set; then - withval="$with_locale_dir" - LOCALE_DIR="$with_locale_dir" -else - LOCALE_DIR="$prefix/share/locale" -fi - - - -ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for locale.h""... $ac_c" 1>&6 -echo "configure:3495: 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:3505: \"$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_cv_header_locale_h=yes -else - echo "$ac_t""no" 1>&6 -ac_cv_header_locale_h=no -fi - -if test "$ac_cv_header_locale_h" = yes; then - echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:3529: 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:3541: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - am_cv_val_LC_MESSAGES=no -fi -rm -f conftest* -fi - -echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 - if test "$am_cv_val_LC_MESSAGES" = yes; then - cat >> confdefs.h <<\EOF -#define HAVE_LC_MESSAGES 1 -EOF - - fi - fi - echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:3562: 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" - USE_NLS=$enableval -else - USE_NLS=yes -fi - - echo "$ac_t""$USE_NLS" 1>&6 - - - USE_INCLUDED_LIBINTL=no - - if test "$USE_NLS" = "yes"; then - cat >> confdefs.h <<\EOF -#define ENABLE_NLS 1 -EOF - - echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:3582: 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" - nls_cv_force_use_gnu_gettext=$withval -else - nls_cv_force_use_gnu_gettext=no -fi - - echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - nls_cv_header_intl= - nls_cv_header_libgt= - CATOBJEXT=NONE - - ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:3601: 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:3611: \"$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 - echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:3628: 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:3640: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - gt_cv_func_gettext_libc=no -fi -rm -f conftest* -fi - -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:3656: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lintl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -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:3691: 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:3696: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-lintl $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - gt_cv_func_gettext_libintl=yes -else - echo "$ac_t""no" 1>&6 -gt_cv_func_gettext_libintl=no -fi - -fi - -echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - fi - - if test "$gt_cv_func_gettext_libc" = "yes" \ - || test "$gt_cv_func_gettext_libintl" = "yes"; then - cat >> confdefs.h <<\EOF -#define HAVE_GETTEXT 1 -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:3754: 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 - case "$MSGFMT" in - /*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then - ac_cv_path_MSGFMT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" - ;; -esac -fi -MSGFMT="$ac_cv_path_MSGFMT" -if test -n "$MSGFMT"; then - echo "$ac_t""$MSGFMT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - if test "$MSGFMT" != "no"; then - for ac_func in dcgettext -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3788: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -$ac_func(); -#endif - -; return 0; } -EOF -if { (eval echo configure:3816: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 -fi -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:3843: 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 - case "$GMSGFMT" in - /*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GMSGFMT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" - ;; -esac -fi -GMSGFMT="$ac_cv_path_GMSGFMT" -if test -n "$GMSGFMT"; then - echo "$ac_t""$GMSGFMT" 1>&6 -else - echo "$ac_t""no" 1>&6 -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:3879: 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 - case "$GMSGMERGE" in - /*) - ac_cv_path_GMSGMERGE="$GMSGMERGE" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GMSGMERGE="$GMSGMERGE" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GMSGMERGE="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GMSGMERGE" && ac_cv_path_GMSGMERGE=":" - ;; -esac -fi -GMSGMERGE="$ac_cv_path_GMSGMERGE" -if test -n "$GMSGMERGE"; then - echo "$ac_t""$GMSGMERGE" 1>&6 -else - echo "$ac_t""no" 1>&6 -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:3915: 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 - case "$XGETTEXT" in - /*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" - ;; -esac -fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test -n "$XGETTEXT"; then - echo "$ac_t""$XGETTEXT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - CATOBJEXT=.gmo - DATADIRNAME=share -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - CATOBJEXT=.mo - DATADIRNAME=lib -fi -rm -f conftest* - INSTOBJEXT=.mo - fi - fi - -else - echo "$ac_t""no" 1>&6 -fi - - - if test "$CATOBJEXT" = "NONE"; then - echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:3978: 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" - nls_cv_use_catgets=$withval -else - nls_cv_use_catgets=no -fi - - echo "$ac_t""$nls_cv_use_catgets" 1>&6 - - if test "$nls_cv_use_catgets" = "yes"; then - echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:3991: 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 -else - ac_save_LIBS="$LIBS" -LIBS="-li $LIBS" -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=yes" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -fi -rm -f conftest* -LIBS="$ac_save_LIBS" - -fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&6 -fi - - echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:4034: 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 < -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char catgets(); - -int main() { - -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_catgets) || defined (__stub___catgets) -choke me -#else -catgets(); -#endif - -; return 0; } -EOF -if { (eval echo configure:4062: \"$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 - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_catgets=no" -fi -rm -f conftest* -fi - -if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then - echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_CATGETS 1 -EOF - - INTLOBJS="\$(CATOBJS)" - # 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:4084: 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 - case "$GENCAT" in - /*) - ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GENCAT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no" - ;; -esac -fi -GENCAT="$ac_cv_path_GENCAT" -if test -n "$GENCAT"; then - echo "$ac_t""$GENCAT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - if test "$GENCAT" != "no"; then - # 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:4120: 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 - case "$GMSGFMT" in - /*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GMSGFMT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" - ;; -esac -fi -GMSGFMT="$ac_cv_path_GMSGFMT" -if test -n "$GMSGFMT"; then - echo "$ac_t""$GMSGFMT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - if test "$GMSGFMT" = "no"; then - # 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:4157: 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 - case "$GMSGFMT" in - /*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then - ac_cv_path_GMSGFMT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no" - ;; -esac -fi -GMSGFMT="$ac_cv_path_GMSGFMT" -if test -n "$GMSGFMT"; then - echo "$ac_t""$GMSGFMT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - 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:4192: 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 - case "$XGETTEXT" in - /*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" - ;; -esac -fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test -n "$XGETTEXT"; then - echo "$ac_t""$XGETTEXT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.cat - INSTOBJEXT=.cat - DATADIRNAME=lib - INTLDEPS='$(top_builddir)/intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=intl/libintl.h - nls_cv_header_libgt=intl/libgettext.h - fi -else - echo "$ac_t""no" 1>&6 -fi - - fi - fi - - if test "$CATOBJEXT" = "NONE"; then - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - INTLOBJS="\$(GETTOBJS)" - # 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:4250: 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 - case "$MSGFMT" in - /*) - ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then - ac_cv_path_MSGFMT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" - ;; -esac -fi -MSGFMT="$ac_cv_path_MSGFMT" -if test -n "$MSGFMT"; then - echo "$ac_t""$MSGFMT" 1>&6 -else - echo "$ac_t""no" 1>&6 -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:4284: 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 - case "$GMSGFMT" in - /*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="$PATH" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GMSGFMT="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" - ;; -esac -fi -GMSGFMT="$ac_cv_path_GMSGFMT" -if test -n "$GMSGFMT"; then - echo "$ac_t""$GMSGFMT" 1>&6 -else - echo "$ac_t""no" 1>&6 -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:4320: 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 - case "$XGETTEXT" in - /*) - ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then - ac_cv_path_XGETTEXT="$ac_dir/$ac_word" - break - fi - fi - done - IFS="$ac_save_ifs" - test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" - ;; -esac -fi -XGETTEXT="$ac_cv_path_XGETTEXT" -if test -n "$XGETTEXT"; then - echo "$ac_t""$XGETTEXT" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - - - USE_INCLUDED_LIBINTL=yes - CATOBJEXT=.gmo - INSTOBJEXT=.mo - DATADIRNAME=share - INTLDEPS='$(top_builddir)/intl/libintl.a' - INTLLIBS=$INTLDEPS - LIBS=`echo $LIBS | sed -e 's/-lintl//'` - nls_cv_header_intl=intl/libintl.h - nls_cv_header_libgt=intl/libgettext.h - fi - - if test "$XGETTEXT" != ":"; then - if $XGETTEXT --omit-header /dev/null 2> /dev/null; then - : ; - else - echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6 - XGETTEXT=":" - fi - fi - - # We need to process the po/ directory. - POSUB=po - else - DATADIRNAME=share - nls_cv_header_intl=intl/libintl.h - nls_cv_header_libgt=intl/libgettext.h - fi - - - - - # If this is used in GNU gettext we have to set USE_NLS to `yes' - # because some of the sources are only built for this goal. - if test "$PACKAGE" = gettext; then - USE_NLS=yes - USE_INCLUDED_LIBINTL=yes - fi - - for lang in $ALL_LINGUAS; do - GMOFILES="$GMOFILES $lang.gmo" - POFILES="$POFILES $lang.po" - POXFILES="$POXFILES $lang.pox" - done - - - - - - - - - - - - - - - - if test "x$CATOBJEXT" != "x"; then - if test "x$ALL_LINGUAS" = "x"; then - LINGUAS= - else - echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4415: checking for catalogs to be installed" >&5 - NEW_LINGUAS= - for lang in ${LINGUAS=$ALL_LINGUAS}; do - case "$ALL_LINGUAS" in - *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; - esac - done - LINGUAS=$NEW_LINGUAS - echo "$ac_t""$LINGUAS" 1>&6 - fi - - if test -n "$LINGUAS"; then - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done - fi - fi - - if test "$ac_cv_header_locale_h" = yes; then - INCLUDE_LOCALE_H="#include " - else - INCLUDE_LOCALE_H="\ -/* The system does not provide the header . Take care yourself. */" - fi - - - MKINSTALLDIRS= - if test -n "$ac_aux_dir"; then - MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" - fi - if test -z "$MKINSTALLDIRS"; then - MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" - fi - - - test -d po || mkdir po - if test "x$srcdir" != "x."; then - if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then - posrcprefix="$srcdir/" - else - posrcprefix="../$srcdir/" - fi - else - posrcprefix="../" - fi - rm -f po/POTFILES - sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ - < $srcdir/po/POTFILES.in > po/POTFILES - - -### End i18n - trap '' 1 2 15 @@ -4633,6 +4684,28 @@ s%@SET_MAKE@%$SET_MAKE%g s%@RANLIB@%$RANLIB%g s%@CC@%$CC%g s%@OPT_STYLE_INSTALL@%$OPT_STYLE_INSTALL%g +s%@LOCALE_DIR@%$LOCALE_DIR%g +s%@CPP@%$CPP%g +s%@USE_NLS@%$USE_NLS%g +s%@MSGFMT@%$MSGFMT%g +s%@GMSGFMT@%$GMSGFMT%g +s%@GMSGMERGE@%$GMSGMERGE%g +s%@XGETTEXT@%$XGETTEXT%g +s%@GENCAT@%$GENCAT%g +s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g +s%@CATALOGS@%$CATALOGS%g +s%@CATOBJEXT@%$CATOBJEXT%g +s%@DATADIRNAME@%$DATADIRNAME%g +s%@GMOFILES@%$GMOFILES%g +s%@INSTOBJEXT@%$INSTOBJEXT%g +s%@INTLDEPS@%$INTLDEPS%g +s%@INTLLIBS@%$INTLLIBS%g +s%@INTLOBJS@%$INTLOBJS%g +s%@POFILES@%$POFILES%g +s%@POXFILES@%$POXFILES%g +s%@POSUB@%$POSUB%g +s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g +s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g s%@QT_TARGET@%$QT_TARGET%g s%@QT_STATIC_TARGET@%$QT_STATIC_TARGET%g s%@PERL@%$PERL%g @@ -4643,7 +4716,6 @@ s%@EPERL_NAME@%$EPERL_NAME%g s%@SWIG@%$SWIG%g s%@GLIB_CONFIG_BIN@%$GLIB_CONFIG_BIN%g s%@GNOME_CONFIG_BIN@%$GNOME_CONFIG_BIN%g -s%@CPP@%$CPP%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g @@ -4665,27 +4737,6 @@ s%@GNC_CONFIGDIR@%$GNC_CONFIGDIR%g s%@GNC_SHAREDIR@%$GNC_SHAREDIR%g s%@GNC_RUNTIME_PERLLIBPATH@%$GNC_RUNTIME_PERLLIBPATH%g s%@ABSOLUTE_TOP_SRCDIR@%$ABSOLUTE_TOP_SRCDIR%g -s%@LOCALE_DIR@%$LOCALE_DIR%g -s%@USE_NLS@%$USE_NLS%g -s%@MSGFMT@%$MSGFMT%g -s%@GMSGFMT@%$GMSGFMT%g -s%@GMSGMERGE@%$GMSGMERGE%g -s%@XGETTEXT@%$XGETTEXT%g -s%@GENCAT@%$GENCAT%g -s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g -s%@CATALOGS@%$CATALOGS%g -s%@CATOBJEXT@%$CATOBJEXT%g -s%@DATADIRNAME@%$DATADIRNAME%g -s%@GMOFILES@%$GMOFILES%g -s%@INSTOBJEXT@%$INSTOBJEXT%g -s%@INTLDEPS@%$INTLDEPS%g -s%@INTLLIBS@%$INTLLIBS%g -s%@INTLOBJS@%$INTLOBJS%g -s%@POFILES@%$POFILES%g -s%@POXFILES@%$POXFILES%g -s%@POSUB@%$POSUB%g -s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g -s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g CEOF EOF diff --git a/configure.in b/configure.in index b8f31f31f4..f1a7465acb 100644 --- a/configure.in +++ b/configure.in @@ -44,9 +44,6 @@ AC_CHECK_FUNCS(stpcpy) ### Variables ### Set up all the initial variable values... - - - # USE_QUICKFILL: AC_DEFINE(USE_QUICKFILL,1) @@ -77,6 +74,19 @@ AC_ARG_ENABLE( warnings, LDFLAGS="${LDFLAGS} -g -Wall" AC_DEFINE(DEBUG_MEMORY,1) AC_DEFINE(USE_DEBUG,1) ) + +### -------------------------------------------------------------------------- +### i18n +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") +AC_SUBST(LOCALE_DIR) + +AC_CHECK_HEADER(locale.h, ac_cv_header_locale_h=yes, ac_cv_header_locale_h=no) +AC_CAN_USE_GNU_GETTEXT + + ### -------------------------------------------------------------------------- ## qt-version of gnucash # The qt version of gnucash is far from doing anything usefull, so most people @@ -336,28 +346,37 @@ AC_TRY_CPP([#include ], AC_MSG_RESULT(yes) , #undo damage to CPPFLAGS CPPFLAGS="$OLDCPPFLAGS" -OLDLDFLAGS="$LDFLAGS" -LDFLAGS="$LDFLAGS `$GNOME_CONFIG_BIN --libs gtkxmhtml`" +### -------------------------------------------------------------------------- +# If readline exists, just assume that guile needs it. It probably does. +AC_CHECK_LIB(readline, readline) + + +### -------------------------------------------------------------------------- +EXTRALIBS=`$GNOME_CONFIG_BIN --libs gtkxmhtml` #check for gtkxmhtml, export library link to variable GTK_XMHTML AC_CHECK_LIB(gtkxmhtml, gtk_xmhtml_new, GTK_XMHTML="gtkxmhtml", AC_MSG_WARN([Cannotfind libgtkxmhtml -- gnome build disabled (not required for motif)]) GNOME_TARGET="gnome.disabled" - GNOME_STATIC_TARGET="gnome.disabled") + GNOME_STATIC_TARGET="gnome.disabled", + $EXTRALIBS) AC_SUBST(GTK_XMHTML) -LDFLAGS="$OLDLDFLAGS" - + + +### -------------------------------------------------------------------------- +EXTRALIBS=`$GNOME_CONFIG_BIN --libs print` + +# check for gnome-print and enable it via HAVE_LIBGNOMEPRINT +# if found +AC_CHECK_LIB(gnomeprint, gnome_print_context_new, , , $EXTRALIBS) + + # XXX - should we export these here or later in the configure script? AC_SUBST(GNOME_TARGET) AC_SUBST(GNOME_STATIC_TARGET) -### -------------------------------------------------------------------------- -# If readline exists, just assume that guile needs it. It probably does. -AC_CHECK_LIB(readline, readline) - - ### -------------------------------------------------------------------------- ### Guile (libraries and executable) @@ -523,19 +542,6 @@ AC_SUBST(GNC_RUNTIME_PERLLIBPATH) ABSOLUTE_TOP_SRCDIR=`pwd` AC_SUBST(ABSOLUTE_TOP_SRCDIR) -### Begin i18n - -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") -AC_SUBST(LOCALE_DIR) - -AC_CHECK_HEADER(locale.h, ac_cv_header_locale_h=yes, ac_cv_header_locale_h=no) -AC_CAN_USE_GNU_GETTEXT - -### End i18n - AC_CONFIG_HEADER(config.h) AC_OUTPUT(Makefile diff --git a/src/gnome/Makefile.in b/src/gnome/Makefile.in index 9ba3e9ba62..094e8f016c 100644 --- a/src/gnome/Makefile.in +++ b/src/gnome/Makefile.in @@ -42,7 +42,7 @@ LDFLAGS = @LDFLAGS@ GUILELIBS = @GUILELIBS@ LIBS = -L$(prefix)/lib @LIBS@ \ - $(shell ${GNOME_CONFIG_BIN} --libs gnomeui @GTK_XMHTML@) $(GUILELIBS) \ + $(shell ${GNOME_CONFIG_BIN} --libs gnomeui print @GTK_XMHTML@) $(GUILELIBS) \ @top_srcdir@/lib/g-wrap-install/lib/libgwrapguile.a ifeq (${HAVE_PLOTUTILS},1) @@ -70,8 +70,8 @@ GNOME_SRCS := top-level.c window-main.c window-register.c window-adjust.c \ dialog-add.c dialog-edit.c dialog-utils.c \ extensions.c query-user.c reconcile-list.c \ window-report.c global-options.c \ - dialog-qif-import.c glade-qif-import.c \ - dialog-account-picker.c glade-account-picker.c + dialog-qif-import.c glade-gnc-dialogs.c \ + dialog-account-picker.c print-session.c ###################################################################### all: gnome diff --git a/src/gnome/gnc-dialogs.glade b/src/gnome/gnc-dialogs.glade new file mode 100644 index 0000000000..87be81fa9e --- /dev/null +++ b/src/gnome/gnc-dialogs.glade @@ -0,0 +1,1148 @@ + + + + + gnc-dialogs + gnc-dialogs + + + pixmaps + C + True + True + False + False + True + False + False + glade-gnc-dialogs.c + glade-gnc-dialogs.h + glade-cb-gnc-dialogs.c + glade-cb-gnc-dialogs.h + glade-support-gnc-dialogs.c + glade-support-gnc-dialogs.h + + + + + GnomeDialog + QIF File Import Dialog + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + True + True + False + False + + + GtkVBox + GnomeDialog:vbox + dialog-vbox2 + False + 8 + + 4 + True + True + + + + GtkNotebook + notebook1 + True + True + True + GTK_POS_TOP + False + 2 + 2 + False + + 0 + True + True + + + + GtkHBox + hbox1 + False + 0 + + + GtkFrame + frame2 + 200 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkScrolledWindow + scrolledwindow1 + 150 + GTK_POLICY_AUTOMATIC + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + + GtkViewport + viewport1 + GTK_SHADOW_IN + + + GtkList + selected_file_list + + select_child + gnc_ui_qif_import_select_loaded_file_cb + QIF_File_Import_Dialog + Tue, 14 Mar 2000 15:17:01 GMT + + GTK_SELECTION_SINGLE + + + + + + + GtkFrame + frame3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkVBox + vbox2 + False + 0 + + + GtkHBox + hbox10 + False + 0 + + 0 + True + True + + + + GtkVBox + vbox3 + True + 0 + + 5 + True + True + + + + GtkLabel + label1 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label679 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 5 + False + False + + + + + GtkLabel + currency_label + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + radix_format_label + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + date_format_label + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkVBox + vbox4 + True + 0 + + 5 + True + True + + + + GtkEntry + qif_filename_entry + True + True + True + True + True + 0 + + + 0 + False + False + + + + + GtkHBox + hbox11 + False + 0 + + 0 + True + True + + + + GtkCheckButton + qif_account_auto_check + True + + True + True + + 0 + False + False + + + + + GtkEntry + qif_account_entry + True + True + True + 0 + + + 0 + True + True + + + + + + GtkEntry + qif_currency_entry + True + True + True + 0 + + + 0 + False + False + + + + + GtkOptionMenu + qif_radix_picker + True + Autodetect +Decimal (1,000.00) +Comma (1.000,00) + + 0 + + 0 + False + False + + + + + GtkOptionMenu + qif_date_picker + True + Autodetect +MM/DD/YYYY +DD/MM/YYYY +YYYY/MM/DD +YYYY/DD/MM + + 0 + + 0 + False + False + + + + + + + GtkHBox + hbox9 + True + 0 + + 5 + False + False + + + + GtkButton + file_select_btn + True + + clicked + gnc_ui_qif_import_select_file_cb + QIF_File_Import_Dialog + Tue, 14 Mar 2000 15:42:40 GMT + + + + 5 + True + True + + + + + GtkButton + add_file_button + True + + clicked + gnc_ui_qif_import_load_file_cb + QIF_File_Import_Dialog + Tue, 14 Mar 2000 15:14:48 GMT + + + + 5 + True + True + + + + + + + + + GtkLabel + Notebook:tab + label69 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkScrolledWindow + scrolledwindow2 + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + + GtkCList + account_page_list + True + + select_row + gnc_ui_qif_import_account_line_select_cb + Tue, 14 Mar 2000 14:58:13 GMT + + 4 + 116,80,204,80 + GTK_SELECTION_SINGLE + True + GTK_SHADOW_IN + + + GtkLabel + CList:title + label682 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label683 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label684 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label685 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + + + GtkLabel + Notebook:tab + label2 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkScrolledWindow + scrolledwindow3 + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + + GtkCList + category_page_list + True + + select_row + gnc_ui_qif_import_category_line_select_cb + Tue, 14 Mar 2000 14:59:18 GMT + + 4 + 117,80,204,80 + GTK_SELECTION_SINGLE + True + GTK_SHADOW_IN + + + GtkLabel + CList:title + label686 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label687 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label688 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label689 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + + + GtkLabel + Notebook:tab + foo6868 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + + GtkHButtonBox + GnomeDialog:action_area + dialog-action_area2 + GTK_BUTTONBOX_SPREAD + 8 + 85 + 27 + 7 + 0 + + 0 + False + True + GTK_PACK_END + + + + GtkButton + button2 + True + True + + clicked + gnc_ui_qif_import_ok_cb + QIF_File_Import_Dialog + Tue, 14 Mar 2000 15:08:23 GMT + + GNOME_STOCK_BUTTON_OK + + + + GtkButton + button3 + True + True + + clicked + gnc_ui_qif_import_cancel_cb + QIF_File_Import_Dialog + Tue, 14 Mar 2000 15:08:04 GMT + + GNOME_STOCK_BUTTON_CANCEL + + + + GtkButton + button4 + True + True + + clicked + gnc_ui_qif_import_help_cb + QIF_File_Import_Dialog + Tue, 14 Mar 2000 15:08:59 GMT + + GNOME_STOCK_BUTTON_HELP + + + + + + + GnomeDialog + QIF Import Account Picker + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + True + False + False + False + + + GtkVBox + GnomeDialog:vbox + vbox1 + False + 8 + + 1 + True + True + + + + GtkVBox + vbox2 + False + 0 + + 0 + True + True + + + + GtkFrame + frame1 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkScrolledWindow + scrolledwindow1 + 250 + 200 + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + + GtkViewport + viewport1 + GTK_SHADOW_IN + + + GtkTree + account_tree + + select_child + gnc_ui_account_picker_select_cb + QIF_Import_Account_Picker + Thu, 02 Mar 2000 21:32:14 GMT + + GTK_SELECTION_SINGLE + GTK_TREE_VIEW_LINE + True + + + + + + + + GtkHBox + hbox5 + False + 0 + + 0 + False + False + + + + GtkVBox + vbox4 + True + 0 + + 5 + True + True + + + + GtkLabel + label1 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label2 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label3 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkVBox + vbox5 + True + 0 + + 0 + True + True + + + + GtkEntry + acct_entry + True + True + True + 0 + + + 0 + False + False + + + + + GtkEntry + acct_description_entry + True + True + True + 0 + + + 0 + False + False + + + + + GtkOptionMenu + acct_type_picker + 150 + 30 + True + Bank +Cash +Asset +Credit +Liability +Stock +Mutual +Currency +Income +Expense +Equity + + 0 + + 0 + False + False + + + + + + + GtkHButtonBox + GnomeDialog:action_area + hbuttonbox1 + GTK_BUTTONBOX_SPREAD + 8 + 85 + 27 + 7 + 0 + + 0 + False + False + GTK_PACK_END + + + + GtkButton + button1 + True + True + + clicked + gnc_ui_account_picker_ok_cb + QIF_Import_Account_Picker + Thu, 02 Mar 2000 23:02:59 GMT + + GNOME_STOCK_BUTTON_OK + + + + GtkButton + button2 + True + True + + clicked + gnc_ui_account_picker_cancel_cb + QIF_Import_Account_Picker + Thu, 02 Mar 2000 23:03:18 GMT + + GNOME_STOCK_BUTTON_CANCEL + + + + + + + GnomeDialog + Print Preview Dialog + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + True + False + False + False + + + GtkVBox + GnomeDialog:vbox + dialog-vbox3 + False + 8 + + 4 + True + True + + + + GtkScrolledWindow + scrolledwindow4 + 1 + 500 + 250 + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + 0 + True + True + + + + GnomeCanvas + preview_canvas + True + True + 0 + 0 + 100 + 100 + 1 + + + + + GtkHButtonBox + GnomeDialog:action_area + dialog-action_area3 + GTK_BUTTONBOX_SPREAD + 8 + 85 + 27 + 7 + 0 + + 0 + False + True + GTK_PACK_END + + + + GtkButton + button5 + True + True + + clicked + gnc_ui_print_preview_OK_cb + Print_Preview_Dialog + Wed, 22 Mar 2000 21:35:46 GMT + + GNOME_STOCK_BUTTON_OK + + + + + + + GnomeDialog + Print Dialog + Print Check + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + False + False + False + False + + + GtkVBox + GnomeDialog:vbox + dialog-vbox4 + False + 8 + + 4 + True + True + + + + GtkVBox + vbox6 + False + 0 + + 0 + True + True + + + + GtkButton + button12 + True + + clicked + gnc_ui_print_dialog_select_printer_cb + Print_Dialog + Wed, 22 Mar 2000 22:41:57 GMT + + + + 0 + False + False + + + + + GtkButton + button13 + True + + clicked + gnc_ui_print_dialog_preview_cb + Print_Dialog + Wed, 22 Mar 2000 22:42:05 GMT + + + + 0 + False + False + + + + + + GtkHButtonBox + GnomeDialog:action_area + dialog-action_area4 + GTK_BUTTONBOX_SPREAD + 8 + 85 + 27 + 7 + 0 + + 0 + False + True + GTK_PACK_END + + + + GtkButton + button9 + True + True + + clicked + gnc_ui_print_dialog_ok_cb + Print_Dialog + Wed, 22 Mar 2000 22:42:13 GMT + + GNOME_STOCK_BUTTON_OK + + + + GtkButton + button11 + True + True + + clicked + gnc_ui_print_dialog_cancel_cb + Print_Dialog + Wed, 22 Mar 2000 22:42:20 GMT + + GNOME_STOCK_BUTTON_CANCEL + + + + + + diff --git a/src/gnome/window-register.c b/src/gnome/window-register.c index ee0baa5b55..52a4b22707 100644 --- a/src/gnome/window-register.c +++ b/src/gnome/window-register.c @@ -968,8 +968,8 @@ print_check_cb(GtkWidget * widget, gpointer data) gh_str02scm(memo))); } #else - gnc_info_dialog_parented(reg_data->dialog, - _"You need to install the gnome-print library."); + gnc_info_dialog_parented(GTK_WINDOW(reg_data->window), + _("You need to install the gnome-print library.")); #endif } diff --git a/src/scm/main.scm b/src/scm/main.scm index e009af6976..dbbd536466 100644 --- a/src/scm/main.scm +++ b/src/scm/main.scm @@ -25,7 +25,13 @@ "/scm/qif-import") (gnc:config-var-value-get gnc:*load-path*))) + (gnc:config-var-value-set! gnc:*load-path* #f + (cons (string-append gnc:_share-dir-default_ + "/scm/printing") + (gnc:config-var-value-get gnc:*load-path*))) + (gnc:depend "qif-import.scm") + (gnc:depend "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 new file mode 100644 index 0000000000..ab906be1db --- /dev/null +++ b/src/scm/printing/number-to-words.scm @@ -0,0 +1,112 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; number-to-words.scm +;;; convert a number into a sentence for check printing +;;; +;;; Copyright 2000 Bill Gribble +;;; $Id$ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(gnc:support "number-to-words.scm") + +(define (integer-to-words val) + (let ((current-string "") + (small-numbers + #("zero" "one" "two" "three" "four" "five" + "six" "seven" "eight" "nine" "ten" + "eleven" "twelve" "thirteen" "fourteen" "fifteen" + "sixteen" "seventeen" "eighteen" "nineteen" "twenty")) + (medium-numbers + #("zero" "ten" "twenty" "thirty" "forty" "fifty" + "sixty" "seventy" "eighty" "ninety")) + (big-numbers + #("hundred" "thousand" "million" "billion" "trillion" + "quadrillion" "quintillion"))) + (cond + ((< val 20) + (vector-ref small-numbers val)) + + ((< val 100) + (let ((this-part (quotient val 10)) + (that-part (remainder val 10))) + (set! current-string (vector-ref medium-numbers this-part)) + (if (> that-part 0) + (set! current-string + (string-append current-string "-" + (vector-ref small-numbers that-part)))) + current-string)) + ((< val 1000) + (let ((this-part (quotient val 100)) + (that-part (remainder val 100))) + (set! current-string + (string-append current-string + (vector-ref small-numbers this-part) " " + (vector-ref big-numbers 0))) + (if (> that-part 0) + (set! current-string + (string-append current-string + " " (integer-to-words that-part)))) + current-string)) + (#t + (let* ((log-val (inexact->exact + (truncate (+ .00001 (/ (log10 val) 3))))) + (this-part (quotient val + (inexact->exact + (truncate + (+ .00001 (expt 10 (* 3 log-val))))))) + (that-part (remainder val + (inexact->exact + (+ .00001 + (truncate + (expt 10 (* 3 log-val)))))))) + (if (> this-part 0) + (set! current-string + (string-append (integer-to-words this-part) + " " (vector-ref big-numbers log-val)))) + (if (> that-part 0) + (set! current-string + (string-append current-string + " " (integer-to-words that-part)))) + current-string))))) + +;; return a string with the number properly truncated and zero padded +;; for check printing +(define (printable-value val frac-denom) + (let* ((int-part (inexact->exact (truncate val))) + (frac-part (inexact->exact + (truncate + (+ (/ .5 frac-denom) (* frac-denom + (- val int-part))))))) + (with-output-to-string + (lambda () + (write int-part) (display ".") + (if (< frac-part 10) (display "0")) + (write frac-part))))) + + +(define (number-to-words val frac-denom) + (let* ((negative? + (if (< val 0) + (begin (set! val (- val)) + #t) + #f)) + (int-part (inexact->exact (truncate val))) + (frac-part (inexact->exact + (truncate + (+ (/ .5 frac-denom) (* frac-denom (- val int-part)))))) + (result-string "")) + (set! result-string + (string-append (integer-to-words int-part) " and " + (with-output-to-string + (lambda () + (write frac-part) + (display "/") + (write frac-denom))))) + (string-set! result-string 0 + (char-upcase (string-ref result-string 0))) + result-string)) + + + + + + diff --git a/src/scm/printing/print-check.scm b/src/scm/printing/print-check.scm new file mode 100644 index 0000000000..3402145a9a --- /dev/null +++ b/src/scm/printing/print-check.scm @@ -0,0 +1,59 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; print-check.scm +;;; print a check from a transaction. +;;; +;;; Copyright 2000 Bill Gribble +;;; $Id$ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(gnc:support "print-check.scm") +(gnc:depend "number-to-words.scm") + +;; format notes (I found a GIF of the check form and am measuring from +;; that, so this is definitely not perfect) positions are lower-left +;; text origin, (0,0) at lower left of page, in inches, for +;; US-Letter format paper. +(define quicken-check-3up-at-top-us-letter + '((payee . (1.0625 9.625)) + (amount-words . (1.0625 9.325)) + (amount-number . (6.5 9.625)) + (date . (6.5 10.1)) + (memo . (1.0625 8.15)))) + +(define (gnc:print-check payee amount date memo) + (let* ((int-part (inexact->exact (truncate amount))) + (frac-part (inexact->exact + (truncate + (+ (/ .5 100) (* 100 (- amount int-part)))))) + (ps (gnc:print-session-create)) + (format quicken-check-3up-at-top-us-letter) + (inches-to-points + (lambda (inches) + (* inches 72)))) + + (let ((date-pos (assq 'date format))) + (gnc:print-session-moveto ps + (inches-to-points (cadr date-pos)) + (inches-to-points (caddr date-pos))) + (gnc:print-session-text ps date)) + + (let ((payee-pos (assq 'payee format))) + (gnc:print-session-moveto ps + (inches-to-points (cadr payee-pos)) + (inches-to-points (caddr payee-pos))) + (gnc:print-session-text ps payee)) + + (let ((number-pos (assq 'amount-number format))) + (gnc:print-session-moveto ps + (inches-to-points (cadr number-pos)) + (inches-to-points (caddr number-pos))) + (gnc:print-session-text ps (printable-value amount 100))) + + (let ((words-pos (assq 'amount-words format))) + (gnc:print-session-moveto ps + (inches-to-points (cadr words-pos)) + (inches-to-points (caddr words-pos))) + (gnc:print-session-text ps (number-to-words amount 100))) + + (gnc:print-session-done ps) + (gnc:print-dialog-create ps))) diff --git a/src/scm/qif-import/qif-file.scm b/src/scm/qif-import/qif-file.scm index 75a2372429..acb4db0aa6 100644 --- a/src/scm/qif-import/qif-file.scm +++ b/src/scm/qif-import/qif-file.scm @@ -28,9 +28,10 @@ (tag #f) (value #f) (heinous-error #f) - (valid-acct-types '(type:bank type:cash - type:ccard type:invst - #{type:oth\ a}# #{type:oth\ l}#))) + (valid-acct-types + '(type:bank type:cash + type:ccard type:invst + #{type:oth\ a}# #{type:oth\ l}#))) (with-input-from-file path (lambda () ;; loop over lines @@ -63,186 +64,196 @@ (set! current-xtn (make-qif-cat))) ((eq? qstate-type 'account) (set! current-xtn (make-qif-acct))))) -; (#t -; (display "qif-file:read-file can't handle ") -; (write qstate-type) -; (display " transactions yet.") -; (newline)))) +;;; (#t +;;; (display "qif-file:read-file can't handle ") +;;; (write qstate-type) +;;; (display " transactions yet.") +;;; (newline)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; account transactions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - + ((member qstate-type valid-acct-types) (case tag - ;; D : transaction date - ((#\D) - (qif-xtn:set-date! current-xtn - (qif-file:parse-date self value))) - - ;; T : total amount - ((#\T) - (qif-split:set-amount! default-split - (qif-file:parse-value self value))) - - ;; P : payee - ((#\P) - (qif-xtn:set-payee! current-xtn - (qif-file:parse-string self value))) - - ;; A : address - ;; multiple "A" lines are appended together with - ;; newlines; some Quicken files have a lot of - ;; A lines. - ((#\A) - (qif-xtn:set-address! - current-xtn - (let ((current (qif-xtn:address current-xtn))) - (if (not (string? current)) - (set! current "")) - (string-append - current "\n" - (qif-file:parse-string self value))))) - - ;; N : check number / transaction number /xtn direction - ;; this could be a number or a string; no point in - ;; keeping it numeric just yet. - ((#\N) - (qif-xtn:set-number! - current-xtn (qif-file:parse-string self value))) - - ;; C : cleared flag - ((#\C) - (qif-xtn:set-cleared! - current-xtn (qif-file:parse-cleared-field self value))) - - ;; M : memo - ((#\M) - (qif-split:set-memo! default-split + ;; D : transaction date + ((#\D) + (qif-xtn:set-date! current-xtn + (qif-file:parse-date self value))) + + ;; T : total amount + ((#\T) + (qif-split:set-amount! + default-split (qif-file:parse-value/decimal self value)) + (if (not (number? (qif-split:amount default-split))) + (begin + (display "value not a number : ") + (display value) (display " ") + (write (qif-split:amount default-split)) + (newline)))) + + ;; P : payee + ((#\P) + (qif-xtn:set-payee! current-xtn (qif-file:parse-string self value))) - - ;; I : share price (stock transactions) - ((#\I) - (qif-xtn:set-share-price! - current-xtn (qif-file:parse-value self value))) - - ;; Q : share price (stock transactions) - ((#\Q) - (qif-xtn:set-num-shares! - current-xtn (qif-file:parse-value self value)) - (qif-xtn:set-bank-xtn?! current-xtn #f)) - - ;; Y : name of security (stock transactions) - ((#\Y) - (qif-xtn:set-security-name! - current-xtn (qif-file:parse-string self value))) - - ;; O : adjustment (stock transactions) - ((#\O) - (qif-xtn:set-adjustment! - current-xtn (qif-file:parse-value/decimal self value))) - - ;; L : category - ((#\L) - (qif-split:set-category! - default-split (qif-file:parse-string self value))) - - ;; S : split category - ((#\S) - (set! current-split (make-qif-split)) - (qif-split:set-category! - current-split (qif-file:parse-string self value)) - (qif-xtn:set-splits! - current-xtn - (cons current-split (qif-xtn:splits current-xtn)))) - - ;; E : split memo (?) - ((#\E) - (qif-split:set-memo! - current-split (qif-file:parse-string self value))) - - ;; $ : split amount (if there are splits) - ((#\$) - ;; if this is 'Type:Invst, I can't figure out - ;; what the $ signifies. I'll do it later. - (if (not (eq? qstate-type 'type:invst)) - (qif-split:set-amount! - current-split - (qif-file:parse-value/decimal self value)))) - - ;; ^ : end-of-record - ((#\^) - (if (and (qif-xtn:date current-xtn) - (qif-split:amount default-split)) - (begin - (if (null? (qif-xtn:splits current-xtn)) - (qif-xtn:set-splits! current-xtn - (list default-split))) - (qif-file:add-xtn! self current-xtn)) - (begin - (display "qif-file:read-file : discarding xtn") - (newline) - (qif-xtn:print current-xtn))) - (if (and first-xtn - (string? (qif-xtn:payee current-xtn)) - (string=? (qif-xtn:payee current-xtn) - "Opening Balance") - (eq? (length (qif-xtn:splits current-xtn)) 1) - (qif-split:category-is-account? - (car (qif-xtn:splits current-xtn)))) - (begin - (qif-file:set-account! - self (qif-split:category - (car (qif-xtn:splits current-xtn)))) - (qif-split:set-category! - (car (qif-xtn:splits current-xtn)) - "Opening Balance"))) + ;; A : address + ;; multiple "A" lines are appended together with + ;; newlines; some Quicken files have a lot of + ;; A lines. + ((#\A) + (qif-xtn:set-address! + current-xtn + (let ((current (qif-xtn:address current-xtn))) + (if (not (string? current)) + (set! current "")) + (string-append + current "\n" + (qif-file:parse-string self value))))) - ;; some special love for stock transactions - (if (and (qif-xtn:security-name current-xtn) - (string? (qif-xtn:number current-xtn))) - (begin - (cond - ((and - (or (string=? (qif-xtn:number current-xtn) - "ReinvDiv") - (string=? (qif-xtn:number current-xtn) - "ReinvLg") - (string=? (qif-xtn:number current-xtn) - "ReinvSh") - (string=? (qif-xtn:number current-xtn) - "Div")) - (string=? - "" (qif-split:category - (car - (qif-xtn:splits current-xtn))))) - (qif-split:set-category! - (car (qif-xtn:splits current-xtn)) - "Dividend") - ;; KLUDGE! for brokerage accounts - ;; where Dividend pays into the - ;; brokerage account. - (if (and (qif-xtn:bank-xtn? current-xtn) - (string? - (qif-xtn:security-name - current-xtn))) - (qif-xtn:set-payee! - current-xtn (qif-xtn:security-name - current-xtn)))) - - ((or (string=? (qif-xtn:number current-xtn) - "SellX") - (string=? (qif-xtn:number current-xtn) - "Sell")) - (qif-xtn:set-num-shares! - current-xtn - (string-append - "-" (qif-xtn:num-shares current-xtn))))))) + ;; N : check number / transaction number /xtn direction + ;; this could be a number or a string; no point in + ;; keeping it numeric just yet. + ((#\N) + (qif-xtn:set-number! + current-xtn (qif-file:parse-string self value))) - (set! first-xtn #f) - (set! current-xtn (make-qif-xtn)) - (set! default-split (make-qif-split))))) + ;; C : cleared flag + ((#\C) + (qif-xtn:set-cleared! + current-xtn (qif-file:parse-cleared-field self value))) + + ;; M : memo + ((#\M) + (qif-split:set-memo! default-split + (qif-file:parse-string self value))) + + ;; I : share price (stock transactions) + ((#\I) + (qif-xtn:set-share-price! + current-xtn (qif-file:parse-value self value))) + + ;; Q : share price (stock transactions) + ((#\Q) + (qif-xtn:set-num-shares! + current-xtn (qif-file:parse-value self value)) + (qif-xtn:set-bank-xtn?! current-xtn #f)) + + ;; Y : name of security (stock transactions) + ((#\Y) + (qif-xtn:set-security-name! + current-xtn (qif-file:parse-string self value))) + + ;; O : adjustment (stock transactions) + ((#\O) + (qif-xtn:set-adjustment! + current-xtn (qif-file:parse-value/decimal self value))) + + ;; L : category + ((#\L) + (qif-split:set-category! + default-split (qif-file:parse-string self value))) + + ;; S : split category + ((#\S) + (set! current-split (make-qif-split)) + (qif-split:set-category! + current-split (qif-file:parse-string self value)) + (qif-xtn:set-splits! + current-xtn + (cons current-split (qif-xtn:splits current-xtn)))) + + ;; E : split memo (?) + ((#\E) + (qif-split:set-memo! + current-split (qif-file:parse-string self value))) + + ;; $ : split amount (if there are splits) + ((#\$) + ;; if this is 'Type:Invst, I can't figure out + ;; what the $ signifies. I'll do it later. + (if (not (eq? qstate-type 'type:invst)) + (qif-split:set-amount! + current-split + (qif-file:parse-value/decimal self value)))) + + ;; ^ : end-of-record + ((#\^) + (if (and (qif-xtn:date current-xtn) + (qif-split:amount default-split)) + (begin + (if (null? (qif-xtn:splits current-xtn)) + (qif-xtn:set-splits! current-xtn + (list default-split))) + (qif-file:add-xtn! self current-xtn)) + (begin + (display "qif-file:read-file : discarding xtn") + (newline) + (qif-xtn:print current-xtn))) + + (if (and first-xtn + (string? (qif-xtn:payee current-xtn)) + (string=? (qif-xtn:payee current-xtn) + "Opening Balance") + (eq? (length (qif-xtn:splits current-xtn)) 1) + (qif-split:category-is-account? + (car (qif-xtn:splits current-xtn)))) + (begin + (qif-file:set-account! + self (qif-split:category + (car (qif-xtn:splits current-xtn)))) + (qif-split:set-category! + (car (qif-xtn:splits current-xtn)) + "Opening Balance"))) + + ;; some special love for stock transactions + (if (and (qif-xtn:security-name current-xtn) + (string? (qif-xtn:number current-xtn))) + (begin + (cond + ((and + (or (string=? (qif-xtn:number current-xtn) + "ReinvDiv") + (string=? (qif-xtn:number current-xtn) + "ReinvLg") + (string=? (qif-xtn:number current-xtn) + "ReinvSh") + (string=? (qif-xtn:number current-xtn) + "Div")) + (string=? + "" (qif-split:category + (car + (qif-xtn:splits current-xtn))))) + (qif-split:set-category! + (car (qif-xtn:splits current-xtn)) + "Dividend") + ;; KLUDGE! for brokerage accounts + ;; where Dividend pays into the + ;; brokerage account. + (if (and (qif-xtn:bank-xtn? current-xtn) + (string? + (qif-xtn:security-name + current-xtn))) + (qif-xtn:set-payee! + current-xtn (qif-xtn:security-name + current-xtn)))) + + ((or (string=? (qif-xtn:number current-xtn) + "SellX") + (string=? (qif-xtn:number current-xtn) + "Sell")) + (let ((shrs (qif-xtn:num-shares current-xtn))) + (cond ((string? shrs) + (qif-xtn:set-num-shares! + current-xtn + (string-append "-" shrs))) + ((number? shrs) + (qif-xtn:set-num-shares! + current-xtn (- shrs))))))))) + + (set! first-xtn #f) + (set! current-xtn (make-qif-xtn)) + (set! default-split (make-qif-split))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -250,103 +261,103 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ((eq? qstate-type 'type:class) (case tag - ;; N : name - ((#\N) - (qif-class:set-name! current-xtn - (qif-file:parse-string self value))) - - ;; D : description - ((#\D) - (qif-class:set-description! - current-xtn (qif-file:parse-string self value))) - - ;; end-of-record - ((#\^) - (qif-file:add-class! self current-xtn) - (set! current-xtn (make-qif-class))) - - (else - (display "qif-file:read-file : unknown Class slot ") - (display tag) (newline)))) + ;; N : name + ((#\N) + (qif-class:set-name! current-xtn + (qif-file:parse-string self value))) + + ;; D : description + ((#\D) + (qif-class:set-description! + current-xtn (qif-file:parse-string self value))) + + ;; end-of-record + ((#\^) + (qif-file:add-class! self current-xtn) + (set! current-xtn (make-qif-class))) + + (else + (display "qif-file:read-file : unknown Class slot ") + (display tag) (newline)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Account definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ((eq? qstate-type 'account) (case tag - ((#\N) - (qif-acct:set-name! current-xtn - (qif-file:parse-string self value))) - ((#\D) - (qif-acct:set-description! - current-xtn (qif-file:parse-string self value))) - - ((#\T) - (qif-acct:set-type! - current-xtn (qif-file:parse-acct-type self value))) - - ((#\L) - (qif-acct:set-limit! - current-xtn (qif-file:parse-value/decimal self value))) - - ((#\^) - (qif-file:add-account! self current-xtn) -; (qif-acct:print current-xtn) - (set! current-xtn (make-qif-acct))) - - (else - (display "qif-file:read-file : unknown Account slot ") - (display tag) (newline)))) - + ((#\N) + (qif-acct:set-name! current-xtn + (qif-file:parse-string self value))) + ((#\D) + (qif-acct:set-description! + current-xtn (qif-file:parse-string self value))) + + ((#\T) + (qif-acct:set-type! + current-xtn (qif-file:parse-acct-type self value))) + + ((#\L) + (qif-acct:set-limit! + current-xtn (qif-file:parse-value/decimal self value))) + + ((#\^) + (qif-file:add-account! self current-xtn) +;;; (qif-acct:print current-xtn) + (set! current-xtn (make-qif-acct))) + + (else + (display "qif-file:read-file : unknown Account slot ") + (display tag) (newline)))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Category (Cat) transactions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ((eq? qstate-type 'type:cat) (case tag - ;; N : category name - ((#\N) - (qif-cat:set-name! current-xtn - (qif-file:parse-string self value))) - - ;; D : category description - ((#\D) - (qif-cat:set-description! current-xtn - (qif-file:parse-string - self value))) - - ;; E : is this a taxable category? - ((#\T) - (qif-cat:set-taxable! current-xtn #t)) - - ;; E : is this an expense category? - ((#\E) - (qif-cat:set-expense-cat! current-xtn #t)) - - ;; I : is this an income category? - ((#\I) - (qif-cat:set-income-cat! current-xtn #t)) - - ;; R : what is the tax rate (from some table? - ;; seems to be an integer) - ((#\R) - (qif-cat:set-tax-rate! - current-xtn (qif-file:parse-value/decimal self value))) - - ;; B : budget amount. not really supported. - ((#\B) - (qif-cat:set-budget-amt! - current-xtn (qif-file:parse-value/decimal self value))) - - ;; end-of-record - ((#\^) - (qif-file:add-cat! self current-xtn) -; (qif-cat:print current-xtn) - (set! current-xtn (make-qif-cat))) - - (else - (display "qif-file:read-file : unknown Cat slot ") - (display tag) (newline)))) + ;; N : category name + ((#\N) + (qif-cat:set-name! current-xtn + (qif-file:parse-string self value))) + + ;; D : category description + ((#\D) + (qif-cat:set-description! current-xtn + (qif-file:parse-string + self value))) + + ;; E : is this a taxable category? + ((#\T) + (qif-cat:set-taxable! current-xtn #t)) + + ;; E : is this an expense category? + ((#\E) + (qif-cat:set-expense-cat! current-xtn #t)) + + ;; I : is this an income category? + ((#\I) + (qif-cat:set-income-cat! current-xtn #t)) + + ;; R : what is the tax rate (from some table? + ;; seems to be an integer) + ((#\R) + (qif-cat:set-tax-rate! + current-xtn (qif-file:parse-value/decimal self value))) + + ;; B : budget amount. not really supported. + ((#\B) + (qif-cat:set-budget-amt! + current-xtn (qif-file:parse-value/decimal self value))) + + ;; end-of-record + ((#\^) + (qif-file:add-cat! self current-xtn) +;;; (qif-cat:print current-xtn) + (set! current-xtn (make-qif-cat))) + + (else + (display "qif-file:read-file : unknown Cat slot ") + (display tag) (newline)))) ;; trying to sneak one by, eh? (#t @@ -392,40 +403,33 @@ (if (eq? 'unknown (qif-file:account self)) (qif-file:set-account! self (qif-file:path-to-accountname self))) - + ;; reparse values and dates if we figured out the format. (let ((reparse-ok #t)) (for-each (lambda (xtn) - (set! reparse-ok - (and reparse-ok (qif-xtn:reparse xtn self)))) + (if (eq? reparse-ok #t) + (set! reparse-ok + (qif-xtn:reparse xtn self)))) (qif-file:xtns self)) - (if (not reparse-ok) - (begin - (display "xtn reparse failed") (newline))) - (for-each (lambda (cat) - (set! reparse-ok - (and reparse-ok (qif-cat:reparse cat self)))) + (if (eq? reparse-ok #t) + (set! reparse-ok + (qif-cat:reparse cat self)))) (qif-file:cats self)) - (if (not reparse-ok) - (begin - (display "cat reparse failed") (newline))) - (for-each (lambda (acct) - (set! reparse-ok - (and reparse-ok (qif-acct:reparse acct self)))) + (if (eq? reparse-ok #t) + (set! reparse-ok + (qif-acct:reparse acct self)))) (qif-file:accounts self)) - - (if (not reparse-ok) - (begin - (display "acct reparse failed") (newline))) + (display "reparse-ok == ") (write reparse-ok) (newline) reparse-ok)) (begin (display "There was a heinous error. Failed to read file.") (newline) #f)))) + diff --git a/src/scm/qif-import/qif-guess-map.scm b/src/scm/qif-import/qif-guess-map.scm index ebab258e82..f6bd287287 100644 --- a/src/scm/qif-import/qif-guess-map.scm +++ b/src/scm/qif-import/qif-guess-map.scm @@ -53,7 +53,9 @@ (let* ((name (gnc:account-get-name child-acct)) (fullname (if (string? root-name) - (string-append root-name ":" name) + (string-append root-name + (gnc:account-separator-char) + name) name))) (set! names (append (cons (list name fullname child-acct) diff --git a/src/scm/qif-import/qif-objects.scm b/src/scm/qif-import/qif-objects.scm index b0c7651061..9f070bd889 100644 --- a/src/scm/qif-import/qif-objects.scm +++ b/src/scm/qif-import/qif-objects.scm @@ -324,8 +324,12 @@ (if (or (string? (qif-xtn:share-price self)) (string? (qif-xtn:num-shares self)) (string? (qif-xtn:adjustment self))) - (set! reparse-ok #f)) - + (begin + (display "qif-import: failed to reparse stock info") + (newline) + (set! reparse-ok + (list #f "Could not autodetect radix format.")))) + ;; reparse the amount of each split (for-each (lambda (split) @@ -334,8 +338,11 @@ split (qif-file:parse-value qif-file (qif-split:amount split)))) (if (string? (qif-split:amount split)) - (set! reparse-ok #f))) - + (begin + (display "qif-import: failed to reparse value") + (write (qif-split:amount split)) (newline) + (set! reparse-ok + (list #f "Could not autodetect radix format."))))) (qif-xtn:splits self)) ;; reparse the date @@ -344,8 +351,11 @@ (qif-file:parse-date qif-file (qif-xtn:date self)))) (if (string? (qif-xtn:date self)) - (set! reparse-ok #f)) - + (begin + (display "qif-import: failed to reparse date") + (write (qif-xtn:date self)) (newline) + (set! reparse-ok + (list #f "Could not autodetect date format.")))) reparse-ok)) (define (qif-xtn:print self) @@ -403,7 +413,7 @@ self (qif-file:parse-value file (qif-acct:limit self)))) (if (or (string? (qif-acct:limit self)) (string? (qif-acct:type self))) - #f + (list #f "Could not autodetect radix for fields in Account record") #t)) @@ -518,7 +528,8 @@ (if (or (string? (qif-cat:tax-rate self)) (string? (qif-cat:budget-amt self))) - #f #t)) + (list #f "Could not autodetect radix for fields in Category record") + #t)) (define (qif-file:add-xtn! self xtn) diff --git a/src/scm/qif-import/qif-parse.scm b/src/scm/qif-import/qif-parse.scm index bd4505ccd0..36d718d380 100644 --- a/src/scm/qif-import/qif-parse.scm +++ b/src/scm/qif-import/qif-parse.scm @@ -1,4 +1,4 @@ -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; qif-parse.scm ;;; routines to parse values and dates in QIF files. ;;; @@ -199,11 +199,13 @@ (display "qif-import: Substituting 1/1/2999 for date.") (newline) (set! date-string "1/1/2999"))) + (set! date-string (string-remove-trailing-space date-string)) + (let ((date-parts '()) (numeric-date-parts '()) (retval date-string) (match - (string-match "([0-9]+) *[-/.'] *([0-9]+) *[-/.'] *([0-9]+)" + (string-match "^ *([0-9]+) *[-/.'] *([0-9]+) *[-/.'] *([0-9]+) *$" date-string))) (if match (set! date-parts (list (match:substring match 1) @@ -223,7 +225,7 @@ ((not (eq? 3 (length date-parts))) (begin (display "qif-file:parse-date : can't interpret date ") - (display date-string) (newline))) + (display date-string) (display " ") (write date-parts)(newline))) ;; if the format is unknown, don't try to fully interpret the ;; number, just look for a good guess or an inconsistency with @@ -254,7 +256,7 @@ (qif-file:set-guessed-date-format! self 'inconsistent)))) ;; current guess is y/d/m (is this really possible?) - ((eq? (qif-file:guessed-date-format self) 'y-m-d) + ((eq? (qif-file:guessed-date-format self) 'y-d-m) (let ((d (cadr numeric-date-parts)) (m (caddr numeric-date-parts))) (if (or (not (number? m)) (not (number? d)) (> m 12) (> d 31)) @@ -357,11 +359,11 @@ (define decimal-radix-regexp (make-regexp - "^-?[0-9]+$|^-?[0-9]?[0-9]?[0-9]?(,[0-9][0-9][0-9])*(\\.[0-9]*)?$")) + "^\\$?-?\\$?[0-9]+$|^\\$?-?\\$?[0-9]?[0-9]?[0-9]?(,[0-9][0-9][0-9])*(\\.[0-9]*)?$")) (define comma-radix-regexp (make-regexp - "^-?[0-9]+$|^-?[0-9]?[0-9]?[0-9]?(\\.[0-9][0-9][0-9])*(,[0-9]*)?$")) + "^\\$?-?\\$?[0-9]+$|^\\$?-?\\$?[0-9]?[0-9]?[0-9]?(\\.[0-9][0-9][0-9])*(,[0-9]*)?$")) (define (value-is-decimal-radix? value) (if (regexp-exec decimal-radix-regexp value) @@ -371,19 +373,35 @@ (if (regexp-exec comma-radix-regexp value) #t #f)) - (define (qif-file:parse-value/decimal self value-string) - (+ 0.0 - (with-input-from-string (string-remove-char value-string #\,) - (lambda () (read))))) - + (set! value-string (string-remove-trailing-space value-string)) + (if (value-is-decimal-radix? value-string) + (let ((read-val + (with-input-from-string + (string-remove-char + (string-remove-char value-string #\,) + #\$) + (lambda () (read))))) + (if (number? read-val) + (+ 0.0 read-val) + #f)) + #f)) (define (qif-file:parse-value/comma self value-string) - (+ 0.0 - (with-input-from-string - (string-replace-char! (string-remove-char value-string #\.) - #\, #\.) - (lambda () (read))))) + (set! value-string (string-remove-trailing-space value-string)) + (if (value-is-comma-radix? value-string) + (let ((read-val + (with-input-from-string + (string-remove-char + (string-replace-char! + (string-remove-char value-string #\.) + #\, #\.) + #\$) + (lambda () (read))))) + (if (number? read-val) + (+ 0.0 read-val) + #f)) + #f)) (define (qif-file:parse-value self value-string) (if (or (not (string? value-string)) diff --git a/src/scm/qif-import/qif-to-gnc.scm b/src/scm/qif-import/qif-to-gnc.scm index fda96b22c3..72a1f4767a 100644 --- a/src/scm/qif-import/qif-to-gnc.scm +++ b/src/scm/qif-import/qif-to-gnc.scm @@ -17,15 +17,16 @@ (define (qif-import:find-or-make-acct gnc-name gnc-acct-hash gnc-type qif-info acct-group) - (let ((existing-account (hash-ref gnc-acct-hash gnc-name)) - (same-gnc-account (gnc:get-account-from-full-name acct-group - gnc-name - #\:)) - (check-full-name #f) - (make-new-acct #f) - (default-currency - (gnc:option-value - (gnc:lookup-global-option "International" "Default Currency")))) + (let* ((separator (string-ref (gnc:account-separator-char) 0)) + (existing-account (hash-ref gnc-acct-hash gnc-name)) + (same-gnc-account (gnc:get-account-from-full-name acct-group + gnc-name + separator)) + (check-full-name #f) + (make-new-acct #f) + (default-currency + (gnc:option-value + (gnc:lookup-global-option "International" "Default Currency")))) (if (or (pointer-token-null? same-gnc-account) (and (not (pointer-token-null? same-gnc-account)) @@ -45,11 +46,11 @@ (parent-name #f) (acct-name #f) (last-colon #f)) - (set! last-colon (string-rindex gnc-name #\:)) - + (set! last-colon (string-rindex gnc-name separator)) + (gnc:init-account new-acct) (gnc:account-begin-edit new-acct 1) - + ;; if this is a copy of an existing gnc account, ;; copy the account properties (if (not make-new-acct) diff --git a/src/scm/qif-import/qif-utils.scm b/src/scm/qif-import/qif-utils.scm index 51d5eab31f..2a040b3466 100644 --- a/src/scm/qif-import/qif-utils.scm +++ b/src/scm/qif-import/qif-utils.scm @@ -39,9 +39,16 @@ (define (string-remove-char str char) (let ((rexpstr - (if (not (eq? char #\.)) - (make-string 1 char) - "\\."))) + (case char + ((#\.) "\\.") + ((#\^) "\\^") + ((#\$) "\\$") + ((#\*) "\\*") + ((#\+) "\\+") + ((#\\) "\\\\") + ((#\?) "\\?") + (else + (make-string 1 char))))) (regexp-substitute/global #f rexpstr str 'pre 'post))) (define (string-char-count str char)