diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2012-03-22 00:46:03 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2012-03-22 00:46:03 -0400 |
| commit | f2386d7136dacbb8bf59ebbe8e5c5b73db202813 (patch) | |
| tree | 33af812cfc47a678d3170538618cade6bd5f3d23 /config | |
| parent | 0e85abd658738db9ea183c133c89c3c94ee37dae (diff) | |
| download | postgresql-f2386d7136dacbb8bf59ebbe8e5c5b73db202813.tar.gz | |
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.
Diffstat (limited to 'config')
| -rw-r--r-- | config/docbook.m4 | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/config/docbook.m4 b/config/docbook.m4 index 636aefed4c..4304fa7ea1 100644 --- a/config/docbook.m4 +++ b/config/docbook.m4 @@ -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 |
