dnl Do this to install in $datadir/lyx/reLyX instead of $datadir/reLyX/reLyX
AM_MAINTAINER_MODE
+AC_CANONICAL_TARGET
AC_ARG_WITH(version-suffix,
[ --with-version-suffix[=<version>] install lyx files as lyx<version>],
# if reLyX has already been generated in this directory, delete it first
test -x reLyX && rm -f reLyX
+
+### Check how the files should be packaged
+RELYX_USE_PACKAGING
# fix the value of the prefixes.
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$prefix" = xNONE && prefix=$default_prefix
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# make sure prefix is correctly quoted
-prefix="'$prefix'"
+if echo $prefix |grep ' ' >/dev/null 2>/dev/null ; then
+ RELYX_WARNING([The installation prefix \"${prefix}\" contains a space, which
+ causes problems with the Makefiles. The installation will be done in
+ directory \"`pwd`/installprefix\" instead. Please move its contents to
+ the right place after installation.])
+ prefix=`pwd`/installprefix
+fi
# we need to expand ${datadir} to put it into the reLyX wrapper.
LYX_DIR=`eval "echo \`eval \"echo ${datadir}/${PACKAGE}\"\`"`