*** configure.ac.orig	Sun Nov 27 23:57:00 2005
--- configure.ac	Wed Nov 30 06:07:39 2005
***************
*** 1,52 ****
  dnl Process this file with autoconf to produce a configure script.
  AC_INIT(src/jam.c)
  AM_INIT_AUTOMAKE(jamvm, 1.4.1)
  
  AC_ARG_ENABLE(tracegc,
      [  --enable-tracegc         add gc tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE(TRACEGC)
      fi],)
  
  AC_ARG_ENABLE(tracealloc,
      [  --enable-tracealloc      add object allocation tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE(TRACEALLOC)
      fi],)
  
  AC_ARG_ENABLE(tracefnlz,
      [  --enable-tracefnlz       add object finalisation tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE(TRACEFNLZ)
      fi],)
  
  AC_ARG_ENABLE(tracedll,
      [  --enable-tracedll        add library loading/lookup tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE(TRACEDLL)
      fi],)
  
  AC_ARG_ENABLE(tracelock,
      [  --enable-tracelock       add object locking tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE(TRACELOCK)
      fi],)
  
  AC_ARG_ENABLE(tracethread,
      [  --enable-tracethread     add thread creation tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE(TRACETHREAD)
      fi],)
  
  AC_ARG_ENABLE(trace,
      [  --enable-trace           add all tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE(TRACEGC)
!         AC_DEFINE(TRACEALLOC)
!         AC_DEFINE(TRACEFNLZ)
!         AC_DEFINE(TRACEDLL)
!         AC_DEFINE(TRACELOCK)
!         AC_DEFINE(TRACETHREAD)
      fi],)
  
  AC_ARG_ENABLE(zip,
--- 1,53 ----
  dnl Process this file with autoconf to produce a configure script.
  AC_INIT(src/jam.c)
  AM_INIT_AUTOMAKE(jamvm, 1.4.1)
+ AC_CONFIG_HEADERS([./config.h])
  
  AC_ARG_ENABLE(tracegc,
      [  --enable-tracegc         add gc tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE([TRACEGC],1,[defined if gc tracing enabled for debugging])
      fi],)
  
  AC_ARG_ENABLE(tracealloc,
      [  --enable-tracealloc      add object allocation tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE([TRACEALLOC],1,[defined if object allocation tracing enabled for debugging])
      fi],)
  
  AC_ARG_ENABLE(tracefnlz,
      [  --enable-tracefnlz       add object finalisation tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE([TRACEFNLZ],1,[defined if object finalisation tracing enabled for debugging])
      fi],)
  
  AC_ARG_ENABLE(tracedll,
      [  --enable-tracedll        add library loading/lookup tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE([TRACEDLL],1,[defined if library loading/unloading tracing enabled for debugging])
      fi],)
  
  AC_ARG_ENABLE(tracelock,
      [  --enable-tracelock       add object locking tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE([TRACELOCK],1,[defined if object locking tracing enabled for debugging])
      fi],)
  
  AC_ARG_ENABLE(tracethread,
      [  --enable-tracethread     add thread creation tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE([TRACETHREAD],1,[defined if thread creation tracing enabled for debugging])
      fi],)
  
  AC_ARG_ENABLE(trace,
      [  --enable-trace           add all tracing (for debugging)],
      [if test "$enableval" != no; then
!         AC_DEFINE([TRACEGC],1,[defined if gc tracing enabled for debugging])
!         AC_DEFINE([TRACEALLOC],1,[defined if object allocation tracing enabled for debugging])
!         AC_DEFINE([TRACEFNLZ],1,[defined if object finalisation tracing enabled for debugging])
!         AC_DEFINE([TRACEDLL],1,[defined if library loading/unloading tracing enabled for debugging])
!         AC_DEFINE([TRACELOCK],1,[defined if object locking tracing enabled for debugging])
!         AC_DEFINE([TRACETHREAD],1,[defined if thread creation tracing enabled for debugging])
      fi],)
  
  AC_ARG_ENABLE(zip,
***************
*** 60,68 ****
--- 61,72 ----
  i[[456]]86-*-openbsd*) host_cpu=i386 host_os=linux libdl_needed=no ;;
  i[[456]]86-*-freebsd*) host_cpu=i386 host_os=linux libdl_needed=no ;;
  x86_64-*-linux*) host_os=linux ;;
+ amd64-*-openbsd*) host_os=linux libdl_needed=no ;;
  arm*-*-linux*) host_cpu=arm host_os=linux ;;
+ arm*-*-openbsd*) host_cpu=arm host_os=linux libdl_needed=no ;;
  powerpc*-*-linux*) host_cpu=powerpc host_os=linux ;;
  powerpc-*-darwin*) host_os=darwin ;;
+ powerpc*-*-openbsd*) host_cpu=powerpc host_os=linux libdl_needed=no ;;
  *) AC_MSG_ERROR($host not supported) ;;
  esac
  
***************
*** 92,109 ****
       fi])
  
  if test "$enable_int_threading" != no; then
!     AC_DEFINE(THREADED)
  
      if test "$enable_int_direct" != no; then
!         AC_DEFINE(DIRECT)
      fi
  
      if test "$enable_int_caching" != no; then
!         AC_DEFINE(USE_CACHE)
      fi
  
      if test "$enable_int_prefetch" != no; then
!         AC_DEFINE(PREFETCH)
      fi
  fi
  
--- 96,114 ----
       fi])
  
  if test "$enable_int_threading" != no; then
!     AC_DEFINE([THREADED],1,[interpreter threaded])
  
      if test "$enable_int_direct" != no; then
!         AC_DEFINE([DIRECT],1,[interpreter direct])
!         DEFS="$DEFS -DDIRECT"
      fi
  
      if test "$enable_int_caching" != no; then
!         AC_DEFINE([USE_CACHE],1,[interpreter uses caching])
      fi
  
      if test "$enable_int_prefetch" != no; then
!         AC_DEFINE([PREFETCH],1,[interpreter uses prefetching])
      fi
  fi
  
***************
*** 161,167 ****
      fi])
  
  if test "$enable_zip" != no; then
!     AC_DEFINE(USE_ZIP)
      use_zip_yes=
      use_zip_no='#'
  else
--- 166,172 ----
      fi])
  
  if test "$enable_zip" != no; then
!     AC_DEFINE([USE_ZIP],1,[use zip])
      use_zip_yes=
      use_zip_no='#'
  else
***************
*** 173,179 ****
  AC_SUBST(use_zip_no)
  
  if test "$enable_ffi" != no; then
!     AC_DEFINE(USE_FFI)
  fi
  
  AC_CHECK_HEADERS(sys/time.h unistd.h endian.h sys/param.h locale.h)
--- 178,184 ----
  AC_SUBST(use_zip_no)
  
  if test "$enable_ffi" != no; then
!     AC_DEFINE([USE_FFI],1,[use FFI])
  fi
  
  AC_CHECK_HEADERS(sys/time.h unistd.h endian.h sys/param.h locale.h)
