>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Jean-Marc Lasgouttes wrote:
>> This patch seems to work correctly in my tests. I am not sure what
>> happens in windows though (due to the use of $(EXE_EXT)).
>> 
>> Please test.

Georg> It works well for me, but it does not address the problem that
Georg> the configure script is called without --with-version-suffix,
Georg> so tex2lyx is not found.

Passing the version suffix to lib/configure is indeed a different
problem. Could we postpone it to 1.4.1?

Here is a slightly updated version of the patch (bug2237-2.diff) and a
version which is IMO cleaner, but could create problems with windows
and/or OSX (bug2237-3.diff). Lars, which one do you prefer?

JMarc

PS: I did not test bug2237-3.diff, I am currently compiling

Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.1047
diff -u -p -r1.1047 ChangeLog
--- ChangeLog	26 Jan 2006 00:01:00 -0000	1.1047
+++ ChangeLog	7 Feb 2006 11:06:55 -0000
@@ -1,4 +1,9 @@
-2006-01-26    <[EMAIL PROTECTED]>
+2006-02-07  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* configure.ac: call LYX_VERSION_SUFFIX earlier; set PACKAGE
+	explicitely (bug 2237).
+
+2006-01-26  Lars Gullik Bjonnes  <[EMAIL PROTECTED]>
 
 	* autogen.sh: remove the --force-missing option to automake 
 
Index: configure.ac
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.76
diff -u -p -r1.76 configure.ac
--- configure.ac	29 Jan 2006 16:47:23 -0000	1.76
+++ configure.ac	7 Feb 2006 11:06:55 -0000
@@ -9,6 +9,7 @@ AC_CONFIG_AUX_DIR(config)
 
 # First check the version
 LYX_CHECK_VERSION
+LYX_VERSION_SUFFIX
 AC_CANONICAL_TARGET
 
 dnl default maintainer mode to true for development versions
@@ -21,9 +22,10 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 tar
 
 # Check how the files should be packaged
 LYX_USE_PACKAGING
-LYX_VERSION_SUFFIX
 # We need to define these variables here and the no-define option of
-# AM_INIT_AUTOMAKE above because LYX_VERSION_SUFFIX alters $PACKAGE.
+# AM_INIT_AUTOMAKE above because we alter $PACKAGE after running 
+# LYX_VERSION_SUFFIX. 
+PACKAGE="$PACKAGE${program_suffix}"
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
 ### Set the execute permissions of the various scripts correctly
Index: config/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v
retrieving revision 1.180
diff -u -p -r1.180 ChangeLog
--- config/ChangeLog	26 Jan 2006 00:01:00 -0000	1.180
+++ config/ChangeLog	7 Feb 2006 11:06:55 -0000
@@ -1,4 +1,9 @@
-2006-01-26  Lars Gullik Bjønne  s<[EMAIL PROTECTED]>
+2006-02-07  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* lyxinclude.m4 (LYX_VERSION_SUFFIX): do not alter PACKAGE here
+	(bug 2237).
+
+2006-01-26  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
 	* ltmain.sh: apply patch for darwin
 
Index: config/lyxinclude.m4
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v
retrieving revision 1.118
diff -u -p -r1.118 lyxinclude.m4
--- config/lyxinclude.m4	23 Dec 2005 18:16:18 -0000	1.118
+++ config/lyxinclude.m4	7 Feb 2006 11:06:55 -0000
@@ -37,11 +37,10 @@ AC_ARG_WITH(version-suffix,
      withval="-$VERSION"
      ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"`
    fi
-   PACKAGE="$PACKAGE$withval"
    program_suffix=$withval
    RPM_VERSION_SUFFIX="--with-version-suffix=$withval"])
 AC_SUBST(RPM_VERSION_SUFFIX)
-AC_MSG_RESULT([$PACKAGE])
+AC_MSG_RESULT([$PACKAGE$withval])
 ])
 
 
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v
retrieving revision 1.1047
diff -u -p -r1.1047 ChangeLog
--- ChangeLog	26 Jan 2006 00:01:00 -0000	1.1047
+++ ChangeLog	7 Feb 2006 11:12:15 -0000
@@ -1,4 +1,8 @@
-2006-01-26    <[EMAIL PROTECTED]>
+2006-02-07  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* configure.ac: call LYX_VERSION_SUFFIX earlier (bug 2237).
+
+2006-01-26  Lars Gullik Bjonnes  <[EMAIL PROTECTED]>
 
 	* autogen.sh: remove the --force-missing option to automake 
 
Index: configure.ac
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v
retrieving revision 1.76
diff -u -p -r1.76 configure.ac
--- configure.ac	29 Jan 2006 16:47:23 -0000	1.76
+++ configure.ac	7 Feb 2006 11:12:15 -0000
@@ -9,6 +9,7 @@ AC_CONFIG_AUX_DIR(config)
 
 # First check the version
 LYX_CHECK_VERSION
+LYX_VERSION_SUFFIX
 AC_CANONICAL_TARGET
 
 dnl default maintainer mode to true for development versions
@@ -21,9 +22,8 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2 tar
 
 # Check how the files should be packaged
 LYX_USE_PACKAGING
-LYX_VERSION_SUFFIX
 # We need to define these variables here and the no-define option of
-# AM_INIT_AUTOMAKE above because LYX_VERSION_SUFFIX alters $PACKAGE.
+# AM_INIT_AUTOMAKE above because we alter $PACKAGE in LYX_USE_PACKAGING. 
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 
 ### Set the execute permissions of the various scripts correctly
Index: config/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/ChangeLog,v
retrieving revision 1.180
diff -u -p -r1.180 ChangeLog
--- config/ChangeLog	26 Jan 2006 00:01:00 -0000	1.180
+++ config/ChangeLog	7 Feb 2006 11:12:15 -0000
@@ -1,4 +1,9 @@
-2006-01-26  Lars Gullik Bjønne  s<[EMAIL PROTECTED]>
+2006-02-07  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
+
+	* lyxinclude.m4 (LYX_VERSION_SUFFIX): do not alter PACKAGE here.
+	(LYX_USE_PACKAGING): add $program_suffix to PACKAGE (bug 2237).
+
+2006-01-26  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
 	* ltmain.sh: apply patch for darwin
 
Index: config/lyxinclude.m4
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v
retrieving revision 1.118
diff -u -p -r1.118 lyxinclude.m4
--- config/lyxinclude.m4	23 Dec 2005 18:16:18 -0000	1.118
+++ config/lyxinclude.m4	7 Feb 2006 11:12:15 -0000
@@ -37,11 +37,10 @@ AC_ARG_WITH(version-suffix,
      withval="-$VERSION"
      ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"`
    fi
-   PACKAGE="$PACKAGE$withval"
    program_suffix=$withval
    RPM_VERSION_SUFFIX="--with-version-suffix=$withval"])
 AC_SUBST(RPM_VERSION_SUFFIX)
-AC_MSG_RESULT([$PACKAGE])
+AC_MSG_RESULT([$PACKAGE$withval])
 ])
 
 
@@ -586,21 +585,21 @@ AC_ARG_WITH(packaging,
 AC_MSG_RESULT($lyx_use_packaging)
 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])
-	   PACKAGE=LyX
-	   default_prefix="/Applications/LyX.app"
+	   PACKAGE=LyX${program_suffix}
+	   default_prefix="/Applications/${PACKAGE}.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])
-	   PACKAGE=LyX
-	   default_prefix="C:/Program Files/LyX"
+	   PACKAGE=LyX${program_suffix}
+	   default_prefix="C:/Program Files/${PACKAGE}"
 	   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])
-	   PACKAGE=lyx
+	   PACKAGE=lyx${program_suffix}
 	   default_prefix=$ac_default_prefix ;;
     *) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
 esac

Reply via email to