+2005-09-29 Angus Leeming <leeming@lyx.org>
+
+ * configure.ac: Use the new MSYS_AC_CANONICAL_PATH to generate
+ path strings that make sense on Windows as well as on Unix boxes.
+ Insert these strings into the generated Makefiles.
+
2005-09-22 Bennett Helm <bennett.helm@fandm.edu>
* INSTALL.MacOSX: update to reflect simplified procedure.
+2005-09-29 Angus Leeming <leeming@lyx.org>
+
+ * lyxinclude.m4: add a new MSYS_AC_CANONICAL_PATH macro that
+ generates a Windows native path on Windows boxes and unix native
+ path on *nix boxes. With thanks to Keith Marshall. Details can
+ be found here: http://thread.gmane.org/gmane.comp.gnu.mingw.msys/2937
+
2005-09-22 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* lyxinclude.m4 (LYX_PROG_CXX): do not enable stdlib-debug for
[Define if mkdir takes only one argument.])
fi
])
+
+
+dnl Set VAR to the canonically resolved absolute equivalent of PATHNAME,
+dnl (which may be a relative path, and need not refer to any existing
+dnl entity).
+
+dnl On Win32-MSYS build hosts, the returned path is resolved to its true
+dnl native Win32 path name, (but with slashes, not backslashes).
+
+dnl On any other system, it is simply the result which would be obtained
+dnl if PATHNAME represented an existing directory, and the pwd command was
+dnl executed in that directory.
+AC_DEFUN([MSYS_AC_CANONICAL_PATH],
+[ac_dir="$2"
+ ( exec 2>/dev/null; cd / && pwd -W ) | grep ':' >/dev/null &&
+ ac_pwd_w="pwd -W" || ac_pwd_w=pwd
+ until ac_val=`exec 2>/dev/null; cd "$ac_dir" && $ac_pwd_w`
+ do
+ ac_dir=`AS_DIRNAME(["$ac_dir"])`
+ done
+ ac_dir=`echo "$ac_dir" | sed 's?^[[./]]*??'`
+ ac_val=`echo "$ac_val" | sed 's?/*$[]??'`
+ $1=`echo "$2" | sed "s?^[[./]]*$ac_dir/*?$ac_val/?"'
+ s?/*$[]??'`
+])
AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir)
AC_LANG_POP(C)
-
AC_FUNC_SELECT_ARGTYPES
### Some information on what just happened
LyX binary dir: ${real_bindir}\n\
LyX files dir: ${real_datadir}\n"
+real_localedir=`eval "echo \`eval \"echo ${datadir}/locale\"\`"`
+MSYS_AC_CANONICAL_PATH(LYX_ABS_TOP_SRCDIR, ${srcdir})
+MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_LOCALEDIR, ${real_localedir})
+MSYS_AC_CANONICAL_PATH(LYX_ABS_INSTALLED_DATADIR, ${real_datadir})
AC_SUBST(VERSION_INFO)
AC_SUBST(RPM_FRONTEND)
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_LDFLAGS)
+AC_SUBST(LYX_ABS_TOP_SRCDIR)
+AC_SUBST(LYX_ABS_INSTALLED_LOCALEDIR)
+AC_SUBST(LYX_ABS_INSTALLED_DATADIR)
## Some config.h stuff
+2005-09-29 Angus Leeming <leeming@lyx.org>
+
+ * Makefile.am: use the Windows-friendly LYX_ABS_INSTALLED_LOCALEDIR
+ et al rather than the unix-centric $(localedir) when compiling
+ package.C.in.
+
2005-09-10 Angus Leeming <leeming@lyx.org>
* Makefile.am (EXTRA_DIST): add os_cygwin.C to the distribution.
# Solaris sed does not like spaces bewteen the ;-delimited commands
build_package: package.C.in
@rm -f tmp_package ;\
- ABS_SRCDIR=`cd $(top_srcdir) && pwd` ;\
- ABS_BUILDDIR=`cd ../.. && pwd` ;\
- sed "s,%LYX_DIR%,$(pkgdatadir),;\
-s,%LOCALEDIR%,$(datadir)/locale,;\
-s,%TOP_SRCDIR%,$${ABS_SRCDIR}," \
+ sed "s,%LYX_DIR%,$(LYX_ABS_INSTALLED_DATADIR),;\
+s,%LOCALEDIR%,$(LYX_ABS_INSTALLED_LOCALEDIR),;\
+s,%TOP_SRCDIR%,$(LYX_ABS_TOP_SRCDIR)," \
$(srcdir)/package.C.in > tmp_package ;\
if cmp -s tmp_package package.C ; then \
rm -f tmp_package ;\