Update copyright year.
[tfortune.git] / configure.ac
1 # SPDX-License-Identifier: GPL-3.0-only
2
3 AC_PREREQ([2.61])
4 AC_INIT([tfortune], [m4_esyscmd_s(./version-gen.sh)],
5         [maan@tuebingen.mpg.de], [], [http://people.tuebingen.mpg.de/maan/tfortune/])
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 REQUIRE_EXECUTABLE([lopsubgen])
20
21 HAVE_LOPSUB=yes
22 AC_CHECK_HEADER(lopsub.h, [], [HAVE_LOPSUB=no])
23 AC_CHECK_LIB([lopsub], [lls_merge], [], [HAVE_LOPSUB=no])
24 if test $HAVE_LOPSUB == no; then AC_MSG_ERROR([
25         The lopsub library is required to build this software, but
26         the above checks indicate it is not installed on your system.
27         Run the following command to download a copy.
28                 git clone git://git.tuebingen.mpg.de/lopsub.git
29         Install the library, then run this configure script again.
30
31         If you installed lopsub at a non-standard location, make sure to set
32         PATH, CPPFLAGS and LDFLAGS accordingly. For example:
33
34                 pfx=/prefix/where/lopsub/is/installed
35                 export PATH=\$pfx/bin:\$PATH
36                 export CPPFLAGS=-I\$pfx/include
37                 export LDFLAGS=-L\$pfx/lib
38 ])
39 fi
40 AC_OUTPUT