1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Fix configure's search for collateindex.pl.

PGAC_PATH_COLLATEINDEX supposed that it could use AC_PATH_PROGS to search
for collateindex.pl, but that macro will only accept files that are marked
executable, and at least some DocBook installations don't mark the script
executable (a case the docs Makefile was already prepared for).  Accept the
script if it's present and readable in $DOCBOOKSTYLE/bin, and otherwise
search the PATH as before.

Having fixed that up, we don't need the fallback case that was in the docs
Makefile, and instead can throw an understandable error if configure didn't
find the script.  Per recent trouble report from John Lumby.
This commit is contained in:
Tom Lane
2012-03-22 00:46:03 -04:00
parent 0e85abd658
commit f2386d7136
3 changed files with 15 additions and 60 deletions

View File

@ -89,11 +89,14 @@ fi])# PGAC_PATH_DOCBOOK_STYLESHEETS
# PGAC_PATH_COLLATEINDEX
# ----------------------
# Some DocBook installations provide collateindex.pl in $DOCBOOKSTYLE/bin,
# but it's not necessarily marked executable, so we can't use AC_PATH_PROG
# to check for it there. Other installations just put it in the PATH.
AC_DEFUN([PGAC_PATH_COLLATEINDEX],
[AC_REQUIRE([PGAC_PATH_DOCBOOK_STYLESHEETS])dnl
if test -n "$DOCBOOKSTYLE"; then
AC_PATH_PROGS(COLLATEINDEX, collateindex.pl, [],
[$DOCBOOKSTYLE/bin $PATH])
if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
AC_SUBST([COLLATEINDEX])
else
AC_PATH_PROGS(COLLATEINDEX, collateindex.pl)
AC_PATH_PROG(COLLATEINDEX, collateindex.pl)
fi])# PGAC_PATH_COLLATEINDEX