Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f2386d7

Browse files
committed
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.
1 parent 0e85abd commit f2386d7

File tree

3 files changed

+15
-60
lines changed

3 files changed

+15
-60
lines changed

config/docbook.m4

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,14 @@ fi])# PGAC_PATH_DOCBOOK_STYLESHEETS
8989

9090
# PGAC_PATH_COLLATEINDEX
9191
# ----------------------
92+
# Some DocBook installations provide collateindex.pl in $DOCBOOKSTYLE/bin,
93+
# but it's not necessarily marked executable, so we can't use AC_PATH_PROG
94+
# to check for it there. Other installations just put it in the PATH.
9295
AC_DEFUN([PGAC_PATH_COLLATEINDEX],
9396
[AC_REQUIRE([PGAC_PATH_DOCBOOK_STYLESHEETS])dnl
94-
if test -n "$DOCBOOKSTYLE"; then
95-
AC_PATH_PROGS(COLLATEINDEX, collateindex.pl, [],
96-
[$DOCBOOKSTYLE/bin $PATH])
97+
if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
98+
COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
99+
AC_SUBST([COLLATEINDEX])
97100
else
98-
AC_PATH_PROGS(COLLATEINDEX, collateindex.pl)
101+
AC_PATH_PROG(COLLATEINDEX, collateindex.pl)
99102
fi])# PGAC_PATH_COLLATEINDEX

configure

Lines changed: 4 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -29430,57 +29430,12 @@ else
2943029430
{ $as_echo "$as_me:$LINENO: result: no" >&5
2943129431
$as_echo "no" >&6; }
2943229432
fi
29433-
if test -n "$DOCBOOKSTYLE"; then
29434-
for ac_prog in collateindex.pl
29435-
do
29436-
# Extract the first word of "$ac_prog", so it can be a program name with args.
29437-
set dummy $ac_prog; ac_word=$2
29438-
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
29439-
$as_echo_n "checking for $ac_word... " >&6; }
29440-
if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
29441-
$as_echo_n "(cached) " >&6
29442-
else
29443-
case $COLLATEINDEX in
29444-
[\\/]* | ?:[\\/]*)
29445-
ac_cv_path_COLLATEINDEX="$COLLATEINDEX" # Let the user override the test with a path.
29446-
;;
29447-
*)
29448-
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29449-
for as_dir in $DOCBOOKSTYLE/bin $PATH
29450-
do
29451-
IFS=$as_save_IFS
29452-
test -z "$as_dir" && as_dir=.
29453-
for ac_exec_ext in '' $ac_executable_extensions; do
29454-
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29455-
ac_cv_path_COLLATEINDEX="$as_dir/$ac_word$ac_exec_ext"
29456-
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
29457-
break 2
29458-
fi
29459-
done
29460-
done
29461-
IFS=$as_save_IFS
29433+
if test -n "$DOCBOOKSTYLE" -a -r "$DOCBOOKSTYLE/bin/collateindex.pl"; then
29434+
COLLATEINDEX="$DOCBOOKSTYLE/bin/collateindex.pl"
2946229435

29463-
;;
29464-
esac
29465-
fi
29466-
COLLATEINDEX=$ac_cv_path_COLLATEINDEX
29467-
if test -n "$COLLATEINDEX"; then
29468-
{ $as_echo "$as_me:$LINENO: result: $COLLATEINDEX" >&5
29469-
$as_echo "$COLLATEINDEX" >&6; }
2947029436
else
29471-
{ $as_echo "$as_me:$LINENO: result: no" >&5
29472-
$as_echo "no" >&6; }
29473-
fi
29474-
29475-
29476-
test -n "$COLLATEINDEX" && break
29477-
done
29478-
29479-
else
29480-
for ac_prog in collateindex.pl
29481-
do
29482-
# Extract the first word of "$ac_prog", so it can be a program name with args.
29483-
set dummy $ac_prog; ac_word=$2
29437+
# Extract the first word of "collateindex.pl", so it can be a program name with args.
29438+
set dummy collateindex.pl; ac_word=$2
2948429439
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2948529440
$as_echo_n "checking for $ac_word... " >&6; }
2948629441
if test "${ac_cv_path_COLLATEINDEX+set}" = set; then
@@ -29519,9 +29474,6 @@ $as_echo "no" >&6; }
2951929474
fi
2952029475

2952129476

29522-
test -n "$COLLATEINDEX" && break
29523-
done
29524-
2952529477
fi
2952629478
for ac_prog in xsltproc
2952729479
do

doc/src/sgml/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ all: html man
2727
distprep: html distprep-man
2828

2929

30-
ifndef COLLATEINDEX
31-
COLLATEINDEX = $(DOCBOOKSTYLE)/bin/collateindex.pl
32-
endif
33-
3430
ifndef JADE
3531
JADE = jade
3632
endif
@@ -120,7 +116,11 @@ HTML.index: postgres.sgml $(ALMOSTALLSGML) stylesheet.dsl
120116
$(JADE.html.call) -V html-index $<
121117

122118
bookindex.sgml: HTML.index
119+
ifdef COLLATEINDEX
123120
LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g -i 'bookindex' -o $@ $<
121+
else
122+
@$(missing) collateindex.pl $< $@
123+
endif
124124

125125
# Technically, this should depend on Makefile.global, but then
126126
# version.sgml would need to be rebuilt after every configure run,

0 commit comments

Comments
 (0)