From 0183098f9cb37a5389b8ff19dee98a4293752ce6 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Wed, 8 Aug 2018 15:16:14 -0400 Subject: Initial commit --- configure.ac | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..386fa5e --- /dev/null +++ b/configure.ac @@ -0,0 +1,24 @@ +AC_INIT(random-seed, 0.1) +AC_LANG(C) +AC_CONFIG_HEADERS(config.h) +AC_PROG_CC + +CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L" +CFLAGS="$CFLAGS -std=c99" + +PKG_HAVE_DEFINE_WITH_MODULES(SYSTEMD, libsystemd, , , [use libsystemd to get machine id]) +AS_IF([test "$with_systemd" = yes], + [PKG_CHECK_VAR(systemdsystemunitdir, systemd, systemdsystemunitdir)]) + +AC_ARG_ENABLE(debug, + AC_HELP_STRING(--enable-debug, [enable debug output [default=no]]), + [enable_debug=$enableval], + [enable_debug=no] + ) +AS_CASE([$enable_debug], + [yes], [AC_DEFINE(DEBUG, [], [enable debug output])], + [no], [], + [AC_MSG_ERROR([invalid argument to --enable-debug])] +) + +AC_OUTPUT(Makefile) -- cgit v1.2.3-54-g00ecf