############################ # Specify program versions # ############################ AC_PREREQ([2.70]) LT_PREREQ([2.4.2]) ################################## # Initialize Autoconf & Automake # ################################## AC_INIT([foobar], m4_normalize(m4_include([VERSION])), [mailto:user@foobar.org], [foobar], [https://foobar.org]) AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_FILES([ Makefile include/Makefile tests/Makefile ]) AM_INIT_AUTOMAKE([1.16 subdir-objects]) AC_SUBST([PACKAGE_DESCR], ['Foo Bar']) AC_SUBST([PACKAGE_VERSION_SO], m4_normalize(m4_include([VERSION_SO]))) ################# # Customization # ################# AC_LANG([C]) AC_PROG_CC AC_CHECK_HEADER_STDBOOL AS_IF([test "$ac_cv_header_stdbool_h" != yes], AC_MSG_ERROR([standard headers])) AC_ARG_ENABLE([werror], AS_HELP_STRING([--disable-werror], [disable -Werror])) AS_IF([test "$enable_werror" != no], [enable_werror=yes], [enable_werror=no]) AM_CONDITIONAL([ENABLE_WERROR], [test "$enable_werror" = yes]) AC_ARG_ENABLE([checks], AS_HELP_STRING([--enable-checks], [enable checks])) AS_IF([test "$enable_checks" != yes], [enable_werror=no], [enable_werror=yes]) AM_CONDITIONAL([ENABLE_CHECKS], [test "$enable_checks" = yes]) ########## # Finish # ########## LT_INIT AC_OUTPUT