1 # SPDX-License-Identifier: GPL-2.0+
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([LOPSUB_NOT_FOUND], [
13 The lopsub library is required to build this software, but the checks
14 indicate it is not installed on your system. Run the following
15 command to download a copy.
16 git clone git://git.tuebingen.mpg.de/lopsub.git
17 Install the library, then run this configure script again.
19 If you installed lopsub at a non-standard location, make sure to set
20 PATH, CPPFLAGS and LDFLAGS accordingly. For example:
22 pfx=/prefix/where/lopsub/is/installed
23 export PATH=\$pfx/bin:\$PATH
24 export CPPFLAGS=-I\$pfx/include
25 export LDFLAGS=-L\$pfx/lib
28 AC_DEFUN([REQUIRE_EXECUTABLE], [
29 AC_PATH_PROG(m4_toupper([$1]), [$1])
30 test -z "$m4_toupper([$1])" && AC_MSG_ERROR([$2])
32 REQUIRE_EXECUTABLE([lopsubgen], [LOPSUB_NOT_FOUND])
33 REQUIRE_EXECUTABLE([m4], [m4 is required to build this package])
36 AC_CHECK_HEADER(lopsub.h, [], [HAVE_LOPSUB=no])
37 AC_CHECK_LIB([lopsub], [lls_merge], [], [HAVE_LOPSUB=no])
38 if test $HAVE_LOPSUB = no; then AC_MSG_ERROR([LOPSUB_NOT_FOUND()]); fi