From 93ee15bd0a8b257b32cb1ebd1bd964da580a78f4 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 13 Jan 1999 09:11:02 +0000 Subject: [PATCH] merge in branch "multi" with patches from multiple authors git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@1619 57a11ea4-9604-0410-9ed3-97b8803252fd --- Makefile.in | 8 +- Makefile.init.in | 6 ++ README | 3 +- aclocal.m4 | 50 +++++++++++++ config.h.in | 3 + configure | 145 +++++++------------------------------ configure.in | 131 +++++++++++++++++---------------- src/Makefile.in | 2 +- src/engine/Makefile.in | 2 +- src/engine/util.h | 6 +- src/gnome/Makefile.in | 2 +- src/gnome/top-level.c | 3 +- src/register/Makefile.in | 2 +- src/swig/guile/Makefile.in | 8 +- src/swig/perl5/Makefile.in | 15 ++-- 15 files changed, 180 insertions(+), 206 deletions(-) create mode 100644 aclocal.m4 diff --git a/Makefile.in b/Makefile.in index afb79fa4dc..dde8df3386 100644 --- a/Makefile.in +++ b/Makefile.in @@ -83,7 +83,7 @@ DIST_TRASH += gnucash.motif gnucash.motif.static DIST_TRASH += gnucash.gnome gnucash.gnome.static gnucash.qt gnucash-shell DIST_TRASH += config.cache config.log config.status config.h -tagsfiles := $(find -name "*.[ch]") +tagsfiles := $(shell find . -name "*.[ch]" -print) TAGS: ${tagsfiles} etags ${tagsfiles} @@ -93,7 +93,7 @@ install-bin: gnucash.${FLAVOR} (cd ${GNC_BINDIR} && ln -sf gnucash.${FLAVOR} gnucash) install: - @mkdir -p ${GNC_BINDIR} + $(INSTALL) -d ${GNC_BINDIR} ${GNC_LIBDIR} ${GNC_DOCDIR} ${GNC_SHAREDIR} # Put these in the opposite order of precedence. Final bin/gnucash link will # point to the last one that exists... @@ -115,12 +115,10 @@ install: ] $(INSTALL) src/quotes/gnc-prices ${GNC_BINDIR} - @mkdir -p ${GNC_LIBDIR} $(INSTALL_DATA) src/swig/perl5/gnucash.pm ${GNC_LIBDIR} $(INSTALL_DATA) src/swig/perl5/gnucash.so ${GNC_LIBDIR} $(INSTALL_DATA) src/quotes/Quote.pm ${GNC_LIBDIR} - @mkdir -p ${GNC_DOCDIR} $(INSTALL_DATA) README* ${GNC_DOCDIR} $(INSTALL_DATA) TODO ${GNC_DOCDIR} $(INSTALL_DATA) CHANGES ${GNC_DOCDIR} @@ -129,8 +127,6 @@ install: # $(INSTALL_DATA) toolbar/*.xpm $(prefix)/toolbar # Share directory - @mkdir -p ${GNC_SHAREDIR} - # Try to do this in a platform independent way... # Directories for dir in `find share/scm/ -type d`; do \ diff --git a/Makefile.init.in b/Makefile.init.in index 0d0ea39982..8cb7c3ed7d 100644 --- a/Makefile.init.in +++ b/Makefile.init.in @@ -15,9 +15,14 @@ sysconfdir=@sysconfdir@ includedir=@includedir@ CC = @CC@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ INSTALL = @INSTALL@ RANLIB = @RANLIB@ INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +SWIG = @SWIG@ +PERL = @PERL@ CPU = @target_cpu@ @@ -31,3 +36,4 @@ GNC_CONFIGDIR=@GNC_CONFIGDIR@ GNC_SHAREDIR=@GNC_SHAREDIR@ HAVE_PLOTUTILS=@HAVE_PLOTUTILS@ +LIBNANA = @LIBNANA@ # -lnana, if defined diff --git a/README b/README index cf9b589f55..20ee3a34dc 100644 --- a/README +++ b/README @@ -401,7 +401,7 @@ Rob Browning abused everyone for not using perl, Fixes & Patches: ---------------- -Andrew Arensburger for FreeBSD patches +Andrew Arensburger for FreeBSD & other patches Fred Baube for attempted Java port/MoneyDance Christopher B. Browne for perl stock scripts George Chen for MS-Money QIF's & fixes @@ -428,6 +428,7 @@ Gavin Porter for euro style dates Ron Record for SCO Unixware & OpenServer binaries Dirk Schoenberger for Qt/KDE port Christopher Seawood for XbaeMatrix core dump +Mike Simons misc configure.in patches Richard Skelton for Solaris cleanup Henning Spruth for German text & euro date rework Ken Yamaguchi QIF import fixes; MYM import diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000000..e9662caa69 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,50 @@ +dnl AC_CHECK_X_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, OTHER-X-LIBRARIES [, OTHER-LIBRARIES]]]]) +dnl This macro is just a variation on AC_CHECK_LIB, but for X-related +dnl libraries (X is just a tad delicate). OTHER-X-LIBRARIES is a list +dnl of other X-related libraries that might be required to link with +dnl LIBRARY (e.g., -lXpm). OTHER-LIBRARIES is a list of other (non-X) +dnl libraries that might be required (e.g., -lm). +AC_DEFUN(AC_CHECK_X_LIB, +[AC_REQUIRE([AC_PATH_XTRA])dnl +AC_MSG_CHECKING([for $2 in -l$1]) +dnl Use a cache variable name containing both the library and function name, +dnl because the test really is for library $1 defining function $2, not +dnl just for library $1. Separate tests with the same $1 and different $2s +dnl may have different results. +ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, +[ac_save_LIBS="$LIBS" +LIBS="$X_LIBS -l$1 $5 $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $6 $LIBS" +AC_TRY_LINK(dnl +ifelse([$2], [main], , dnl Avoid conflicting decl of main. +[/* Override any gcc2 internal prototype to avoid an error. */ +]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus +extern "C" +#endif +])dnl +[/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $2(); +]), + [$2()], + eval "ac_cv_lib_$ac_lib_var=yes", + eval "ac_cv_lib_$ac_lib_var=no") +LIBS="$ac_save_LIBS" +])dnl +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + AC_MSG_RESULT(yes) + ifelse([$3], , +[changequote(, )dnl + ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +changequote([, ])dnl + AC_DEFINE_UNQUOTED($ac_tr_lib) + X_PRE_LIBS="-l$1 $X_PRE_LIBS" +], [$3]) +else + AC_MSG_RESULT(no) +ifelse([$4], , , [$4 +])dnl +fi +]) diff --git a/config.h.in b/config.h.in index 28fa4770db..016e945b85 100644 --- a/config.h.in +++ b/config.h.in @@ -35,6 +35,9 @@ /* Enable debugging stuff */ #define USE_DEBUG +/* Turn on nana assertion checking */ +#undef HAVE_NANA_H + /* Enable quickfill in register window */ #define USE_QUICKFILL diff --git a/configure b/configure index 8899067526..ed04dd4452 100755 --- a/configure +++ b/configure @@ -2289,24 +2289,15 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then MOTIF_LIBS="-lXmHTML $MOTIF_LIBS" else echo "$ac_t""no" 1>&6 -MOTIF_LIBS="-lXmHTML $MOTIF_LIBS" - XMHTML_TARGET=default - XMHTML_INC=/lib/XmHTML-1.1.0/src - LIBS="-L$srcdir/lib/XmHTML-1.1.0 $LIBS" fi -### Guile - -# Set GUILELIBS according to the set of libraries needed to link -# with guile. - # 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:2310: checking for readline in -lreadline" >&5 +echo "configure:2301: 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 @@ -2314,7 +2305,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2353,140 +2344,54 @@ else fi +### Guile +# Set GUILELIBS according to the set of libraries needed to link +# with guile. + # Have to use AC_TRY_LINK here because AC_CHECK_LIB caches the # results, so one failure makes all further attempts fail. echo $ac_n "checking for guile""... $ac_c" 1>&6 -echo "configure:2361: checking for guile" >&5 +echo "configure:2356: checking for guile" >&5 GNC_LIBS_SAFE=${LIBS} - -GNC_TEST_LIBS="-lguile" -LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" -cat > conftest.$ac_ext <&6 + 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:2375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}" + GUILELIBS="${GNC_TEST_LIBS}" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* -LIBS="${GNC_LIBS_SAFE}" + fi +done -if test x"${GUILELIBS}" = x; -then - GNC_TEST_LIBS="-lguile -ldl" - LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" - cat > conftest.$ac_ext < -int main() { -gh_eval_file; -; return 0; } -EOF -if { (eval echo configure:2397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - LIBS="${GNC_LIBS_SAFE}" -fi - -if test x"${GUILELIBS}" = x; -then - GNC_TEST_LIBS="-lguile -lqthreads" - LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" - cat > conftest.$ac_ext < -int main() { -gh_eval_file; -; return 0; } -EOF -if { (eval echo configure:2420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - LIBS="${GNC_LIBS_SAFE}" -fi - -if test x"${GUILELIBS}" = x; -then - GNC_TEST_LIBS="-lguile -ltermcap" - LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" - cat > conftest.$ac_ext < -int main() { -gh_eval_file; -; return 0; } -EOF -if { (eval echo configure:2443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - LIBS="${GNC_LIBS_SAFE}" -fi - -if test x"${GUILELIBS}" = x; -then - GNC_TEST_LIBS="-lguile -lqthreads -ltermcap" - LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" - cat > conftest.$ac_ext < -int main() { -gh_eval_file; -; return 0; } -EOF -if { (eval echo configure:2466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then - rm -rf conftest* - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}" -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 -fi -rm -f conftest* - LIBS="${GNC_LIBS_SAFE}" -fi - -if test x"${GUILELIBS}" = x; -then +if test x"${GUILELIBS}" = x; then { echo "configure: error: Cannot link with guile. Do you have guile 1.3 installed?" 1>&2; exit 1; } fi -echo "$ac_t""yes" 1>&6 - ### Plotutils echo $ac_n "checking for openpl in -lplot""... $ac_c" 1>&6 -echo "configure:2490: checking for openpl in -lplot" >&5 +echo "configure:2395: checking for openpl in -lplot" >&5 ac_lib_var=`echo plot'_'openpl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2494,7 +2399,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lplot $X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS -lXaw $X_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/configure.in b/configure.in index a1875c1733..9771e8336e 100644 --- a/configure.in +++ b/configure.in @@ -10,6 +10,27 @@ AC_ISC_POSIX AC_C_BIGENDIAN AC_PROG_MAKE_SET +# Check for 'swig' +AC_PATH_PROG(SWIG,swig,no) # Sets @SWIG@ +if test x"$SWIG" = xno; then + AC_MSG_ERROR(Can't find swig.) +fi + +## Check for Perl +AC_CHECK_PROGS(PERL,perl5 perl) # Sets @PERL@ + +# Make sure Perl was found +if test x"$PERL" = x; then + AC_MSG_ERROR(Can't find Perl.) +fi + +# Make sure it's version 5 or later +if "$PERL" -e 'exit 1 if $] < 5.0'; then + : +else + AC_MSG_ERROR(You need Perl version 5 or later.) +fi + ### Set up all the initial variable values... CFLAGS="${CFLAGS} -O2 -Wall" @@ -28,7 +49,15 @@ LIBS="$LIBS -lm" AC_PATH_X AC_PATH_XTRA +# This is how to use the variables set by AC_PATH_XTRA: +# cc @X_CFLAGS@ -c -o foo.o foo.c +# cc @X_LIBS@ (-lfoo...) @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@ +# (But see also the test for Motif libraries, below.) +# (Perhaps X_LIBS should have been called X_LDFLAGS.) + +# XXX - Not all programs need all of these, surely. X_LIBS="$X_LIBS -lXext -lXmu -lXt -lX11" +# XXX - Ask Motif what it wants MOTIF_LIBS="-lXm" # Let the user specify gnome paths: @@ -43,13 +72,20 @@ AC_ARG_WITH( imlib, [ --with-imlib=PATH specify where to look for imlib includes and libs], X_LIBS="${X_LIBS} -L$with_imlib/lib" X_CFLAGS="$X_CFLAGS -I$with_imlib/include" ) -# Let the user specify guile paths: -AC_ARG_WITH( guile, - [ --with-guile=PATH specify where to look for guile includes and libs], - GUILE_INC="-I$with_guile/include" - GUILELIBS="-L$with_guile/lib -lguile" - LIBS="${LIBS} $GUILELIBS" - ) +# Let the user specify a guile-config executable. +# XXX My guile-1.3 doesn't have a guile-config, but maybe I'm +# downlevel... are there guile 1.3 .rpms or .debs that have +# guilec-config in them? if so we need to publish them. +# AC_ARG_WITH( guile-config, +# [ --with-guile-config=executable +# which guile-config to use to find guile ], +# GUILE_CONFIG="$with_guile_config") +# AC_PATH_PROG(GUILE_CONFIG,guile-config,no) +# if test x"$GUILE_CONFIG" = xno; then +# AC_MSG_ERROR([Can't find guile-config. +# Install Guile 1.3, then specify the path to guile-config with +# --with-guile-config=...]) +# fi # ******************************************* # * figure out the configure options: @@ -139,6 +175,17 @@ AC_CHECK_LIB(jpeg, jpeg_read_scanlines, AC_CHECK_LIB(png, png_read_image, AC_DEFINE(HAVE_PNG,1) LIBS="-lpng $LIBS") +## Nana +# XXX - There should probably be a --without-nana option (e.g., for +# someone who happens to have it installed on his local machine, but +# is building GnuCash for people who might not have it). + +# See if the header file can be found. +AC_CHECK_HEADERS(nana.h) +AC_CHECK_LIB(nana,L_buffer_create, + LIBNANA="-lnana") +AC_SUBST(LIBNANA) + # This should be done in the OTHER_LIBRARIES argument to AC_CHECK_LIB # if it's actually needed and Makefile.in's should be using # X_PRE_LIBS, X_LIBS, and X_EXTRA_LIBS, rather than relying on LIBS. @@ -152,82 +199,44 @@ AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage, # this is ugly, there must be a nicer way of setting this up ... AC_CHECK_LIB(XmHTML, XmHTMLTextScrollToLine, MOTIF_LIBS="-lXmHTML $MOTIF_LIBS", - MOTIF_LIBS="-lXmHTML $MOTIF_LIBS" - XMHTML_TARGET=default - XMHTML_INC=/lib/XmHTML-1.1.0/src - LIBS="-L$srcdir/lib/XmHTML-1.1.0 $LIBS" , + , $X_PRE_LIBS $MOTIF_LIBS $X_EXTRA_LIBS $X_LIBS) AC_SUBST(XMHTML_TARGET) AC_SUBST(XMHTML_INC) -### Guile +# If readline exists, just assume that guile needs it. It probably does. +AC_CHECK_LIB(readline, readline) +### Guile # Set GUILELIBS according to the set of libraries needed to link # with guile. -# If readline exists, just assume that guile needs it. It probably does. -AC_CHECK_LIB(readline, readline) - # Have to use AC_TRY_LINK here because AC_CHECK_LIB caches the # results, so one failure makes all further attempts fail. AC_MSG_CHECKING([for guile]) GNC_LIBS_SAFE=${LIBS} - -GNC_TEST_LIBS="-lguile" -LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" -AC_TRY_LINK([#include], [gh_eval_file;], - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}") -LIBS="${GNC_LIBS_SAFE}" +for GNC_TEST_LIBS in "-lguile" "-lguile -ldl" "-lguile -lqthreads" \ + "-lguile -ltermcap" "-lguile -lqthreads -ltermcap"; do + if test x"${GUILELIBS}" != x; then + AC_MSG_RESULT([found in ${GUILELIBS}]) + break + else + LIBS="${GNC_TEST_LIBS} ${GNC_LIBS_SAFE}" + AC_TRY_LINK([#include], [gh_eval_file;], + GUILELIBS="${GNC_TEST_LIBS}") + fi +done -if test x"${GUILELIBS}" = x; -then - GNC_TEST_LIBS="-lguile -ldl" - LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" - AC_TRY_LINK([#include], [gh_eval_file;], - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}") - LIBS="${GNC_LIBS_SAFE}" -fi - -if test x"${GUILELIBS}" = x; -then - GNC_TEST_LIBS="-lguile -lqthreads" - LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" - AC_TRY_LINK([#include], [gh_eval_file;], - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}") - LIBS="${GNC_LIBS_SAFE}" -fi - -if test x"${GUILELIBS}" = x; -then - GNC_TEST_LIBS="-lguile -ltermcap" - LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" - AC_TRY_LINK([#include], [gh_eval_file;], - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}") - LIBS="${GNC_LIBS_SAFE}" -fi - -if test x"${GUILELIBS}" = x; -then - GNC_TEST_LIBS="-lguile -lqthreads -ltermcap" - LIBS="${GNC_LIBS_HELPER} ${GNC_TEST_LIBS} ${LIBS}" - AC_TRY_LINK([#include], [gh_eval_file;], - GUILELIBS="$GUILELIBS ${GNC_TEST_LIBS}") - LIBS="${GNC_LIBS_SAFE}" -fi - -if test x"${GUILELIBS}" = x; -then +if test x"${GUILELIBS}" = x; then AC_MSG_ERROR(Cannot link with guile. Do you have guile 1.3 installed?) fi AC_SUBST(GUILE_INC) AC_SUBST(GUILELIBS) -AC_MSG_RESULT([yes]) - ### Plotutils AC_CHECK_LIB(plot, openpl, diff --git a/src/Makefile.in b/src/Makefile.in index 9665123cb4..efc62ea65c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -24,7 +24,7 @@ include @top_srcdir@/Makefile.init INCLPATH = -I.. -I./engine -I./register -Ireports -I@srcdir@/../include -I@prefix@/include -CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH} +CFLAGS = @CFLAGS@ @X_CFLAGS@ ${INCLPATH} ${CPPFLAGS} ###################################################################### diff --git a/src/engine/Makefile.in b/src/engine/Makefile.in index d48fca7547..c57670c3c1 100644 --- a/src/engine/Makefile.in +++ b/src/engine/Makefile.in @@ -33,7 +33,7 @@ CFLAGS = @CFLAGS@ ${INCLPATH} -fpic ###################################################################### # See Makefile.common for information about these variables. INDEP_SRCS := AccInfo.c Account.c DateUtils.c FileIO.c Group.c \ - LedgerUtils.c QIFIO.c Query.c Scrub.c Session.c \ + LedgerUtils.c QIFIO.c Query.c Queue.c Scrub.c Session.c \ Transaction.c TransLog.c date.c util.c ###################################################################### diff --git a/src/engine/util.h b/src/engine/util.h index fee33f4f2c..70d550d00f 100644 --- a/src/engine/util.h +++ b/src/engine/util.h @@ -35,7 +35,7 @@ /* The debuging macros enable the setting of trace messages */ #include -#if HAVE_NANA +#if HAVE_NANA_H #include /* override standard system assert with nana I assertion */ @@ -43,11 +43,11 @@ #undef assert #endif #define assert I -#else /* HAVE_NANA */ +#else /* HAVE_NANA_H */ /* if there is no nana, use he system assert and mush up LG */ #include #define LG(condition,args...) if (condition) fprintf(stderr, ##args) -#endif /* HAVE_NANA */ +#endif /* HAVE_NANA_H */ #define MOD_ENGINE 1 #define MOD_IO 2 diff --git a/src/gnome/Makefile.in b/src/gnome/Makefile.in index 1d4846c2e0..76d9a93089 100644 --- a/src/gnome/Makefile.in +++ b/src/gnome/Makefile.in @@ -42,7 +42,7 @@ GUILELIBS = @GUILELIBS@ LIBS = -L$(prefix)/lib @X_PRE_LIBS@ @X_LIBS@ \ $(shell @GNOME_CONFIG_BIN@ --libs gtk) @X_EXTRA_LIBS@ -lgnomeui \ $(shell @GNOME_CONFIG_BIN@ --libs gnome gnomeui ) \ - $(GUILELIBS) -lnana @LIBS@ # -lintl + $(GUILELIBS) ${LIBNANA} @LIBS@ # -lintl GNOMELIBS = @GNOMELIBS@ GTKLIBS = @GTKLIBS@ diff --git a/src/gnome/top-level.c b/src/gnome/top-level.c index 3cbaae6af7..d479c12cb6 100644 --- a/src/gnome/top-level.c +++ b/src/gnome/top-level.c @@ -75,13 +75,14 @@ gnucash_lowlev_app_init() { int fake_argc = 1; char *fake_argv[] = {"gnucash"}; + int fake_index; /* We're going to have to have other ways to handle X and GUI specific args... For now, use fake_argv and fake_argc... */ - gnome_init("GnuCash", NULL, fake_argc, fake_argv); + gnome_init("GnuCash", NULL, fake_argc, fake_argv, 0, &fake_index); app = gnome_app_new ( "gnucash", "GnuCash" ); { diff --git a/src/register/Makefile.in b/src/register/Makefile.in index 576bc2ecb5..0e62c68e02 100644 --- a/src/register/Makefile.in +++ b/src/register/Makefile.in @@ -31,7 +31,7 @@ INCLPATH = -I@srcdir@/../.. \ -I@prefix@/include -CFLAGS := @CFLAGS@ @X_CFLAGS@ -DCELL_WIDGETS=1 ${INCLPATH} +CFLAGS := @CFLAGS@ @X_CFLAGS@ -DCELL_WIDGETS=1 ${INCLPATH} ${CPPFLAGS} ###################################################################### # See Makefile.common for information about these variables. diff --git a/src/swig/guile/Makefile.in b/src/swig/guile/Makefile.in index ce0519cd50..71fc5f0003 100644 --- a/src/swig/guile/Makefile.in +++ b/src/swig/guile/Makefile.in @@ -86,13 +86,13 @@ gnucash.all.i: guile_swig_annotations.i ${SWIG_ALL_HDRS} TRASH += gnucash.all.i gnucash.all_wrap.doc gnucash-engine-guile_wrap.c: gnucash.engine.i - swig ${SWIG_FLAGS} -o $@ $< - perl -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@ + ${SWIG} ${SWIG_FLAGS} -o $@ $< + ${PERL} -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@ TRASH += gnucash-engine-guile_wrap.c gnucash-all-guile_wrap.c: gnucash.all.i - swig ${SWIG_FLAGS} -o $@ $< - perl -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@ + ${SWIG} ${SWIG_FLAGS} -o $@ $< + ${PERL} -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@ TRASH += gnucash-all-guile_wrap.c # Local Variables: diff --git a/src/swig/perl5/Makefile.in b/src/swig/perl5/Makefile.in index eefc5380c3..4c504cb90e 100644 --- a/src/swig/perl5/Makefile.in +++ b/src/swig/perl5/Makefile.in @@ -19,6 +19,8 @@ include @top_srcdir@/Makefile.init +exec_prefix = @exec_prefix@ + INCLPATH = \ -I. \ -I@top_srcdir@/ \ @@ -26,12 +28,13 @@ INCLPATH = \ -I@top_srcdir@/src/swig\ -I@top_srcdir@/src/engine \ -I@top_srcdir@/include \ - @PERLINCL@ \ + @PERLINCL@ \ -I$(prefix)/include # set -Dbool=char because the perl headers need this # use -fpic so that we can create loadable module CFLAGS = @CFLAGS@ ${INCLPATH} -Dbool=char -fpic -Wno-unused +LDFLAGS = @LDFLAGS@ SWIG_FLAGS := -stat -perl5 \ -I.. -I@top_srcdir@/src/engine @@ -50,7 +53,7 @@ include @top_srcdir@/Makefile.common default: gnucash.so gnucash.so: ${OBJS} ../../engine/libengine.a - gcc -shared ${OBJS} ../../engine/libengine.a -lnana -o gnucash.so + gcc -shared ${OBJS} ../../engine/libengine.a -L@libdir@ -lnana -o gnucash.so SWIG_FILTER := %P.h %/util.h SWIG_ENGINE_HDRS := \ @@ -89,13 +92,13 @@ TRASH += gnucash.engine.i gnucash.engine_wrap.doc # TRASH += gnucash.all.i gnucash.all_wrap.doc gnucash-engine-perl5_wrap.c: gnucash.engine.i - swig ${SWIG_FLAGS} -o $@ $< -# perl -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@ + ${SWIG} ${SWIG_FLAGS} -o $@ $< +# ${PERL} -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@ TRASH += gnucash-engine-perl5_wrap.c # gnucash-all-guile_wrap.c: gnucash.all.i -# swig ${SWIG_FLAGS} -o $@ $< -# perl -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@ +# ${SWIG} ${SWIG_FLAGS} -o $@ $< +# ${PERL} -pi -e 's/^void gnucash\(\)/void gnucash_swig_init\(\)/' $@ # TRASH += gnucash-all-guile_wrap.c # Local Variables: