Index: lyx-devel/config/progtest.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/progtest.m4,v retrieving revision 1.2 diff -u -r1.2 progtest.m4 --- lyx-devel/config/progtest.m4 2000/01/08 21:02:55 1.2 +++ lyx-devel/config/progtest.m4 2000/11/12 08:09:08 @@ -11,6 +11,19 @@ dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) AC_DEFUN(AM_PATH_PROG_WITH_TEST, +[case "`uname -s 2> /dev/null`" in +OS/2) + PATH=`echo -E "$PATH" | sed 's+\\\\+/+g'` + PATH_IFS=';' + EXE_EXT='.exe' + CMD_EXT='.cmd' + ;; +*) + PATH_IFS=':' + EXE_EXT='' + CMD_EXT='' + ;; +esac] [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) @@ -20,10 +33,12 @@ ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}$PATH_IFS" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then + if test -f $ac_dir/$ac_word \ + -o -f $ac_dir/$ac_word$EXE_EXT \ + -o -f $ac_dir/$ac_word$CMD_EXT; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break Index: lyx-devel/lib/configure.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/configure.m4,v retrieving revision 1.15 diff -u -r1.15 configure.m4 --- lyx-devel/lib/configure.m4 2000/11/07 12:07:13 1.15 +++ lyx-devel/lib/configure.m4 2000/11/12 08:09:13 @@ -28,6 +28,19 @@ dnl define(SEARCH_PROG,[dnl changequote([,])dnl +case "`uname -s 2> /dev/null`" in +OS/2) + PATH=`echo -E "$PATH" | sed 's+\\\\+/+g'` + PATH_IFS=';' + EXE_EXT='.exe' + CMD_EXT='.cmd' + ;; +*) + PATH_IFS=':' + EXE_EXT='' + CMD_EXT='' + ;; +esac MSG_CHECKING($1) MSG_RESULT(($3)) $2= @@ -37,10 +50,12 @@ set dummy $ac_prog ; ac_word=$[2] if test -n "$ac_word"; then MSG_CHECKING([for \"$ac_word\"],[+]) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$PATH_IFS" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. - if test -x [$ac_dir/$ac_word]; then + if test -x [$ac_dir/$ac_word] \ + -o -x [$ac_dir/$ac_word$EXE_EXT] \ + -o -x [$ac_dir/$ac_word$CMD_EXT]; then $2="$ac_prog" break fi @@ -180,8 +195,17 @@ fi # Search for an installed reLyX or a ready-to-install one +case "`uname -s 2> /dev/null`" in +OS/2) +save_PATH=`echo -E "$PATH" | sed 's+\\\\+/+g'` +PATH_IFS=';' +;; +*) save_PATH=${PATH} -PATH=${PATH}:./reLyX/ +PATH_IFS=':' +;; +esac +PATH=${PATH}${PATH_IFS}./reLyX/ SEARCH_PROG([for a LaTeX -> LyX converter],tex_to_lyx_command,reLyX) PATH=${save_PATH} test $tex_to_lyx_command = "reLyX" && tex_to_lyx_command="reLyX -f \$\$FName" Index: lyx-devel/lib/reLyX/acinclude.m4 =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/acinclude.m4,v retrieving revision 1.2 diff -u -r1.2 acinclude.m4 --- lyx-devel/lib/reLyX/acinclude.m4 2000/11/07 12:07:13 1.2 +++ lyx-devel/lib/reLyX/acinclude.m4 2000/11/12 08:09:15 @@ -10,15 +10,24 @@ dnl RELYX_SEARCH_PROG(VARIABLE-NAME,PROGRAMS-LIST,ACTION-IF-FOUND) dnl define(RELYX_SEARCH_PROG,[dnl +case "`uname -s 2> /dev/null`" in +OS/2) + PATH=`echo -E "$PATH" | sed 's+\\\\+/+g'` + PATH_IFS=';' + ;; +*) + PATH_IFS=':' + ;; +esac for ac_prog in $2 ; do # Extract the first word of "$ac_prog", so it can be a program name with # args. set dummy $ac_prog ; ac_word=$[2] if test ! -n "[$]$1"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}$PATH_IFS" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. - if test -f [$ac_dir/$ac_word]; then + if test -f [$ac_dir/$ac_word] -o -f [$ac_dir/$ac_word$ac_exeext]; then $1="$ac_prog" break fi Index: lyx-devel/lib/reLyX/configure.in =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/lib/reLyX/configure.in,v retrieving revision 1.8 diff -u -r1.8 configure.in --- lyx-devel/lib/reLyX/configure.in 2000/06/26 15:33:12 1.8 +++ lyx-devel/lib/reLyX/configure.in 2000/11/12 08:09:15 @@ -2,6 +2,7 @@ AC_INIT(reLyX.in) AC_PREREQ(2.13) dnl We want to use autoconf 2.13 AC_CONFIG_AUX_DIR(../../config) +AC_EXEEXT dnl PACKAGE=reLyX dnl Do this to install in $datadir/lyx/reLyX instead of $datadir/reLyX/reLyX Index: lyx-devel/src/lyx_cb.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyx_cb.C,v retrieving revision 1.128 diff -u -r1.128 lyx_cb.C --- lyx-devel/src/lyx_cb.C 2000/11/10 17:29:45 1.128 +++ lyx-devel/src/lyx_cb.C 2000/11/12 08:09:18 @@ -321,6 +321,7 @@ #if 0 void MenuFax(Buffer * buffer) { +#ifndef __EMX__ // Generate postscript file if (!Exporter::Export(buffer, "ps", true)) return; @@ -328,6 +329,15 @@ // Send fax string const ps = OnlyFilename(ChangeExtension(buffer->fileName(), ".ps")); +#else + // Generate tiff file + if (!Exporter::Export(buffer, "tiff", true)) + return; + + // Send fax + string const ps = OnlyFilename(ChangeExtension(buffer->fileName(), + ".tif")); +#endif string path = OnlyPath (buffer->fileName()); if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) { Index: lyx-devel/src/os2_defines.h =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/os2_defines.h,v retrieving revision 1.5 diff -u -r1.5 os2_defines.h --- lyx-devel/src/os2_defines.h 2000/11/08 09:39:44 1.5 +++ lyx-devel/src/os2_defines.h 2000/11/12 08:09:18 @@ -13,16 +13,22 @@ #ifndef OS2_DEFINES_H #define OS2_DEFINES_H +#if defined (__cplusplus) #include -#include #include +extern "C" inline int readlink(const char *, char *, size_t) {return -1;} +#else +#include +#include +#define readlink(s, t, l) (-1) +#endif +#include #include #include /* #include */ #define lstat stat #define S_ISLNK(x) false #define S_ISBLK(x) false -#define readlink(s, t, l) (strcpy(t, s), strlen(t)) /*#define mkfifo(p, m) (0) *//* LyXserver is temporary disabled. */ #define chdir _chdir2 #define strcasecmp stricmp Index: lyx-devel/src/support/rename.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/rename.C,v retrieving revision 1.4 diff -u -r1.4 rename.C --- lyx-devel/src/support/rename.C 2000/11/06 11:20:22 1.4 +++ lyx-devel/src/support/rename.C 2000/11/12 08:09:20 @@ -6,6 +6,9 @@ bool lyx::rename(string const & from, string const & to) { +#ifdef __EMX__ + ::unlink(to.c_str()); +#endif if (::rename(from.c_str(), to.c_str()) == -1) return lyx::copy(from, to); return true; Index: lyx-devel/src/support/syscall.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/support/syscall.C,v retrieving revision 1.18 diff -u -r1.18 syscall.C --- lyx-devel/src/support/syscall.C 2000/10/11 21:06:43 1.18 +++ lyx-devel/src/support/syscall.C 2000/11/12 08:09:21 @@ -15,6 +15,7 @@ #include "syscontr.h" #include "support/lstrings.h" #include "support/lyxlib.h" +#include "support/filetools.h" using std::endl;