From 5f341e4c20767f08165776bdf559b096dc8996e9 Mon Sep 17 00:00:00 2001 From: David Timber Date: Fri, 27 Dec 2019 18:22:18 +1100 Subject: initial commit --- configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 configure.ac (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..8779eec --- /dev/null +++ b/configure.ac @@ -0,0 +1,42 @@ +AC_INIT([proone], [0.0.0], []) + +: ${CFLAGS=""} +: ${CXXFLAGS=""} + +AM_INIT_AUTOMAKE([1.0 subdir-objects]) +AC_CANONICAL_HOST +AC_LANG([C]) +AC_PROG_CC +AC_PROG_RANLIB + +AC_ARG_ENABLE(debug, +AS_HELP_STRING([--enable-debug], + [build with debug flags, default: no]), +[case "${enableval}" in + yes) debug=true ;; + no) debug=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; +esac], +[debug=false]) +AM_CONDITIONAL(DEBUG, test x"$debug" = x"true") + +AC_ARG_ENABLE(tests, +AS_HELP_STRING([--enable-tests], + [build tests, default: no]), +[case "${enableval}" in + yes) tests=true ;; + no) tests=false ;; + *) AC_MSG_ERROR([bad value ${enableval} for --enable-tests]) ;; +esac], +[tests=false]) +AM_CONDITIONAL(TESTS, test x"$tests" = x"true") +AM_COND_IF([TESTS], [ + AC_CHECK_HEADERS([gtest/gtest.h], + [], + [AC_MSG_ERROR([gtest/gtest.h not found.])]) +]) + +PKG_CHECK_MODULES_STATIC([DEP], [zlib openssl]) + +AC_CONFIG_FILES([Makefile src/Makefile]) +AC_OUTPUT -- cgit