summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-15 13:18:17 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-08-15 13:18:17 -0400
commit39e07e62f471cbf40503cdc1926da6fef0cc0a3e (patch)
treec45259dd22402921f80067864b34d3ab9b258d58 /configure.ac
parent8d90ffb43214c390f6921e058a3cb164075ff1c5 (diff)
downloadrandom-seed-39e07e62f471cbf40503cdc1926da6fef0cc0a3e.tar.xz
random-seed-39e07e62f471cbf40503cdc1926da6fef0cc0a3e.zip
Source cleanups.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 813238a..e157917 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,10 @@
+# SPDX-License-Identifier: BSD-3-Clause
+
AC_INIT(random-seed, 0.1)
+AC_CONFIG_MACRO_DIRS([m4])
+
AC_LANG(C)
+
AC_CONFIG_HEADERS(config.h)
AC_PROG_CC
@@ -7,7 +12,7 @@ AC_PROG_CC_C99
AS_IF([test "$ac_cv_prog_cc_c99" = no],
[AC_MSG_ERROR([a C99 compatible compiler is required])])
-CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L"
+CPPFLAGS="${CPPFLAGS+$CPPFLAGS }-D_GNU_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L"
PKG_CHECK_VAR(systemdsystemunitdir, systemd, systemdsystemunitdir)
@@ -44,4 +49,8 @@ AC_DEFINE_UNQUOTED(DEFAULT_SEED_PATH, "$default_seed_path", [default seed path])
default_seed_path_dir=${default_seed_path%/*}
AC_SUBST(default_seed_path_dir)
+AX_CHECK_COMPILE_FLAG(-Wall, [CFLAGS="-Wall${CFLAGS+ $CFLAGS}"])
+AX_CHECK_COMPILE_FLAG(-Wextra, [CFLAGS="-Wextra${CFLAGS+ $CFLAGS}"])
+AX_CHECK_COMPILE_FLAG(-pedantic, [CFLAGS="-pedantic${CFLAGS+ $CFLAGS}"])
+
AC_OUTPUT(Makefile)