# SPDX-License-Identifier: GPL-3.0-only AC_PREREQ([2.61]) # only for configure -h, see Makefile AC_INIT([software], [packages]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([config.mak]) AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC AC_PROG_CPP AC_DEFUN([REQUIRE_EXECUTABLE], [ AC_PATH_PROG(m4_toupper([$1]), [$1]) test -z "$m4_toupper([$1])" && AC_MSG_ERROR([$1 is required]) ]) REQUIRE_EXECUTABLE([m4]) REQUIRE_EXECUTABLE([flex]) REQUIRE_EXECUTABLE([bison]) HAVE_LOPSUB=yes AC_CHECK_HEADER(lopsub.h, [], [HAVE_LOPSUB=no]) AC_CHECK_LIB([lopsub], [lls_merge], [], [HAVE_LOPSUB=no]) if test $HAVE_LOPSUB == no; then AC_MSG_ERROR([ The lopsub library is required to build this software, but the above checks indicate it is not installed on your system. On Debian/Ubuntu systems you may install the liblopsub-dev package. Alternatively, run the following command to download a copy. git clone https://git.tuebingen.mpg.de/lopsub.git Install the library, then run this configure script again. If you installed lopsub at a non-standard location, make sure to set PATH, CPPFLAGS and LDFLAGS accordingly. For example: pfx=/prefix/where/lopsub/is/installed export PATH=\$pfx/bin:\$PATH export CPPFLAGS=-I\$pfx/include export LDFLAGS=-L\$pfx/lib ]) fi REQUIRE_EXECUTABLE([lopsubgen]) AC_OUTPUT