Skip to content

Commit 047e022

Browse files
committed
Pass new "compat includes" path via AC_SUBST.
This fixes the build when the directory path containing a space. Found by Sevan Janiyan, tested by Job Snijders. This doesn't fix "make tests", however that is a different, pre-existing problem that needs to be addressed separately.
1 parent 5c50ddb commit 047e022

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ STRIP_OPT=@STRIP_OPT@
3333
TEST_SHELL=@TEST_SHELL@
3434
BUILDDIR=@abs_top_builddir@
3535
SK_STANDALONE=@SK_STANDALONE@
36+
COMPATINCLUDES="$(BUILDDIR)/@COMPATINCLUDES@"
3637

3738
PATHS= -DSSHDIR=\"$(sysconfdir)\" \
3839
-D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
@@ -50,7 +51,7 @@ CC=@CC@
5051
LD=@LD@
5152
CFLAGS=@CFLAGS@
5253
CFLAGS_NOPIE=@CFLAGS_NOPIE@
53-
CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
54+
CPPFLAGS=-I. -I$(srcdir) -I$(COMPATINCLUDES) @CPPFLAGS@ $(PATHS) @DEFS@
5455
PICFLAG=@PICFLAG@
5556
LIBS=@LIBS@
5657
CHANNELLIBS=@CHANNELLIBS@

configure.ac

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ AC_CHECK_HEADERS([ \
526526
# platform. Usually these are just empty, but in some cases they'll include
527527
# the equivalent file. This avoids having to wrap those includes in
528528
# '#ifdef HAVE_FOO_H'. If we create any such headers, add the path to includes.
529-
compatincludes=no
529+
COMPATINCLUDES=""
530530
AC_CHECK_HEADERS([ \
531531
endian.h \
532532
ifaddrs.h \
@@ -541,8 +541,8 @@ AC_CHECK_HEADERS([ \
541541
sys/un.h \
542542
time.h \
543543
util.h], [], [
544-
compatincludes="`pwd`/openbsd-compat/include"
545-
header="$compatincludes/$ac_header"
544+
COMPATINCLUDES="openbsd-compat/include"
545+
header="$COMPATINCLUDES/$ac_header"
546546
dir=`dirname "$header"`
547547
mkdir -p "$dir"
548548
case "$ac_header" in
@@ -552,9 +552,7 @@ AC_CHECK_HEADERS([ \
552552
*) ;;
553553
esac >"$header"
554554
])
555-
if test "$compatincludes" != "no"; then
556-
CPPFLAGS="$CPPFLAGS -I$compatincludes"
557-
fi
555+
AC_SUBST([COMPATINCLUDES])
558556

559557
AC_CHECK_DECLS([le32toh, le64toh, htole64], [], [], [
560558
#ifdef HAVE_SYS_TYPES_H

0 commit comments

Comments
 (0)