summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2022-01-31 17:25:17 +0200
committergramanas <anastasis.gramm2@gmail.com>2022-01-31 17:25:17 +0200
commitc9605d74204f2502ba57b8e9acd21350f07bf032 (patch)
tree0f961263f97730b3388ad25a3af48b1b5b6cccfd /configure.ac
parent53ab9ae05a579a19c626e8be0c1e2cf9244bf863 (diff)
downloadfoodtools-c9605d74204f2502ba57b8e9acd21350f07bf032.tar.gz
foodtools-c9605d74204f2502ba57b8e9acd21350f07bf032.tar.bz2
foodtools-c9605d74204f2502ba57b8e9acd21350f07bf032.zip
Move project to autoconf
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 45 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..e7ff39d
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,45 @@
+# Must init the autoconf setup
+# The first parameter is project name
+# second is version number
+# third is bug report address
+AC_INIT([foodtools], [0.0.1])
+
+# Safety checks in case user overwritten --srcdir
+# AC_CONFIG_SRCDIR([src/food.c])
+
+# Store the auxiliary build tools (e.g., install-sh, config.sub, config.guess)
+# in this dir (build-aux)
+AC_CONFIG_AUX_DIR([build-aux])
+
+# Init automake, and specify this program use relaxed structures.
+# i.e. this program doesn't follow the gnu coding standards, and doesn't have
+# ChangeLog, COPYING, AUTHORS, INSTALL, README etc. files.
+AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects dist-xz])
+
+# Check for C compiler
+AC_PROG_CC
+# We can add more checks in this section
+
+PKG_CHECK_MODULES([CHECK], [check])
+
+AC_CHECK_FUNCS([memset])
+AC_CHECK_FUNCS([strcasecmp])
+AC_CHECK_FUNCS([strdup])
+AC_CHECK_FUNCS([strerror])
+AC_CHECK_FUNCS([strstr])
+AC_CHECK_FUNCS([strtol])
+AC_CHECK_HEADERS([stdint.h])
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_TYPE_INT32_T
+AC_TYPE_SIZE_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+AC_TYPE_UINT8_T
+
+# Tells automake to create a Makefile
+# See https://www.gnu.org/software/automake/manual/html_node/Requirements.html
+AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
+
+# Generate the output
+AC_OUTPUT