Skip to content

Commit

Permalink
Add option to disable spawnv define
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisGoosen committed Sep 21, 2023
1 parent 718d491 commit 93e619a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ AC_SUBST([SANITIZERS])

AM_ICONV

AC_ARG_ENABLE(
[spawnvfix],
[AS_HELP_STRING([--disable-spawnvfix], [Do not use _spawnv=spanv define on MINGW builds because it breaks UCRT builds.])]
)

use_spawnvfix=""

AS_IF([test "x$enable_spawnvfix" != "xno"], [
use_spawnvfix="-D_spawnv=spawnv"
])

AC_CANONICAL_HOST
AS_CASE([$host],
[*linux*|*bsd*|*mingw*|*cygwin*|*gnu*], [EXTRA_LIBS="-lm"],
Expand All @@ -60,7 +71,7 @@ AS_CASE([$host],
AC_SUBST([EXTRA_LDFLAGS])

AS_CASE([$host],
[*mingw*], [CFLAGS="$CFLAGS -D_spawnv=spawnv"],
[*mingw*], [CFLAGS="$CFLAGS $use_spawnvfix"],
[CFLAGS="$CFLAGS"])

AC_ARG_VAR([LIB_FUZZING_ENGINE], [Location of prebuilt fuzzing engine library])
Expand Down

0 comments on commit 93e619a

Please sign in to comment.