AC_CONFIG_AUX_DIR([build-aux])
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr])
AM_INIT_AUTOMAKE([
AC_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
-AC_USE_SYSTEM_EXTENSIONS
-
CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
- -pipe \
-Wall \
- -Wextra \
- -Wno-inline \
- -Wundef \
- "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
- -Wno-unused-parameter \
- -Wno-unused-result \
- -fno-strict-aliasing \
- -ffunction-sections \
- -fdata-sections \
- -fstack-protector-all \
- --param=ssp-buffer-size=4])
-AC_SUBST([OUR_CFLAGS], $with_cflags)
+ -Wchar-subscripts \
+ -Wformat-security \
+ -Wmissing-declarations \
+ -Wmissing-prototypes \
+ -Wnested-externs \
+ -Wpointer-arith \
+ -Wshadow \
+ -Wsign-compare \
+ -Wstrict-prototypes \
+ -Wtype-limits \
+])
-AS_CASE([$CFLAGS], [*-O[[12345g\ ]]*],
- [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
- -Wp,-D_FORTIFY_SOURCE=2])],
- [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
-AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
-
-CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
- -Wl,--as-needed \
- -Wl,--no-undefined \
- -Wl,--gc-sections \
- -Wl,-z,relro \
- -Wl,-z,now])
-AC_SUBST([OUR_LDFLAGS], $with_ldflags)
+AC_SUBST([OUR_CFLAGS], $with_cflags)
# ------------------------------------------------------------------------------