]> git.tue.mpg.de Git - tfortune.git/commitdiff
Improve lopsub error diagnostics.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 22 Apr 2024 23:28:38 +0000 (01:28 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 28 Apr 2024 14:08:03 +0000 (16:08 +0200)
If the lopsub package is not installed, the check for the lopsubgen
executable is the first thing that fails, so we print "lopsubgen
required" and exit without also showing the detailed information
which tells the user how to obtain the package.

Move the check down, so that the build fails with the detailed message,
and also educate the user that lopsub is also available as a Debian
package.

Reviewed-by: Andreas Metzler <ametzler@bebt.de>
configure.ac

index 57e7d200f35c9bdb9bc64ed9e38a210c7a6b4618..0518719ab1018e147f9ddcbd88df5f3e80d92279 100644 (file)
@@ -16,7 +16,6 @@ AC_DEFUN([REQUIRE_EXECUTABLE], [
 REQUIRE_EXECUTABLE([m4])
 REQUIRE_EXECUTABLE([flex])
 REQUIRE_EXECUTABLE([bison])
-REQUIRE_EXECUTABLE([lopsubgen])
 
 HAVE_LOPSUB=yes
 AC_CHECK_HEADER(lopsub.h, [], [HAVE_LOPSUB=no])
@@ -24,7 +23,9 @@ 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.
+
+       On Debian/Ubuntu systems you mny install the liblopsub-dev package.
+       Alternatively, 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.
 
@@ -37,4 +38,5 @@ if test $HAVE_LOPSUB == no; then AC_MSG_ERROR([
                export LDFLAGS=-L\$pfx/lib
 ])
 fi
+REQUIRE_EXECUTABLE([lopsubgen])
 AC_OUTPUT