autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_OUTPUT_COMMANDS


From: Akim Demaille
Subject: Re: AC_OUTPUT_COMMANDS
Date: 24 Jan 2001 11:28:52 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

Here is my proposal.  I ran the foo-0 package from Ralf and it
consistently leaves top_srcdir undefined, and srcdir points to
configure.in when (i) ./configure, (ii), ../configure, (iii)
/tmp/foo-0/configure.

Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.678
diff -u -u -r1.678 acgeneral.m4
--- acgeneral.m4 2001/01/24 10:04:47 1.678
+++ acgeneral.m4 2001/01/24 10:26:39
@@ -3894,7 +3894,8 @@
   * )   ac_file_in=$ac_file.in ;;
   esac
 
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+  # Adjust a relative ac_srcdir, ac_top_srcdir, and INSTALL for
+  # subdirectories.

        [I'm not sure I should have change the comment here, and maybe I
        should have written address@hidden@, @top_srcdir@, and @INSTALL@''?]

   ac_dir=`AS_DIRNAME(["$ac_file"])`
   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
     AS_MKDIR_P(["$ac_dir"])
@@ -3906,15 +3907,18 @@
   fi
 
   case $ac_given_srcdir in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots | sed 's,/$,,'`; fi ;;
+  .)  ac_srcdir=.
+      if test -z "$ac_dots"; then
+         ac_top_srcdir=.
+      else
+         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
+      fi ;;
   [[\\/]]* | ?:[[\\/]]* )
-      srcdir=$ac_given_srcdir$ac_dir_suffix;
-      top_srcdir=$ac_given_srcdir ;;
+      ac_srcdir=$ac_given_srcdir$ac_dir_suffix;
+      ac_top_srcdir=$ac_given_srcdir ;;
   *) # Relative path.
-    srcdir=$ac_dots$ac_given_srcdir$ac_dir_suffix
-    top_srcdir=$ac_dots$ac_given_srcdir ;;
+    ac_srcdir=$ac_dots$ac_given_srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_dots$ac_given_srcdir ;;
   esac
 
 AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
@@ -3969,8 +3973,8 @@
 :t
 [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
 s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$srcdir,;t t
-s,@top_srcdir@,$top_srcdir,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
 AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$INSTALL,;t t
 ])dnl
 dnl The parens around the eval prevent an "illegal io" in Ultrix sh.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]