X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2FreLyX%2Fconfigure.in;h=913a25e98676fc69447527a73c29ed42facc052d;hb=5657b861a6f8e4ed7b89db4a3b70b6f60de9ec9d;hp=f2bffd773fafda8946f064a9e59f3feb63df6a87;hpb=a2e5d14f4853f0bfab228a265fe91bf545550edb;p=lyx.git diff --git a/lib/reLyX/configure.in b/lib/reLyX/configure.in index f2bffd773f..913a25e986 100644 --- a/lib/reLyX/configure.in +++ b/lib/reLyX/configure.in @@ -1,22 +1,45 @@ dnl Process with autoconf to generate configure script -*- sh -*- AC_INIT(reLyX.in) AC_PREREQ(2.13) dnl We want to use autoconf 2.13 -AC_PREFIX_PROGRAM(reLyX) +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(version-suffix, + [ --with-version-suffix[=] install lyx files as lyx], + [lyxname="lyx$withval" + program_suffix=$withval], + [lyxname=lyx]) -PACKAGE=reLyX -VERSION=2.0 dnl must make a macro that gets the reLyX version -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +VERSION=2.0 +AM_INIT_AUTOMAKE($lyxname, $VERSION) + +# 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}' + +# we need to expand ${datadir} to put it into the reLyX wrapper. +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 dnl Finish the work -test $program_suffix = NONE && program_suffix= -LYX_DIR=`eval "echo \`eval \"echo ${datadir}/lyx${program_suffix}\"\`"` -AC_SUBST(LYX_DIR) - -AC_OUTPUT(Makefile reLyX, chmod 755 reLyX) +AC_OUTPUT(Makefile reLyX noweb2lyx, chmod 755 reLyX noweb2lyx) RELYX_CHECK_ERRORS