AC_PREREQ([2.71]) AC_INIT([ZUBR],[4.1.0],[Andrey V.Kosteltsev ],[zubr],[https://radix-linux.su]) AC_ZUBR_REQUIRE_BASH AC_ZUBR_HEADLINE([zubr], [Parser Generator], [ZUBR_VERSION],dnl [Copyright (c) 1999-2026 Andrey V.Kosteltsev])dnl AC_MSG_CFG_PART(Init Automake environment) AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip]) AC_CONFIG_HEADERS([config.h]) AC_MSG_CFG_PART(Test for GNU Compiler Colection) AC_PROG_CC if test $ac_cv_c_compiler_gnu != yes; then AC_MSG_ERROR([ ******** ${TB}ZUBR should be compiled using the GNU compiler only.${TN}]) fi AC_PROG_CPP AC_MSG_CFG_PART(Test for Standard C Headers) AC_CHECK_HEADERS([stdlib.h unistd.h signal.h]) if test "$ac_cv_header_stdlib_h" != yes; then AC_MSG_ERROR([ ******** ${TB}The stdlib.h header file is required.${TN}]) fi if test "$ac_cv_header_unistd_h" != yes; then AC_MSG_ERROR([ ******** ${TB}The unistd.h header file is required.${TN}]) fi if test "$ac_cv_header_signal_h" != yes; then AC_MSG_ERROR([ ******** ${TB}The signal.h header file is required.${TN}]) fi AC_MSG_CFG_PART(Test for Target Machine Data Types) AC_MSG_CHECKING([for number of bits in int]) AC_COMPUTE_INT([zubr_bits_per_int], [sizeof(int) * CHAR_BIT], [[#include ]], [AC_MSG_ERROR([cannot determine the number of bits in int])]) AC_MSG_RESULT([$zubr_bits_per_int]) AS_CASE([$zubr_bits_per_int], [16|32|64], [], [AC_MSG_ERROR([unsupported int width: $zubr_bits_per_int bits])]) ZUBR_BITS_PER_INT=$zubr_bits_per_int AC_SUBST([ZUBR_BITS_PER_INT]) AC_MSG_CFG_PART(Test for LibMPUIO) dnl ============================================================ dnl Check for LibMPU dnl ============================================================ AC_CHECK_LIBMPU( [1.0.25], [yes], [ AC_DEFINE( [HAVE_LIBMPU], [1], [Define to 1 if LibMPU is available.] ) ], [ AC_MSG_ERROR([LibMPU version 1.0.25 or later is required.]) ] ) dnl ============================================================ dnl Check for LibMPUIO dnl ============================================================ AC_CHECK_LIBMPUIO( [1.0.4], [yes], [ AC_DEFINE( [HAVE_LIBMPUIO], [1], [Define to 1 if LibMPUIO is available.] ) ], [ AC_MSG_ERROR([LibMPUIO version 1.0.4 or later is required.]) ] ) AC_MSG_CFG_PART(OUTPUT Substitutions) AC_CONFIG_FILES([ Makefile src/Makefile src/defs.h man/Makefile man/ru/Makefile ]) AC_OUTPUT if test -f "config.h"; then echo "" echo "Now you can run:" echo " \`${TB}make${TN}' to compile," echo " \`${TB}make install${TN}' to make and install ${TB}ZUBR${TN}," echo " \`${TB}make dist${TN}' to create distributable tarballs, or" echo " \`${TB}make distclean${TN}' to clean before configure for another target." echo "Good luck." echo "" fi