more autism

This commit is contained in:
cathugger
2017-10-22 00:40:23 +00:00
parent 3bae9caa97
commit f649eedb70
4 changed files with 70 additions and 28 deletions

View File

@@ -25,17 +25,6 @@ then
CFLAGS="$oldcflags"
fi
cstd=""
oldcflags="$CFLAGS"
CFLAGS="-std=c99"
AC_MSG_CHECKING([whether CC supports -std=c99])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[cstd="-std=c99"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$oldcflags"
nopie=""
oldcflags="$CFLAGS"
@@ -128,6 +117,46 @@ then
CFLAGS="$CFLAGS -msse2"
fi
cstd=""
c99=""
oldcflags="$CFLAGS"
CFLAGS="-std=c99"
AC_MSG_CHECKING([whether CC supports -std=c99])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[c99="yes"]
[cstd="-std=c99"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$cstd -Wall"
AC_MSG_CHECKING([whether CC supports -Wall])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wall"],
[AC_MSG_RESULT([no])]
)
if test "x$c99" = "xyes" -a "x$ed25519impl" != "xdonna"
then
CFLAGS="$cstd -Wpedantic"
AC_MSG_CHECKING([whether CC supports -Wpedantic])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wpedantic"],
[AC_MSG_RESULT([no])]
)
fi
if test "x$ed25519impl" = "xdonna"
then
CFLAGS="$cstd -Wno-unused-function"
AC_MSG_CHECKING([whether CC supports -Wno-unused-function])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[cstd="$cstd -Wno-unused-function"],
[AC_MSG_RESULT([no])]
)
fi
CFLAGS="$oldcflags"
AC_ARG_ENABLE([intfilter],
[AS_HELP_STRING([--enable-intfilter],