From b118a188c447f224ac1a719150aaedbbc37f2933 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Fri, 2 Sep 2005 17:28:31 +0000
Subject: [PATCH] Provide defaults where needed.

---
 ChangeLog   | 5 +++++
 gnulib-tool | 8 +++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index f093a9ea96..5f3db55932 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-02  Bruno Haible  <bruno@clisp.org>
+
+	* gnulib-tool (import): In the other first-use case, provide defaults
+	as well.
+
 2005-09-02  Simon Josefsson  <jas@extundo.com>
 
 	* modules/havelib: New module.
diff --git a/gnulib-tool b/gnulib-tool
index 0bc390891c..e6270b6ed4 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2005-09-02 11:18:48 $'
+cvsdatestamp='$Date: 2005-09-02 17:28:31 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -1485,6 +1485,12 @@ case $mode in
     if test -n "$m4base"; then
       # Apply func_import to a particular gnulib directory.
       # Any number of additional modules can be given.
+      if test ! -f "$destdir/$m4base"/gnulib-cache.m4; then
+        # First use of gnulib in the given m4base.
+        test -n "$supplied_libname" || supplied_libname=true
+        test -n "$sourcebase" || sourcebase="lib"
+        test -n "$macro_prefix" || macro_prefix="gl"
+      fi
       func_import "$*"
     else
       # Apply func_import to all gnulib directories.
-- 
2.30.2