summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/xindy/INSTALL7
-rw-r--r--Build/source/utils/xindy/binaries/Makefile.am11
-rw-r--r--Build/source/utils/xindy/configure.ac85
-rw-r--r--Build/source/utils/xindy/doc/Makefile.am3
-rw-r--r--Build/source/utils/xindy/doc/style-tutorial/Makefile.am2
-rw-r--r--Build/source/utils/xindy/make-rules/alphabets/Makefile.am8
-rw-r--r--Build/source/utils/xindy/make-rules/inputenc/Makefile.am6
-rw-r--r--Build/source/utils/xindy/make-rules/styles/Makefile.am6
-rw-r--r--Build/source/utils/xindy/modules/base/Makefile.am6
-rw-r--r--Build/source/utils/xindy/modules/class/Makefile.am6
-rw-r--r--Build/source/utils/xindy/modules/lang/german/Makefile.am6
-rw-r--r--Build/source/utils/xindy/modules/lang/latin/Makefile.am6
-rw-r--r--Build/source/utils/xindy/modules/ord/Makefile.am6
-rw-r--r--Build/source/utils/xindy/modules/rules/Makefile.am6
-rw-r--r--Build/source/utils/xindy/modules/styles/Makefile.am6
-rw-r--r--Build/source/utils/xindy/rte/Makefile.am18
-rw-r--r--Build/source/utils/xindy/rte/ordrules/Makefile.in4
-rw-r--r--Build/source/utils/xindy/user-commands/Makefile.am15
-rwxr-xr-xBuild/source/utils/xindy/user-commands/texindy2
-rw-r--r--Build/source/utils/xindy/user-commands/xindy.in18
-rw-r--r--Build/source/utils/xindy/user-commands/xindy.v2.in4
21 files changed, 157 insertions, 74 deletions
diff --git a/Build/source/utils/xindy/INSTALL b/Build/source/utils/xindy/INSTALL
index 89f55683508..23184d35b3e 100644
--- a/Build/source/utils/xindy/INSTALL
+++ b/Build/source/utils/xindy/INSTALL
@@ -29,10 +29,9 @@ about other compilers.
xindy contains CLISP, see http://clisp.cons.org/. If you have CLISP
installed already, you can use it with the configure option
---enable-external-clisp, maybe you need to specify --enable-clisp-path and
---enable-clisp-dir, too. This is not intensively tested, though; if you have
-problems with the resulting xindy system, please try it again with the
-xindy-internal CLISP.
+--with-external-clisp[=PATH]. This is not intensively tested, though;
+if you have problems with the resulting xindy system, please try it
+again with the xindy-internal CLISP.
diff --git a/Build/source/utils/xindy/binaries/Makefile.am b/Build/source/utils/xindy/binaries/Makefile.am
index ebc00f3b851..be5396ce9c6 100644
--- a/Build/source/utils/xindy/binaries/Makefile.am
+++ b/Build/source/utils/xindy/binaries/Makefile.am
@@ -28,12 +28,15 @@ DUMP_XINDY = $(SRCDIR)/dump-xindy.lsp
MEMFILE = xindy.mem
XINDY_RUN = ./xindy.run -q -M ./base.mem
+if TETEX_BUILD
+ MODULEDIR = $(prefix)/texmf/scripts/xindy
+ kerneldir = $(bindir)
+else
# Where the modules are found at runtime.
-MODULEDIR = $(pkgdatadir)
-
+ MODULEDIR = $(pkgdatadir)
# Where the files xindy.run and xindy.mem should be installed.
-kerneldir = $(pkglibdir)
-
+ kerneldir = $(pkglibdir)
+endif
xindy.mem: $(DEFAULTS) $(FAS) base.mem xindy.run
rm -f $(MEMFILE)
diff --git a/Build/source/utils/xindy/configure.ac b/Build/source/utils/xindy/configure.ac
index a328647b2aa..37f26509351 100644
--- a/Build/source/utils/xindy/configure.ac
+++ b/Build/source/utils/xindy/configure.ac
@@ -40,7 +40,7 @@ AC_PROG_MAKE_SET
AC_PROG_GCC_TRADITIONAL
dnl test for building make-rules
-AC_ARG_ENABLE(make-rules, AS_HELP_STRING([--enable-make-rules ],[build and install make-rules package (default is YES)]),[BUILDRULES=$enableval],[BUILDRULES=yes])
+AC_ARG_ENABLE(make-rules, AS_HELP_STRING([--enable-make-rules],[build and install make-rules package (default is YES)]),[BUILDRULES=$enableval],[BUILDRULES=yes])
if test "$BUILDRULES" = "yes"; then
AC_PROG_LATEX
@@ -49,7 +49,7 @@ fi
AM_CONDITIONAL(BUILDRULES, test "$BUILDRULES" = "yes")
dnl test for building Documentation
-AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs ],[build and install documentation (default is YES)]),[BUILDDOCS=$enableval],[BUILDDOCS=yes])
+AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs],[build and install documentation (default is YES)]),[BUILDDOCS=$enableval],[BUILDDOCS=yes])
if test "$BUILDDOCS" = "yes"; then
AC_PROG_PDFLATEX
@@ -57,34 +57,65 @@ fi
AM_CONDITIONAL(BUILDDOCS, test "$BUILDDOCS" = "yes")
+# Building inside teTeX or TeX Live?
+AC_ARG_ENABLE(tetex-build, AS_HELP_STRING([--enable-tetex-build],[Build as part of a teTeX installation]))
+
+if test "x$enable_tetex_build" = xyes; then
+ if test ! -d $srcdir/../../texk/kpathsea; then
+ AC_MSG_ERROR([
+=========================================
+
+You specified --enable-tetex-build, but I can't find the kpathsea
+directory. I expected it to be in $srcdir/../../texk/kpathsea.
+
+=========================================])
+ fi
+ docdir="$prefix/texmf/doc/$PACKAGE_NAME"
+else
+ docdir="$datadir/doc/$PACKAGE_NAME-$PACKAGE_VERSION"
+fi
+AM_CONDITIONAL([TETEX_BUILD],[test "x$enable_tetex_build" = xyes])
+
dnl use external or internal CLISP
-AC_ARG_ENABLE(external-clisp, AS_HELP_STRING([--enable-external-clisp],[Use an external CLISP instead of the one in rte/]),[EXT_CLISP=$enableval],[EXT_CLISP=no])
-
-dnl test for CLISP
-AC_ARG_ENABLE(clisp-path, AS_HELP_STRING([--enable-clisp-path],[Where to search the external CLISP]),[CLISP_PATH=$enableval],[CLISP_PATH=$(which clisp)])
-
-dnl test for CLISP linkkit
-AC_ARG_ENABLE(clisp-dir, AS_HELP_STRING([--enable-clisp-dir],[Where to seach the external CLISP library]),[CLISP_DIR=$enableval],[CLISP_DIR=/usr/lib/clisp])
-
-if test "$EXT_CLISP" != no; then
- AM_CONDITIONAL(EXT_CLISP, test -x "$CLISP_PATH" -a -x "$CLISP_DIR/clisp-link" -a -d "$CLISP_DIR/full" -a -d "$CLISP_DIR/linkkit")
- AC_SUBST(CLISP_PATH)
- AC_SUBST(CLISP_DIR)
-
- if test -n "$EXT_CLISP_TRUE"; then
- if test "$EXT_CLISP" = yes; then
- echo Help me! I should use an external CLISP, but I can\'t find it. >&2
- exit 1
- else
- echo Using internal clisp
- EXT_CLISP=no
- fi
- else
- echo Using external clisp
- fi
+AC_ARG_WITH(external-clisp, AS_HELP_STRING([--with-external-clisp@<:@=PATH@:>@],[Use the external CLISP binary instead of re-building CLISP from source in the rte/ directory]))
+
+CLISP=
+if test "x$with_external_clisp" = xyes; then
+ AC_PATH_PROG(CLISP, clisp)
+ if test -z "$CLISP"; then
+ AC_MSG_ERROR([--with-external-clisp specified, but clisp binary not found in PATH])
+ fi
+elif test "x$with_external_clisp" = xno; then
+ if test -d "$srcdir/rte/clisp-2.43"; then
+ AC_MSG_NOTICE([Using internal clisp])
+ else
+ AC_MSG_ERROR([--without-external-clisp specified, but clisp source directory not found at $srcdir/rte/clisp-2.43])
+ fi
+elif test -n "$with_external_clisp"; then
+ CLISP="$with_external_clisp"
else
- AM_CONDITIONAL(EXT_CLISP, false)
+ AC_PATH_PROG(CLISP, clisp)
+ if test -n "$CLISP"; then
+ :
+ elif test -d "$srcdir/rte/clisp-2.43"; then
+ AC_MSG_NOTICE([Using internal clisp])
+ else
+ AC_MSG_ERROR([clisp binary not found in PATH, nor the clisp source directory at $srcdir/rte/clisp-2.43])
+ fi
+fi
+
+if test -n "$CLISP"; then
+ test -x "$CLISP" || AC_MSG_ERROR([clisp binary is not executable: $CLISP])
+ AC_MSG_CHECKING([for clisp library directory])
+ CLISP_LIB=$($CLISP -q -norc -x '(progn (princ *lib-directory*) (values))')
+ AC_MSG_RESULT([$CLISP_LIB])
+ test -f "$CLISP_LIB/clisp-link" || AC_MSG_ERROR([expected file is not found: $CLISP_LIB/clisp-link])
+ test -d "$CLISP_LIB/full" || AC_MSG_ERROR([expected directory is not found: $CLISP_LIB/full])
+ test -d "$CLISP_LIB/linkkit" || AC_MSG_ERROR([expected directory is not found: $CLISP_LIB/linkkit])
+ AC_MSG_NOTICE([Using external clisp])
fi
+AC_SUBST(CLISP)
+AM_CONDITIONAL([EXT_CLISP], [test -n "$CLISP"])
# Checks for libraries.
AC_CHECK_LIB([fl], [main])
diff --git a/Build/source/utils/xindy/doc/Makefile.am b/Build/source/utils/xindy/doc/Makefile.am
index fe89369a952..5ce2177d487 100644
--- a/Build/source/utils/xindy/doc/Makefile.am
+++ b/Build/source/utils/xindy/doc/Makefile.am
@@ -21,9 +21,6 @@
SUBDIRS = style-tutorial
-docdir = $(datadir)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
-
-
FILES = \
dataflow.gif \
faq-1.html \
diff --git a/Build/source/utils/xindy/doc/style-tutorial/Makefile.am b/Build/source/utils/xindy/doc/style-tutorial/Makefile.am
index 20c1442b0c7..1f89eb655ea 100644
--- a/Build/source/utils/xindy/doc/style-tutorial/Makefile.am
+++ b/Build/source/utils/xindy/doc/style-tutorial/Makefile.am
@@ -19,8 +19,6 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-docdir = $(datadir)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
-
tutorialdir = $(docdir)/style-tutorial
FILES = \
diff --git a/Build/source/utils/xindy/make-rules/alphabets/Makefile.am b/Build/source/utils/xindy/make-rules/alphabets/Makefile.am
index 37313ea7eff..6449bed5149 100644
--- a/Build/source/utils/xindy/make-rules/alphabets/Makefile.am
+++ b/Build/source/utils/xindy/make-rules/alphabets/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-langdir = $(pkgdatadir)/lang
+if TETEX_BUILD
+ langdir = $(prefix)/texmf/scripts/xindy/lang
+else
+ langdir = $(pkgdatadir)/lang
+endif
albaniandir = $(langdir)/albanian
@@ -1145,8 +1149,6 @@ alphabets-inc.tex : $(DOCS)
# for i in $(DOCS_UTF8); do echo "\input{$$i}" >>$@; done
# echo "\ienc{utf8}" >>$@
-docdir = $(datadir)/doc/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
-
# whether to build docs
if BUILDRULES
diff --git a/Build/source/utils/xindy/make-rules/inputenc/Makefile.am b/Build/source/utils/xindy/make-rules/inputenc/Makefile.am
index d091682fff5..b4081c65e60 100644
--- a/Build/source/utils/xindy/make-rules/inputenc/Makefile.am
+++ b/Build/source/utils/xindy/make-rules/inputenc/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-modulesdir = $(pkgdatadir)
+if TETEX_BUILD
+ modulesdir = $(prefix)/texmf/scripts/xindy
+else
+ modulesdir = $(pkgdatadir)
+endif
inputencdir = $(modulesdir)/tex/inputenc
diff --git a/Build/source/utils/xindy/make-rules/styles/Makefile.am b/Build/source/utils/xindy/make-rules/styles/Makefile.am
index 33f8f48ac5d..7108d5c0ae3 100644
--- a/Build/source/utils/xindy/make-rules/styles/Makefile.am
+++ b/Build/source/utils/xindy/make-rules/styles/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-modulesdir = $(pkgdatadir)
+if TETEX_BUILD
+ modulesdir = $(prefix)/texmf/scripts/xindy
+else
+ modulesdir = $(pkgdatadir)
+endif
stylesdir = $(modulesdir)/styles
diff --git a/Build/source/utils/xindy/modules/base/Makefile.am b/Build/source/utils/xindy/modules/base/Makefile.am
index 42220d6ab42..e5666bb0ec6 100644
--- a/Build/source/utils/xindy/modules/base/Makefile.am
+++ b/Build/source/utils/xindy/modules/base/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-modulesdir = $(pkgdatadir)
+if TETEX_BUILD
+ modulesdir = $(prefix)/texmf/scripts/xindy
+else
+ modulesdir = $(pkgdatadir)
+endif
basedir = $(modulesdir)/base
diff --git a/Build/source/utils/xindy/modules/class/Makefile.am b/Build/source/utils/xindy/modules/class/Makefile.am
index a83d7f9d02b..c34f9b156b6 100644
--- a/Build/source/utils/xindy/modules/class/Makefile.am
+++ b/Build/source/utils/xindy/modules/class/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-modulesdir = $(pkgdatadir)
+if TETEX_BUILD
+ modulesdir = $(prefix)/texmf/scripts/xindy
+else
+ modulesdir = $(pkgdatadir)
+endif
classdir = $(modulesdir)/class
diff --git a/Build/source/utils/xindy/modules/lang/german/Makefile.am b/Build/source/utils/xindy/modules/lang/german/Makefile.am
index 534bb1ccbac..ff4ed1a3ab8 100644
--- a/Build/source/utils/xindy/modules/lang/german/Makefile.am
+++ b/Build/source/utils/xindy/modules/lang/german/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-langdir = $(pkgdatadir)/lang
+if TETEX_BUILD
+ langdir = $(prefix)/texmf/scripts/xindy/lang
+else
+ langdir = $(pkgdatadir)/lang
+endif
germandir = $(langdir)/german
diff --git a/Build/source/utils/xindy/modules/lang/latin/Makefile.am b/Build/source/utils/xindy/modules/lang/latin/Makefile.am
index fa4a5d9fe91..6b6aa79212d 100644
--- a/Build/source/utils/xindy/modules/lang/latin/Makefile.am
+++ b/Build/source/utils/xindy/modules/lang/latin/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-langdir = $(pkgdatadir)/lang
+if TETEX_BUILD
+ langdir = $(prefix)/texmf/scripts/xindy/lang
+else
+ langdir = $(pkgdatadir)/lang
+endif
latindir = $(langdir)/latin
diff --git a/Build/source/utils/xindy/modules/ord/Makefile.am b/Build/source/utils/xindy/modules/ord/Makefile.am
index 47138a6a333..a8cea6e30ee 100644
--- a/Build/source/utils/xindy/modules/ord/Makefile.am
+++ b/Build/source/utils/xindy/modules/ord/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-modulesdir = $(pkgdatadir)
+if TETEX_BUILD
+ modulesdir = $(prefix)/texmf/scripts/xindy
+else
+ modulesdir = $(pkgdatadir)
+endif
orddir = $(modulesdir)/ord
diff --git a/Build/source/utils/xindy/modules/rules/Makefile.am b/Build/source/utils/xindy/modules/rules/Makefile.am
index 98bf7a7fd29..c71fb4953fd 100644
--- a/Build/source/utils/xindy/modules/rules/Makefile.am
+++ b/Build/source/utils/xindy/modules/rules/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-modulesdir = $(pkgdatadir)
+if TETEX_BUILD
+ modulesdir = $(prefix)/texmf/scripts/xindy
+else
+ modulesdir = $(pkgdatadir)
+endif
rulesdir = $(modulesdir)/rules
diff --git a/Build/source/utils/xindy/modules/styles/Makefile.am b/Build/source/utils/xindy/modules/styles/Makefile.am
index 9c9d06302d9..611804f3b08 100644
--- a/Build/source/utils/xindy/modules/styles/Makefile.am
+++ b/Build/source/utils/xindy/modules/styles/Makefile.am
@@ -19,7 +19,11 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-modulesdir = $(pkgdatadir)
+if TETEX_BUILD
+ modulesdir = $(prefix)/texmf/scripts/xindy
+else
+ modulesdir = $(pkgdatadir)
+endif
texdir = $(modulesdir)/styles
diff --git a/Build/source/utils/xindy/rte/Makefile.am b/Build/source/utils/xindy/rte/Makefile.am
index f1c852e57cc..a3a1e78e265 100644
--- a/Build/source/utils/xindy/rte/Makefile.am
+++ b/Build/source/utils/xindy/rte/Makefile.am
@@ -26,18 +26,18 @@ clisp_src = clisp-2.43
clisp_builddir = $(shell pwd)/clisp-build-dir
if EXT_CLISP
- export CLISP_DIR = @CLISP_DIR@
- export CLISP_PATH = @CLISP_PATH@
+ CLISP_LIB = $(shell $(CLISP) -q -norc -x '(progn (princ *lib-directory*) (values))')
+ export CLISP = @CLISP@
CLISP_PREREQ =
else
- export CLISP_DIR = $(clisp_builddir)
- export CLISP_PATH = $(CLISP_DIR)/clisp
+ CLISP_LIB = $(clisp_builddir)
+ export CLISP = $(clisp_builddir)/clisp
CLISP_PREREQ = $(clisp_link) $(fulldir)
endif
-export CLISP_LINKKIT = $(CLISP_DIR)/linkkit
-fulldir = $(CLISP_DIR)/full
-clisp_link = $(CLISP_DIR)/clisp-link
+export CLISP_LINKKIT = $(CLISP_LIB)/linkkit
+fulldir = $(CLISP_LIB)/full
+clisp_link = $(CLISP_LIB)/clisp-link
binariesdir = ../binaries
@@ -77,8 +77,8 @@ ORDRULES_FILES = ordrules.c ordrules.h rxsub.c rxsub.h mkind.h debug.h link.sh
xindy-build-dir: $(CLISP_PREREQ)
$(RM_R) xindy-build-dir
$(MAKE) -C ordrules ordrulei.c
- test -f ordrules/link.sh || for i in $(ORDRULES_FILES); do cp $(top_srcdir)/rte/ordrules/$$i ordrules/; done
- $(clisp_link) add-module-set ordrules $(fulldir) $@
+ test -f ordrules/link.sh || for i in $(ORDRULES_FILES); do cp -p $(top_srcdir)/rte/ordrules/$$i ordrules/; done
+ sh $(clisp_link) add-module-set ordrules $(fulldir) $@
cp $@/lisp.run $(binariesdir)/xindy.run
cp $@/lispinit.mem $(binariesdir)/base.mem
diff --git a/Build/source/utils/xindy/rte/ordrules/Makefile.in b/Build/source/utils/xindy/rte/ordrules/Makefile.in
index 72099d09c7e..1726d2bbfca 100644
--- a/Build/source/utils/xindy/rte/ordrules/Makefile.in
+++ b/Build/source/utils/xindy/rte/ordrules/Makefile.in
@@ -13,12 +13,10 @@ CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
INCLUDES=
-CLISP = $(CLISP_PATH) -q -norc
-
all : ordrulei.o ordrules.o rxsub.o
ordrulei.c : $(srcdir)/ordrulei.lsp
- $(CLISP) -c $(srcdir)/ordrulei.lsp -o ordrulei.fas
+ $(CLISP) -q -norc -c $(srcdir)/ordrulei.lsp -o ordrulei.fas
ordrulei.o : ordrulei.c
$(CC) $(CFLAGS) -I$(INCLUDES) -c ordrulei.c
diff --git a/Build/source/utils/xindy/user-commands/Makefile.am b/Build/source/utils/xindy/user-commands/Makefile.am
index 956cb389363..e358077bc22 100644
--- a/Build/source/utils/xindy/user-commands/Makefile.am
+++ b/Build/source/utils/xindy/user-commands/Makefile.am
@@ -20,7 +20,18 @@
## Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
## Boston, MA 02110-1301 USA.
-bin_SCRIPTS = xindy xindy.v2
+if TETEX_BUILD
+install-exec-hook: xindy xindy.v2
+ $(INSTALL_SCRIPT) xindy $(prefix)/texmf/scripts/xindy/
+ $(LN_S) ../../texmf/scripts/xindy/xindy $(bindir)/xindy
+ $(INSTALL_SCRIPT) xindy.v2 $(prefix)/texmf/scripts/xindy/
+ $(LN_S) ../../texmf/scripts/xindy/xindy.v2 $(bindir)/xindy.v2
+ $(INSTALL_SCRIPT) $(srcdir)/texindy $(prefix)/texmf/scripts/xindy/
+ $(LN_S) ../../texmf/scripts/xindy/texindy $(bindir)/texindy
+else
+ bin_SCRIPTS = xindy xindy.v2
+ dist_bin_SCRIPTS = texindy
+endif
xindy: xindy.in
sed -e 's:@libdir\@:$(libdir):' $(srcdir)/xindy.in >xindy
@@ -34,8 +45,6 @@ $(srcdir)/xindy.1: $(srcdir)/xindy.in
$(srcdir)/texindy.1: $(srcdir)/texindy
pod2man --verbose -n TEXINDY -r "Version 1.5" -c "xindy" $< $@
-dist_bin_SCRIPTS = texindy
-
man_MANS = texindy.1 xindy.1 xindy.v2.1
EXTRA_DIST = $(man_MANS)
diff --git a/Build/source/utils/xindy/user-commands/texindy b/Build/source/utils/xindy/user-commands/texindy
index 441a95a4a8b..194db89dd7e 100755
--- a/Build/source/utils/xindy/user-commands/texindy
+++ b/Build/source/utils/xindy/user-commands/texindy
@@ -475,6 +475,8 @@ sub output_xindy_release () {
$lib_dir = "$cmd_dir/../lib";
} elsif ( -d "$cmd_dir/../lib/xindy" ) { # /usr style
$lib_dir = "$cmd_dir/../lib/xindy";
+ } elsif ( -f "$cmd_dir/xindy.run" ) { # texlive style
+ $lib_dir = $cmd_dir;
} else {
die "Cannot locate xindy library directory";
}
diff --git a/Build/source/utils/xindy/user-commands/xindy.in b/Build/source/utils/xindy/user-commands/xindy.in
index ff91c2934e3..95c51bad479 100644
--- a/Build/source/utils/xindy/user-commands/xindy.in
+++ b/Build/source/utils/xindy/user-commands/xindy.in
@@ -294,6 +294,8 @@ BEGIN {
# library directory
if ( $ENV{XINDY_LIBDIR} ) {
$lib_dir = $ENV{XINDY_LIBDIR};
+ } elsif ( -f "$cmd_dir/xindy.run" ) { # texlive style
+ $lib_dir = $cmd_dir;
} elsif ( '@libdir@' ne '@libdir' . '@' ) { # GNU configure at work?
if ( -d '@libdir@/xindy' ) { # /usr style
$lib_dir = '@libdir@/xindy';
@@ -309,13 +311,15 @@ BEGIN {
}
# modules directory
- $modules_dir = "/usr/share/xindy";
- unless ( -d $modules_dir ) {
- #if ( -d "$cmd_dir/../modules" ) { # /opt style
- # $modules_dir = "$cmd_dir/../modules";
- #} elsif ( -d "$lib_dir/modules" ) { # /usr style
- # $modules_dir = "$lib_dir/modules";
- #} else {
+ if ( -d "$cmd_dir/../modules" ) { # /opt style
+ $modules_dir = "$cmd_dir/../modules";
+ } elsif ( -d "$lib_dir/modules" ) { # /usr style
+ $modules_dir = "$lib_dir/modules";
+ } elsif ( -d "$lib_dir/../../texmf/scripts/xindy" ) { # texlive style
+ $modules_dir = "$lib_dir/../../texmf/scripts/xindy";
+ } elsif ( -d "/usr/share/xindy" ) { # FSH style
+ $modules_dir = "/usr/share/xindy";
+ } else {
die "$cmd: Cannot locate xindy modules directory";
}
}
diff --git a/Build/source/utils/xindy/user-commands/xindy.v2.in b/Build/source/utils/xindy/user-commands/xindy.v2.in
index 987e37c5640..67a14e6cf25 100644
--- a/Build/source/utils/xindy/user-commands/xindy.v2.in
+++ b/Build/source/utils/xindy/user-commands/xindy.v2.in
@@ -147,6 +147,8 @@ if ( $ENV{XINDY_LIBDIR} ) {
$LibDir = "$cmd_dir/../lib";
} elsif ( -d "$cmd_dir/../lib/xindy" ) { # /usr or /usr/local style
$LibDir = "$cmd_dir/../lib/xindy";
+} elsif ( -f "$cmd_dir/xindy.run" ) { # texlive style
+ $LibDir = $cmd_dir;
} else {
die "Cannot locate xindy library directory";
}
@@ -158,6 +160,8 @@ if ( -d "$cmd_dir/../modules" ) { # /opt style
$modules_dir = "$cmd_dir/../modules";
} elsif ( -d "$LibDir/modules" ) { # /usr or /usr/local style
$modules_dir = "$LibDir/modules";
+} elsif ( -d "$LibDir/../../texmf/scripts/xindy" ) { # texlive style
+ $modules_dir = "$LibDir/../../texmf/scripts/xindy";
} else {
die "Cannot locate xindy modules directory";
}