1 dnl Process with autoconf to generate configure script -*- sh -*-
3 AC_CONFIG_SRCDIR(reLyX.in)
5 AC_CONFIG_AUX_DIR(../../config)
8 dnl Do this to install in $datadir/lyx/reLyX instead of $datadir/reLyX/reLyX
13 AC_ARG_WITH(version-suffix,
14 [ --with-version-suffix[=<version>] install lyx files as lyx<version>],
15 [lyxname="lyx$withval"
16 program_suffix=$withval],
19 dnl must make a macro that gets the reLyX version
21 AM_INIT_AUTOMAKE($lyxname, $VERSION)
23 # if reLyX has already been generated in this directory, delete it first
24 test -x reLyX && rm -f reLyX
26 ### Check how the files should be packaged
28 # fix the value of the prefixes.
29 test "x$prefix" = xNONE && prefix=$default_prefix
30 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31 if echo $prefix |grep ' ' >/dev/null 2>/dev/null ; then
32 RELYX_WARNING([The installation prefix \"${prefix}\" contains a space, which
33 causes problems with the Makefiles. The installation will be done in
34 directory \"`pwd`/installprefix\" instead. Please move its contents to
35 the right place after installation.])
36 prefix=`pwd`/installprefix
39 # we need to expand ${datadir} to put it into the reLyX wrapper.
40 LYX_DIR=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`
43 # Work around a problem in automake 1.4: when invoking install-strip,
44 # INSTALL_PROGRAM is changed to 'install -s', and since
45 # INSTALL_SCRIPT==INSTALL_PROGRAM, we get errors with fileutils-4.0
46 # which returns an error condition when stripping fails.
47 INSTALL_SCRIPT='${INSTALL}'
49 dnl Checks for programs.
54 AC_CONFIG_FILES([Makefile])
55 AC_CONFIG_FILES([reLyX], [chmod 755 reLyX])
56 AC_CONFIG_FILES([noweb2lyx], [chmod 755 noweb2lyx])