1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-10-30 11:54:01 -04:00
libkernaux/configure.ac

88 lines
4.4 KiB
Text
Raw Normal View History

2020-11-27 04:28:13 -05:00
AC_PREREQ([2.68])
2020-11-27 05:33:23 -05:00
AC_INIT([libkernaux],
[0.0.0],
2021-12-12 07:13:52 -05:00
[https://github.com/tailix/libkernaux/issues],
2020-11-27 05:33:23 -05:00
[libkernaux],
2021-12-12 07:13:52 -05:00
[https://github.com/tailix/libkernaux])
2020-11-27 04:28:13 -05:00
2020-12-06 23:42:52 -05:00
AC_CONFIG_HEADERS([config.h])
2020-11-27 04:28:13 -05:00
AC_CONFIG_SRCDIR([src/pfa.c])
2020-11-29 23:13:13 -05:00
AC_CANONICAL_HOST
2020-11-29 22:27:43 -05:00
2021-12-15 05:45:40 -05:00
AC_ARG_ENABLE([cmdline], AS_HELP_STRING([--disable-cmdline], [disable command line parser]))
AC_ARG_ENABLE([console], AS_HELP_STRING([--disable-console], [disable serial console]))
AC_ARG_ENABLE([elf], AS_HELP_STRING([--disable-elf], [disable ELF utils]))
AC_ARG_ENABLE([multiboot2], AS_HELP_STRING([--disable-multiboot2], [disable Multiboot 2 information parser]))
AC_ARG_ENABLE([pfa], AS_HELP_STRING([--disable-pfa], [disable Page Frame Allocator]))
AC_ARG_ENABLE([units], AS_HELP_STRING([--disable-units], [disable measurement units utils]))
AC_ARG_ENABLE([assert], AS_HELP_STRING([--enable-assert], [enable runtime assertions]))
AC_ARG_ENABLE([libc], AS_HELP_STRING([--enable-libc], [enable libc replacement]))
AC_ARG_ENABLE([libc-memset], AS_HELP_STRING([--enable-libc-memset], [enable memset replacement]))
AC_ARG_ENABLE([libc-strcpy], AS_HELP_STRING([--enable-libc-strcpy], [enable strcpy replacement]))
AC_ARG_ENABLE([libc-strlen], AS_HELP_STRING([--enable-libc-strlen], [enable strlen replacement]))
2021-12-15 09:28:29 -05:00
AC_ARG_ENABLE([null-guard], AS_HELP_STRING([--enable-null-guard], [enable NULL-guard]))
2021-12-15 05:45:40 -05:00
AC_DEFUN([do_enable_libc],
[
if test -z "$enable_libc_memset"; then enable_libc_memset=yes; fi
if test -z "$enable_libc_strcpy"; then enable_libc_strcpy=yes; fi
if test -z "$enable_libc_strlen"; then enable_libc_strlen=yes; fi
])
AS_IF([test "$enable_libc" = yes], do_enable_libc)
AM_CONDITIONAL([ARCH_I386], [test "$host_cpu" = i386])
AM_CONDITIONAL([ARCH_X86_64], [test "$host_cpu" = x86_64])
AM_CONDITIONAL([ENABLE_CMDLINE], [test "$enable_cmdline" != no])
AM_CONDITIONAL([ENABLE_CONSOLE], [test "$enable_console" != no])
AM_CONDITIONAL([ENABLE_ELF], [test "$enable_elf" != no])
AM_CONDITIONAL([ENABLE_MULTIBOOT2], [test "$enable_multiboot2" != no])
AM_CONDITIONAL([ENABLE_PFA], [test "$enable_pfa" != no])
AM_CONDITIONAL([ENABLE_UNITS], [test "$enable_units" != no])
AM_CONDITIONAL([ENABLE_ASSERT], [test "$enable_assert" = yes])
AM_CONDITIONAL([ENABLE_LIBC], [test "$enable_libc" = yes])
AM_CONDITIONAL([ENABLE_LIBC_MEMSET], [test "$enable_libc_memset" = yes])
AM_CONDITIONAL([ENABLE_LIBC_STRCPY], [test "$enable_libc_strcpy" = yes])
AM_CONDITIONAL([ENABLE_LIBC_STRLEN], [test "$enable_libc_strlen" = yes])
2021-12-15 09:28:29 -05:00
AM_CONDITIONAL([ENABLE_NULL_GUARD], [test "$enable_null_guard" = yes])
2021-12-15 05:45:40 -05:00
AS_IF([test "$host_cpu" = i386], [AC_DEFINE([ARCH_I386], [1], [architecture is i386])])
AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ARCH_X86_64], [1], [architecture is x86_64])])
AS_IF([test "$enable_cmdline" != no], [AC_DEFINE([ENABLE_CMDLINE], [1], [enabled command line parser])])
AS_IF([test "$enable_console" != no], [AC_DEFINE([ENABLE_CONSOLE], [1], [enabled serial console])])
AS_IF([test "$enable_elf" != no], [AC_DEFINE([ENABLE_ELF], [1], [enabled ELF utils])])
AS_IF([test "$enable_multiboot2" != no], [AC_DEFINE([ENABLE_MULTIBOOT2], [1], [enabled Multiboot 2 information parser])])
AS_IF([test "$enable_pfa" != no], [AC_DEFINE([ENABLE_PFA], [1], [enabled Page Frame Allocator])])
AS_IF([test "$enable_units", != no], [AC_DEFINE([ENABLE_UNITS], [1], [enabled measurement units utils])])
AS_IF([test "$enable_assert" = yes], [AC_DEFINE([ENABLE_ASSERT], [1], [enabled runtime assertions])])
AS_IF([test "$enable_libc" = yes], [AC_DEFINE([ENABLE_LIBC], [1], [enabled libc replacement])])
AS_IF([test "$enable_libc_memset" = yes], [AC_DEFINE([ENABLE_LIBC_MEMSET], [1], [enabled memset replacement])])
AS_IF([test "$enable_libc_strcpy" = yes], [AC_DEFINE([ENABLE_LIBC_STRCPY], [1], [enabled strcpy replacement])])
AS_IF([test "$enable_libc_strlen" = yes], [AC_DEFINE([ENABLE_LIBC_STRLEN], [1], [enabled strlen replacement])])
2021-12-15 09:28:29 -05:00
AS_IF([test "$enable_null_guard" = yes], [AC_DEFINE([ENABLE_NULL_GUARD], [1], [enabled NULL-guard])])
2020-11-29 22:27:43 -05:00
2020-11-27 04:28:13 -05:00
AM_INIT_AUTOMAKE([1.9 subdir-objects -Wall -Werror])
AC_CONFIG_FILES([
Makefile
2020-11-27 05:29:53 -05:00
include/Makefile
2020-11-27 04:28:13 -05:00
])
AC_LANG([C])
2020-11-27 05:33:23 -05:00
AM_PROG_AR
AM_PROG_AS
2020-11-27 04:28:13 -05:00
AC_PROG_CC
2020-11-27 08:43:58 -05:00
AC_PROG_CC_C99
2020-11-27 04:28:13 -05:00
AC_PROG_RANLIB
2020-12-05 23:04:02 -05:00
AC_C_INLINE
2020-12-06 05:27:55 -05:00
AC_CHECK_HEADER_STDBOOL
2021-12-17 13:22:05 -05:00
AC_CHECK_HEADERS([stdarg.h stddef.h stdint.h])
2020-11-27 04:28:13 -05:00
AC_OUTPUT