mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2024-11-25 00:53:43 +00:00
Remove compiler check as it's breaking the build even on gcc.
This commit is contained in:
parent
53835d54b2
commit
6a03afb938
1 changed files with 28 additions and 32 deletions
|
@ -18,43 +18,39 @@ AC_PROG_CXX
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS -Isrc"
|
CPPFLAGS="$CPPFLAGS -Isrc"
|
||||||
if test "$CC" = "gcc" ; then
|
# always want reentrant funcs, not just thread-safe mode. -s
|
||||||
# always want reentrant funcs, not just thread-safe mode. -s
|
CFLAGS="$CFLAGS -O3 -Wall -Wpointer-arith -D_GNU_SOURCE -D_REENTRANT -fsigned-char"
|
||||||
CFLAGS="$CFLAGS -O3 -Wall -Wpointer-arith -D_GNU_SOURCE -D_REENTRANT -fsigned-char"
|
|
||||||
|
|
||||||
# gcc doesn't indicate an error for unknown options when they are
|
# gcc doesn't indicate an error for unknown options when they are
|
||||||
# not warning/feature options, -Wxxx or -fxxx. We have to test manually.
|
# not warning/feature options, -Wxxx or -fxxx. We have to test manually.
|
||||||
cprog="int main(void){return 0;}"
|
cprog="int main(void){return 0;}"
|
||||||
gcctest="gcc -x c -c - -o /dev/null"
|
gcctest="gcc -x c -c - -o /dev/null"
|
||||||
|
|
||||||
AC_MSG_CHECKING(CFLAGS for gcc -std=gnu99...)
|
AC_MSG_CHECKING(CFLAGS for gcc -std=gnu99...)
|
||||||
result=`echo "$cprog" | $gcctest -std=gnu99 2>&1`
|
result=`echo "$cprog" | $gcctest -std=gnu99 2>&1`
|
||||||
if test -z "$result" ; then
|
if test -z "$result" ; then
|
||||||
CFLAGS="$CFLAGS -std=gnu99"
|
CFLAGS="$CFLAGS -std=gnu99"
|
||||||
AC_MSG_RESULT(-std=gnu99)
|
AC_MSG_RESULT(-std=gnu99)
|
||||||
else
|
|
||||||
AC_MSG_RESULT([no, unknown])
|
|
||||||
fi
|
|
||||||
|
|
||||||
# turn on as many warnings as possible
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wclobbered])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wempty-body])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wignored-qualifiers])
|
|
||||||
#AX_CFLAGS_GCC_OPTION([-Wmissing-field-initializers]) # annoying
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wmissing-parameter-type])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wold-style-declaration])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Woverride-init])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wsign-compare])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wtype-limits])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-Wuninitialized])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-fomit-frame-pointer])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-fno-strict-aliasing])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-funroll-all-loops])
|
|
||||||
AX_CFLAGS_GCC_OPTION([-funit-at-a-time])
|
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([Using $CC instead of gcc, currently not supported])
|
AC_MSG_RESULT([no, unknown])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# turn on as many warnings as possible
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wclobbered])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wempty-body])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wignored-qualifiers])
|
||||||
|
#AX_CFLAGS_GCC_OPTION([-Wmissing-field-initializers]) # annoying
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wmissing-parameter-type])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wold-style-declaration])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Woverride-init])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wsign-compare])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wtype-limits])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-Wuninitialized])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-fomit-frame-pointer])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-fno-strict-aliasing])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-funroll-all-loops])
|
||||||
|
AX_CFLAGS_GCC_OPTION([-funit-at-a-time])
|
||||||
|
|
||||||
# Each case has an example of what target_os contains
|
# Each case has an example of what target_os contains
|
||||||
case ${target_os} in
|
case ${target_os} in
|
||||||
# solaris
|
# solaris
|
||||||
|
|
Loading…
Reference in a new issue