summaryrefslogtreecommitdiff
path: root/bootstrap.conf
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-03-12 09:47:36 +0100
committerJim Meyering <jim@meyering.net>2007-03-12 09:47:36 +0100
commit1e7a0f088b2704dab15c8b513773f7014fdf64ed (patch)
tree994685389faaa668e8527d79efa64816fff90132 /bootstrap.conf
parentfd6fc97156c6dfcd1e88d4c0e404d320dca06921 (diff)
downloadcoreutils-1e7a0f088b2704dab15c8b513773f7014fdf64ed.tar.xz
Make bootstrap.conf a tiny bit more generic.
* bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4 files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
Diffstat (limited to 'bootstrap.conf')
-rw-r--r--bootstrap.conf43
1 files changed, 29 insertions, 14 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 6709afd04..30433216d 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -81,17 +81,32 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
--flag=wrapf:1:c-format\\\
'
-# Gettext supplies these files, but we don't need them since
-# we don't have an intl subdirectory.
-excluded_files='
- m4/glibc2.m4
- m4/intdiv0.m4
- m4/lcmessage.m4
- m4/lock.m4
- m4/printf-posix.m4
- m4/size_max.m4
- m4/uintmax_t.m4
- m4/ulonglong.m4
- m4/visibility.m4
- m4/xsize.m4
-'
+# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
+# appears in configure.ac, exclude some unnecessary files.
+# Without grep's -E option (not portable enough, pre-configure),
+# the following test is ugly. Also, this depends on the existence
+# of configure.ac, not the obsolescent-named configure.in. But if
+# you're using this infrastructure, you should care about such things.
+
+gettext_external=0
+grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
+ gettext_external=1
+grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
+ gettext_external=1
+
+if test $gettext_external = 1; then
+ # Gettext supplies these files, but we don't need them since
+ # we don't have an intl subdirectory.
+ excluded_files='
+ m4/glibc2.m4
+ m4/intdiv0.m4
+ m4/lcmessage.m4
+ m4/lock.m4
+ m4/printf-posix.m4
+ m4/size_max.m4
+ m4/uintmax_t.m4
+ m4/ulonglong.m4
+ m4/visibility.m4
+ m4/xsize.m4
+ '
+fi