configure failure when whitespace in directory name

Sevan Janiyan venture37+openssh at geeklan.co.uk
Wed Oct 1 23:42:05 AEST 2025


On 01/10/2025 00:18, Darren Tucker wrote:
 > We can't fix it in configure, but we*can* punt the problem to make:
 >
 > Sevan: please try this patch.  You will need to run "autoreconf" after
 > applying it to rebuild configure.

Thanks for the patches, Darren.
I cloned the openssh-portable repo which contains your changes just now, 
and autoconf'd it.
configure succeed in a directory with a space in its name.
To make sure, I nested the repo inside a subdirectory with a space in 
its name and it still succeeded in configuring.

The diff between the resulting configure script from today with your 
patch and the initial snapshot I downloaded yesterday is as follows:

--- /tmp/openssh/configure    2025-09-30 15:30:20.000000000 +0100
+++ /tmp/openssh 2/openssh-portable/configure    2025-10-01 
14:18:34.000000000 +0100
@@ -689,6 +689,7 @@
  LDNSCONFIG
  LIBOBJS
  TESTLIBS
+COMPATINCLUDES
  LD
  PATH_PASSWD_PROG
  STARTUP_SCRIPT_SHELL
@@ -11440,7 +11441,7 @@
  # platform.  Usually these are just empty, but in some cases they'll 
include
  # the equivalent file.  This avoids having to wrap those includes in
  # '#ifdef HAVE_FOO_H'.  If we create any such headers, add the path to 
includes.
-compatincludes=no
+COMPATINCLUDES=""
         for ac_header in endian.h ifaddrs.h libgen.h paths.h netgroup.h 
nlist.h poll.h stdint.h sys/stat.h sys/time.h sys/un.h time.h util.h
  do :
    as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -11453,8 +11454,8 @@

  else $as_nop

-    compatincludes="`pwd`/openbsd-compat/include"
-    header="$compatincludes/$ac_header"
+    COMPATINCLUDES="openbsd-compat/include"
+    header="$COMPATINCLUDES/$ac_header"
      dir=`dirname "$header"`
      mkdir -p "$dir"
      case "$ac_header" in
@@ -11467,9 +11468,7 @@
  fi

  done
-if test "$compatincludes" != "no"; then
-    CPPFLAGS="$CPPFLAGS -I$compatincludes"
-fi
+

  ac_fn_check_decl "$LINENO" "le32toh" "ac_cv_have_decl_le32toh" "
  #ifdef HAVE_SYS_TYPES_H
@@ -28248,3 +28247,4 @@
      echo "WARNING: BSM audit support is currently considered 
EXPERIMENTAL."
      echo "See the Solaris section in README.platform for details."
  fi
+



Sincerely,


Sevan


More information about the openssh-unix-dev mailing list