AC_INIT(reLyX.in)
AC_PREREQ(2.13) dnl We want to use autoconf 2.13
AC_CONFIG_AUX_DIR(../../config)
+AC_EXEEXT
dnl PACKAGE=reLyX
dnl Do this to install in $datadir/lyx/reLyX instead of $datadir/reLyX/reLyX
-AC_ARG_WITH(lyxname,
- [ --with-lyxname the name under which lyx will be installed],
- [lyxname=$withval],[lyxname=lyx])
+AC_ARG_WITH(version-suffix,
+ [ --with-version-suffix[=<version>] install lyx files as lyx<version>],
+ [lyxname="lyx$withval"
+ program_suffix=$withval],
+ [lyxname=lyx])
dnl must make a macro that gets the reLyX version
VERSION=2.0
# if reLyX has already been generated in this directory, delete it first
test -x reLyX && rm -f reLyX
-# Find an already installed reLyX
-AC_PREFIX_PROGRAM(reLyX)
# fix the value of the prefixes.
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
LYX_DIR=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
AC_SUBST(LYX_DIR)
+# Work around a problem in automake 1.4: when invoking install-strip,
+# INSTALL_PROGRAM is changed to 'install -s', and since
+# INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0
+# which returns an error condition when stripping fails.
+INSTALL_SCRIPT='${INSTALL}'
+
dnl Checks for programs.
AC_PROG_INSTALL
RELYX_CHECK_PERL