1 AC_DEFUN([AC_PROG_CC_PIE], [
2 AC_CACHE_CHECK([whether ${CC-cc} accepts -fPIE], ac_cv_prog_cc_pie, [
3 echo 'void f(){}' > conftest.c
4 if test -z "`${CC-cc} -fPIE -pie -c conftest.c 2>&1`"; then
13 AC_DEFUN([COMPILER_FLAGS], [
14 if (test "${CFLAGS}" = ""); then
15 CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2"
17 if (test "$USE_MAINTAINER_MODE" = "yes"); then
18 CFLAGS="$CFLAGS -Werror -Wextra"
19 CFLAGS="$CFLAGS -Wno-unused-parameter"
20 CFLAGS="$CFLAGS -Wno-missing-field-initializers"
21 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
22 CFLAGS="$CFLAGS -Wmissing-declarations"
23 CFLAGS="$CFLAGS -Wredundant-decls"
24 CFLAGS="$CFLAGS -Wcast-align"
25 CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"