diff --git a/ChangeLog b/ChangeLog index 5f61bf7e39..b856027cf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2000-05-08 Rob Browning + + * make-gnucash-patch.in: change gnucash.h to gnucash.c in ignores. + Delete src/messages_i18n.h from ignores. + Remove g-wrap files from ignores. + + * src/guile/gnucash.c.in: new file (now auto-generated) + This and the following change fix a mutual dependency problem. + + * src/guile/gnucash.h: new file (no longer auto-generated). + + * src/Makefile.in (CLEAN_SUBDIRS): add quotes. + (all targets): build g-wrap before guile. + + * Makefile.init.in (VERSION): Added to fix problems with rpm spec, etc. + 2000-05-08 Dave Peticolas * src/register/pricecell.c: allow the cell to be blanked directly. @@ -75,6 +91,61 @@ (gnc_lconv_set_char): check for the lconv default value using CHAR_MAX, not 127. +2000-05-02 Rob Browning + + * Makefile.in: switch to sed to handle non-makefile generation. + + * Makefile.init.in: kill PATH mangling. + Add DIFF GUILE and g-wrap command handling. + + * configure.in: Many changes related to the great g-wrap exodus + and the change to handle non-makefile with sed. + Kill recursive var expansion. + Kill prefix pre-expansion. + Remove fancy guile handling - presume newer guile (which is required). + Remove non-makefiles from AC_OUTPUT (except the locale stuff for now). + + * doc/build-system: Document configure handling of non-makefiles. + + * lib/Makefile.in: expunge g-wrap. + + * make-gnucash-patch.in: use sed @--@ handling for expansions. + Be strict. + Add ignore for src/messages_i18n.h + + * po/Makefile.in.in: handle extract-macros.perl.in vars with sed. + + * po/extract-macros.perl.in: handle vars with sed. + + * rpm/Makefile.in: new file. Handle gnucash.spec.in with sed. + + * rpm/gnucash.spec.in: use @--@ vars. + + * src/Makefile.in: handle src/quotes in the build process. + Re-order src/guile to build before src/g-wrap. + + * src/g-wrap/Makefile.in: handle new version of g-wrap. + + * src/gnome/Makefile.in: fix compile var handling for g-wrap, etc. + + * src/guile/Makefile.in: fix compile var handling for g-wrap, etc. + Add sed handling for gnucash.h.in. + + * src/guile/gnucash.h.in: handle g-wrap changes. + Handle removal of EXPANDED vars. + Switch to sed @--@ vars. + + * src/qt/Makefile.in: fix compile var handling for g-wrap, etc. + + * src/quotes/Makefile.in: new file. + Handle gnc-prices.in with sed. + + * src/quotes/gnc-prices.in: Switch to sed @--@ vars. + + * src/scm/Makefile.in: Handle bootstrap.scm.in with sed. + + * src/scm/bootstrap.scm.in: Switch to sed @--@ vars. + 2000-05-02 Robert Graham Merkel * man/gnc-prices.1: fixed typo. @@ -356,9 +427,7 @@ * src/register/splitreg.c (configLayout): add the xto cell into the transaction cursor. - 2000-03-31 Rob Browning - - * src/scm/bootstrap.scm.in: use new GNC_EXPANDED_ vars. +2000-03-31 Rob Browning * src/scm/Makefile.in: set top_srcdir and include Makefile.init diff --git a/Makefile.in b/Makefile.in index 99eea1ab42..294f489da3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -51,7 +51,19 @@ motif-static: motif.static gnome-static: gnome.static qt-static: qt.static -build-flavor: config.status +## We borrow guile's convention and use @-...-@ as the substitution +## brackets here, instead of the usual @...@. This prevents autoconf +## from substituting the values directly into the left-hand sides of +## the sed substitutions. +make-gnucash-patch: make-gnucash-patch.in + rm -f $@.tmp + sed < $@.in > $@.tmp \ + -e 's:@-PERL-@:${PERL}:g' + chmod +x $@.tmp + mv $@.tmp $@ + +build-flavor: config.status make-gnucash-patch + @cd rpm && ${MAKE} default @cd lib && ${MAKE} ${FLAVOR} @cd src && ${MAKE} ${FLAVOR} ln -sf gnucash.${FLAVOR} gnucash.bin @@ -115,7 +127,7 @@ config.status: configure exit 1; \ fi -CLEAN_SUBDIRS += lib src po +CLEAN_SUBDIRS += lib src po rpm TRASH += TAGS *~ *.o *.bak DIST_TRASH += Makefile *~ *.o *.bak share/scm gnucash.bin diff --git a/Makefile.init.in b/Makefile.init.in index 904e2e00f9..0c705ff808 100644 --- a/Makefile.init.in +++ b/Makefile.init.in @@ -20,8 +20,6 @@ @SET_MAKE@ -export PATH := @GUILE_BIN@:@ABSOLUTE_TOP_SRCDIR@/lib/g-wrap-install/bin/:${PATH} - srcdir = @srcdir@ VPATH = @srcdir@ @@ -41,6 +39,9 @@ sysconfdir=@sysconfdir@ includedir=@includedir@ mandir=@mandir@ +VERSION = @VERSION@ +PACKAGE = @PACKAGE@ + ABSOLUTE_TOP_SRCDIR=@ABSOLUTE_TOP_SRCDIR@ CC = @CC@ @@ -54,11 +55,20 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ SWIG = @SWIG@ PERL = @PERL@ +GUILE = @GUILE@ CPU = @target_cpu@ OPT_STYLE_INSTALL=@OPT_STYLE_INSTALL@ +GUILE_LINK_ARGS = @GUILE_LINK_ARGS@ +GUILE_COMPILE_ARGS = @GUILE_COMPILE_ARGS@ + +G_WRAP_LINK_ARGS = @G_WRAP_LINK_ARGS@ +G_WRAP_COMPILE_ARGS = @G_WRAP_COMPILE_ARGS@ + +LOCALE_DIR = @LOCALE_DIR@ + # These are *only* to be used at *install* time. GNC_DOCDIR=@GNC_DOCDIR@ GNC_BINDIR=@GNC_BINDIR@ diff --git a/configure b/configure index 81189a8c9c..19a6e1662b 100755 --- a/configure +++ b/configure @@ -59,10 +59,6 @@ ac_help="$ac_help --with-xmhtml-includes=DIR specify where to look for xmhtml headers" ac_help="$ac_help --with-xmhtml-libraries=DIR specify where to look for xmhtml libs" -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" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -503,7 +499,7 @@ echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=src/guile/gnucash.h.in +ac_unique_file=src/guile/gnucash.h # Find the source files, if location was not specified. if test -z "$srcdir"; then @@ -605,7 +601,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:609: checking for a BSD compatible install" >&5 +echo "configure:605: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -661,7 +657,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:665: checking whether build environment is sane" >&5 +echo "configure:661: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -718,7 +714,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:722: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:718: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -764,7 +760,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:768: checking for working aclocal" >&5 +echo "configure:764: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -777,7 +773,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:781: checking for working autoconf" >&5 +echo "configure:777: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -790,7 +786,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:794: checking for working automake" >&5 +echo "configure:790: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -803,7 +799,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:807: checking for working autoheader" >&5 +echo "configure:803: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -816,7 +812,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:820: checking for working makeinfo" >&5 +echo "configure:816: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -844,7 +840,7 @@ ALL_LINGUAS="fr de en_GB sv" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:848: checking for a BSD compatible install" >&5 +echo "configure:844: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -899,7 +895,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:903: checking for $ac_word" >&5 +echo "configure:899: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -931,7 +927,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:935: checking for $ac_word" >&5 +echo "configure:931: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -961,7 +957,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:965: checking for $ac_word" >&5 +echo "configure:961: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1012,7 +1008,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1016: checking for $ac_word" >&5 +echo "configure:1012: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1044,7 +1040,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1048: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1044: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1055,12 +1051,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1059 "configure" +#line 1055 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1086,12 +1082,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1090: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1086: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1095: checking whether we are using GNU C" >&5 +echo "configure:1091: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1100,7 +1096,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1119,7 +1115,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1123: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1119: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1152,7 +1148,7 @@ fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:1156: checking for POSIXized ISC" >&5 +echo "configure:1152: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1173,14 +1169,14 @@ else fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1177: checking whether byte ordering is bigendian" >&5 +echo "configure:1173: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1191,11 +1187,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1206,7 +1202,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1226,7 +1222,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1263,7 +1259,7 @@ EOF fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1267: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1263: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1290,7 +1286,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1294: checking how to run the C preprocessor" >&5 +echo "configure:1290: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1305,13 +1301,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1311: \"$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 : @@ -1322,13 +1318,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1328: \"$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 : @@ -1339,13 +1335,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1345: \"$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 : @@ -1370,12 +1366,12 @@ fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1374: checking for ANSI C header files" >&5 +echo "configure:1370: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1383,7 +1379,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1383: \"$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* @@ -1400,7 +1396,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1418,7 +1414,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1439,7 +1435,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1450,7 +1446,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1477,12 +1473,12 @@ fi for ac_func in stpcpy memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1481: checking for $ac_func" >&5 +echo "configure:1477: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1505: \"$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 @@ -1530,35 +1526,6 @@ fi done - -### -------------------------------------------------------------------------- -### Fix up prefix for recursive expansion - -test "x$prefix" = xNONE && prefix=$ac_default_prefix - - -### -------------------------------------------------------------------------- -### Useful POSIX shell functions -### - -# This has to be a variable because we need to be able to export it, -# and POSIX shells AFAIK don't have "export -f" - -gnc_recursively_expand_var () { - - # Note that this function will only work for cases where any sign of - # a $ means that there is a variable reference that can be expanded. - # I.e. it would fail miserably for something like pattern='^bar.*$'. - - local expanded_var=${1} - while echo $expanded_var | grep '\$' > /dev/null - do - expanded_var=`eval echo ${expanded_var}` - done - echo $expanded_var -} - - ### -------------------------------------------------------------------------- ### Variables ### Set up all the initial variable values... @@ -1647,28 +1614,25 @@ else fi -GNC_EXPANDED_LOCALE_DIR=`gnc_recursively_expand_var "${LOCALE_DIR}"` - - # We need the variable below defined for the gettext checks to work ac_cv_header_locale_h=yes if test "$ac_cv_header_locale_h" = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:1660: checking for LC_MESSAGES" >&5 +echo "configure:1624: 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:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1636: \"$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 @@ -1689,7 +1653,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:1693: checking whether NLS is requested" >&5 +echo "configure:1657: 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" @@ -1709,7 +1673,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:1713: checking whether included gettext is requested" >&5 +echo "configure:1677: 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" @@ -1728,17 +1692,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:1732: checking for libintl.h" >&5 +echo "configure:1696: 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:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1706: \"$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* @@ -1755,19 +1719,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:1759: checking for gettext in libc" >&5 +echo "configure:1723: 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:1771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1735: \"$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 @@ -1783,7 +1747,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:1787: checking for bindtextdomain in -lintl" >&5 +echo "configure:1751: 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 @@ -1791,7 +1755,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1770: \"$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 @@ -1818,12 +1782,12 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:1822: checking for gettext in libintl" >&5 +echo "configure:1786: 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:1827: checking for gettext in -lintl" >&5 +echo "configure:1791: 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 @@ -1831,7 +1795,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1810: \"$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 @@ -1881,7 +1845,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1885: checking for $ac_word" >&5 +echo "configure:1849: 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 @@ -1915,12 +1879,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1919: checking for $ac_func" >&5 +echo "configure:1883: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1911: \"$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 @@ -1970,7 +1934,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1974: checking for $ac_word" >&5 +echo "configure:1938: 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 @@ -2006,7 +1970,7 @@ fi # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2010: checking for $ac_word" >&5 +echo "configure:1974: 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 @@ -2042,7 +2006,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2046: checking for $ac_word" >&5 +echo "configure:2010: 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 @@ -2074,7 +2038,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -2105,7 +2069,7 @@ fi if test "$CATOBJEXT" = "NONE"; then echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6 -echo "configure:2109: checking whether catgets can be used" >&5 +echo "configure:2073: 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" @@ -2118,7 +2082,7 @@ fi if test "$nls_cv_use_catgets" = "yes"; then echo $ac_n "checking for main in -li""... $ac_c" 1>&6 -echo "configure:2122: checking for main in -li" >&5 +echo "configure:2086: 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 @@ -2126,14 +2090,14 @@ else ac_save_LIBS="$LIBS" LIBS="-li $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2101: \"$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 @@ -2161,12 +2125,12 @@ else fi echo $ac_n "checking for catgets""... $ac_c" 1>&6 -echo "configure:2165: checking for catgets" >&5 +echo "configure:2129: checking for catgets" >&5 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2157: \"$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 @@ -2211,7 +2175,7 @@ EOF # Extract the first word of "gencat", so it can be a program name with args. set dummy gencat; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2215: checking for $ac_word" >&5 +echo "configure:2179: 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 @@ -2247,7 +2211,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2251: checking for $ac_word" >&5 +echo "configure:2215: 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 @@ -2284,7 +2248,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2288: checking for $ac_word" >&5 +echo "configure:2252: 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 @@ -2319,7 +2283,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2323: checking for $ac_word" >&5 +echo "configure:2287: 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 @@ -2377,7 +2341,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2381: checking for $ac_word" >&5 +echo "configure:2345: 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 @@ -2411,7 +2375,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2415: checking for $ac_word" >&5 +echo "configure:2379: 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 @@ -2447,7 +2411,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2451: checking for $ac_word" >&5 +echo "configure:2415: 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 @@ -2542,7 +2506,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:2546: checking for catalogs to be installed" >&5 +echo "configure:2510: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -2585,7 +2549,6 @@ echo "configure:2546: checking for catalogs to be installed" >&5 < $srcdir/po/POTFILES.in > po/POTFILES - ### -------------------------------------------------------------------------- ## qt-version of gnucash # The qt version of gnucash is far from doing anything usefull, so most people @@ -2618,7 +2581,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:2622: checking for $ac_word" >&5 +echo "configure:2585: 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 @@ -2696,7 +2659,7 @@ fi # Extract the first word of "swig", so it can be a program name with args. set dummy swig; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2700: checking for $ac_word" >&5 +echo "configure:2663: 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 @@ -2757,7 +2720,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:2761: checking for $ac_word" >&5 +echo "configure:2724: 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 @@ -2808,7 +2771,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:2812: checking for $ac_word" >&5 +echo "configure:2775: 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 @@ -2858,7 +2821,7 @@ LIBS="$LIBS -lm" # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:2862: checking for X" >&5 +echo "configure:2825: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -2920,12 +2883,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:2929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2892: \"$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* @@ -2994,14 +2957,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:2968: \"$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. @@ -3107,17 +3070,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:3111: checking whether -R must be followed by a space" >&5 +echo "configure:3074: 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:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -3133,14 +3096,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:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -3172,7 +3135,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:3176: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:3139: 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 @@ -3180,7 +3143,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:3158: \"$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 @@ -3213,7 +3176,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:3217: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:3180: 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 @@ -3221,7 +3184,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:3199: \"$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 @@ -3261,12 +3224,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:3265: checking for gethostbyname" >&5 +echo "configure:3228: 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:3256: \"$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 @@ -3310,7 +3273,7 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:3314: checking for gethostbyname in -lnsl" >&5 +echo "configure:3277: 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 @@ -3318,7 +3281,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:3296: \"$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 @@ -3359,12 +3322,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:3363: checking for connect" >&5 +echo "configure:3326: 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:3354: \"$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 @@ -3408,7 +3371,7 @@ fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:3412: checking for connect in -lsocket" >&5 +echo "configure:3375: 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 @@ -3416,7 +3379,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:3394: \"$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 @@ -3451,12 +3414,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:3455: checking for remove" >&5 +echo "configure:3418: 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:3446: \"$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 @@ -3500,7 +3463,7 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:3504: checking for remove in -lposix" >&5 +echo "configure:3467: 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 @@ -3508,7 +3471,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:3486: \"$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 @@ -3543,12 +3506,12 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:3547: checking for shmat" >&5 +echo "configure:3510: 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:3538: \"$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 @@ -3592,7 +3555,7 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:3596: checking for shmat in -lipc" >&5 +echo "configure:3559: 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 @@ -3600,7 +3563,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:3578: \"$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 @@ -3644,7 +3607,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:3648: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:3611: 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 @@ -3652,7 +3615,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:3630: \"$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 @@ -3785,7 +3748,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:3789: checking for deflateEnd in -lz" >&5 +echo "configure:3752: 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 @@ -3793,7 +3756,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:3771: \"$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 @@ -3828,7 +3791,7 @@ else fi echo $ac_n "checking for jpeg_read_scanlines in -ljpeg""... $ac_c" 1>&6 -echo "configure:3832: checking for jpeg_read_scanlines in -ljpeg" >&5 +echo "configure:3795: 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 @@ -3836,7 +3799,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:3814: \"$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 @@ -3871,7 +3834,7 @@ else fi echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:3875: checking for png_read_image in -lpng" >&5 +echo "configure:3838: 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 @@ -3879,7 +3842,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:3857: \"$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 @@ -3920,7 +3883,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:3924: checking for XpmReadFileToXpmImage in -lXpm" >&5 +echo "configure:3887: 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 @@ -3928,7 +3891,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:3906: \"$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 @@ -3974,7 +3937,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:3978: checking for XmHTMLTextScrollToLine in -lXmHTML" >&5 +echo "configure:3941: 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 @@ -3982,7 +3945,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:3960: \"$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 @@ -4040,14 +4003,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:4044: checking gtk-xmhtml/gtk-xmhtml.h" >&5 +echo "configure:4007: 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:4051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4014: \"$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* @@ -4069,7 +4032,7 @@ CPPFLAGS="$OLDCPPFLAGS" ### -------------------------------------------------------------------------- # If readline exists, just assume that guile needs it. It probably does. echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:4073: checking for readline in -lreadline" >&5 +echo "configure:4036: 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 @@ -4077,7 +4040,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:4055: \"$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 @@ -4122,7 +4085,7 @@ EXTRALIBS=`$GNOME_CONFIG_BIN --libs gtkxmhtml` #check for gtkxmhtml, export library link to variable GTK_XMHTML echo $ac_n "checking for gtk_xmhtml_new in -lgtkxmhtml""... $ac_c" 1>&6 -echo "configure:4126: checking for gtk_xmhtml_new in -lgtkxmhtml" >&5 +echo "configure:4089: 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 @@ -4130,7 +4093,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgtkxmhtml $EXTRALIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4108: \"$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 @@ -4172,7 +4135,7 @@ EXTRALIBS=`$GNOME_CONFIG_BIN --libs xml` #check for libxml echo $ac_n "checking for xmlDefaultSAXHandlerInit in -lxml""... $ac_c" 1>&6 -echo "configure:4176: checking for xmlDefaultSAXHandlerInit in -lxml" >&5 +echo "configure:4139: checking for xmlDefaultSAXHandlerInit in -lxml" >&5 ac_lib_var=`echo xml'_'xmlDefaultSAXHandlerInit | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4180,7 +4143,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lxml $EXTRALIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4158: \"$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 @@ -4229,7 +4192,7 @@ EXTRALIBS=`$GNOME_CONFIG_BIN --libs print` # check for gnome-print and enable it via HAVE_LIBGNOMEPRINT # if found echo $ac_n "checking for gnome_print_context_new in -lgnomeprint""... $ac_c" 1>&6 -echo "configure:4233: checking for gnome_print_context_new in -lgnomeprint" >&5 +echo "configure:4196: 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 @@ -4237,7 +4200,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnomeprint $EXTRALIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4215: \"$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 @@ -4282,36 +4245,118 @@ fi ### -------------------------------------------------------------------------- -### Guile (libraries and executable) +### G-wrap (libraries and executable) -# Don't disable this. It's the only reliable way to detect guile's -# settings on current guile installs. If it doesn't work for you, then -# don't specify --with-guile-config. (RLB) +G_WRAP_COMPILE_ARGS="" +G_WRAP_LINK_ARGS="" -# In the long run, --with-guile should go away in favor of -# --with-guile-config. It might make sense to do this now. If you have -# guile 1.3 installed, but don't have guile-config, your install is -# most likely broken anyway, and should be fixed. (RLB) - -# Let the user override the guile-config executable. -# Check whether --with-guile-config or --without-guile-config was given. -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:4302: checking for guile-config" >&5 - echo "$ac_t""${with_guile_config}" 1>&6 - GUILE_CONFIG="$with_guile_config" - LIBS="`${GUILE_CONFIG} link` ${LIBS}" - CFLAGS="$CFLAGS `${GUILE_CONFIG} compile`" +# Find the configure script +# Extract the first word of "g-wrap-config", so it can be a program name with args. +set dummy g-wrap-config; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4258: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_G_WRAP_CONFIG'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$G_WRAP_CONFIG" in + /*) + ac_cv_path_G_WRAP_CONFIG="$G_WRAP_CONFIG" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_G_WRAP_CONFIG="$G_WRAP_CONFIG" # 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_G_WRAP_CONFIG="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +G_WRAP_CONFIG="$ac_cv_path_G_WRAP_CONFIG" +if test -n "$G_WRAP_CONFIG"; then + echo "$ac_t""$G_WRAP_CONFIG" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -if test x"$GUILE_CONFIG" = x; then - # Try to find a default guile-config - # Extract the first word of "guile-config", so it can be a program name with args. +if test -x "${G_WRAP_CONFIG}"; +then + # Find out what the g-wrap compile and link flags are. + G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile` + G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-static-link-args guile` +fi + +# Find the tool +# Extract the first word of "g-wrap", so it can be a program name with args. +set dummy g-wrap; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:4302: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_G_WRAP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$G_WRAP" in + /*) + ac_cv_path_G_WRAP="$G_WRAP" # Let the user override the test with a path. + ;; + ?:/*) + ac_cv_path_G_WRAP="$G_WRAP" # 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_G_WRAP="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + ;; +esac +fi +G_WRAP="$ac_cv_path_G_WRAP" +if test -n "$G_WRAP"; then + echo "$ac_t""$G_WRAP" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +if test x"${G_WRAP_COMPILE_ARGS}" = x || \ + test x"${G_WRAP_LINK_ARGS}" = x || \ + ! test -x "${G_WRAP}"; +then + { echo "configure: error: + + g-wrap does not appear to be installed. It must be installed and + its binary directory must be in your PATH. If you need to install + g-wrap, you can find it at ftp://ftp.gnucash.org/pub/g-wrap." 1>&2; exit 1; } +fi + + + + + + +### -------------------------------------------------------------------------- +### Guile (libraries and executable) + +GUILE_COMPILE_ARGS="" +GUILE_LINK_ARGS="" + +# Extract the first word of "guile-config", so it can be a program name with args. set dummy guile-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4315: checking for $ac_word" >&5 +echo "configure:4360: 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 @@ -4343,165 +4388,28 @@ else echo "$ac_t""no" 1>&6 fi + +if test -x "${GUILE_CONFIG}"; +then + # Find out what the guile compile and link flags are. + GUILE_COMPILE_ARGS=`${GUILE_CONFIG} compile` + GUILE_LINK_ARGS=`${GUILE_CONFIG} link` fi -# Still allow the old method (for now). -# Check whether --with-guile or --without-guile was given. -if test "${with_guile+set}" = set; then - withval="$with_guile" - LIBS="-L$with_guile/lib ${LIBS}" CFLAGS="$CFLAGS -I$with_guile/include" -fi - - -# You can't have both... -if test x"$GUILE_CONFIG" != x && test x"$with_guile" != x ; then - { echo "configure: error: ${GUILE_CONFIG} ================ ${with_guile}" 1>&2; exit 1; } - { echo "configure: error: You cannot specify both --with-guile and --with-guile-config" 1>&2; exit 1; } -fi - -if test x"$GUILE_CONFIG" = x; then - # If we didn't get GUILE_CONFIG, then do things the old, dumb way. - - # Have to use AC_TRY_LINK here because AC_CHECK_LIB caches the - # results, so one failure makes all further attempts fail. - - GNC_LIBS_SAFE=${LIBS} - echo $ac_n "checking for guile""... $ac_c" 1>&6 -echo "configure:4371: checking for guile" >&5 -if eval "test \"`echo '$''{'ac_cv_lib_guile'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - for GNC_TEST_LIBS in "-lguile" "-lguile -ldl" "-lguile -lqthreads" \ - "-lguile -ltermcap" "-lguile -lqthreads -ltermcap" \ - "-lguile -lreadline -lncurses"; do - if test x"${GUILELIBS}" != x; then - ac_cv_lib_guile=${GUILELIBS} - break - else - LIBS="${GNC_TEST_LIBS} ${GNC_LIBS_SAFE}" - cat > conftest.$ac_ext < -int main() { -gh_eval_file; -; return 0; } -EOF -if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - GUILELIBS="${GNC_TEST_LIBS}" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - fi - done -fi - -echo "$ac_t""$ac_cv_lib_guile" 1>&6 - - GUILELIBS=${ac_cv_lib_guile} -else - # We did find a suitable guile-config. Use that. - # and use any guile binary in that same directory. - GUILE_INC=`${GUILE_CONFIG} compile` - GUILELIBS=`${GUILE_CONFIG} link` -fi - -# Find the appropriate guile binary. -if test x"$GUILE_CONFIG" != x; then - # Extract the first word of "guile", so it can be a program name with args. +# Find the binary +# 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:4418: checking for $ac_word" >&5 -if eval "test \"`echo '$''{'ac_cv_path_GUILE_BIN'+set}'`\" = set"; then +echo "configure:4404: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GUILE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$GUILE_BIN" in + case "$GUILE" in /*) - ac_cv_path_GUILE_BIN="$GUILE_BIN" # Let the user override the test with a path. + ac_cv_path_GUILE="$GUILE" # Let the user override the test with a path. ;; ?:/*) - ac_cv_path_GUILE_BIN="$GUILE_BIN" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="`dirname ${GUILE_CONFIG}`" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GUILE_BIN="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -GUILE_BIN="$ac_cv_path_GUILE_BIN" -if test -n "$GUILE_BIN"; then - echo "$ac_t""$GUILE_BIN" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -fi - -# If that didn't work, try the --with-guile directory, if any. -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:4457: 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 - case "$GUILE_BIN" in - /*) - ac_cv_path_GUILE_BIN="$GUILE_BIN" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GUILE_BIN="$GUILE_BIN" # Let the user override the test with a dos path. - ;; - *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - ac_dummy="`${with_guile}/bin`" - for ac_dir in $ac_dummy; do - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then - ac_cv_path_GUILE_BIN="$ac_dir/$ac_word" - break - fi - done - IFS="$ac_save_ifs" - ;; -esac -fi -GUILE_BIN="$ac_cv_path_GUILE_BIN" -if test -n "$GUILE_BIN"; then - echo "$ac_t""$GUILE_BIN" 1>&6 -else - echo "$ac_t""no" 1>&6 -fi - -fi - -# Final stab at locating a guile binary. -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:4496: 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 - case "$GUILE_BIN" in - /*) - ac_cv_path_GUILE_BIN="$GUILE_BIN" # Let the user override the test with a path. - ;; - ?:/*) - ac_cv_path_GUILE_BIN="$GUILE_BIN" # Let the user override the test with a dos path. + ac_cv_path_GUILE="$GUILE" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" @@ -4509,7 +4417,7 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_path_GUILE_BIN="$ac_dir/$ac_word" + ac_cv_path_GUILE="$ac_dir/$ac_word" break fi done @@ -4517,21 +4425,23 @@ else ;; esac fi -GUILE_BIN="$ac_cv_path_GUILE_BIN" -if test -n "$GUILE_BIN"; then - echo "$ac_t""$GUILE_BIN" 1>&6 +GUILE="$ac_cv_path_GUILE" +if test -n "$GUILE"; then + echo "$ac_t""$GUILE" 1>&6 else echo "$ac_t""no" 1>&6 fi -fi -if test x"${GUILELIBS}" = x || test x"${GUILE_BIN}" = x; then - { echo "configure: error: Cannot configure guile bits. Do you have guile 1.3 installed?" 1>&2; exit 1; } -fi +if test x"${GUILE_COMPILE_ARGS}" = x || \ + test x"${GUILE_LINK_ARGS}" = x || \ + ! test -x "${GUILE}"; +then + { echo "configure: error: -# Get just the directory for the guile binary. -GUILE_BIN=`dirname ${GUILE_BIN}` + Guile does not appear to be installed. It must be installed and + its binary directory must be in your PATH." 1>&2; exit 1; } +fi @@ -4578,10 +4488,6 @@ else GNC_SHAREDIR='${datadir}/gnucash' fi -GNC_EXPANDED_LIBDIR=`gnc_recursively_expand_var "${GNC_LIBDIR}"` -GNC_EXPANDED_CONFIGDIR=`gnc_recursively_expand_var "${GNC_CONFIGDIR}"` -GNC_EXPANDED_SHAREDIR=`gnc_recursively_expand_var "${GNC_SHAREDIR}"` - GNC_MANDIR='${mandir}' @@ -4591,16 +4497,6 @@ GNC_MANDIR='${mandir}' - - - -# HACK : inserts the path to gnucash.pm, which is used in the -# reporting code and is defined in gnucash.h - -GNC_EXPANDED_PERLLIBPATH=`gnc_recursively_expand_var "${GNC_LIBDIR}"` - - - # Get the absolute top level directory. This is only used to add some # ./lib/* paths to PATH for local build binaries like gwrap. For all # other purposes, you should probably be using top_srcdir. configure @@ -4715,33 +4611,29 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile - Makefile.init - make-gnucash-patch - src/Makefile - src/engine/Makefile - src/guile/Makefile - src/guile/gnucash.h - src/guile/i18n.h - src/scm/Makefile - src/scm/bootstrap.scm - src/g-wrap/Makefile - src/gnome/Makefile - src/motif/Makefile - src/qt/Makefile - src/quotes/gnc-prices - src/register/Makefile +trap 'rm -fr `echo " po/Makefile.in src/register/gnome/Makefile - src/reports/Makefile - src/swig/Makefile - src/swig/perl5/Makefile - po/Makefile.in - po/extract-macros.perl - rpm/gnucash.spec + Makefile + Makefile.init + lib/ComboBox-1.33/Makefile lib/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile - lib/ComboBox-1.33/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 + rpm/Makefile + src/Makefile + src/engine/Makefile + src/g-wrap/Makefile + src/gnome/Makefile + src/guile/Makefile + src/motif/Makefile + src/qt/Makefile + src/quotes/Makefile + src/register/Makefile + src/reports/Makefile + src/scm/Makefile + src/swig/Makefile + src/swig/perl5/Makefile + config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then @@ -5130,7 +5017,6 @@ case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac chmod a+x ./gnucash - chmod a+x ./make-gnucash-patch exit 0 EOF chmod +x $CONFIG_STATUS diff --git a/configure.in b/configure.in index 8a9aa6b507..b942960f99 100644 --- a/configure.in +++ b/configure.in @@ -22,7 +22,7 @@ ### check for various programs, and stuff (do this first because later ### commands depend on them): -AC_INIT(src/guile/gnucash.h.in) +AC_INIT(src/guile/gnucash.h) AM_INIT_AUTOMAKE(gnucash,1.3.7) @@ -42,35 +42,6 @@ AC_HEADER_STDC AC_CHECK_FUNCS(stpcpy memcpy) - -### -------------------------------------------------------------------------- -### Fix up prefix for recursive expansion - -test "x$prefix" = xNONE && prefix=$ac_default_prefix - - -### -------------------------------------------------------------------------- -### Useful POSIX shell functions -### - -# This has to be a variable because we need to be able to export it, -# and POSIX shells AFAIK don't have "export -f" - -gnc_recursively_expand_var () { - - # Note that this function will only work for cases where any sign of - # a $ means that there is a variable reference that can be expanded. - # I.e. it would fail miserably for something like pattern='^bar.*$'. - - local expanded_var=${1} - while echo $expanded_var | grep '\$' > /dev/null - do - expanded_var=`eval echo ${expanded_var}` - done - echo $expanded_var -} - - ### -------------------------------------------------------------------------- ### Variables ### Set up all the initial variable values... @@ -113,16 +84,12 @@ AC_ARG_WITH( locale-dir, LOCALE_DIR="$with_locale_dir", LOCALE_DIR="$prefix/share/locale") -GNC_EXPANDED_LOCALE_DIR=`gnc_recursively_expand_var "${LOCALE_DIR}"` - AC_SUBST(LOCALE_DIR) -AC_SUBST(GNC_EXPANDED_LOCALE_DIR) # We need the variable below defined for the gettext checks to work ac_cv_header_locale_h=yes AC_CAN_USE_GNU_GETTEXT - ### -------------------------------------------------------------------------- ## qt-version of gnucash # The qt version of gnucash is far from doing anything usefull, so most people @@ -408,98 +375,73 @@ AC_SUBST(GNOME_TARGET) AC_SUBST(GNOME_STATIC_TARGET) +### -------------------------------------------------------------------------- +### G-wrap (libraries and executable) + +G_WRAP_COMPILE_ARGS="" +G_WRAP_LINK_ARGS="" + +# Find the configure script +AC_PATH_PROG(G_WRAP_CONFIG,g-wrap-config) + +if test -x "${G_WRAP_CONFIG}"; +then + # Find out what the g-wrap compile and link flags are. + G_WRAP_COMPILE_ARGS=`${G_WRAP_CONFIG} --c-compile-args guile` + G_WRAP_LINK_ARGS=`${G_WRAP_CONFIG} --c-static-link-args guile` +fi + +# Find the tool +AC_PATH_PROG(G_WRAP, g-wrap) + +if test x"${G_WRAP_COMPILE_ARGS}" = x || \ + test x"${G_WRAP_LINK_ARGS}" = x || \ + ! test -x "${G_WRAP}"; +then + AC_MSG_ERROR([ + + g-wrap does not appear to be installed. It must be installed and + its binary directory must be in your PATH. If you need to install + g-wrap, you can find it at ftp://ftp.gnucash.org/pub/g-wrap.]) +fi + +AC_SUBST(G_WRAP) +AC_SUBST(G_WRAP_CONFIG) +AC_SUBST(G_WRAP_COMPILE_ARGS) +AC_SUBST(G_WRAP_LINK_ARGS) + ### -------------------------------------------------------------------------- ### Guile (libraries and executable) -# Don't disable this. It's the only reliable way to detect guile's -# settings on current guile installs. If it doesn't work for you, then -# don't specify --with-guile-config. (RLB) +GUILE_COMPILE_ARGS="" +GUILE_LINK_ARGS="" -# In the long run, --with-guile should go away in favor of -# --with-guile-config. It might make sense to do this now. If you have -# guile 1.3 installed, but don't have guile-config, your install is -# most likely broken anyway, and should be fixed. (RLB) +AC_PATH_PROG(GUILE_CONFIG,guile-config) -# Let the user override the guile-config executable. -AC_ARG_WITH( guile-config, - [ --with-guile-config=executable which guile-config to use to find guile ], - AC_MSG_CHECKING([for guile-config]) - AC_MSG_RESULT([${with_guile_config}]) - GUILE_CONFIG="$with_guile_config" - LIBS="`${GUILE_CONFIG} link` ${LIBS}" - CFLAGS="$CFLAGS `${GUILE_CONFIG} compile`") - -if test x"$GUILE_CONFIG" = x; then - # Try to find a default guile-config - AC_PATH_PROG(GUILE_CONFIG,guile-config) +if test -x "${GUILE_CONFIG}"; +then + # Find out what the guile compile and link flags are. + GUILE_COMPILE_ARGS=`${GUILE_CONFIG} compile` + GUILE_LINK_ARGS=`${GUILE_CONFIG} link` fi -# Still allow the old method (for now). -AC_ARG_WITH( guile, - [ --with-guile=PATH specify where to look for guile includes and libs], - LIBS="-L$with_guile/lib ${LIBS}" CFLAGS="$CFLAGS -I$with_guile/include") +# Find the binary +AC_PATH_PROG(GUILE, guile) -# You can't have both... -if test x"$GUILE_CONFIG" != x && test x"$with_guile" != x ; then - AC_MSG_ERROR([${GUILE_CONFIG} ================ ${with_guile}]) - AC_MSG_ERROR([You cannot specify both --with-guile and --with-guile-config]) +if test x"${GUILE_COMPILE_ARGS}" = x || \ + test x"${GUILE_LINK_ARGS}" = x || \ + ! test -x "${GUILE}"; +then + AC_MSG_ERROR([ + + Guile does not appear to be installed. It must be installed and + its binary directory must be in your PATH.]) fi -if test x"$GUILE_CONFIG" = x; then - # If we didn't get GUILE_CONFIG, then do things the old, dumb way. - - # Have to use AC_TRY_LINK here because AC_CHECK_LIB caches the - # results, so one failure makes all further attempts fail. - - GNC_LIBS_SAFE=${LIBS} - AC_CACHE_CHECK([for guile], ac_cv_lib_guile, - for GNC_TEST_LIBS in "-lguile" "-lguile -ldl" "-lguile -lqthreads" \ - "-lguile -ltermcap" "-lguile -lqthreads -ltermcap" \ - "-lguile -lreadline -lncurses"; do - if test x"${GUILELIBS}" != x; then - ac_cv_lib_guile=${GUILELIBS} - break - else - LIBS="${GNC_TEST_LIBS} ${GNC_LIBS_SAFE}" - AC_TRY_LINK([#include], [gh_eval_file;], - GUILELIBS="${GNC_TEST_LIBS}") - fi - done) - - GUILELIBS=${ac_cv_lib_guile} -else - # We did find a suitable guile-config. Use that. - # and use any guile binary in that same directory. - GUILE_INC=`${GUILE_CONFIG} compile` - GUILELIBS=`${GUILE_CONFIG} link` -fi - -# Find the appropriate guile binary. -if test x"$GUILE_CONFIG" != x; then - AC_PATH_PROG(GUILE_BIN, guile,,`dirname ${GUILE_CONFIG}`) -fi - -# If that didn't work, try the --with-guile directory, if any. -if test x"$GUILE_BIN" = x && test x"$with_guile" != x; then - AC_PATH_PROG(GUILE_BIN, guile,,`${with_guile}/bin`) -fi - -# Final stab at locating a guile binary. -if test x"${GUILE_BIN}" = x; then - AC_PATH_PROG(GUILE_BIN,guile) -fi - -if test x"${GUILELIBS}" = x || test x"${GUILE_BIN}" = x; then - AC_MSG_ERROR([Cannot configure guile bits. Do you have guile 1.3 installed?]) -fi - -# Get just the directory for the guile binary. -GUILE_BIN=`dirname ${GUILE_BIN}` - +AC_SUBST(GUILE) AC_SUBST(GUILE_CONFIG) -AC_SUBST(GUILE_BIN) -AC_SUBST(GUILE_INC) -AC_SUBST(GUILELIBS) +AC_SUBST(GUILE_COMPILE_ARGS) +AC_SUBST(GUILE_LINK_ARGS) ### -------------------------------------------------------------------------- ### Plotutils @@ -541,10 +483,6 @@ else GNC_SHAREDIR='${datadir}/gnucash' fi -GNC_EXPANDED_LIBDIR=`gnc_recursively_expand_var "${GNC_LIBDIR}"` -GNC_EXPANDED_CONFIGDIR=`gnc_recursively_expand_var "${GNC_CONFIGDIR}"` -GNC_EXPANDED_SHAREDIR=`gnc_recursively_expand_var "${GNC_SHAREDIR}"` - GNC_MANDIR='${mandir}' AC_SUBST(GNC_DOCDIR) @@ -553,16 +491,6 @@ AC_SUBST(GNC_LIBDIR) AC_SUBST(GNC_CONFIGDIR) AC_SUBST(GNC_SHAREDIR) AC_SUBST(GNC_MANDIR) -AC_SUBST(GNC_EXPANDED_LIBDIR) -AC_SUBST(GNC_EXPANDED_CONFIGDIR) -AC_SUBST(GNC_EXPANDED_SHAREDIR) - -# HACK : inserts the path to gnucash.pm, which is used in the -# reporting code and is defined in gnucash.h - -GNC_EXPANDED_PERLLIBPATH=`gnc_recursively_expand_var "${GNC_LIBDIR}"` - -AC_SUBST(GNC_EXPANDED_PERLLIBPATH) # Get the absolute top level directory. This is only used to add some # ./lib/* paths to PATH for local build binaries like gwrap. For all @@ -577,32 +505,31 @@ AC_SUBST(ABSOLUTE_TOP_SRCDIR) AC_CONFIG_HEADER(config.h) -AC_OUTPUT(Makefile - Makefile.init - make-gnucash-patch - src/Makefile - src/engine/Makefile - src/guile/Makefile - src/guile/gnucash.h - src/guile/i18n.h - src/scm/Makefile - src/scm/bootstrap.scm - src/g-wrap/Makefile - src/gnome/Makefile - src/motif/Makefile - src/qt/Makefile - src/quotes/gnc-prices - src/register/Makefile - src/register/gnome/Makefile - src/reports/Makefile - src/swig/Makefile - src/swig/perl5/Makefile +AC_OUTPUT( + dnl # Makefiles po/Makefile.in - po/extract-macros.perl - rpm/gnucash.spec + src/register/gnome/Makefile + Makefile + Makefile.init + lib/ComboBox-1.33/Makefile lib/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile - lib/ComboBox-1.33/Makefile, - chmod a+x ./gnucash - chmod a+x ./make-gnucash-patch) + rpm/Makefile + src/Makefile + src/engine/Makefile + src/g-wrap/Makefile + src/gnome/Makefile + src/guile/Makefile + src/motif/Makefile + src/qt/Makefile + src/quotes/Makefile + src/register/Makefile + src/reports/Makefile + src/scm/Makefile + src/swig/Makefile + src/swig/perl5/Makefile + dnl # non-makefiles + dnl # Please read doc/build-system before adding *anything* here + , + chmod a+x ./gnucash) diff --git a/doc/build-system b/doc/build-system index 229cf6d78b..804ec68665 100644 --- a/doc/build-system +++ b/doc/build-system @@ -1,5 +1,66 @@ -*-text-*- +=========================================================================== +* Adding files to AC_OUTPUT in configure.in. + +Please do not add any non-makefiles to AC_OUTPUT unless you're +*absolutely* sure that it's safe and necessary to do so. If you're +not sure, then please use the "generation with sed by hand approach" +that we use for other non-makefiles like src/scm/bootstrap.scm. See +src/scm/bootstrap.scm.in and src/scm/Makefile.in for details. + +The reasoning behind this is that there are often variables that +autoconf uses and replaces via the @@ mechanism that are recursively +defined in terms of other variables. For example, @datadir@ might +expand into $prefix/share, which itself contains an unexpanded +variable. Unless the @datadir@ replacement is performed on a file +that will eventually be processed by make, there's no guarantee that +the variable will *ever* be fully expanded and then your code will +break. + +To get around this, we handle all non-makefiles (with a few notable +exceptions) manually with sed. For example, we have +src/scm/bootstrap.scm.in which is processed in src/scm/Makefile.in +according to the following rule: + + ## We borrow guile's convention and use @-...-@ as the substitution + ## brackets here, instead of the usual @...@. This prevents autoconf + ## from substituting the values directly into the left-hand sides of + ## the sed substitutions. *sigh* + bootstrap.scm: bootstrap.scm.in + rm -f $@.tmp + sed < $@.in > $@.tmp \ + -e 's:@-VERSION-@:${VERSION}:g' \ + -e 's:@-GNC_CONFIGDIR-@:${GNC_SHAREDIR}:g' \ + -e 's:@-GNC_SHAREDIR-@:${GNC_CONFIGDIR}:g' + chmod +x $@.tmp + mv $@.tmp $@ + +This approach guarantees that the variables referred to will be +properly expanded at the right times. + +The only non-Makefiles files that must be handled directly by +AC_OUTPUT are files that refer to variables that, when expanded, may +have makefile-hostile characters like '#' in them like +INCLUDE_LOCALE_H. These may need to be replaced directly in the +relevant file via AC_OUTPUT since going through a makefile would break +the makefile when it interprets the '#' as the beginning of a comment. +You'd have something like this: + + FOO = "#include " + +If you end up in a situation where you need to refer to both these +makefile-hostile variables and non-makefile hostile variables in the +same file, please restructure things (breaking the file up if +necessary) so that only the makefile hostile variables are in the +files being handled by AC_OUTPUT directly. + +=========================================================================== + +It is not safe to use $prefix in configure.in for anything other than +an unexpanded reference. If the user doesn't specify a --prefix, then +it'll be set to NONE until the end of the configure process. + =========================================================================== Deleting .SUFFIX rules diff --git a/lib/Makefile.in b/lib/Makefile.in index 0051eef572..22a80894dd 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -32,7 +32,7 @@ include @top_srcdir@/Makefile.init ###################################################################### # See Makefile.common for information about these variables. -CLEAN_SUBDIRS := ComboBox-1.33 Xbae-4.6.2-linas g-wrap +CLEAN_SUBDIRS := ComboBox-1.33 Xbae-4.6.2-linas ###################################################################### all: @@ -47,28 +47,11 @@ all: # definitions of *_SRCS, etc., but before the usage of *_OBJS. include @top_srcdir@/Makefile.common - -# Right now we only configure g-wrap once per make distclean, but we -# try and re-build every make. -g-wrap.configure: - (cd g-wrap && \ - ./configure --prefix=${ABSOLUTE_TOP_SRCDIR}/lib/g-wrap-install) - touch g-wrap.configure -DIST_TRASH += g-wrap.configure - -g-wrap-install: g-wrap.configure - (cd g-wrap && ${MAKE}) - (cd g-wrap && ${MAKE} install) -TRASH += g-wrap-install - -.PHONY: g-wrap-install - - -motif motif.static: g-wrap-install +motif motif.static: @cd ComboBox-1.33; $(MAKE) default @cd Xbae-4.6.2-linas; $(MAKE) default -gnome gnome.static: g-wrap-install +gnome gnome.static: qt qt.static: g-wrap-install diff --git a/make-gnucash-patch.in b/make-gnucash-patch.in index a14dc8400a..edeb7d426a 100644 --- a/make-gnucash-patch.in +++ b/make-gnucash-patch.in @@ -1,4 +1,4 @@ -#!@PERL@ +#!@-PERL-@ -w # # This perl script is used to make a patch for your GnuCash # development work. All patches should be submitted to the @@ -10,6 +10,7 @@ # # Author: Dave Peticolas +use strict; ########################################################### # This section must be configured for your own setup. # @@ -122,7 +123,7 @@ gnc-autogen.h src/g-wrap/gnc.c src/g-wrap/gnc.h src/g-wrap/gnc.html -src/guile/gnucash.h +src/guile/gnucash.c src/scm/bootstrap.scm src/swig/perl5/gnucash.engine_wrap.doc g-wrap.info @@ -144,12 +145,6 @@ gnucash.pot po/pseudo-source.c stamp-cat-id po/extract-macros.perl -include/messages_i18n.h -lib/g-wrap/aclocal.m4 -lib/g-wrap/conf-h.in -lib/g-wrap/stamp-h.in -lib/g-wrap/*/Makefile.in src/guile/i18n.h make-gnucash-patch -lib/g-wrap.configure rpm/gnucash.spec diff --git a/po/Makefile.in.in b/po/Makefile.in.in index d187e16e10..578b9ea5f8 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -1,3 +1,4 @@ +# -*-makefile-*- # Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995 Free Software Foundation, Inc. # @@ -18,6 +19,8 @@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ +PERL = @PERL@ + SHELL = /bin/sh @SET_MAKE@ @@ -91,7 +94,20 @@ $(PACKAGE).pot: pseudo-source.c $(POTFILES) || ( rm -f $(srcdir)/$(PACKAGE).pot \ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot ) -pseudo-source.c: $(top_srcdir)/src/messages_i18n.h +## We borrow guile's convention and use @-...-@ as the substitution +## brackets here, instead of the usual @...@. This prevents autoconf +## from substituting the values directly into the left-hand sides of +## the sed substitutions. *sigh* +extract-macros.perl: extract-macros.perl.in + rm -f $@.tmp + sed < $@.in > $@.tmp \ + -e 's:@-PACKAGE-@:${PACKAGE}:g' \ + -e 's:@-PERL-@:${PERL}:g' \ + -e 's:@-CPP-@:${CPP}:g' + chmod +x $@.tmp + mv $@.tmp $@ + +pseudo-source.c: $(top_srcdir)/src/messages_i18n.h extract-macros.perl perl -s extract-macros.perl $< > $@ install: install-exec install-data diff --git a/po/extract-macros.perl.in b/po/extract-macros.perl.in index 3847bee03e..27ff6351e0 100644 --- a/po/extract-macros.perl.in +++ b/po/extract-macros.perl.in @@ -1,4 +1,4 @@ -#! /usr/bin/perl -s +#!@-PERL-@ -w -s # # extract-macros.perl.in - Generate C file for input to xgettext # Copyright (C) 1999 Laurent Pélecq @@ -23,8 +23,8 @@ # Begin variables set by configure -$package_name="@PACKAGE@"; -$cpp="@CPP@"; +$package_name="@-PACKAGE-@"; +$cpp="@-CPP-@"; # End variables set by configure diff --git a/rpm/.cvsignore b/rpm/.cvsignore index 08d25bcc89..870fd940b8 100644 --- a/rpm/.cvsignore +++ b/rpm/.cvsignore @@ -1 +1,2 @@ +Makefile gnucash.spec diff --git a/rpm/Makefile.in b/rpm/Makefile.in new file mode 100644 index 0000000000..fe6f67df8b --- /dev/null +++ b/rpm/Makefile.in @@ -0,0 +1,46 @@ +# Makefile -- makefile for ./rpm +# Copyright (C) 1998 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +top_srcdir = @top_srcdir@ + +include ${top_srcdir}/Makefile.init + +###################################################################### +# See Makefile.common for information about these variables. +# +# CLEAN_SUBDIRS := +###################################################################### + +all: default + +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include @top_srcdir@/Makefile.common + +## We borrow guile's convention and use @-...-@ as the substitution +## brackets here, instead of the usual @...@. This prevents autoconf +## from substituting the values directly into the left-hand sides of +## the sed substitutions. *sigh* +gnucash.spec: gnucash.spec.in Makefile + rm -f $@.tmp + sed < $@.in > $@.tmp \ + -e 's:@-VERSION-@:${VERSION}:' + mv $@.tmp $@ + +default: gnucash.spec + +.PHONY: default diff --git a/rpm/gnucash.spec.in b/rpm/gnucash.spec.in index cff18cab6e..9921c31a2c 100644 --- a/rpm/gnucash.spec.in +++ b/rpm/gnucash.spec.in @@ -1,6 +1,6 @@ Name: gnucash Summary: GnuCash is an application to keep track of your finances. -Version: @VERSION@ +Version: @-VERSION-@ Release: 1 Copyright: Free Software Foundation Group: Applications/Finance diff --git a/src/Makefile.in b/src/Makefile.in index 8e4dd4340c..839bc2d116 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -37,7 +37,8 @@ CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH} ${CPPFLAGS} ###################################################################### # See Makefile.common for information about these variables. COMMON_SRCS := MultiLedger.c SplitLedger.c Destroy.c EuroUtils.c -CLEAN_SUBDIRS := engine gnome motif register g-wrap guile reports swig qt scm +CLEAN_SUBDIRS := engine gnome motif register g-wrap guile reports +CLEAN_SUBDIRS += swig qt scm quotes MOTIF_SRCS := FileDialog.c Refresh.c GNOME_SRCS := FileDialog.c Refresh.c ###################################################################### @@ -51,33 +52,36 @@ include @top_srcdir@/Makefile.common default: $(OBJS) motif motif.static: ${MOTIF_OBJS} + @cd quotes && $(MAKE) default @cd scm && $(MAKE) default @cd engine && $(MAKE) default @cd register && $(MAKE) motif @cd reports && $(MAKE) default @cd g-wrap && $(MAKE) motif - @cd swig && $(MAKE) motif @cd guile && $(MAKE) default + @cd swig && $(MAKE) motif @cd motif && $(MAKE) $@ gnome gnome.static: ${GNOME_OBJS} + @cd quotes && $(MAKE) default @cd scm && $(MAKE) default @cd engine && $(MAKE) default @cd register && $(MAKE) gnome @cd reports && $(MAKE) default @cd g-wrap && $(MAKE) gnome - @cd swig && $(MAKE) gnome @cd guile && $(MAKE) default + @cd swig && $(MAKE) gnome @cd gnome && $(MAKE) $@ qt qt.static: $(QT_OBJS) + @cd quotes && $(MAKE) default @cd scm && $(MAKE) default @cd engine && $(MAKE) default @cd register && $(MAKE) qt @cd reports && $(MAKE) default @cd g-wrap && $(MAKE) qt - @cd swig && $(MAKE) qt @cd guile && $(MAKE) default + @cd swig && $(MAKE) qt @cd qt && $(MAKE) $@ .PHONY: default qt qt.static gnome gnome.static motif motif.static all diff --git a/src/gnome/Makefile.in b/src/gnome/Makefile.in index 73184910d9..cb390e82c3 100644 --- a/src/gnome/Makefile.in +++ b/src/gnome/Makefile.in @@ -35,13 +35,13 @@ INCLPATH := -I.. \ -I@top_srcdir@/src/register/gnome # All the other GNOME CFLAGS are handled in Makefile.common now -CFLAGS = @CFLAGS@ ${INCLPATH} +CFLAGS = @CFLAGS@ ${INCLPATH} ${GUILE_COMPILE_ARGS} ${G_WRAP_COMPILE_ARGS} LDFLAGS = @LDFLAGS@ -GUILELIBS = @GUILELIBS@ -LIBS = -L$(prefix)/lib @LIBS@ \ - $(shell ${GNOME_CONFIG_BIN} --libs gnomeui print @GTK_XMHTML@) $(GUILELIBS) \ - @top_srcdir@/lib/g-wrap-install/lib/libgwrapguile.a +LIBS = -L$(prefix)/lib @LIBS@ \ + $(shell ${GNOME_CONFIG_BIN} --libs gnomeui print @GTK_XMHTML@) \ + $(GUILE_LINK_ARGS) \ + $(G_WRAP_LINK_ARGS) ifeq (${HAVE_PLOTUTILS},1) LIBS += @PLOTUTILS_LIBS@ diff --git a/src/quotes/.cvsignore b/src/quotes/.cvsignore index 6a95b3c244..161de890b7 100644 --- a/src/quotes/.cvsignore +++ b/src/quotes/.cvsignore @@ -1 +1,2 @@ +Makefile gnc-prices diff --git a/src/quotes/Makefile.in b/src/quotes/Makefile.in new file mode 100644 index 0000000000..2928183261 --- /dev/null +++ b/src/quotes/Makefile.in @@ -0,0 +1,48 @@ +# Makefile -- makefile for src/quotes +# Copyright (C) 2000 Rob Browning +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +top_srcdir = @top_srcdir@ + +include ${top_srcdir}/Makefile.init + +###################################################################### +# See Makefile.common for information about these variables. +# +# CLEAN_SUBDIRS := +###################################################################### + +all: default + +# This inclusion must come after the first target, and after the +# definitions of *_SRCS, etc., but before the usage of *_OBJS. +include @top_srcdir@/Makefile.common + +## We borrow guile's convention and use @-...-@ as the substitution +## brackets here, instead of the usual @...@. This prevents autoconf +## from substituting the values directly into the left-hand sides of +## the sed substitutions. +gnc-prices: gnc-prices.in + rm -f $@.tmp + sed < $@.in > $@.tmp \ + -e 's:@-PERL-@:${PERL}:g' \ + -e 's:@-GNC_LIBDIR-@:${GNC_LIBDIR}:g' + chmod +x $@.tmp + mv $@.tmp $@ + +default: gnc-prices + +.PHONY: default diff --git a/src/quotes/gnc-prices.in b/src/quotes/gnc-prices.in index a8a426c775..dd0a79230b 100644 --- a/src/quotes/gnc-prices.in +++ b/src/quotes/gnc-prices.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl -w +#!@-PERL-@ -w # # FILE: # gnc-prices @@ -13,7 +13,7 @@ # hack alert -- this pathname should *NOT* be hard-coded, nor should the # ones below it. -use lib '@GNC_EXPANDED_LIBDIR@'; +use lib '@-GNC_LIBDIR-@'; use Quote; use gnucash; diff --git a/src/scm/Makefile.in b/src/scm/Makefile.in index 7835577d17..a8f8a258d2 100644 --- a/src/scm/Makefile.in +++ b/src/scm/Makefile.in @@ -31,7 +31,18 @@ all: default # definitions of *_SRCS, etc., but before the usage of *_OBJS. include @top_srcdir@/Makefile.common -default: - @echo Nothing to do. +## We borrow guile's convention and use @-...-@ as the substitution +## brackets here, instead of the usual @...@. This prevents autoconf +## from substituting the values directly into the left-hand sides of +## the sed substitutions. *sigh* +bootstrap.scm: bootstrap.scm.in Makefile + rm -f $@.tmp + sed < $@.in > $@.tmp \ + -e 's:@-VERSION-@:${VERSION}:' \ + -e 's:@-GNC_CONFIGDIR-@:${GNC_CONFIGDIR}:' \ + -e 's:@-GNC_SHAREDIR-@:${GNC_SHAREDIR}:' + mv $@.tmp $@ + +default: bootstrap.scm .PHONY: default diff --git a/src/scm/bootstrap.scm.in b/src/scm/bootstrap.scm.in index 7a17c18661..33364ef6cb 100644 --- a/src/scm/bootstrap.scm.in +++ b/src/scm/bootstrap.scm.in @@ -74,9 +74,9 @@ (primitive-load boot-file))) ;; Automatically generated defaults -(define gnc:_config-dir-default_ "@GNC_EXPANDED_CONFIGDIR@") -(define gnc:_share-dir-default_ "@GNC_EXPANDED_SHAREDIR@") -(define gnc:version "@VERSION@") +(define gnc:_config-dir-default_ "@-GNC_CONFIGDIR-@") +(define gnc:_share-dir-default_ "@-GNC_SHAREDIR-@") +(define gnc:version "@-VERSION-@") ;; These will be converted to config vars later (see prefs.scm) (define gnc:*load-path* #f)