Add GNU conformant files

This commit is contained in:
2024-11-22 14:49:03 +11:00
parent fdfba7be5b
commit 466971f1a0
6 changed files with 138 additions and 24 deletions
+5 -23
View File
@@ -1,8 +1,5 @@
AC_INIT([The Harriman-Peikoff Project],[0.00],[latentprion@gmail.com],[harikoff],[github.com/latentprion/harikoff])
AC_DEFUN([TEST_IS_NUMBER], [`echo $1 | grep -c '^[0-9]\+$'` -gt 0])
AC_DEFUN([TEST_NOT_NUMBER], [`echo $1 | grep -c '^[0-9]\+$'` -eq 0])
# Safety checks in case user overwritten --srcdir
AC_CONFIG_SRCDIR(core/main.cpp)
@@ -10,30 +7,15 @@ AC_CONFIG_SRCDIR(core/main.cpp)
# 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])
# Init automake, and specify this program follows the gnu coding standards.
AM_INIT_AUTOMAKE([-Wall -Werror])
# Add standard GNU files
AC_CONFIG_FILES([ChangeLog COPYING AUTHORS INSTALL README])
AC_PROG_CC
AC_PROG_CXX
# AC_CHECK_HEADERS([stdio.h])
# AC_MSG_ERROR([You must set the number of sensors with num_sensors], 1))
AS_IF([test "X$num_sensors" = "X"],
AC_MSG_ERROR([You must set num_sensors]))
AS_IF([test `echo $num_sensors | grep -c '^[0-9]\+$'` -gt 0],
AC_MSG_ERROR([num_sensors must be an integer]))
AS_IF([test $num_sensors -lt 1],
AC_MSG_ERROR([Harikoff needs at least 1 sensor]))
num_sensors_desc="Number of sensors harikoff has direct purview over"
AC_ARG_VAR([num_sensors],
AS_HELP_STRING([num_sensors=<n>],[$num_sensors_desc]))
AC_DEFINE_UNQUOTED([CONFIG_NUM_SENSORS], [$num_sensors], [$num_sensors_desc])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile core/Makefile])