+2005-08-10 Bruno Haible <bruno@clisp.org>
+
+ * configure.ac (SUBDIR_libasprintf, SUBDIR_glocale): Remove AC_SUBSTs.
+ (ENABLE_LIBASPRINTF, ENABLE_GLOCALE): New automake conditionals.
+ * Makefile.am (SUBDIR_libasprintf, SUBDIR_glocale): New variables.
+ (SUBDIRS): Use them.
+ (DIST_SUBDIRS): Remove variable. Automake computes it correctly through
+ the conditionals.
+ Suggested by Stepan Kasal <kasal@ucw.cz>.
+
2005-07-31 Bruno Haible <bruno@clisp.org>
* glocale: New directory.
MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= @MAKEINFO@
-SUBDIRS = doc intl intl-java intl-csharp lib @SUBDIR_libasprintf@ @SUBDIR_glocale@ src po man m4 tests
-DIST_SUBDIRS = doc intl intl-java intl-csharp lib libasprintf glocale src po man m4 tests
+# The list of subdirectories depends on whether --disable-libasprintf or
+# --disable-glocale was specified.
+if ENABLE_LIBASPRINTF
+SUBDIR_libasprintf = libasprintf
+else
+SUBDIR_libasprintf =
+endif
+if ENABLE_GLOCALE
+SUBDIR_glocale = glocale
+else
+SUBDIR_glocale =
+endif
+SUBDIRS = doc intl intl-java intl-csharp lib $(SUBDIR_libasprintf) $(SUBDIR_glocale) src po man m4 tests
EXTRA_DIST = BUGS
if test "$CXX" = ":"; then
SUBDIR_libasprintf=
fi
-AC_SUBST(SUBDIR_libasprintf)
+AM_CONDITIONAL([ENABLE_LIBASPRINTF], [test -n "$SUBDIR_libasprintf"])
dnl Determine whether to build glocale.
AC_ARG_ENABLE(libglocale,
SUBDIR_glocale=
fi
], SUBDIR_glocale=glocale)
-AC_SUBST(SUBDIR_glocale)
+AM_CONDITIONAL([ENABLE_GLOCALE], [test -n "$SUBDIR_glocale"])
AC_CONFIG_SUBDIRS(libasprintf glocale)