2020-10-10 19:31:31 +00:00
|
|
|
dnl
|
|
|
|
dnl Copyright (C) 2020 CismonX <admin@cismon.net>
|
|
|
|
dnl
|
|
|
|
dnl Copying and distribution of this file, with or without modification, are
|
|
|
|
dnl permitted in any medium without royalty, provided the copyright notice and
|
|
|
|
dnl this notice are preserved. This file is offered as-is, without any warranty.
|
|
|
|
dnl
|
|
|
|
|
2020-01-30 10:11:10 +00:00
|
|
|
AC_PREREQ([2.69])
|
2021-01-26 07:32:41 +00:00
|
|
|
AC_INIT([u6a], [0.1.2], [bug-report@cismon.net])
|
2020-01-30 10:11:10 +00:00
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
|
|
AC_CONFIG_SRCDIR([src/u6a.c])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
|
|
|
|
|
2020-10-10 19:31:31 +00:00
|
|
|
# Check for operating system
|
2020-02-02 17:09:21 +00:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
case "${host_os}" in
|
|
|
|
linux*)
|
2020-03-15 08:21:18 +00:00
|
|
|
AC_SUBST([BASE64_ENCODE], [-w0])
|
|
|
|
AC_SUBST([BASE64_DECODE], [-d])
|
2020-02-02 17:09:21 +00:00
|
|
|
;;
|
|
|
|
darwin*)
|
2020-03-15 08:21:18 +00:00
|
|
|
AC_SUBST([BASE64_ENCODE], [-b0])
|
|
|
|
AC_SUBST([BASE64_DECODE], [-D])
|
2020-02-02 17:09:21 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2020-10-10 19:31:31 +00:00
|
|
|
# Checks for programs.
|
2020-06-05 08:54:30 +00:00
|
|
|
AC_PROG_CC_STDC
|
2020-01-30 10:11:10 +00:00
|
|
|
|
2020-10-10 19:31:31 +00:00
|
|
|
# Checks for header files.
|
2020-01-30 10:11:10 +00:00
|
|
|
AC_CHECK_HEADERS([arpa/inet.h inttypes.h stddef.h stdint.h stdlib.h string.h unistd.h],
|
|
|
|
[],
|
2020-02-02 17:09:21 +00:00
|
|
|
[AC_MSG_ERROR(["required header(s) not found"])])
|
2020-01-30 10:11:10 +00:00
|
|
|
|
2020-10-10 19:31:31 +00:00
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
2020-01-30 10:11:10 +00:00
|
|
|
AC_CHECK_HEADER_STDBOOL
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_RESTRICT
|
|
|
|
AC_TYPE_UINT16_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT8_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
2020-10-10 19:31:31 +00:00
|
|
|
# Checks for library functions.
|
2020-01-30 10:11:10 +00:00
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_CHECK_FUNCS([getopt_long strtoul])
|
|
|
|
|
|
|
|
AC_OUTPUT
|