diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..845315f --- /dev/null +++ b/configure.ac @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0 + +AC_PREREQ([2.61]) + +AC_INIT([tfortune], [m4_esyscmd_s(./version-gen.sh)], + [maan@tuebingen.mpg.de], [], [http://people.tuebingen.mpg.de/maan/tfortune/]) +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([flex]) +REQUIRE_EXECUTABLE([bison]) +REQUIRE_EXECUTABLE([lopsubgen]) + +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. + Run the following command to download a copy. + git clone git://git.tuebingen.mpg.de/lopsub.git + Install the library, then run this configure script again. +]) +fi +AC_OUTPUT |
