From reid at hlvm.org Thu May 4 21:06:04 2006 From: reid at hlvm.org (reid at hlvm.org) Date: Thu, 4 May 2006 22:06:04 -0400 Subject: [hlvm-commits] r6 - / autoconf autoconf/m4 docs hlvm hlvm/AST hlvm/Base test tools Message-ID: <200605050206.k45264D6029515@sneezy.swagora.com> Author: reid Date: 2006-05-04 22:06:03 -0400 (Thu, 04 May 2006) New Revision: 6 Added: Makefile.config.in Makefile.hlvm VERSION.in autoconf/install-sh autoconf/m4/check_gnu_make.m4 autoconf/m4/find_std_program.m4 autoconf/m4/path_perl.m4 autoconf/missing autoconf/mkinstalldirs docs/Doxyfile.in docs/Makefile docs/doxygen.css docs/doxygen.footer docs/doxygen.header docs/doxygen.intro hlvm/ hlvm/AST/ hlvm/AST/Bundle.h hlvm/AST/Function.h hlvm/AST/LinkageItem.h hlvm/AST/Makefile hlvm/AST/Node.h hlvm/Base/ hlvm/Base/Config.h.in hlvm/Base/ConfigData.cpp.in hlvm/Base/Makefile hlvm/Makefile test/ test/Makefile Removed: Makefile.common.in Modified: Makefile autoconf/configure.ac autoconf/m4/config_makefile.m4 configure tools/Makefile Log: Get a more useful build system going. "make" from the top level now works, although it doesn't build anything. Also, start adding some source files. Modified: Makefile =================================================================== --- Makefile 2006-04-26 20:51:14 UTC (rev 5) +++ Makefile 2006-05-05 02:06:03 UTC (rev 6) @@ -10,11 +10,10 @@ # Indicates our relative path to the top of the project's root directory. # LEVEL = . -DIRS = lib tools +DIRS = hlvm tools EXTRA_DIST = include # # Include the Master Makefile that knows how to build all. # -include $(LEVEL)/Makefile.common - +include $(LEVEL)/Makefile.hlvm Deleted: Makefile.common.in =================================================================== --- Makefile.common.in 2006-04-26 20:51:14 UTC (rev 5) +++ Makefile.common.in 2006-05-05 02:06:03 UTC (rev 6) @@ -1,29 +0,0 @@ -##===- Makefile.common.in ----------------------------------*- Makefile -*-===## -# -# This is the top level configured makefile for the HLVM project. -# -# Copyright (C) 2006 Reid Spencer. All Rights Reserved. -# -##===----------------------------------------------------------------------===## -# Set the name of the project here -PROJECT_NAME := HLVM -PROJ_VERSION := 0.1svn - -# Set this variable to the top of the LLVM source tree. -LLVM_SRC_ROOT = @LLVM_SRC@ - -# Set this variable to the top level directory where LLVM was built -# (this is *not* the same as OBJ_ROOT as defined in LLVM's Makefile.config). -LLVM_OBJ_ROOT = @LLVM_OBJ@ - -# Set the directory root of this project's source files -PROJ_SRC_ROOT := $(subst //,/, at abs_top_srcdir@) - -# Set the root directory of this project's object files -PROJ_OBJ_ROOT := $(subst //,/, at abs_top_objdir@) - -# Set the root directory of this project's install prefix -PROJ_INSTALL_ROOT := @prefix@ - -# Include LLVM's Master Makefile. -include $(LLVM_OBJ_ROOT)/Makefile.common Added: Makefile.config.in =================================================================== --- Makefile.config.in 2006-04-26 20:51:14 UTC (rev 5) +++ Makefile.config.in 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,58 @@ +##===- Makefile.config.in ----------------------------------*- Makefile -*-===## +# +# This is the top level configured makefile for the HLVM project. +# +# Copyright (C) 2006 Reid Spencer. All Rights Reserved. +# +##===----------------------------------------------------------------------===## + +# Set HLVM Specific variables +HLVM_name := @PACKAGE_TARNAME@ +HLVM_version := @PACKAGE_VERSION@ +HLVM_so_version := @HLVM_SO_VERSION@ +HLVM_so_current := @HLVM_SO_CURRENT@ +HLVM_so_revision := @HLVM_SO_REVISION@ +HLVM_so_age := @HLVM_SO_AGE@ +HLVM_prefix := @HLVM_PREFIX@ +HLVM_bindir := @HLVM_PREFIX@/bin +HLVM_libdir := @HLVM_PREFIX@/lib +HLVM_includedir := @HLVM_PREFIX@/include +HLVM_datadir := @HLVM_PREFIX@/data +HLVM_configdir := @HLVM_PREFIX@/etc +HLVM_etcdir := @HLVM_PREFIX@/etc +HLVM_infodir := @HLVM_PREFIX@/info +HLVM_mandir := @HLVM_PREFIX@/man +HLVM_wrkspcdir := @HLVM_WITH_WORKSPACE@ +HLVM_llvmsrcdir := @HLVM_WITH_LLVM_SRC@ +HLVM_llvmobjdir := @HLVM_WITH_LLVM_OBJ@ +HLVM_top_srcdir := @abs_top_srcdir@ +HLVM_top_objdir := @abs_top_builddir@ +HLVM_DEBUG := @HLVM_DEBUG@ +HLVM_ASSERT := @HLVM_ASSERT@ +HLVM_INLINE := @HLVM_INLINE@ +HLVM_OPTIMIZE := @HLVM_OPTIMIZE@ +HLVM_SHAREDPREFIX:= @HLVM_SHAREDPREFIX@ +HLVM_TRACE := @HLVM_TRACE@ +HLVM_SMALL := @HLVM_SMALL@ +HLVM_EFENCE := @HLVM_EFENCE@ +HLVM_PROFILING := @HLVM_PROFILING@ + +# Set the name of the project here +PROJECT_NAME := $(HLVM_name) +PROJ_VERSION := $(HLVM_VERSION) + +# Set this variable to the top of the LLVM source tree. +LLVM_SRC_ROOT = @HLVM_WITH_LLVM_SRC@ + +# Set this variable to the top level directory where LLVM was built +# (this is *not* the same as OBJ_ROOT as defined in LLVM's Makefile.config). +LLVM_OBJ_ROOT = @HLVM_WITH_LLVM_OBJ@ + +# Set the directory root of this project's source files +PROJ_SRC_ROOT := $(subst //,/, at abs_top_srcdir@) + +# Set the root directory of this project's object files +PROJ_OBJ_ROOT := $(subst //,/, at abs_top_objdir@) + +# Set the root directory of this project's install prefix +PROJ_INSTALL_ROOT := @prefix@ Added: Makefile.hlvm =================================================================== --- Makefile.hlvm 2006-04-26 20:51:14 UTC (rev 5) +++ Makefile.hlvm 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,131 @@ +#------------------------------------------------------------------------------ +# Makefile.hlvm - Main HLVM Makefile: included by all +# +# Copyright (C) 2006 HLVM Group. All Rights Reserved +# +#------------------------------------------------------------------------------ +# This makefile is included in every Makefile in the HLVM project. It provides +# definitions needed by all makefiles in HLVM. It also includes LLVM Makefile +# system upon which it is based. +#------------------------------------------------------------------------------ + +# Include our configured variables +include $(LEVEL)/Makefile.config + +# +# Set up compilation variables +# + +CPPFLAGS += -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS \ + -I$(HLVM_top_srcdir) \ + -I$(HLVM_top_objdir) \ + +ifeq ($(HLVM_ASSERT),true) +CPPFLAGS += -DHLVM_ASSERT=1 +endif + +HLVM_COMMONFLAGS = -pipe -Wall -W -Wpointer-arith -Wcast-align -Wwrite-strings \ + -Winline -Wno-unused-parameter +CXXFLAGS += $(HLVM_COMMONFLAGS) -Wno-deprecated -Wold-style-cast \ + -Woverloaded-virtual -ffor-scope -foperator-names +CFLAGS += $(HLVM_COMMONFLAGS) + +ifeq ($(HLVM_DEBUG),true) +CXXFLAGS += -ggdb +CFLAGS += -ggdb +endif + +ifeq ($(HLVM_OPTIMIZE),true) +ifeq ($(HLVM_SMALL),true) +CXXFLAGS += -Os +CFLAGS += -Os +endif +ENABLE_OPTIMIZED := 1 +endif + +ifeq ($(HLVM_INLINE),true) +CXXFLAGS += -DHLVM_INLINE -DHLVM_inline=inline +CFLAGS += -DHLVM_INLINE -DHLVM_inline=inline +else +CXXFLAGS += -fno-inline -DHLVM_inline= +CFLAGS += -fno-inline -DHLVM_inline= +endif + +ifeq ($(HLVM_PROFILING),true) +CXXFLAGS += -pg +CFLAGS += -pg +endif + +# +# Define the ICU Resource stuff +# +SUFFIXES = .E +ICU_DATA_FILE = $(ICU_NAME).dat +ICU_MSGS_FILES = $(ICU_RESOURCES:%=%.msgs) +ICU_RES_FILES = $(ICU_RESOURCES:%=$(ICU_NAME)_%.res) +ICU_FILE_LIST = $(ICU_NAME).files +ALL_MSGS_FILES = $(HLVM_ALL_LANGUAGES:%=%.msgs) + +# LLVM Requirements for makefile system +PROJECT_NAME := $(HLVM_name) +PROJECT_VERSION := $(HLVM_version) +LLVM_SRC_ROOT := $(HLVM_llvmsrcdir) +LLVM_OBJ_ROOT := $(HLVM_llvmobjdir) +PROJ_SRC_ROOT := $(HLVM_top_srcdir) +PROJ_OBJ_ROOT := $(HLVM_top_objdir) +PROJ_INSTALL_ROOT := $(HLVM_prefix) + +SUFFIXES := .rng .i .hlvm .xml .java .class + +TOOLLINKOPTSB := $(LIBS) + +# Get configuration data and make rules from LLVM +include $(HLVM_llvmobjdir)/Makefile.common + +EchoCmd := $(ECHO) hlvm [$(MAKELEVEL)]: +Echo := @$(EchoCmd) + + +$(PROJ_OBJ_ROOT)/Makefile.hlvm: $(PROJ_SRC_ROOT)/Makefile.hlvm + $(Echo) "Updating Makefile.hlvm" + $(Verb) $(MKDIR) $(@D) + $(Verb) $(CP) -f $< $@ + +preconditions: $(PROJ_OBJ_DIR)/Makefile.hlvm + +#$(PROJ_OBJ_DIR)/%Tokenizer.cpp $(PROJ_OBJ_DIR)/%Tokenizer.h $(PROJ_OBJ_DIR)/%TokenHash.i : $(PROJ_SRC_DIR)/%.rng $(HLVM_top_srcdir)/utils/tmplt/Tokenizer_Template.cpp $(HLVM_top_srcdir)/utils/tmplt/Tokenizer_Template.h $(HLVM_top_srcdir)/utils/bin/mkTokenizer +# $(Echo) Building Tokenizer For $* +# $(Verb) $(HLVM_top_srcdir)/utils/bin/mkTokenizer -f \ +# $(PROJ_SRC_DIR)/$*.rng + +ifdef INSTALL_INCLUDES +PartialPath := $(patsubst $(PROJ_SRC_ROOT)/%,%,$(PROJ_SRC_DIR)) +IncludesWithPath := $(patsubst %,$(PartialPath)/%,$(INSTALL_INCLUDES)) +InstalledIncludes := $(patsubst %,$(PROJ_includedir)/%,$(IncludesWithPath)) + +install-local:: $(PROJ_includedir)/$(PartialPath)/.dir $(InstalledIncludes) + +$(InstalledIncludes): $(PROJ_includedir)/$(PartialPath)/% : $(PROJ_SRC_DIR)/% + $(Echo) Installing $(*) + $(Verb) $(DataInstall) $< $@ + +endif + +printvars:: + $(Echo) "BuildMode : " '$(BuildMode)' + $(Echo) "HLVM_VERSION : " '$(HLVM_VERSION)' + $(Echo) "HLVM_SO_VERSION : " '$(HLVM_SO_VERSION)' + $(Echo) "HLVM_bindir : " '$(HLVM_bindir)' + $(Echo) "HLVM_libdir : " '$(HLVM_libdir)' + $(Echo) "HLVM_sbindir : " '$(HLVM_sbindir)' + $(Echo) "HLVM_libexecdir : " '$(HLVM_libexecdir)' + $(Echo) "HLVM_datadir : " '$(HLVM_datadir)' + $(Echo) "HLVM_configdir : " '$(HLVM_configdir)' + $(Echo) "HLVM_infodir : " '$(HLVM_infodir)' + $(Echo) "HLVM_mandir : " '$(HLVM_mandir)' + $(Echo) "HLVM_schemasdir : " '$(HLVM_schemasdir)' + $(Echo) "HLVM_wrkspcdir : " '$(HLVM_wrkspcdir)' + $(Echo) "HLVM_llvmsrcdir : " '$(HLVM_llvmsrcdir)' + $(Echo) "HLVM_llvmobjdir : " '$(HLVM_llvmobjdir)' + $(Echo) "HLVM_top_srcdir : " '$(HLVM_top_srcdir)' + $(Echo) "HLVM_top_builddir: " '$(HLVM_top_builddir)' Added: VERSION.in =================================================================== --- VERSION.in 2006-04-26 20:51:14 UTC (rev 5) +++ VERSION.in 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,25 @@ +HLVM Configuration Details File - @HLVM_CONFIGTIME@ +============================================================= +Package Name : @PACKAGE_NAME@ +Short Name : @PACKAGE_TARNAME@ +Copyright : @HLVM_COPYRIGHT@ +Version : @HLVM_VERSION@ +Library Revision : @HLVM_SO_VERSION@ +Maintainer : @HLVM_CONFIGURE_MAINTAINER@ +Report Bugs To : @PACKAGE_BUGREPORT@ + +Source Directory : @abs_top_srcdir@ +Object Directory : @abs_top_builddir@ +Install Prefix : @HLVM_PREFIX@ +XPS Workspace Directory : @HLVM_WITH_WORKSPACE@ + +Configuration Name : @HLVM_CFGNAME@ +enable-debug : @HLVM_DEBUG@ +enable-assert : @HLVM_ASSERT@ +enable-trace : @HLVM_TRACE@ +enable-inline : @HLVM_INLINE@ +enable-optimize : @HLVM_OPTIMIZE@ +enable-small : @HLVM_SMALL@ +enable-sharedprefix : @HLVM_SHAREDPREFIX@ +enable-efence : @HLVM_EFENCE@ +enable-profiling : @HLVM_PROFILING@ Modified: autoconf/configure.ac =================================================================== --- autoconf/configure.ac 2006-04-26 20:51:14 UTC (rev 5) +++ autoconf/configure.ac 2006-05-05 02:06:03 UTC (rev 6) @@ -1,57 +1,411 @@ dnl ************************************************************************** dnl * Initialize dnl ************************************************************************** -AC_INIT([[[HLVM]]],[[[0.1svn]]],[hlvm-dev at hlvm.org]) -AC_SUBST(HLVM_COPYRIGHT,["Copyright (c) 2006 HLVM Programmer's Group"]) -AC_COPYRIGHT[Copyright (c) 2006 HLVM Programmer's Group]) +AC_INIT([High Level Virtual Machine],[0.1svn],[hlvm-dev at hlvm.org],HLVM) AC_PREREQ(2.59) -AC_CONFIG_SRCDIR(["lib/Makefile"]) -AC_CONFIG_FILES(Makefile.common) +HLVM_COPYRIGHT="Coyright (c) 2006 HLVM Group" +AC_SUBST(HLVM_COPYRIGHT) +AC_COPYRIGHT($HLVM_COPYRIGHT) +AC_CONFIG_SRCDIR([hlvm/AST/Bundle.h]) +AC_REVISION([$Id$]) -dnl Configure project makefiles -dnl List every Makefile that exists within your source tree -AC_CONFIG_MAKEFILE(Makefile) -AC_CONFIG_MAKEFILE(lib/Makefile) -AC_CONFIG_MAKEFILE(tools/Makefile) +HLVM_VERSION="${PACKAGE_VERSION}" +AC_SUBST(HLVM_PACKAGE,$PACKAGE) +AC_SUBST(HLVM_VERSION) +AC_PREFIX_DEFAULT([/usr/local/hlvm]) + dnl ************************************************************************** dnl * Set the location of various third-party software packages dnl ************************************************************************** -FIND_PACKAGE([llvm],[llvm/Module.h],[LLVMCore.o],[llc], - [Low Level Virtual Machine]) FIND_PACKAGE([apr],[apr-1/apr.h],[libapr-1.so],[],[Apache Portable Runtime]) -dnl ************************************************************************** -dnl * Determine which system we are building on -dnl ************************************************************************** +dnl ---------------------------------------------------------------------------- +dnl -- Shared Object Versioning For libtool +dnl -- +dnl -- The following substitution, HLVM_SO_VERSION defines the version number +dnl -- for the libHLVM.so shared object. This version is not the same as the +dnl -- HLVM release version! It is dependent on the *ACTUAL* interface (not +dnl -- implementation) changes in the shared object. The value of +dnl -- HLVM_SO_VERSION is passed to libtool as the --version-info argument. +dnl -- Here are the rules for updating these numbers (adapted from libtool +dnl -- documentation) +dnl -- +dnl -- 0. CURRENT(C)= current interface version number (of the release) +dnl -- REVISION(R)= revision of the *impelmentation* of the current interface +dnl -- AGE(A)= number of prior interface version numbers also supported +dnl -- +dnl -- 1. Start with version information of `0:0:0'. +dnl -- +dnl -- 2. Update the version information *only* immediately before a public +dnl -- release of your software. More frequent updates are unnecessary, +dnl -- and only say that the current interface number gets larger faster. +dnl -- +dnl -- 3. If the library source code has changed at all since the last +dnl -- update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). +dnl -- +dnl -- 4. If any interfaces have been added, removed, or changed since the +dnl -- last update, increment CURRENT, and set REVISION to 0. +dnl -- +dnl -- 5. If any interfaces have been added (only!) since the last public +dnl -- release, then increment AGE. +dnl -- +dnl -- 6. If any interfaces have been removed since the last public +dnl -- release, then set AGE to 0. +dnl ---------------------------------------------------------------------------- +HLVM_SO_CURRENT="0" +HLVM_SO_REVISION="10" +HLVM_SO_AGE="0" +HLVM_SO_VERSION="${HLVM_SO_CURRENT}:${HLVM_SO_REVISION}:${HLVM_SO_AGE}" +AC_SUBST(HLVM_SO_VERSION) +AC_SUBST(HLVM_SO_CURRENT) +AC_SUBST(HLVM_SO_REVISION) +AC_SUBST(HLVM_SO_AGE) -dnl ************************************************************************** -dnl * Check for programs. -dnl ************************************************************************** +dnl ---------------------------------------------------------------------------- +dnl -- +dnl -- SECTION 2: Setup The Command Line Arguments For "configure" +dnl -- +dnl ---------------------------------------------------------------------------- +dnl -- +dnl -- enable-sharedprefix: specifies that the installation prefix is shared +dnl -- with other packages and that per-configuration directories should not +dnl -- be created +AC_MSG_CHECKING(whether to install in a shared prefix) +AC_ARG_ENABLE(sharedprefix, + AS_HELP_STRING([--enable-sharedprefix], + [Install in a "--prefix" that is shared. (default=yes)]), + [case "${enableval}" in + yes) HLVM_SHAREDPREFIX=true;; + no) HLVM_SHAREDPREFIX=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-sharedprefix);; + esac],HLVM_SHAREDPREFIX=true) +AC_MSG_RESULT($HLVM_SHAREDPREFIX) +AC_SUBST(HLVM_SHAREDPREFIX) +if test "$HLVM_SHAREDPREFIX" = true ; then + AC_DEFINE(HLVM_SHAREDPREFIX,[], + [Defined if all configurations share the same prefix]) +fi -dnl ************************************************************************** -dnl * Check for libraries. -dnl ************************************************************************** +dnl -- enable-debug: specifies that the build be done with debug settings +dnl -- which makes HLVM (potentially) much more verbose, larger, and slower +dnl -- (but debuggable) +AC_MSG_CHECKING(whether to build debug version of HLVM) +AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [Build with debug settings (slower but debuggable). (default=no)]), + [case "${enableval}" in + yes) HLVM_DEBUG=true;; + no) HLVM_DEBUG=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug);; + esac],HLVM_DEBUG=false) +AC_MSG_RESULT($HLVM_DEBUG) +AC_SUBST(HLVM_DEBUG) -dnl ************************************************************************** -dnl * Checks for header files. -dnl ************************************************************************** +dnl -- enable-optimize: specifies that the build be done top optimize the speed +dnl -- of the resulting executables and libraries. Debugging generally will be +dnl -- difficult with this kind of build. +AC_MSG_CHECKING(whether to optimize compiliation of HLVM) +AC_ARG_ENABLE(optimize, + AS_HELP_STRING([--enable-optimize], + [Optimized build (faster but less debuggable). (default=yes)]), + [case "${enableval}" in + yes) HLVM_OPTIMIZE=true;; + no) HLVM_OPTIMIZE=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-OPTIMIZE);; + esac], HLVM_OPTIMIZE=true) +AC_MSG_RESULT($HLVM_OPTIMIZE) +AC_SUBST(HLVM_OPTIMIZE) -dnl ************************************************************************** -dnl * Checks for typedefs, structures, and compiler characteristics. -dnl ************************************************************************** +dnl -- enable-inline: specifies that the build use inline functions or not +dnl -- inline functions make HLVM much faster but harder to debug +AC_MSG_CHECKING(whether to use inline functions) +AC_ARG_ENABLE(INLINE, + AS_HELP_STRING([--enable-inline], + [Build with inline functions. (default=yes)]), + [case "${enableval}" in + yes) HLVM_INLINE=true;; + no) HLVM_INLINE=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-inline);; + esac],HLVM_INLINE=true) +AC_MSG_RESULT($HLVM_INLINE) +AC_SUBST(HLVM_INLINE) -dnl ************************************************************************** -dnl * Checks for library functions. -dnl ************************************************************************** +dnl -- enable-assert: specifies that the build use assertion checks +dnl -- Building with assertions is safer but slower +AC_MSG_CHECKING(whether to perform assertion checking) +AC_ARG_ENABLE(ASSERT, + AS_HELP_STRING([--enable-assert], + [Build with inline functions. (default=yes)]), + [case "${enableval}" in + yes) HLVM_ASSERT=true;; + no) HLVM_ASSERT=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-assert);; + esac],HLVM_ASSERT=true) +AC_MSG_RESULT($HLVM_ASSERT) +AC_SUBST(HLVM_ASSERT) -dnl ************************************************************************** -dnl * Enable various compile-time options -dnl ************************************************************************** +dnl -- enable-trace: specifies that the build permit runtime tracing +dnl -- This is useful for debugging but will produce MUCH larger executable +AC_MSG_CHECKING(whether to allow runtime tracing) +AC_ARG_ENABLE(TRACE, + AS_HELP_STRING([--enable-trace],[Build with tracing support. (default=no)]), + [case "${enableval}" in + yes) HLVM_TRACE=true;; + no) HLVM_TRACE=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-trace);; + esac],HLVM_TRACE=false) +AC_MSG_RESULT($HLVM_TRACE) +AC_SUBST(HLVM_TRACE) -dnl ************************************************************************** -dnl * Create the output files -dnl ************************************************************************** +dnl -- enable-small: specifies that the build should be done to make HLVM +dnl -- as small as possible, omitting non-essential features to reduce memory +dnl -- footprint. +AC_MSG_CHECKING(whether to build a small version of HLVM) +AC_ARG_ENABLE(SMALL, + AS_HELP_STRING([--enable-small], + [Optimize for smaller executable rather than speed. (default=no)]), + [case "${enableval}" in + yes) HLVM_SMALL=true;; + no) HLVM_SMALL=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-small);; + esac],HLVM_SMALL=false) +AC_MSG_RESULT($HLVM_SMALL) +AC_SUBST(HLVM_SMALL) +dnl -- enable-efence: specifies that Electric Fence should be used for malloc(3) +dnl -- and related functions to catch memory overrun/underrun errors. When not +dnl -- enabled, the standard system malloc(3) is used. +AC_MSG_CHECKING(whether to use Electric Fence) +AC_ARG_ENABLE(efence, + AS_HELP_STRING([--enable-efence], + [Build with Electric Fence support. (default=no)]), + [case "${enableval}" in + yes) HLVM_EFENCE=true;; + no) HLVM_EFENCE=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-efence);; + esac],HLVM_EFENCE=false) +AC_MSG_RESULT($HLVM_EFENCE) +AC_SUBST(HLVM_EFENCE) + +dnl -- enable-profiling: specifies that the build should create a profiling +dnl -- executable. The compiler will be passed the -pg switch so that call +dnl -- graph profiles are generated +AC_MSG_CHECKING(whether to build with profiling enabled) +AC_ARG_ENABLE(profiling, + AS_HELP_STRING([--enable-profiling], + [Build with profiling enabled. (default=no)]), + [case "${enableval}" in + yes) HLVM_PROFILING=true;; + no) HLVM_PROFILING=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling);; + esac],HLVM_PROFILING=false) +AC_MSG_RESULT($HLVM_PROFILING) +AC_SUBST(HLVM_PROFILING) + +dnl -- with-workspace: specifies the location of where workspaces are to be +dnl -- stored +AC_MSG_CHECKING(location of HLVM workspace) +AC_ARG_WITH(workspace, + AS_HELP_STRING([--with-workspace=], + [dir=location of the HLVM workspace storage (default=/opt/hlvm)]), + [case "${withval}" in + /*|*/*) HLVM_WITH_WORKSPACE=$withval ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-WORKSPACE) ;; + esac],[HLVM_WITH_WORKSPACE=/opt/hlvm]) +AC_MSG_RESULT($HLVM_WITH_WORKSPACE) +AC_SUBST(HLVM_WITH_WORKSPACE) + +dnl -- with-expat: specifies the location of the expat library +AC_MSG_CHECKING(location of expat library) +AC_ARG_WITH(expat, + AS_HELP_STRING([--with-expat=], + [Specify where the expat lbrary is located (default=/usr/local)]), + [case "${withval}" in + /*) HLVM_WITH_EXPAT=$withval ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-expat) ;; + esac],[HLVM_WITH_EXPAT=/usr]) +AC_MSG_RESULT($HLVM_WITH_EXPAT) +AC_SUBST(HLVM_WITH_EXPAT) + +dnl -- with-includes: specifies the location of additional header file dirs +AC_MSG_CHECKING(location of additional header files) +AC_ARG_WITH(includes, + AS_HELP_STRING([--with-includes=-I...], + [Specify additional header file directories (efault=none)]), + [case "${withval}" in + -I/*) HLVM_WITH_INCLUDES=$withval ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-includes) ;; + esac],[HLVM_WITH_INCLUDES=]) +AC_MSG_RESULT($HLVM_WITH_INCLUDES) +AC_SUBST(HLVM_WITH_INCLUDES) +dnl Set up the CPPFLAGS to include the --with places +CPPFLAGS="-D_REENTRANT -D_GNU_SOURCE $HLVM_WITH_INCLUDES" + +dnl -- with-llvm-src: specifies the location of the LLVM header files +AC_MSG_CHECKING(location of LLVM source code) +AC_ARG_WITH(llvm-src, + AS_HELP_STRING([--with-llvm-src=], + [dir=the location of LLVM sources (default=/usr)]), + [case "${withval}" in + /*|*/*) HLVM_WITH_LLVM_SRC=$withval ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-llvm-src) ;; + esac],[HLVM_WITH_LLVM_SRC=/usr]) +AC_MSG_RESULT($HLVM_WITH_LLVM_SRC) +AC_SUBST(HLVM_WITH_LLVM_SRC) + +dnl -- with-llvm-obj: specifies the location of the LLVM object files +AC_MSG_CHECKING(location of LLVM object code) +AC_ARG_WITH(llvm-obj, + AS_HELP_STRING([--with-llvm-obj=], + [dir=the location of LLVM objects directory (default=/usr)]), + [case "${withval}" in + /*|*/*) HLVM_WITH_LLVM_OBJ=$withval ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-llvm-obj) ;; + esac],[HLVM_WITH_LLVM_OBJ=/usr]) +AC_MSG_RESULT($HLVM_WITH_LLVM_OBJ) +AC_SUBST(HLVM_WITH_LLVM_OBJ) + +dnl -- with-llvm-gcc: specifies the location of the llvm-gcc Compiler +AC_MSG_CHECKING(location of LLVM GCC compiler) +AC_ARG_WITH(llvm-gcc, + AS_HELP_STRING([--with-llvm-gcc=], + [dir=the location of LLVM's llvm-gcc compiler (default=use normal gcc)]), + [case "${withval}" in + /*|*/*) HLVM_WITH_LLVMGCC=$withval ;; + *) AC_MSG_ERROR(bad value ${withval} for --with-llvmgcc) ;; + esac],[HLVM_WITH_LLVMGCC=""]) +AC_MSG_RESULT($HLVM_WITH_LLVMGCC) +AC_SUBST(HLVM_WITH_LLVMGCC) +dnl ---------------------------------------------------------------------------- +dnl -- +dnl -- SECTION 3: Check For Programs We Need +dnl -- +dnl ---------------------------------------------------------------------------- + +dnl -- Check for the various programs needed for building and installing HLVM +dnl -- Perl is our choice for utility scripts because of its flexibility and +dnl -- wide platform support +AC_PROG_CPP +AC_PROG_CC(gcc) +AC_PROG_CXX(g++) +AC_CHECK_GNU_MAKE +dnl AC_PATH_PROG(path_EGREP, egrep, egrep) +dnl AC_PATH_PROG(path_GPERF, gperf, gperf) +dnl AC_PATH_PROG(path_GPP, g++, g++) +dnl AC_PATH_PROG(path_GPROF, gprof, gprof) +dnl AC_PATH_PROG(path_PERL, perl, perl) +dnl AC_PATH_PROG(path_PKGDATA, pkgdata, pkgdata) +dnl AC_PATH_PROG(path_SORT, sort, sort) +dnl AC_PATH_PROG(path_UNIQ, uniq, uniq) + +dnl ---------------------------------------------------------------------------- +dnl -- +dnl -- SECTION 4: Check For Needed Libraries +dnl -- +dnl ---------------------------------------------------------------------------- + +dnl -- Check for specific libraries we depend on. +LDFLAGS="-L${HLVM_WITH_LLVM_OBJ}/lib/Debug -L${prefix}/lib -L/usr/local/lib ${LDFLAGS}" +if test "$HLVM_EFENCE" = true ; then + AC_CHECK_LIB(efence,malloc,, + AC_MSG_ERROR(Electric Fence library is required: -lefence) ) +fi +dnl AC_CACHE_VAL(hlvm_cv_lib_c_ok, +dnl [AC_CHECK_LIB(c,exit,, +dnl AC_MSG_ERROR(Standard C Library is required: -lc)) ]) +dnl AC_CACHE_VAL(hlvm_cv_lib_m_ok, +dnl [AC_CHECK_LIB(m,floor,, +dnl AC_MSG_ERROR(Standard Math Library is required: -lm)) ]) +if test "$HLVM_WITH_EXPAT" = "/usr" ; then +AC_CACHE_VAL(ac_cv_lib_expat_ok, + [AC_CHECK_LIB(expat,XML_Parse,, + AC_MSG_ERROR(expat Library is required: -lexpat)) ]) +else + if test -r "$HLVM_WITH_EXPAT/libexpat.la" ; then + LIBS="$HLVM_WITH_EXPAT/libexpat.la $LIBS" + else + AC_MSG_ERROR([Can't find libexpat.la]) + fi +fi + +dnl ---------------------------------------------------------------------------- +dnl -- +dnl -- SECTION 5: Check For Needed Header Files +dnl -- +dnl ---------------------------------------------------------------------------- +AC_CHECK_HEADERS([apr-1/apr.h expat.h llvm/Module.h]) + +dnl ---------------------------------------------------------------------------- +dnl -- +dnl -- SECTION 6: HLVM Project specific configuration +dnl -- +dnl ---------------------------------------------------------------------------- + +HLVM_CFGNAME="" +if test "$HLVM_SMALL" = true ; then HLVM_CFGNAME="${HLVM_CFGNAME}S" ; else + HLVM_CFGNAME="${HLVM_CFGNAME}s" ; fi +if test "$HLVM_TRACE" = true ; then HLVM_CFGNAME="${HLVM_CFGNAME}T" ; else + HLVM_CFGNAME="${HLVM_CFGNAME}t" ; fi +if test "$HLVM_ASSERT" = true ; then HLVM_CFGNAME="${HLVM_CFGNAME}A" ; else + HLVM_CFGNAME="${HLVM_CFGNAME}a" ; fi +if test "$HLVM_DEBUG" = true ; then HLVM_CFGNAME="${HLVM_CFGNAME}D" ; else + HLVM_CFGNAME="${HLVM_CFGNAME}d" ; fi +if test "$HLVM_INLINE" = true ; then HLVM_CFGNAME="${HLVM_CFGNAME}I" ; else + HLVM_CFGNAME="${HLVM_CFGNAME}i" ; fi +if test "$HLVM_OPTIMIZE" = true ; then HLVM_CFGNAME="${HLVM_CFGNAME}O" ; else + HLVM_CFGNAME="${HLVM_CFGNAME}o" ; fi +AC_SUBST(HLVM_CFGNAME) + +if test "$HLVM_SHAREDPREFIX" = false ; then + AC_MSG_NOTICE([Configuring For Unique Installation]) + eval HLVM_PREFIX="${prefix}/${HLVM_CFGNAME}" + if test "${exec_prefix}" = "NONE"; then + eval HLVM_EXEC_PREFIX="${prefix}/${HLVM_CFGNAME}" + else + eval HLVM_EXEC_PREFIX="${exec_prefix}/${HLVM_CFGNAME}" + fi +else + AC_MSG_NOTICE([Configuring For Shared Installation: ${HLVM_CFGNAME}]) + eval HLVM_PREFIX="${prefix}" + if test "${exec_prefix}" = "NONE"; then + eval HLVM_EXEC_PREFIX="${prefix}" + else + eval HLVM_EXEC_PREFIX="${exec_prefix}" + fi +fi + +dnl Check the --with-* variables for sanity +dnl if test \! -f "$HLVM_WITH_LLVM_SRC/lib/VMCore/Module.cpp" ; then +dnl AC_MSG_ERROR([LLVM sources are not in $HLVM_WITH_LLVM_SRC]) +dnl fi +dnl if test \! -f "$HLVM_WITH_LLVM_OBJ/Makefile.config" ; then +dnl AC_MSG_ERROR([LLVM objects are not in $HLVM_WITH_LLVM_OBJ]) +dnl fi + +HLVM_CONFIGTIME=`date` +AC_SUBST(HLVM_CONFIGTIME) +HLVM_PREFIX="$prefix" +AC_SUBST(HLVM_PREFIX) + +dnl ---------------------------------------------------------------------------- +dnl -- +dnl -- SECTION 7: Output the configure script and makefiles. +dnl -- +dnl ---------------------------------------------------------------------------- + +AC_CONFIG_HEADER([hlvm/Base/Config.h]) +AC_CONFIG_FILES([VERSION Makefile.config docs/Doxyfile]) +AC_CONFIG_FILES([hlvm/Base/ConfigData.cpp]) +AC_CONFIG_MAKEFILE(Makefile) +AC_CONFIG_MAKEFILE(Makefile.hlvm) +AC_CONFIG_MAKEFILE(docs/Makefile) +AC_CONFIG_MAKEFILE(hlvm/Makefile) +AC_CONFIG_MAKEFILE(tools/Makefile) +AC_CONFIG_MAKEFILE(test/Makefile) + dnl This must be last AC_OUTPUT +echo "" +echo "Configuration of HLVM is now finished." +echo "" Added: autoconf/install-sh =================================================================== --- autoconf/install-sh 2006-04-26 20:51:14 UTC (rev 5) +++ autoconf/install-sh 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,322 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2004-09-10.20 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# 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 THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= +dstarg= +no_target_directory= + +usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: +-c (ignored) +-d create directories instead of installing files. +-g GROUP $chgrpprog installed files to GROUP. +-m MODE $chmodprog installed files to MODE. +-o USER $chownprog installed files to USER. +-s $stripprog installed files. +-t DIRECTORY install into DIRECTORY. +-T report an error if DSTFILE is a directory. +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -c) shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit 0;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t) dstarg=$2 + shift + shift + continue;; + + -T) no_target_directory=true + shift + continue;; + + --version) echo "$0 $scriptversion"; exit 0;; + + *) # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + test -n "$dir_arg$dstarg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + mkdircmd=: + chmodcmd= + else + mkdircmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dstarg: Is a directory" >&2 + exit 1 + fi + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test -d "$pathcomp" || exit + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $mkdircmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Copy the file name to the temp name. + $doit $cpprog "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: Property changes on: autoconf/install-sh ___________________________________________________________________ Name: svn:executable + * Added: autoconf/m4/check_gnu_make.m4 =================================================================== --- autoconf/m4/check_gnu_make.m4 2006-04-26 20:51:14 UTC (rev 5) +++ autoconf/m4/check_gnu_make.m4 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,26 @@ +# +# Check for GNU Make. This is originally from +# http://www.gnu.org/software/ac-archive/htmldoc/check_gnu_make.html +# +AC_DEFUN([AC_CHECK_GNU_MAKE], +[AC_CACHE_CHECK([for GNU make],[llvm_cv_gnu_make_command], +dnl Search all the common names for GNU make +[llvm_cv_gnu_make_command='' + for a in "$MAKE" make gmake gnumake ; do + if test -z "$a" ; then continue ; fi ; + if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) + then + llvm_cv_gnu_make_command=$a ; + break; + fi + done]) +dnl If there was a GNU version, then set @ifGNUmake@ to the empty string, +dnl '#' otherwise + if test "x$llvm_cv_gnu_make_command" != "x" ; then + ifGNUmake='' ; + else + ifGNUmake='#' ; + AC_MSG_RESULT("Not found"); + fi + AC_SUBST(ifGNUmake) +]) Modified: autoconf/m4/config_makefile.m4 =================================================================== --- autoconf/m4/config_makefile.m4 2006-04-26 20:51:14 UTC (rev 5) +++ autoconf/m4/config_makefile.m4 2006-05-05 02:06:03 UTC (rev 6) @@ -3,7 +3,5 @@ # date. This macro is unique to LLVM. # AC_DEFUN([AC_CONFIG_MAKEFILE], -[AC_CONFIG_COMMANDS($1, - [${llvm_src}/autoconf/mkinstalldirs `dirname $1` - ${SHELL} ${llvm_src}/autoconf/install-sh -c ${srcdir}/$1 $1]) +[AC_CONFIG_COMMANDS($1,${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/$1 $1,${srcdir}/autoconf/mkinstalldirs `dirname $1`) ]) Added: autoconf/m4/find_std_program.m4 =================================================================== --- autoconf/m4/find_std_program.m4 2006-04-26 20:51:14 UTC (rev 5) +++ autoconf/m4/find_std_program.m4 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,118 @@ +dnl Check for a standard program that has a bin, include and lib directory +dnl +dnl Parameters: +dnl $1 - prefix directory to check +dnl $2 - program name to check +dnl $3 - header file to check +dnl $4 - library file to check +AC_DEFUN([CHECK_STD_PROGRAM], +[m4_define([allcapsname],translit($2,a-z,A-Z)) +if test -n "$1" -a -d "$1" -a -n "$2" -a -d "$1/bin" -a -x "$1/bin/$2" ; then + AC_SUBST([USE_]allcapsname(),["USE_]allcapsname()[ = 1"]) + AC_SUBST(allcapsname(),[$1/bin/$2]) + AC_SUBST(allcapsname()[_BIN],[$1/bin]) + AC_SUBST(allcapsname()[_DIR],[$1]) + if test -n "$3" -a -d "$1/include" -a -f "$1/include/$3" ; then + AC_SUBST(allcapsname()[_INC],[$1/include]) + fi + if test -n "$4" -a -d "$1/lib" -a -f "$1/lib/$4" ; then + AC_SUBST(allcapsname()[_LIB],[$1/lib]) + fi +fi +]) + +dnl Find a program via --with options, in the path, or well known places +dnl +dnl Parameters: +dnl $1 - program's executable name +dnl $2 - header file name to check (optional) +dnl $3 - library file name to check (optional) +dnl $4 - alternate (long) name for the program +AC_DEFUN([FIND_STD_PROGRAM], +[m4_define([allcapsname],translit($1,a-z,A-Z)) +m4_define([stdprog_long_name],ifelse($4,,translit($1,[ !@#$%^&*()-+={}[]:;"',./?],[-]),translit($4,[ !@#$%^&*()-+={}[]:;"',./?],[-]))) +AC_MSG_CHECKING([for ]stdprog_long_name()[ bin/lib/include locations]) +AC_ARG_WITH($1, + AS_HELP_STRING([--with-]stdprog_long_name()[=DIR], + [Specify that the ]stdprog_long_name()[ install prefix is DIR]), + $1[pfxdir=$withval],$1[pfxdir=nada]) +AC_ARG_WITH($1[-bin], + AS_HELP_STRING([--with-]stdprog_long_name()[-bin=DIR], + [Specify that the ]stdprog_long_name()[ binary is in DIR]), + $1[bindir=$withval],$1[bindir=nada]) +AC_ARG_WITH($1[-lib], + AS_HELP_STRING([--with-]stdprog_long_name()[-lib=DIR], + [Specify that ]stdprog_long_name()[ libraries are in DIR]), + $1[libdir=$withval],$1[libdir=nada]) +AC_ARG_WITH($1[-inc], + AS_HELP_STRING([--with-]stdprog_long_name()[-inc=DIR], + [Specify that the ]stdprog_long_name()[ includes are in DIR]), + $1[incdir=$withval],$1[incdir=nada]) +eval pfxval=\$\{$1pfxdir\} +eval binval=\$\{$1bindir\} +eval incval=\$\{$1incdir\} +eval libvar=\$\{$1libdir\} +if test "${pfxval}" != "nada" ; then + CHECK_STD_PROGRAM(${pfxval},$1,$2,$3) +elif test "${binval}" != "nada" ; then + if test "${libval}" != "nada" ; then + if test "${incval}" != "nada" ; then + if test -d "${binval}" ; then + if test -d "${incval}" ; then + if test -d "${libval}" ; then + AC_SUBST(allcapsname(),${binval}/$1) + AC_SUBST(allcapsname()[_BIN],${binval}) + AC_SUBST(allcapsname()[_INC],${incval}) + AC_SUBST(allcapsname()[_LIB],${libval}) + AC_SUBST([USE_]allcapsname(),[1]) + AC_MSG_RESULT([found via --with options]) + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-libdir value must be a directory]) + fi + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-incdir value must be a directory]) + fi + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-bindir value must be a directory]) + fi + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-incdir option must be specified]) + fi + else + AC_MSG_RESULT([failed]) + AC_MSG_ERROR([The --with-]$1[-libdir option must be specified]) + fi +else + tmppfxdir=`which $1 2>&1` + if test -n "$tmppfxdir" -a -d "${tmppfxdir%*$1}" -a \ + -d "${tmppfxdir%*$1}/.." ; then + tmppfxdir=`cd "${tmppfxdir%*$1}/.." ; pwd` + CHECK_STD_PROGRAM($tmppfxdir,$1,$2,$3) + AC_MSG_RESULT([found in PATH at ]$tmppfxdir) + else + checkresult="yes" + eval checkval=\$\{"USE_"allcapsname()\} + CHECK_STD_PROGRAM([/usr],$1,$2,$3) + if test -z "${checkval}" ; then + CHECK_STD_PROGRAM([/usr/local],$1,$2,$3) + if test -z "${checkval}" ; then + CHECK_STD_PROGRAM([/sw],$1,$2,$3) + if test -z "${checkval}" ; then + CHECK_STD_PROGRAM([/opt],$1,$2,$3) + if test -z "${checkval}" ; then + CHECK_STD_PROGRAM([/],$1,$2,$3) + if test -z "${checkval}" ; then + checkresult="no" + fi + fi + fi + fi + fi + AC_MSG_RESULT($checkresult) + fi +fi +]) Added: autoconf/m4/path_perl.m4 =================================================================== --- autoconf/m4/path_perl.m4 2006-04-26 20:51:14 UTC (rev 5) +++ autoconf/m4/path_perl.m4 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,16 @@ +dnl Check for a reasonable version of Perl. +dnl $1 - Minimum Perl version. Typically 5.006. +dnl +AC_DEFUN([LLVM_PROG_PERL], [ +AC_PATH_PROG(PERL, [perl], [none]) +if test "$PERL" != "none"; then + AC_MSG_CHECKING(for Perl $1 or newer) + if $PERL -e 'use $1;' 2>&1 > /dev/null; then + AC_MSG_RESULT(yes) + else + PERL=none + AC_MSG_RESULT(not found) + fi +fi +]) + Added: autoconf/missing =================================================================== --- autoconf/missing 2006-04-26 20:51:14 UTC (rev 5) +++ autoconf/missing 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,353 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2004-09-07.08 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + exit 0 + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit 0 + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + +esac + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). +case "$1" in + lex|yacc) + # Not GNU programs, they don't have --version. + ;; + + tar) + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + exit 1 + fi + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running `$TOOL --version' or `$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + aclocal*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: Property changes on: autoconf/missing ___________________________________________________________________ Name: svn:executable + * Added: autoconf/mkinstalldirs =================================================================== --- autoconf/mkinstalldirs 2006-04-26 20:51:14 UTC (rev 5) +++ autoconf/mkinstalldirs 2006-05-05 02:06:03 UTC (rev 6) @@ -0,0 +1,150 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy + +scriptversion=2004-02-15.20 + +# Original author: Noah Friedman +# Created: 1993-05-16 +# Public domain. +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... + +Create each directory DIR (with mode MODE, if specified), including all +leading file name components. + +Report bugs to ." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --version) + echo "$0 $scriptversion" + exit 0 + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and +# mkdir -p a/c at the same time, both will detect that a is missing, +# one will create a, then the other will try to create a and die with +# a "File exists" error. This is a problem when calling mkinstalldirs +# from a parallel make. We use --version in the probe to restrict +# ourselves to GNU mkdir, which is thread-safe. +case $dirmode in + '') + if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + test -d ./-p && rmdir ./-p + test -d ./--version && rmdir ./--version + fi + ;; + *) + if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && + test ! -d ./--version; then + # echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + else + # Clean up after NextStep and OpenStep mkdir. + for d in ./-m ./-p ./--version "./$dirmode"; + do + test -d $d && rmdir $d + done + fi + ;; +esac + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + # echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + # echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: Property changes on: autoconf/mkinstalldirs ___________________________________________________________________ Name: svn:executable + * Modified: configure =================================================================== --- configure 2006-04-26 20:51:14 UTC (rev 5) +++ configure 2006-05-05 02:06:03 UTC (rev 6) @@ -1,6 +1,7 @@ #! /bin/sh +# From configure.ac Id. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for [HLVM] [0.1svn]. +# Generated by GNU Autoconf 2.59 for High Level Virtual Machine 0.1svn. # # Report bugs to . # @@ -8,7 +9,7 @@ # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # - +# $HLVM_COPYRIGHT ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## @@ -269,14 +270,52 @@ : ${ac_max_here_lines=38} # Identity of this package. -PACKAGE_NAME='[HLVM]' -PACKAGE_TARNAME='--hlvm--' -PACKAGE_VERSION='[0.1svn]' -PACKAGE_STRING='[HLVM] [0.1svn]' +PACKAGE_NAME='High Level Virtual Machine' +PACKAGE_TARNAME='HLVM' +PACKAGE_VERSION='0.1svn' +PACKAGE_STRING='High Level Virtual Machine 0.1svn' PACKAGE_BUGREPORT='hlvm-dev at hlvm.org' -ac_unique_file=""lib/Makefile"" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS HLVM_COPYRIGHT USE_LLC LLC LLC_BIN LLC_DIR LLC_INC LLC_LIB USE_ _BIN _DIR _INC _LIB LIBOBJS LTLIBOBJS' +ac_unique_file="hlvm/AST/Bundle.h" +ac_default_prefix=/usr/local/hlvm +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS HLVM_COPYRIGHT HLVM_PACKAGE HLVM_VERSION USE_ _BIN _DIR _INC _LIB HLVM_SO_VERSION HLVM_SO_CURRENT HLVM_SO_REVISION HLVM_SO_AGE HLVM_SHAREDPREFIX HLVM_DEBUG HLVM_OPTIMIZE HLVM_INLINE HLVM_ASSERT HLVM_TRACE HLVM_SMALL HLVM_EFENCE HLVM_PROFILING HLVM_WITH_WORKSPACE HLVM_WITH_EXPAT HLVM_WITH_INCLUDES HLVM_WITH_LLVM_SRC HLVM_WITH_LLVM_OBJ HLVM_WITH_LLVMGCC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP CXX CXXFLAGS ac_ct_CXX ifGNUmake EGREP HLVM_CFGNAME HLVM_CONFIGTIME HLVM_PREFIX LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -717,6 +756,34 @@ ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS # # Report the --help message. @@ -725,7 +792,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures [HLVM] [0.1svn] to adapt to many kinds of systems. +\`configure' configures High Level Virtual Machine 0.1svn to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -782,21 +849,30 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of [HLVM] [0.1svn]:";; + short | recursive ) echo "Configuration of High Level Virtual Machine 0.1svn:";; esac cat <<\_ACEOF +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-sharedprefix Install in a "--prefix" that is shared. + (default=yes) + --enable-debug Build with debug settings (slower but debuggable). + (default=no) + --enable-optimize Optimized build (faster but less debuggable). + (default=yes) + --enable-inline Build with inline functions. (default=yes) + --enable-assert Build with inline functions. (default=yes) + --enable-trace Build with tracing support. (default=no) + --enable-small Optimize for smaller executable rather than speed. + (default=no) + --enable-efence Build with Electric Fence support. (default=no) + --enable-profiling Build with profiling enabled. (default=no) + Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-LLVM=DIR Specify that the Low Level Virtual Machine install - prefix is DIR - --with-LLVM-bin=DIR Specify that the Low Level Virtual Machine binary is - in DIR - --with-LLVM-lib=DIR Specify that Low Level Virtual Machine libraries are - in DIR - --with-LLVM-inc=DIR Specify that the Low Level Virtual Machine includes - are in DIR --with-APR=DIR Specify that the Apache Portable Runtime install prefix is DIR --with-APR-bin=DIR Specify that the Apache Portable Runtime binary is @@ -805,7 +881,33 @@ in DIR --with-APR-inc=DIR Specify that the Apache Portable Runtime includes are in DIR + --with-workspace= dir=location of the HLVM workspace storage + (default=/opt/hlvm) + --with-expat= Specify where the expat lbrary is located + (default=/usr/local) + --with-includes=-I... + Specify additional header file directories + (efault=none) + --with-llvm-src= dir=the location of LLVM sources (default=/usr) + --with-llvm-obj= dir=the location of LLVM objects directory + (default=/usr) + --with-llvm-gcc= dir=the location of LLVM's llvm-gcc compiler + (default=use normal gcc) +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + Report bugs to . _ACEOF fi @@ -902,14 +1004,14 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -[HLVM] configure [0.1svn] +High Level Virtual Machine configure 0.1svn generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. - +$HLVM_COPYRIGHT _ACEOF exit 0 fi @@ -918,7 +1020,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by [HLVM] $as_me [0.1svn], which was +It was created by High Level Virtual Machine $as_me 0.1svn, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1254,284 +1356,21 @@ -HLVM_COPYRIGHT="Copyright (c) 2006 HLVM Programmer's Group" -Copyright (c) 2006 HLVM Programmer's Group) +HLVM_COPYRIGHT="Coyright (c) 2006 HLVM Group" - ac_config_files="$ac_config_files Makefile.common" - ac_config_commands="$ac_config_commands Makefile" +HLVM_VERSION="${PACKAGE_VERSION}" +HLVM_PACKAGE=$PACKAGE - ac_config_commands="$ac_config_commands lib/Makefile" - ac_config_commands="$ac_config_commands tools/Makefile" - -echo "$as_me:$LINENO: checking for Low Level Virtual Machine bin/lib/include locations" >&5 -echo $ECHO_N "checking for Low Level Virtual Machine bin/lib/include locations... $ECHO_C" >&6 - -# Check whether --with-LLVM or --without-LLVM was given. -if test "${with_LLVM+set}" = set; then - withval="$with_LLVM" - llvmpfxdir=$withval -else - llvmpfxdir=nada -fi; - -# Check whether --with-LLVM-bin or --without-LLVM-bin was given. -if test "${with_LLVM_bin+set}" = set; then - withval="$with_LLVM_bin" - llvmbindir=$withval -else - llvmbindir=nada -fi; - -# Check whether --with-LLVM-lib or --without-LLVM-lib was given. -if test "${with_LLVM_lib+set}" = set; then - withval="$with_LLVM_lib" - llvmlibdir=$withval -else - llvmlibdir=nada -fi; - -# Check whether --with-LLVM-inc or --without-LLVM-inc was given. -if test "${with_LLVM_inc+set}" = set; then - withval="$with_LLVM_inc" - llvmincdir=$withval -else - llvmincdir=nada -fi; -eval pfxval=\$\{llvmpfxdir\} -eval binval=\$\{llvmbindir\} -eval incval=\$\{llvmincdir\} -eval libvar=\$\{llvmlibdir\} -if test "${pfxval}" != "nada" ; then - -if test -n "${pfxval}" -a -d "${pfxval}" -a -n "llc" -a -d "${pfxval}/bin" -a -x "${pfxval}/bin/llc" ; then - USE_LLC="USE_LLC = 1" - - LLC=${pfxval}/bin/llc - - LLC_BIN=${pfxval}/bin - - LLC_DIR=${pfxval} - - if test -n "llvm/Module.h" -a -d "${pfxval}/include" -a -f "${pfxval}/include/llvm/Module.h" ; then - LLC_INC=${pfxval}/include - - fi - if test -n "LLVMCore.o" -a -d "${pfxval}/lib" -a -f "${pfxval}/lib/LLVMCore.o" ; then - LLC_LIB=${pfxval}/lib - - fi -fi - -elif test "${binval}" != "nada" ; then - if test "${libval}" != "nada" ; then - if test "${incval}" != "nada" ; then - if test -d "${binval}" ; then - if test -d "${incval}" ; then - if test -d "${libval}" ; then - LLC=${binval}/llvm - - LLC_BIN=${binval} - - LLC_INC=${incval} - - LLC_LIB=${libval} - - USE_LLC=1 - - echo "$as_me:$LINENO: result: found via --with options" >&5 -echo "${ECHO_T}found via --with options" >&6 - else - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 - { { echo "$as_me:$LINENO: error: The --with-llvm-libdir value must be a directory" >&5 -echo "$as_me: error: The --with-llvm-libdir value must be a directory" >&2;} - { (exit 1); exit 1; }; } - fi - else - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 - { { echo "$as_me:$LINENO: error: The --with-llvm-incdir value must be a directory" >&5 -echo "$as_me: error: The --with-llvm-incdir value must be a directory" >&2;} - { (exit 1); exit 1; }; } - fi - else - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 - { { echo "$as_me:$LINENO: error: The --with-llvm-bindir value must be a directory" >&5 -echo "$as_me: error: The --with-llvm-bindir value must be a directory" >&2;} - { (exit 1); exit 1; }; } - fi - else - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 - { { echo "$as_me:$LINENO: error: The --with-llvm-incdir option must be specified" >&5 -echo "$as_me: error: The --with-llvm-incdir option must be specified" >&2;} - { (exit 1); exit 1; }; } - fi - else - echo "$as_me:$LINENO: result: failed" >&5 -echo "${ECHO_T}failed" >&6 - { { echo "$as_me:$LINENO: error: The --with-llvm-libdir option must be specified" >&5 -echo "$as_me: error: The --with-llvm-libdir option must be specified" >&2;} - { (exit 1); exit 1; }; } - fi -else - tmppfxdir=`which llvm 2>&1` - if test -n "$tmppfxdir" -a -d "${tmppfxdir%*llvm}" -a \ - -d "${tmppfxdir%*llvm}/.." ; then - tmppfxdir=`cd "${tmppfxdir%*llvm}/.." ; pwd` - -if test -n "$tmppfxdir" -a -d "$tmppfxdir" -a -n "llc" -a -d "$tmppfxdir/bin" -a -x "$tmppfxdir/bin/llc" ; then - USE_LLC="USE_LLC = 1" - - LLC=$tmppfxdir/bin/llc - - LLC_BIN=$tmppfxdir/bin - - LLC_DIR=$tmppfxdir - - if test -n "llvm/Module.h" -a -d "$tmppfxdir/include" -a -f "$tmppfxdir/include/llvm/Module.h" ; then - LLC_INC=$tmppfxdir/include - - fi - if test -n "LLVMCore.o" -a -d "$tmppfxdir/lib" -a -f "$tmppfxdir/lib/LLVMCore.o" ; then - LLC_LIB=$tmppfxdir/lib - - fi -fi - - echo "$as_me:$LINENO: result: found in PATH at $tmppfxdir" >&5 -echo "${ECHO_T}found in PATH at $tmppfxdir" >&6 - else - checkresult="yes" - eval checkval=\$\{"USE_"LLC\} - -if test -n "/usr" -a -d "/usr" -a -n "llc" -a -d "/usr/bin" -a -x "/usr/bin/llc" ; then - USE_LLC="USE_LLC = 1" - - LLC=/usr/bin/llc - - LLC_BIN=/usr/bin - - LLC_DIR=/usr - - if test -n "llvm/Module.h" -a -d "/usr/include" -a -f "/usr/include/llvm/Module.h" ; then - LLC_INC=/usr/include - - fi - if test -n "LLVMCore.o" -a -d "/usr/lib" -a -f "/usr/lib/LLVMCore.o" ; then - LLC_LIB=/usr/lib - - fi -fi - - if test -z "${checkval}" ; then - -if test -n "/usr/local" -a -d "/usr/local" -a -n "llc" -a -d "/usr/local/bin" -a -x "/usr/local/bin/llc" ; then - USE_LLC="USE_LLC = 1" - - LLC=/usr/local/bin/llc - - LLC_BIN=/usr/local/bin - - LLC_DIR=/usr/local - - if test -n "llvm/Module.h" -a -d "/usr/local/include" -a -f "/usr/local/include/llvm/Module.h" ; then - LLC_INC=/usr/local/include - - fi - if test -n "LLVMCore.o" -a -d "/usr/local/lib" -a -f "/usr/local/lib/LLVMCore.o" ; then - LLC_LIB=/usr/local/lib - - fi -fi - - if test -z "${checkval}" ; then - -if test -n "/sw" -a -d "/sw" -a -n "llc" -a -d "/sw/bin" -a -x "/sw/bin/llc" ; then - USE_LLC="USE_LLC = 1" - - LLC=/sw/bin/llc - - LLC_BIN=/sw/bin - - LLC_DIR=/sw - - if test -n "llvm/Module.h" -a -d "/sw/include" -a -f "/sw/include/llvm/Module.h" ; then - LLC_INC=/sw/include - - fi - if test -n "LLVMCore.o" -a -d "/sw/lib" -a -f "/sw/lib/LLVMCore.o" ; then - LLC_LIB=/sw/lib - - fi -fi - - if test -z "${checkval}" ; then - -if test -n "/opt" -a -d "/opt" -a -n "llc" -a -d "/opt/bin" -a -x "/opt/bin/llc" ; then - USE_LLC="USE_LLC = 1" - - LLC=/opt/bin/llc - - LLC_BIN=/opt/bin - - LLC_DIR=/opt - - if test -n "llvm/Module.h" -a -d "/opt/include" -a -f "/opt/include/llvm/Module.h" ; then - LLC_INC=/opt/include - - fi - if test -n "LLVMCore.o" -a -d "/opt/lib" -a -f "/opt/lib/LLVMCore.o" ; then - LLC_LIB=/opt/lib - - fi -fi - - if test -z "${checkval}" ; then - -if test -n "/" -a -d "/" -a -n "llc" -a -d "//bin" -a -x "//bin/llc" ; then - USE_LLC="USE_LLC = 1" - - LLC=//bin/llc - - LLC_BIN=//bin - - LLC_DIR=/ - - if test -n "llvm/Module.h" -a -d "//include" -a -f "//include/llvm/Module.h" ; then - LLC_INC=//include - - fi - if test -n "LLVMCore.o" -a -d "//lib" -a -f "//lib/LLVMCore.o" ; then - LLC_LIB=//lib - - fi -fi - - if test -z "${checkval}" ; then - checkresult="no" - fi - fi - fi - fi - fi - echo "$as_me:$LINENO: result: $checkresult" >&5 -echo "${ECHO_T}$checkresult" >&6 - fi -fi - - echo "$as_me:$LINENO: checking for Apache Portable Runtime bin/lib/include locations" >&5 echo $ECHO_N "checking for Apache Portable Runtime bin/lib/include locations... $ECHO_C" >&6 @@ -1791,14 +1630,3018 @@ fi +HLVM_SO_CURRENT="0" +HLVM_SO_REVISION="10" +HLVM_SO_AGE="0" +HLVM_SO_VERSION="${HLVM_SO_CURRENT}:${HLVM_SO_REVISION}:${HLVM_SO_AGE}" +echo "$as_me:$LINENO: checking whether to install in a shared prefix" >&5 +echo $ECHO_N "checking whether to install in a shared prefix... $ECHO_C" >&6 +# Check whether --enable-sharedprefix or --disable-sharedprefix was given. +if test "${enable_sharedprefix+set}" = set; then + enableval="$enable_sharedprefix" + case "${enableval}" in + yes) HLVM_SHAREDPREFIX=true;; + no) HLVM_SHAREDPREFIX=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-sharedprefix" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-sharedprefix" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_SHAREDPREFIX=true +fi; +echo "$as_me:$LINENO: result: $HLVM_SHAREDPREFIX" >&5 +echo "${ECHO_T}$HLVM_SHAREDPREFIX" >&6 +if test "$HLVM_SHAREDPREFIX" = true ; then +cat >>confdefs.h <<\_ACEOF +#define HLVM_SHAREDPREFIX +_ACEOF +fi + +echo "$as_me:$LINENO: checking whether to build debug version of HLVM" >&5 +echo $ECHO_N "checking whether to build debug version of HLVM... $ECHO_C" >&6 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + case "${enableval}" in + yes) HLVM_DEBUG=true;; + no) HLVM_DEBUG=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-debug" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-debug" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_DEBUG=false +fi; +echo "$as_me:$LINENO: result: $HLVM_DEBUG" >&5 +echo "${ECHO_T}$HLVM_DEBUG" >&6 + + +echo "$as_me:$LINENO: checking whether to optimize compiliation of HLVM" >&5 +echo $ECHO_N "checking whether to optimize compiliation of HLVM... $ECHO_C" >&6 +# Check whether --enable-optimize or --disable-optimize was given. +if test "${enable_optimize+set}" = set; then + enableval="$enable_optimize" + case "${enableval}" in + yes) HLVM_OPTIMIZE=true;; + no) HLVM_OPTIMIZE=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-OPTIMIZE" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-OPTIMIZE" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_OPTIMIZE=true +fi; +echo "$as_me:$LINENO: result: $HLVM_OPTIMIZE" >&5 +echo "${ECHO_T}$HLVM_OPTIMIZE" >&6 + + +echo "$as_me:$LINENO: checking whether to use inline functions" >&5 +echo $ECHO_N "checking whether to use inline functions... $ECHO_C" >&6 +# Check whether --enable-INLINE or --disable-INLINE was given. +if test "${enable_INLINE+set}" = set; then + enableval="$enable_INLINE" + case "${enableval}" in + yes) HLVM_INLINE=true;; + no) HLVM_INLINE=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-inline" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-inline" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_INLINE=true +fi; +echo "$as_me:$LINENO: result: $HLVM_INLINE" >&5 +echo "${ECHO_T}$HLVM_INLINE" >&6 + + +echo "$as_me:$LINENO: checking whether to perform assertion checking" >&5 +echo $ECHO_N "checking whether to perform assertion checking... $ECHO_C" >&6 +# Check whether --enable-ASSERT or --disable-ASSERT was given. +if test "${enable_ASSERT+set}" = set; then + enableval="$enable_ASSERT" + case "${enableval}" in + yes) HLVM_ASSERT=true;; + no) HLVM_ASSERT=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-assert" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-assert" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_ASSERT=true +fi; +echo "$as_me:$LINENO: result: $HLVM_ASSERT" >&5 +echo "${ECHO_T}$HLVM_ASSERT" >&6 + + +echo "$as_me:$LINENO: checking whether to allow runtime tracing" >&5 +echo $ECHO_N "checking whether to allow runtime tracing... $ECHO_C" >&6 +# Check whether --enable-TRACE or --disable-TRACE was given. +if test "${enable_TRACE+set}" = set; then + enableval="$enable_TRACE" + case "${enableval}" in + yes) HLVM_TRACE=true;; + no) HLVM_TRACE=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-trace" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-trace" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_TRACE=false +fi; +echo "$as_me:$LINENO: result: $HLVM_TRACE" >&5 +echo "${ECHO_T}$HLVM_TRACE" >&6 + + +echo "$as_me:$LINENO: checking whether to build a small version of HLVM" >&5 +echo $ECHO_N "checking whether to build a small version of HLVM... $ECHO_C" >&6 +# Check whether --enable-SMALL or --disable-SMALL was given. +if test "${enable_SMALL+set}" = set; then + enableval="$enable_SMALL" + case "${enableval}" in + yes) HLVM_SMALL=true;; + no) HLVM_SMALL=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-small" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-small" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_SMALL=false +fi; +echo "$as_me:$LINENO: result: $HLVM_SMALL" >&5 +echo "${ECHO_T}$HLVM_SMALL" >&6 + + +echo "$as_me:$LINENO: checking whether to use Electric Fence" >&5 +echo $ECHO_N "checking whether to use Electric Fence... $ECHO_C" >&6 +# Check whether --enable-efence or --disable-efence was given. +if test "${enable_efence+set}" = set; then + enableval="$enable_efence" + case "${enableval}" in + yes) HLVM_EFENCE=true;; + no) HLVM_EFENCE=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-efence" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-efence" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_EFENCE=false +fi; +echo "$as_me:$LINENO: result: $HLVM_EFENCE" >&5 +echo "${ECHO_T}$HLVM_EFENCE" >&6 + + +echo "$as_me:$LINENO: checking whether to build with profiling enabled" >&5 +echo $ECHO_N "checking whether to build with profiling enabled... $ECHO_C" >&6 +# Check whether --enable-profiling or --disable-profiling was given. +if test "${enable_profiling+set}" = set; then + enableval="$enable_profiling" + case "${enableval}" in + yes) HLVM_PROFILING=true;; + no) HLVM_PROFILING=false;; + *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-profiling" >&5 +echo "$as_me: error: bad value ${enableval} for --enable-profiling" >&2;} + { (exit 1); exit 1; }; };; + esac +else + HLVM_PROFILING=false +fi; +echo "$as_me:$LINENO: result: $HLVM_PROFILING" >&5 +echo "${ECHO_T}$HLVM_PROFILING" >&6 + + +echo "$as_me:$LINENO: checking location of HLVM workspace" >&5 +echo $ECHO_N "checking location of HLVM workspace... $ECHO_C" >&6 + +# Check whether --with-workspace or --without-workspace was given. +if test "${with_workspace+set}" = set; then + withval="$with_workspace" + case "${withval}" in + /*|*/*) HLVM_WITH_WORKSPACE=$withval ;; + *) { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-WORKSPACE" >&5 +echo "$as_me: error: bad value ${withval} for --with-WORKSPACE" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + HLVM_WITH_WORKSPACE=/opt/hlvm +fi; +echo "$as_me:$LINENO: result: $HLVM_WITH_WORKSPACE" >&5 +echo "${ECHO_T}$HLVM_WITH_WORKSPACE" >&6 + + +echo "$as_me:$LINENO: checking location of expat library" >&5 +echo $ECHO_N "checking location of expat library... $ECHO_C" >&6 + +# Check whether --with-expat or --without-expat was given. +if test "${with_expat+set}" = set; then + withval="$with_expat" + case "${withval}" in + /*) HLVM_WITH_EXPAT=$withval ;; + *) { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-expat" >&5 +echo "$as_me: error: bad value ${withval} for --with-expat" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + HLVM_WITH_EXPAT=/usr +fi; +echo "$as_me:$LINENO: result: $HLVM_WITH_EXPAT" >&5 +echo "${ECHO_T}$HLVM_WITH_EXPAT" >&6 + + +echo "$as_me:$LINENO: checking location of additional header files" >&5 +echo $ECHO_N "checking location of additional header files... $ECHO_C" >&6 + +# Check whether --with-includes or --without-includes was given. +if test "${with_includes+set}" = set; then + withval="$with_includes" + case "${withval}" in + -I/*) HLVM_WITH_INCLUDES=$withval ;; + *) { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-includes" >&5 +echo "$as_me: error: bad value ${withval} for --with-includes" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + HLVM_WITH_INCLUDES= +fi; +echo "$as_me:$LINENO: result: $HLVM_WITH_INCLUDES" >&5 +echo "${ECHO_T}$HLVM_WITH_INCLUDES" >&6 + +CPPFLAGS="-D_REENTRANT -D_GNU_SOURCE $HLVM_WITH_INCLUDES" + +echo "$as_me:$LINENO: checking location of LLVM source code" >&5 +echo $ECHO_N "checking location of LLVM source code... $ECHO_C" >&6 + +# Check whether --with-llvm-src or --without-llvm-src was given. +if test "${with_llvm_src+set}" = set; then + withval="$with_llvm_src" + case "${withval}" in + /*|*/*) HLVM_WITH_LLVM_SRC=$withval ;; + *) { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-llvm-src" >&5 +echo "$as_me: error: bad value ${withval} for --with-llvm-src" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + HLVM_WITH_LLVM_SRC=/usr +fi; +echo "$as_me:$LINENO: result: $HLVM_WITH_LLVM_SRC" >&5 +echo "${ECHO_T}$HLVM_WITH_LLVM_SRC" >&6 + + +echo "$as_me:$LINENO: checking location of LLVM object code" >&5 +echo $ECHO_N "checking location of LLVM object code... $ECHO_C" >&6 + +# Check whether --with-llvm-obj or --without-llvm-obj was given. +if test "${with_llvm_obj+set}" = set; then + withval="$with_llvm_obj" + case "${withval}" in + /*|*/*) HLVM_WITH_LLVM_OBJ=$withval ;; + *) { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-llvm-obj" >&5 +echo "$as_me: error: bad value ${withval} for --with-llvm-obj" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + HLVM_WITH_LLVM_OBJ=/usr +fi; +echo "$as_me:$LINENO: result: $HLVM_WITH_LLVM_OBJ" >&5 +echo "${ECHO_T}$HLVM_WITH_LLVM_OBJ" >&6 + + +echo "$as_me:$LINENO: checking location of LLVM GCC compiler" >&5 +echo $ECHO_N "checking location of LLVM GCC compiler... $ECHO_C" >&6 + +# Check whether --with-llvm-gcc or --without-llvm-gcc was given. +if test "${with_llvm_gcc+set}" = set; then + withval="$with_llvm_gcc" + case "${withval}" in + /*|*/*) HLVM_WITH_LLVMGCC=$withval ;; + *) { { echo "$as_me:$LINENO: error: bad value ${withval} for --with-llvmgcc" >&5 +echo "$as_me: error: bad value ${withval} for --with-llvmgcc" >&2;} + { (exit 1); exit 1; }; } ;; + esac +else + HLVM_WITH_LLVMGCC="" +fi; +echo "$as_me:$LINENO: result: $HLVM_WITH_LLVMGCC" >&5 +echo "${ECHO_T}$HLVM_WITH_LLVMGCC" >&6 + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +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 "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in gcc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in gcc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACE