]> git.tuebingen.mpg.de Git - tfortune.git/blob - configure.ac
debian: Update release notes for lintian-clean upload.
[tfortune.git] / configure.ac
1 # SPDX-License-Identifier: GPL-3.0-only
2
3 AC_PREREQ([2.61])
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
9 AC_PROG_CC
10 AC_PROG_CPP
11
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])
15 ])
16 REQUIRE_EXECUTABLE([m4])
17 REQUIRE_EXECUTABLE([flex])
18 REQUIRE_EXECUTABLE([bison])
19
20 HAVE_LOPSUB=yes
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.
26
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.
31
32         If you installed lopsub at a non-standard location, make sure to set
33         PATH, CPPFLAGS and LDFLAGS accordingly. For example:
34
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
39 ])
40 fi
41 REQUIRE_EXECUTABLE([lopsubgen])
42 AC_OUTPUT