>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
Angus> Angus Leeming wrote: >> Jean-Marc Lasgouttes wrote: Angus> Ok, I tried out the patch. In fact, it does not address the Angus> problem above. >>> Did you run autogen.sh? I am surprised that this problem is still >>> present (note the added RELYX_USE_PACKAGING). >> I'd have thought so. I'll go and try again now. Angus> Yup. I've just updated so my local tree contains all of your Angus> just committed bits. Of course I forgot to invoke AC_CANONICAL_TARGET in reLyX/configure. The following pair of patches should help, and cure the charset.alias problem. JMarc
Index: config/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v retrieving revision 1.86.2.38 diff -u -p -r1.86.2.38 ChangeLog --- config/ChangeLog 2 Feb 2005 13:19:39 -0000 1.86.2.38 +++ config/ChangeLog 3 Feb 2005 14:26:41 -0000 @@ -1,3 +1,10 @@ +2005-02-03 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * relyx_configure.in: + * relyx_configure.ac: use AC_CANONICAL_TARGET + + * lyxinclude.m4 (LYX_USE_PACKAGING): set libdir correctly + 2005-02-02 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * configure.in: Index: config/lyxinclude.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v retrieving revision 1.81.2.6 diff -u -p -r1.81.2.6 lyxinclude.m4 --- config/lyxinclude.m4 2 Feb 2005 13:12:21 -0000 1.81.2.6 +++ config/lyxinclude.m4 3 Feb 2005 14:26:41 -0000 @@ -675,11 +675,13 @@ case $lyx_use_packaging in macosx) AC_DEFINE(USE_MACOSX_PACKAGING, 1, [Define to 1 if LyX should use a MacOS X application bundle file layout]) default_prefix="/Applications/LyX.app" bindir='${prefix}/Contents/MacOS' + libdir='${prefix}/Contents/Resources' datadir='${prefix}/Contents/Resources' mandir='${prefix}/Contents/Resources/man' ;; windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout]) default_prefix="C:/Program Files/LyX" bindir='${prefix}/bin' + libdir='${prefix}/Resources' datadir='${prefix}/Resources' mandir='${prefix}/Resources/man' ;; posix) AC_DEFINE(USE_POSIX_PACKAGING, 1, [Define to 1 if LyX should use a POSIX-style file layout]) Index: config/relyx_configure.ac =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/Attic/relyx_configure.ac,v retrieving revision 1.3.2.5 diff -u -p -r1.3.2.5 relyx_configure.ac --- config/relyx_configure.ac 2 Feb 2005 13:12:22 -0000 1.3.2.5 +++ config/relyx_configure.ac 3 Feb 2005 14:26:41 -0000 @@ -8,6 +8,7 @@ dnl PACKAGE=reLyX 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>], Index: config/relyx_configure.in =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/Attic/relyx_configure.in,v retrieving revision 1.1.2.4 diff -u -p -r1.1.2.4 relyx_configure.in --- config/relyx_configure.in 2 Feb 2005 13:12:22 -0000 1.1.2.4 +++ config/relyx_configure.in 3 Feb 2005 14:26:41 -0000 @@ -8,6 +8,7 @@ dnl PACKAGE=reLyX 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>], Index: lib/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v retrieving revision 1.363.2.95 diff -u -p -r1.363.2.95 ChangeLog --- lib/ChangeLog 2 Feb 2005 15:37:58 -0000 1.363.2.95 +++ lib/ChangeLog 3 Feb 2005 14:26:42 -0000 @@ -1,3 +1,7 @@ +2005-02-03 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * reLyX/acinclude.m4 (RELYX_USE_PACKAGING): set libdir correctly + 2005-02-02 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * configure.m4: instead of \input-ing the layout files directly in Index: lib/reLyX/acinclude.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/acinclude.m4,v retrieving revision 1.4.6.2 diff -u -p -r1.4.6.2 acinclude.m4 --- lib/reLyX/acinclude.m4 2 Feb 2005 13:12:21 -0000 1.4.6.2 +++ lib/reLyX/acinclude.m4 3 Feb 2005 14:26:42 -0000 @@ -126,10 +126,12 @@ AC_MSG_RESULT($lyx_use_packaging) case $lyx_use_packaging in macosx) default_prefix="/Applications/LyX.app" bindir='${prefix}/Contents/MacOS' + libdir='${prefix}/Contents/Resources' datadir='${prefix}/Contents/Resources' mandir='${prefix}/Contents/Resources/man' ;; windows) default_prefix="C:/Program Files/LyX" bindir='${prefix}/bin' + libdir='${prefix}/Resources' datadir='${prefix}/Resources' mandir='${prefix}/Resources/man' ;; posix) default_prefix=$ac_default_prefix ;;
Index: ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.995 diff -u -p -r1.995 ChangeLog --- ChangeLog 2 Feb 2005 13:15:54 -0000 1.995 +++ ChangeLog 3 Feb 2005 14:37:28 -0000 @@ -1,5 +1,8 @@ 2005-02-02 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + * configure.ac: if the prefix contains space, replace it with + ${builddir}/installprefix and issue a warning. + * configure.ac: when testing for AikSaurus, do not require libbz2. 2005-01-27 Lars Gullik Bjonnes <[EMAIL PROTECTED]> Index: configure.ac =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.42 diff -u -p -r1.42 configure.ac --- configure.ac 2 Feb 2005 13:17:23 -0000 1.42 +++ configure.ac 3 Feb 2005 14:37:28 -0000 @@ -229,6 +229,13 @@ LYX_USE_PACKAGING # fix the value of the prefixes. test "x$prefix" = xNONE && prefix=$default_prefix test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +if echo $prefix |grep ' ' >/dev/null 2>/dev/null ; then + LYX_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 ### Setup GNU gettext dnl GNU gettext is written in C Index: config/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v retrieving revision 1.153 diff -u -p -r1.153 ChangeLog --- config/ChangeLog 20 Jan 2005 14:44:19 -0000 1.153 +++ config/ChangeLog 3 Feb 2005 14:37:28 -0000 @@ -1,3 +1,12 @@ +2005-02-03 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * lyxinclude.m4 (LYX_USE_PACKAGING): set libdir correctly + +2005-02-02 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * lyxinclude.m4 (LYX_USE_PACKAGING): remove single quotes around + prefix in the windows case. + 2005-01-20 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * common.am (pch-file): new target, used recursively by target Index: config/lyxinclude.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v retrieving revision 1.106 diff -u -p -r1.106 lyxinclude.m4 --- config/lyxinclude.m4 12 Jan 2005 17:01:35 -0000 1.106 +++ config/lyxinclude.m4 3 Feb 2005 14:37:28 -0000 @@ -568,11 +568,13 @@ case $lyx_use_packaging in macosx) AC_DEFINE(USE_MACOSX_PACKAGING, 1, [Define to 1 if LyX should use a MacOS X application bundle file layout]) default_prefix="/Applications/LyX.app" bindir='${prefix}/Contents/MacOS' + libdir='${prefix}/Contents/Resources' datadir='${prefix}/Contents/Resources' mandir='${prefix}/Contents/Resources/man' ;; windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout]) - default_prefix="'C:/Program Files/LyX'" + default_prefix="C:/Program Files/LyX" bindir='${prefix}/bin' + libdir='${prefix}/Resources' datadir='${prefix}/Resources' mandir='${prefix}/Resources/man' ;; posix) AC_DEFINE(USE_POSIX_PACKAGING, 1, [Define to 1 if LyX should use a POSIX-style file layout]) Index: lib/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/ChangeLog,v retrieving revision 1.668 diff -u -p -r1.668 ChangeLog --- lib/ChangeLog 24 Jan 2005 17:12:15 -0000 1.668 +++ lib/ChangeLog 3 Feb 2005 14:37:29 -0000 @@ -1,3 +1,16 @@ +2005-02-03 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * reLyX/acinclude.m4 (RELYX_USE_PACKAGING): set libdir correctly + + * reLyX/configure.ac: use AC_CANONICAL_TARGET + +2005-02-02 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * reLyX/configure.ac: use RELYX_USE_PACKAGING as in main configure. + + * reLyX/acinclude.m4 (RELYX_ERROR, RELYX_USE_PACKAGING): new + macros. + 2005-01-15 Georg Baum <[EMAIL PROTECTED]> * ui/classic.ui, ui/stdmenus.ui: add output-changes. Index: lib/reLyX/acinclude.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/acinclude.m4,v retrieving revision 1.5 diff -u -p -r1.5 acinclude.m4 --- lib/reLyX/acinclude.m4 25 May 2004 14:42:10 -0000 1.5 +++ lib/reLyX/acinclude.m4 3 Feb 2005 14:37:29 -0000 @@ -7,6 +7,15 @@ relyx_warning_txt="$relyx_warning_txt relyx_warning=yes]) +dnl Usage: RELYX_ERROR(message) Displays the error "message" and sets +dnl the flag lyx_error to yes. +AC_DEFUN([RELYX_ERROR],[ +relyx_error_txt="$relyx_error_txt +== $1 +" +relyx_error=yes]) + + dnl RELYX_SEARCH_PROG(VARIABLE-NAME,PROGRAMS-LIST,ACTION-IF-FOUND) dnl define([RELYX_SEARCH_PROG],[dnl @@ -99,3 +108,34 @@ $relyx_warning_txt EOF fi fi]) + + +dnl Check what kind of packaging should be used at install time. +dnl The default is autodetected. +AC_DEFUN([RELYX_USE_PACKAGING], +[AC_MSG_CHECKING([what packaging should be used]) +AC_ARG_WITH(packaging, + [ --with-packaging=THIS Use THIS packaging for installation: + Possible values: posix, windows, macosx], + [lyx_use_packaging="$withval"], [ + case $host in + *-apple-darwin*) lyx_use_packaging=macosx ;; + *-pc-mingw32*) lyx_use_packaging=windows;; + *) lyx_use_packaging=posix;; + esac]) +AC_MSG_RESULT($lyx_use_packaging) +case $lyx_use_packaging in + macosx) default_prefix="/Applications/LyX.app" + bindir='${prefix}/Contents/MacOS' + libdir='${prefix}/Contents/Resources' + datadir='${prefix}/Contents/Resources' + mandir='${prefix}/Contents/Resources/man' ;; + windows) default_prefix="C:/Program Files/LyX" + bindir='${prefix}/bin' + libdir='${prefix}/Resources' + datadir='${prefix}/Resources' + mandir='${prefix}/Resources/man' ;; + posix) default_prefix=$ac_default_prefix ;; + *) RELYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;; +esac +]) Index: lib/reLyX/configure.ac =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/configure.ac,v retrieving revision 1.3 diff -u -p -r1.3 configure.ac --- lib/reLyX/configure.ac 24 Jan 2005 11:05:55 -0000 1.3 +++ lib/reLyX/configure.ac 3 Feb 2005 14:37:29 -0000 @@ -8,6 +8,7 @@ dnl PACKAGE=reLyX 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>], @@ -21,9 +22,19 @@ AM_INIT_AUTOMAKE($lyxname, $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}' +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}\"\`"`