1 # SPDX-License-Identifier: GPL-3.0-only
4 # only for configure -h, see Makefile
5 AC_INIT([software], [packages])
6 AC_CONFIG_HEADERS([config.h])
7 AC_CONFIG_FILES([config.mak])
8 AC_USE_SYSTEM_EXTENSIONS
12 AC_DEFUN([REQUIRE_EXECUTABLE], [
13 AC_PATH_PROG(m4_toupper([$1]), [$1])
14 test -z "$m4_toupper([$1])" && AC_MSG_ERROR([$1 is required])
16 REQUIRE_EXECUTABLE([m4])
17 REQUIRE_EXECUTABLE([flex])
18 REQUIRE_EXECUTABLE([bison])
21 AC_CHECK_HEADER(lopsub.h, [], [HAVE_LOPSUB=no])
22 AC_CHECK_LIB([lopsub], [lls_merge], [], [HAVE_LOPSUB=no])
23 if test $HAVE_LOPSUB == no; then AC_MSG_ERROR([
24 The lopsub library is required to build this software, but
25 the above checks indicate it is not installed on your system.
27 On Debian/Ubuntu systems you mny install the liblopsub-dev package.
28 Alternatively, run the following command to download a copy.
29 git clone https://git.tuebingen.mpg.de/lopsub.git
30 Install the library, then run this configure script again.
32 If you installed lopsub at a non-standard location, make sure to set
33 PATH, CPPFLAGS and LDFLAGS accordingly. For example:
35 pfx=/prefix/where/lopsub/is/installed
36 export PATH=\$pfx/bin:\$PATH
37 export CPPFLAGS=-I\$pfx/include
38 export LDFLAGS=-L\$pfx/lib
41 REQUIRE_EXECUTABLE([lopsubgen])