]> git.lyx.org Git - lyx.git/blob - lib/reLyX/configure.in
John's --with-version-suffix
[lyx.git] / lib / reLyX / configure.in
1 dnl Process with autoconf to generate configure script   -*- sh -*-
2 AC_INIT(reLyX.in)
3 AC_PREREQ(2.13) dnl We want to use autoconf 2.13
4 AC_CONFIG_AUX_DIR(../../config)
5
6 dnl PACKAGE=reLyX
7 dnl Do this to install in $datadir/lyx/reLyX instead of $datadir/reLyX/reLyX
8
9 AC_ARG_WITH(version-suffix,
10   [  --with-version-suffix[=<version>]  install lyx files as lyx<version>],
11   [lyxname="lyx$withval"
12    program_suffix=$withval],
13   [lyxname=lyx])
14
15 dnl must make a macro that gets the reLyX version
16 VERSION=2.0
17 AM_INIT_AUTOMAKE($lyxname, $VERSION)
18
19 # if reLyX has already been generated in this directory, delete it first
20 test -x reLyX && rm -f reLyX
21 # Find an already installed reLyX
22 AC_PREFIX_PROGRAM(reLyX)
23 # fix the value of the prefixes.
24 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26
27 # we need to expand ${datadir} to put it into the reLyX wrapper.
28 LYX_DIR=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
29 AC_SUBST(LYX_DIR)
30
31 # Work around a problem in automake 1.4: when invoking install-strip,
32 # INSTALL_PROGRAM is changed to 'install -s', and since
33 # INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0
34 # which returns an error condition when stripping fails.
35 INSTALL_SCRIPT='${INSTALL}'
36
37 dnl Checks for programs.
38 AC_PROG_INSTALL
39 RELYX_CHECK_PERL
40
41 dnl Finish the work
42 AC_OUTPUT(Makefile reLyX noweb2lyx, chmod 755 reLyX noweb2lyx)
43
44 RELYX_CHECK_ERRORS