From ea0179e342343f5fbefb265bde4dea0d475f0781 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 31 Jan 2016 05:04:50 +0100 Subject: interfaces have their own automake subdirectories and convenience libraries now * use libtool convenience libraries as much as possible (for all static libraries except Scintilla) * improves separation of language and user interface implementations (e.g. the Gtk widgets are not interesting for the rest of SciTECO) * the Curses popup widget can now be factored out of interface-curses.cpp * some common CPPFLAGS are now defined by ./configure via AM_CPPFLAGS, so they don't have to be repeated in each submodule. * fixed building the Curses UI: GTK_FLOW_BOX_FALLBACK conditional must always be defined. --- configure.ac | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a31658b..d44689b 100644 --- a/configure.ac +++ b/configure.ac @@ -19,10 +19,19 @@ AC_CONFIG_HEADERS([config.h]) AC_CANONICAL_BUILD AC_CANONICAL_HOST +# Automake build flag substitutions. +# Necessary so we can change their default values here +AC_SUBST(AM_CPPFLAGS) + # SciTECO library macro directory scitecolibdir=$datadir/$PACKAGE/lib AC_SUBST(scitecolibdir) +# These paths can be changed at install-time and +# should not be written into config.h: +AM_CPPFLAGS="$AM_CPPFLAGS -D'SCITECODATADIR=\"\$(pkgdatadir)\"' \ + -D'SCITECOLIBDIR=\"\$(scitecolibdir)\"'" + # Auxiliary functions # expand $1 and print its absolute path @@ -86,8 +95,9 @@ PKG_CHECK_MODULES(LIBGLIB, [glib-2.0 >= 2.28], [ # Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS([bsd/sys/queue.h]) -AM_CONDITIONAL(NEED_COMPAT, [test $ac_cv_header_bsd_sys_queue_h = no]) +AC_CHECK_HEADERS([bsd/sys/queue.h], [], [ + AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_srcdir)/compat" +]) case $host in *-mingw*) @@ -247,7 +257,6 @@ gtk) AC_CHECK_FUNCS(gtk_flow_box_new, [], [ GTK_FLOW_BOX_FALLBACK=true ]) - AM_CONDITIONAL(GTK_FLOW_BOX_FALLBACK, [test x$GTK_FLOW_BOX_FALLBACK = xtrue]) AC_CHECK_PROG(GOB2, gob2, gob2) if [[ x$GOB2 = x ]]; then @@ -266,6 +275,7 @@ gtk) esac AM_CONDITIONAL(INTERFACE_GTK, [test x$INTERFACE = xgtk]) +AM_CONDITIONAL(GTK_FLOW_BOX_FALLBACK, [test x$GTK_FLOW_BOX_FALLBACK = xtrue]) AC_ARG_WITH(teco-integer, AS_HELP_STRING([--with-teco-integer=SIZE], @@ -320,6 +330,8 @@ AC_ARG_ENABLE(static-executables, [static_executables=$enableval], [static_executables=no]) AM_CONDITIONAL(STATIC_EXECUTABLES, [test x$static_executables = xyes]) -AC_CONFIG_FILES([Makefile src/Makefile lib/Makefile]) +AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([src/Makefile src/interface-gtk/Makefile src/interface-curses/Makefile]) +AC_CONFIG_FILES([lib/Makefile]) AC_CONFIG_FILES([doc/Makefile doc/Doxyfile]) AC_OUTPUT -- cgit v1.2.3