diff --git a/configure.in b/configure.in index 27c7423f..a4c9767c 100644 --- a/configure.in +++ b/configure.in @@ -102,20 +102,31 @@ if test x$ac_cv_guile_found = xyes ; then AC_DEFINE(GLIBTOP_GUILE) AC_DEFINE(GLIBTOP_GUILE_NAMES) libgtop_guile_found=yes - guile_examples='third third_static' + guile_examples='third' + guile_static_examples='third_static' guile_subdirs='guile' else libgtop_guile_found=no guile_examples= + guile_static_examples= guile_subdirs= fi if test x$libgtop_smp = xyes ; then - smp_examples='smp smp_static' + smp_examples='smp' + smp_static_examples='smp_static' else smp_examples= + smp_static_examples= fi +if test "x$enable_static" != xno; then + static_targets="first_static second_static mountlist_static procmap_static $guile_static_example $smp_static_examples" +else + static_targets="" +fi + +AC_SUBST(static_targets) AC_SUBST(smp_examples) AC_SUBST(guile_examples) AC_SUBST(guile_subdirs) diff --git a/examples/Makefile.am b/examples/Makefile.am index 2d641909..a88a4d15 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -9,12 +9,14 @@ DEFS = @DEFS@ # We install it in `libexec' since this will make it more easy # to put the examples into an extra RPM package. -libexec_PROGRAMS = first first_static second second_static \ - mountlist mountlist_static \ - procmap procmap_static \ +libexec_PROGRAMS = first second\ + mountlist procmap \ + @static_targets@ \ @guile_examples@ @smp_examples@ -EXTRA_PROGRAMS = third third_static smp smp_static +EXTRA_PROGRAMS = first_static second_static \ + mountlist_static procmap_static \ + third third_static smp smp_static first_SOURCES = first.c first_LDADD = $(top_builddir)/lib/libgtop.la \