more compatibility tweaks

This commit is contained in:
cathugger 2017-10-06 14:09:08 +00:00
parent 9c2247c15c
commit 03e4dbbec1
2 changed files with 18 additions and 4 deletions

View file

@ -1,7 +1,7 @@
CC= @CC@
CSTD= @CSTD@ -Wall
CFLAGS= $(CSTD) @CFLAGS@ -DED25519_@ED25519IMPL@ @MYDEFS@
CFLAGS= $(CSTD) @CFLAGS@ @CPPFLAGS@ -DED25519_@ED25519IMPL@ @MYDEFS@
ASFLAGS=
LDFLAGS= @NOPIE@ @LDFLAGS@
MV= mv

View file

@ -37,16 +37,30 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
CFLAGS="$oldcflags"
nopie=""
oldcflags="$CFLAGS"
CFLAGS="-no-pie"
AC_MSG_CHECKING([whether CC supports -no-pie])
CFLAGS="-nopie"
AC_MSG_CHECKING([whether CC supports -nopie])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[nopie="-no-pie"],
[nopie="-nopie"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$oldcflags"
if test "x$nopie" = "x"
then
oldcflags="$CFLAGS"
CFLAGS="-no-pie"
AC_MSG_CHECKING([whether CC supports -no-pie])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])]
[nopie="-no-pie"],
[AC_MSG_RESULT([no])]
)
CFLAGS="$oldcflags"
fi
MYDEFS=""
ed25519impl=""