From da5effbfe5b69913919f604915f2a1f7ce2b1715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Wed, 19 Mar 2003 23:08:25 +0000 Subject: [PATCH] kayvans cygwin patch git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6546 a592a061-630c-0410-9148-cb99ea01b6c8 --- ChangeLog | 4 ++++ autogen.sh | 2 +- config/ChangeLog | 12 ++++++++++++ config/Makefile.am | 2 +- config/configure.ac | 3 +++ config/configure.in | 3 +++ config/libtool.m4 | 42 +++++++++++++++++++++--------------------- 7 files changed, 45 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7232bedbd4..3371bb7546 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-03-12 Kayvan Sylvan + + * autogen.sh (ACINCLUDE_FILES): Added cygwin.m4 + 2003-03-15 John Levon * INSTALL: little fix diff --git a/autogen.sh b/autogen.sh index 92eb117984..7583232366 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,7 +4,7 @@ ACLOCAL="aclocal" AUTOHEADER="autoheader" AUTOMAKE="automake -a -c --foreign" AUTOCONF="autoconf" -ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 xforms.m4 qt.m4 gtk--.m4 gnome--.m4 gnome.m4 pspell.m4 pkg.m4" +ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 xforms.m4 qt.m4 gtk--.m4 gnome--.m4 gnome.m4 pspell.m4 cygwin.m4 pkg.m4" # Discover what version of autoconf we are using. autoversion=`$AUTOCONF --version | head -n 1` diff --git a/config/ChangeLog b/config/ChangeLog index 2de1d3c764..fe0907fa1d 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,15 @@ +2003-03-12 Kayvan Sylvan + + * configure.ac configure.in: Add the CHECK_WITH_CYGWIN macro call. + + * Makefile.am: add cygwin.m4 to EXTRA_DIST + + * cygwin.m4: Add CHECK_WITH_CYGWIN function to encapuslate + some checks for Win32 GCC based on info from the following URL: + http://bugzilla.gnome.org/showattachment.cgi?attach_id=12253 + + * libtool.m4: TAB to SPACE fixes. Now impgen.c compiles on Cygwin. + 2003-03-10 Lars Gullik Bjønnes * pspell.m4: simplify pspell checking even more diff --git a/config/Makefile.am b/config/Makefile.am index 829c4dfaa1..8ac9f4f786 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -4,4 +4,4 @@ EXTRA_DIST = common.am codeset.m4 libtool.m4 gettext.m4 \ lyxinclude.m4 lyxinclude25x.m4 lyxinclude213.m4 \ glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 \ qt.m4 gtk--.m4 gnome--.m4 gnome.m4 pkg.m4 xforms.m4 pspell.m4 \ - relyx_configure.ac relyx_configure.in + relyx_configure.ac relyx_configure.in cygwin.m4 diff --git a/config/configure.ac b/config/configure.ac index f9d868e30e..582144332a 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -131,6 +131,9 @@ LYX_PROG_LIBTOOL ### Check if we want pspell libraries CHECK_WITH_PSPELL +### Check for some Cygwin-specific details. +CHECK_WITH_CYGWIN + ### Check for X libraries # The real thing. AC_PATH_XTRA diff --git a/config/configure.in b/config/configure.in index 4adcfe1130..6a332b20c9 100644 --- a/config/configure.in +++ b/config/configure.in @@ -134,6 +134,9 @@ LYX_PROG_LIBTOOL ### Check if we want pspell libraries CHECK_WITH_PSPELL +### Check for some Cygwin-specific details. +CHECK_WITH_CYGWIN + ### Check for X libraries # The real thing. AC_PATH_XTRA diff --git a/config/libtool.m4 b/config/libtool.m4 index 8d155e1076..f1746b9d1b 100644 --- a/config/libtool.m4 +++ b/config/libtool.m4 @@ -2737,44 +2737,44 @@ EOF # # dll = open(filename, O_RDONLY|O_BINARY); # if (dll < 1) -# return 1; +# return 1; # # dll_name = filename; # # for (i=0; filename[i]; i++) -# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') -# dll_name = filename + i +1; +# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':') +# dll_name = filename + i +1; # # pe_header_offset = pe_get32 (dll, 0x3c); # opthdr_ofs = pe_header_offset + 4 + 20; # num_entries = pe_get32 (dll, opthdr_ofs + 92); # # if (num_entries < 1) /* no exports */ -# return 1; +# return 1; # # export_rva = pe_get32 (dll, opthdr_ofs + 96); # export_size = pe_get32 (dll, opthdr_ofs + 100); # nsections = pe_get16 (dll, pe_header_offset + 4 +2); # secptr = (pe_header_offset + 4 + 20 + -# pe_get16 (dll, pe_header_offset + 4 + 16)); +# pe_get16 (dll, pe_header_offset + 4 + 16)); # # expptr = 0; # for (i = 0; i < nsections; i++) # { -# char sname[8]; -# unsigned long secptr1 = secptr + 40 * i; -# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); -# unsigned long vsize = pe_get32 (dll, secptr1 + 16); -# unsigned long fptr = pe_get32 (dll, secptr1 + 20); -# lseek(dll, secptr1, SEEK_SET); -# read(dll, sname, 8); -# if (vaddr <= export_rva && vaddr+vsize > export_rva) -# { -# expptr = fptr + (export_rva - vaddr); -# if (export_rva + export_size > vaddr + vsize) -# export_size = vsize - (export_rva - vaddr); -# break; -# } +# char sname[8]; +# unsigned long secptr1 = secptr + 40 * i; +# unsigned long vaddr = pe_get32 (dll, secptr1 + 12); +# unsigned long vsize = pe_get32 (dll, secptr1 + 16); +# unsigned long fptr = pe_get32 (dll, secptr1 + 20); +# lseek(dll, secptr1, SEEK_SET); +# read(dll, sname, 8); +# if (vaddr <= export_rva && vaddr+vsize > export_rva) +# { +# expptr = fptr + (export_rva - vaddr); +# if (export_rva + export_size > vaddr + vsize) +# export_size = vsize - (export_rva - vaddr); +# break; +# } # } # # expdata = (unsigned char*)malloc(export_size); @@ -2788,8 +2788,8 @@ EOF # printf ("EXPORTS\n"); # for (i = 0; i