compat: always add compat dirs to -I

This commit is contained in:
~locpyl-tidnyd 2021-05-05 15:03:32 +03:00
parent 014a94a8d4
commit b7db4d59df
2 changed files with 11 additions and 5 deletions

14
pkg/urbit/configure vendored
View File

@ -42,8 +42,6 @@ do
case $1 in
--enable-debug)
CFLAGS="${CFLAGS-} -O0 -g"
MEMORY_DEBUG=1
CPU_DEBUG=1
;;
--disable-debug)
CFLAGS="${CFLAGS-} -O3 -g"
@ -110,8 +108,8 @@ case $(tr A-Z a-z <<< $os) in
ldextra="$ldextra -lzstd"
# libuv implibs
ldextra="$ldextra -luserenv -liphlpapi -lpsapi"
vcompat=mingw
CFLAGS="${CFLAGS-} ${cdirs[@]} -DCURL_STATICLIB -DH2O_NO_UNIX_SOCKETS -Icompat/mingw"
compat="${compat-} mingw"
CFLAGS="${CFLAGS-} ${cdirs[@]} -DCURL_STATICLIB -DH2O_NO_UNIX_SOCKETS"
LDFLAGS="${LDFLAGS-} ${ldirs[@]} -static"
PKG_CONFIG=">/dev/null echo"
;;
@ -149,11 +147,17 @@ for header in $headers
do LDFLAGS="${LDFLAGS-} -I$header"
done
compat="${compat-posix}"
for citem in $compat
do
CFLAGS="${CFLAGS-} -Icompat/$citem"
done
cat >config.mk <<EOF
CFLAGS := ${CFLAGS-} -funsigned-char -ffast-math -fcommon -std=gnu99
LDFLAGS := $LDFLAGS ${ldextra-}
CC := ${CC-cc}
compat := ${vcompat-posix}
compat := $compat
EOF
echo == config.mk == >&2

View File

@ -649,11 +649,13 @@ main(c3_i argc,
}
#endif
#if !defined(U3_OS_mingw)
// Handle SIGTSTP as if it was SIGTERM.
//
// Configured here using signal() so as to be immediately available.
//
signal(SIGTSTP, _stop_exit);
#endif
printf("~\n");
// printf("welcome.\n");