diff --git a/configure.ac b/configure.ac index a1a150319e..b7854ae503 100644 --- a/configure.ac +++ b/configure.ac @@ -127,14 +127,14 @@ AC_ARG_ENABLE(gtkmm, AS_IF([test x${enable_GTKMM} = "xtrue"], [ - GTKMM_DIR=gtkmm # We require gtkmm, of course PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.20) # and also the c++ compiler AC_PROG_CXXCPP AC_PROG_CXX + _COMPONENTS="$_COMPONENTS gtkmm" ]) -AC_SUBST(GTKMM_DIR) +AM_CONDITIONAL([WITH_GTKMM], [test x${enable_GTKMM} = "xtrue"]) # This section must come before AC_PROG_LIBTOOL because libtool # must know about the c++ compiler. ###-------------------------------------------------------- @@ -530,7 +530,7 @@ then GNC_DBD_DIR="") LIBDBI_LIBS=-ldbi - DBI_DIR=dbi + _COMPONENTS="$_COMPONENTS dbi" else AC_MSG_ERROR([ @@ -543,9 +543,9 @@ then fi fi AC_SUBST(LIBDBI_LIBS) -AC_SUBST(DBI_DIR) AC_SUBST(GNC_DBD_DIR) AM_CONDITIONAL(CUSTOM_GNC_DBD_DIR, [test x"$GNC_DBD_DIR" != "x"]) +AM_CONDITIONAL(WITH_DBI, [test "x$ac_cv_header_dbi_dbi_h" != xno]) ### -------------------------------------------------------------------------- ### Variables @@ -618,12 +618,9 @@ case "${want_ofx}" in esac if test x${want_ofx} != xno ; then PKG_CHECK_MODULES(LIBOFX, libofx, [want_ofx="yes"], [want_ofx="no"]) + _COMPONENTS="$_COMPONENTS ofx" fi -if test "x${want_ofx}" != xno ; then - OFX_DIR=ofx -fi -AC_SUBST(OFX_DIR) - +AM_CONDITIONAL([WITH_OFX], [test "x${want_ofx}" != xno]) ### -------------------------------------------------------------------------- ### MT940 AC_ARG_ENABLE( mt940, @@ -651,8 +648,8 @@ then # We require aqbanking-4.0.0 because our implementation doesn't run # with earlier version anymore. (libaqbanking ships with a pkgconfig # file since its version 1.6.1.) - PKG_CHECK_MODULES(AQBANKING, aqbanking >= 4.0.0 gwenhywfar, [AQBANKING_DIR=aqbanking], [ - AC_MSG_ERROR([Could not find aqbanking >= 4.0.0. If you use --enable-aqbanking, you *have* to have aqbanking installed!]) + PKG_CHECK_MODULES(AQBANKING, aqbanking >= 4.0.0 gwenhywfar, , [ + AC_MSG_ERROR([Could not find aqbanking >= 4.0.0. If you use --enable-aqbanking, you MUST have aqbanking installed!]) ]) # For libgwenhywfar > 3.99.20, look for its library gwengui-gtk2. PKG_CHECK_MODULES([GWENGUI_GTK2], [gwengui-gtk2 gwenhywfar], [has_gwengui_gtk2=1], [has_gwengui_gtk2=0]) @@ -666,8 +663,9 @@ then AS_SCRUB_INCLUDE(AQBANKING_CFLAGS) AC_SUBST(AQBANKING_LIBS) AC_SUBST(AQBANKING_CFLAGS) + _COMPONENTS="$_COMPONENTS aqbanking" fi -AC_SUBST(AQBANKING_DIR) +AM_CONDITIONAL([WITH_AQBANKING], [test x${want_aqbanking} = xyes]) AC_ARG_WITH(qt3_wizard_package, [AS_HELP_STRING([--with-qt3-wizard-package=name],[name of package containing qt3-wizard (aqbanking)])], @@ -1092,14 +1090,11 @@ AC_ARG_ENABLE(python, ) if test x${enable_python} = "xtrue" then - PYTHON_DIR=python - PYTHON_BINDINGS_DIR=python-bindings AM_PATH_PYTHON(2.4) AC_PYTHON_DEVEL(>= '2.4') SWIG_PYTHON + _COMPONENTS="$_COMPONENTS python" fi -AC_SUBST(PYTHON_DIR) -AC_SUBST(PYTHON_BINDINGS_DIR) AM_CONDITIONAL(WITH_PYTHON, [test x${enable_python} = xtrue]) AC_ARG_ENABLE(python-bindings, @@ -1365,28 +1360,13 @@ AC_CONFIG_FILES( ) AC_OUTPUT -if test x${DBI_DIR} != x; then - components="$components dbi" -fi -if test x${OFX_DIR} != x; then - components="$components ofx" -fi -if test x${AQBANKING_DIR} != x; then - components="$components $AQBANKING_DIR" -fi -if test x${PYTHON_DIR} != x; then - components="$components python" -fi -if test x${GTKMM_DIR} != x; then - components="${components} ${GTKMM_DIR}" -fi AC_MSG_RESULT([ Options detected/selected ------------------------- gnucash version ...... : $VERSION Build for host ....... : $host - Optional components... : $components + Optional components... : $_COMPONENTS Extra Warnings ....... : $warnFLAGS CPPFLAGS ............. : $CPPFLAGS CFLAGS ............... : $CFLAGS diff --git a/lib/Makefile.am b/lib/Makefile.am index 118534962f..7a52a6133b 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,5 +1,4 @@ SUBDIRS = libc guile-www stf -DIST_SUBDIRS = libc guile-www stf EXTRA_DIST = README diff --git a/src/Makefile.am b/src/Makefile.am index ac412a328a..76ea784082 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,8 @@ # These directories do not contain any gtk dependencies +if WITH_PYTHON + PYTHON_DIR = python +endif + NONGUI_SUBDIRS = \ libqof \ debug \ @@ -37,7 +41,6 @@ GUI_SUBDIRS = \ # Need to include '.' in order to build swig-runtime.h SUBDIRS = . $(NONGUI_SUBDIRS) $(ALMOST_NONGUI_SUBDIRS) $(GUI_SUBDIRS) -DIST_SUBDIRS = $(SUBDIRS) python noinst_HEADERS = \ swig-runtime.h diff --git a/src/app-utils/Makefile.am b/src/app-utils/Makefile.am index f33a52830d..b0842fc387 100644 --- a/src/app-utils/Makefile.am +++ b/src/app-utils/Makefile.am @@ -181,7 +181,10 @@ if ! OS_WIN32 touch .scm-links endif -CLEANFILES = ${SCM_FILE_LINKS} gnucash .scm-links +clean-local: + rm -rf gnucash + +CLEANFILES = ${SCM_FILE_LINKS} .scm-links MAINTAINERCLEANFILES = swig-app-utils-guile.c swig-app-utils-python.c INCLUDES = -DG_LOG_DOMAIN=\"gnc.app-utils\" diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am index 1a6ff313c4..6ac60ba7aa 100644 --- a/src/backend/Makefile.am +++ b/src/backend/Makefile.am @@ -1,3 +1,5 @@ - +if WITH_DBI + DBI_DIR=dbi +endif SUBDIRS = xml sql ${DBI_DIR} -DIST_SUBDIRS = xml sql dbi + diff --git a/src/business/business-core/Makefile.am b/src/business/business-core/Makefile.am index 5480c7d791..8932de300c 100644 --- a/src/business/business-core/Makefile.am +++ b/src/business/business-core/Makefile.am @@ -53,6 +53,9 @@ if ! OS_WIN32 endif noinst_DATA = .scm-links +clean-local: + rm -rf gnucash + CLEANFILES = gnucash .scm-links ${SCM_FILE_LINKS} MAINTAINERCLEANFILES = diff --git a/src/business/business-gnome/Makefile.am b/src/business/business-gnome/Makefile.am index 07c3a1c868..8bb36c193a 100644 --- a/src/business/business-gnome/Makefile.am +++ b/src/business/business-gnome/Makefile.am @@ -121,6 +121,9 @@ if ! OS_WIN32 endif noinst_DATA = .scm-links -CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links ${SCM_FILE_LINKS} +clean-local: + rm -rf gnucash + +CLEANFILES = $(BUILT_SOURCES) .scm-links ${SCM_FILE_LINKS} INCLUDES = -DG_LOG_DOMAIN=\"gnc.business.gnome\" diff --git a/src/business/dialog-tax-table/Makefile.am b/src/business/dialog-tax-table/Makefile.am index f97062615f..6f8b471166 100644 --- a/src/business/dialog-tax-table/Makefile.am +++ b/src/business/dialog-tax-table/Makefile.am @@ -75,7 +75,10 @@ if ! OS_WIN32 endif noinst_DATA = .scm-links -CLEANFILES = gnucash .scm-links ${SCM_FILE_LINKS} +clean-local: + rm -rf gnucash + +CLEANFILES = .scm-links ${SCM_FILE_LINKS} MAINTAINERCLEANFILES = swig-dialog-tax-table.c INCLUDES = -DG_LOG_DOMAIN=\"gnc.business.tax\" diff --git a/src/core-utils/Makefile.am b/src/core-utils/Makefile.am index 8af3629257..68b95d2c6d 100644 --- a/src/core-utils/Makefile.am +++ b/src/core-utils/Makefile.am @@ -79,7 +79,10 @@ endif noinst_DATA = .scm-links BUILT_SOURCES = gncla-dir.h gnc-version.h EXTRA_DIST = $(gncmod_DATA) core-utils.i gncla-dir.h.in gnc-svninfo.h -CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links +clean-local: + rm -rf gnucash + +CLEANFILES = $(BUILT_SOURCES) .scm-links MAINTAINERCLEANFILES = swig-core-utils.c INCLUDES = -DG_LOG_DOMAIN=\"gnc.core-utils\" diff --git a/src/engine/Makefile.am b/src/engine/Makefile.am index a7c78c9a9b..e6848286fb 100644 --- a/src/engine/Makefile.am +++ b/src/engine/Makefile.am @@ -209,8 +209,11 @@ iso-4217-currencies.c: iso-4217-currencies.scm iso-currencies-to-c BUILT_SOURCES = iso-4217-currencies.c -CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links \ +CLEANFILES = $(BUILT_SOURCES) .scm-links \ ${SCM_FILE_LINKS} MAINTAINERCLEANFILES = swig-engine.c swig-business-core.c +clean-local: + rm -rf gnucash + INCLUDES = -DG_LOG_DOMAIN=\"gnc.engine\" diff --git a/src/gnc-module/Makefile.am b/src/gnc-module/Makefile.am index 52b059761b..82842669b3 100644 --- a/src/gnc-module/Makefile.am +++ b/src/gnc-module/Makefile.am @@ -58,7 +58,10 @@ if ! OS_WIN32 touch .scm-links endif -CLEANFILES = .scm-links gnucash ${SCM_FILE_LINKS} +clean-local: + rm -rf gnucash + +CLEANFILES = .scm-links ${SCM_FILE_LINKS} MAINTAINERCLEANFILES = swig-gnc-module.c INCLUDES = -DG_LOG_DOMAIN=\"gnc.module\" diff --git a/src/gnome-utils/Makefile.am b/src/gnome-utils/Makefile.am index ad5a992c45..e47c408c3f 100644 --- a/src/gnome-utils/Makefile.am +++ b/src/gnome-utils/Makefile.am @@ -251,7 +251,10 @@ if ! OS_WIN32 endif noinst_DATA = .scm-links -CLEANFILES = $(BUILT_SOURCES) gnucash .scm-links ${SCM_FILE_LINKS} +clean-local: + rm -rf gnucash + +CLEANFILES = $(BUILT_SOURCES) .scm-links ${SCM_FILE_LINKS} MAINTAINERCLEANFILES = swig-gnome-utils.c # FIXME: Symlinking directories only works on non-win32. diff --git a/src/import-export/Makefile.am b/src/import-export/Makefile.am index dc044380c0..09fd5bf614 100644 --- a/src/import-export/Makefile.am +++ b/src/import-export/Makefile.am @@ -1,7 +1,11 @@ +if WITH_OFX + OFX_DIR=ofx +endif +if WITH_AQBANKING + AQBANKING_DIR=aqbanking +endif SUBDIRS = . schemas qif qif-import \ ${OFX_DIR} ${AQBANKING_DIR} log-replay test csv -DIST_SUBDIRS = schemas qif qif-import qif-io-core \ - ofx aqbanking log-replay test csv pkglib_LTLIBRARIES=libgncmod-generic-import.la diff --git a/src/optional/Makefile.am b/src/optional/Makefile.am index 3c5bae0d2b..d1a92e5fc2 100644 --- a/src/optional/Makefile.am +++ b/src/optional/Makefile.am @@ -1,2 +1,7 @@ +if WITH_PYTHON + PYTHON_BINDINGS_DIR = python-bindings +endif +if WITH_GTKMM + GTKMM_DIR=gtkmm +endif SUBDIRS = ${PYTHON_BINDINGS_DIR} ${GTKMM_DIR} -DIST_SUBDIRS = python-bindings gtkmm diff --git a/src/optional/python-bindings/tests/Makefile.am b/src/optional/python-bindings/tests/Makefile.am index 77824f2b66..cbfa25e27c 100644 --- a/src/optional/python-bindings/tests/Makefile.am +++ b/src/optional/python-bindings/tests/Makefile.am @@ -1,4 +1,4 @@ -TESTS_ENVIRONMENT = PYTHONPATH=$(PYTHONPATH):$(pythondir) $(top_builddir)/src/bin/gnucash-env $(PYTHON) +TESTS_ENVIRONMENT = PYTHONPATH=$(PYTHONPATH):$(pythondir) $(top_builddir)/src/bin/gnucash-setup-env $(PYTHON) TESTS = runTests.py clean-local: diff --git a/src/python/Makefile.am b/src/python/Makefile.am index ba45732c48..7c0cf4bdfd 100644 --- a/src/python/Makefile.am +++ b/src/python/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = . pycons +SUBDIRS = pycons #test pkglib_LTLIBRARIES = libgncmod-python.la diff --git a/src/report/Makefile.am b/src/report/Makefile.am index b183afae3a..03b7355460 100644 --- a/src/report/Makefile.am +++ b/src/report/Makefile.am @@ -12,8 +12,7 @@ GUI_SUBDIRS = \ if GNUCASH_ENABLE_GUI SUBDIRS = $(NONGUI_SUBDIRS) $(GUI_SUBDIRS) -else +else SUBDIRS = $(NONGUI_SUBDIRS) endif -DIST_SUBDIRS = $(NONGUI_SUBDIRS) $(GUI_SUBDIRS) diff --git a/src/report/report-gnome/Makefile.am b/src/report/report-gnome/Makefile.am index 6b3d92b1b7..3cc8a15e14 100644 --- a/src/report/report-gnome/Makefile.am +++ b/src/report/report-gnome/Makefile.am @@ -100,7 +100,10 @@ if ! OS_WIN32 touch .scm-links endif -CLEANFILES = gnucash report .scm-links ${SCM_FILE_LINKS} +clean-local: + rm -rf gnucash + +CLEANFILES = report .scm-links ${SCM_FILE_LINKS} MAINTAINERCLEANFILES = swig-report-gnome.c INCLUDES = -DG_LOG_DOMAIN=\"gnc.report.gui\" diff --git a/src/report/report-system/Makefile.am b/src/report/report-system/Makefile.am index ccb981ea5c..373f2a20a8 100644 --- a/src/report/report-system/Makefile.am +++ b/src/report/report-system/Makefile.am @@ -90,7 +90,10 @@ noinst_DATA = .scm-links EXTRA_DIST = report-system.i ${gncscmmod_DATA} ${gncscm_DATA} -CLEANFILES = gnucash report .scm-links ${SCM_FILE_LINKS} +clean-local: + rm -rf gnucash + +CLEANFILES = report .scm-links ${SCM_FILE_LINKS} MAINTAINERCLEANFILES = swig-report-system.c INCLUDES = -DG_LOG_DOMAIN=\"gnc.report.core\"