Many changes.
authorgreen <green>
Sun, 22 Apr 2001 18:11:57 +0000 (18:11 +0000)
committergreen <green>
Sun, 22 Apr 2001 18:11:57 +0000 (18:11 +0000)
12 files changed:
libffi/ChangeLog
libffi/Makefile.am
libffi/Makefile.in
libffi/acinclude.m4 [new file with mode: 0644]
libffi/aclocal.m4
libffi/alpha/ffi.c [new file with mode: 0644]
libffi/alpha/osf.S [new file with mode: 0644]
libffi/configure
libffi/configure.in
libffi/fficonfig.h.in
libffi/include/Makefile.in
libffi/include/ffi_private.h [new file with mode: 0644]

index 6d3e36f..e8c1287 100644 (file)
@@ -1,3 +1,30 @@
+Sat Apr 14 20:49:46 2001  Anthony Green  <green@cygnus.com>
+
+       * mips/ffi.c: Include mips/mips.h.
+       * mips/o32.S: Ditto.
+       * mips/n32.S: Ditto.
+       * mips/o32.s: Deleted.
+       * mips/n32.s: Deleted.
+
+Sat Apr 14 20:47:13 2001  Anthony Green  <green@cygnus.com>
+
+       * mips/mips.h: Moved from include/ffi_mips.h.
+
+Sat Apr 14 20:09:05 2001  Anthony Green  <green@cygnus.com>
+
+       * powerpc/asm.h: Remove rcs id.
+
+Sat Apr 14 15:04:08 2001  Anthony Green  <green@cygnus.com>
+
+       * configure.in: Use AC_COMPILE_CHECK_SIZEOF and
+       AC_C_BIGENDIAN_CROSS.
+
+Sat Apr 14 15:02:53 2001  Anthony Green  <green@cygnus.com>
+
+       * aclocal.m4: Rebuilt.
+       * acinclude.m4: New file.  Add AC_COMPILE_CHECK_SIZEOF and
+       AC_C_BIGENDIAN_CROSS.
+
 2001-04-8  Neale Ferguson <Neale.Ferguson@softwareAG-usa.com>
 
        * src/s390/ffi.c: New file.
index 8f51eb3..8cd8b61 100644 (file)
@@ -1,17 +1,17 @@
 ## Process this with automake to create Makefile.in
 
-AUTOMAKE_OPTIONS = cygnus
+AUTOMAKE_OPTIONS = foreign no-installinfo
 
-EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
-               src/mips/n32.s src/mips/o32.S src/mips/o32.s \
-               src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
-               src/x86/ffi.c src/x86/sysv.S \
-               src/alpha/ffi.c src/alpha/osf.S \
-               src/m68k/ffi.c src/m68k/sysv.S \
-               src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/asm.h \
-               src/arm/ffi.c src/arm/sysv.S
+if TESTSUBDIR
+SUBDIRS = testsuite
+endif
 
-VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
+EXTRA_DIST = LICENSE README ChangeLog.v1 alpha/ffi.c arm/ffi.c \
+   ia64/ffi.c m68k/ffi.c mips/ffi.c powerpc/ffi.c s390/ffi.c   \
+   sparc/ffi.c x86/ffi.c alpha/osf.S arm/sysv.S ia64/unix.S    \
+   m68k/sysv.S mips/n32.S mips/o32.S                           \
+   powerpc/sysv.S s390/sysv.S sparc/v8.S sparc/v9.S x86/win32.S        \
+   x86/sysv.S
 
 # Multilib support variables.
 MULTISRCTOP =
@@ -32,52 +32,10 @@ endif
 
 toolexeclib_LTLIBRARIES = libffi.la
 
-noinst_PROGRAMS = ffitest
-
-ffitest_SOURCES = src/ffitest.c
-ffitest_LDADD = libffi.la
-
-TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
-TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
-TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
-TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
-TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
-TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
-TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
-TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S
-TARGET_SRC_ARM =  src/arm/sysv.S src/arm/ffi.c
-
-##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
 ## Work around automake deficiency
-libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
-               src/raw_api.c src/java_raw_api.c
-if MIPS_GCC
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
-endif
-if MIPS_SGI
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
-endif
-if X86
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
-endif
-if SPARC
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
-endif
-if ALPHA
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
-endif
-if IA64
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
-endif
-if M68K
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
-endif
-if POWERPC
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
-endif
-if ARM
-libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
-endif
+nodist_libffi_la_SOURCES = t-ffi.c t-asm.S
+libffi_la_SOURCES = debug.c prep_cif.c types.c \
+               raw_api.c java_raw_api.c $(nodist_libffi_la_SOURCES)
 
 AM_CFLAGS = -fexceptions
 
index 9140f90..2c38f9c 100644 (file)
@@ -1,7 +1,6 @@
-# Makefile.in generated automatically by automake 1.4d from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+
 SHELL = @SHELL@
 
 srcdir = @srcdir@
 top_srcdir = @top_srcdir@
+VPATH = @srcdir@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 
@@ -31,6 +32,8 @@ mandir = @mandir@
 includedir = @includedir@
 oldincludedir = /usr/include
 
+DESTDIR =
+
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -43,11 +46,9 @@ AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_FLAG =
-INSTALL_HEADER = $(INSTALL_DATA)
 transform = @program_transform_name@
 
 NORMAL_INSTALL = :
@@ -56,18 +57,19 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-
-@SET_MAKE@
 host_alias = @host_alias@
 host_triplet = @host@
+AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
 AS = @AS@
 CC = @CC@
 DLLTOOL = @DLLTOOL@
 EXEEXT = @EXEEXT@
+LD = @LD@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -77,20 +79,12 @@ TARGETDIR = @TARGETDIR@
 VERSION = @VERSION@
 libffi_basedir = @libffi_basedir@
 
+AUTOMAKE_OPTIONS = foreign no-installinfo
 
-AUTOMAKE_OPTIONS = cygnus
-
-EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
-               src/mips/n32.s src/mips/o32.S src/mips/o32.s \
-               src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
-               src/x86/ffi.c src/x86/sysv.S \
-               src/alpha/ffi.c src/alpha/osf.S \
-               src/m68k/ffi.c src/m68k/sysv.S \
-               src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/asm.h \
-               src/arm/ffi.c src/arm/sysv.S
+@TESTSUBDIR_TRUE@SUBDIRS = testsuite
 
+EXTRA_DIST = LICENSE README ChangeLog.v1 alpha/ffi.c arm/ffi.c    ia64/ffi.c m68k/ffi.c mips/ffi.c powerpc/ffi.c s390/ffi.c       sparc/ffi.c x86/ffi.c alpha/osf.S arm/sysv.S ia64/unix.S        m68k/sysv.S mips/n32.S mips/o32.S                               powerpc/sysv.S s390/sysv.S sparc/v8.S sparc/v9.S x86/win32.S    x86/sysv.S
 
-VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
 
 # Multilib support variables.
 MULTISRCTOP = 
@@ -99,46 +93,21 @@ MULTIDIRS =
 MULTISUBDIR = 
 MULTIDO = true
 MULTICLEAN = true
-@USE_LIBDIR_TRUE@toolexeclibdir = @USE_LIBDIR_TRUE@$(libdir)$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexeclibdir = @USE_LIBDIR_FALSE@$(toolexecdir)/lib$(MULTISUBDIR)
-@USE_LIBDIR_FALSE@toolexecdir = @USE_LIBDIR_FALSE@$(exec_prefix)/$(target_alias)
+@USE_LIBDIR_TRUE@toolexeclibdir = $(libdir)$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexeclibdir = $(toolexecdir)/lib$(MULTISUBDIR)
+@USE_LIBDIR_FALSE@toolexecdir = $(exec_prefix)/$(target_alias)
 
 toolexeclib_LTLIBRARIES = libffi.la
 
-noinst_PROGRAMS = ffitest
-
-ffitest_SOURCES = src/ffitest.c
-ffitest_LDADD = libffi.la
-
-TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
-TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
-TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
-TARGET_SRC_SPARC = src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
-TARGET_SRC_ALPHA = src/alpha/ffi.c src/alpha/osf.S
-TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
-TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
-TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S
-TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
-
-libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
-               src/raw_api.c src/java_raw_api.c
-
-@MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
-@MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
-@X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
-@SPARC_TRUE@libffi_la_SOURCES = @SPARC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SPARC)
-@ALPHA_TRUE@libffi_la_SOURCES = @ALPHA_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ALPHA)
-@IA64_TRUE@libffi_la_SOURCES = @IA64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_IA64)
-@M68K_TRUE@libffi_la_SOURCES = @M68K_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_M68K)
-@POWERPC_TRUE@libffi_la_SOURCES = @POWERPC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC)
-@ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
+nodist_libffi_la_SOURCES = t-ffi.c t-asm.S
+libffi_la_SOURCES = debug.c prep_cif.c types.c                 raw_api.c java_raw_api.c $(nodist_libffi_la_SOURCES)
+
 
 AM_CFLAGS = -fexceptions
 
 libffi_la_LDFLAGS = -release $(VERSION) 
 
 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
-subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = fficonfig.h
@@ -151,61 +120,40 @@ CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 libffi_la_LIBADD = 
-@ALPHA_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@ALPHA_TRUE@raw_api.lo java_raw_api.lo ffi.lo osf.lo
-@ARM_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@ARM_TRUE@raw_api.lo java_raw_api.lo sysv.lo ffi.lo
-@IA64_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@IA64_TRUE@raw_api.lo java_raw_api.lo ffi.lo unix.lo
-@M68K_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@M68K_TRUE@raw_api.lo java_raw_api.lo ffi.lo sysv.lo
-@MIPS_GCC_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@MIPS_GCC_TRUE@raw_api.lo java_raw_api.lo ffi.lo o32.lo n32.lo
-@MIPS_SGI_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@MIPS_SGI_TRUE@raw_api.lo java_raw_api.lo ffi.lo o32.lo n32.lo
-@POWERPC_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@POWERPC_TRUE@raw_api.lo java_raw_api.lo ffi.lo sysv.lo
-@SPARC_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@SPARC_TRUE@raw_api.lo java_raw_api.lo ffi.lo v8.lo v9.lo
-@X86_TRUE@am_libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo \
-@X86_TRUE@raw_api.lo java_raw_api.lo ffi.lo sysv.lo
-libffi_la_OBJECTS =  $(am_libffi_la_OBJECTS)
-noinst_PROGRAMS =  ffitest$(EXEEXT)
-PROGRAMS =  $(noinst_PROGRAMS)
-
-am_ffitest_OBJECTS =  ffitest.o
-ffitest_OBJECTS =  $(am_ffitest_OBJECTS)
-ffitest_DEPENDENCIES =  libffi.la
-ffitest_LDFLAGS = 
+libffi_la_OBJECTS =  debug.lo prep_cif.lo types.lo raw_api.lo \
+java_raw_api.lo t-ffi.lo t-asm.lo
+CFLAGS = @CFLAGS@
 COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-CFLAGS = @CFLAGS@
 CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES =  $(libffi_la_SOURCES) $(ffitest_SOURCES)
-depcomp = 
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
 DIST_COMMON =  README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
-acconfig.h aclocal.m4 config.guess config.sub configure configure.in \
-fficonfig.h.in install-sh ltconfig ltmain.sh missing mkinstalldirs
+acconfig.h acinclude.m4 aclocal.m4 config.guess config.sub configure \
+configure.in fficonfig.h.in install-sh ltconfig ltmain.sh missing \
+mkinstalldirs
 
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
+TAR = gtar
 GZIP_ENV = --best
-SOURCES = $(libffi_la_SOURCES) $(ffitest_SOURCES)
-OBJECTS = $(am_libffi_la_OBJECTS) $(am_ffitest_OBJECTS)
+DIST_SUBDIRS =  testsuite
+DEP_FILES =  .deps/debug.P .deps/java_raw_api.P .deps/prep_cif.P \
+.deps/raw_api.P .deps/t-asm.P .deps/t-ffi.P .deps/types.P
+SOURCES = $(libffi_la_SOURCES)
+OBJECTS = $(libffi_la_OBJECTS)
 
 all: all-redirect
 .SUFFIXES:
 .SUFFIXES: .S .c .lo .o .s
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
-       cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+       cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
        cd $(top_builddir) \
-         && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in 
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in  acinclude.m4
        cd $(srcdir) && $(ACLOCAL)
 
 config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -219,26 +167,28 @@ fficonfig.h: stamp-h
                $(MAKE) stamp-h; \
        else :; fi
 stamp-h: $(srcdir)/fficonfig.h.in $(top_builddir)/config.status
-       @rm -f stamp-h stamp-hT
-       @echo timestamp > stamp-hT 2> /dev/null
        cd $(top_builddir) \
          && CONFIG_FILES= CONFIG_HEADERS=fficonfig.h \
             $(SHELL) ./config.status
-       @mv stamp-hT stamp-h
-$(srcdir)/fficonfig.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/./stamp-h.in
+       @echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/fficonfig.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
        @if test ! -f $@; then \
-               rm -f $(srcdir)/./stamp-h.in; \
-               $(MAKE) $(srcdir)/./stamp-h.in; \
+               rm -f $(srcdir)/stamp-h.in; \
+               $(MAKE) $(srcdir)/stamp-h.in; \
        else :; fi
-$(srcdir)/./stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
-       @rm -f $(srcdir)/./stamp-h.in $(srcdir)/./stamp-h.inT
-       @echo timestamp > $(srcdir)/./stamp-h.inT 2> /dev/null
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
        cd $(top_srcdir) && $(AUTOHEADER)
-       @mv $(srcdir)/./stamp-h.inT $(srcdir)/./stamp-h.in
+       @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
 
 distclean-hdr:
        -rm -f fficonfig.h
 
+maintainer-clean-hdr:
+
 mostlyclean-toolexeclibLTLIBRARIES:
 
 clean-toolexeclibLTLIBRARIES:
@@ -253,24 +203,39 @@ install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
        $(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
        @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
          if test -f $$p; then \
-           echo " $(LIBTOOL)  --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
-           $(LIBTOOL)  --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
+           echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
+           $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
          else :; fi; \
        done
 
 uninstall-toolexeclibLTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
-         echo " $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p"; \
+       list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
          $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
        done
 
+.s.o:
+       $(COMPILE) -c $<
+
+.S.o:
+       $(COMPILE) -c $<
+
 mostlyclean-compile:
        -rm -f *.o core *.core
 
+clean-compile:
+
 distclean-compile:
        -rm -f *.tab.c
 
+maintainer-clean-compile:
+
+.s.lo:
+       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
 mostlyclean-libtool:
        -rm -f *.lo
 
@@ -278,506 +243,229 @@ clean-libtool:
        -rm -rf .libs _libs
 
 distclean-libtool:
-       -rm -f libtool
-debug.lo: src/debug.c
-prep_cif.lo: src/prep_cif.c
-types.lo: src/types.c
-raw_api.lo: src/raw_api.c
-java_raw_api.lo: src/java_raw_api.c
-ffi.lo: src/alpha/ffi.c
-osf.lo: src/alpha/osf.S
-sysv.lo: src/arm/sysv.S
-unix.lo: src/ia64/unix.S
-o32.lo: src/mips/o32.S
-n32.lo: src/mips/n32.S
-v8.lo: src/sparc/v8.S
-v9.lo: src/sparc/v9.S
+
+maintainer-clean-libtool:
 
 libffi.la: $(libffi_la_OBJECTS) $(libffi_la_DEPENDENCIES)
        $(LINK) -rpath $(toolexeclibdir) $(libffi_la_LDFLAGS) $(libffi_la_OBJECTS) $(libffi_la_LIBADD) $(LIBS)
 
-mostlyclean-noinstPROGRAMS:
-
-clean-noinstPROGRAMS:
-       -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
 
-maintainer-clean-noinstPROGRAMS:
-ffitest.o: src/ffitest.c
+@SET_MAKE@
 
-ffitest$(EXEEXT): $(ffitest_OBJECTS) $(ffitest_DEPENDENCIES)
-       @rm -f ffitest$(EXEEXT)
-       $(LINK) $(ffitest_LDFLAGS) $(ffitest_OBJECTS) $(ffitest_LDADD) $(LIBS)
-.S.o:
-       $(COMPILE) -c $<
-.S.lo:
-       $(LTCOMPILE) -c -o $@ $<
-.c.o:
-       $(COMPILE) -c $<
-.c.lo:
-       $(LTCOMPILE) -c -o $@ $<
-.s.o:
-       $(COMPILE) -c $<
-.s.lo:
-       $(LTCOMPILE) -c -o $@ $<
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+       @set fnord $(MAKEFLAGS); amf=$$2; \
+       dot_seen=no; \
+       target=`echo $@ | sed s/-recursive//`; \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           dot_seen=yes; \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+       done; \
+       if test "$$dot_seen" = "no"; then \
+         $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+       fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+       @set fnord $(MAKEFLAGS); amf=$$2; \
+       dot_seen=no; \
+       rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+         rev="$$subdir $$rev"; \
+         test "$$subdir" = "." && dot_seen=yes; \
+       done; \
+       test "$$dot_seen" = "no" && rev=". $$rev"; \
+       target=`echo $@ | sed s/-recursive//`; \
+       for subdir in $$rev; do \
+         echo "Making $$target in $$subdir"; \
+         if test "$$subdir" = "."; then \
+           local_target="$$target-am"; \
+         else \
+           local_target="$$target"; \
+         fi; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+       done && test -z "$$fail"
+tags-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+       done
 
 tags: TAGS
 
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-       list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
+ID: $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       mkid -fID $$unique $(LISP)
+       here=`pwd` && cd $(srcdir) \
+         && mkid -f$$here/ID $$unique $(LISP)
 
-TAGS: $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-               $(TAGS_FILES) $(LISP)
+TAGS: tags-recursive $(HEADERS) $(SOURCES) fficonfig.h.in $(TAGS_DEPENDENCIES) $(LISP)
        tags=; \
        here=`pwd`; \
-       list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
-       unique=`for i in $$list; do \
-           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-         done | \
-         $(AWK) '    { files[$$0] = 1; } \
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+   if test "$$subdir" = .; then :; else \
+           test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+   fi; \
+       done; \
+       list='$(SOURCES) $(HEADERS)'; \
+       unique=`for i in $$list; do echo $$i; done | \
+         awk '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
-       test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
-         || etags $(ETAGS_ARGS) $$tags  $$unique $(LISP)
+       test -z "$(ETAGS_ARGS)fficonfig.h.in$$unique$(LISP)$$tags" \
+         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags fficonfig.h.in $$unique $(LISP) -o $$here/TAGS)
 
-GTAGS:
-       here=`CDPATH=: && cd $(top_builddir) && pwd` \
-         && cd $(top_srcdir) \
-         && gtags -i $$here
+mostlyclean-tags:
+
+clean-tags:
 
 distclean-tags:
        -rm -f TAGS ID
 
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/alpha/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/alpha/ffi.c || echo '$(srcdir)/'`src/alpha/ffi.c
-
-ffi.lo: src/alpha/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/alpha/ffi.c || echo '$(srcdir)/'`src/alpha/ffi.c
-
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/arm/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/arm/ffi.c || echo '$(srcdir)/'`src/arm/ffi.c
-
-ffi.lo: src/arm/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/arm/ffi.c || echo '$(srcdir)/'`src/arm/ffi.c
-
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/ia64/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/ia64/ffi.c || echo '$(srcdir)/'`src/ia64/ffi.c
-
-ffi.lo: src/ia64/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/ia64/ffi.c || echo '$(srcdir)/'`src/ia64/ffi.c
-
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/m68k/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/m68k/ffi.c || echo '$(srcdir)/'`src/m68k/ffi.c
-
-ffi.lo: src/m68k/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/m68k/ffi.c || echo '$(srcdir)/'`src/m68k/ffi.c
-
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/mips/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/mips/ffi.c || echo '$(srcdir)/'`src/mips/ffi.c
-
-ffi.lo: src/mips/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/mips/ffi.c || echo '$(srcdir)/'`src/mips/ffi.c
-
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/mips/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/mips/ffi.c || echo '$(srcdir)/'`src/mips/ffi.c
-
-ffi.lo: src/mips/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/mips/ffi.c || echo '$(srcdir)/'`src/mips/ffi.c
-
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/powerpc/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/powerpc/ffi.c || echo '$(srcdir)/'`src/powerpc/ffi.c
-
-ffi.lo: src/powerpc/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/powerpc/ffi.c || echo '$(srcdir)/'`src/powerpc/ffi.c
-
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/sparc/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/sparc/ffi.c || echo '$(srcdir)/'`src/sparc/ffi.c
-
-ffi.lo: src/sparc/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/sparc/ffi.c || echo '$(srcdir)/'`src/sparc/ffi.c
-
-debug.o: src/debug.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.o `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-debug.lo: src/debug.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o debug.lo `test -f src/debug.c || echo '$(srcdir)/'`src/debug.c
-
-prep_cif.o: src/prep_cif.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.o `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-prep_cif.lo: src/prep_cif.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o prep_cif.lo `test -f src/prep_cif.c || echo '$(srcdir)/'`src/prep_cif.c
-
-types.o: src/types.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.o `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-types.lo: src/types.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o types.lo `test -f src/types.c || echo '$(srcdir)/'`src/types.c
-
-raw_api.o: src/raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.o `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-raw_api.lo: src/raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o raw_api.lo `test -f src/raw_api.c || echo '$(srcdir)/'`src/raw_api.c
-
-java_raw_api.o: src/java_raw_api.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.o `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-java_raw_api.lo: src/java_raw_api.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o java_raw_api.lo `test -f src/java_raw_api.c || echo '$(srcdir)/'`src/java_raw_api.c
-
-ffi.o: src/x86/ffi.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.o `test -f src/x86/ffi.c || echo '$(srcdir)/'`src/x86/ffi.c
-
-ffi.lo: src/x86/ffi.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libffi_la_CFLAGS) $(CFLAGS) -c -o ffi.lo `test -f src/x86/ffi.c || echo '$(srcdir)/'`src/x86/ffi.c
-
-ffitest.o: src/ffitest.c
-       $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffitest_CFLAGS) $(CFLAGS) -c -o ffitest.o `test -f src/ffitest.c || echo '$(srcdir)/'`src/ffitest.c
-
-ffitest.lo: src/ffitest.c
-       $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ffitest_CFLAGS) $(CFLAGS) -c -o ffitest.lo `test -f src/ffitest.c || echo '$(srcdir)/'`src/ffitest.c
+maintainer-clean-tags:
 
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 
-
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
 distcheck: dist
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-       GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       -rm -rf $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
        mkdir $(distdir)/=build
        mkdir $(distdir)/=inst
-       chmod a-w $(distdir)
-       dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
-         && cd $(distdir)/=build \
+       dc_install_base=`cd $(distdir)/=inst && pwd`; \
+       cd $(distdir)/=build \
          && ../configure --srcdir=.. --prefix=$$dc_install_base \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
-         && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-         && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
-         && $(MAKE) $(AM_MAKEFLAGS) dist \
-         && $(MAKE) $(AM_MAKEFLAGS) distclean \
-         && rm -f $(distdir).tar.gz \
-         && test `find . -type f -print | wc -l` -eq 0
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+         && $(MAKE) $(AM_MAKEFLAGS) dist
+       -rm -rf $(distdir)
        @banner="$(distdir).tar.gz is ready for distribution"; \
        dashes=`echo "$$banner" | sed s/./=/g`; \
        echo "$$dashes"; \
        echo "$$banner"; \
        echo "$$dashes"
 dist: distdir
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
 dist-all: distdir
-       -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
-         ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-         ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-       || chmod -R a+r $(distdir)
-       $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c > $(distdir).tar.gz
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
-
+       -chmod -R a+r $(distdir)
+       GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+       -rm -rf $(distdir)
 distdir: $(DISTFILES)
-       -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+       -rm -rf $(distdir)
        mkdir $(distdir)
-       $(mkinstalldirs) $(distdir)/include $(distdir)/src/alpha $(distdir)/src/arm $(distdir)/src/m68k $(distdir)/src/mips $(distdir)/src/powerpc $(distdir)/src/sparc $(distdir)/src/x86 include src/alpha src/arm src/m68k src/mips src/powerpc src/sparc src/x86
+       -chmod 777 $(distdir)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
+       $(mkinstalldirs) $(distdir)/alpha $(distdir)/arm $(distdir)/ia64 \
+          $(distdir)/m68k $(distdir)/mips $(distdir)/powerpc \
+          $(distdir)/s390 $(distdir)/sparc $(distdir)/x86
        @for file in $(DISTFILES); do \
-         if test -f $$file; then d=.; else d=$(srcdir); fi; \
+         d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir) \
-           || exit 1; \
+           cp -pr $$/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
+         fi; \
+       done
+       for subdir in $(DIST_SUBDIRS); do \
+         if test "$$subdir" = .; then :; else \
+           test -d $(distdir)/$$subdir \
+           || mkdir $(distdir)/$$subdir \
            || exit 1; \
+           chmod 777 $(distdir)/$$subdir; \
+           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+             || exit 1; \
          fi; \
        done
+
+DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
+
+-include $(DEP_FILES)
+
+mostlyclean-depend:
+
+clean-depend:
+
+distclean-depend:
+       -rm -rf .deps
+
+maintainer-clean-depend:
+
+%.o: %.c
+       @echo '$(COMPILE) -c $<'; \
+       $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+       @-cp .deps/$(*F).pp .deps/$(*F).P; \
+       tr ' ' '\012' < .deps/$(*F).pp \
+         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+           >> .deps/$(*F).P; \
+       rm .deps/$(*F).pp
+
+%.lo: %.c
+       @echo '$(LTCOMPILE) -c $<'; \
+       $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
+       @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
+         < .deps/$(*F).pp > .deps/$(*F).P; \
+       tr ' ' '\012' < .deps/$(*F).pp \
+         | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
+           >> .deps/$(*F).P; \
+       rm -f .deps/$(*F).pp
 info-am:
-info: info-am
+info: info-recursive
 dvi-am:
-dvi: dvi-am
-check-am:
-check: check-am
+dvi: dvi-recursive
+check-am: all-am
+check: check-recursive
 installcheck-am:
-installcheck: installcheck-am
+installcheck: installcheck-recursive
 install-info-am: 
-install-info: install-info-am
-all-redirect: fficonfig.h
-       $(MAKE) $(AM_MAKEFLAGS) all-am
+install-info: install-info-recursive
+all-recursive-am: fficonfig.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
 
 install-exec-am: install-toolexeclibLTLIBRARIES
-install-exec: install-exec-am
+install-exec: install-exec-recursive
 
 install-data-am:
-install-data: install-data-am
+install-data: install-data-recursive
 
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-install: install-am
+install: install-recursive
 uninstall-am: uninstall-toolexeclibLTLIBRARIES
-uninstall: uninstall-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) fficonfig.h
+uninstall: uninstall-recursive
+all-am: Makefile $(LTLIBRARIES) fficonfig.h
+all-redirect: all-recursive-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
-installdirs:
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
        $(mkinstalldirs)  $(DESTDIR)$(toolexeclibdir)
 
 
@@ -790,48 +478,58 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-       -rm -f Makefile.in
-clean: clean-am
+mostlyclean-am:  mostlyclean-hdr mostlyclean-toolexeclibLTLIBRARIES \
+               mostlyclean-compile mostlyclean-libtool \
+               mostlyclean-tags mostlyclean-depend mostlyclean-generic
 
-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
-       clean-toolexeclibLTLIBRARIES mostlyclean-am
+mostlyclean: mostlyclean-recursive
 
-distclean: distclean-am
+clean-am:  clean-hdr clean-toolexeclibLTLIBRARIES clean-compile \
+               clean-libtool clean-tags clean-depend clean-generic \
+               mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am:  distclean-hdr distclean-toolexeclibLTLIBRARIES \
+               distclean-compile distclean-libtool distclean-tags \
+               distclean-depend distclean-generic clean-am
+       -rm -f libtool
+
+distclean: distclean-recursive
        -rm -f config.status
 
-distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
-       distclean-libtool distclean-noinstPROGRAMS distclean-tags \
-       distclean-toolexeclibLTLIBRARIES
+maintainer-clean-am:  maintainer-clean-hdr \
+               maintainer-clean-toolexeclibLTLIBRARIES \
+               maintainer-clean-compile maintainer-clean-libtool \
+               maintainer-clean-tags maintainer-clean-depend \
+               maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
 
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
        -rm -f config.status
 
-maintainer-clean-am: distclean-am maintainer-clean-generic \
-       maintainer-clean-noinstPROGRAMS \
-       maintainer-clean-toolexeclibLTLIBRARIES
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
-       mostlyclean-libtool mostlyclean-noinstPROGRAMS \
-       mostlyclean-toolexeclibLTLIBRARIES
-
-.PHONY: all-redirect check check-am clean clean-generic clean-libtool \
-       clean-noinstPROGRAMS clean-toolexeclibLTLIBRARIES distclean \
-       distclean-compile distclean-generic distclean-hdr \
-       distclean-libtool distclean-noinstPROGRAMS distclean-tags \
-       distclean-toolexeclibLTLIBRARIES distdir dvi dvi-am info \
-       info-am install install-am install-data install-data-am \
-       install-exec install-exec-am install-info install-info-am \
-       install-strip install-toolexeclibLTLIBRARIES installcheck \
-       installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic maintainer-clean-noinstPROGRAMS \
-       maintainer-clean-toolexeclibLTLIBRARIES mostlyclean \
-       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
-       mostlyclean-noinstPROGRAMS mostlyclean-toolexeclibLTLIBRARIES \
-       tags uninstall uninstall-am uninstall-toolexeclibLTLIBRARIES
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+mostlyclean-toolexeclibLTLIBRARIES distclean-toolexeclibLTLIBRARIES \
+clean-toolexeclibLTLIBRARIES maintainer-clean-toolexeclibLTLIBRARIES \
+uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool install-data-recursive \
+uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir \
+mostlyclean-depend distclean-depend clean-depend \
+maintainer-clean-depend info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-info-am install-info \
+all-recursive-am install-exec-am install-exec install-data-am \
+install-data install-am install uninstall-am uninstall all-redirect \
+all-am all installdirs-am installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libffi/acinclude.m4 b/libffi/acinclude.m4
new file mode 100644 (file)
index 0000000..0f4b0be
--- /dev/null
@@ -0,0 +1,97 @@
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $1)
+AC_CACHE_VAL(AC_CV_NAME,
+[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
+  AC_TRY_COMPILE([#include "confdefs.h"
+#include <sys/types.h>
+$2
+], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
+  if test x$AC_CV_NAME != x ; then break; fi
+done
+])
+if test x$AC_CV_NAME = x ; then
+  AC_MSG_ERROR([cannot determine a size for $1])
+fi
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+
+AC_DEFUN([AC_C_BIGENDIAN_CROSS],
+[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
+[ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/param.h>], [
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/param.h>], [
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
+if test $ac_cv_c_bigendian = unknown; then
+AC_TRY_RUN([main () {
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
+[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
+fi])
+if test $ac_cv_c_bigendian = unknown; then
+AC_MSG_CHECKING(to probe for byte ordering)
+[
+cat >conftest.c <<EOF
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
+int main() { _ascii (); _ebcdic (); return 0; }
+EOF
+] if test -f conftest.c ; then
+     if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
+        if test `grep -l BIGenDianSyS conftest.o` ; then
+           echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
+           ac_cv_c_bigendian=yes
+        fi
+        if test `grep -l LiTTleEnDian conftest.o` ; then
+           echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
+           if test $ac_cv_c_bigendian = yes ; then
+            ac_cv_c_bigendian=unknown;
+           else
+            ac_cv_c_bigendian=no
+           fi
+        fi
+        echo $ac_n 'guessing bigendian ...  ' >&AC_FD_MSG
+     fi
+  fi
+AC_MSG_RESULT($ac_cv_c_bigendian)
+fi
+if test $ac_cv_c_bigendian = yes; then
+  AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
+  BYTEORDER=4321
+else
+  BYTEORDER=1234
+fi
+AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
+if test $ac_cv_c_bigendian = unknown; then
+  AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
+fi
+])
+
index 5bcef98..46523c6 100644 (file)
@@ -10,6 +10,104 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 dnl PARTICULAR PURPOSE.
 
+AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $1)
+AC_CACHE_VAL(AC_CV_NAME,
+[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
+  AC_TRY_COMPILE([#include "confdefs.h"
+#include <sys/types.h>
+$2
+], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
+  if test x$AC_CV_NAME != x ; then break; fi
+done
+])
+if test x$AC_CV_NAME = x ; then
+  AC_MSG_ERROR([cannot determine a size for $1])
+fi
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+
+AC_DEFUN([AC_C_BIGENDIAN_CROSS],
+[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
+[ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/param.h>], [
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/param.h>], [
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
+if test $ac_cv_c_bigendian = unknown; then
+AC_TRY_RUN([main () {
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
+[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
+fi])
+if test $ac_cv_c_bigendian = unknown; then
+AC_MSG_CHECKING(to probe for byte ordering)
+[
+cat >conftest.c <<EOF
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
+int main() { _ascii (); _ebcdic (); return 0; }
+EOF
+] if test -f conftest.c ; then
+     if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
+        if test `grep -l BIGenDianSyS conftest.o` ; then
+           echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
+           ac_cv_c_bigendian=yes
+        fi
+        if test `grep -l LiTTleEnDian conftest.o` ; then
+           echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
+           if test $ac_cv_c_bigendian = yes ; then
+            ac_cv_c_bigendian=unknown;
+           else
+            ac_cv_c_bigendian=no
+           fi
+        fi
+        echo $ac_n 'guessing bigendian ...  ' >&AC_FD_MSG
+     fi
+  fi
+AC_MSG_RESULT($ac_cv_c_bigendian)
+fi
+if test $ac_cv_c_bigendian = yes; then
+  AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
+  BYTEORDER=4321
+else
+  BYTEORDER=1234
+fi
+AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
+if test $ac_cv_c_bigendian = unknown; then
+  AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
+fi
+])
+
+
 # Like AC_CONFIG_HEADER, but automatically create stamp file.
 
 AC_DEFUN(AM_CONFIG_HEADER,
@@ -172,7 +270,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
 || AC_MSG_ERROR([libtool configure failed])
 
 # Reload cache, that may have been modified by ltconfig
@@ -204,13 +302,13 @@ AC_REQUIRE([AC_PROG_NM])dnl
 AC_REQUIRE([AC_PROG_LN_S])dnl
 dnl
 
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
-
 # Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
+#
+# the following will cause an existing older ltconfig to fail, so
+# we ignore this at the expense of the cache file... Checking this 
+# will just take longer ... bummer!
+#libtool_flags="--cache-file=$cache_file"
+#
 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
@@ -227,7 +325,7 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
-case "$lt_target" in
+case "$host" in
 *-*-irix6*)
   # Find out which ABI we are using.
   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
@@ -443,6 +541,7 @@ else
   AC_MSG_RESULT(no)
 fi
 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_SUBST(LD)
 AC_PROG_LD_GNU
 ])
 
@@ -488,13 +587,14 @@ else
 fi])
 NM="$ac_cv_path_NM"
 AC_MSG_RESULT([$NM])
+AC_SUBST(NM)
 ])
 
 # AC_CHECK_LIBM - check for math library
 AC_DEFUN(AC_CHECK_LIBM,
 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 LIBM=
-case "$lt_target" in
+case "$host" in
 *-*-beos* | *-*-cygwin*)
   # These system don't have libm
   ;;
diff --git a/libffi/alpha/ffi.c b/libffi/alpha/ffi.c
new file mode 100644 (file)
index 0000000..a0becb3
--- /dev/null
@@ -0,0 +1,247 @@
+/* -----------------------------------------------------------------------
+   ffi.c - Copyright (c) 1998 Cygnus Solutions
+   
+   Alpha Foreign Function Interface 
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   ``Software''), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be included
+   in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+   OTHER DEALINGS IN THE SOFTWARE.
+   ----------------------------------------------------------------------- */
+
+#include <ffi.h>
+#include <ffi_common.h>
+
+#include <stdlib.h>
+
+extern void ffi_call_osf(void *, unsigned long, unsigned, void *, void (*)());
+extern void ffi_closure_osf(void);
+
+
+ffi_status
+ffi_prep_cif_machdep(ffi_cif *cif)
+{
+  /* Adjust cif->bytes to represent a minimum 6 words for the temporary
+     register argument loading area.  */
+  if (cif->bytes < 6*SIZEOF_ARG)
+    cif->bytes = 6*SIZEOF_ARG;
+
+  /* Set the return type flag */
+  switch (cif->rtype->type)
+    {
+    case FFI_TYPE_STRUCT:
+    case FFI_TYPE_FLOAT:
+    case FFI_TYPE_DOUBLE:
+      cif->flags = cif->rtype->type;
+      break;
+
+    default:
+      cif->flags = FFI_TYPE_INT;
+      break;
+    }
+  
+  return FFI_OK;
+}
+
+void
+ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue)
+{
+  unsigned long *stack, *argp;
+  long i, avn;
+  ffi_type **arg_types;
+  
+  FFI_ASSERT (cif->abi == FFI_OSF);
+
+  /* If the return value is a struct and we don't have a return
+     value address then we need to make one.  */
+  if (rvalue == NULL && cif->flags == FFI_TYPE_STRUCT)
+    rvalue = alloca(cif->rtype->size);
+
+  /* Allocate the space for the arguments, plus 4 words of temp
+     space for ffi_call_osf.  */
+  argp = stack = alloca(cif->bytes + 4*SIZEOF_ARG);
+
+  if (cif->flags == FFI_TYPE_STRUCT)
+    *(void **) argp++ = rvalue;
+
+  i = 0;
+  avn = cif->nargs;
+  arg_types = cif->arg_types;
+
+  while (i < avn)
+    {
+      switch ((*arg_types)->type)
+       {
+       case FFI_TYPE_SINT8:
+         *(SINT64 *) argp = *(SINT8 *)(* avalue);
+         break;
+                 
+       case FFI_TYPE_UINT8:
+         *(SINT64 *) argp = *(UINT8 *)(* avalue);
+         break;
+                 
+       case FFI_TYPE_SINT16:
+         *(SINT64 *) argp = *(SINT16 *)(* avalue);
+         break;
+                 
+       case FFI_TYPE_UINT16:
+         *(SINT64 *) argp = *(UINT16 *)(* avalue);
+         break;
+                 
+       case FFI_TYPE_SINT32:
+       case FFI_TYPE_UINT32:
+         /* Note that unsigned 32-bit quantities are sign extended.  */
+         *(SINT64 *) argp = *(SINT32 *)(* avalue);
+         break;
+                 
+       case FFI_TYPE_SINT64:
+       case FFI_TYPE_UINT64:
+       case FFI_TYPE_POINTER:
+         *(UINT64 *) argp = *(UINT64 *)(* avalue);
+         break;
+
+       case FFI_TYPE_FLOAT:
+         if (argp - stack < 6)
+           {
+             /* Note the conversion -- all the fp regs are loaded as
+                doubles.  The in-register format is the same.  */
+             *(double *) argp = *(float *)(* avalue);
+           }
+         else
+           *(float *) argp = *(float *)(* avalue);
+         break;
+
+       case FFI_TYPE_DOUBLE:
+         *(double *) argp = *(double *)(* avalue);
+         break;
+
+       case FFI_TYPE_STRUCT:
+         memcpy(argp, *avalue, (*arg_types)->size);
+         break;
+
+       default:
+         FFI_ASSERT(0);
+       }
+
+      argp += ALIGN((*arg_types)->size, SIZEOF_ARG) / SIZEOF_ARG;
+      i++, arg_types++, avalue++;
+    }
+
+  ffi_call_osf(stack, cif->bytes, cif->flags, rvalue, fn);
+}
+
+
+ffi_status
+ffi_prep_closure (ffi_closure* closure,
+                 ffi_cif* cif,
+                 void (*fun)(ffi_cif*, void*, void**, void*),
+                 void *user_data)
+{
+  unsigned int *tramp;
+
+  FFI_ASSERT (cif->abi == FFI_OSF);
+
+  tramp = (unsigned int *) &closure->tramp[0];
+  tramp[0] = 0x47fb0401;       /* mov $27,$1           */
+  tramp[1] = 0xa77b0010;       /* ldq $27,16($27)      */
+  tramp[2] = 0x6bfb0000;       /* jmp $31,($27),0      */
+  tramp[3] = 0x47ff041f;       /* nop                  */
+  *(void **) &tramp[4] = ffi_closure_osf;
+
+  closure->cif = cif;
+  closure->fun = fun;
+  closure->user_data = user_data;
+
+  /* Flush the Icache.  */
+  asm volatile ("imb" : : : "memory");
+
+  return FFI_OK;
+}
+
+int
+ffi_closure_osf_inner(ffi_closure *closure, void *rvalue, unsigned long *argp)
+{
+  ffi_cif *cif;
+  void **avalue;
+  ffi_type **arg_types;
+  long i, avn, argn;
+
+  cif = closure->cif;
+  avalue = alloca(cif->nargs * sizeof(void *));
+
+  argn = 0;
+
+  /* Copy the caller's structure return address to that the closure
+     returns the data directly to the caller.  */
+  if (cif->flags == FFI_TYPE_STRUCT)
+    {
+      rvalue = (void *) argp[0];
+      argn = 1;
+    }
+
+  i = 0;
+  avn = cif->nargs;
+  arg_types = cif->arg_types;
+  
+  /* Grab the addresses of the arguments from the stack frame.  */
+  while (i < avn)
+    {
+      switch (arg_types[i]->type)
+       {
+       case FFI_TYPE_SINT8:
+       case FFI_TYPE_UINT8:
+       case FFI_TYPE_SINT16:
+       case FFI_TYPE_UINT16:
+       case FFI_TYPE_SINT32:
+       case FFI_TYPE_UINT32:
+       case FFI_TYPE_SINT64:
+       case FFI_TYPE_UINT64:
+       case FFI_TYPE_POINTER:
+       case FFI_TYPE_STRUCT:
+         avalue[i] = &argp[argn];
+         break;
+
+       case FFI_TYPE_FLOAT:
+         if (argn < 6)
+           {
+             /* Floats coming from registers need conversion from double
+                back to float format.  */
+             *(float *)&argp[argn - 6] = *(double *)&argp[argn - 6];
+             avalue[i] = &argp[argn - 6];
+           }
+         else
+           avalue[i] = &argp[argn];
+         break;
+
+       case FFI_TYPE_DOUBLE:
+         avalue[i] = &argp[argn - (argn < 6 ? 6 : 0)];
+         break;
+
+       default:
+         FFI_ASSERT(0);
+       }
+
+      argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
+      i++;
+    }
+
+  /* Invoke the closure.  */
+  (closure->fun) (cif, rvalue, avalue, closure->user_data);
+
+  /* Tell ffi_closure_osf how to perform return type promotions.  */
+  return cif->rtype->type;
+}
diff --git a/libffi/alpha/osf.S b/libffi/alpha/osf.S
new file mode 100644 (file)
index 0000000..b3dc477
--- /dev/null
@@ -0,0 +1,277 @@
+/* -----------------------------------------------------------------------
+   osf.S - Copyright (c) 1998 Cygnus Solutions
+   
+   Alpha/OSF Foreign Function Interface 
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   ``Software''), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be included
+   in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+   OTHER DEALINGS IN THE SOFTWARE.
+   ----------------------------------------------------------------------- */
+
+#define LIBFFI_ASM     
+#include <ffi.h>
+
+       .arch ev6
+       .text
+
+/* ffi_call_osf (void *args, unsigned long bytes, unsigned flags,
+                void *raddr, void (*fnaddr)());
+
+   Bit o trickiness here -- ARGS+BYTES is the base of the stack frame
+   for this function.  This has been allocated by ffi_call.  We also
+   deallocate some of the stack that has been alloca'd.  */
+
+       .align  3
+       .globl  ffi_call_osf
+       .ent    ffi_call_osf
+ffi_call_osf:
+       .frame  $15, 32, $26, 0
+       .mask   0x4008000, -32
+       addq    $16,$17,$1
+       mov     $16, $30
+       stq     $26, 0($1)
+       stq     $15, 8($1)
+       stq     $18, 16($1)
+       mov     $1, $15
+       .prologue 0
+
+       stq     $19, 24($1)
+       mov     $20, $27
+
+       # Load up all of the (potential) argument registers.
+       ldq     $16, 0($30)
+       ldt     $f16, 0($30)
+       ldt     $f17, 8($30)
+       ldq     $17, 8($30)
+       ldt     $f18, 16($30)
+       ldq     $18, 16($30)
+       ldt     $f19, 24($30)
+       ldq     $19, 24($30)
+       ldt     $f20, 32($30)
+       ldq     $20, 32($30)
+       ldt     $f21, 40($30)
+       ldq     $21, 40($30)
+
+       # Deallocate the register argument area.
+       lda     $30, 48($30)
+
+       jsr     $26, ($27), 0
+       ldgp    $29, 0($26)
+
+       # If the return value pointer is NULL, assume no return value.
+       ldq     $19, 24($15)
+       ldq     $18, 16($15)
+       ldq     $26, 0($15)
+       beq     $19, $noretval
+
+       # Store the return value out in the proper type.
+       cmpeq   $18, FFI_TYPE_INT, $1
+       bne     $1, $retint
+       cmpeq   $18, FFI_TYPE_FLOAT, $2
+       bne     $2, $retfloat
+       cmpeq   $18, FFI_TYPE_DOUBLE, $3
+       bne     $3, $retdouble
+
+$noretval:
+       ldq     $15, 8($15)
+       ret
+
+$retint:
+       stq     $0, 0($19)
+       nop
+       ldq     $15, 8($15)
+       ret
+
+$retfloat:
+       sts     $f0, 0($19)
+       nop
+       ldq     $15, 8($15)
+       ret
+
+$retdouble:
+       stt     $f0, 0($19)
+       nop
+       ldq     $15, 8($15)
+       ret
+
+       .end    ffi_call_osf
+
+/* ffi_closure_osf(...)
+
+   Receives the closure argument in $1.   */
+
+       .align  3
+       .globl  ffi_closure_osf
+       .ent    ffi_closure_osf
+ffi_closure_osf:
+       .frame  $30, 16*8, $26, 0
+       .mask   0x4000000, -16*8
+       ldgp    $29, 0($27)
+       subq    $30, 16*8, $30
+       stq     $26, 0($30)
+       .prologue 1
+
+       # Store all of the potential argument registers in va_list format.
+       stt     $f16, 4*8($30)
+       stt     $f17, 5*8($30)
+       stt     $f18, 6*8($30)
+       stt     $f19, 7*8($30)
+       stt     $f20, 8*8($30)
+       stt     $f21, 9*8($30)
+       stq     $16, 10*8($30)
+       stq     $17, 11*8($30)
+       stq     $18, 12*8($30)
+       stq     $19, 13*8($30)
+       stq     $20, 14*8($30)
+       stq     $21, 15*8($30)
+
+       # Call ffi_closure_osf_inner to do the bulk of the work.
+       mov     $1, $16
+       lda     $17, 2*8($30)
+       lda     $18, 10*8($30)
+       jsr     $26, ffi_closure_osf_inner
+       ldgp    $29, 0($26)
+       ldq     $26, 0($30)
+
+       # Load up the return value in the proper type.
+       lda     $1, $load_table
+       s4addq  $0, $1, $1
+       ldl     $1, 0($1)
+       addq    $1, $29, $1
+       jmp     $31, ($1), $load_32
+
+       .align 4
+$load_none:
+       addq    $30, 16*8, $30
+       ret
+
+       .align 4
+$load_float:
+       lds     $f0, 16($30)
+       nop
+       addq    $30, 16*8, $30
+       ret
+
+       .align 4
+$load_double:
+       ldt     $f0, 16($30)
+       nop
+       addq    $30, 16*8, $30
+       ret
+
+       .align 4
+$load_u8:
+#ifdef __alpha_bwx__
+       ldbu    $0, 16($30)
+       nop
+#else
+       ldq     $0, 16($30)
+       and     $0, 255, $0
+#endif
+       addq    $30, 16*8, $30
+       ret
+
+       .align 4
+$load_s8:
+#ifdef __alpha_bwx__
+       ldbu    $0, 16($30)
+       sextb   $0, $0
+#else
+       ldq     $0, 16($30)
+       sll     $0, 56, $0
+       sra     $0, 56, $0
+#endif
+       addq    $30, 16*8, $30
+       ret
+
+       .align 4
+$load_u16:
+#ifdef __alpha_bwx__
+       ldwu    $0, 16($30)
+       nop
+#else
+       ldq     $0, 16($30)
+       zapnot  $0, 3, $0
+#endif
+       addq    $30, 16*8, $30
+       ret
+
+       .align 4
+$load_s16:
+#ifdef __alpha_bwx__
+       ldwu    $0, 16($30)
+       sextw   $0, $0
+#else
+       ldq     $0, 16($30)
+       sll     $0, 48, $0
+       sra     $0, 48, $0
+#endif
+       addq    $30, 16*8, $30
+       ret
+
+       .align 4
+$load_32:
+       ldl     $0, 16($30)
+       nop
+       addq    $30, 16*8, $30
+       ret
+
+       .align 4
+$load_64:
+       ldq     $0, 16($30)
+       nop
+       addq    $30, 16*8, $30
+       ret
+
+       .end    ffi_closure_osf
+
+.section .rodata
+$load_table:
+       .gprel32 $load_none     # FFI_TYPE_VOID
+       .gprel32 $load_32       # FFI_TYPE_INT
+       .gprel32 $load_float    # FFI_TYPE_FLOAT
+       .gprel32 $load_double   # FFI_TYPE_DOUBLE
+       .gprel32 $load_double   # FFI_TYPE_LONGDOUBLE
+       .gprel32 $load_u8       # FFI_TYPE_UINT8
+       .gprel32 $load_s8       # FFI_TYPE_SINT8
+       .gprel32 $load_u16      # FFI_TYPE_UINT16
+       .gprel32 $load_s16      # FFI_TYPE_SINT16
+       .gprel32 $load_32       # FFI_TYPE_UINT32
+       .gprel32 $load_32       # FFI_TYPE_SINT32
+       .gprel32 $load_64       # FFI_TYPE_UINT64
+       .gprel32 $load_64       # FFI_TYPE_SINT64
+       .gprel32 $load_none     # FFI_TYPE_STRUCT
+       .gprel32 $load_64       # FFI_TYPE_POINTER
+
+/* Assert that the table above is in sync with ffi.h.  */
+
+#if       FFI_TYPE_FLOAT != 2          \
+       || FFI_TYPE_DOUBLE != 3         \
+       || FFI_TYPE_UINT8 != 5          \
+       || FFI_TYPE_SINT8 != 6          \
+       || FFI_TYPE_UINT16 != 7         \
+       || FFI_TYPE_SINT16 != 8         \
+       || FFI_TYPE_UINT32 != 9         \
+       || FFI_TYPE_SINT32 != 10        \
+       || FFI_TYPE_UINT64 != 11        \
+       || FFI_TYPE_SINT64 != 12        \
+       || FFI_TYPE_STRUCT != 13        \
+       || FFI_TYPE_POINTER != 14       \
+       || FFI_TYPE_LAST != 14
+#error "osf.S out of sync with ffi.h"
+#endif
index d27b087..2d1b699 100755 (executable)
@@ -548,13 +548,6 @@ fi
 
 
 
-echo "configure: warning: ***********************************************************" 1>&2
-echo "configure: warning: ***********************************************************" 1>&2
-echo "configure: warning: This is beta code.  If you're looking for a stable release" 1>&2
-echo "configure: warning: then use the most recent one - libffi-1.20." 1>&2
-echo "configure: warning: ***********************************************************" 1>&2
-echo "configure: warning: ***********************************************************" 1>&2
-
 # Check whether --enable-multilib or --disable-multilib was given.
 if test "${enable_multilib+set}" = set; then
   enableval="$enable_multilib"
@@ -605,7 +598,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:609: checking host system type" >&5
+echo "configure:602: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -638,7 +631,7 @@ echo "$ac_t""$host" 1>&6
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:642: checking for a BSD compatible install" >&5
+echo "configure:635: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -691,7 +684,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:695: checking whether build environment is sane" >&5
+echo "configure:688: checking whether build environment is sane" >&5
 # Just in case
 sleep 1
 echo timestamp > conftestfile
@@ -748,7 +741,7 @@ test "$program_suffix" != NONE &&
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:752: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:745: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -787,7 +780,7 @@ fi
 
 missing_dir=`cd $ac_aux_dir && pwd`
 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:791: checking for working aclocal" >&5
+echo "configure:784: checking for working aclocal" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -800,7 +793,7 @@ else
 fi
 
 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:804: checking for working autoconf" >&5
+echo "configure:797: checking for working autoconf" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -813,7 +806,7 @@ else
 fi
 
 echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:817: checking for working automake" >&5
+echo "configure:810: checking for working automake" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -826,7 +819,7 @@ else
 fi
 
 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:830: checking for working autoheader" >&5
+echo "configure:823: checking for working autoheader" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -839,7 +832,7 @@ else
 fi
 
 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:843: checking for working makeinfo" >&5
+echo "configure:836: checking for working makeinfo" >&5
 # Run test in a subshell; some versions of sh will print an error if
 # an executable is not found, even if stderr is redirected.
 # Redirect stdin to placate older versions of autoconf.  Sigh.
@@ -854,12 +847,12 @@ fi
 
 
 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:858: checking for Cygwin environment" >&5
+echo "configure:851: checking for Cygwin environment" >&5
 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 863 "configure"
+#line 856 "configure"
 #include "confdefs.h"
 
 int main() {
@@ -870,7 +863,7 @@ int main() {
 return __CYGWIN__;
 ; return 0; }
 EOF
-if { (eval echo configure:874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_cygwin=yes
 else
@@ -887,19 +880,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
 CYGWIN=
 test "$ac_cv_cygwin" = yes && CYGWIN=yes
 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:891: checking for mingw32 environment" >&5
+echo "configure:884: checking for mingw32 environment" >&5
 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 896 "configure"
+#line 889 "configure"
 #include "confdefs.h"
 
 int main() {
 return __MINGW32__;
 ; return 0; }
 EOF
-if { (eval echo configure:903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_mingw32=yes
 else
@@ -918,7 +911,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
 
 
 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:922: checking for executable suffix" >&5
+echo "configure:915: checking for executable suffix" >&5
 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -928,7 +921,7 @@ else
   rm -f conftest*
   echo 'int main () { return 0; }' > conftest.$ac_ext
   ac_cv_exeext=
-  if { (eval echo configure:932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+  if { (eval echo configure:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
     for file in conftest.*; do
       case $file in
       *.c | *.o | *.obj) ;;
@@ -949,7 +942,7 @@ echo "$ac_t""${ac_cv_exeext}" 1>&6
 ac_exeext=$EXEEXT
 
 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:953: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:946: checking whether to enable maintainer-specific portions of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
@@ -975,7 +968,7 @@ fi
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:979: checking for $ac_word" >&5
+echo "configure:972: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1005,7 +998,7 @@ if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1009: checking for $ac_word" >&5
+echo "configure:1002: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1056,7 +1049,7 @@ fi
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1060: checking for $ac_word" >&5
+echo "configure:1053: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1088,7 +1081,7 @@ fi
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1092: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1085: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1099,12 +1092,12 @@ cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1103 "configure"
+#line 1096 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1130,12 +1123,12 @@ if test $ac_cv_prog_cc_works = no; then
   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1134: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1127: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1139: checking whether we are using GNU C" >&5
+echo "configure:1132: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1144,7 +1137,7 @@ else
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1163,7 +1156,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1167: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1160: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1264,7 +1257,7 @@ else
 fi
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1268: checking build system type" >&5
+echo "configure:1261: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1284,7 +1277,7 @@ echo "$ac_t""$build" 1>&6
 # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1288: checking for $ac_word" >&5
+echo "configure:1281: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1323,7 +1316,7 @@ ac_prog=ld
 if test "$ac_cv_prog_gcc" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1327: checking for ld used by GCC" >&5
+echo "configure:1320: checking for ld used by GCC" >&5
   ac_prog=`($CC -print-prog-name=ld) 2>&5`
   case "$ac_prog" in
     # Accept absolute paths.
@@ -1347,10 +1340,10 @@ echo "configure:1327: checking for ld used by GCC" >&5
   esac
 elif test "$with_gnu_ld" = yes; then
   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:1351: checking for GNU ld" >&5
+echo "configure:1344: checking for GNU ld" >&5
 else
   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1354: checking for non-GNU ld" >&5
+echo "configure:1347: checking for non-GNU ld" >&5
 fi
 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -1384,8 +1377,9 @@ else
   echo "$ac_t""no" 1>&6
 fi
 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+
 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1389: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1383: checking if the linker ($LD) is GNU ld" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1401,7 +1395,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
 
 
 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1405: checking for BSD-compatible nm" >&5
+echo "configure:1399: checking for BSD-compatible nm" >&5
 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1436,8 +1430,9 @@ fi
 NM="$ac_cv_path_NM"
 echo "$ac_t""$NM" 1>&6
 
+
 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1441: checking whether ln -s works" >&5
+echo "configure:1436: checking whether ln -s works" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1458,13 +1453,13 @@ else
 fi
 
 
-case "$target" in
-NONE) lt_target="$host" ;;
-*) lt_target="$target" ;;
-esac
-
 # Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
+#
+# the following will cause an existing older ltconfig to fail, so
+# we ignore this at the expense of the cache file... Checking this 
+# will just take longer ... bummer!
+#libtool_flags="--cache-file=$cache_file"
+#
 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
@@ -1483,11 +1478,11 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
 
 # Some flags need to be propagated to the compiler or linker for good
 # libtool support.
-case "$lt_target" in
+case "$host" in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 1490 "configure"' > conftest.$ac_ext
-  if { (eval echo configure:1491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  echo '#line 1485 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:1486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
     case "`/usr/bin/file conftest.o`" in
     *32-bit*)
       LD="${LD-ld} -32"
@@ -1508,19 +1503,19 @@ case "$lt_target" in
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1512: checking whether the C compiler needs -belf" >&5
+echo "configure:1507: checking whether the C compiler needs -belf" >&5
 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1517 "configure"
+#line 1512 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lt_cv_cc_needs_belf=yes
 else
@@ -1598,7 +1593,7 @@ LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
 
 # Reload cache, that may have been modified by ltconfig
@@ -1622,126 +1617,182 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 exec 5>>./config.log
 
 
-TARGETDIR="unknown"
-case "$host" in
-mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
-i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
-i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
-i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
-i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
-i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
-i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
-i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
-sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
-sparc-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
-sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
-sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
-alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; TARGETDIR=alpha;;
-ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
-m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
-powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
-powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
-arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
-s390-*-linux*) TARGET=S390; TARGETDIR=s390;;
-esac
-
-if test $TARGETDIR = unknown; then
-  { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; }
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
 fi
+rm -f confcache
 
 
+# Actually configure libtool.  ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
 
-if test ${TARGET}${ac_cv_prog_gcc} = MIPSyes; then
-  MIPS_GCC_TRUE=
-  MIPS_GCC_FALSE='#'
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
 else
-  MIPS_GCC_TRUE='#'
-  MIPS_GCC_FALSE=
+  echo "creating cache $cache_file"
+  > $cache_file
 fi
 
 
-if test ${TARGET}${ac_cv_prog_gcc} = MIPSno; then
-  MIPS_SGI_TRUE=
-  MIPS_SGI_FALSE='#'
-else
-  MIPS_SGI_TRUE='#'
-  MIPS_SGI_FALSE=
-fi
-
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
 
-if test x$TARGET = xSPARC; then
-  SPARC_TRUE=
-  SPARC_FALSE='#'
-else
-  SPARC_TRUE='#'
-  SPARC_FALSE=
-fi
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
 
-if test x$TARGET = xX86; then
-  X86_TRUE=
-  X86_FALSE='#'
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1700: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
 else
-  X86_TRUE='#'
-  X86_FALSE=
-fi
-
-
-if test x$TARGET = xALPHA; then
-  ALPHA_TRUE=
-  ALPHA_FALSE='#'
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
 else
-  ALPHA_TRUE='#'
-  ALPHA_FALSE=
+  ac_cv_prog_LN_S=ln
 fi
-
-
-if test x$TARGET = xIA64; then
-  IA64_TRUE=
-  IA64_FALSE='#'
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
 else
-  IA64_TRUE='#'
-  IA64_FALSE=
+  echo "$ac_t""no" 1>&6
 fi
 
 
-if test x$TARGET = xM68K; then
-  M68K_TRUE=
-  M68K_FALSE='#'
-else
-  M68K_TRUE='#'
-  M68K_FALSE=
-fi
 
 
-if test x$TARGET = xPOWERPC; then
-  POWERPC_TRUE=
-  POWERPC_FALSE='#'
+if test -d $srcdir/testsuite; then
+  TESTSUBDIR_TRUE=
+  TESTSUBDIR_FALSE='#'
 else
-  POWERPC_TRUE='#'
-  POWERPC_FALSE=
+  TESTSUBDIR_TRUE='#'
+  TESTSUBDIR_FALSE=
 fi
 
+AM_RUNTESTFLAGS=
 
-if test x$TARGET = xARM; then
-  ARM_TRUE=
-  ARM_FALSE='#'
-else
-  ARM_TRUE='#'
-  ARM_FALSE=
-fi
+TARGET="unknown"
+case "$host" in
+  alpha*-*-linux* | alpha*-*-osf*)
+       TARGET=ALPHA;
+       $LN_S ${srcdir}/alpha/ffi.c t-ffi.c;
+       $LN_S $srcdir/alpha/osf.S t-asm.S;;
+  arm*-*-linux-*)
+       TARGET=ARM;
+       $LN_S $srcdir/arm/ffi.c t-ffi.c;
+       $LN_S $srcdir/arm/ffi.S t-asm.S;;
+  i*86-*-beos*|i*86-*-freebsd*|i*86-*-linux*|i*86-*-solaris*)
+       TARGET=X86; 
+       $LN_S $srcdir/x86/ffi.c t-ffi.c;
+       $LN_S $srcdir/x86/sysv.S t-asm.S;;
+  i*86-*-cygwin*|i*86-*-mingw*|i*86-*-win32*)
+       TARGET=X86_WIN32;
+       $LN_S $srcdir/x86/ffi.c t-ffi.c;
+       $LN_S $srcdir/x86/win32.S t-asm.S;;
+  ia64*-*-*)
+       TARGET=IA64;
+       $LN_S $srcdir/ia64/ffi.c t-ffi.c;
+       $LN_S $srcdir/ia64/unix.S t-asm.S;;
+  m68k-*-linux*)
+       TARGET=M68K;
+       $LN_S $srcdir/m68k/ffi.c t-ffi.c;
+       $LN_S $srcdir/m68k/unix.S t-asm.S;;
+  mips-*-elf)
+       TARGET=MIPS;
+       $LN_S $srcdir/mips/ffi.c t-ffi.c;
+       $LN_S $srcdir/mips/o32.S t-asm.S;;
+  mips-sgi-irix5.*)
+       TARGET=MIPS;
+       $LN_S $srcdir/mips/ffi.c t-ffi.c;
+       $LN_S $srcdir/mips/o32.S t-asm.S;;
+  mips-sgi-irix6.*)
+       TARGET=MIPS;
+       $LN_S $srcdir/mips/ffi.c t-ffi.c;
+       $LN_S $srcdir/mips/n32.S t-asm.S;;
+  powerpc-*-linux* | powerpc-*-sysv* | powerpc-*-beos*) 
+       TARGET=POWERPC;
+       $LN_S $srcdir/powerpc/ffi.c t-ffi.c;
+       $LN_S $srcdir/powerpc/sysv.S t-asm.S;;
+  s390-*-linux*)
+       TARGET=S390;
+       $LN_S $srcdir/s390/ffi.c t-ffi.c;
+       $LN_S $srcdir/s390/v8.S t-asm.S;;
+  sparc-*-linux*|sparc-sun-*)
+       TARGET=SPARC;
+       $LN_S $srcdir/sparc/ffi.c t-ffi.c;
+       $LN_S $srcdir/sparc/v8.S t-asm.S;;
+  sparc64-*-linux*)
+       TARGET=SPARC;
+       $LN_S $srcdir/sparc/ffi.c t-ffi.c;
+       $LN_S $srcdir/sparc/v9.S t-asm.S;;
+esac
 
 
-if test x$TARGET = xS390; then
-  S390_TRUE=
-  S390_FALSE='#'
-else
-  S390_TRUE='#'
-  S390_FALSE=
+
+if test ${TARGET} = unknown; then
+  { echo "configure: error: "libffi has not been ported to $host."" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1745: checking how to run the C preprocessor" >&5
+echo "configure:1796: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1756,13 +1807,13 @@ else
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1760 "configure"
+#line 1811 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1773,13 +1824,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1777 "configure"
+#line 1828 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1790,13 +1841,13 @@ else
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1794 "configure"
+#line 1845 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1821,12 +1872,12 @@ fi
 echo "$ac_t""$CPP" 1>&6
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1825: checking for ANSI C header files" >&5
+echo "configure:1876: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1830 "configure"
+#line 1881 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -1834,7 +1885,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -1851,7 +1902,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1855 "configure"
+#line 1906 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -1869,7 +1920,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 1873 "configure"
+#line 1924 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -1890,7 +1941,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 1894 "configure"
+#line 1945 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1901,7 +1952,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:1905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -1927,12 +1978,12 @@ fi
 for ac_func in memcpy
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1931: checking for $ac_func" >&5
+echo "configure:1982: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1936 "configure"
+#line 1987 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -1955,7 +2006,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:1959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -1982,19 +2033,19 @@ done
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:1986: checking for working alloca.h" >&5
+echo "configure:2037: checking for working alloca.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1991 "configure"
+#line 2042 "configure"
 #include "confdefs.h"
 #include <alloca.h>
 int main() {
 char *p = alloca(2 * sizeof(int));
 ; return 0; }
 EOF
-if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_header_alloca_h=yes
 else
@@ -2015,12 +2066,12 @@ EOF
 fi
 
 echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2019: checking for alloca" >&5
+echo "configure:2070: checking for alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2024 "configure"
+#line 2075 "configure"
 #include "confdefs.h"
 
 #ifdef __GNUC__
@@ -2048,7 +2099,7 @@ int main() {
 char *p = (char *) alloca(1);
 ; return 0; }
 EOF
-if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   ac_cv_func_alloca_works=yes
 else
@@ -2080,12 +2131,12 @@ EOF
 
 
 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2084: checking whether alloca needs Cray hooks" >&5
+echo "configure:2135: checking whether alloca needs Cray hooks" >&5
 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2089 "configure"
+#line 2140 "configure"
 #include "confdefs.h"
 #if defined(CRAY) && ! defined(CRAY2)
 webecray
@@ -2110,12 +2161,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
 if test $ac_cv_os_cray = yes; then
 for ac_func in _getb67 GETB67 getb67; do
   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2114: checking for $ac_func" >&5
+echo "configure:2165: checking for $ac_func" >&5
 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2119 "configure"
+#line 2170 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
@@ -2138,7 +2189,7 @@ $ac_func();
 
 ; return 0; }
 EOF
-if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=yes"
 else
@@ -2165,7 +2216,7 @@ done
 fi
 
 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2169: checking stack direction for C alloca" >&5
+echo "configure:2220: checking stack direction for C alloca" >&5
 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -2173,7 +2224,7 @@ else
   ac_cv_c_stack_direction=0
 else
   cat > conftest.$ac_ext <<EOF
-#line 2177 "configure"
+#line 2228 "configure"
 #include "confdefs.h"
 find_stack_direction ()
 {
@@ -2192,7 +2243,7 @@ main ()
   exit (find_stack_direction() < 0);
 }
 EOF
-if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_stack_direction=1
 else
@@ -2215,37 +2266,37 @@ fi
 
 
 echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2219: checking size of short" >&5
+echo "configure:2270: checking size of short" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
+  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
   cat > conftest.$ac_ext <<EOF
-#line 2227 "configure"
+#line 2276 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(short));
-  exit(0);
-}
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (short) == $ac_size):;
+; return 0; }
 EOF
-if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_short=`cat conftestval`
+if { (eval echo configure:2286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_short=$ac_size
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_short=0
 fi
-rm -fr conftest*
+rm -f conftest*
+  if test x$ac_cv_sizeof_short != x ; then break; fi
+done
+
 fi
 
+if test x$ac_cv_sizeof_short = x ; then
+  { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
 fi
 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
 cat >> confdefs.h <<EOF
@@ -2254,37 +2305,37 @@ EOF
 
 
 echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2258: checking size of int" >&5
+echo "configure:2309: checking size of int" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
+  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
   cat > conftest.$ac_ext <<EOF
-#line 2266 "configure"
+#line 2315 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(int));
-  exit(0);
-}
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (int) == $ac_size):;
+; return 0; }
 EOF
-if { (eval echo configure:2277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_int=`cat conftestval`
+if { (eval echo configure:2325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_int=$ac_size
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_int=0
 fi
-rm -fr conftest*
+rm -f conftest*
+  if test x$ac_cv_sizeof_int != x ; then break; fi
+done
+
 fi
 
+if test x$ac_cv_sizeof_int = x ; then
+  { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
 fi
 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
 cat >> confdefs.h <<EOF
@@ -2293,37 +2344,37 @@ EOF
 
 
 echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2297: checking size of long" >&5
+echo "configure:2348: checking size of long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
+  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
   cat > conftest.$ac_ext <<EOF
-#line 2305 "configure"
+#line 2354 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long));
-  exit(0);
-}
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (long) == $ac_size):;
+; return 0; }
 EOF
-if { (eval echo configure:2316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long=`cat conftestval`
+if { (eval echo configure:2364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_long=$ac_size
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long=0
 fi
-rm -fr conftest*
+rm -f conftest*
+  if test x$ac_cv_sizeof_long != x ; then break; fi
+done
+
 fi
 
+if test x$ac_cv_sizeof_long = x ; then
+  { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
 fi
 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
 cat >> confdefs.h <<EOF
@@ -2332,37 +2383,37 @@ EOF
 
 
 echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:2336: checking size of long long" >&5
+echo "configure:2387: checking size of long long" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
+  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
   cat > conftest.$ac_ext <<EOF
-#line 2344 "configure"
+#line 2393 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long long));
-  exit(0);
-}
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (long long) == $ac_size):;
+; return 0; }
 EOF
-if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long_long=`cat conftestval`
+if { (eval echo configure:2403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_long_long=$ac_size
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long_long=0
 fi
-rm -fr conftest*
+rm -f conftest*
+  if test x$ac_cv_sizeof_long_long != x ; then break; fi
+done
+
 fi
 
+if test x$ac_cv_sizeof_long_long = x ; then
+  { echo "configure: error: cannot determine a size for long long" 1>&2; exit 1; }
 fi
 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
 cat >> confdefs.h <<EOF
@@ -2371,37 +2422,37 @@ EOF
 
 
 echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:2375: checking size of float" >&5
+echo "configure:2426: checking size of float" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
+  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
   cat > conftest.$ac_ext <<EOF
-#line 2383 "configure"
+#line 2432 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(float));
-  exit(0);
-}
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (float) == $ac_size):;
+; return 0; }
 EOF
-if { (eval echo configure:2394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_float=`cat conftestval`
+if { (eval echo configure:2442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_float=$ac_size
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_float=0
 fi
-rm -fr conftest*
+rm -f conftest*
+  if test x$ac_cv_sizeof_float != x ; then break; fi
+done
+
 fi
 
+if test x$ac_cv_sizeof_float = x ; then
+  { echo "configure: error: cannot determine a size for float" 1>&2; exit 1; }
 fi
 echo "$ac_t""$ac_cv_sizeof_float" 1>&6
 cat >> confdefs.h <<EOF
@@ -2410,37 +2461,37 @@ EOF
 
 
 echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:2414: checking size of double" >&5
+echo "configure:2465: checking size of double" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
+  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
   cat > conftest.$ac_ext <<EOF
-#line 2422 "configure"
+#line 2471 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(double));
-  exit(0);
-}
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (double) == $ac_size):;
+; return 0; }
 EOF
-if { (eval echo configure:2433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_double=`cat conftestval`
+if { (eval echo configure:2481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_double=$ac_size
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_double=0
 fi
-rm -fr conftest*
+rm -f conftest*
+  if test x$ac_cv_sizeof_double != x ; then break; fi
+done
+
 fi
 
+if test x$ac_cv_sizeof_double = x ; then
+  { echo "configure: error: cannot determine a size for double" 1>&2; exit 1; }
 fi
 echo "$ac_t""$ac_cv_sizeof_double" 1>&6
 cat >> confdefs.h <<EOF
@@ -2449,37 +2500,37 @@ EOF
 
 
 echo $ac_n "checking size of long double""... $ac_c" 1>&6
-echo "configure:2453: checking size of long double" >&5
+echo "configure:2504: checking size of long double" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
+  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
   cat > conftest.$ac_ext <<EOF
-#line 2461 "configure"
+#line 2510 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long double));
-  exit(0);
-}
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (long double) == $ac_size):;
+; return 0; }
 EOF
-if { (eval echo configure:2472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long_double=`cat conftestval`
+if { (eval echo configure:2520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_long_double=$ac_size
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long_double=0
 fi
-rm -fr conftest*
+rm -f conftest*
+  if test x$ac_cv_sizeof_long_double != x ; then break; fi
+done
+
 fi
 
+if test x$ac_cv_sizeof_long_double = x ; then
+  { echo "configure: error: cannot determine a size for long double" 1>&2; exit 1; }
 fi
 echo "$ac_t""$ac_cv_sizeof_long_double" 1>&6
 cat >> confdefs.h <<EOF
@@ -2489,37 +2540,37 @@ EOF
 
 
 echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:2493: checking size of void *" >&5
+echo "configure:2544: checking size of void *" >&5
 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
+  for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
   cat > conftest.$ac_ext <<EOF
-#line 2501 "configure"
+#line 2550 "configure"
 #include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(void *));
-  exit(0);
-}
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (void *) == $ac_size):;
+; return 0; }
 EOF
-if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_void_p=`cat conftestval`
+if { (eval echo configure:2560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_sizeof_void_p=$ac_size
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_void_p=0
 fi
-rm -fr conftest*
+rm -f conftest*
+  if test x$ac_cv_sizeof_void_p != x ; then break; fi
+done
+
 fi
 
+if test x$ac_cv_sizeof_void_p = x ; then
+  { echo "configure: error: cannot determine a size for void *" 1>&2; exit 1; }
 fi
 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
 cat >> confdefs.h <<EOF
@@ -2528,14 +2579,14 @@ EOF
 
 
 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2532: checking whether byte ordering is bigendian" >&5
+echo "configure:2583: checking whether byte ordering is bigendian" >&5
 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   ac_cv_c_bigendian=unknown
 # See if sys/param.h defines the BYTE_ORDER macro.
 cat > conftest.$ac_ext <<EOF
-#line 2539 "configure"
+#line 2590 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2546,11 +2597,11 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   # It does; now see whether it defined to BIG_ENDIAN or not.
 cat > conftest.$ac_ext <<EOF
-#line 2554 "configure"
+#line 2605 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2561,7 +2612,7 @@ int main() {
 #endif
 ; return 0; }
 EOF
-if { (eval echo configure:2565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_bigendian=yes
 else
@@ -2578,10 +2629,10 @@ fi
 rm -f conftest*
 if test $ac_cv_c_bigendian = unknown; then
 if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+   echo $ac_n "cross-compiling... " 2>&6 
 else
   cat > conftest.$ac_ext <<EOF
-#line 2585 "configure"
+#line 2636 "configure"
 #include "confdefs.h"
 main () {
   /* Are we little or big endian?  From Harbison&Steele.  */
@@ -2594,7 +2645,7 @@ main () {
   exit (u.c[sizeof (long) - 1] == 1);
 }
 EOF
-if { (eval echo configure:2598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_c_bigendian=no
 else
@@ -2610,11 +2661,53 @@ fi
 fi
 
 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+if test $ac_cv_c_bigendian = unknown; then
+echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
+echo "configure:2667: checking to probe for byte ordering" >&5
+
+cat >conftest.c <<EOF
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
+int main() { _ascii (); _ebcdic (); return 0; }
+EOF
+ if test -f conftest.c ; then
+     if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
+        if test `grep -l BIGenDianSyS conftest.o` ; then
+           echo $ac_n ' big endian probe OK, ' 1>&6
+           ac_cv_c_bigendian=yes
+        fi
+        if test `grep -l LiTTleEnDian conftest.o` ; then
+           echo $ac_n ' little endian probe OK, ' 1>&6
+           if test $ac_cv_c_bigendian = yes ; then
+            ac_cv_c_bigendian=unknown;
+           else
+            ac_cv_c_bigendian=no
+           fi
+        fi
+        echo $ac_n 'guessing bigendian ...  ' >&6
+     fi
+  fi
+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+fi
 if test $ac_cv_c_bigendian = yes; then
   cat >> confdefs.h <<\EOF
 #define WORDS_BIGENDIAN 1
 EOF
 
+  BYTEORDER=4321
+else
+  BYTEORDER=1234
+fi
+cat >> confdefs.h <<EOF
+#define BYTEORDER $BYTEORDER
+EOF
+
+if test $ac_cv_c_bigendian = unknown; then
+  { echo "configure: error: unknown endianess - sorry" 1>&2; exit 1; }
 fi
 
 
@@ -2780,7 +2873,7 @@ done
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "include/Makefile include/ffi.h Makefile fficonfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "include/Makefile testsuite/Makefile Makefile fficonfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -2840,28 +2933,13 @@ s%@build_cpu@%$build_cpu%g
 s%@build_vendor@%$build_vendor%g
 s%@build_os@%$build_os%g
 s%@RANLIB@%$RANLIB%g
+s%@LD@%$LD%g
+s%@NM@%$NM%g
 s%@LN_S@%$LN_S%g
 s%@LIBTOOL@%$LIBTOOL%g
-s%@MIPS_GCC_TRUE@%$MIPS_GCC_TRUE%g
-s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
-s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
-s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
-s%@SPARC_TRUE@%$SPARC_TRUE%g
-s%@SPARC_FALSE@%$SPARC_FALSE%g
-s%@X86_TRUE@%$X86_TRUE%g
-s%@X86_FALSE@%$X86_FALSE%g
-s%@ALPHA_TRUE@%$ALPHA_TRUE%g
-s%@ALPHA_FALSE@%$ALPHA_FALSE%g
-s%@IA64_TRUE@%$IA64_TRUE%g
-s%@IA64_FALSE@%$IA64_FALSE%g
-s%@M68K_TRUE@%$M68K_TRUE%g
-s%@M68K_FALSE@%$M68K_FALSE%g
-s%@POWERPC_TRUE@%$POWERPC_TRUE%g
-s%@POWERPC_FALSE@%$POWERPC_FALSE%g
-s%@ARM_TRUE@%$ARM_TRUE%g
-s%@ARM_FALSE@%$ARM_FALSE%g
-s%@S390_TRUE@%$S390_TRUE%g
-s%@S390_FALSE@%$S390_FALSE%g
+s%@TESTSUBDIR_TRUE@%$TESTSUBDIR_TRUE%g
+s%@TESTSUBDIR_FALSE@%$TESTSUBDIR_FALSE%g
+s%@AM_RUNTESTFLAGS@%$AM_RUNTESTFLAGS%g
 s%@CPP@%$CPP%g
 s%@ALLOCA@%$ALLOCA%g
 s%@TARGET@%$TARGET%g
@@ -2909,7 +2987,7 @@ EOF
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"include/Makefile include/ffi.h Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"include/Makefile testsuite/Makefile Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
index 12e8939..1a1254b 100644 (file)
@@ -2,13 +2,6 @@ dnl Process this with autoconf to create configure
 AC_INIT(fficonfig.h.in)
 AM_CONFIG_HEADER(fficonfig.h)
 
-AC_MSG_WARN(***********************************************************)
-AC_MSG_WARN(***********************************************************)
-AC_MSG_WARN(This is beta code.  If you're looking for a stable release)
-AC_MSG_WARN(then use the most recent one - libffi-1.20.)
-AC_MSG_WARN(***********************************************************)
-AC_MSG_WARN(***********************************************************)
-
 dnl Default to --enable-multilib
 AC_ARG_ENABLE(multilib,
 [  --enable-multilib       build many library versions (default)],
@@ -41,60 +34,91 @@ AM_MAINTAINER_MODE
 
 AC_PROG_CC
 AC_PROG_LIBTOOL
+AM_PROG_LIBTOOL
+AC_PROG_LN_S
+
+dnl The -no-testsuite modules omit the test subdir.
+AM_CONDITIONAL(TESTSUBDIR, test -d $srcdir/testsuite)
+
+AM_RUNTESTFLAGS=
 
-TARGETDIR="unknown"
+TARGET="unknown"
 case "$host" in
-mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;;
-i*86-*-linux*) TARGET=X86; TARGETDIR=x86;;
-i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;;
-i*86-*-beos*) TARGET=X86; TARGETDIR=x86;;
-i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;;
-i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;;
-i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;;
-i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
-sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
-sparc-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
-sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
-sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
-alpha*-*-linux* | alpha*-*-osf*) TARGET=ALPHA; TARGETDIR=alpha;;
-ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
-m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
-powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
-powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
-arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
-s390-*-linux*) TARGET=S390; TARGETDIR=s390;;
+  alpha*-*-linux* | alpha*-*-osf*)
+       TARGET=ALPHA;
+       $LN_S ${srcdir}/alpha/ffi.c t-ffi.c;
+       $LN_S $srcdir/alpha/osf.S t-asm.S;;
+  arm*-*-linux-*)
+       TARGET=ARM;
+       $LN_S $srcdir/arm/ffi.c t-ffi.c;
+       $LN_S $srcdir/arm/ffi.S t-asm.S;;
+  i*86-*-beos*|i*86-*-freebsd*|i*86-*-linux*|i*86-*-solaris*)
+       TARGET=X86; 
+       $LN_S $srcdir/x86/ffi.c t-ffi.c;
+       $LN_S $srcdir/x86/sysv.S t-asm.S;;
+  i*86-*-cygwin*|i*86-*-mingw*|i*86-*-win32*)
+       TARGET=X86_WIN32;
+       $LN_S $srcdir/x86/ffi.c t-ffi.c;
+       $LN_S $srcdir/x86/win32.S t-asm.S;;
+  ia64*-*-*)
+       TARGET=IA64;
+       $LN_S $srcdir/ia64/ffi.c t-ffi.c;
+       $LN_S $srcdir/ia64/unix.S t-asm.S;;
+  m68k-*-linux*)
+       TARGET=M68K;
+       $LN_S $srcdir/m68k/ffi.c t-ffi.c;
+       $LN_S $srcdir/m68k/unix.S t-asm.S;;
+  mips-*-elf)
+       TARGET=MIPS;
+       $LN_S $srcdir/mips/ffi.c t-ffi.c;
+       $LN_S $srcdir/mips/o32.S t-asm.S;;
+  mips-sgi-irix5.*)
+       TARGET=MIPS;
+       $LN_S $srcdir/mips/ffi.c t-ffi.c;
+       $LN_S $srcdir/mips/o32.S t-asm.S;;
+  mips-sgi-irix6.*)
+       TARGET=MIPS;
+       $LN_S $srcdir/mips/ffi.c t-ffi.c;
+       $LN_S $srcdir/mips/n32.S t-asm.S;;
+  powerpc-*-linux* | powerpc-*-sysv* | powerpc-*-beos*) 
+       TARGET=POWERPC;
+       $LN_S $srcdir/powerpc/ffi.c t-ffi.c;
+       $LN_S $srcdir/powerpc/sysv.S t-asm.S;;
+  s390-*-linux*)
+       TARGET=S390;
+       $LN_S $srcdir/s390/ffi.c t-ffi.c;
+       $LN_S $srcdir/s390/v8.S t-asm.S;;
+  sparc-*-linux*|sparc-sun-*)
+       TARGET=SPARC;
+       $LN_S $srcdir/sparc/ffi.c t-ffi.c;
+       $LN_S $srcdir/sparc/v8.S t-asm.S;;
+  sparc64-*-linux*)
+       TARGET=SPARC;
+       $LN_S $srcdir/sparc/ffi.c t-ffi.c;
+       $LN_S $srcdir/sparc/v9.S t-asm.S;;
 esac
 
-if test $TARGETDIR = unknown; then
+AC_SUBST(AM_RUNTESTFLAGS)
+
+if test ${TARGET} = unknown; then
   AC_ERROR("libffi has not been ported to $host.")
 fi
 
-AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
-AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
-AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
-AM_CONDITIONAL(X86, test x$TARGET = xX86)
-AM_CONDITIONAL(ALPHA, test x$TARGET = xALPHA)
-AM_CONDITIONAL(IA64, test x$TARGET = xIA64)
-AM_CONDITIONAL(M68K, test x$TARGET = xM68K)
-AM_CONDITIONAL(POWERPC, test x$TARGET = xPOWERPC)
-AM_CONDITIONAL(ARM, test x$TARGET = xARM)
-AM_CONDITIONAL(S390, test x$TARGET = xS390)
-
 AC_HEADER_STDC
 AC_CHECK_FUNCS(memcpy)
 AC_FUNC_ALLOCA
 
 dnl AC_CHECK_SIZEOF(char)
-AC_CHECK_SIZEOF(short)
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
-AC_CHECK_SIZEOF(long long)
-AC_CHECK_SIZEOF(float)
-AC_CHECK_SIZEOF(double)
-AC_CHECK_SIZEOF(long double)
+AC_COMPILE_CHECK_SIZEOF(short)
+AC_COMPILE_CHECK_SIZEOF(int)
+AC_COMPILE_CHECK_SIZEOF(long)
+AC_COMPILE_CHECK_SIZEOF(long long)
+AC_COMPILE_CHECK_SIZEOF(float)
+AC_COMPILE_CHECK_SIZEOF(double)
+AC_COMPILE_CHECK_SIZEOF(long double)
 
-AC_CHECK_SIZEOF(void *)
-AC_C_BIGENDIAN
+AC_COMPILE_CHECK_SIZEOF(void *)
+AC_C_BIGENDIAN_CROSS
 
 AC_SUBST(TARGET)
 AC_SUBST(TARGETDIR)
@@ -118,7 +142,7 @@ else
   multilib_arg=
 fi
 
-AC_OUTPUT(include/Makefile include/ffi.h Makefile,
+AC_OUTPUT(include/Makefile testsuite/Makefile Makefile,
 [
 if test -n "$CONFIG_FILES"; then
    ac_file=Makefile . ${libffi_basedir}/config-ml.in
index f7ea90b..a11f82b 100644 (file)
 /* Define if you have the ANSI C header files.  */
 #undef STDC_HEADERS
 
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
-#undef WORDS_BIGENDIAN
-
 /* Define this if you want extra debugging */
 #undef FFI_DEBUG
 
 /* Define this is you do not want support for the raw API.  */
 #undef FFI_NO_RAW_API
 
-/* The number of bytes in a double.  */
-#undef SIZEOF_DOUBLE
+/* Define if you have the memcpy function.  */
+#undef HAVE_MEMCPY
 
-/* The number of bytes in a float.  */
-#undef SIZEOF_FLOAT
+/* The number of bytes in type short */
+#undef SIZEOF_SHORT
 
-/* The number of bytes in a int.  */
+/* The number of bytes in type int */
 #undef SIZEOF_INT
 
-/* The number of bytes in a long.  */
+/* The number of bytes in type long */
 #undef SIZEOF_LONG
 
-/* The number of bytes in a long double.  */
-#undef SIZEOF_LONG_DOUBLE
-
-/* The number of bytes in a long long.  */
+/* The number of bytes in type long long */
 #undef SIZEOF_LONG_LONG
 
-/* The number of bytes in a short.  */
-#undef SIZEOF_SHORT
+/* The number of bytes in type float */
+#undef SIZEOF_FLOAT
+
+/* The number of bytes in type double */
+#undef SIZEOF_DOUBLE
+
+/* The number of bytes in type long double */
+#undef SIZEOF_LONG_DOUBLE
 
-/* The number of bytes in a void *.  */
+/* The number of bytes in type void * */
 #undef SIZEOF_VOID_P
 
-/* Define if you have the memcpy function.  */
-#undef HAVE_MEMCPY
+/* whether byteorder is bigendian */
+#undef WORDS_BIGENDIAN
+
+/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
+#undef BYTEORDER
+
index 726a04d..8c21108 100644 (file)
@@ -1,7 +1,6 @@
-# Makefile.in generated automatically by automake 1.4d from Makefile.am
+# Makefile.in generated automatically by automake 1.4 from Makefile.am
 
-# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -11,6 +10,7 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
+
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -32,6 +32,8 @@ mandir = @mandir@
 includedir = @includedir@
 oldincludedir = /usr/include
 
+DESTDIR =
+
 pkgdatadir = $(datadir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
@@ -44,11 +46,9 @@ AUTOMAKE = @AUTOMAKE@
 AUTOHEADER = @AUTOHEADER@
 
 INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_FLAG =
-INSTALL_HEADER = $(INSTALL_DATA)
 transform = @program_transform_name@
 
 NORMAL_INSTALL = :
@@ -57,18 +57,19 @@ POST_INSTALL = :
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
-
-@SET_MAKE@
 host_alias = @host_alias@
 host_triplet = @host@
+AM_RUNTESTFLAGS = @AM_RUNTESTFLAGS@
 AS = @AS@
 CC = @CC@
 DLLTOOL = @DLLTOOL@
 EXEEXT = @EXEEXT@
+LD = @LD@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
+NM = @NM@
 OBJDUMP = @OBJDUMP@
 PACKAGE = @PACKAGE@
 RANLIB = @RANLIB@
@@ -78,7 +79,6 @@ TARGETDIR = @TARGETDIR@
 VERSION = @VERSION@
 libffi_basedir = @libffi_basedir@
 
-
 AUTOMAKE_OPTIONS = foreign
 
 EXTRA_DIST = ffi.h.in ffi_common.h ffi_mips.h
@@ -86,47 +86,45 @@ EXTRA_DIST = ffi.h.in ffi_common.h ffi_mips.h
 hackdir = $(includedir)
 
 hack_DATA = fficonfig.h ffi.h ffi_mips.h
-subdir = include
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_HEADER = ../fficonfig.h
-CONFIG_CLEAN_FILES =  ffi.h
-DIST_SOURCES = 
+CONFIG_CLEAN_FILES = 
 DATA =  $(hack_DATA)
 
-DIST_COMMON =  Makefile.am Makefile.in ffi.h.in
+DIST_COMMON =  Makefile.am Makefile.in
 
 
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
+TAR = gtar
 GZIP_ENV = --best
-all: all-am
+all: all-redirect
 .SUFFIXES:
 $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
        cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile
 
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
        cd $(top_builddir) \
-         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+         && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
-ffi.h: $(top_builddir)/config.status ffi.h.in
-       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
 
 install-hackDATA: $(hack_DATA)
        @$(NORMAL_INSTALL)
        $(mkinstalldirs) $(DESTDIR)$(hackdir)
        @list='$(hack_DATA)'; for p in $$list; do \
-         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(hackdir)/$$f"; \
-         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(hackdir)/$$f; \
+         if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(hackdir)/$$p"; \
+           $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(hackdir)/$$p; \
+         else if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(hackdir)/$$p"; \
+           $(INSTALL_DATA) $$p $(DESTDIR)$(hackdir)/$$p; \
+         fi; fi; \
        done
 
 uninstall-hackDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(hack_DATA)'; for p in $$list; do \
-         f="`echo $$p | sed -e 's|^.*/||'`"; \
-         echo " rm -f $(DESTDIR)$(hackdir)/$$f"; \
-         rm -f $(DESTDIR)$(hackdir)/$$f; \
+       list='$(hack_DATA)'; for p in $$list; do \
+         rm -f $(DESTDIR)$(hackdir)/$$p; \
        done
 tags: TAGS
 TAGS:
@@ -134,17 +132,22 @@ TAGS:
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 
+subdir = include
 
 distdir: $(DISTFILES)
+       here=`cd $(top_builddir) && pwd`; \
+       top_distdir=`cd $(top_distdir) && pwd`; \
+       distdir=`cd $(distdir) && pwd`; \
+       cd $(top_srcdir) \
+         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign include/Makefile
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          if test -d $$d/$$file; then \
-           cp -pR $$d/$$file $(distdir) \
-           || exit 1; \
+           cp -pr $$/$$file $(distdir)/$$file; \
          else \
            test -f $(distdir)/$$file \
-           || cp -p $$d/$$file $(distdir)/$$file \
-           || exit 1; \
+           || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+           || cp -p $$d/$$file $(distdir)/$$file || :; \
          fi; \
        done
 info-am:
@@ -167,8 +170,9 @@ install: install-am
 uninstall-am: uninstall-hackDATA
 uninstall: uninstall-am
 all-am: Makefile $(DATA)
+all-redirect: all-am
 install-strip:
-       $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+       $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
 installdirs:
        $(mkinstalldirs)  $(DESTDIR)$(hackdir)
 
@@ -182,31 +186,31 @@ distclean-generic:
        -rm -f config.cache config.log stamp-h stamp-h[0-9]*
 
 maintainer-clean-generic:
-       @echo "This command is intended for maintainers to use"
-       @echo "it deletes files that may require special tools to rebuild."
-       -rm -f Makefile.in
-clean: clean-am
+mostlyclean-am:  mostlyclean-generic
 
-clean-am: clean-generic mostlyclean-am
+mostlyclean: mostlyclean-am
 
-distclean: distclean-am
+clean-am:  clean-generic mostlyclean-am
 
-distclean-am: clean-am distclean-generic
+clean: clean-am
 
-maintainer-clean: maintainer-clean-am
+distclean-am:  distclean-generic clean-am
+       -rm -f libtool
 
-maintainer-clean-am: distclean-am maintainer-clean-generic
+distclean: distclean-am
 
-mostlyclean: mostlyclean-am
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+       @echo "This command is intended for maintainers to use;"
+       @echo "it deletes files that may require special tools to rebuild."
 
-mostlyclean-am: mostlyclean-generic
+maintainer-clean: maintainer-clean-am
 
-.PHONY: check check-am clean clean-generic distclean distclean-generic \
-       distdir dvi dvi-am info info-am install install-am install-data \
-       install-data-am install-exec install-exec-am install-hackDATA \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic uninstall uninstall-am uninstall-hackDATA
+.PHONY: uninstall-hackDATA install-hackDATA tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
+install-exec install-data-am install-data install-am install \
+uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/libffi/include/ffi_private.h b/libffi/include/ffi_private.h
new file mode 100644 (file)
index 0000000..763143a
--- /dev/null
@@ -0,0 +1,120 @@
+/* -----------------------------------------------------------------*-C-*-
+   libffi 2.0.0 - Copyright (C) 1996, 1997, 1998, 1999, 2000, 
+                                2001  Red Hat, Inc.
+
+   Permission is hereby granted, free of charge, to any person obtaining
+   a copy of this software and associated documentation files (the
+   ``Software''), to deal in the Software without restriction, including
+   without limitation the rights to use, copy, modify, merge, publish,
+   distribute, sublicense, and/or sell copies of the Software, and to
+   permit persons to whom the Software is furnished to do so, subject to
+   the following conditions:
+
+   The above copyright notice and this permission notice shall be included
+   in all copies or substantial portions of the Software.
+
+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+   IN NO EVENT SHALL RED HAT BE LIABLE FOR ANY CLAIM, DAMAGES OR
+   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+   OTHER DEALINGS IN THE SOFTWARE.
+
+   ----------------------------------------------------------------------- */
+
+#include <fficonfig.h>
+
+#define ALIGN(v, a)  (((((size_t) (v))-1) | ((a)-1))+1)
+
+/* ---- Generic type definitions ----------------------------------------- */
+
+#define FLOAT32 float
+#define FLOAT64 double
+#define FLOAT80 long double
+
+#define UINT8   unsigned char
+#define SINT8   signed char
+
+#if SIZEOF_INT == 2
+
+#define UINT16 unsigned int
+#define SINT16  int
+
+#else 
+#if SIZEOF_SHORT == 2
+
+#define UINT16  unsigned short
+#define SINT16  short
+
+#endif
+#endif
+
+#if SIZEOF_INT == 4
+
+#define UINT32 unsigned int
+#define SINT32  int
+
+#else 
+#if SIZEOF_SHORT == 4
+
+#define UINT32  unsigned short
+#define SINT32  short
+
+#else
+#if SIZEOF_LONG == 4
+
+#define UINT32  unsigned long
+#define SINT32  long
+
+#endif
+#endif
+#endif
+
+#if SIZEOF_INT == 8
+
+#define UINT64  unsigned int
+#define SINT64  int
+
+#else
+#if SIZEOF_LONG == 8
+
+#define UINT64  unsigned long
+#define SINT64  long
+
+#else
+#if SIZEOF_LONG_LONG == 8
+
+#define UINT64  unsigned long long
+#define SINT64  long long
+
+#endif
+#endif
+#endif
+
+#define FFI_TYPE_VOID       0    
+#define FFI_TYPE_INT        1
+#define FFI_TYPE_FLOAT      2    
+#define FFI_TYPE_DOUBLE     3
+#if SIZEOF_LONG_DOUBLE == SIZEOF_DOUBLE
+#define FFI_TYPE_LONGDOUBLE FFI_TYPE_DOUBLE
+#else
+#define FFI_TYPE_LONGDOUBLE 4
+#endif
+#define FFI_TYPE_UINT8      5   /* If this changes, update ffi_mips.h. */
+#define FFI_TYPE_SINT8      6   /* If this changes, update ffi_mips.h. */
+#define FFI_TYPE_UINT16     7 
+#define FFI_TYPE_SINT16     8
+#define FFI_TYPE_UINT32     9
+#define FFI_TYPE_SINT32     10
+#define FFI_TYPE_UINT64     11
+#define FFI_TYPE_SINT64     12
+#define FFI_TYPE_STRUCT     13  /* If this changes, update ffi_mips.h. */
+#define FFI_TYPE_POINTER    14
+
+#if _MIPS_SIM==_ABIN32 && defined(_ABIN32)
+#define SIZEOF_ARG 8
+#else
+#define SIZEOF_ARG SIZEOF_VOID_P
+#endif
+