autoconf-patches
[Top][All Lists]
Advanced

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

ac-fs-separators.patch


From: Akim Demaille
Subject: ac-fs-separators.patch
Date: 03 Feb 2001 18:24:22 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

I know, it behaves badly:

src/ace/tests % ./configure --src ..                             nostromo 18:15
./configure: /home/lrde/prof/akim/src/ace/tests; conftest.sh: Aucun fichier ou 
répertoire de ce type
checking for gcc... gcc
checking for object suffix... o
checking for executable suffix... 
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged

but the line we can see is a bug of AC_TRY_COMMAND, not this patch.
We really have to formally state what AC_TRY_COMMAND and AC_TRY_EVAL
are, it's too messy.  Maybe introduce cleaner versions.

Tim, does it work for you?


Oops, forgot the ChangeLog.  Will write one :)



Index: BUGS
===================================================================
RCS file: /cvs/autoconf/BUGS,v
retrieving revision 1.8
diff -u -u -r1.8 BUGS
--- BUGS 2001/01/30 16:21:21 1.8
+++ BUGS 2001/02/03 17:18:05
@@ -15,9 +15,9 @@

 * Status

-       /*------------.
-       | Don't use.  |
-       `------------*/
+       /*-------------.
+       | Do not use.  |
+       `-------------*/

 * Serious Problems

@@ -37,4 +37,17 @@

 ** AC_TRY_EVAL of multi line commands

-Is broken.
+Is broken.  The problem is mostly that, again, the policy wrt special
+characters is not clearly defined.  Because of this,
+_AC_INIT_PREPARE_FS_SEPARATORS will output undesired messages, but is
+not guilty.
+
+./configure: /home/lrde/prof/akim/src/ace/tests; conftest.sh: Aucun fichier ou 
répertoire de ce type
+
+AC_TRY_COMMAND is.
+
+** AC_CHECK_PROG
+
+and all the macros that use it, are paying the change for test -f to
+test -x to determine whether a candidate path is an executable: now we
+have false positives with directories which, indeed, are test -x.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.690
diff -u -u -r1.690 acgeneral.m4
--- acgeneral.m4 2001/02/03 16:43:01 1.690
+++ acgeneral.m4 2001/02/03 17:18:06
@@ -1,6 +1,6 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Parameterized macros.
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -662,7 +662,7 @@
 # ------------------
 m4_define([_AC_INIT_COPYRIGHT],
 [AC_COPYRIGHT(
-[Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+[Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.])dnl
@@ -1361,6 +1361,25 @@
 ])# _AC_INIT_VERSION


+# _AC_INIT_PREPARE_FS_SEPARATORS
+# ------------------------------
+# Compute the directory and path separators.
+# FIXME: Full version should include dir separator, documentation about
+# AC_SUBST'ed variables etc.
+m4_define([_AC_INIT_PREPARE_FS_SEPARATORS],
+[echo "#! $SHELL" >conftest.sh
+echo  "exit 0"   >>conftest.sh
+chmod +x conftest.sh
+if AC_TRY_COMMAND([PATH=".;`pwd`"; conftest.sh]); then
+  ac_path_separator=';'
+else
+  ac_path_separator=:
+fi
+AC_SUBST([PATH_SEPARATOR], "$ac_path_separator")dnl
+rm -f conftest.sh
+])
+
+
 # _AC_INIT_PREPARE
 # ----------------
 # Called by AC_INIT to build the preamble of the `configure' scripts.
@@ -1446,6 +1465,8 @@
 AC_LANG_PUSH(C)

 _AC_PROG_ECHO()dnl
+_AC_INIT_PREPARE_FS_SEPARATORS
+
 dnl Substitute for predefined variables.
 AC_SUBST(DEFS)dnl
 AC_SUBST(LIBS)dnl
@@ -2301,7 +2322,7 @@
 # expansions, not every word.  This closes a longstanding sh security
 # hole.
 m4_define([AC_SHELL_PATH_WALK],
-[ac_save_IFS=$IFS; IFS=':'
+[ac_save_IFS=$IFS; IFS=$ac_path_separator
 ac_dummy="m4_default([$1], [$PATH])"
 for ac_dir in $ac_dummy; do
   IFS=$ac_save_IFS



reply via email to

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