]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
build: Improve lopsub error diagnostics.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 8 Jul 2017 16:43:00 +0000 (18:43 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Fri, 14 Jul 2017 13:37:05 +0000 (15:37 +0200)
The configure script checks for the lopsubgen executable, the lopsub.h
header file and the liblopsub.a library. If the executable is not
found, we print a short error while a long error message with download
instructions is shown if the header file or the library is missing.

In the common failure case none of the three files is installed,
in which case we print the short message because the check for the
executable comes first. This is unfortunate.

This commit moves the check for the executable to the lopsub section
of configure.ac and prints the long error message if any of the three
files is missing.

configure.ac

index ee1c3d82697e023185803af65b2dc7604c047002..6d56e6526e13d9f3f9aa47c0306d9b271136c872 100644 (file)
@@ -55,10 +55,6 @@ AC_PATH_PROG([M4], [m4])
 test -z "$M4" && AC_MSG_ERROR(
        [The m4 macro processor is required to build this package])
 
-AC_PATH_PROG([lopsubgen], [lopsubgen])
-test -z "$lopsubgen" && AC_MSG_ERROR(
-       [lopsubgen is required to build this package])
-
 AC_PROG_CC
 AC_PROG_CPP
 
@@ -72,9 +68,11 @@ AC_CHECK_LIB([osl], [osl_open_table], [], [HAVE_OSL=no])
 LIB_SUBST_FLAGS(osl)
 UNSTASH_FLAGS
 ######################################################################## lopsub
+HAVE_LOPSUB=yes
+AC_PATH_PROG([lopsubgen], [lopsubgen])
+test -z "$lopsubgen" && HAVE_LOPSUB=no
 STASH_FLAGS
 LIB_ARG_WITH([lopsub], [-llopsub])
-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([